@dereekb/dbx-web 13.6.7 → 13.6.8
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/fesm2022/dereekb-dbx-web-calendar.mjs +2 -2
- package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +2 -2
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +21 -11
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/package.json +6 -6
- package/types/dereekb-dbx-web.d.ts +31 -14
|
@@ -293,11 +293,11 @@ class DbxCalendarBaseComponent {
|
|
|
293
293
|
this.calendarStore.setDisplayType(event.value);
|
|
294
294
|
}
|
|
295
295
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxCalendarBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
296
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", 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
|
|
296
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", 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.DefaultLayoutDirective, 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.DefaultFlexDirective, 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"] }, { kind: "directive", type: i4.DefaultClassDirective, 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"] }, { kind: "pipe", type: CalendarDatePipe, name: "calendarDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
297
297
|
}
|
|
298
298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxCalendarBaseComponent, decorators: [{
|
|
299
299
|
type: Component,
|
|
300
|
-
args: [{ selector: 'dbx-calendar-base', standalone: true, imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule], changeDetection: ChangeDetectionStrategy.OnPush, 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
|
|
300
|
+
args: [{ selector: 'dbx-calendar-base', standalone: true, imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule], changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
301
301
|
}] });
|
|
302
302
|
|
|
303
303
|
class DbxCalendarComponent {
|
|
@@ -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) : false;\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null ? !isBefore(end, navigationRangeLimit.end) : false;\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 != null ? showTodayButton : true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons != null ? 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\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 return { ...state, date: clampedDate, navigationRangeLimit };\n } else {\n return { ...state, navigationRangeLimit };\n }\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 if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return 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-bar\" 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 if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return 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,SA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CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIxI,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,WAEf,CAAC,wBAAwB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAA,eAAA,EACnI,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,gzCAAA,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) : false;\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null ? !isBefore(end, navigationRangeLimit.end) : false;\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 != null ? showTodayButton : true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons != null ? 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\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 return { ...state, date: clampedDate, navigationRangeLimit };\n } else {\n return { ...state, navigationRangeLimit };\n }\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 if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return 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 if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return 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,SAAU,gCAAgC,CAAC,aAA4B,EAAA;IAC3E,MAAM,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,aAAa;AAE1D,IAAA,IAAI,KAAW;AACf,IAAA,IAAI,GAAS;AACb,IAAA,IAAI,QAAgB;IAEpB,QAAQ,IAAI;QACV,KAAK,mBAAmB,CAAC,KAAK;AAC5B,YAAA,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,YAA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 +997,13 @@ class DbxMapboxLayoutComponent {
|
|
|
997
997
|
this.isDrawerOpenSignal.set(open);
|
|
998
998
|
}
|
|
999
999
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1000
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.3", type: DbxMapboxLayoutComponent, isStandalone: true, selector: "dbx-mapbox-layout", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, forceHasDrawerContent: { classPropertyName: "forceHasDrawerContent", publicName: "forceHasDrawerContent", isSignal: true, isRequired: false, transformFunction: null }, drawerButtonColor: { classPropertyName: "drawerButtonColor", publicName: "drawerButtonColor", isSignal: true, isRequired: false, transformFunction: null }, openDrawer: { classPropertyName: "openDrawer", publicName: "openDrawer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { drawerOpenedChange: "drawerOpenedChange" }, host: { properties: { "style.--mat-sidenav-container-width": "dbxMapboxService.drawerWidth" } }, viewQueries: [{ propertyName: "drawerContainer", first: true, predicate: MatDrawerContainer, descendants: true, isSignal: true }, { propertyName: "drawerContainerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "drawerContent", first: true, predicate: ["drawerContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button.dbx-color{background:color-mix(in srgb,var(--dbx-bg-color-current, transparent) var(--dbx-color-bg-tone, 100%),transparent)}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: DbxResizedDirective, selector: "[dbxResized]", outputs: ["dbxResized"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1000
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.3", type: DbxMapboxLayoutComponent, isStandalone: true, selector: "dbx-mapbox-layout", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, forceHasDrawerContent: { classPropertyName: "forceHasDrawerContent", publicName: "forceHasDrawerContent", isSignal: true, isRequired: false, transformFunction: null }, drawerButtonColor: { classPropertyName: "drawerButtonColor", publicName: "drawerButtonColor", isSignal: true, isRequired: false, transformFunction: null }, openDrawer: { classPropertyName: "openDrawer", publicName: "openDrawer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { drawerOpenedChange: "drawerOpenedChange" }, host: { properties: { "style.--mat-sidenav-container-width": "dbxMapboxService.drawerWidth" } }, viewQueries: [{ propertyName: "drawerContainer", first: true, predicate: MatDrawerContainer, descendants: true, isSignal: true }, { propertyName: "drawerContainerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "drawerContent", first: true, predicate: ["drawerContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button.dbx-color{color:var(--dbx-color-current, transparent);background:color-mix(in srgb,var(--dbx-bg-color-current, transparent) var(--dbx-color-bg-tone, 100%),transparent)}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: DbxResizedDirective, selector: "[dbxResized]", outputs: ["dbxResized"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "component", type: MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor", "dbxColorTone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1001
1001
|
}
|
|
1002
1002
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
|
|
1003
1003
|
type: Component,
|
|
1004
1004
|
args: [{ selector: 'dbx-mapbox-layout', imports: [DbxResizedDirective, NgClass, DbxMapboxLayoutDrawerComponent, MatDrawer, MatDrawerContainer, MatDrawerContent, MatIconModule, MatIconButton, DbxColorDirective], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
|
|
1005
1005
|
'[style.--mat-sidenav-container-width]': 'dbxMapboxService.drawerWidth'
|
|
1006
|
-
}, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button.dbx-color{background:color-mix(in srgb,var(--dbx-bg-color-current, transparent) var(--dbx-color-bg-tone, 100%),transparent)}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"] }]
|
|
1006
|
+
}, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"drawerClassesSignal()\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"drawerOpened($event)\" [opened]=\"isOpenAndHasContentSignal()\" [mode]=\"mode()\" [position]=\"positionSignal()\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"drawerClassesSignal()\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (dbxResized)=\"viewResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor()\">\n <mat-icon>{{ buttonIconSignal() }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button.dbx-color{color:var(--dbx-color-current, transparent);background:color-mix(in srgb,var(--dbx-bg-color-current, transparent) var(--dbx-color-bg-tone, 100%),transparent)}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"] }]
|
|
1007
1007
|
}], propDecorators: { drawerOpenedChange: [{ type: i0.Output, args: ["drawerOpenedChange"] }], drawerContainer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDrawerContainer), { isSignal: true }] }], drawerContainerElement: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDrawerContainer), { ...{ read: (ElementRef) }, isSignal: true }] }], drawerContent: [{ type: i0.ViewChild, args: ['drawerContent', { isSignal: true }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], forceHasDrawerContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceHasDrawerContent", required: false }] }], drawerButtonColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerButtonColor", required: false }] }], openDrawer: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDrawer", required: false }] }] } });
|
|
1008
1008
|
|
|
1009
1009
|
/**
|