@dereekb/dbx-form 10.2.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/calendar/lib/calendar.schedule.selection.cell.component.d.ts +0 -1
  2. package/calendar/lib/calendar.schedule.selection.component.d.ts +1 -2
  3. package/calendar/lib/calendar.schedule.selection.days.component.d.ts +1 -2
  4. package/calendar/lib/calendar.schedule.selection.dialog.button.component.d.ts +1 -2
  5. package/calendar/lib/calendar.schedule.selection.popover.button.component.d.ts +1 -2
  6. package/calendar/lib/calendar.schedule.selection.range.component.d.ts +2 -3
  7. package/calendar/lib/calendar.schedule.selection.store.provide.d.ts +1 -2
  8. package/calendar/lib/calendar.schedule.selection.toggle.button.component.d.ts +0 -1
  9. package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +2 -3
  10. package/esm2022/calendar/lib/calendar.module.mjs +6 -6
  11. package/esm2022/calendar/lib/calendar.schedule.selection.cell.component.mjs +10 -13
  12. package/esm2022/calendar/lib/calendar.schedule.selection.component.mjs +49 -52
  13. package/esm2022/calendar/lib/calendar.schedule.selection.days.component.mjs +23 -27
  14. package/esm2022/calendar/lib/calendar.schedule.selection.days.form.component.mjs +5 -8
  15. package/esm2022/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +12 -13
  16. package/esm2022/calendar/lib/calendar.schedule.selection.dialog.component.mjs +4 -4
  17. package/esm2022/calendar/lib/calendar.schedule.selection.popover.button.component.mjs +22 -24
  18. package/esm2022/calendar/lib/calendar.schedule.selection.popover.component.mjs +4 -4
  19. package/esm2022/calendar/lib/calendar.schedule.selection.popover.content.component.mjs +4 -4
  20. package/esm2022/calendar/lib/calendar.schedule.selection.range.component.mjs +81 -86
  21. package/esm2022/calendar/lib/calendar.schedule.selection.store.mjs +123 -123
  22. package/esm2022/calendar/lib/calendar.schedule.selection.store.provide.mjs +8 -13
  23. package/esm2022/calendar/lib/calendar.schedule.selection.toggle.button.component.mjs +39 -42
  24. package/esm2022/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +24 -31
  25. package/esm2022/calendar/lib/field/schedule/calendar.schedule.module.mjs +6 -6
  26. package/esm2022/lib/form/action/form.action.directive.mjs +29 -20
  27. package/esm2022/lib/form/action/form.action.module.mjs +4 -4
  28. package/esm2022/lib/form/action/transition/form.action.transition.module.mjs +4 -4
  29. package/esm2022/lib/form/action/transition/form.action.transition.safety.directive.mjs +7 -18
  30. package/esm2022/lib/form/form.module.mjs +4 -4
  31. package/esm2022/lib/form/io/form.changes.directive.mjs +7 -13
  32. package/esm2022/lib/form/io/form.input.directive.mjs +7 -13
  33. package/esm2022/lib/form/io/form.io.module.mjs +4 -4
  34. package/esm2022/lib/form/io/form.loading.directive.mjs +9 -15
  35. package/esm2022/lib/form.module.mjs +4 -4
  36. package/esm2022/lib/formly/field/checklist/checklist.field.mjs +4 -4
  37. package/esm2022/lib/formly/field/checklist/checklist.item.field.component.mjs +23 -31
  38. package/esm2022/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +5 -4
  39. package/esm2022/lib/formly/field/checklist/checklist.item.field.module.mjs +6 -6
  40. package/esm2022/lib/formly/field/component/component.field.component.mjs +4 -4
  41. package/esm2022/lib/formly/field/component/component.field.module.mjs +6 -6
  42. package/esm2022/lib/formly/field/form.field.module.mjs +4 -4
  43. package/esm2022/lib/formly/field/selection/list/list.field.component.mjs +33 -36
  44. package/esm2022/lib/formly/field/selection/list/list.field.module.mjs +6 -6
  45. package/esm2022/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +3 -3
  46. package/esm2022/lib/formly/field/selection/pickable/pickable.field.directive.mjs +72 -74
  47. package/esm2022/lib/formly/field/selection/pickable/pickable.field.module.mjs +6 -6
  48. package/esm2022/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +21 -24
  49. package/esm2022/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +6 -9
  50. package/esm2022/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +27 -34
  51. package/esm2022/lib/formly/field/selection/searchable/searchable.field.directive.mjs +32 -30
  52. package/esm2022/lib/formly/field/selection/searchable/searchable.field.module.mjs +6 -6
  53. package/esm2022/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +8 -11
  54. package/esm2022/lib/formly/field/selection/selection.module.mjs +4 -4
  55. package/esm2022/lib/formly/field/selection/sourceselect/sourceselect.field.component.mjs +143 -145
  56. package/esm2022/lib/formly/field/selection/sourceselect/sourceselect.field.module.mjs +6 -6
  57. package/esm2022/lib/formly/field/texteditor/texteditor.field.component.mjs +19 -24
  58. package/esm2022/lib/formly/field/texteditor/texteditor.field.module.mjs +6 -6
  59. package/esm2022/lib/formly/field/value/array/array.field.component.mjs +22 -25
  60. package/esm2022/lib/formly/field/value/array/array.field.module.mjs +6 -6
  61. package/esm2022/lib/formly/field/value/boolean/boolean.field.module.mjs +4 -4
  62. package/esm2022/lib/formly/field/value/date/date.field.module.mjs +6 -6
  63. package/esm2022/lib/formly/field/value/date/datetime.field.component.mjs +233 -236
  64. package/esm2022/lib/formly/field/value/date/datetime.field.service.mjs +7 -15
  65. package/esm2022/lib/formly/field/value/date/fixeddaterange.field.component.mjs +97 -101
  66. package/esm2022/lib/formly/field/value/number/number.field.module.mjs +4 -4
  67. package/esm2022/lib/formly/field/value/phone/phone.field.component.mjs +15 -18
  68. package/esm2022/lib/formly/field/value/phone/phone.field.module.mjs +6 -6
  69. package/esm2022/lib/formly/field/value/text/text.field.module.mjs +4 -4
  70. package/esm2022/lib/formly/field/value/value.module.mjs +4 -4
  71. package/esm2022/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +4 -4
  72. package/esm2022/lib/formly/field/wrapper/expand.wrapper.component.mjs +39 -0
  73. package/esm2022/lib/formly/field/wrapper/expand.wrapper.delegate.mjs +55 -0
  74. package/esm2022/lib/formly/field/wrapper/flex.wrapper.component.mjs +4 -4
  75. package/esm2022/lib/formly/field/wrapper/form.wrapper.module.mjs +10 -10
  76. package/esm2022/lib/formly/field/wrapper/index.mjs +3 -3
  77. package/esm2022/lib/formly/field/wrapper/info.wrapper.component.mjs +4 -4
  78. package/esm2022/lib/formly/field/wrapper/section.wrapper.component.mjs +4 -4
  79. package/esm2022/lib/formly/field/wrapper/style.wrapper.component.mjs +8 -11
  80. package/esm2022/lib/formly/field/wrapper/subsection.wrapper.component.mjs +4 -4
  81. package/esm2022/lib/formly/field/wrapper/toggle.wrapper.component.mjs +15 -18
  82. package/esm2022/lib/formly/field/wrapper/working.wrapper.component.mjs +6 -9
  83. package/esm2022/lib/formly/field/wrapper/wrapper.key.mjs +2 -3
  84. package/esm2022/lib/formly/field/wrapper/wrapper.mjs +3 -3
  85. package/esm2022/lib/formly/form/form.form.module.mjs +4 -4
  86. package/esm2022/lib/formly/form/search.form.component.mjs +6 -9
  87. package/esm2022/lib/formly/formly.context.directive.mjs +5 -8
  88. package/esm2022/lib/formly/formly.context.mjs +10 -12
  89. package/esm2022/lib/formly/formly.directive.mjs +16 -25
  90. package/esm2022/lib/formly/formly.form.component.mjs +73 -77
  91. package/esm2022/lib/formly/formly.module.mjs +6 -6
  92. package/esm2022/lib/layout/form.layout.module.mjs +4 -4
  93. package/esm2022/lib/layout/form.spacer.component.mjs +4 -4
  94. package/esm2022/mapbox/lib/field/latlng/latlng.field.component.mjs +48 -57
  95. package/esm2022/mapbox/lib/field/latlng/latlng.field.marker.component.mjs +17 -20
  96. package/esm2022/mapbox/lib/field/latlng/latlng.module.mjs +6 -6
  97. package/esm2022/mapbox/lib/field/zoom/zoom.field.component.mjs +26 -32
  98. package/esm2022/mapbox/lib/field/zoom/zoom.module.mjs +6 -6
  99. package/esm2022/mapbox/lib/mapbox.module.mjs +4 -4
  100. package/fesm2022/dereekb-dbx-form-calendar.mjs +383 -407
  101. package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
  102. package/fesm2022/dereekb-dbx-form-mapbox.mjs +96 -111
  103. package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  104. package/fesm2022/dereekb-dbx-form.mjs +1071 -1163
  105. package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
  106. package/lib/form/action/form.action.directive.d.ts +3 -3
  107. package/lib/form/action/transition/form.action.transition.safety.directive.d.ts +3 -7
  108. package/lib/form/io/form.changes.directive.d.ts +2 -3
  109. package/lib/form/io/form.input.directive.d.ts +3 -4
  110. package/lib/form/io/form.loading.directive.d.ts +3 -4
  111. package/lib/formly/field/checklist/checklist.field.d.ts +0 -1
  112. package/lib/formly/field/checklist/checklist.item.field.component.d.ts +4 -6
  113. package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +0 -1
  114. package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +1 -2
  115. package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +0 -1
  116. package/lib/formly/field/selection/sourceselect/sourceselect.field.component.d.ts +2 -2
  117. package/lib/formly/field/texteditor/texteditor.field.component.d.ts +2 -4
  118. package/lib/formly/field/value/date/datetime.field.component.d.ts +1 -3
  119. package/lib/formly/field/value/date/datetime.field.service.d.ts +1 -4
  120. package/lib/formly/field/value/date/fixeddaterange.field.component.d.ts +2 -6
  121. package/lib/formly/field/wrapper/{expandable.wrapper.component.d.ts → expand.wrapper.component.d.ts} +4 -4
  122. package/lib/formly/field/wrapper/{expandable.wrapper.delegate.d.ts → expand.wrapper.delegate.d.ts} +7 -7
  123. package/lib/formly/field/wrapper/form.wrapper.module.d.ts +1 -1
  124. package/lib/formly/field/wrapper/index.d.ts +2 -2
  125. package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +4 -4
  126. package/lib/formly/field/wrapper/wrapper.d.ts +1 -1
  127. package/lib/formly/field/wrapper/wrapper.key.d.ts +1 -1
  128. package/lib/formly/formly.directive.d.ts +0 -1
  129. package/lib/formly/formly.form.component.d.ts +2 -3
  130. package/mapbox/esm2022/lib/field/latlng/latlng.field.component.mjs +48 -57
  131. package/mapbox/esm2022/lib/field/latlng/latlng.field.marker.component.mjs +17 -20
  132. package/mapbox/esm2022/lib/field/latlng/latlng.module.mjs +6 -6
  133. package/mapbox/esm2022/lib/field/zoom/zoom.field.component.mjs +26 -32
  134. package/mapbox/esm2022/lib/field/zoom/zoom.module.mjs +6 -6
  135. package/mapbox/esm2022/lib/mapbox.module.mjs +4 -4
  136. package/mapbox/fesm2022/dereekb-dbx-form-mapbox.mjs +96 -111
  137. package/mapbox/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  138. package/mapbox/lib/field/latlng/latlng.field.component.d.ts +4 -6
  139. package/mapbox/lib/field/latlng/latlng.field.marker.component.d.ts +1 -2
  140. package/mapbox/lib/field/zoom/zoom.field.component.d.ts +2 -3
  141. package/mapbox/package.json +1 -1
  142. package/package.json +1 -1
  143. package/esm2022/lib/formly/field/wrapper/expandable.wrapper.component.mjs +0 -39
  144. package/esm2022/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +0 -58
