@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.
@@ -4,9 +4,9 @@ import * as i0 from '@angular/core';
4
4
  import { Injectable, SkipSelf, Directive, Injector, Optional, Component, Inject, Input, ElementRef, ViewChild, ChangeDetectionStrategy, EventEmitter, Output, InjectionToken, NgModule } from '@angular/core';
5
5
  import { FieldType } from '@ngx-formly/material';
6
6
  import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, combineLatestWith, BehaviorSubject, of, startWith, filter, throttleTime, combineLatest } from 'rxjs';
7
- import { filterMaybe, distinctUntilHasDifferentValues, SubscriptionObject, asObservable } from '@dereekb/rxjs';
7
+ import { filterMaybe, distinctUntilHasDifferentValues, SubscriptionObject, asObservableFromGetter, asObservable } from '@dereekb/rxjs';
8
8
  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';
9
- import { setsAreEquivalent, unique, mergeArrays, iterableToArray, range, toggleInSet, removeFromSet, addToSet, isIndexNumberInIndexRangeFunction, minAndMaxNumber, getDaysOfWeekNames, mergeObjects, KeyValueTypleValueFilter } from '@dereekb/util';
9
+ import { setsAreEquivalent, unique, mergeArrays, iterableToArray, range, toggleInSet, removeFromSet, addToSet, isIndexNumberInIndexRangeFunction, minAndMaxNumber, getDaysOfWeekNames, reduceBooleansWithAnd, mergeObjects, KeyValueTypleValueFilter } from '@dereekb/util';
10
10
  import { ComponentStore } from '@ngrx/component-store';
11
11
  import { startOfDay, endOfDay, isBefore, endOfWeek } from 'date-fns';
12
12
  import * as i1$1 from '@dereekb/dbx-web';
@@ -25,6 +25,7 @@ import * as i3$1 from '@dereekb/dbx-core';
25
25
  import { switchMapDbxInjectionComponentConfig, DbxInjectionComponentModule, DbxDatePipeModule } from '@dereekb/dbx-core';
26
26
  import * as i6 from 'angular-calendar';
27
27
  import { CalendarModule, CalendarDayModule, CalendarWeekModule } from 'angular-calendar';
28
+ import * as i7$1 from '@angular/flex-layout/extended';
28
29
  import * as i3$2 from '@angular/material/icon';
29
30
  import { MatIconModule } from '@angular/material/icon';
30
31
  import * as i1$2 from '@angular/material/dialog';
@@ -194,6 +195,7 @@ class DbxCalendarScheduleSelectionStore extends ComponentStore {
194
195
  this.dateScheduleRangeValue$ = this.currentDateScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));
195
196
  this.cellContentFactory$ = this.state$.pipe(map((x) => x.cellContentFactory), distinctUntilChanged(), shareReplay(1));
196
197
  this.isCustomized$ = this.state$.pipe(map((x) => x.toggledIndexes.size > 0), distinctUntilChanged(), shareReplay(1));
198
+ this.isViewReadonly$ = this.state$.pipe(map((x) => x.isViewReadonly), distinctUntilChanged(), shareReplay(1));
197
199
  // MARK: State Changes
198
200
  this.setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);
199
201
  this.setFilter = this.updater(updateStateWithFilter);
@@ -215,6 +217,12 @@ class DbxCalendarScheduleSelectionStore extends ComponentStore {
215
217
  this.setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, null));
216
218
  this.setDateScheduleRangeValue = this.updater((state, value) => updateStateWithDateScheduleRangeValue(state, value));
217
219
  this.setCellContentFactory = this.updater((state, cellContentFactory) => (Object.assign(Object.assign({}, state), { cellContentFactory })));
220
+ /**
221
+ * Used by the parent view to propogate a readonly state.
222
+ *
223
+ * Should typically not be used by the user directly with the intention of the parent synchronizing to this state.
224
+ */
225
+ this.setViewReadonlyState = this.updater((state, isViewReadonly) => (Object.assign(Object.assign({}, state), { isViewReadonly })));
218
226
  }
219
227
  }
