@dereekb/dbx-form 9.24.10 → 9.24.12
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/calendar/lib/calendar.schedule.selection.component.d.ts +14 -1
- package/calendar/lib/calendar.schedule.selection.popover.button.component.d.ts +1 -0
- package/calendar/lib/calendar.schedule.selection.store.d.ts +13 -0
- package/calendar/lib/calendar.schedule.selection.toggle.button.component.d.ts +7 -3
- package/esm2020/calendar/lib/calendar.schedule.selection.component.mjs +37 -11
- package/esm2020/calendar/lib/calendar.schedule.selection.dialog.component.mjs +1 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.popover.button.component.mjs +4 -3
- package/esm2020/calendar/lib/calendar.schedule.selection.store.mjs +8 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.toggle.button.component.mjs +22 -6
- package/fesm2015/dereekb-dbx-form-calendar.mjs +63 -14
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs +63 -14
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/lib/extension/calendar/_calendar.scss +4 -0
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -6,9 +6,9 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { Injectable, SkipSelf, Directive, Injector, Optional, Component, Inject, Input, ElementRef, ViewChild, ChangeDetectionStrategy, EventEmitter, Output, InjectionToken, NgModule } from '@angular/core';
|
|
7
7
|
import { FieldType } from '@ngx-formly/material';
|
|
8
8
|
import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, combineLatestWith, BehaviorSubject, of, startWith, filter, throttleTime, combineLatest } from 'rxjs';
|
|
9
|
-
import { filterMaybe, distinctUntilHasDifferentValues, SubscriptionObject, asObservable } from '@dereekb/rxjs';
|
|
9
|
+
import { filterMaybe, distinctUntilHasDifferentValues, SubscriptionObject, asObservableFromGetter, asObservable } from '@dereekb/rxjs';
|
|
10
10
|
import { DateScheduleDayCode, expandDateScheduleDayCodesToDayOfWeekSet, dateTimingRelativeIndexFactory, dateBlockDayOfWeekFactory, findMaxDate, findMinDate, isSameDateRange, isSameDateDay, isSameDate, expandDateScheduleRange, isSameDateScheduleRange, dateTimingRelativeIndexArrayFactory, isInfiniteDateRange, copyDateScheduleDateFilterConfig, dateScheduleDateFilter, dateTimezoneUtcNormal, expandDateScheduleDayCodes, isDateInDateRangeFunction, isDateWithinDateBlockRangeFunction, copyHoursAndMinutesFromDate, dateScheduleEncodedWeek, dateBlockTimingDateFactory, enabledDaysFromDateScheduleDayCodes, dateScheduleDayCodesFromEnabledDays, formatToMonthDayString, dateRange, DateRangeType } from '@dereekb/date';
|
|
11
|
-
import { setsAreEquivalent, unique, mergeArrays, iterableToArray, range, toggleInSet, removeFromSet, addToSet, isIndexNumberInIndexRangeFunction, minAndMaxNumber, getDaysOfWeekNames, mergeObjects, KeyValueTypleValueFilter } from '@dereekb/util';
|
|
11
|
+
import { setsAreEquivalent, unique, mergeArrays, iterableToArray, range, toggleInSet, removeFromSet, addToSet, isIndexNumberInIndexRangeFunction, minAndMaxNumber, getDaysOfWeekNames, reduceBooleansWithAnd, mergeObjects, KeyValueTypleValueFilter } from '@dereekb/util';
|
|
12
12
|
import { ComponentStore } from '@ngrx/component-store';
|
|
13
13
|
import { startOfDay, endOfDay, isBefore, endOfWeek } from 'date-fns';
|
|
14
14
|
import * as i1 from '@dereekb/dbx-web/calendar';
|
|
@@ -26,6 +26,7 @@ import { switchMapDbxInjectionComponentConfig, DbxInjectionComponentModule, DbxD
|
|
|
26
26
|
import * as i1$2 from '@angular/material/dialog';
|
|
27
27
|
import * as i6 from 'angular-calendar';
|
|
28
28
|
import { CalendarModule, CalendarDayModule, CalendarWeekModule } from 'angular-calendar';
|
|
29
|
+
import * as i7$1 from '@angular/flex-layout/extended';
|
|
29
30
|
import * as i3$2 from '@angular/material/icon';
|
|
30
31
|
import { MatIconModule } from '@angular/material/icon';
|
|
31
32
|
import * as i2 from '@angular/material/button';
|
|
@@ -199,6 +200,7 @@ class DbxCalendarScheduleSelectionStore extends ComponentStore {
|
|
|
199
200
|
this.dateScheduleRangeValue$ = this.currentDateScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));
|
|
200
201
|
this.cellContentFactory$ = this.state$.pipe(map((x) => x.cellContentFactory), distinctUntilChanged(), shareReplay(1));
|
|
201
202
|
this.isCustomized$ = this.state$.pipe(map((x) => x.toggledIndexes.size > 0), distinctUntilChanged(), shareReplay(1));
|
|
203
|
+
this.isViewReadonly$ = this.state$.pipe(map((x) => x.isViewReadonly), distinctUntilChanged(), shareReplay(1));
|
|
202
204
|
// MARK: State Changes
|
|
203
205
|
this.setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);
|
|
204
206
|
this.setFilter = this.updater(updateStateWithFilter);
|
|
@@ -220,6 +222,12 @@ class DbxCalendarScheduleSelectionStore extends ComponentStore {
|
|
|
220
222
|
this.setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, null));
|
|
221
223
|
this.setDateScheduleRangeValue = this.updater((state, value) => updateStateWithDateScheduleRangeValue(state, value));
|
|
222
224
|
this.setCellContentFactory = this.updater((state, cellContentFactory) => ({ ...state, cellContentFactory }));
|
|
225
|
+
/**
|
|
226
|
+
* Used by the parent view to propogate a readonly state.
|
|
227
|
+
*
|
|
228
|
+
* Should typically not be used by the user directly with the intention of the parent synchronizing to this state.
|
|
229
|
+
*/
|
|
230
|
+
this.setViewReadonlyState = this.updater((state, isViewReadonly) => ({ ...state, isViewReadonly }));
|
|
223
231
|
}
|
|
224
232
|
}
|
|
225
233
|
DbxCalendarScheduleSelectionStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -924,6 +932,7 @@ class DbxScheduleSelectionCalendarDatePopoverButtonComponent {
|
|
|
924
932
|
this.popoverService = popoverService;
|
|
925
933
|
this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
|
|
926
934
|
this.injector = injector;
|
|
935
|
+
this.disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;
|
|
927
936
|
this.buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((x) => {
|
|
928
937
|
if (x?.start && x.end) {
|
|
929
938
|
return `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;
|
|
@@ -939,14 +948,14 @@ class DbxScheduleSelectionCalendarDatePopoverButtonComponent {
|
|
|
939
948
|
}
|
|
940
949
|
DbxScheduleSelectionCalendarDatePopoverButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, deps: [{ token: i1$1.DbxPopoverService }, { token: DbxCalendarScheduleSelectionStore }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
941
950
|
DbxScheduleSelectionCalendarDatePopoverButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, selector: "dbx-schedule-selection-calendar-date-popover-button", viewQueries: [{ propertyName: "buttonPopoverOrigin", first: true, predicate: ["buttonPopoverOrigin"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
942
|
-
<dbx-button #buttonPopoverOrigin icon="date_range" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
|
|
951
|
+
<dbx-button #buttonPopoverOrigin icon="date_range" [disabled]="disabled$ | async" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
|
|
943
952
|
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "iconOnly", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
944
953
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, decorators: [{
|
|
945
954
|
type: Component,
|
|
946
955
|
args: [{
|
|
947
956
|
selector: 'dbx-schedule-selection-calendar-date-popover-button',
|
|
948
957
|
template: `
|
|
949
|
-
<dbx-button #buttonPopoverOrigin icon="date_range" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
|
|
958
|
+
<dbx-button #buttonPopoverOrigin icon="date_range" [disabled]="disabled$ | async" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
|
|
950
959
|
`
|
|
951
960
|
}]
|
|
952
961
|
}], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { buttonPopoverOrigin: [{
|
|
@@ -1001,7 +1010,15 @@ class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
|
|
|
1001
1010
|
this.popoverService = popoverService;
|
|
1002
1011
|
this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
|
|
1003
1012
|
this.injector = injector;
|
|
1004
|
-
this.
|
|
1013
|
+
this._disabled = new BehaviorSubject(false);
|
|
1014
|
+
this.disableButton$ = this._disabled.pipe(switchMap((disabled) => {
|
|
1015
|
+
if (disabled) {
|
|
1016
|
+
return of(true);
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => !x));
|
|
1020
|
+
}
|
|
1021
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
1005
1022
|
this.buttonDisplay$ = this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => {
|
|
1006
1023
|
let buttonDisplay;
|
|
1007
1024
|
switch (x) {
|
|
@@ -1022,12 +1039,18 @@ class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
|
|
|
1022
1039
|
return buttonDisplay;
|
|
1023
1040
|
}), shareReplay(1));
|
|
1024
1041
|
}
|
|
1042
|
+
ngOnDestroy() {
|
|
1043
|
+
this._disabled.complete();
|
|
1044
|
+
}
|
|
1025
1045
|
toggleSelection() {
|
|
1026
1046
|
this.dbxCalendarScheduleSelectionStore.toggleSelection();
|
|
1027
1047
|
}
|
|
1048
|
+
set disabled(disabled) {
|
|
1049
|
+
this._disabled.next(disabled);
|
|
1050
|
+
}
|
|
1028
1051
|
}
|
|
1029
1052
|
DbxScheduleSelectionCalendarSelectionToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, deps: [{ token: i1$1.DbxPopoverService }, { token: DbxCalendarScheduleSelectionStore }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1030
|
-
DbxScheduleSelectionCalendarSelectionToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button", ngImport: i0, template: `
|
|
1053
|
+
DbxScheduleSelectionCalendarSelectionToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button", inputs: { disabled: "disabled" }, ngImport: i0, template: `
|
|
1031
1054
|
<dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
|
|
1032
1055
|
`, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "iconOnly", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
1033
1056
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, decorators: [{
|
|
@@ -1038,7 +1061,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1038
1061
|
<dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
|
|
1039
1062
|
`
|
|
1040
1063
|
}]
|
|
1041
|
-
}], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }
|
|
1064
|
+
}], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { disabled: [{
|
|
1065
|
+
type: Input
|
|
1066
|
+
}] } });
|
|
1042
1067
|
|
|
1043
1068
|
function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn) {
|
|
1044
1069
|
const modifyFn = inputModifyFn || (() => { });
|
|
@@ -1084,10 +1109,23 @@ class DbxScheduleSelectionCalendarComponent {
|
|
|
1084
1109
|
constructor(calendarStore, dbxCalendarScheduleSelectionStore) {
|
|
1085
1110
|
this.calendarStore = calendarStore;
|
|
1086
1111
|
this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
|
|
1112
|
+
this._inputReadonly = new BehaviorSubject(undefined);
|
|
1087
1113
|
this._config = new BehaviorSubject({});
|
|
1088
1114
|
this._centerRangeSub = new SubscriptionObject();
|
|
1089
|
-
this.
|
|
1090
|
-
|
|
1115
|
+
this.readonly$ = this._config.pipe(switchMap((x) => (x.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))), combineLatestWith(this._inputReadonly), map(([configReadonly, inputReadonly]) => {
|
|
1116
|
+
return (configReadonly ?? false) || (inputReadonly ?? false);
|
|
1117
|
+
}), shareReplay(1));
|
|
1118
|
+
this.showButtonsOnReadonly$ = this._config.pipe(map((x) => x.showButtonsOnReadonly ?? false), distinctUntilChanged(), shareReplay(1));
|
|
1119
|
+
this.showButtons$ = this.showButtonsOnReadonly$.pipe(switchMap((x) => {
|
|
1120
|
+
if (x) {
|
|
1121
|
+
return of(true);
|
|
1122
|
+
}
|
|
1123
|
+
else {
|
|
1124
|
+
return this.readonly$.pipe(map((x) => !x));
|
|
1125
|
+
}
|
|
1126
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
1127
|
+
this.showClearSelectionButton$ = this._config.pipe(map((config) => config.showClearSelectionButton ?? true), combineLatestWith(this.showButtons$), map((x) => reduceBooleansWithAnd(x)), distinctUntilChanged(), shareReplay(1));
|
|
1128
|
+
this.datePopoverButtonInjectionConfig$ = this._config.pipe(map((x) => x.buttonInjectionConfig), switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent), combineLatestWith(this.showButtons$), map(([config, showButton]) => (showButton ? config : undefined)), shareReplay(1));
|
|
1091
1129
|
this.clickEvent = new EventEmitter();
|
|
1092
1130
|
// refresh any time the selected day function updates
|
|
1093
1131
|
this.state$ = this.dbxCalendarScheduleSelectionStore.state$;
|
|
@@ -1101,11 +1139,12 @@ class DbxScheduleSelectionCalendarComponent {
|
|
|
1101
1139
|
}
|
|
1102
1140
|
return factory.pipe(map((x) => x(this.state$)));
|
|
1103
1141
|
}), shareReplay(1));
|
|
1104
|
-
this.refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(
|
|
1142
|
+
this.refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(20, undefined, { leading: true, trailing: true }), map(() => undefined));
|
|
1105
1143
|
this.events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
|
|
1106
1144
|
this.viewDate$ = this.calendarStore.date$;
|
|
1107
1145
|
}
|
|
1108
1146
|
ngOnInit() {
|
|
1147
|
+
this.dbxCalendarScheduleSelectionStore.setViewReadonlyState(this.readonly$); // sync the readonly state
|
|
1109
1148
|
this.calendarStore.setNavigationRangeLimit(this.dbxCalendarScheduleSelectionStore.minMaxDateRange$); // set navigation limit to the min/max allowed dates.
|
|
1110
1149
|
this.calendarStore.setShowPageButtons(true);
|
|
1111
1150
|
// when a new filter is set, if the first two pages of selectable indexes fit within the calendar month, focus on that calendar month.
|
|
@@ -1121,6 +1160,7 @@ class DbxScheduleSelectionCalendarComponent {
|
|
|
1121
1160
|
});
|
|
1122
1161
|
}
|
|
1123
1162
|
ngOnDestroy() {
|
|
1163
|
+
this._inputReadonly.complete();
|
|
1124
1164
|
this.clickEvent.complete();
|
|
1125
1165
|
this._config.complete();
|
|
1126
1166
|
this._centerRangeSub.destroy();
|
|
@@ -1131,8 +1171,15 @@ class DbxScheduleSelectionCalendarComponent {
|
|
|
1131
1171
|
set config(config) {
|
|
1132
1172
|
this._config.next(config ?? {});
|
|
1133
1173
|
}
|
|
1174
|
+
set readonly(readonly) {
|
|
1175
|
+
this._inputReadonly.next(readonly);
|
|
1176
|
+
}
|
|
1134
1177
|
dayClicked({ date }) {
|
|
1135
|
-
this.
|
|
1178
|
+
this.readonly$.pipe(first()).subscribe((readonly) => {
|
|
1179
|
+
if (!readonly) {
|
|
1180
|
+
this.dbxCalendarScheduleSelectionStore.toggleSelectedDates(date);
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1136
1183
|
}
|
|
1137
1184
|
eventClicked(action, event) {
|
|
1138
1185
|
this.clickEvent.emit({ action, event });
|
|
@@ -1144,14 +1191,16 @@ class DbxScheduleSelectionCalendarComponent {
|
|
|
1144
1191
|
}
|
|
1145
1192
|
}
|
|
1146
1193
|
DbxScheduleSelectionCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, deps: [{ token: i1.DbxCalendarStore }, { token: DbxCalendarScheduleSelectionStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
1147
|
-
DbxScheduleSelectionCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: { config: "config" }, outputs: { clickEvent: "clickEvent" }, providers: [DbxCalendarStore], ngImport: i0, template: "<dbx-calendar-base class=\"dbx-schedule-selection-calendar\">\n <ng-container controls>\n <ng-container *ngIf=\"showClearSelectionButton$ | async\">\n <dbx-schedule-selection-calendar-selection-toggle-button></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n </ng-container>\n <dbx-injection [config]=\"datePopoverButtonInjectionConfig$ | async\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n <span class=\"cal-day-badge\" *ngIf=\"day.badgeTotal > 0\">{{ day.badgeTotal }}</span>\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber':locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n", dependencies: [{ kind: "component", type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i1.DbxCalendarBaseComponent, selector: "dbx-calendar-base" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i6.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: DbxScheduleSelectionCalendarCellComponent, selector: "dbx-schedule-selection-calendar-cell", inputs: ["day"] }, { kind: "component", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.ɵCalendarDatePipe, name: "calendarDate" }] });
|
|
1194
|
+
DbxScheduleSelectionCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: { config: "config", readonly: "readonly" }, outputs: { clickEvent: "clickEvent" }, providers: [DbxCalendarStore], ngImport: i0, template: "<dbx-calendar-base class=\"dbx-schedule-selection-calendar\" [ngClass]=\"(readonly$ | async) ? 'dbx-schedule-selection-calendar-readonly' : ''\">\n <ng-container controls>\n <ng-container *ngIf=\"showClearSelectionButton$ | async\">\n <dbx-schedule-selection-calendar-selection-toggle-button [disabled]=\"readonly$ | async\"></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n </ng-container>\n <dbx-injection [config]=\"datePopoverButtonInjectionConfig$ | async\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n <span class=\"cal-day-badge\" *ngIf=\"day.badgeTotal > 0\">{{ day.badgeTotal }}</span>\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber':locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n", dependencies: [{ kind: "component", type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i1.DbxCalendarBaseComponent, selector: "dbx-calendar-base" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i6.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: "directive", type: i7$1.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: "component", type: DbxScheduleSelectionCalendarCellComponent, selector: "dbx-schedule-selection-calendar-cell", inputs: ["day"] }, { kind: "component", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button", inputs: ["disabled"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.ɵCalendarDatePipe, name: "calendarDate" }] });
|
|
1148
1195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, decorators: [{
|
|
1149
1196
|
type: Component,
|
|
1150
|
-
args: [{ selector: 'dbx-schedule-selection-calendar', providers: [DbxCalendarStore], template: "<dbx-calendar-base class=\"dbx-schedule-selection-calendar\">\n <ng-container controls>\n <ng-container *ngIf=\"showClearSelectionButton$ | async\">\n <dbx-schedule-selection-calendar-selection-toggle-button></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n </ng-container>\n <dbx-injection [config]=\"datePopoverButtonInjectionConfig$ | async\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n <span class=\"cal-day-badge\" *ngIf=\"day.badgeTotal > 0\">{{ day.badgeTotal }}</span>\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber':locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n" }]
|
|
1197
|
+
args: [{ selector: 'dbx-schedule-selection-calendar', providers: [DbxCalendarStore], template: "<dbx-calendar-base class=\"dbx-schedule-selection-calendar\" [ngClass]=\"(readonly$ | async) ? 'dbx-schedule-selection-calendar-readonly' : ''\">\n <ng-container controls>\n <ng-container *ngIf=\"showClearSelectionButton$ | async\">\n <dbx-schedule-selection-calendar-selection-toggle-button [disabled]=\"readonly$ | async\"></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n </ng-container>\n <dbx-injection [config]=\"datePopoverButtonInjectionConfig$ | async\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n <span class=\"cal-day-badge\" *ngIf=\"day.badgeTotal > 0\">{{ day.badgeTotal }}</span>\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber':locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n" }]
|
|
1151
1198
|
}], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }]; }, propDecorators: { clickEvent: [{
|
|
1152
1199
|
type: Output
|
|
1153
1200
|
}], config: [{
|
|
1154
1201
|
type: Input
|
|
1202
|
+
}], readonly: [{
|
|
1203
|
+
type: Input
|
|
1155
1204
|
}] } });
|
|
1156
1205
|
|
|
1157
1206
|
/**
|
|
@@ -1199,7 +1248,7 @@ DbxScheduleSelectionCalendarDateDialogComponent.ɵcmp = i0.ɵɵngDeclareComponen
|
|
|
1199
1248
|
<dbx-schedule-selection-calendar></dbx-schedule-selection-calendar>
|
|
1200
1249
|
<dbx-dialog-content-footer [config]="closeConfig" (close)="close()"></dbx-dialog-content-footer>
|
|
1201
1250
|
</dbx-dialog-content>
|
|
1202
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.DbxDialogContentDirective, selector: "dbx-dialog-content,[dbxDialogContent].dbx-dialog-content", inputs: ["width"] }, { kind: "component", type: i1$1.DbxDialogContentFooterComponent, selector: "dbx-dialog-content-footer", inputs: ["closeText", "buttonColor", "config"], outputs: ["close"] }, { kind: "component", type: i1$1.DbxDialogContentCloseComponent, selector: "dbx-dialog-content-close", outputs: ["close"] }, { kind: "component", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: ["config"], outputs: ["clickEvent"] }] });
|
|
1251
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.DbxDialogContentDirective, selector: "dbx-dialog-content,[dbxDialogContent].dbx-dialog-content", inputs: ["width"] }, { kind: "component", type: i1$1.DbxDialogContentFooterComponent, selector: "dbx-dialog-content-footer", inputs: ["closeText", "buttonColor", "config"], outputs: ["close"] }, { kind: "component", type: i1$1.DbxDialogContentCloseComponent, selector: "dbx-dialog-content-close", outputs: ["close"] }, { kind: "component", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: ["config", "readonly"], outputs: ["clickEvent"] }] });
|
|
1203
1252
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogComponent, decorators: [{
|
|
1204
1253
|
type: Component,
|
|
1205
1254
|
args: [{
|