@@ -1,9 +1,9 @@
1
- import * as i4$1 from '@dereekb/dbx-form';
1
+ import * as i2$1 from '@dereekb/dbx-form';
2
2
  import { formlyField, propsAndConfigForFieldConfig, flexLayoutWrapper, toggleField, AbstractSyncFormlyFormDirective, provideFormlyContext, DbxFormModule, DbxFormlyModule } from '@dereekb/dbx-form';
3
3
  import * as i1$1 from '@dereekb/dbx-web';
4
- import { AbstractPopoverDirective, AbstractDialogDirective, sanitizeDbxDialogContentConfig, DbxContentLayoutModule, DbxTextModule, DbxActionModule, DbxButtonModule, DbxDialogInteractionModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';
4
+ import { AbstractPopoverDirective, DbxPopoverService, AbstractDialogDirective, sanitizeDbxDialogContentConfig, CompactContextStore, DbxContentLayoutModule, DbxTextModule, DbxActionModule, DbxButtonModule, DbxDialogInteractionModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, SkipSelf, Directive, Injector, Optional, Component, Inject, Input, ViewChild, ElementRef, ChangeDetectionStrategy, EventEmitter, Output, InjectionToken, NgModule } from '@angular/core';
6
+ import { Injectable, inject, Directive, Injector, Optional, SkipSelf, Component, Input, ViewChild, ElementRef, ChangeDetectionStrategy, EventEmitter, Output, InjectionToken, NgZone, NgModule } from '@angular/core';
7
7
  import { FieldType } from '@ngx-formly/material';
8
8
  import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, of, combineLatestWith, BehaviorSubject, filter, combineLatest, EMPTY, startWith, throttleTime } from 'rxjs';
9
9
  import { filterMaybe, distinctUntilHasDifferentValues, SubscriptionObject, asObservableFromGetter, asObservable } from '@dereekb/rxjs';
@@ -11,23 +11,23 @@ import { DateCellScheduleDayCode, expandDateCellScheduleDayCodesToDayOfWeekSet,
11
11
  import { isInAllowedDaysOfWeekSet, mapValuesToSet, unique, mergeArrays, iterableToArray, isIterable, firstValueFromIterable, minAndMaxNumber, range, toggleInSet, removeFromSet, addToSet, isIndexNumberInIndexRangeFunction, 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
- import * as i3$1 from '@dereekb/dbx-core';
14
+ import * as i1$2 from '@dereekb/dbx-core';
15
15
  import { switchMapDbxInjectionComponentConfig, DbxInjectionComponentModule, DbxDatePipeModule } from '@dereekb/dbx-core';
16
- import * as i1 from '@dereekb/dbx-web/calendar';
17
- import { prepareAndSortCalendarEvents, DbxCalendarStore, DbxCalendarModule } from '@dereekb/dbx-web/calendar';
18
- import * as i3 from '@angular/forms';
16
+ import * as i2$3 from '@dereekb/dbx-web/calendar';
17
+ import { DbxCalendarStore, prepareAndSortCalendarEvents, DbxCalendarModule } from '@dereekb/dbx-web/calendar';
18
+ import * as i1 from '@angular/forms';
19
19
  import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
20
- import * as i5 from '@angular/material/form-field';
20
+ import * as i3 from '@angular/material/form-field';
21
21
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
22
- import * as i7 from '@angular/material/datepicker';
22
+ import * as i5 from '@angular/material/datepicker';
23
23
  import { MatDatepickerModule } from '@angular/material/datepicker';
24
- import * as i4 from '@angular/common';
24
+ import * as i2 from '@angular/common';
25
25
  import { CommonModule } from '@angular/common';
26
- import * as i1$2 from '@angular/material/dialog';
27
- import * as i6 from 'angular-calendar';
26
+ import { MatDialog } from '@angular/material/dialog';
27
+ import * as i5$1 from 'angular-calendar';
28
28
  import { CalendarModule, CalendarDayModule, CalendarWeekModule } from 'angular-calendar';
29
- import * as i7$1 from '@ngbracket/ngx-layout/extended';
30
- import * as i3$2 from '@angular/material/icon';
29
+ import * as i6 from '@ngbracket/ngx-layout/extended';
30
+ import * as i2$2 from '@angular/material/icon';
31
31
  import { MatIconModule } from '@angular/material/icon';
32
32
  import * as i1$3 from '@ngx-formly/core';
33
33
  import { FormlyModule } from '@ngx-formly/core';
@@ -157,129 +157,129 @@ function calendarScheduleStartBeingUsedFromFilter(x) {
157
157
  class DbxCalendarScheduleSelectionStore extends ComponentStore {
158
158
  constructor() {
159
159
  super(initialCalendarScheduleSelectionState());
160
- // MARK:
161
- this.toggleSelection = this.effect((input) => {
162
- return input.pipe(switchMap(() => this.nextToggleSelection$.pipe(first(), filterMaybe(), tap((x) => {
163
- this.selectAllDates(x);
164
- }))));
165
- });
166
- // MARK: Accessors
167
- this.selectionMode$ = this.state$.pipe(map((x) => x.selectionMode), distinctUntilChanged(), shareReplay(1));
168
- this.filter$ = this.state$.pipe(map((x) => x.filter), distinctUntilChanged(), shareReplay(1));
169
- this.minMaxDateRange$ = this.state$.pipe(map(calendarScheduleMinAndMaxDateRange), distinctUntilChanged(isSameDateRange), shareReplay(1));
170
- this.minDate$ = this.minMaxDateRange$.pipe(map((x) => x?.start), distinctUntilChanged(isSameDateDay), shareReplay(1));
171
- this.maxDate$ = this.minMaxDateRange$.pipe(map((x) => x?.end), distinctUntilChanged(isSameDateDay), shareReplay(1));
172
- this.hasConfiguredMinMaxRange$ = this.minMaxDateRange$.pipe(map((x) => x != null && x.start != null && x.end != null), distinctUntilChanged(), shareReplay(1));
173
- this.inputStart$ = this.state$.pipe(map((x) => x.inputStart), distinctUntilChanged(isSameDate), shareReplay(1));
174
- this.inputEnd$ = this.state$.pipe(map((x) => x.inputEnd), distinctUntilChanged(isSameDate), shareReplay(1));
175
- this.currentInputRange$ = this.state$.pipe(map(({ inputStart, inputEnd }) => ({ start: inputStart, end: inputEnd })), distinctUntilChanged((a, b) => isSameDateRange(a, b)), map((x) => ({ inputStart: x.start, inputEnd: x.end })), map((x) => {
176
- if (x.inputStart && x.inputEnd) {
177
- return x;
178
- }
179
- else {
180
- return undefined;
181
- }
182
- }), shareReplay(1));
183
- this.inputRange$ = this.currentInputRange$.pipe(filterMaybe(), shareReplay(1));
184
- this.isEnabledFilterDayFunction$ = this.state$.pipe(map((x) => x.isEnabledFilterDay), distinctUntilChanged(), shareReplay(1));
185
- this.isEnabledDayFunction$ = this.state$.pipe(map((x) => x.isEnabledDay), distinctUntilChanged(), shareReplay(1));
186
- this.currentDateRange$ = this.state$.pipe(map(computeCalendarScheduleSelectionRange), distinctUntilChanged((a, b) => isSameDateRange(a, b)), shareReplay(1));
187
- this.computeSelectionResultRelativeToFilter$ = this.state$.pipe(map((x) => x.computeSelectionResultRelativeToFilter), shareReplay(1));
188
- this.startBeingUsedFromFilter$ = this.state$.pipe(
189
- //
190
- map(calendarScheduleStartBeingUsedFromFilter), distinctUntilChanged(), shareReplay(1));
191
- this.dateRange$ = this.currentDateRange$.pipe(filterMaybe(), shareReplay(1));
192
- this.allowedDaysOfWeek$ = this.state$.pipe(map((x) => x.allowedDaysOfWeek), distinctUntilHasDifferentValues(), shareReplay(1));
193
- this.isInAllowedDaysOfWeekFunction$ = this.allowedDaysOfWeek$.pipe(map((x) => isInAllowedDaysOfWeekSet(x)), shareReplay(1));
194
- this.scheduleDays$ = this.state$.pipe(map((x) => x.effectiveScheduleDays), distinctUntilHasDifferentValues(), shareReplay(1));
195
- this.outputTimezone$ = this.state$.pipe(map((x) => x.outputTimezone), distinctUntilChanged(), shareReplay(1));
196
- /**
197
- * The timezone of the output values.
198
- *
199
- * If an outputTimezone is not specified, this defaults to the system timezone.
200
- */
201
- this.effectiveOutputTimezone$ = this.state$.pipe(map((x) => x.outputTimezone || x.systemTimezone), distinctUntilChanged(), shareReplay(1));
202
- /**
203
- * An outputTimezoneNormal to use.
204
- *
205
- * If an outputTimezone is not specified, this is undefined.
206
- */
207
- this.effectiveOutputTimezoneNormal$ = this.state$.pipe(map((x) => (x.outputTimezoneNormal ? x.outputTimezoneNormal : undefined)), distinctUntilChanged(), shareReplay(1));
208
- this.currentSelectionValue$ = this.state$.pipe(map((x) => x.currentSelectionValue), distinctUntilChanged(), shareReplay(1));
209
- this.currentSelectionValueStart$ = this.currentSelectionValue$.pipe(map((x) => x?.dateScheduleRange.start), distinctUntilChanged(isSameDate), shareReplay(1));
210
- this.currentSelectionValueDateCellTimingDateFactory$ = this.currentSelectionValue$.pipe(map((x) => (x ? dateCellTimingDateFactory({ startsAt: x.dateScheduleRange.start, timezone: x.dateScheduleRange.timezone }) : undefined)), shareReplay(1));
211
- this.currentSelectionValueDateCellDurationSpanExpansion$ = this.currentSelectionValue$.pipe(map((x) => (x ? expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange }) : [])), shareReplay(1));
212
- this.selectionValueSelectedIndexes$ = this.currentSelectionValueDateCellDurationSpanExpansion$.pipe(map((x) => new Set(x.map((y) => y.i))), distinctUntilHasDifferentValues(), shareReplay(1));
213
- this.selectionValueSelectedDates$ = this.currentSelectionValueDateCellTimingDateFactory$.pipe(switchMap((dateFactory) => {
214
- return dateFactory ? this.selectionValueSelectedIndexes$.pipe(map((x) => mapValuesToSet(x, (y) => formatToISO8601DayStringForSystem(dateFactory(y))))) : of(new Set());
215
- }), shareReplay(1));
216
- this.selectionValue$ = this.currentSelectionValue$.pipe(filterMaybe(), shareReplay(1));
217
- this.currentSelectionValueWithTimezone$ = this.currentSelectionValue$.pipe(combineLatestWith(this.effectiveOutputTimezoneNormal$), map(([x, timezoneNormal]) => {
218
- let currentValueWithTimezone = x;
219
- if (x && timezoneNormal) {
220
- currentValueWithTimezone = {
221
- dateScheduleRange: changeDateCellScheduleDateRangeToTimezone(x.dateScheduleRange, timezoneNormal),
222
- minMaxRange: x.minMaxRange
223
- };
224
- }
225
- return currentValueWithTimezone;
226
- }), distinctUntilChanged(), shareReplay(1));
227
- this.selectionValueWithTimezone$ = this.currentSelectionValueWithTimezone$.pipe(filterMaybe(), shareReplay(1));
228
- this.selectionValueWithTimezoneDateCellDurationSpanExpansion$ = this.selectionValueWithTimezone$.pipe(map((x) => expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange })), shareReplay(1));
229
- this.nextToggleSelection$ = this.hasConfiguredMinMaxRange$.pipe(switchMap((hasConfiguredMinMaxRange) => {
230
- let obs;
231
- if (hasConfiguredMinMaxRange) {
232
- obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : 'all')));
233
- }
234
- else {
235
- obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : undefined)));
236
- }
237
- return obs;
238
- }), shareReplay(1));
239
- this.currentDateCellScheduleRangeValue$ = this.currentSelectionValueWithTimezone$.pipe(map((x) => x?.dateScheduleRange), distinctUntilChanged(isSameDateCellScheduleDateRange), shareReplay(1));
240
- this.dateCellScheduleRangeValue$ = this.currentDateCellScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));
241
- this.cellContentFactory$ = this.state$.pipe(map((x) => x.cellContentFactory), distinctUntilChanged(), shareReplay(1));
242
- this.isCustomized$ = this.state$.pipe(map((x) => x.toggledIndexes.size > 0), distinctUntilChanged(), shareReplay(1));
243
- this.isViewReadonly$ = this.state$.pipe(map((x) => x.isViewReadonly), distinctUntilChanged(), shareReplay(1));
244
- // MARK: State Changes
245
- this.setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);
246
- this.setDefaultWeek = this.updater(updateStateWithMinMaxDateRange);
247
- this.setFilter = this.updater(updateStateWithFilter);
248
- this.setExclusions = this.updater(updateStateWithExclusions);
249
- this.setComputeSelectionResultRelativeToFilter = this.updater(updateStateWithComputeSelectionResultRelativeToFilter);
250
- this.clearFilter = this.updater((state) => updateStateWithFilter(state, undefined));
251
- this.setOutputTimezone = this.updater(updateStateWithTimezoneValue);
252
- /**
253
- * Sets the "input" date range. This is the range that gets displayed on the date range picker.
254
- */
255
- this.setInputRange = this.updater(updateStateWithChangedRange);
256
- // NOTE: Selected dates are NOT selected indexes. They are the internal selected dates that are excluded from the selection.
257
- this.toggleSelectedDates = this.updater((state, toggle) => updateStateWithChangedDates(state, { toggle }));
258
- this.addSelectedDates = this.updater((state, add) => updateStateWithChangedDates(state, { add }));
259
- this.removeSelectedDates = this.updater((state, remove) => updateStateWithChangedDates(state, { remove }));
260
- this.setSelectedDates = this.updater((state, set) => updateStateWithChangedDates(state, { set }));
261
- this.selectAllDates = this.updater((state, selectAll = 'all') => updateStateWithChangedDates(state, { selectAll }));
262
- // NOTE: Selected indexes are the typical/expected indexes that are selected or not.
263
- this.setSelectedIndexes = this.updater((state, set) => updateStateWithChangedDates(state, { set, invertSetBehavior: true }));
264
- this.setInitialSelectionState = this.updater(updateStateWithInitialSelectionState);
265
- this.setDefaultScheduleDays = this.updater(updateStateWithChangedDefaultScheduleDays);
266
- this.setScheduleDays = this.updater(updateStateWithChangedScheduleDays);
267
- this.setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, [DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]));
268
- this.setDateScheduleRangeValue = this.updater((state, value) => updateStateWithDateCellScheduleRangeValue(state, value));
269
- this.setCellContentFactory = this.updater((state, cellContentFactory) => ({ ...state, cellContentFactory }));
270
- /**
271
- * Sets the selection mode.
272
- */
273
- this.setSelectionMode = this.updater(updateStateWithSelectionMode);
274
- /**
275
- * Used by the parent view to propogate a readonly state.
276
- *
277
- * Should typically not be used by the user directly with the intention of the parent synchronizing to this state.
278
- */
279
- this.setViewReadonlyState = this.updater((state, isViewReadonly) => ({ ...state, isViewReadonly }));
280
160
  }
