Skip to content

Commit

Permalink
release(workspace): v9.25.0 release
Browse files Browse the repository at this point in the history
feat: DateCellTiming (#24)

* checkpoint: daylight savings timezone fixes for DateBlockTiming

* checkpoint: copied DateCell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: date cell

* checkpoint: calendar schedule changes

* refactor: added separateValuesToSets()

* checkpoint: date cell schedule

* checkpoint: date cell schedule

* refactor: added .dbx-schedule-selection-calendar-compact-icons
  • Loading branch information
ci committed Oct 10, 2023
1 parent 05ea499 commit e1a876a
Show file tree
Hide file tree
Showing 122 changed files with 11,301 additions and 467 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)


### Features

* DateCellTiming ([#24](https://github.com/dereekb/dbx-components/issues/24)) ([aed9ef5](https://github.com/dereekb/dbx-components/commit/aed9ef56fdd0438a7a4ba90da79d6a20465bbdfd))



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
4 changes: 4 additions & 0 deletions apps/demo-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
4 changes: 4 additions & 0 deletions apps/demo-e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
9 changes: 9 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)


### Features

* DateCellTiming ([#24](https://github.com/dereekb/dbx-components/issues/24)) ([aed9ef5](https://github.com/dereekb/dbx-components/commit/aed9ef56fdd0438a7a4ba90da79d6a20465bbdfd))



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { map } from 'rxjs';
<dbx-content-border>
<dbx-content-pit>
<p>currentSelectionValue$: {{ currentSelectionValue$ | async | json }}</p>
<p>currentSelectionValueDateBlockDurationSpan$: {{ currentSelectionValueDateBlockDurationSpan$ | async | json }}</p>
<p>currentSelectionValueDateCellDurationSpanExpansion$: {{ currentSelectionValueDateCellDurationSpanExpansion$ | async | json }}</p>
<p>selectionValueSelectedIndexes$: {{ selectionValueSelectedIndexes$ | async | json }}</p>
<p>selectionValueSelectedDates$: {{ selectionValueSelectedDates$ | async | json }}</p>
<p>selectionValueWithTimezoneDateBlockDurationSpan$: {{ selectionValueWithTimezoneDateBlockDurationSpan$ | async | json }}</p>
<p>selectionValueWithTimezoneDateCellDurationSpanExpansion$: {{ selectionValueWithTimezoneDateCellDurationSpanExpansion$ | async | json }}</p>
</dbx-content-pit>
</dbx-content-border>
<dbx-subsection *ngIf="!config" header="Selector Components">
Expand All @@ -34,10 +34,10 @@ export class DocExtensionCalendarScheduleSelectionComponent {
config?: Maybe<DbxScheduleSelectionCalendarComponentConfig>;

readonly currentSelectionValue$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValue$;
readonly currentSelectionValueDateBlockDurationSpan$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValueDateBlockDurationSpan$;
readonly currentSelectionValueDateCellDurationSpanExpansion$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValueDateCellDurationSpanExpansion$;
readonly selectionValueSelectedIndexes$ = this.dbxCalendarScheduleSelectionStore.selectionValueSelectedIndexes$.pipe(map((x) => Array.from(x)));
readonly selectionValueSelectedDates$ = this.dbxCalendarScheduleSelectionStore.selectionValueSelectedDates$.pipe(map((x) => Array.from(x)));
readonly selectionValueWithTimezoneDateBlockDurationSpan$ = this.dbxCalendarScheduleSelectionStore.selectionValueWithTimezoneDateBlockDurationSpan$;
readonly selectionValueWithTimezoneDateCellDurationSpanExpansion$ = this.dbxCalendarScheduleSelectionStore.selectionValueWithTimezoneDateCellDurationSpanExpansion$;

constructor(readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore) {}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { addDays, startOfDay } from 'date-fns';
import { Component } from '@angular/core';
import { DbxCalendarScheduleSelectionStore, DbxScheduleSelectionCalendarComponentConfig } from '@dereekb/dbx-form/calendar';
import { dateBlockTiming, DateScheduleDateFilterConfig, dateTimezoneUtcNormal, formatToISO8601DayString, readDaysOfWeekNames } from '@dereekb/date';
import { DateCellScheduleDateFilterConfig, dateCellTiming, formatToISO8601DayString, readDaysOfWeekNames } from '@dereekb/date';
import { DocExtensionExampleScheduleSelectionCalendarDatePopoverButtonComponent } from './example.calendar.schedule.selection.popover.button.component';
import { map } from 'rxjs';
import { daysOfWeekNameFunction, isEvenNumber, isOddNumber, randomNumberFactory, range, sortNumbersAscendingFunction } from '@dereekb/util';

const daysRangeInFilter = 14;

export const DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER: DateScheduleDateFilterConfig = {
...dateBlockTiming({ startsAt: startOfDay(new Date()), duration: 60 }, daysRangeInFilter),
export const DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER: DateCellScheduleDateFilterConfig = {
...dateCellTiming({ startsAt: startOfDay(new Date()), duration: 60 }, daysRangeInFilter),
w: '345', // Tues/Weds/Thurs
ex: [1] // excludes the second day
};
Expand All @@ -33,10 +33,10 @@ export const DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER: DateScheduleDateFilter
<dbx-content-pit>
<p>Days: {{ selectedDaysOfWeek$ | async }}</p>
<p>currentSelectionValue$: {{ currentSelectionValue$ | async | json }}</p>
<p>currentSelectionValueDateBlockDurationSpan$: {{ currentSelectionValueDateBlockDurationSpan$ | async | json }}</p>
<p>currentSelectionValueDateCellDurationSpanExpansion$: {{ currentSelectionValueDateCellDurationSpanExpansion$ | async | json }}</p>
<p>selectionValueSelectedIndexes$: {{ selectionValueSelectedIndexes$ | async | json }}</p>
<p>selectionValueSelectedDates$: {{ selectionValueSelectedDates$ | async | json }}</p>
<p>selectionValueWithTimezoneDateBlockDurationSpan$: {{ selectionValueWithTimezoneDateBlockDurationSpan$ | async | json }}</p>
<p>selectionValueWithTimezoneDateCellDurationSpanExpansion$: {{ selectionValueWithTimezoneDateCellDurationSpanExpansion$ | async | json }}</p>
</dbx-content-pit>
</dbx-content-border>
`,
Expand All @@ -50,11 +50,11 @@ export class DocExtensionCalendarScheduleSelectionWithFilterComponent {
};

readonly currentSelectionValue$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValue$;
readonly currentSelectionValueDateBlockDurationSpan$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValueDateBlockDurationSpan$;
readonly currentSelectionValueDateCellDurationSpanExpansion$ = this.dbxCalendarScheduleSelectionStore.currentSelectionValueDateCellDurationSpanExpansion$;
readonly selectionValueSelectedIndexes$ = this.dbxCalendarScheduleSelectionStore.selectionValueSelectedIndexes$.pipe(map((x) => Array.from(x)));
readonly selectionValueSelectedDates$ = this.dbxCalendarScheduleSelectionStore.selectionValueSelectedDates$.pipe(map((x) => Array.from(x)));
readonly selectionValueWithTimezoneDateBlockDurationSpan$ = this.dbxCalendarScheduleSelectionStore.selectionValueWithTimezoneDateBlockDurationSpan$;
readonly selectedDaysOfWeek$ = this.currentSelectionValueDateBlockDurationSpan$.pipe(map((x) => readDaysOfWeekNames(x, (y) => y.startsAt, daysOfWeekNameFunction({ abbreviation: true }))));
readonly selectionValueWithTimezoneDateCellDurationSpanExpansion$ = this.dbxCalendarScheduleSelectionStore.selectionValueWithTimezoneDateCellDurationSpanExpansion$;
readonly selectedDaysOfWeek$ = this.currentSelectionValueDateCellDurationSpanExpansion$.pipe(map((x) => readDaysOfWeekNames(x, (y) => y.startsAt, daysOfWeekNameFunction({ abbreviation: true }))));

constructor(readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore) {
dbxCalendarScheduleSelectionStore.setFilter(DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER);
Expand All @@ -76,7 +76,7 @@ export class DocExtensionCalendarScheduleSelectionWithFilterComponent {
}

setFirstEightSelectionWithDays() {
const dayStrings = range(0, 8).map((x) => formatToISO8601DayString(addDays(DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER.start as Date, x)));
const dayStrings = range(0, 8).map((x) => formatToISO8601DayString(addDays(DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER.startsAt as Date, x)));
this.dbxCalendarScheduleSelectionStore.setSelectedIndexes(dayStrings);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
</dbx-two-column-right>
</dbx-two-column>
</doc-feature-example>
<doc-feature-example header="dateScheduleRangeField()" hint="A field used for building a schedule.">
<doc-form-example-form [dbxFormlyFields]="dateScheduleRangeFields" [dbxFormSource]="defaultDateScheduleRangeFieldValue$"></doc-form-example-form>
<doc-feature-example header="dateCellScheduleRangeField()" hint="A field used for building a schedule.">
<doc-form-example-form [dbxFormlyFields]="dateCellScheduleRangeFields" [dbxFormSource]="defaultDateCellScheduleRangeFieldValue$"></doc-form-example-form>
<h3>Timezone Tester</h3>
<p>The dateScheduleRangeField() uses the timezone to change the start and end dates of the output. It treats all input as if it is already in that timezone. Timezone values returned will be from the start of that day's timezone.</p>
<p>
Expand All @@ -47,11 +47,11 @@ <h4>Customizing Dialog Footer</h4>
<dbx-subsection header="The Default" hint="This is the base selection calendar with no configuration. Also displayed below are the individual components.">
<doc-extension-calendar-schedule-example></doc-extension-calendar-schedule-example>
</dbx-subsection>
<dbx-subsection header=".dbx-schedule-selection-calendar-compact" hint="Optional css class to apply that reduces the vertical size of all the squares in the calendar. Custom icon content is hidden/ignored.">
<dbx-subsection header=".dbx-schedule-selection-calendar-compact, .dbx-schedule-selection-calendar-compact-icons" hint="Optional css classes to apply that reduces the vertical size of all the squares in the calendar. Custom icon content is shown only when using .dbx-schedule-selection-calendar-compact-icons.">
<doc-extension-calendar-schedule-example class="dbx-schedule-selection-calendar-compact"></doc-extension-calendar-schedule-example>
<h3>Other Customization</h3>
<p>Can customize the calendar days of the month more directly. It is configured to be readonly when red and hides the modify buttons when readonly.</p>
<doc-extension-calendar-schedule-example class="dbx-schedule-selection-calendar-compact" [config]="scheduleConfig$ | async"></doc-extension-calendar-schedule-example>
<p>Can customize the calendar days of the month more directly. It is configured to be readonly when red and hides the modify buttons when readonly. Shows .dbx-schedule-selection-calendar-compact-icons usage.</p>
<doc-extension-calendar-schedule-example class="dbx-schedule-selection-calendar-compact-icons" [config]="scheduleConfig$ | async"></doc-extension-calendar-schedule-example>
</dbx-subsection>
</doc-feature-example>
</doc-feature-layout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OnInit, Component } from '@angular/core';
import { DbxCalendarEvent, DbxCalendarStore } from '@dereekb/dbx-web/calendar';
import { DateBlock, DateBlockCollection, dateBlockTiming, durationSpanToDateRange, expandDateBlockCollection, expandDateScheduleDayCodes, systemBaseDateToNormalDate } from '@dereekb/date';
import { DateCell, DateCellCollection, dateCellTiming, durationSpanToDateRange, expandDateCellCollection, expandDateCellScheduleDayCodes, systemBaseDateToNormalDate } from '@dereekb/date';
import { addMonths, setHours, startOfDay, addDays, addHours } from 'date-fns/esm';
import { Building, Maybe, TimezoneString, isEvenNumber, range } from '@dereekb/util';
import { CalendarEvent } from 'angular-calendar';
Expand All @@ -10,7 +10,7 @@ import { DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER } from '../component/select
import { timezoneStringField } from '@dereekb/dbx-form';
import { FormlyFieldConfig } from '@ngx-formly/core';

export interface TestCalendarEventData extends DateBlock {
export interface TestCalendarEventData extends DateCell {
value: string;
}

Expand All @@ -33,7 +33,7 @@ export class DocExtensionCalendarComponent implements OnInit {

event: Maybe<DbxCalendarEvent<TestCalendarEventData>>;

readonly defaultDateScheduleRangeFieldValue$ = of({
readonly defaultDateCellScheduleRangeFieldValue$ = of({
dateSchedule: {
start: startOfDay(new Date()),
end: addDays(startOfDay(new Date()), 14),
Expand All @@ -51,13 +51,13 @@ export class DocExtensionCalendarComponent implements OnInit {
}
});

readonly dateScheduleRangeFields = [
readonly dateCellScheduleRangeFields = [
dateScheduleRangeField({
key: 'futureDateSchedule',
required: false,
label: 'Future Dates',
timezone: this.timezone$,
defaultScheduleDays: expandDateScheduleDayCodes('8'),
defaultScheduleDays: expandDateCellScheduleDayCodes('8'),
minMaxDateRange: {
start: startOfDay(new Date())
},
Expand All @@ -68,7 +68,7 @@ export class DocExtensionCalendarComponent implements OnInit {
required: true,
label: 'Custom Label',
timezone: this.timezone$,
description: 'Input field used for picking a DateScheduleRange value.'
description: 'Input field used for picking a DateCellScheduleRange value.'
}),
dateScheduleRangeField({
timezone: this.timezone$,
Expand Down Expand Up @@ -132,7 +132,7 @@ export class DocExtensionCalendarComponent implements OnInit {
filter: {
//
...DOC_EXTENSION_CALENDAR_SCHEDULE_TEST_FILTER,
start: systemBaseDateToNormalDate(startOfDay(new Date())),
startsAt: systemBaseDateToNormalDate(startOfDay(new Date())),
end: systemBaseDateToNormalDate(startOfDay(addDays(new Date(), 3))),
w: '89',
ex: []
Expand Down Expand Up @@ -178,7 +178,7 @@ export class DocExtensionCalendarComponent implements OnInit {
const days = 90;
const startsAt = setHours(addMonths(now, -1), 12);

const timing = dateBlockTiming({ startsAt, duration: minutes }, days);
const timing = dateCellTiming({ startsAt, duration: minutes }, days);
const eventData: TestCalendarEventData[] = range(0, days).map((i) => {
const event: TestCalendarEventData = {
i,
Expand All @@ -188,12 +188,12 @@ export class DocExtensionCalendarComponent implements OnInit {
return event;
});

const dateBlockCollection: DateBlockCollection<TestCalendarEventData> = {
const dateCellCollection: DateCellCollection<TestCalendarEventData> = {
timing,
blocks: eventData
};

const spans = expandDateBlockCollection(dateBlockCollection);
const spans = expandDateCellCollection(dateCellCollection);
const events: CalendarEvent<TestCalendarEventData>[] = spans
.filter((x) => x.i % iFilter)
.map((x) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DocExtensionMapboxContentExampleComponent } from './component/mapbox.co
import { DocExtensionMapboxMarkersExampleComponent } from './component/mapbox.markers.example.component';
import { DbxCalendarRootModule } from '@dereekb/dbx-web/calendar';
import { DocExtensionCalendarScheduleSelectionComponent } from './component/selection.calendar.component';
import { DbxFormCalendarModule, DbxFormDateScheduleRangeFieldModule } from '@dereekb/dbx-form/calendar';
import { DbxFormCalendarModule, DbxFormDateCellScheduleRangeFieldModule } from '@dereekb/dbx-form/calendar';
import { DocExtensionCalendarScheduleSelectionWithFilterComponent } from './component/selection.filter.calendar.component';
import { DocExtensionTableComponent } from './container/table.component';
import { DocExtensionTableItemActionExampleComponent } from './component/table.item.action.example.component';
Expand All @@ -36,7 +36,7 @@ import { DocExtensionStructureComponent } from './container/structure.component'
DbxCalendarRootModule,
DbxFormCalendarModule,
DocFormComponentsModule,
DbxFormDateScheduleRangeFieldModule,
DbxFormDateCellScheduleRangeFieldModule,
DbxWidgetModule,
DbxMapboxModule,
NgxMapboxGLModule,
Expand Down
4 changes: 4 additions & 0 deletions components/demo-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
2 changes: 1 addition & 1 deletion components/demo-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dereekb/demo-components",
"version": "9.24.47",
"version": "9.25.0",
"peerDependencies": {
"@angular/common": "^14.0.0",
"@angular/core": "^14.0.0"
Expand Down
4 changes: 4 additions & 0 deletions components/demo-firebase/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
2 changes: 1 addition & 1 deletion components/demo-firebase/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dereekb/demo-firebase",
"version": "9.24.47",
"version": "9.25.0",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dereekb/dbx-components",
"version": "9.24.47",
"version": "9.25.0",
"license": "MIT",
"scripts": {
"postinstall": "ngcc --properties es2020 browser module main && echo >> .env.local",
Expand Down
4 changes: 4 additions & 0 deletions packages/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dereekb/browser",
"version": "9.24.47",
"version": "9.25.0",
"type": "commonjs"
}
9 changes: 9 additions & 0 deletions packages/date/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [9.25.0](https://github.com/dereekb/dbx-components/compare/v9.24.47-dev...v9.25.0) (2023-10-10)


### Features

* DateCellTiming ([#24](https://github.com/dereekb/dbx-components/issues/24)) ([aed9ef5](https://github.com/dereekb/dbx-components/commit/aed9ef56fdd0438a7a4ba90da79d6a20465bbdfd))



## [9.24.47](https://github.com/dereekb/dbx-components/compare/v9.24.46-dev...v9.24.47) (2023-10-08)


Expand Down
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dereekb/date",
"version": "9.24.47",
"version": "9.25.0",
"type": "commonjs"
}
1 change: 1 addition & 0 deletions packages/date/src/lib/date/date.block.day.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { DateScheduleDayCodesInput, expandDateScheduleDayCodes } from './date.sc
/**
* Converts the input day codes into DateBlockIndex values.
*
* @deprecated use DateCell implementation instead.
* @param dayCodes
* @returns
*/
Expand Down
Loading

0 comments on commit e1a876a

Please sign in to comment.