220
228
  DbxCalendarScheduleSelectionStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -917,6 +925,7 @@ class DbxScheduleSelectionCalendarDatePopoverButtonComponent {
917
925
  this.popoverService = popoverService;
918
926
  this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
919
927
  this.injector = injector;
928
+ this.disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;
920
929
  this.buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((x) => {
921
930
  if ((x === null || x === void 0 ? void 0 : x.start) && x.end) {
922
931
  return `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;
@@ -932,14 +941,14 @@ class DbxScheduleSelectionCalendarDatePopoverButtonComponent {
932
941
  }
933
942
  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 });
934
943
  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: `
935
- <dbx-button #buttonPopoverOrigin icon="date_range" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
944
+ <dbx-button #buttonPopoverOrigin icon="date_range" [disabled]="disabled$ | async" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
936
945
  `, 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" }] });
937
946
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, decorators: [{
938
947
  type: Component,
939
948
  args: [{
940
949
  selector: 'dbx-schedule-selection-calendar-date-popover-button',
941
950
  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
  `
944
953
  }]
945
954
  }], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { buttonPopoverOrigin: [{
@@ -994,7 +1003,15 @@ class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
994
1003
  this.popoverService = popoverService;
995
1004
  this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
996
1005
  this.injector = injector;
997
- this.disableButton$ = this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => !x));
1006
+ this._disabled = new BehaviorSubject(false);
1007
+ this.disableButton$ = this._disabled.pipe(switchMap((disabled) => {
1008
+ if (disabled) {
1009
+ return of(true);
1010
+ }
1011
+ else {
1012
+ return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => !x));
1013
+ }
1014
+ }), distinctUntilChanged(), shareReplay(1));
998
1015
  this.buttonDisplay$ = this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => {
999
1016
  let buttonDisplay;
1000
1017
  switch (x) {
@@ -1015,12 +1032,18 @@ class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
1015
1032
  return buttonDisplay;
1016
1033
  }), shareReplay(1));
1017
1034
  }
1035
+ ngOnDestroy() {
1036
+ this._disabled.complete();
1037
+ }
1018
1038
  toggleSelection() {
1019
1039
  this.dbxCalendarScheduleSelectionStore.toggleSelection();
1020
1040
  }
1041
+ set disabled(disabled) {
1042
+ this._disabled.next(disabled);
1043
+ }
1021
1044
  }
1022
1045
  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 });
1023
- 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: `
1046
+ 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: `
1024
1047
  <dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
1025
1048
  `, 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" }] });
1026
1049
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, decorators: [{
@@ -1031,7 +1054,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1031
1054
  <dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
1032
1055
  `
1033
1056
  }]
1034
- }], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; } });
1057
+ }], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { disabled: [{
1058
+ type: Input
1059
+ }] } });
1035
1060
 
1036
1061
  function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn) {
1037
1062
  const modifyFn = inputModifyFn || (() => { });
@@ -1077,10 +1102,23 @@ class DbxScheduleSelectionCalendarComponent {
1077
1102
  constructor(calendarStore, dbxCalendarScheduleSelectionStore) {
1078
1103
  this.calendarStore = calendarStore;
1079
1104
  this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1105
+ this._inputReadonly = new BehaviorSubject(undefined);
1080
1106
  this._config = new BehaviorSubject({});
1081
1107
  this._centerRangeSub = new SubscriptionObject();
1082
- this.showClearSelectionButton$ = this._config.pipe(map((config) => { var _a; return (_a = config.showClearSelectionButton) !== null && _a !== void 0 ? _a : true; }), distinctUntilChanged());
1083
- this.datePopoverButtonInjectionConfig$ = this._config.pipe(map((x) => x.buttonInjectionConfig), switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent), shareReplay(1));
1108
+ this.readonly$ = this._config.pipe(switchMap((x) => (x.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))), combineLatestWith(this._inputReadonly), map(([configReadonly, inputReadonly]) => {
1109
+ return (configReadonly !== null && configReadonly !== void 0 ? configReadonly : false) || (inputReadonly !== null && inputReadonly !== void 0 ? inputReadonly : false);
1110
+ }), shareReplay(1));
1111
+ this.showButtonsOnReadonly$ = this._config.pipe(map((x) => { var _a; return (_a = x.showButtonsOnReadonly) !== null && _a !== void 0 ? _a : false; }), distinctUntilChanged(), shareReplay(1));
1112
+ this.showButtons$ = this.showButtonsOnReadonly$.pipe(switchMap((x) => {
1113
+ if (x) {
1114
+ return of(true);
1115
+ }
1116
+ else {
1117
+ return this.readonly$.pipe(map((x) => !x));
1118
+ }
1119
+ }), distinctUntilChanged(), shareReplay(1));
1120
+ this.showClearSelectionButton$ = this._config.pipe(map((config) => { var _a; return (_a = config.showClearSelectionButton) !== null && _a !== void 0 ? _a : true; }), combineLatestWith(this.showButtons$), map((x) => reduceBooleansWithAnd(x)), distinctUntilChanged(), shareReplay(1));
1121
+ this.datePopoverButtonInjectionConfig$ = this._config.pipe(map((x) => x.buttonInjectionConfig), switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent), combineLatestWith(this.showButtons$), map(([config, showButton]) => (showButton ? config : undefined)), shareReplay(1));
1084
1122
  this.clickEvent = new EventEmitter();