281
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
282
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore }); }
161
+ // MARK:
162
+ toggleSelection = this.effect((input) => {
163
+ return input.pipe(switchMap(() => this.nextToggleSelection$.pipe(first(), filterMaybe(), tap((x) => {
164
+ this.selectAllDates(x);
165
+ }))));
166
+ });
167
+ // MARK: Accessors
168
+ selectionMode$ = this.state$.pipe(map((x) => x.selectionMode), distinctUntilChanged(), shareReplay(1));
169
+ filter$ = this.state$.pipe(map((x) => x.filter), distinctUntilChanged(), shareReplay(1));
170
+ minMaxDateRange$ = this.state$.pipe(map(calendarScheduleMinAndMaxDateRange), distinctUntilChanged(isSameDateRange), shareReplay(1));
171
+ minDate$ = this.minMaxDateRange$.pipe(map((x) => x?.start), distinctUntilChanged(isSameDateDay), shareReplay(1));
172
+ maxDate$ = this.minMaxDateRange$.pipe(map((x) => x?.end), distinctUntilChanged(isSameDateDay), shareReplay(1));
173
+ hasConfiguredMinMaxRange$ = this.minMaxDateRange$.pipe(map((x) => x != null && x.start != null && x.end != null), distinctUntilChanged(), shareReplay(1));
174
+ inputStart$ = this.state$.pipe(map((x) => x.inputStart), distinctUntilChanged(isSameDate), shareReplay(1));
175
+ inputEnd$ = this.state$.pipe(map((x) => x.inputEnd), distinctUntilChanged(isSameDate), shareReplay(1));
176
+ currentInputRange$ = this.state$.pipe(map(({ inputStart, inputEnd }) => ({ start: inputStart, end: inputEnd })), distinctUntilChanged((a, b) => isSameDateRange(a, b)), map((x) => ({ inputStart: x.start, inputEnd: x.end })), map((x) => {
177
+ if (x.inputStart && x.inputEnd) {
178
+ return x;
179
+ }
180
+ else {
181
+ return undefined;
182
+ }
183
+ }), shareReplay(1));
184
+ inputRange$ = this.currentInputRange$.pipe(filterMaybe(), shareReplay(1));
185
+ isEnabledFilterDayFunction$ = this.state$.pipe(map((x) => x.isEnabledFilterDay), distinctUntilChanged(), shareReplay(1));
186
+ isEnabledDayFunction$ = this.state$.pipe(map((x) => x.isEnabledDay), distinctUntilChanged(), shareReplay(1));
187
+ currentDateRange$ = this.state$.pipe(map(computeCalendarScheduleSelectionRange), distinctUntilChanged((a, b) => isSameDateRange(a, b)), shareReplay(1));
188
+ computeSelectionResultRelativeToFilter$ = this.state$.pipe(map((x) => x.computeSelectionResultRelativeToFilter), shareReplay(1));
189
+ startBeingUsedFromFilter$ = this.state$.pipe(
190
+ //
191
+ map(calendarScheduleStartBeingUsedFromFilter), distinctUntilChanged(), shareReplay(1));
192
+ dateRange$ = this.currentDateRange$.pipe(filterMaybe(), shareReplay(1));
193
+ allowedDaysOfWeek$ = this.state$.pipe(map((x) => x.allowedDaysOfWeek), distinctUntilHasDifferentValues(), shareReplay(1));
194
+ isInAllowedDaysOfWeekFunction$ = this.allowedDaysOfWeek$.pipe(map((x) => isInAllowedDaysOfWeekSet(x)), shareReplay(1));
195
+ scheduleDays$ = this.state$.pipe(map((x) => x.effectiveScheduleDays), distinctUntilHasDifferentValues(), shareReplay(1));
196
+ outputTimezone$ = this.state$.pipe(map((x) => x.outputTimezone), distinctUntilChanged(), shareReplay(1));
197
+ /**
198
+ * The timezone of the output values.
199
+ *
200
+ * If an outputTimezone is not specified, this defaults to the system timezone.
201
+ */
202
+ effectiveOutputTimezone$ = this.state$.pipe(map((x) => x.outputTimezone || x.systemTimezone), distinctUntilChanged(), shareReplay(1));
203
+ /**
204
+ * An outputTimezoneNormal to use.
205
+ *
206
+ * If an outputTimezone is not specified, this is undefined.
207
+ */
208
+ effectiveOutputTimezoneNormal$ = this.state$.pipe(map((x) => (x.outputTimezoneNormal ? x.outputTimezoneNormal : undefined)), distinctUntilChanged(), shareReplay(1));
209
+ currentSelectionValue$ = this.state$.pipe(map((x) => x.currentSelectionValue), distinctUntilChanged(), shareReplay(1));
210
+ currentSelectionValueStart$ = this.currentSelectionValue$.pipe(map((x) => x?.dateScheduleRange.start), distinctUntilChanged(isSameDate), shareReplay(1));
211
+ currentSelectionValueDateCellTimingDateFactory$ = this.currentSelectionValue$.pipe(map((x) => (x ? dateCellTimingDateFactory({ startsAt: x.dateScheduleRange.start, timezone: x.dateScheduleRange.timezone }) : undefined)), shareReplay(1));
212
+ currentSelectionValueDateCellDurationSpanExpansion$ = this.currentSelectionValue$.pipe(map((x) => (x ? expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange }) : [])), shareReplay(1));
213
+ selectionValueSelectedIndexes$ = this.currentSelectionValueDateCellDurationSpanExpansion$.pipe(map((x) => new Set(x.map((y) => y.i))), distinctUntilHasDifferentValues(), shareReplay(1));
214
+ selectionValueSelectedDates$ = this.currentSelectionValueDateCellTimingDateFactory$.pipe(switchMap((dateFactory) => {
215
+ return dateFactory ? this.selectionValueSelectedIndexes$.pipe(map((x) => mapValuesToSet(x, (y) => formatToISO8601DayStringForSystem(dateFactory(y))))) : of(new Set());
216
+ }), shareReplay(1));
217
+ selectionValue$ = this.currentSelectionValue$.pipe(filterMaybe(), shareReplay(1));
218
+ currentSelectionValueWithTimezone$ = this.currentSelectionValue$.pipe(combineLatestWith(this.effectiveOutputTimezoneNormal$), map(([x, timezoneNormal]) => {
219
+ let currentValueWithTimezone = x;
220
+ if (x && timezoneNormal) {
221
+ currentValueWithTimezone = {
222
+ dateScheduleRange: changeDateCellScheduleDateRangeToTimezone(x.dateScheduleRange, timezoneNormal),
223
+ minMaxRange: x.minMaxRange
224
+ };
225
+ }
226
+ return currentValueWithTimezone;
227
+ }), distinctUntilChanged(), shareReplay(1));
228
+ selectionValueWithTimezone$ = this.currentSelectionValueWithTimezone$.pipe(filterMaybe(), shareReplay(1));
229
+ selectionValueWithTimezoneDateCellDurationSpanExpansion$ = this.selectionValueWithTimezone$.pipe(map((x) => expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange })), shareReplay(1));
230
+ nextToggleSelection$ = this.hasConfiguredMinMaxRange$.pipe(switchMap((hasConfiguredMinMaxRange) => {
231
+ let obs;
232
+ if (hasConfiguredMinMaxRange) {
233
+ obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : 'all')));
234
+ }
235
+ else {
236
+ obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : undefined)));
237
+ }
238
+ return obs;
239
+ }), shareReplay(1));
240
+ currentDateCellScheduleRangeValue$ = this.currentSelectionValueWithTimezone$.pipe(map((x) => x?.dateScheduleRange), distinctUntilChanged(isSameDateCellScheduleDateRange), shareReplay(1));
241
+ dateCellScheduleRangeValue$ = this.currentDateCellScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));
242
+ cellContentFactory$ = this.state$.pipe(map((x) => x.cellContentFactory), distinctUntilChanged(), shareReplay(1));
243
+ isCustomized$ = this.state$.pipe(map((x) => x.toggledIndexes.size > 0), distinctUntilChanged(), shareReplay(1));
244
+ isViewReadonly$ = this.state$.pipe(map((x) => x.isViewReadonly), distinctUntilChanged(), shareReplay(1));
245
+ // MARK: State Changes
246
+ setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);
247
+ setDefaultWeek = this.updater(updateStateWithMinMaxDateRange);
248
+ setFilter = this.updater(updateStateWithFilter);
249
+ setExclusions = this.updater(updateStateWithExclusions);
250
+ setComputeSelectionResultRelativeToFilter = this.updater(updateStateWithComputeSelectionResultRelativeToFilter);
251
+ clearFilter = this.updater((state) => updateStateWithFilter(state, undefined));
252
+ setOutputTimezone = this.updater(updateStateWithTimezoneValue);
253
+ /**
254
+ * Sets the "input" date range. This is the range that gets displayed on the date range picker.
255
+ */
256
+ setInputRange = this.updater(updateStateWithChangedRange);
257
+ // NOTE: Selected dates are NOT selected indexes. They are the internal selected dates that are excluded from the selection.
258
+ toggleSelectedDates = this.updater((state, toggle) => updateStateWithChangedDates(state, { toggle }));
259
+ addSelectedDates = this.updater((state, add) => updateStateWithChangedDates(state, { add }));
260
+ removeSelectedDates = this.updater((state, remove) => updateStateWithChangedDates(state, { remove }));
261
+ setSelectedDates = this.updater((state, set) => updateStateWithChangedDates(state, { set }));
262
+ selectAllDates = this.updater((state, selectAll = 'all') => updateStateWithChangedDates(state, { selectAll }));
263
+ // NOTE: Selected indexes are the typical/expected indexes that are selected or not.
264
+ setSelectedIndexes = this.updater((state, set) => updateStateWithChangedDates(state, { set, invertSetBehavior: true }));
265
+ setInitialSelectionState = this.updater(updateStateWithInitialSelectionState);
266
+ setDefaultScheduleDays = this.updater(updateStateWithChangedDefaultScheduleDays);
267
+ setScheduleDays = this.updater(updateStateWithChangedScheduleDays);
268
+ setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, [DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]));
269
+ setDateScheduleRangeValue = this.updater((state, value) => updateStateWithDateCellScheduleRangeValue(state, value));
270
+ setCellContentFactory = this.updater((state, cellContentFactory) => ({ ...state, cellContentFactory }));
271
+ /**
272
+ * Sets the selection mode.
273
+ */
274
+ setSelectionMode = this.updater(updateStateWithSelectionMode);
275
+ /**
276
+ * Used by the parent view to propogate a readonly state.
277
+ *
278
+ * Should typically not be used by the user directly with the intention of the parent synchronizing to this state.
279
+ */
280
+ setViewReadonlyState = this.updater((state, isViewReadonly) => ({ ...state, isViewReadonly }));
281
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
282
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore });
283
283
  }
