@dereekb/dbx-web 13.42.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint/index.esm.js +9 -5
- package/eslint/package.json +9 -9
- package/fesm2022/dereekb-dbx-web-calendar.mjs +14 -13
- package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-docs.mjs +30 -32
- package/fesm2022/dereekb-dbx-web-docs.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +111 -99
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-style-demo.mjs +90 -91
- package/fesm2022/dereekb-dbx-web-style-demo.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-table.mjs +149 -157
- package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +5558 -5308
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/lib/extension/_extension.scss +3 -0
- package/lib/extension/download/_download.scss +23 -0
- package/lib/layout/flex/_flex.scss +11 -1
- package/lib/layout/section/_section.scss +15 -0
- package/lib/style/_root-variables.scss +2 -0
- package/lib/style/_variables.scss +10 -0
- package/package.json +20 -20
- package/types/dereekb-dbx-web-mapbox.d.ts +1 -5
- package/types/dereekb-dbx-web.d.ts +339 -326
package/eslint/index.esm.js
CHANGED
|
@@ -1438,7 +1438,9 @@ function _array_without_holes$1(arr) {
|
|
|
1438
1438
|
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
1439
1439
|
}
|
|
1440
1440
|
function _iterable_to_array$1(iter) {
|
|
1441
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1441
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
1442
|
+
return Array.from(iter);
|
|
1443
|
+
}
|
|
1442
1444
|
}
|
|
1443
1445
|
function _iterable_to_array_limit(arr, i) {
|
|
1444
1446
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -1465,10 +1467,10 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
1465
1467
|
return _arr;
|
|
1466
1468
|
}
|
|
1467
1469
|
function _non_iterable_rest() {
|
|
1468
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
1470
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1469
1471
|
}
|
|
1470
1472
|
function _non_iterable_spread$1() {
|
|
1471
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
1473
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1472
1474
|
}
|
|
1473
1475
|
function _sliced_to_array(arr, i) {
|
|
1474
1476
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest();
|
|
@@ -2523,10 +2525,12 @@ function _array_without_holes(arr) {
|
|
|
2523
2525
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
2524
2526
|
}
|
|
2525
2527
|
function _iterable_to_array(iter) {
|
|
2526
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
2528
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
2529
|
+
return Array.from(iter);
|
|
2530
|
+
}
|
|
2527
2531
|
}
|
|
2528
2532
|
function _non_iterable_spread() {
|
|
2529
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
2533
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2530
2534
|
}
|
|
2531
2535
|
function _to_consumable_array(arr) {
|
|
2532
2536
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
package/eslint/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-web/eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@dereekb/util": "
|
|
7
|
-
"@typescript-eslint/utils": "8.
|
|
6
|
+
"@dereekb/util": "14.0.0",
|
|
7
|
+
"@typescript-eslint/utils": "8.69.0"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@angular-eslint/template-parser": "
|
|
11
|
-
"@angular/core": "
|
|
12
|
-
"@dereekb/dbx-core": "
|
|
13
|
-
"@dereekb/rxjs": "
|
|
14
|
-
"@typescript-eslint/parser": "8.
|
|
15
|
-
"eslint": "10.
|
|
10
|
+
"@angular-eslint/template-parser": "22.2.0",
|
|
11
|
+
"@angular/core": "22.1.4",
|
|
12
|
+
"@dereekb/dbx-core": "14.0.0",
|
|
13
|
+
"@dereekb/rxjs": "14.0.0",
|
|
14
|
+
"@typescript-eslint/parser": "8.69.0",
|
|
15
|
+
"eslint": "10.9.1",
|
|
16
16
|
"rxjs": "^7.8.2"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject,
|
|
2
|
+
import { Injectable, inject, Component, output, computed } from '@angular/core';
|
|
3
3
|
import { isSameDay, startOfDay, endOfDay, startOfWeek, endOfWeek, startOfMonth, endOfMonth, differenceInDays, isAfter, isBefore, addDays, isSameMonth } from 'date-fns';
|
|
4
4
|
import { CalendarDatePipe, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, provideCalendar, DateAdapter } from 'angular-calendar';
|
|
5
5
|
import { dateRangeOverlapsDateRangeFunction, isDateInDateRange, isSameDateRange, isSameDateDay, isFullDateRange, clampDateToDateRange, formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';
|
|
@@ -172,10 +172,10 @@ class DbxCalendarStore extends ComponentStore {
|
|
|
172
172
|
setNavigationRangeLimit = this.updater((state, navigationRangeLimit) => updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit));
|
|
173
173
|
setShowTodayButton = this.updater((state, showTodayButton) => ({ ...state, showTodayButton: showTodayButton ?? true }));
|
|
174
174
|
setShowPageButtons = this.updater((state, showPageButtons) => ({ ...state, showPageButtons: showPageButtons ?? false }));
|
|
175
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
176
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
176
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarStore });
|
|
177
177
|
}
|
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarStore, decorators: [{
|
|
179
179
|
type: Injectable
|
|
180
180
|
}], ctorParameters: () => [] });
|
|
181
181
|
/**
|
|
@@ -291,12 +291,12 @@ class DbxCalendarBaseComponent {
|
|
|
291
291
|
typeToggleChanged(event) {
|
|
292
292
|
this.calendarStore.setDisplayType(event.value);
|
|
293
293
|
}
|
|
294
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
295
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
295
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DbxCalendarBaseComponent, isStandalone: true, selector: "dbx-calendar-base", ngImport: i0, template: "<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i3.LayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.FlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg", "fxShrink", "fxGrow"] }, { kind: "directive", type: i4.ClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg", "class"] }, { kind: "pipe", type: CalendarDatePipe, name: "calendarDate" }] });
|
|
296
296
|
}
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarBaseComponent, decorators: [{
|
|
298
298
|
type: Component,
|
|
299
|
-
args: [{ selector: 'dbx-calendar-base',
|
|
299
|
+
args: [{ selector: 'dbx-calendar-base', imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule], template: "<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n" }]
|
|
300
300
|
}] });
|
|
301
301
|
|
|
302
302
|
class DbxCalendarComponent {
|
|
@@ -312,7 +312,8 @@ class DbxCalendarComponent {
|
|
|
312
312
|
eventsSignal = toSignal(this.events$, { initialValue: [] });
|
|
313
313
|
activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$, { initialValue: true });
|
|
314
314
|
displayTypeSignal = toSignal(this.displayType$);
|
|
315
|
-
displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`,
|
|
315
|
+
displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`, /* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "displayTypeClassSignal" }] : /* istanbul ignore next */ []));
|
|
316
317
|
todayClicked() {
|
|
317
318
|
this.dayClicked({ date: new Date() });
|
|
318
319
|
}
|
|
@@ -331,12 +332,12 @@ class DbxCalendarComponent {
|
|
|
331
332
|
typeToggleChanged(event) {
|
|
332
333
|
this.calendarStore.setDisplayType(event.value);
|
|
333
334
|
}
|
|
334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
335
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: DbxCalendarComponent, isStandalone: true, selector: "dbx-calendar", outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n", dependencies: [{ kind: "component", type: DbxCalendarBaseComponent, selector: "dbx-calendar-base" }, { kind: "component", type: CalendarMonthViewComponent, selector: "mwl-calendar-month-view", inputs: ["viewDate", "events", "excludeDays", "activeDayIsOpen", "activeDay", "refresh", "locale", "tooltipPlacement", "tooltipTemplate", "tooltipAppendToBody", "tooltipDelay", "weekStartsOn", "headerTemplate", "cellTemplate", "openDayEventsTemplate", "eventTitleTemplate", "eventActionsTemplate", "weekendDays"], outputs: ["beforeViewRender", "dayClicked", "eventClicked", "columnHeaderClicked", "eventTimesChanged"] }, { kind: "component", type: CalendarDayViewComponent, selector: "mwl-calendar-day-view", inputs: ["viewDate", "events", "hourSegments", "hourSegmentHeight", "hourDuration", "minimumEventHeight", "dayStartHour", "dayStartMinute", "dayEndHour", "dayEndMinute", "refresh", "locale", "eventSnapSize", "tooltipPlacement", "tooltipTemplate", "tooltipAppendToBody", "tooltipDelay", "hourSegmentTemplate", "eventTemplate", "eventTitleTemplate", "eventActionsTemplate", "snapDraggedEvents", "allDayEventsLabelTemplate", "currentTimeMarkerTemplate", "validateEventTimesChanged", "resizeCursors"], outputs: ["eventClicked", "hourSegmentClicked", "eventTimesChanged", "beforeViewRender"] }, { kind: "component", type: CalendarWeekViewComponent, selector: "mwl-calendar-week-view", inputs: ["viewDate", "events", "excludeDays", "refresh", "locale", "tooltipPlacement", "tooltipTemplate", "tooltipAppendToBody", "tooltipDelay", "weekStartsOn", "headerTemplate", "eventTemplate", "eventTitleTemplate", "eventActionsTemplate", "precision", "weekendDays", "snapDraggedEvents", "hourSegments", "hourDuration", "hourSegmentHeight", "minimumEventHeight", "dayStartHour", "dayStartMinute", "dayEndHour", "dayEndMinute", "hourSegmentTemplate", "eventSnapSize", "allDayEventsLabelTemplate", "daysInWeek", "currentTimeMarkerTemplate", "validateEventTimesChanged", "resizeCursors"], outputs: ["dayHeaderClicked", "eventClicked", "eventTimesChanged", "beforeViewRender", "hourSegmentClicked"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
336
337
|
}
|
|
337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxCalendarComponent, decorators: [{
|
|
338
339
|
type: Component,
|
|
339
|
-
args: [{ selector: 'dbx-calendar', imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass],
|
|
340
|
+
args: [{ selector: 'dbx-calendar', imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass], template: "<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n" }]
|
|
340
341
|
}], propDecorators: { clickEvent: [{ type: i0.Output, args: ["clickEvent"] }] } });
|
|
341
342
|
|
|
342
343
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dereekb-dbx-web-calendar.mjs","sources":["../../../../packages/dbx-web/calendar/src/lib/calendar.store.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.provider.ts","../../../../packages/dbx-web/calendar/src/dereekb-dbx-web-calendar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { clampDateToDateRange, type DateRange, dateRangeOverlapsDateRangeFunction, isDateInDateRange, isFullDateRange, isSameDateDay, isSameDateRange } from '@dereekb/date';\nimport { invertDecision, type Maybe, reduceBooleansWithAndFn } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type CalendarEvent } from 'angular-calendar';\nimport { differenceInDays, addDays, endOfDay, endOfMonth, endOfWeek, isSameDay, startOfDay, startOfMonth, startOfWeek, isBefore, isAfter } from 'date-fns';\nimport { type Observable, distinctUntilChanged, first, map, shareReplay, switchMap, tap, combineLatest } from 'rxjs';\n\nexport enum CalendarDisplayType {\n MONTH = 'month',\n WEEK = 'week',\n DAY = 'day'\n}\n\nexport interface CalendarViewDateRange {\n readonly type: CalendarDisplayType;\n readonly start: Date;\n readonly end: Date;\n readonly distance: number;\n /**\n * Whether or not the min navigation date is currently visible. This implies that we're at the minimum date.\n */\n readonly isMinDateVisible: boolean;\n /**\n * Whether or not the maximum navigation date is visible. This implies that we're at the maximum date.\n */\n readonly isMaxDateVisible: boolean;\n}\n\n/**\n * Compares two {@link CalendarViewDateRange} values for equality by checking type, start/end dates, distance, and min/max visibility flags.\n *\n * @param a - First calendar view date range to compare.\n * @param b - Second calendar view date range to compare.\n * @returns Whether the two date ranges are considered equal.\n */\nexport function isCalendarViewDateRangeEqual(a: CalendarViewDateRange, b: CalendarViewDateRange): boolean {\n return a.type === b.type && isSameDay(a.start, b.start) && isSameDay(a.end, b.end) && a.distance === b.distance && a.isMinDateVisible === b.isMinDateVisible && a.isMaxDateVisible === b.isMaxDateVisible;\n}\n\nexport interface CalendarState<T = any> {\n /**\n * Calendar display mode\n */\n readonly type: CalendarDisplayType;\n /**\n * Whether or not to show the today button. Defaults to true.\n */\n readonly showTodayButton?: boolean;\n /**\n * Date that is selected.\n */\n readonly date: Date;\n /**\n * Whether or not the day was tapped/set twice.\n */\n readonly dateTappedTwice: boolean;\n /**\n * Set of calendar events.\n */\n readonly events: CalendarEvent<T>[];\n /**\n * Optional navigation range limitation that limits which dates can be navigated to.\n */\n readonly navigationRangeLimit?: Maybe<Partial<DateRange>>;\n /**\n * Whether or not to display the page buttons when applicable. Can only be displayed when a navigationRangeLimit is set.\n */\n readonly showPageButtons?: boolean;\n}\n\n/**\n * Computes the visible date range for the given calendar state based on display type (month, week, or day)\n * and the optional navigation range limit.\n *\n * @param calendarState - The current calendar state containing display type, date, and navigation limits.\n * @returns The computed visible date range including start, end, distance, and min/max visibility flags.\n */\nexport function visibleDateRangeForCalendarState(calendarState: CalendarState): CalendarViewDateRange {\n const { navigationRangeLimit, type, date } = calendarState;\n\n let start: Date;\n let end: Date;\n let distance: number;\n\n switch (type) {\n case CalendarDisplayType.MONTH:\n start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));\n end = endOfWeek(endOfMonth(date));\n distance = differenceInDays(end, start) + 1;\n break;\n case CalendarDisplayType.WEEK:\n start = startOfWeek(date);\n end = endOfWeek(start);\n distance = 7; // 7 days in a week.\n break;\n case CalendarDisplayType.DAY:\n start = startOfDay(date);\n end = endOfDay(date);\n distance = 1;\n break;\n }\n\n const isMinDateVisible: boolean = navigationRangeLimit?.start != null && !isAfter(start, navigationRangeLimit.start);\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null && !isBefore(end, navigationRangeLimit.end);\n\n // TODO: Consider changing min/max date visible logical utility to be fully within the current month or not,\n // not just visible, since it can change to a locked out calendar and doesn't feel as UI friendly.\n\n return {\n type,\n start,\n end,\n distance,\n isMinDateVisible,\n isMaxDateVisible\n };\n}\n\nconst distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged<CalendarState>((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);\n\n@Injectable()\nexport class DbxCalendarStore<T = any> extends ComponentStore<CalendarState<T>> {\n constructor() {\n super({\n type: CalendarDisplayType.MONTH,\n showTodayButton: true,\n date: new Date(),\n dateTappedTwice: false,\n events: []\n });\n }\n\n // MARK: Effects\n readonly tapFirstPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.minNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n readonly tapNext = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ end, isMaxDateVisible }) => {\n if (!isMaxDateVisible) {\n this.tapDay(addDays(end, 1));\n }\n })\n )\n )\n );\n });\n\n readonly tapPrevious = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ start, isMinDateVisible }) => {\n if (!isMinDateVisible) {\n this.tapDay(addDays(start, -1));\n }\n })\n )\n )\n );\n });\n\n readonly tapLastPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.maxNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n\n readonly showTodayButton$ = this.state$.pipe(\n map((x) => x.showTodayButton),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly date$ = this.state$.pipe(map((x) => x.date));\n readonly dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));\n\n readonly events$ = this.state$.pipe(\n map((x) => x.events),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns the events that match the tapped date range state.\n */\n readonly eventsForDateState$ = this.state$.pipe(\n distinctUntilDateOrTypeOrEventsChanged,\n map((state) => ({\n date: state.date,\n events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),\n dateTappedTwice: state.dateTappedTwice\n })),\n shareReplay(1)\n );\n\n readonly eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));\n\n readonly visibleDateRange$: Observable<CalendarViewDateRange> = this.state$.pipe(map(visibleDateRangeForCalendarState), distinctUntilChanged(isCalendarViewDateRangeEqual), shareReplay(1));\n\n readonly visibleEvents$ = combineLatest([this.events$, this.visibleDateRange$]).pipe(\n map(([events, dateRange]) => {\n const isEventInDateRange = dateRangeOverlapsDateRangeFunction(dateRange);\n return events.filter((x) => isEventInDateRange(x));\n }),\n shareReplay(1)\n );\n\n readonly isLookingAtToday$ = this.visibleDateRange$.pipe(\n map((x) => isDateInDateRange(new Date(), x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMinimumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMinDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMaximumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMaxDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly hasMultiplePages$ = combineLatest([this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(map(invertDecision(reduceBooleansWithAndFn(true))), distinctUntilChanged(), shareReplay(1));\n\n readonly displayType$ = this.state$.pipe(\n map((x) => x.type),\n distinctUntilChanged((a, b) => a === b),\n shareReplay(1)\n );\n\n readonly navigationRangeLimit$ = this.state$.pipe(\n map((x) => x.navigationRangeLimit),\n distinctUntilChanged(isSameDateRange),\n shareReplay(1)\n );\n\n readonly minNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly maxNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly isTodayInNavigationRangeLimit$ = this.navigationRangeLimit$.pipe(\n map((x) => isDateInDateRange(new Date(), x ?? {})),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canJumpToToday$ = combineLatest([this.isLookingAtToday$, this.isTodayInNavigationRangeLimit$]).pipe(\n map(([isLookingAtToday, isTodayInNavigationRangeLimit]) => !isLookingAtToday && isTodayInNavigationRangeLimit),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canShowPageButtons$ = this.state$.pipe(\n map((x) => x.showPageButtons && x.navigationRangeLimit && isFullDateRange(x.navigationRangeLimit)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showPageButtons$ = combineLatest([this.canShowPageButtons$, this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(\n map(([canShowPageButtons, isLookingAtMinimumDate, isLookingAtMaximumDate]) => {\n return canShowPageButtons && !(isLookingAtMinimumDate && isLookingAtMaximumDate);\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n /**\n * Tap a day.\n *\n * - If the same day is presented, dateTappedTwice is flipped.\n */\n readonly tapDay = this.updater((state, date: Date) => updateCalendarStateWithTappedDate(state, date));\n\n /**\n * Set all events on the calendar.\n */\n readonly setEvents = this.updater((state, events: CalendarEvent<T>[]) => ({ ...state, events }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setDisplayType = this.updater((state, type: CalendarDisplayType) => ({ ...state, type }));\n\n /**\n * Sets the navigation limit.\n */\n readonly setNavigationRangeLimit = this.updater((state, navigationRangeLimit: Maybe<Partial<DateRange>>) => updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit));\n\n readonly setShowTodayButton = this.updater((state, showTodayButton: Maybe<boolean>) => ({ ...state, showTodayButton: showTodayButton ?? true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons ?? false }));\n}\n\n/**\n * Returns an updated calendar state after tapping a date. Only updates if the date differs from the current one\n * and falls within the navigation range limit. Toggles `dateTappedTwice` when the same day is tapped again.\n *\n * @param state - The current calendar state.\n * @param date - The date that was tapped.\n * @returns The updated calendar state reflecting the tapped date.\n */\nexport function updateCalendarStateWithTappedDate(state: CalendarState, date: Date) {\n // only update the date if it is different\n if (\n !isSameDateDay(state.date, date) && // Only update the date if it is within the date range\n (!state.navigationRangeLimit || isDateInDateRange(date, state.navigationRangeLimit))\n ) {\n state = { ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false };\n }\n\n return state;\n}\n\n/**\n * Returns an updated calendar state with a new navigation range limit. If the current date falls outside\n * the new range, it is clamped to fit within the limit.\n *\n * @param state - The current calendar state.\n * @param navigationRangeLimit - The new navigation date range limit, or undefined/null to remove the limit.\n * @returns The updated calendar state with the applied navigation range limit.\n */\nexport function updateCalendarStateWithNavigationRangeLimit(state: CalendarState, navigationRangeLimit: Maybe<Partial<DateRange>>) {\n const { date } = state;\n let result: CalendarState;\n\n // cap the date if it doesn't fall within the range.\n if (navigationRangeLimit && !isDateInDateRange(date, navigationRangeLimit)) {\n const clampedDate = clampDateToDateRange(date, navigationRangeLimit);\n result = { ...state, date: clampedDate, navigationRangeLimit };\n } else {\n result = { ...state, navigationRangeLimit };\n }\n\n return result;\n}\n","import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';\nimport { type CalendarEvent } from 'angular-calendar';\n\nexport interface DbxCalendarEvent<T> {\n event: CalendarEvent<T>;\n action?: string;\n}\n\nfunction timeSubtitleForEvent(event: CalendarEvent): string {\n let subtitle;\n\n if (event.allDay) {\n subtitle = `(All Day)`;\n } else {\n subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());\n }\n\n return subtitle;\n}\n\n/**\n * Appends time/duration subtitles to each calendar event's title and sorts the events by start date in ascending order.\n *\n * @param events - The calendar events to prepare and sort.\n * @returns A new array of calendar events with updated titles, sorted by start date.\n */\nexport function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[] {\n return events\n .map((event: CalendarEvent) => {\n const subtitle = timeSubtitleForEvent(event);\n let title;\n\n if (event.allDay) {\n title = event.title + ' ' + subtitle;\n } else {\n title = `${event.title} - ${subtitle}`;\n }\n\n return {\n ...event,\n title\n };\n })\n .sort(sortDateRangeStartAscendingCompareFunction);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CalendarDatePipe } from 'angular-calendar';\n\n@Component({\n selector: 'dbx-calendar-base',\n standalone: true,\n imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './calendar.base.component.html'\n})\nexport class DbxCalendarBaseComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly showTodayButton$ = this.calendarStore.showTodayButton$;\n readonly canJumpToToday$ = this.calendarStore.canJumpToToday$;\n\n readonly isLookingAtMinimumDate$ = this.calendarStore.isLookingAtMinimumDate$;\n readonly isLookingAtMaximumDate$ = this.calendarStore.isLookingAtMaximumDate$;\n readonly hasMultiplePages$ = this.calendarStore.hasMultiplePages$;\n\n readonly showPageButtons$ = this.calendarStore.showPageButtons$;\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly showTodayButtonSignal = toSignal(this.showTodayButton$);\n readonly canJumpToTodaySignal = toSignal(this.canJumpToToday$);\n readonly isLookingAtMinimumDateSignal = toSignal(this.isLookingAtMinimumDate$, { initialValue: false });\n readonly isLookingAtMaximumDateSignal = toSignal(this.isLookingAtMaximumDate$, { initialValue: false });\n readonly hasMultiplePagesSignal = toSignal(this.hasMultiplePages$, { initialValue: false });\n readonly showPageButtonsSignal = toSignal(this.showPageButtons$);\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$);\n readonly displayTypeSignal = toSignal(this.displayType$);\n\n todayClicked(): void {\n this.calendarStore.tapDay(new Date());\n }\n\n firstPageButtonClicked(): void {\n this.calendarStore.tapFirstPage();\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n lastPageButtonClicked(): void {\n this.calendarStore.tapLastPage();\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, inject, output, ChangeDetectionStrategy, computed } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { type CalendarEvent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent } from 'angular-calendar';\nimport { DbxCalendarStore } from './calendar.store';\nimport { distinctUntilChanged, map, shareReplay, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { type DbxCalendarEvent, prepareAndSortCalendarEvents } from './calendar';\nimport { DbxCalendarBaseComponent } from './calendar.base.component';\nimport { NgClass } from '@angular/common';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'dbx-calendar',\n templateUrl: './calendar.component.html',\n imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxCalendarComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$, { initialValue: true });\n readonly displayTypeSignal = toSignal(this.displayType$);\n readonly displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`);\n\n todayClicked(): void {\n this.dayClicked({ date: new Date() });\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n dayClicked({ date }: { date: Date }): void {\n this.calendarStore.tapDay(date);\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n","import { type Provider } from '@angular/core';\nimport { DateAdapter, provideCalendar } from 'angular-calendar';\nimport { adapterFactory as dateAdapterFactory } from 'angular-calendar/date-adapters/date-fns';\n\n/**\n * Provides default configuration for the DbxCalendarModule.\n *\n * @returns Providers that register the calendar with a date-fns date adapter.\n */\nexport function provideDbxCalendar(): Provider[] {\n return provideCalendar({ provide: DateAdapter, useFactory: dateAdapterFactory });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dateAdapterFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,mBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,GAAA,EAAA,CAAA,CAAA;AAqB/B;;;;;;AAMG;AACG,SAAU,4BAA4B,CAAC,CAAwB,EAAE,CAAwB,EAAA;IAC7F,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,gBAAgB,KAAK,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,KAAK,CAAC,CAAC,gBAAgB;AAC3M;AAiCA;;;;;;AAMG;AACG,S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AAA,EAAA;;;AEZlB;;;;AAIG;SACa,kBAAkB,GAAA;AAChC,IAAA,OAAO,eAAe,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAEA,cAAkB,EAAE,CAAC;AAClF;;ACXA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-web-calendar.mjs","sources":["../../../../packages/dbx-web/calendar/src/lib/calendar.store.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.provider.ts","../../../../packages/dbx-web/calendar/src/dereekb-dbx-web-calendar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { clampDateToDateRange, type DateRange, dateRangeOverlapsDateRangeFunction, isDateInDateRange, isFullDateRange, isSameDateDay, isSameDateRange } from '@dereekb/date';\nimport { invertDecision, type Maybe, reduceBooleansWithAndFn } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type CalendarEvent } from 'angular-calendar';\nimport { differenceInDays, addDays, endOfDay, endOfMonth, endOfWeek, isSameDay, startOfDay, startOfMonth, startOfWeek, isBefore, isAfter } from 'date-fns';\nimport { type Observable, distinctUntilChanged, first, map, shareReplay, switchMap, tap, combineLatest } from 'rxjs';\n\nexport enum CalendarDisplayType {\n MONTH = 'month',\n WEEK = 'week',\n DAY = 'day'\n}\n\nexport interface CalendarViewDateRange {\n readonly type: CalendarDisplayType;\n readonly start: Date;\n readonly end: Date;\n readonly distance: number;\n /**\n * Whether or not the min navigation date is currently visible. This implies that we're at the minimum date.\n */\n readonly isMinDateVisible: boolean;\n /**\n * Whether or not the maximum navigation date is visible. This implies that we're at the maximum date.\n */\n readonly isMaxDateVisible: boolean;\n}\n\n/**\n * Compares two {@link CalendarViewDateRange} values for equality by checking type, start/end dates, distance, and min/max visibility flags.\n *\n * @param a - First calendar view date range to compare.\n * @param b - Second calendar view date range to compare.\n * @returns Whether the two date ranges are considered equal.\n */\nexport function isCalendarViewDateRangeEqual(a: CalendarViewDateRange, b: CalendarViewDateRange): boolean {\n return a.type === b.type && isSameDay(a.start, b.start) && isSameDay(a.end, b.end) && a.distance === b.distance && a.isMinDateVisible === b.isMinDateVisible && a.isMaxDateVisible === b.isMaxDateVisible;\n}\n\nexport interface CalendarState<T = any> {\n /**\n * Calendar display mode\n */\n readonly type: CalendarDisplayType;\n /**\n * Whether or not to show the today button. Defaults to true.\n */\n readonly showTodayButton?: boolean;\n /**\n * Date that is selected.\n */\n readonly date: Date;\n /**\n * Whether or not the day was tapped/set twice.\n */\n readonly dateTappedTwice: boolean;\n /**\n * Set of calendar events.\n */\n readonly events: CalendarEvent<T>[];\n /**\n * Optional navigation range limitation that limits which dates can be navigated to.\n */\n readonly navigationRangeLimit?: Maybe<Partial<DateRange>>;\n /**\n * Whether or not to display the page buttons when applicable. Can only be displayed when a navigationRangeLimit is set.\n */\n readonly showPageButtons?: boolean;\n}\n\n/**\n * Computes the visible date range for the given calendar state based on display type (month, week, or day)\n * and the optional navigation range limit.\n *\n * @param calendarState - The current calendar state containing display type, date, and navigation limits.\n * @returns The computed visible date range including start, end, distance, and min/max visibility flags.\n */\nexport function visibleDateRangeForCalendarState(calendarState: CalendarState): CalendarViewDateRange {\n const { navigationRangeLimit, type, date } = calendarState;\n\n let start: Date;\n let end: Date;\n let distance: number;\n\n switch (type) {\n case CalendarDisplayType.MONTH:\n start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));\n end = endOfWeek(endOfMonth(date));\n distance = differenceInDays(end, start) + 1;\n break;\n case CalendarDisplayType.WEEK:\n start = startOfWeek(date);\n end = endOfWeek(start);\n distance = 7; // 7 days in a week.\n break;\n case CalendarDisplayType.DAY:\n start = startOfDay(date);\n end = endOfDay(date);\n distance = 1;\n break;\n }\n\n const isMinDateVisible: boolean = navigationRangeLimit?.start != null && !isAfter(start, navigationRangeLimit.start);\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null && !isBefore(end, navigationRangeLimit.end);\n\n // TODO: Consider changing min/max date visible logical utility to be fully within the current month or not,\n // not just visible, since it can change to a locked out calendar and doesn't feel as UI friendly.\n\n return {\n type,\n start,\n end,\n distance,\n isMinDateVisible,\n isMaxDateVisible\n };\n}\n\nconst distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged<CalendarState>((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);\n\n@Injectable()\nexport class DbxCalendarStore<T = any> extends ComponentStore<CalendarState<T>> {\n constructor() {\n super({\n type: CalendarDisplayType.MONTH,\n showTodayButton: true,\n date: new Date(),\n dateTappedTwice: false,\n events: []\n });\n }\n\n // MARK: Effects\n readonly tapFirstPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.minNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n readonly tapNext = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ end, isMaxDateVisible }) => {\n if (!isMaxDateVisible) {\n this.tapDay(addDays(end, 1));\n }\n })\n )\n )\n );\n });\n\n readonly tapPrevious = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ start, isMinDateVisible }) => {\n if (!isMinDateVisible) {\n this.tapDay(addDays(start, -1));\n }\n })\n )\n )\n );\n });\n\n readonly tapLastPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.maxNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n\n readonly showTodayButton$ = this.state$.pipe(\n map((x) => x.showTodayButton),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly date$ = this.state$.pipe(map((x) => x.date));\n readonly dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));\n\n readonly events$ = this.state$.pipe(\n map((x) => x.events),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns the events that match the tapped date range state.\n */\n readonly eventsForDateState$ = this.state$.pipe(\n distinctUntilDateOrTypeOrEventsChanged,\n map((state) => ({\n date: state.date,\n events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),\n dateTappedTwice: state.dateTappedTwice\n })),\n shareReplay(1)\n );\n\n readonly eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));\n\n readonly visibleDateRange$: Observable<CalendarViewDateRange> = this.state$.pipe(map(visibleDateRangeForCalendarState), distinctUntilChanged(isCalendarViewDateRangeEqual), shareReplay(1));\n\n readonly visibleEvents$ = combineLatest([this.events$, this.visibleDateRange$]).pipe(\n map(([events, dateRange]) => {\n const isEventInDateRange = dateRangeOverlapsDateRangeFunction(dateRange);\n return events.filter((x) => isEventInDateRange(x));\n }),\n shareReplay(1)\n );\n\n readonly isLookingAtToday$ = this.visibleDateRange$.pipe(\n map((x) => isDateInDateRange(new Date(), x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMinimumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMinDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMaximumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMaxDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly hasMultiplePages$ = combineLatest([this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(map(invertDecision(reduceBooleansWithAndFn(true))), distinctUntilChanged(), shareReplay(1));\n\n readonly displayType$ = this.state$.pipe(\n map((x) => x.type),\n distinctUntilChanged((a, b) => a === b),\n shareReplay(1)\n );\n\n readonly navigationRangeLimit$ = this.state$.pipe(\n map((x) => x.navigationRangeLimit),\n distinctUntilChanged(isSameDateRange),\n shareReplay(1)\n );\n\n readonly minNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly maxNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly isTodayInNavigationRangeLimit$ = this.navigationRangeLimit$.pipe(\n map((x) => isDateInDateRange(new Date(), x ?? {})),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canJumpToToday$ = combineLatest([this.isLookingAtToday$, this.isTodayInNavigationRangeLimit$]).pipe(\n map(([isLookingAtToday, isTodayInNavigationRangeLimit]) => !isLookingAtToday && isTodayInNavigationRangeLimit),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canShowPageButtons$ = this.state$.pipe(\n map((x) => x.showPageButtons && x.navigationRangeLimit && isFullDateRange(x.navigationRangeLimit)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showPageButtons$ = combineLatest([this.canShowPageButtons$, this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(\n map(([canShowPageButtons, isLookingAtMinimumDate, isLookingAtMaximumDate]) => {\n return canShowPageButtons && !(isLookingAtMinimumDate && isLookingAtMaximumDate);\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n /**\n * Tap a day.\n *\n * - If the same day is presented, dateTappedTwice is flipped.\n */\n readonly tapDay = this.updater((state, date: Date) => updateCalendarStateWithTappedDate(state, date));\n\n /**\n * Set all events on the calendar.\n */\n readonly setEvents = this.updater((state, events: CalendarEvent<T>[]) => ({ ...state, events }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setDisplayType = this.updater((state, type: CalendarDisplayType) => ({ ...state, type }));\n\n /**\n * Sets the navigation limit.\n */\n readonly setNavigationRangeLimit = this.updater((state, navigationRangeLimit: Maybe<Partial<DateRange>>) => updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit));\n\n readonly setShowTodayButton = this.updater((state, showTodayButton: Maybe<boolean>) => ({ ...state, showTodayButton: showTodayButton ?? true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons ?? false }));\n}\n\n/**\n * Returns an updated calendar state after tapping a date. Only updates if the date differs from the current one\n * and falls within the navigation range limit. Toggles `dateTappedTwice` when the same day is tapped again.\n *\n * @param state - The current calendar state.\n * @param date - The date that was tapped.\n * @returns The updated calendar state reflecting the tapped date.\n */\nexport function updateCalendarStateWithTappedDate(state: CalendarState, date: Date) {\n // only update the date if it is different\n if (\n !isSameDateDay(state.date, date) && // Only update the date if it is within the date range\n (!state.navigationRangeLimit || isDateInDateRange(date, state.navigationRangeLimit))\n ) {\n state = { ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false };\n }\n\n return state;\n}\n\n/**\n * Returns an updated calendar state with a new navigation range limit. If the current date falls outside\n * the new range, it is clamped to fit within the limit.\n *\n * @param state - The current calendar state.\n * @param navigationRangeLimit - The new navigation date range limit, or undefined/null to remove the limit.\n * @returns The updated calendar state with the applied navigation range limit.\n */\nexport function updateCalendarStateWithNavigationRangeLimit(state: CalendarState, navigationRangeLimit: Maybe<Partial<DateRange>>) {\n const { date } = state;\n let result: CalendarState;\n\n // cap the date if it doesn't fall within the range.\n if (navigationRangeLimit && !isDateInDateRange(date, navigationRangeLimit)) {\n const clampedDate = clampDateToDateRange(date, navigationRangeLimit);\n result = { ...state, date: clampedDate, navigationRangeLimit };\n } else {\n result = { ...state, navigationRangeLimit };\n }\n\n return result;\n}\n","import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';\nimport { type CalendarEvent } from 'angular-calendar';\n\nexport interface DbxCalendarEvent<T> {\n event: CalendarEvent<T>;\n action?: string;\n}\n\nfunction timeSubtitleForEvent(event: CalendarEvent): string {\n let subtitle;\n\n if (event.allDay) {\n subtitle = `(All Day)`;\n } else {\n subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());\n }\n\n return subtitle;\n}\n\n/**\n * Appends time/duration subtitles to each calendar event's title and sorts the events by start date in ascending order.\n *\n * @param events - The calendar events to prepare and sort.\n * @returns A new array of calendar events with updated titles, sorted by start date.\n */\nexport function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[] {\n return events\n .map((event: CalendarEvent) => {\n const subtitle = timeSubtitleForEvent(event);\n let title;\n\n if (event.allDay) {\n title = event.title + ' ' + subtitle;\n } else {\n title = `${event.title} - ${subtitle}`;\n }\n\n return {\n ...event,\n title\n };\n })\n .sort(sortDateRangeStartAscendingCompareFunction);\n}\n","import { Component, inject } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CalendarDatePipe } from 'angular-calendar';\n\n@Component({\n selector: 'dbx-calendar-base',\n imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule],\n templateUrl: './calendar.base.component.html'\n})\nexport class DbxCalendarBaseComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly showTodayButton$ = this.calendarStore.showTodayButton$;\n readonly canJumpToToday$ = this.calendarStore.canJumpToToday$;\n\n readonly isLookingAtMinimumDate$ = this.calendarStore.isLookingAtMinimumDate$;\n readonly isLookingAtMaximumDate$ = this.calendarStore.isLookingAtMaximumDate$;\n readonly hasMultiplePages$ = this.calendarStore.hasMultiplePages$;\n\n readonly showPageButtons$ = this.calendarStore.showPageButtons$;\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly showTodayButtonSignal = toSignal(this.showTodayButton$);\n readonly canJumpToTodaySignal = toSignal(this.canJumpToToday$);\n readonly isLookingAtMinimumDateSignal = toSignal(this.isLookingAtMinimumDate$, { initialValue: false });\n readonly isLookingAtMaximumDateSignal = toSignal(this.isLookingAtMaximumDate$, { initialValue: false });\n readonly hasMultiplePagesSignal = toSignal(this.hasMultiplePages$, { initialValue: false });\n readonly showPageButtonsSignal = toSignal(this.showPageButtons$);\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$);\n readonly displayTypeSignal = toSignal(this.displayType$);\n\n todayClicked(): void {\n this.calendarStore.tapDay(new Date());\n }\n\n firstPageButtonClicked(): void {\n this.calendarStore.tapFirstPage();\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n lastPageButtonClicked(): void {\n this.calendarStore.tapLastPage();\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, inject, output, computed } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { type CalendarEvent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent } from 'angular-calendar';\nimport { DbxCalendarStore } from './calendar.store';\nimport { distinctUntilChanged, map, shareReplay, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { type DbxCalendarEvent, prepareAndSortCalendarEvents } from './calendar';\nimport { DbxCalendarBaseComponent } from './calendar.base.component';\nimport { NgClass } from '@angular/common';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'dbx-calendar',\n templateUrl: './calendar.component.html',\n imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass]\n})\nexport class DbxCalendarComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$, { initialValue: true });\n readonly displayTypeSignal = toSignal(this.displayType$);\n readonly displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`);\n\n todayClicked(): void {\n this.dayClicked({ date: new Date() });\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n dayClicked({ date }: { date: Date }): void {\n this.calendarStore.tapDay(date);\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n","import { type Provider } from '@angular/core';\nimport { DateAdapter, provideCalendar } from 'angular-calendar';\nimport { adapterFactory as dateAdapterFactory } from 'angular-calendar/date-adapters/date-fns';\n\n/**\n * Provides default configuration for the DbxCalendarModule.\n *\n * @returns Providers that register the calendar with a date-fns date adapter.\n */\nexport function provideDbxCalendar(): Provider[] {\n return provideCalendar({ provide: DateAdapter, useFactory: dateAdapterFactory });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dateAdapterFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,mBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,GAAA,EAA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CAAA,EAAA,CAAA,EAAA,CAAA;;2FAExI,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,OAAA,EAEf,CAAC,wBAAwB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,gzCAAA,EAAA;;;AEVtJ;;;;AAIG;SACa,kBAAkB,GAAA;AAChC,IAAA,OAAO,eAAe,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAEA,cAAkB,EAAE,CAAC;AAClF;;ACXA;;AAEG;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
2
|
+
import { input, Component } from '@angular/core';
|
|
3
3
|
import { DbxSectionComponent } from '@dereekb/dbx-web';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,18 +18,20 @@ import { DbxSectionComponent } from '@dereekb/dbx-web';
|
|
|
18
18
|
* contract on par with a JSDoc tag vocabulary.
|
|
19
19
|
*/
|
|
20
20
|
class DbxDocsUiExampleComponent {
|
|
21
|
-
header = input.required(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
header = input.required(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
23
|
+
hint = input(undefined, /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: DbxDocsUiExampleComponent, isStandalone: true, selector: "dbx-docs-ui-example", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: true, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
25
27
|
<div class="dbx-docs-ui-example dbx-content-border">
|
|
26
28
|
<dbx-section [h]="3" [header]="header()" [hint]="hint()">
|
|
27
29
|
<ng-content></ng-content>
|
|
28
30
|
</dbx-section>
|
|
29
31
|
</div>
|
|
30
|
-
`, isInline: true, styles: [".dbx-docs-ui-example{display:block;margin-bottom:12px}\n"], dependencies: [{ kind: "component", type: DbxSectionComponent, selector: "dbx-section", inputs: ["elevate"] }]
|
|
32
|
+
`, isInline: true, styles: [".dbx-docs-ui-example{display:block;margin-bottom:12px}\n"], dependencies: [{ kind: "component", type: DbxSectionComponent, selector: "dbx-section", inputs: ["elevate"] }] });
|
|
31
33
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleComponent, decorators: [{
|
|
33
35
|
type: Component,
|
|
34
36
|
args: [{ selector: 'dbx-docs-ui-example', template: `
|
|
35
37
|
<div class="dbx-docs-ui-example dbx-content-border">
|
|
@@ -37,7 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
37
39
|
<ng-content></ng-content>
|
|
38
40
|
</dbx-section>
|
|
39
41
|
</div>
|
|
40
|
-
`, imports: [DbxSectionComponent],
|
|
42
|
+
`, imports: [DbxSectionComponent], styles: [".dbx-docs-ui-example{display:block;margin-bottom:12px}\n"] }]
|
|
41
43
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: true }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }] } });
|
|
42
44
|
|
|
43
45
|
/**
|
|
@@ -48,20 +50,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
48
50
|
* source order. Free-form HTML / inline markdown is allowed.
|
|
49
51
|
*/
|
|
50
52
|
class DbxDocsUiExampleInfoComponent {
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
52
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
54
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: DbxDocsUiExampleInfoComponent, isStandalone: true, selector: "dbx-docs-ui-example-info", ngImport: i0, template: `
|
|
53
55
|
<div class="dbx-docs-ui-example-info">
|
|
54
56
|
<ng-content></ng-content>
|
|
55
57
|
</div>
|
|
56
|
-
`, isInline: true, styles: [".dbx-docs-ui-example-info{display:block}\n"]
|
|
58
|
+
`, isInline: true, styles: [".dbx-docs-ui-example-info{display:block}\n"] });
|
|
57
59
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleInfoComponent, decorators: [{
|
|
59
61
|
type: Component,
|
|
60
62
|
args: [{ selector: 'dbx-docs-ui-example-info', template: `
|
|
61
63
|
<div class="dbx-docs-ui-example-info">
|
|
62
64
|
<ng-content></ng-content>
|
|
63
65
|
</div>
|
|
64
|
-
`,
|
|
66
|
+
`, styles: [".dbx-docs-ui-example-info{display:block}\n"] }]
|
|
65
67
|
}] });
|
|
66
68
|
|
|
67
69
|
/**
|
|
@@ -73,20 +75,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
73
75
|
* documentation-only chrome.
|
|
74
76
|
*/
|
|
75
77
|
class DbxDocsUiExampleContentComponent {
|
|
76
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: DbxDocsUiExampleContentComponent, isStandalone: true, selector: "dbx-docs-ui-example-content", ngImport: i0, template: `
|
|
78
80
|
<div class="dbx-docs-ui-example-content">
|
|
79
81
|
<ng-content></ng-content>
|
|
80
82
|
</div>
|
|
81
|
-
`, isInline: true, styles: [".dbx-docs-ui-example-content{display:block}\n"]
|
|
83
|
+
`, isInline: true, styles: [".dbx-docs-ui-example-content{display:block}\n"] });
|
|
82
84
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleContentComponent, decorators: [{
|
|
84
86
|
type: Component,
|
|
85
87
|
args: [{ selector: 'dbx-docs-ui-example-content', template: `
|
|
86
88
|
<div class="dbx-docs-ui-example-content">
|
|
87
89
|
<ng-content></ng-content>
|
|
88
90
|
</div>
|
|
89
|
-
`,
|
|
91
|
+
`, styles: [".dbx-docs-ui-example-content{display:block}\n"] }]
|
|
90
92
|
}] });
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -97,20 +99,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
97
99
|
* with the runnable snippet.
|
|
98
100
|
*/
|
|
99
101
|
class DbxDocsUiExampleImportsComponent {
|
|
100
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleImportsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: DbxDocsUiExampleImportsComponent, isStandalone: true, selector: "dbx-docs-ui-example-imports", ngImport: i0, template: `
|
|
102
104
|
<ng-content></ng-content>
|
|
103
|
-
`, isInline: true
|
|
105
|
+
`, isInline: true });
|
|
104
106
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleImportsComponent, decorators: [{
|
|
106
108
|
type: Component,
|
|
107
109
|
args: [{
|
|
108
110
|
selector: 'dbx-docs-ui-example-imports',
|
|
109
111
|
template: `
|
|
110
112
|
<ng-content></ng-content>
|
|
111
|
-
|
|
112
|
-
standalone: true,
|
|
113
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
113
|
+
`
|
|
114
114
|
}]
|
|
115
115
|
}] });
|
|
116
116
|
|
|
@@ -121,20 +121,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
121
121
|
* optional `notes` field, appended to `full`-depth output.
|
|
122
122
|
*/
|
|
123
123
|
class DbxDocsUiExampleNotesComponent {
|
|
124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleNotesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: DbxDocsUiExampleNotesComponent, isStandalone: true, selector: "dbx-docs-ui-example-notes", ngImport: i0, template: `
|
|
126
126
|
<ng-content></ng-content>
|
|
127
|
-
`, isInline: true
|
|
127
|
+
`, isInline: true });
|
|
128
128
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: DbxDocsUiExampleNotesComponent, decorators: [{
|
|
130
130
|
type: Component,
|
|
131
131
|
args: [{
|
|
132
132
|
selector: 'dbx-docs-ui-example-notes',
|
|
133
133
|
template: `
|
|
134
134
|
<ng-content></ng-content>
|
|
135
|
-
|
|
136
|
-
standalone: true,
|
|
137
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
135
|
+
`
|
|
138
136
|
}]
|
|
139
137
|
}] });
|
|
140
138
|
|