1085
1123
  // refresh any time the selected day function updates
1086
1124
  this.state$ = this.dbxCalendarScheduleSelectionStore.state$;
@@ -1094,11 +1132,12 @@ class DbxScheduleSelectionCalendarComponent {
1094
1132
  }
1095
1133
  return factory.pipe(map((x) => x(this.state$)));
1096
1134
  }), shareReplay(1));
1097
- this.refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(100), map(() => undefined));
1135
+ this.refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(20, undefined, { leading: true, trailing: true }), map(() => undefined));
1098
1136
  this.events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
1099
1137
  this.viewDate$ = this.calendarStore.date$;
1100
1138
  }
1101
1139
  ngOnInit() {
1140
+ this.dbxCalendarScheduleSelectionStore.setViewReadonlyState(this.readonly$); // sync the readonly state
1102
1141
  this.calendarStore.setNavigationRangeLimit(this.dbxCalendarScheduleSelectionStore.minMaxDateRange$); // set navigation limit to the min/max allowed dates.
1103
1142
  this.calendarStore.setShowPageButtons(true);
1104
1143
  // when a new filter is set, if the first two pages of selectable indexes fit within the calendar month, focus on that calendar month.
@@ -1114,6 +1153,7 @@ class DbxScheduleSelectionCalendarComponent {
1114
1153
  });
1115
1154
  }
1116
1155
  ngOnDestroy() {
1156
+ this._inputReadonly.complete();
1117
1157
  this.clickEvent.complete();
1118
1158
  this._config.complete();
1119
1159
  this._centerRangeSub.destroy();
@@ -1124,8 +1164,15 @@ class DbxScheduleSelectionCalendarComponent {
1124
1164
  set config(config) {
1125
1165
  this._config.next(config !== null && config !== void 0 ? config : {});
1126
1166
  }
1167
+ set readonly(readonly) {
1168
+ this._inputReadonly.next(readonly);
1169
+ }
1127
1170
  dayClicked({ date }) {
1128
- this.dbxCalendarScheduleSelectionStore.toggleSelectedDates(date);
1171
+ this.readonly$.pipe(first()).subscribe((readonly) => {
1172
+ if (!readonly) {
1173
+ this.dbxCalendarScheduleSelectionStore.toggleSelectedDates(date);
1174
+ }
1175
+ });
1129
1176
  }
1130
1177
  eventClicked(action, event) {
1131
1178
  this.clickEvent.emit({ action, event });
@@ -1137,14 +1184,16 @@ class DbxScheduleSelectionCalendarComponent {
1137
1184
  }
1138
1185
  }
1139
1186
  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 });
1140
- 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" }] });
1187
+ 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" }] });
1141
1188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, decorators: [{
1142
1189
  type: Component,
1143
- 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" }]
1190
+ 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" }]
1144
1191
  }], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }]; }, propDecorators: { clickEvent: [{
1145
1192
  type: Output
1146
1193
  }], config: [{
1147
1194
  type: Input
1195
+ }], readonly: [{
1196
+ type: Input
1148
1197
  }] } });
1149
1198
 
1150
1199
  /**
@@ -1185,7 +1234,7 @@ DbxScheduleSelectionCalendarDateDialogComponent.ɵcmp = i0.ɵɵngDeclareComponen
1185
1234
  <dbx-schedule-selection-calendar></dbx-schedule-selection-calendar>
1186
1235
  <dbx-dialog-content-footer [config]="closeConfig" (close)="close()"></dbx-dialog-content-footer>
1187
1236
  </dbx-dialog-content>
1188
- `, 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"] }] });
1237
+ `, 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"] }] });
1189
1238
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogComponent, decorators: [{
1190
1239
  type: Component,
1191
1240
  args: [{