284
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStore, decorators: [{
285
285
  type: Injectable
@@ -873,20 +873,16 @@ function computeCalendarScheduleSelectionDateCellRange(state) {
873
873
  * Token used by provideCalendarScheduleSelectionStoreIfDoesNotExist() to prevent injecting a parent DbxCalendarScheduleSelectionStore into the child view.
874
874
  */
875
875
  class DbxCalendarScheduleSelectionStoreProviderBlock {
876
- constructor(dbxCalendarScheduleSelectionStore) {
877
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
878
- }
879
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreProviderBlock, deps: [{ token: DbxCalendarScheduleSelectionStore, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
880
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreProviderBlock }); }
876
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore, { skipSelf: true });
877
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreProviderBlock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
878
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreProviderBlock });
881
879
  }
882
880
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreProviderBlock, decorators: [{
883
881
  type: Injectable
884
- }], ctorParameters: function () { return [{ type: DbxCalendarScheduleSelectionStore, decorators: [{
885
- type: SkipSelf
886
- }] }]; } });
882
+ }] });
887
883
  class DbxCalendarScheduleSelectionStoreInjectionBlockDirective {
888
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
889
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxCalendarScheduleSelectionStoreInjectionBlockDirective, selector: "[dbxCalendarScheduleSelectionStoreParentBlocker]", providers: [DbxCalendarScheduleSelectionStoreProviderBlock], ngImport: i0 }); }
884
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
885
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxCalendarScheduleSelectionStoreInjectionBlockDirective, selector: "[dbxCalendarScheduleSelectionStoreParentBlocker]", providers: [DbxCalendarScheduleSelectionStoreProviderBlock], ngImport: i0 });
890
886
  }
891
887
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxCalendarScheduleSelectionStoreInjectionBlockDirective, decorators: [{
892
888
  type: Directive,
@@ -918,6 +914,16 @@ function provideCalendarScheduleSelectionStoreIfParentIsUnavailable() {
918
914
  }
919
915
 
920
916
  class DbxScheduleSelectionCalendarDateRangeComponent {
917
+ dbxCalendarStore = inject(DbxCalendarStore);
918
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
919
+ matFormFieldDefaultOptions = inject(MAT_FORM_FIELD_DEFAULT_OPTIONS, { optional: true });
920
+ _required = new BehaviorSubject(false);
921
+ required$ = this._required.asObservable();
922
+ timezone$ = this.dbxCalendarScheduleSelectionStore.effectiveOutputTimezone$;
923
+ openPickerOnTextClick = true;
924
+ picker;
925
+ label = 'Enter a date range';
926
+ hint;
921
927
  set disabled(disabled) {
922
928
  if (disabled) {
923
929
  this.range.disable();
@@ -926,78 +932,68 @@ class DbxScheduleSelectionCalendarDateRangeComponent {
926
932
  this.range.enable();
927
933
  }
928
934
  }
929
- constructor(dbxCalendarStore, dbxCalendarScheduleSelectionStore, matFormFieldDefaultOptions) {
930
- this.dbxCalendarStore = dbxCalendarStore;
931
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
932
- this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
933
- this._required = new BehaviorSubject(false);
934
- this.required$ = this._required.asObservable();
935
- this.timezone$ = this.dbxCalendarScheduleSelectionStore.effectiveOutputTimezone$;
936
- this.openPickerOnTextClick = true;
937
- this.label = 'Enter a date range';
938
- this.showCustomize = false;
939
- this._pickerOpened = new BehaviorSubject(false);
940
- this._requiredSub = new SubscriptionObject();
941
- this._syncSub = new SubscriptionObject();
942
- this._valueSub = new SubscriptionObject();
943
- this.range = new FormGroup({
944
- start: new FormControl(null),
945
- end: new FormControl(null)
946
- });
947
- this.errorStateMatcher = {
948
- isErrorState: (control, form) => {
949
- if (control) {
950
- return (control.invalid && (control.dirty || control.touched)) || (control.touched && this.range.invalid);
951
- }
952
- else {
953
- return false;
954
- }
935
+ showCustomize = false;
936
+ _pickerOpened = new BehaviorSubject(false);
937
+ _requiredSub = new SubscriptionObject();
938
+ _syncSub = new SubscriptionObject();
939
+ _valueSub = new SubscriptionObject();
940
+ range = new FormGroup({
941
+ start: new FormControl(null),
942
+ end: new FormControl(null)
943
+ });
944
+ errorStateMatcher = {
945
+ isErrorState: (control, form) => {
946
+ if (control) {
947
+ return (control.invalid && (control.dirty || control.touched)) || (control.touched && this.range.invalid);
955
948
  }
956
- };
957
- this.minDate$ = this.dbxCalendarScheduleSelectionStore.minDate$;
958
- this.maxDate$ = this.dbxCalendarScheduleSelectionStore.maxDate$;
959
- this.timezoneReleventDate$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((currentDateRange) => {
960
- return currentDateRange ? currentDateRange.start ?? currentDateRange.end : undefined ?? new Date();
961
- }), shareReplay(1));
962
- this.isCustomized$ = this.dbxCalendarScheduleSelectionStore.isCustomized$;
963
- this.currentErrorMessage$ = this.range.statusChanges.pipe(filter((x) => x === 'INVALID' || x === 'VALID'), map((x) => {
964
- let currentErrorMessage;
965
- if (x === 'INVALID') {
966
- const { start, end } = this.range.controls;
967
- if (this.range.hasError('required')) {
968
- currentErrorMessage = 'Date range is required';
969
- }
970
- else if (start.hasError('matStartDateInvalid')) {
971
- currentErrorMessage = 'Invalid start date';
972
- }
973
- else if (start.hasError('matDatepickerMin')) {
974
- currentErrorMessage = 'Start date is too early';
975
- }
976
- else if (start.hasError('matDatepickerMax')) {
977
- currentErrorMessage = 'Start date is too late';
978
- }
979
- else if (end.hasError('matStartDateInvalid')) {
980
- currentErrorMessage = 'Invalid end date';
981
- }
982
- else if (end.hasError('matDatepickerMin')) {
983
- currentErrorMessage = 'End date is too early';
984
- }
985
- else if (end.hasError('matDatepickerMax')) {
986
- currentErrorMessage = 'End date is too late';
987
- }
949
+ else {
950
+ return false;
988
951
  }
989
- return currentErrorMessage;
990
- }), shareReplay(1));
991
- this.pickerOpened$ = this._pickerOpened.asObservable();
992
- this.defaultDatePickerFilter = () => true;
993
- this.datePickerFilter$ = combineLatest([this.dbxCalendarScheduleSelectionStore.isEnabledFilterDayFunction$, this.dbxCalendarScheduleSelectionStore.isInAllowedDaysOfWeekFunction$]).pipe(map(([isEnabled, isAllowedDayOfWeek]) => {
994
- const fn = (date) => {
995
- const result = date ? isAllowedDayOfWeek(date) && isEnabled(date) : true;
996
- return result;
997
- };
998
- return fn;
999
- }), shareReplay(1));
1000
- }
952
+ }
953
+ };
954
+ minDate$ = this.dbxCalendarScheduleSelectionStore.minDate$;
955
+ maxDate$ = this.dbxCalendarScheduleSelectionStore.maxDate$;
956
+ timezoneReleventDate$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((currentDateRange) => {
957
+ return currentDateRange ? currentDateRange.start ?? currentDateRange.end : undefined ?? new Date();
958
+ }), shareReplay(1));
959
+ isCustomized$ = this.dbxCalendarScheduleSelectionStore.isCustomized$;
960
+ currentErrorMessage$ = this.range.statusChanges.pipe(filter((x) => x === 'INVALID' || x === 'VALID'), map((x) => {
961
+ let currentErrorMessage;
962
+ if (x === 'INVALID') {
963
+ const { start, end } = this.range.controls;
964
+ if (this.range.hasError('required')) {
965
+ currentErrorMessage = 'Date range is required';
966
+ }
967
+ else if (start.hasError('matStartDateInvalid')) {
968
+ currentErrorMessage = 'Invalid start date';
969
+ }
970
+ else if (start.hasError('matDatepickerMin')) {
971
+ currentErrorMessage = 'Start date is too early';
972
+ }
973
+ else if (start.hasError('matDatepickerMax')) {
974
+ currentErrorMessage = 'Start date is too late';
975
+ }
976
+ else if (end.hasError('matStartDateInvalid')) {
977
+ currentErrorMessage = 'Invalid end date';
978
+ }
979
+ else if (end.hasError('matDatepickerMin')) {
980
+ currentErrorMessage = 'End date is too early';
981
+ }
982
+ else if (end.hasError('matDatepickerMax')) {
983
+ currentErrorMessage = 'End date is too late';
984
+ }
985
+ }
986
+ return currentErrorMessage;
987
+ }), shareReplay(1));
988
+ pickerOpened$ = this._pickerOpened.asObservable();
989
+ defaultDatePickerFilter = () => true;
990
+ datePickerFilter$ = combineLatest([this.dbxCalendarScheduleSelectionStore.isEnabledFilterDayFunction$, this.dbxCalendarScheduleSelectionStore.isInAllowedDaysOfWeekFunction$]).pipe(map(([isEnabled, isAllowedDayOfWeek]) => {
991
+ const fn = (date) => {
992
+ const result = date ? isAllowedDayOfWeek(date) && isEnabled(date) : true;
993
+ return result;
994
+ };
995
+ return fn;
996
+ }), shareReplay(1));
1001
997
  ngOnInit() {
1002
998
  this._syncSub.subscription = this.dbxCalendarScheduleSelectionStore.currentInputRange$.subscribe((x) => {
1003
999
  this.range.setValue({
@@ -1061,16 +1057,13 @@ class DbxScheduleSelectionCalendarDateRangeComponent {
1061
1057
  pickerClosed() {
1062
1058
  this._pickerOpened.next(false);
1063
1059
  }
1064
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateRangeComponent, deps: [{ token: i1.DbxCalendarStore }, { token: DbxCalendarScheduleSelectionStore }, { token: MAT_FORM_FIELD_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
1065
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: { openPickerOnTextClick: "openPickerOnTextClick", label: "label", hint: "hint", disabled: "disabled", showCustomize: "showCustomize", required: "required" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }], ngImport: i0, template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div class=\"dbx-schedule-selection-calendar-date-range-field-content\">\n <!-- Primary Content -->\n <div class=\"dbx-flex-bar\">\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle class=\"mat-datepicker-button-highlight\" matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input (click)=\"clickedDateRangeInput()\" [required]=\"required$ | async\" [dateFilter]=\"(datePickerFilter$ | async) ?? defaultDatePickerFilter\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-schedule-selection-timezone dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n </div>\n <!-- Custom Content -->\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i7.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i7.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TimezoneAbbreviationPipe, name: "timezoneAbbreviation" }] }); }
1060
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1061
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: { openPickerOnTextClick: "openPickerOnTextClick", label: "label", hint: "hint", disabled: "disabled", showCustomize: "showCustomize", required: "required" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }], ngImport: i0, template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div class=\"dbx-schedule-selection-calendar-date-range-field-content\">\n <!-- Primary Content -->\n <div class=\"dbx-flex-bar\">\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle class=\"mat-datepicker-button-highlight\" matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input (click)=\"clickedDateRangeInput()\" [required]=\"required$ | async\" [dateFilter]=\"(datePickerFilter$ | async) ?? defaultDatePickerFilter\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-schedule-selection-timezone dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n </div>\n <!-- Custom Content -->\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i5.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i5.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i5.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i5.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i5.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TimezoneAbbreviationPipe, name: "timezoneAbbreviation" }] });
1066
1062
  }
1067
1063
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateRangeComponent, decorators: [{
1068
1064
  type: Component,
1069
1065
  args: [{ selector: 'dbx-schedule-selection-calendar-date-range', template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div class=\"dbx-schedule-selection-calendar-date-range-field-content\">\n <!-- Primary Content -->\n <div class=\"dbx-flex-bar\">\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle class=\"mat-datepicker-button-highlight\" matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input (click)=\"clickedDateRangeInput()\" [required]=\"required$ | async\" [dateFilter]=\"(datePickerFilter$ | async) ?? defaultDatePickerFilter\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-schedule-selection-timezone dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n </div>\n <!-- Custom Content -->\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n" }]
1070
- }], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }, { type: undefined, decorators: [{
1071
- type: Inject,
1072
- args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
1073
- }] }]; }, propDecorators: { openPickerOnTextClick: [{
1066
+ }], propDecorators: { openPickerOnTextClick: [{
1074
1067
  type: Input
1075
1068
  }], picker: [{
1076
1069
  type: ViewChild,
@@ -1101,14 +1094,11 @@ function dbxScheduleSelectionCalendarDateDaysFormDayFields() {
1101
1094
  }
1102
1095
 
1103
1096
  class DbxScheduleSelectionCalendarDateDaysFormComponent extends AbstractSyncFormlyFormDirective {
1104
- constructor() {
1105
- super(...arguments);
1106
- this.fields = dbxScheduleSelectionCalendarDateDaysFormFields();
1107
- }
1108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1109
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDaysFormComponent, selector: "dbx-schedule-selection-calendar-date-days-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
1097
+ fields = dbxScheduleSelectionCalendarDateDaysFormFields();
1098
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1099
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDaysFormComponent, selector: "dbx-schedule-selection-calendar-date-days-form", providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
1110
1100
  <dbx-formly></dbx-formly>
1111
- `, isInline: true, dependencies: [{ kind: "component", type: i4$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] }); }
1101
+ `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
1112
1102
  }
1113
1103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysFormComponent, decorators: [{
1114
1104
  type: Component,
@@ -1122,28 +1112,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1122
1112
  }] });
1123
1113
 
1124
1114
  class DbxScheduleSelectionCalendarDateDaysComponent {
1125
- constructor(dbxCalendarStore, dbxCalendarScheduleSelectionStore) {
1126
- this.dbxCalendarStore = dbxCalendarStore;
1127
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1128
- this.template$ = this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map(enabledDaysFromDateCellScheduleDayCodes), shareReplay(1));
1129
- this.isFormModified = (value) => {
1130
- const newSetValue = new Set(dateCellScheduleDayCodesFromEnabledDays(value));
1131
- return this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map((currentSet) => {
1132
- const result = !dateCellScheduleDayCodesAreSetsEquivalent(newSetValue, currentSet);
1133
- return result;
1134
- }));
1135
- };
1136
- this.updateScheduleDays = (value) => {
1137
- this.dbxCalendarScheduleSelectionStore.setScheduleDays(new Set(dateCellScheduleDayCodesFromEnabledDays(value)));
1138
- return of(true);
1139
- };
1140
- }
1141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysComponent, deps: [{ token: i1.DbxCalendarStore }, { token: DbxCalendarScheduleSelectionStore }], target: i0.ɵɵFactoryTarget.Component }); }
1142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDaysComponent, selector: "dbx-schedule-selection-calendar-date-days", ngImport: i0, template: `
1115
+ dbxCalendarStore = inject(DbxCalendarStore);
1116
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1117
+ template$ = this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map(enabledDaysFromDateCellScheduleDayCodes), shareReplay(1));
1118
+ isFormModified = (value) => {
1119
+ const newSetValue = new Set(dateCellScheduleDayCodesFromEnabledDays(value));
1120
+ return this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map((currentSet) => {
1121
+ const result = !dateCellScheduleDayCodesAreSetsEquivalent(newSetValue, currentSet);
1122
+ return result;
1123
+ }));
1124
+ };
1125
+ updateScheduleDays = (value) => {
1126
+ this.dbxCalendarScheduleSelectionStore.setScheduleDays(new Set(dateCellScheduleDayCodesFromEnabledDays(value)));
1127
+ return of(true);
1128
+ };
1129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDaysComponent, selector: "dbx-schedule-selection-calendar-date-days", ngImport: i0, template: `
1143
1131
  <div class="dbx-schedule-selection-calendar-date-days" dbxAction dbxActionAutoTrigger dbxActionEnforceModified [instantTrigger]="true" [dbxActionHandler]="updateScheduleDays">
1144
1132
  <dbx-schedule-selection-calendar-date-days-form dbxActionForm [dbxFormSource]="template$" [dbxActionFormModified]="isFormModified"></dbx-schedule-selection-calendar-date-days-form>
1145
1133
  </div>
1146
- `, isInline: true, dependencies: [{ kind: "directive", type: i3$1.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i3$1.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i3$1.DbxActionEnforceModifiedDirective, selector: "[dbxActionEnforceModified]", inputs: ["dbxActionEnforceModified"] }, { kind: "directive", type: i3$1.DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger, [dbxActionAutoTrigger]", inputs: ["dbxActionAutoTrigger", "triggerDebounce", "triggerThrottle", "triggerErrorThrottle", "fastTrigger", "instantTrigger", "triggerLimit"] }, { kind: "directive", type: i4$1.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "directive", type: i4$1.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDaysFormComponent, selector: "dbx-schedule-selection-calendar-date-days-form" }] }); }
1134
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i1$2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i1$2.DbxActionEnforceModifiedDirective, selector: "[dbxActionEnforceModified]", inputs: ["dbxActionEnforceModified"] }, { kind: "directive", type: i1$2.DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger, [dbxActionAutoTrigger]", inputs: ["dbxActionAutoTrigger", "triggerDebounce", "triggerThrottle", "triggerErrorThrottle", "fastTrigger", "instantTrigger", "triggerLimit"] }, { kind: "directive", type: i2$1.DbxActionFormDirective, selector: "[dbxActionForm]", inputs: ["dbxActionFormValidator", "dbxActionFormModified", "dbxActionFormMapValue", "formDisabledOnWorking"] }, { kind: "directive", type: i2$1.DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: ["dbxFormSourceMode", "dbxFormSource"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDaysFormComponent, selector: "dbx-schedule-selection-calendar-date-days-form" }] });
1147
1135
  }
1148
1136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDaysComponent, decorators: [{
1149
1137
  type: Component,
@@ -1155,18 +1143,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1155
1143
  </div>
1156
1144
  `
1157
1145
  }]
1158
- }], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }]; } });
1146
+ }] });
1159
1147
 
1160
1148
  class DbxScheduleSelectionCalendarDatePopoverContentComponent {
1161
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1162
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDatePopoverContentComponent, selector: "dbx-schedule-selection-calendar-date-popover-content", ngImport: i0, template: `
1149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1150
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDatePopoverContentComponent, selector: "dbx-schedule-selection-calendar-date-popover-content", ngImport: i0, template: `
1163
1151
  <dbx-content-container padding="min" topPadding="normal">
1164
1152
  <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]="false"></dbx-schedule-selection-calendar-date-range>
1165
1153
  <dbx-label-block header="Allowed Days Of Week">
1166
1154
  <dbx-schedule-selection-calendar-date-days></dbx-schedule-selection-calendar-date-days>
1167
1155
  </dbx-label-block>
1168
1156
  </dbx-content-container>
1169
- `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.DbxContentContainerDirective, selector: "dbx-content-container,[dbxContentContainer],.dbx-content-container", inputs: ["grow", "padding", "topPadding"] }, { kind: "component", type: i1$1.DbxLabelBlockComponent, selector: "dbx-label-block", inputs: ["header"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDaysComponent, selector: "dbx-schedule-selection-calendar-date-days" }, { kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["openPickerOnTextClick", "label", "hint", "disabled", "showCustomize", "required"] }] }); }
1157
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.DbxContentContainerDirective, selector: "dbx-content-container,[dbxContentContainer],.dbx-content-container", inputs: ["grow", "padding", "topPadding"] }, { kind: "component", type: i1$1.DbxLabelBlockComponent, selector: "dbx-label-block", inputs: ["header"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDaysComponent, selector: "dbx-schedule-selection-calendar-date-days" }, { kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["openPickerOnTextClick", "label", "hint", "disabled", "showCustomize", "required"] }] });
1170
1158
  }
1171
1159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverContentComponent, decorators: [{
1172
1160
  type: Component,
@@ -1193,14 +1181,14 @@ class DbxScheduleSelectionCalendarDatePopoverComponent extends AbstractPopoverDi
1193
1181
  injector
1194
1182
  });
1195
1183
  }
1196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1197
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDatePopoverComponent, selector: "dbx-schedule-selection-calendar-date-popover", usesInheritance: true, ngImport: i0, template: `
1184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1185
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDatePopoverComponent, selector: "dbx-schedule-selection-calendar-date-popover", usesInheritance: true, ngImport: i0, template: `
1198
1186
  <dbx-popover-content>
1199
1187
  <dbx-popover-scroll-content>
1200
1188
  <dbx-schedule-selection-calendar-date-popover-content></dbx-schedule-selection-calendar-date-popover-content>
1201
1189
  </dbx-popover-scroll-content>
1202
1190
  </dbx-popover-content>
1203
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: i1$1.DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "component", type: DbxScheduleSelectionCalendarDatePopoverContentComponent, selector: "dbx-schedule-selection-calendar-date-popover-content" }] }); }
1191
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: i1$1.DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "component", type: DbxScheduleSelectionCalendarDatePopoverContentComponent, selector: "dbx-schedule-selection-calendar-date-popover-content" }] });
1204
1192
  }
1205
1193
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverComponent, decorators: [{
1206
1194
  type: Component,
@@ -1217,29 +1205,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1217
1205
  }] });
1218
1206
 
1219
1207
  class DbxScheduleSelectionCalendarDatePopoverButtonComponent {
1220
- constructor(popoverService, dbxCalendarScheduleSelectionStore, injector) {
1221
- this.popoverService = popoverService;
1222
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1223
- this.injector = injector;
1224
- this.disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;
1225
- this.buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((x) => {
1226
- if (x?.start && x.end) {
1227
- const startString = formatToMonthDayString(x.start);
1228
- const endString = formatToMonthDayString(x.end);
1229
- return startString === endString ? startString : `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;
1230
- }
1231
- else {
1232
- return 'Pick a Date Range';
1233
- }
1234
- }), shareReplay(1));
1235
- }
1208
+ injector = inject(Injector);
1209
+ popoverService = inject(DbxPopoverService);
1210
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1211
+ buttonPopoverOrigin;
1212
+ disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;
1213
+ buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(map((x) => {
1214
+ if (x?.start && x.end) {
1215
+ const startString = formatToMonthDayString(x.start);
1216
+ const endString = formatToMonthDayString(x.end);
1217
+ return startString === endString ? startString : `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;
1218
+ }
1219
+ else {
1220
+ return 'Pick a Date Range';
1221
+ }
1222
+ }), shareReplay(1));
1236
1223
  openPopover() {
1237
1224
  DbxScheduleSelectionCalendarDatePopoverComponent.openPopover(this.popoverService, { origin: this.buttonPopoverOrigin, injector: this.injector });
1238
1225
  }
1239
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, deps: [{ token: i1$1.DbxPopoverService }, { token: DbxCalendarScheduleSelectionStore }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1240
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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: `
1226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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: `
1241
1228
  <dbx-button #buttonPopoverOrigin icon="date_range" [disabled]="disabled$ | async" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
1242
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
1229
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
1243
1230
  }
1244
1231
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDatePopoverButtonComponent, decorators: [{
1245
1232
  type: Component,
@@ -1249,32 +1236,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1249
1236
  <dbx-button #buttonPopoverOrigin icon="date_range" [disabled]="disabled$ | async" [raised]="true" color="accent" [text]="buttonText$ | async" (buttonClick)="openPopover()"></dbx-button>
1250
1237
  `
1251
1238
  }]
1252
- }], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { buttonPopoverOrigin: [{
1239
+ }], propDecorators: { buttonPopoverOrigin: [{
1253
1240
  type: ViewChild,
1254
1241
  args: ['buttonPopoverOrigin', { read: ElementRef }]
1255
1242
  }] } });
1256
1243
 
1257
1244
  class DbxScheduleSelectionCalendarCellComponent {
1245
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1246
+ content = {};
1258
1247
  get icon() {
1259
1248
  return this.content.icon;
1260
1249
  }
1261
1250
  get text() {
1262
1251
  return this.content.text;
1263
1252
  }
1264
- constructor(dbxCalendarScheduleSelectionStore) {
1265
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1266
- this.content = {};
1267
- }
1268
1253
  set day(day) {
1269
1254
  this.dbxCalendarScheduleSelectionStore.cellContentFactory$.pipe(first()).subscribe((fn) => {
1270
1255
  this.content = fn(day);
1271
1256
  });
1272
1257
  }
1273
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarCellComponent, deps: [{ token: DbxCalendarScheduleSelectionStore }], target: i0.ɵɵFactoryTarget.Component }); }
1274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarCellComponent, selector: "dbx-schedule-selection-calendar-cell", inputs: { day: "day" }, host: { classAttribute: "dbx-schedule-selection-calendar-cell" }, ngImport: i0, template: `
1258
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1259
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarCellComponent, selector: "dbx-schedule-selection-calendar-cell", inputs: { day: "day" }, host: { classAttribute: "dbx-schedule-selection-calendar-cell" }, ngImport: i0, template: `
1275
1260
  <mat-icon *ngIf="icon">{{ icon }}</mat-icon>
1276
1261
  <span>{{ text }}</span>
1277
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1262
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1278
1263
  }
1279
1264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarCellComponent, decorators: [{
1280
1265
  type: Component,
@@ -1289,7 +1274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1289
1274
  },
1290
1275
  changeDetection: ChangeDetectionStrategy.OnPush
1291
1276
  }]
1292
- }], ctorParameters: function () { return [{ type: DbxCalendarScheduleSelectionStore }]; }, propDecorators: { day: [{
1277
+ }], propDecorators: { day: [{
1293
1278
  type: Input
1294
1279
  }] } });
1295
1280
 
@@ -1297,41 +1282,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1297
1282
  * Toggle button for selecting and clearing the current selection.
1298
1283
  */
1299
1284
  class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
1300
- constructor(popoverService, dbxCalendarScheduleSelectionStore, injector) {
1301
- this.popoverService = popoverService;
1302
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1303
- this.injector = injector;
1304
- this._disabled = new BehaviorSubject(false);
1305
- this.disableButton$ = this._disabled.pipe(switchMap((disabled) => {
1306
- if (disabled) {
1307
- return of(true);
1308
- }
1309
- else {
1310
- return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => !x));
1285
+ popoverService = inject(DbxPopoverService);
1286
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1287
+ injector = inject(Injector);
1288
+ _disabled = new BehaviorSubject(false);
1289
+ disableButton$ = this._disabled.pipe(switchMap((disabled) => {
1290
+ if (disabled) {
1291
+ return of(true);
1292
+ }
1293
+ else {
1294
+ return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => !x));
1295
+ }
1296
+ }), distinctUntilChanged(), shareReplay(1));
1297
+ buttonDisplay$ = this.dbxCalendarScheduleSelectionStore.selectionMode$.pipe(switchMap((selectionMode) => {
1298
+ return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => {
1299
+ let buttonDisplay;
1300
+ switch (x) {
1301
+ case 'all':
1302
+ buttonDisplay = {
1303
+ icon: 'select_all',
1304
+ text: 'Select All'
1305
+ };
1306
+ break;
1307
+ default:
1308
+ case 'none':
1309
+ buttonDisplay = {
1310
+ icon: 'clear',
1311
+ text: selectionMode === 'multiple' ? 'Clear All' : 'Clear'
1312
+ };
1313
+ break;
1311
1314
  }
1312
- }), distinctUntilChanged(), shareReplay(1));
1313
- this.buttonDisplay$ = this.dbxCalendarScheduleSelectionStore.selectionMode$.pipe(switchMap((selectionMode) => {
1314
- return this.dbxCalendarScheduleSelectionStore.nextToggleSelection$.pipe(map((x) => {
1315
- let buttonDisplay;
1316
- switch (x) {
1317
- case 'all':
1318
- buttonDisplay = {
1319
- icon: 'select_all',
1320
- text: 'Select All'
1321
- };
1322
- break;
1323
- default:
1324
- case 'none':
1325
- buttonDisplay = {
1326
- icon: 'clear',
1327
- text: selectionMode === 'multiple' ? 'Clear All' : 'Clear'
1328
- };
1329
- break;
1330
- }
1331
- return buttonDisplay;
1332
- }));
1333
- }), shareReplay(1));
1334
- }
1315
+ return buttonDisplay;
1316
+ }));
1317
+ }), shareReplay(1));
1335
1318
  ngOnDestroy() {
1336
1319
  this._disabled.complete();
1337
1320
  }
@@ -1341,10 +1324,10 @@ class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {
1341
1324
  set disabled(disabled) {
1342
1325
  this._disabled.next(disabled);
1343
1326
  }
1344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, deps: [{ token: i1$1.DbxPopoverService }, { token: DbxCalendarScheduleSelectionStore }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1345
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button", inputs: { disabled: "disabled" }, ngImport: i0, template: `
1327
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1328
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, selector: "dbx-schedule-selection-calendar-selection-toggle-button", inputs: { disabled: "disabled" }, ngImport: i0, template: `
1346
1329
  <dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
1347
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
1330
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
1348
1331
  }
1349
1332
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarSelectionToggleButtonComponent, decorators: [{
1350
1333
  type: Component,
@@ -1354,7 +1337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1354
1337
  <dbx-button [disabled]="disableButton$ | async" [buttonDisplay]="buttonDisplay$ | async" [raised]="true" (buttonClick)="toggleSelection()"></dbx-button>
1355
1338
  `
1356
1339
  }]
1357
- }], ctorParameters: function () { return [{ type: i1$1.DbxPopoverService }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.Injector }]; }, propDecorators: { disabled: [{
1340
+ }], propDecorators: { disabled: [{
1358
1341
  type: Input
1359
1342
  }] } });
1360
1343
 
@@ -1399,44 +1382,42 @@ function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn)
1399
1382
  };
1400
1383
  }
1401
1384
  class DbxScheduleSelectionCalendarComponent {
1402
- constructor(calendarStore, dbxCalendarScheduleSelectionStore) {
1403
- this.calendarStore = calendarStore;
1404
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1405
- this._inputReadonly = new BehaviorSubject(undefined);
1406
- this._config = new BehaviorSubject({});
1407
- this._centerRangeSub = new SubscriptionObject();
1408
- this.config$ = this._config.pipe(distinctUntilChanged(), shareReplay(1));
1409
- this.readonly$ = this.config$.pipe(switchMap((x) => (x.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))), combineLatestWith(this._inputReadonly), map(([configReadonly, inputReadonly]) => {
1410
- return (configReadonly ?? false) || (inputReadonly ?? false);
1411
- }), shareReplay(1));
1412
- this.showButtonsOnReadonly$ = this.config$.pipe(map((x) => x.showButtonsOnReadonly ?? false), distinctUntilChanged(), shareReplay(1));
1413
- this.showButtons$ = this.showButtonsOnReadonly$.pipe(switchMap((x) => {
1414
- if (x) {
1415
- return of(true);
1416
- }
1417
- else {
1418
- return this.readonly$.pipe(map((x) => !x));
1419
- }
1420
- }), distinctUntilChanged(), shareReplay(1));
1421
- this.showClearSelectionButton$ = this.config$.pipe(map((config) => config.showClearSelectionButton ?? true), combineLatestWith(this.showButtons$), map((x) => reduceBooleansWithAnd(x)), distinctUntilChanged(), shareReplay(1));
1422
- this.datePopoverButtonInjectionConfig$ = this.config$.pipe(map((x) => x.buttonInjectionConfig), switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent), combineLatestWith(this.showButtons$), map(([config, showButton]) => (showButton ? config : undefined)), shareReplay(1));
1423
- this.clickEvent = new EventEmitter();
1424
- // refresh any time the selected day function updates
1425
- this.state$ = this.dbxCalendarScheduleSelectionStore.state$;
1426
- this.beforeMonthViewRender$ = this.config$.pipe(switchMap((x) => {
1427
- let factory;
1428
- if (x.beforeMonthViewRenderFunctionFactory) {
1429
- factory = asObservable(x.beforeMonthViewRenderFunctionFactory);
1430
- }
1431
- else {
1432
- factory = asObservable(x.customizeDay).pipe(map((x) => dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(x)));
1433
- }
1434
- return factory.pipe(map((x) => x(this.state$)));
1435
- }), shareReplay(1));
1436
- this.refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(20, undefined, { leading: true, trailing: true }), map(() => undefined));
1437
- this.events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
1438
- this.viewDate$ = this.calendarStore.date$;
1439
- }
1385
+ calendarStore = inject((DbxCalendarStore));
1386
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1387
+ _inputReadonly = new BehaviorSubject(undefined);
1388
+ _config = new BehaviorSubject({});
1389
+ _centerRangeSub = new SubscriptionObject();
1390
+ config$ = this._config.pipe(distinctUntilChanged(), shareReplay(1));
1391
+ readonly$ = this.config$.pipe(switchMap((x) => (x.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))), combineLatestWith(this._inputReadonly), map(([configReadonly, inputReadonly]) => {
1392
+ return (configReadonly ?? false) || (inputReadonly ?? false);
1393
+ }), shareReplay(1));
1394
+ showButtonsOnReadonly$ = this.config$.pipe(map((x) => x.showButtonsOnReadonly ?? false), distinctUntilChanged(), shareReplay(1));
1395
+ showButtons$ = this.showButtonsOnReadonly$.pipe(switchMap((x) => {
1396
+ if (x) {
1397
+ return of(true);
1398
+ }
1399
+ else {
1400
+ return this.readonly$.pipe(map((x) => !x));
1401
+ }
1402
+ }), distinctUntilChanged(), shareReplay(1));
1403
+ showClearSelectionButton$ = this.config$.pipe(map((config) => config.showClearSelectionButton ?? true), combineLatestWith(this.showButtons$), map((x) => reduceBooleansWithAnd(x)), distinctUntilChanged(), shareReplay(1));
1404
+ datePopoverButtonInjectionConfig$ = this.config$.pipe(map((x) => x.buttonInjectionConfig), switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent), combineLatestWith(this.showButtons$), map(([config, showButton]) => (showButton ? config : undefined)), shareReplay(1));
1405
+ clickEvent = new EventEmitter();
1406
+ // refresh any time the selected day function updates
1407
+ state$ = this.dbxCalendarScheduleSelectionStore.state$;
1408
+ beforeMonthViewRender$ = this.config$.pipe(switchMap((x) => {
1409
+ let factory;
1410
+ if (x.beforeMonthViewRenderFunctionFactory) {
1411
+ factory = asObservable(x.beforeMonthViewRenderFunctionFactory);
1412
+ }
1413
+ else {
1414
+ factory = asObservable(x.customizeDay).pipe(map((x) => dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(x)));
1415
+ }
1416
+ return factory.pipe(map((x) => x(this.state$)));
1417
+ }), shareReplay(1));
1418
+ refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(throttleTime(20, undefined, { leading: true, trailing: true }), map(() => undefined));
1419
+ events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
1420
+ viewDate$ = this.calendarStore.date$;
1440
1421
  ngOnInit() {
1441
1422
  this.dbxCalendarScheduleSelectionStore.setViewReadonlyState(this.readonly$); // sync the readonly state
1442
1423
  this.calendarStore.setNavigationRangeLimit(this.dbxCalendarScheduleSelectionStore.minMaxDateRange$); // set navigation limit to the min/max allowed dates.
@@ -1499,13 +1480,13 @@ class DbxScheduleSelectionCalendarComponent {
1499
1480
  x(renderEvent);
1500
1481
  });
1501
1482
  }
1502
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, deps: [{ token: i1.DbxCalendarStore }, { token: DbxCalendarScheduleSelectionStore }], target: i0.ɵɵFactoryTarget.Component }); }
1503
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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" }] }); }
1483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1484
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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: i1$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i2$3.DbxCalendarBaseComponent, selector: "dbx-calendar-base" }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i5$1.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: i6.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: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.ɵCalendarDatePipe, name: "calendarDate" }] });
1504
1485
  }
1505
1486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarComponent, decorators: [{
1506
1487
  type: Component,
1507
1488
  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" }]
1508
- }], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }]; }, propDecorators: { clickEvent: [{
1489
+ }], propDecorators: { clickEvent: [{
1509
1490
  type: Output
1510
1491
  }], config: [{
1511
1492
  type: Input
@@ -1541,14 +1522,14 @@ class DbxScheduleSelectionCalendarDateDialogComponent extends AbstractDialogDire
1541
1522
  }
1542
1523
  });
1543
1524
  }
1544
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1545
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1525
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1526
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDialogComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1546
1527
  <dbx-dialog-content class="dbx-schedule-selection-calendar-date-dialog">
1547
1528
  <dbx-dialog-content-close (close)="close()"></dbx-dialog-content-close>
1548
1529
  <dbx-schedule-selection-calendar></dbx-schedule-selection-calendar>
1549
1530
  <dbx-dialog-content-footer [config]="closeConfig" (close)="close()"></dbx-dialog-content-footer>
1550
1531
  </dbx-dialog-content>
1551
- `, 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", inputs: ["padded"], outputs: ["close"] }, { kind: "component", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: ["config", "readonly"], outputs: ["clickEvent"] }] }); }
1532
+ `, 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", inputs: ["padded"], outputs: ["close"] }, { kind: "component", type: DbxScheduleSelectionCalendarComponent, selector: "dbx-schedule-selection-calendar", inputs: ["config", "readonly"], outputs: ["clickEvent"] }] });
1552
1533
  }
1553
1534
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogComponent, decorators: [{
1554
1535
  type: Component,
@@ -1564,18 +1545,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1564
1545
  }] });
1565
1546
 
1566
1547
  class DbxScheduleSelectionCalendarDateDialogButtonComponent {
1567
- constructor(matDialog, injector) {
1568
- this.matDialog = matDialog;
1569
- this.injector = injector;
1570
- this.buttonText = 'Customize';
1571
- }
1548
+ injector = inject(Injector);
1549
+ matDialog = inject(MatDialog);
1550
+ buttonText = 'Customize';
1551
+ disabled;
1552
+ contentConfig;
1572
1553
  clickCustomize() {
1573
1554
  DbxScheduleSelectionCalendarDateDialogComponent.openDialog(this.matDialog, { injector: this.injector, contentConfig: this.contentConfig });
1574
1555
  }
1575
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogButtonComponent, deps: [{ token: i1$2.MatDialog }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1576
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: { buttonText: "buttonText", disabled: "disabled", contentConfig: "contentConfig" }, ngImport: i0, template: `
1556
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1557
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: { buttonText: "buttonText", disabled: "disabled", contentConfig: "contentConfig" }, ngImport: i0, template: `
1577
1558
  <dbx-button [raised]="true" color="accent" [text]="buttonText" [disabled]="disabled" (buttonClick)="clickCustomize()"></dbx-button>
1578
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] }); }
1559
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }] });
1579
1560
  }
1580
1561
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateDialogButtonComponent, decorators: [{
1581
1562
  type: Component,
@@ -1585,7 +1566,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1585
1566
  <dbx-button [raised]="true" color="accent" [text]="buttonText" [disabled]="disabled" (buttonClick)="clickCustomize()"></dbx-button>
1586
1567
  `
1587
1568
  }]
1588
- }], ctorParameters: function () { return [{ type: i1$2.MatDialog }, { type: i0.Injector }]; }, propDecorators: { buttonText: [{
1569
+ }], propDecorators: { buttonText: [{
1589
1570
  type: Input
1590
1571
  }], disabled: [{
1591
1572
  type: Input
@@ -1594,23 +1575,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1594
1575
  }] } });
1595
1576
 
1596
1577
  class DbxFormCalendarDateScheduleRangeFieldComponent extends FieldType {
1597
- constructor(compact, dbxCalendarScheduleSelectionStore, ngZone) {
1598
- super();
1599
- this.compact = compact;
1600
- this.dbxCalendarScheduleSelectionStore = dbxCalendarScheduleSelectionStore;
1601
- this.ngZone = ngZone;
1602
- this._syncSub = new SubscriptionObject();
1603
- this._valueSub = new SubscriptionObject();
1604
- this._timezoneSub = new SubscriptionObject();
1605
- this._minMaxDateRangeSub = new SubscriptionObject();
1606
- this._defaultWeekSub = new SubscriptionObject();
1607
- this._filterSub = new SubscriptionObject();
1608
- this._exclusionsSub = new SubscriptionObject();
1609
- this._formControlObs = new BehaviorSubject(undefined);
1610
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
1611
- this.value$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
1612
- this.disableCustomize$ = this.value$.pipe(map((x) => (this.allowCustomizeWithoutDateRange ? false : !x)), distinctUntilChanged(), shareReplay(1));
1613
- }
1578
+ compact = inject(CompactContextStore, { optional: true });
1579
+ dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);
1580
+ ngZone = inject(NgZone);
1581
+ _syncSub = new SubscriptionObject();
1582
+ _valueSub = new SubscriptionObject();
1583
+ _timezoneSub = new SubscriptionObject();
1584
+ _minMaxDateRangeSub = new SubscriptionObject();
1585
+ _defaultWeekSub = new SubscriptionObject();
1586
+ _filterSub = new SubscriptionObject();
1587
+ _exclusionsSub = new SubscriptionObject();
1588
+ _formControlObs = new BehaviorSubject(undefined);
1589
+ formControl$ = this._formControlObs.pipe(filterMaybe());
1590
+ value$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
1591
+ disableCustomize$ = this.value$.pipe(map((x) => (this.allowCustomizeWithoutDateRange ? false : !x)), distinctUntilChanged(), shareReplay(1));
1614
1592
  get formGroupName() {
1615
1593
  return this.field.key;
1616
1594
  }
@@ -1709,15 +1687,15 @@ class DbxFormCalendarDateScheduleRangeFieldComponent extends FieldType {
1709
1687
  this._exclusionsSub.destroy();
1710
1688
  this._formControlObs.complete();
1711
1689
  }
1712
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarDateScheduleRangeFieldComponent, deps: [{ token: i1$1.CompactContextStore, optional: true }, { token: DbxCalendarScheduleSelectionStore }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1713
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormCalendarDateScheduleRangeFieldComponent, selector: "ng-component", providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
1690
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarDateScheduleRangeFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1691
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormCalendarDateScheduleRangeFieldComponent, selector: "ng-component", providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()], usesInheritance: true, ngImport: i0, template: `
1714
1692
  <div class="dbx-schedule-selection-field">
1715
1693
  <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]="openPickerOnTextClick" [showCustomize]="showCustomize" [required]="required" [disabled]="isReadonlyOrDisabled" [label]="label" [hint]="description">
1716
1694
  <dbx-schedule-selection-calendar-date-dialog-button customizeButton [disabled]="disableCustomize$ | async" [contentConfig]="dialogContentConfig"></dbx-schedule-selection-calendar-date-dialog-button>
1717
1695
  <dbx-injection [config]="customDetailsConfig"></dbx-injection>
1718
1696
  </dbx-schedule-selection-calendar-date-range>
1719
1697
  </div>
1720
- `, isInline: true, dependencies: [{ kind: "component", type: i3$1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["openPickerOnTextClick", "label", "hint", "disabled", "showCustomize", "required"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: ["buttonText", "disabled", "contentConfig"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] }); }
1698
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: ["openPickerOnTextClick", "label", "hint", "disabled", "showCustomize", "required"] }, { kind: "component", type: DbxScheduleSelectionCalendarDateDialogButtonComponent, selector: "dbx-schedule-selection-calendar-date-dialog-button", inputs: ["buttonText", "disabled", "contentConfig"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
1721
1699
  }
1722
1700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarDateScheduleRangeFieldComponent, decorators: [{
1723
1701
  type: Component,
@@ -1732,9 +1710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1732
1710
  `,
1733
1711
  providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()]
1734
1712
  }]
1735
- }], ctorParameters: function () { return [{ type: i1$1.CompactContextStore, decorators: [{
1736
- type: Optional
1737
- }] }, { type: DbxCalendarScheduleSelectionStore }, { type: i0.NgZone }]; } });
1713
+ }] });
1738
1714
 
1739
1715
  const declarations = [
1740
1716
  //
@@ -1752,8 +1728,8 @@ const declarations = [
1752
1728
  DbxScheduleSelectionCalendarSelectionToggleButtonComponent
1753
1729
  ];
1754
1730
  class DbxFormCalendarModule {
1755
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1756
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, declarations: [
1731
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1732
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, declarations: [
1757
1733
  //
1758
1734
  DbxScheduleSelectionCalendarComponent,
1759
1735
  DbxScheduleSelectionCalendarDateDaysComponent,
@@ -1803,8 +1779,8 @@ class DbxFormCalendarModule {
1803
1779
  DbxCalendarScheduleSelectionStoreInjectionBlockDirective,
1804
1780
  DbxScheduleSelectionCalendarDateDialogComponent,
1805
1781
  DbxScheduleSelectionCalendarDateDialogButtonComponent,
1806
- DbxScheduleSelectionCalendarSelectionToggleButtonComponent] }); }
1807
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, imports: [
1782
+ DbxScheduleSelectionCalendarSelectionToggleButtonComponent] });
1783
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, imports: [
1808
1784
  //
1809
1785
  DbxInjectionComponentModule,
1810
1786
  DbxContentLayoutModule,
@@ -1828,7 +1804,7 @@ class DbxFormCalendarModule {
1828
1804
  CalendarDayModule,
1829
1805
  FlexLayoutModule,
1830
1806
  CalendarWeekModule,
1831
- DbxDatePipeModule] }); }
1807
+ DbxDatePipeModule] });
1832
1808
  }
1833
1809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormCalendarModule, decorators: [{
1834
1810
  type: NgModule,
@@ -1865,8 +1841,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1865
1841
  }] });
1866
1842
 
1867
1843
  class DbxFormDateScheduleRangeFieldModule {
1868
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1869
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, declarations: [DbxFormCalendarDateScheduleRangeFieldComponent], imports: [DbxInjectionComponentModule,
1844
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1845
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, declarations: [DbxFormCalendarDateScheduleRangeFieldComponent], imports: [DbxInjectionComponentModule,
1870
1846
  CommonModule,
1871
1847
  MatIconModule,
1872
1848
  DbxFormCalendarModule,
@@ -1874,8 +1850,8 @@ class DbxFormDateScheduleRangeFieldModule {
1874
1850
  DbxTextModule,
1875
1851
  FormsModule,
1876
1852
  ReactiveFormsModule,
1877
- MatInputModule, i1$3.FormlyModule] }); }
1878
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, imports: [DbxInjectionComponentModule,
1853
+ MatInputModule, i1$3.FormlyModule] });
1854
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, imports: [DbxInjectionComponentModule,
1879
1855
  CommonModule,
1880
1856
  MatIconModule,
1881
1857
  DbxFormCalendarModule,
@@ -1886,7 +1862,7 @@ class DbxFormDateScheduleRangeFieldModule {
1886
1862
  MatInputModule,
1887
1863
  FormlyModule.forChild({
1888
1864
  types: [{ name: 'date-schedule-range', component: DbxFormCalendarDateScheduleRangeFieldComponent }]
1889
- })] }); }
1865
+ })] });
1890
1866
  }
1891
1867
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormDateScheduleRangeFieldModule, decorators: [{
1892
1868
  type: NgModule,