@dereekb/dbx-form 10.1.30 → 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 -2
  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 +74 -79
  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 +1072 -1164
  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 -2
  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,66 +1,63 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, ElementRef, Optional, Injectable } from '@angular/core';
2
+ import { forwardRef, inject, Directive, Input, NgModule, EventEmitter, Output, Component, ChangeDetectorRef, ViewChild, InjectionToken, ElementRef, Injectable } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import * as i4 from '@angular/material/dialog';
6
- import { MatDialogModule } from '@angular/material/dialog';
7
- import * as i3 from '@uirouter/core';
8
- import * as i2 from '@dereekb/dbx-core';
9
- import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges, DbxValuePipeModule } from '@dereekb/dbx-core';
10
- import * as i2$1 from '@dereekb/dbx-web';
11
- import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxLoadingModule, DbxFlexLayoutModule, DbxSectionLayoutModule, DbxRouterAnchorModule, dbxValueListItemDecisionFunction, DbxButtonModule, DbxListLayoutModule, AbstractDbxSelectionListWrapperDirective, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, addConfigToValueListItems, provideDbxListView, AbstractDbxValueListViewItemComponent, DbxActionModule, mapCompactModeObs, DbxBarLayoutModule } from '@dereekb/dbx-web';
5
+ import * as i5 from '@dereekb/dbx-web';
6
+ import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxLoadingModule, DbxFlexLayoutModule, DbxSectionLayoutModule, DbxRouterAnchorModule, dbxValueListItemDecisionFunction, DbxButtonModule, DbxListLayoutModule, AbstractDbxSelectionListWrapperDirective, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, addConfigToValueListItems, provideDbxListView, AbstractDbxValueListViewItemComponent, DbxActionModule, CompactContextStore, mapCompactModeObs, DbxBarLayoutModule } from '@dereekb/dbx-web';
12
7
  import { isPast, addSeconds, startOfDay, addMinutes, addDays, isBefore } from 'date-fns';
13
8
  import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, shareReplay, Subject, tap, takeUntil, EMPTY, throttleTime, mergeMap, startWith, debounceTime, skipWhile, scan, skip, combineLatestWith, interval, merge, timer } from 'rxjs';
14
- import { LockSet, SubscriptionObject, asObservable, cleanup, errorOnEmissionsInPeriod, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, distinctUntilHasDifferentValues, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, loadingStateHasValue, loadingStateIsLoading, beginLoading, mapLoadingStateValueWithOperator, valueFromLoadingState, loadingStateContext, skipFirstMaybe, asObservableFromGetter, asyncPusherCache, scanCount } from '@dereekb/rxjs';
9
+ import * as i6 from '@dereekb/dbx-core';
10
+ import { DbxActionContextStoreSourceInstance, AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges, DbxValuePipeModule } from '@dereekb/dbx-core';
11
+ import { LockSet, SubscriptionObject, asObservable, cleanup, errorOnEmissionsInPeriod, isLoadingStateFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, distinctUntilHasDifferentValues, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, mapIsListLoadingStateWithEmptyValue, LoadingStateContextInstance, isLoadingStateWithDefinedValue, isLoadingStateLoading, beginLoading, mapLoadingStateValueWithOperator, valueFromLoadingState, loadingStateContext, skipFirstMaybe, asObservableFromGetter, asyncPusherCache, scanCount } from '@dereekb/rxjs';
12
+ import { MatDialogModule } from '@angular/material/dialog';
15
13
  import * as i1$1 from '@ngx-formly/core';
16
14
  import { FieldType, FieldWrapper, FormlyModule, FieldArrayType } from '@ngx-formly/core';
17
- import * as i3$1 from '@angular/forms';
15
+ import * as i2 from '@angular/forms';
18
16
  import { FormsModule, ReactiveFormsModule, FormControl, Validators, FormGroup } from '@angular/forms';
19
- import * as i4$1 from '@angular/material/core';
20
- import { MatRippleModule, MatNativeDateModule } from '@angular/material/core';
21
- import * as i4$2 from '@angular/material/checkbox';
17
+ import * as i4 from '@angular/material/core';
18
+ import { MatRippleModule, MatNativeDateModule, DateAdapter } from '@angular/material/core';
19
+ import * as i4$1 from '@angular/material/checkbox';
22
20
  import { MatCheckboxModule } from '@angular/material/checkbox';
23
21
  import * as i7 from '@angular/material/icon';
24
22
  import { MatIconModule } from '@angular/material/icon';
25
- import * as i7$1 from '@angular/material/button';
23
+ import * as i6$1 from '@angular/material/button';
26
24
  import { MatButtonModule } from '@angular/material/button';
27
- import * as i11 from '@ngbracket/ngx-layout/flex';
25
+ import * as i10 from '@ngbracket/ngx-layout/flex';
28
26
  import { FlexLayoutModule } from '@ngbracket/ngx-layout';
29
27
  import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, isSelectedDecisionFunctionFactory, readKeysFrom, hasDifferentValues, makeValuesGroupMap, separateValues, filterUniqueValues, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, sortByStringFunction, mergeArraysIntoArray, lastValue, arrayToMap, setContainsAllValues, addToSetCopy, setsAreEquivalent, filterMaybeValues, mergeArrays, firstValue, cachedGetter, makeGetter, asDecisionFunction, getValueFromGetter, asGetter, dateFromMinuteOfDay, dateToMinuteOfDay, isISO8601DayStringStart, mapIdentityFunction, MS_IN_MINUTE, isMonthDaySlashDate, HAS_WEBSITE_DOMAIN_NAME_REGEX, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, isE164PhoneNumber as isE164PhoneNumber$1, isValidPhoneExtensionNumber, e164PhoneNumberExtensionPair, mapMaybeFunction, transformNumberFunction, concatArrays, DOLLAR_AMOUNT_PRECISION, e164PhoneNumberFromE164PhoneNumberExtensionPair, transformStringFunction, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX, LAT_LNG_PATTERN, BooleanStringKeyArrayUtilityInstance, iterablesAreSetEquivalent, capitalizeFirstLetter } from '@dereekb/util';
30
- import * as i2$2 from '@angular/material/slide-toggle';
28
+ import * as i2$1 from '@angular/material/slide-toggle';
31
29
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
32
- import * as i2$3 from '@ngbracket/ngx-layout/extended';
33
- import * as i5 from '@angular/material/divider';
30
+ import * as i2$2 from '@ngbracket/ngx-layout/extended';
31
+ import * as i5$1 from '@angular/material/divider';
34
32
  import { MatDividerModule } from '@angular/material/divider';
35
- import * as i4$4 from '@angular/material/autocomplete';
33
+ import * as i4$3 from '@angular/material/autocomplete';
36
34
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
37
- import * as i5$1 from '@angular/material/form-field';
35
+ import * as i4$5 from '@angular/material/form-field';
38
36
  import { MatFormFieldModule } from '@angular/material/form-field';
39
- import * as i4$3 from '@angular/material/input';
37
+ import * as i4$2 from '@angular/material/input';
40
38
  import { MatInputModule } from '@angular/material/input';
41
39
  import { FieldType as FieldType$1, FormlyMaterialModule } from '@ngx-formly/material';
42
40
  import { camelCase } from 'change-case';
43
- import * as i6 from '@angular/material/chips';
41
+ import * as i6$2 from '@angular/material/chips';
44
42
  import { MatChipsModule } from '@angular/material/chips';
45
43
  import { MatListModule } from '@angular/material/list';
46
44
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
47
- import { skipUntilTimeElapsedAfterLastEmission, toJsDate, parseJsDateString, parseISO8601DayStringToDate, formatToISO8601DateString, formatToISO8601DayStringForSystem, isSameDateHoursAndMinutes, safeToJsDate, guessCurrentTimezone, dateTimezoneUtcNormal, toJsDayDate, isSameDateDay, toLocalReadableTimeString, getTimezoneAbbreviation, utcDayForDate, readableTimeStringToDate, findMinDate, dateFromLogicalDate, findMaxDate, isSameDate, dateTimeMinuteWholeDayDecisionFunction, DateTimeMinuteInstance, isSameDateDayRange, dateRange, clampDateRangeToDateRange, isDateInDateRange, isSameDateRange, limitDateTimeInstance, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';
45
+ import { skipUntilTimeElapsedAfterLastEmission, toJsDate, parseJsDateString, parseISO8601DayStringToDate, formatToISO8601DateString, formatToISO8601DayStringForSystem, isSameDateHoursAndMinutes, safeToJsDate, guessCurrentTimezone, dateTimezoneUtcNormal, toJsDayDate, isSameDateDay, toLocalReadableTimeString, getTimezoneAbbreviation, utcDayForDate, readableTimeStringToDate, findMinDate, dateFromLogicalDate, findMaxDate, isSameDate, dateTimeMinuteWholeDayDecisionFunction, DateTimeMinuteInstance, limitDateTimeInstance, isSameDateDayRange, dateRange, clampDateRangeToDateRange, isDateInDateRange, isSameDateRange, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';
48
46
  import { FieldType as FieldType$2, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
49
- import * as i3$2 from '@angular/material/select';
47
+ import * as i3 from '@angular/material/select';
50
48
  import { MatSelectModule } from '@angular/material/select';
51
- import * as i5$2 from '@angular/material/datepicker';
49
+ import * as i4$6 from '@angular/material/datepicker';
52
50
  import { MatDatepickerModule, DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatCalendar } from '@angular/material/datepicker';
53
- import * as i9 from '@angular/material/menu';
51
+ import * as i8 from '@angular/material/menu';
54
52
  import { MatMenuModule } from '@angular/material/menu';
55
- import * as i4$5 from 'ngx-editor';
53
+ import * as i3$1 from 'ngx-editor';
56
54
  import { Editor, NgxEditorModule } from 'ngx-editor';
57
- import * as i4$6 from '@angular/cdk/drag-drop';
55
+ import * as i4$4 from '@angular/cdk/drag-drop';
58
56
  import { DragDropModule } from '@angular/cdk/drag-drop';
59
57
  import { FormlyMatSliderModule } from '@ngx-formly/material/slider';
60
- import * as i3$3 from 'ngx-mat-intl-tel-input';
58
+ import * as i3$2 from 'ngx-mat-intl-tel-input';
61
59
  import { NgxMatIntlTelInputComponent } from 'ngx-mat-intl-tel-input';
62
60
  import { ADDRESS_CITY_MAX_LENGTH, ADDRESS_STATE_CODE_MAX_LENGTH, ADDRESS_STATE_MAX_LENGTH, ADDRESS_COUNTRY_MAX_LENGTH, ADDRESS_ZIP_MAX_LENGTH, ADDRESS_LINE_MAX_LENGTH } from '@dereekb/model';
63
- import { cloneDeep } from 'lodash';
64
61
  import { FormlyMatToggleModule } from '@ngx-formly/material/toggle';
65
62
 
66
63
  /**
@@ -113,18 +110,31 @@ const APP_ACTION_FORM_DISABLED_KEY = 'dbx_action_form';
113
110
  * If the source is not considered modified, the trigger will be ignored.
114
111
  */
115
112
  class DbxActionFormDirective {
116
- constructor(form, source) {
117
- this.form = form;
118
- this.source = source;
119
- this.lockSet = new LockSet();
120
- this._formDisabledWhileWorking = new BehaviorSubject(true);
121
- this._triggeredSub = new SubscriptionObject();
122
- this._isCompleteSub = new SubscriptionObject();
123
- this._isWorkingSub = new SubscriptionObject();
124
- if (form.lockSet) {
125
- this.lockSet.addChildLockSet(form.lockSet, 'form');
126
- }
127
- this.lockSet.addChildLockSet(source.lockSet, 'source');
113
+ form = inject((DbxMutableForm), { host: true });
114
+ source = inject((DbxActionContextStoreSourceInstance));
115
+ lockSet = new LockSet();
116
+ /**
117
+ * Optional validator that checks whether or not the value is
118
+ * ready to send before the context store is marked enabled.
119
+ */
120
+ dbxActionFormValidator;
121
+ /**
122
+ * Optional function that checks whether or not the value has been modified.
123
+ */
124
+ dbxActionFormModified;
125
+ /**
126
+ * Optional function that maps the form's value to the source's value.
127
+ */
128
+ dbxActionFormMapValue;
129
+ _formDisabledWhileWorking = new BehaviorSubject(true);
130
+ _triggeredSub = new SubscriptionObject();
131
+ _isCompleteSub = new SubscriptionObject();
132
+ _isWorkingSub = new SubscriptionObject();
133
+ constructor() {
134
+ if (this.form.lockSet) {
135
+ this.lockSet.addChildLockSet(this.form.lockSet, 'form');
136
+ }
137
+ this.lockSet.addChildLockSet(this.source.lockSet, 'source');
128
138
  }
129
139
  get formDisabledOnWorking() {
130
140
  return this._formDisabledWhileWorking.value;
@@ -230,17 +240,15 @@ class DbxActionFormDirective {
230
240
  return of({ value: value });
231
241
  }
232
242
  }
233
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormDirective, deps: [{ token: DbxMutableForm, host: true }, { token: i2.DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive }); }
234
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: { dbxActionFormValidator: "dbxActionFormValidator", dbxActionFormModified: "dbxActionFormModified", dbxActionFormMapValue: "dbxActionFormMapValue", formDisabledOnWorking: "formDisabledOnWorking" }, ngImport: i0 }); }
243
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
244
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: { dbxActionFormValidator: "dbxActionFormValidator", dbxActionFormModified: "dbxActionFormModified", dbxActionFormMapValue: "dbxActionFormMapValue", formDisabledOnWorking: "formDisabledOnWorking" }, ngImport: i0 });
235
245
  }
236
246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormDirective, decorators: [{
237
247
  type: Directive,
238
248
  args: [{
239
249
  selector: '[dbxActionForm]'
240
250
  }]
241
- }], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
242
- type: Host
243
- }] }, { type: i2.DbxActionContextStoreSourceInstance }]; }, propDecorators: { dbxActionFormValidator: [{
251
+ }], ctorParameters: function () { return []; }, propDecorators: { dbxActionFormValidator: [{
244
252
  type: Input
245
253
  }], dbxActionFormModified: [{
246
254
  type: Input
@@ -256,33 +264,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
256
264
  * NOTE: Only works with UIRouter
257
265
  */
258
266
  class DbxActionFormSafetyDirective extends DbxActionTransitionSafetyDirective {
259
- constructor(dbxActionForm, source, transitionService, viewContainerRef, dialog) {
260
- super(source, transitionService, viewContainerRef, dialog);
261
- this.dbxActionForm = dbxActionForm;
262
- }
267
+ dbxActionForm = inject((DbxActionFormDirective), { host: true });
268
+ inputSafetyType = 'auto';
263
269
  _handleOnBeforeTransition(transition) {
264
270
  this.dbxActionForm.form.forceFormUpdate();
265
271
  return super._handleOnBeforeTransition(transition);
266
272
  }
267
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormSafetyDirective, deps: [{ token: DbxActionFormDirective, host: true }, { token: i2.DbxActionContextStoreSourceInstance }, { token: i3.TransitionService }, { token: i0.ViewContainerRef }, { token: i4.MatDialog }], target: i0.ɵɵFactoryTarget.Directive }); }
268
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxActionFormSafetyDirective, selector: "[dbxActionFormSafety]", inputs: { inputSafetyType: ["dbxActionFormSafety", "inputSafetyType"] }, usesInheritance: true, ngImport: i0 }); }
273
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormSafetyDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
274
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxActionFormSafetyDirective, selector: "[dbxActionFormSafety]", inputs: { inputSafetyType: ["dbxActionFormSafety", "inputSafetyType"] }, usesInheritance: true, ngImport: i0 });
269
275
  }
270
276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxActionFormSafetyDirective, decorators: [{
271
277
  type: Directive,
272
278
  args: [{
273
279
  selector: '[dbxActionFormSafety]'
274
280
  }]
275
- }], ctorParameters: function () { return [{ type: DbxActionFormDirective, decorators: [{
276
- type: Host
277
- }] }, { type: i2.DbxActionContextStoreSourceInstance }, { type: i3.TransitionService }, { type: i0.ViewContainerRef }, { type: i4.MatDialog }]; }, propDecorators: { inputSafetyType: [{
281
+ }], propDecorators: { inputSafetyType: [{
278
282
  type: Input,
279
283
  args: ['dbxActionFormSafety']
280
284
  }] } });
281
285
 
282
286
  class DbxFormActionTransitionModule {
283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
284
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, declarations: [DbxActionFormSafetyDirective], imports: [CommonModule], exports: [DbxActionFormSafetyDirective] }); }
285
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, imports: [CommonModule] }); }
287
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
288
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, declarations: [DbxActionFormSafetyDirective], imports: [CommonModule], exports: [DbxActionFormSafetyDirective] });
289
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, imports: [CommonModule] });
286
290
  }
287
291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionTransitionModule, decorators: [{
288
292
  type: NgModule,
@@ -294,9 +298,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
294
298
  }] });
295
299
 
296
300
  class DbxFormActionModule {
297
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
298
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, declarations: [DbxActionFormDirective], imports: [CommonModule, MatDialogModule], exports: [DbxActionFormDirective] }); }
299
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, imports: [CommonModule, MatDialogModule] }); }
301
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
302
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, declarations: [DbxActionFormDirective], imports: [CommonModule, MatDialogModule], exports: [DbxActionFormDirective] });
303
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, imports: [CommonModule, MatDialogModule] });
300
304
  }
301
305
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormActionModule, decorators: [{
302
306
  type: NgModule,
@@ -368,11 +372,8 @@ function dbxFormSourceObservableFromStream(stream$, inputObs, mode$) {
368
372
  * Used with a FormComponent to set the value based on the input value.
369
373
  */
370
374
  class DbxFormSourceDirective extends AbstractSubscriptionDirective {
371
- constructor(form) {
372
- super();
373
- this.form = form;
374
- this._mode = new BehaviorSubject('reset');
375
- }
375
+ form = inject((DbxMutableForm), { host: true });
376
+ _mode = new BehaviorSubject('reset');
376
377
  get mode() {
377
378
  return this._mode.value;
378
379
  }
@@ -395,17 +396,15 @@ class DbxFormSourceDirective extends AbstractSubscriptionDirective {
395
396
  super.ngOnDestroy();
396
397
  this._mode.complete();
397
398
  }
398
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceDirective, deps: [{ token: DbxMutableForm, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
399
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: { mode: ["dbxFormSourceMode", "mode"], obs: ["dbxFormSource", "obs"] }, usesInheritance: true, ngImport: i0 }); }
399
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
400
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: { mode: ["dbxFormSourceMode", "mode"], obs: ["dbxFormSource", "obs"] }, usesInheritance: true, ngImport: i0 });
400
401
  }
401
402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceDirective, decorators: [{
402
403
  type: Directive,
403
404
  args: [{
404
405
  selector: '[dbxFormSource]'
405
406
  }]
406
- }], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
407
- type: Host
408
- }] }]; }, propDecorators: { mode: [{
407
+ }], propDecorators: { mode: [{
409
408
  type: Input,
410
409
  args: ['dbxFormSourceMode']
411
410
  }], obs: [{
@@ -417,11 +416,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
417
416
  * Used with a FormComponent to set the value from a LoadingState when the value is available.
418
417
  */
419
418
  class DbxFormLoadingSourceDirective extends AbstractSubscriptionDirective {
420
- constructor(form) {
421
- super();
422
- this.form = form;
423
- this._mode = new BehaviorSubject('reset');
424
- }
419
+ form = inject((DbxMutableForm), { host: true });
420
+ _mode = new BehaviorSubject('reset');
425
421
  get mode() {
426
422
  return this._mode.value;
427
423
  }
@@ -438,7 +434,7 @@ class DbxFormLoadingSourceDirective extends AbstractSubscriptionDirective {
438
434
  let subscription;
439
435
  if (inputObs) {
440
436
  subscription = dbxFormSourceObservableFromStream(this.form.stream$, inputObs, this._mode).subscribe((x) => {
441
- if (loadingStateHasFinishedLoading(x)) {
437
+ if (isLoadingStateFinishedLoading(x)) {
442
438
  this.form.setValue(x.value);
443
439
  }
444
440
  });
@@ -449,17 +445,15 @@ class DbxFormLoadingSourceDirective extends AbstractSubscriptionDirective {
449
445
  super.ngOnDestroy();
450
446
  this._mode.complete();
451
447
  }
452
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLoadingSourceDirective, deps: [{ token: DbxMutableForm, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
453
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormLoadingSourceDirective, selector: "[dbxFormLoadingSource]", inputs: { mode: ["dbxFormLoadingSourceMode", "mode"], obs: ["dbxFormLoadingSource", "obs"] }, usesInheritance: true, ngImport: i0 }); }
448
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLoadingSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
449
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormLoadingSourceDirective, selector: "[dbxFormLoadingSource]", inputs: { mode: ["dbxFormLoadingSourceMode", "mode"], obs: ["dbxFormLoadingSource", "obs"] }, usesInheritance: true, ngImport: i0 });
454
450
  }
455
451
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLoadingSourceDirective, decorators: [{
456
452
  type: Directive,
457
453
  args: [{
458
454
  selector: '[dbxFormLoadingSource]'
459
455
  }]
460
- }], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
461
- type: Host
462
- }] }]; }, propDecorators: { mode: [{
456
+ }], propDecorators: { mode: [{
463
457
  type: Input,
464
458
  args: ['dbxFormLoadingSourceMode']
465
459
  }], obs: [{
@@ -473,11 +467,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
473
467
  * Emits undefined when the form is incomplete, and the value when the form is complete.
474
468
  */
475
469
  class DbxFormValueChangesDirective extends AbstractSubscriptionDirective {
476
- constructor(form) {
477
- super();
478
- this.form = form;
479
- this.dbxFormValueChange = new EventEmitter();
480
- }
470
+ form = inject((DbxForm), { host: true });
471
+ dbxFormValueChange = new EventEmitter();
481
472
  ngOnInit() {
482
473
  this.sub = this.form.stream$
483
474
  .pipe(mergeMap((x) => this.form.getValue().pipe(first(), map((value) => ({ isComplete: x.isComplete, value })))), delay(0))
@@ -494,24 +485,22 @@ class DbxFormValueChangesDirective extends AbstractSubscriptionDirective {
494
485
  super.ngOnDestroy();
495
486
  this.dbxFormValueChange.complete();
496
487
  }
497
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormValueChangesDirective, deps: [{ token: DbxForm, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
498
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormValueChangesDirective, selector: "[dbxFormValueChange]", outputs: { dbxFormValueChange: "dbxFormValueChange" }, usesInheritance: true, ngImport: i0 }); }
488
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormValueChangesDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
489
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormValueChangesDirective, selector: "[dbxFormValueChange]", outputs: { dbxFormValueChange: "dbxFormValueChange" }, usesInheritance: true, ngImport: i0 });
499
490
  }
500
491
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormValueChangesDirective, decorators: [{
501
492
  type: Directive,
502
493
  args: [{
503
494
  selector: '[dbxFormValueChange]'
504
495
  }]
505
- }], ctorParameters: function () { return [{ type: DbxForm, decorators: [{
506
- type: Host
507
- }] }]; }, propDecorators: { dbxFormValueChange: [{
496
+ }], propDecorators: { dbxFormValueChange: [{
508
497
  type: Output
509
498
  }] } });
510
499
 
511
500
  class DbxFormIoModule {
512
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
513
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, declarations: [DbxFormSourceDirective, DbxFormValueChangesDirective, DbxFormLoadingSourceDirective], imports: [CommonModule], exports: [DbxFormSourceDirective, DbxFormValueChangesDirective, DbxFormLoadingSourceDirective] }); }
514
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, imports: [CommonModule] }); }
501
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
502
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, declarations: [DbxFormSourceDirective, DbxFormValueChangesDirective, DbxFormLoadingSourceDirective], imports: [CommonModule], exports: [DbxFormSourceDirective, DbxFormValueChangesDirective, DbxFormLoadingSourceDirective] });
503
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, imports: [CommonModule] });
515
504
  }
516
505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormIoModule, decorators: [{
517
506
  type: NgModule,
@@ -535,9 +524,9 @@ function streamValueFromControl(fromControl, path) {
535
524
  }
536
525
 
537
526
  class DbxFormModule {
538
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
539
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, exports: [DbxFormActionTransitionModule, DbxFormActionModule, DbxFormIoModule] }); }
540
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, imports: [DbxFormActionTransitionModule, DbxFormActionModule, DbxFormIoModule] }); }
527
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
528
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, exports: [DbxFormActionTransitionModule, DbxFormActionModule, DbxFormIoModule] });
529
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, imports: [DbxFormActionTransitionModule, DbxFormActionModule, DbxFormIoModule] });
541
530
  }
542
531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormModule, decorators: [{
543
532
  type: NgModule,
@@ -571,6 +560,7 @@ function defaultValidationMessages() {
571
560
 
572
561
  // MARK: Default
573
562
  class DbxDefaultChecklistItemFieldDisplayComponent {
563
+ displayContent;
574
564
  get label() {
575
565
  return this.displayContent?.label;
576
566
  }
@@ -580,14 +570,14 @@ class DbxDefaultChecklistItemFieldDisplayComponent {
580
570
  get description() {
581
571
  return this.displayContent?.description;
582
572
  }
583
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultChecklistItemFieldDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
584
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDefaultChecklistItemFieldDisplayComponent, selector: "ng-component", inputs: { displayContent: "displayContent" }, ngImport: i0, template: `
573
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultChecklistItemFieldDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
574
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDefaultChecklistItemFieldDisplayComponent, selector: "ng-component", inputs: { displayContent: "displayContent" }, ngImport: i0, template: `
585
575
  <div *ngIf="displayContent" class="dbx-default-checklist-item-field">
586
576
  <div *ngIf="label" class="item-label">{{ label }}</div>
587
577
  <div *ngIf="sublabel" class="item-sublabel">{{ sublabel }}</div>
588
578
  <div *ngIf="description" class="dbx-hint item-description">{{ description }}</div>
589
579
  </div>
590
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
580
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
591
581
  }
592
582
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultChecklistItemFieldDisplayComponent, decorators: [{
593
583
  type: Component,
@@ -605,13 +595,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
605
595
  }] } });
606
596
 
607
597
  class DbxChecklistItemFieldComponent extends FieldType {
608
- constructor() {
609
- super(...arguments);
610
- this._displayContent = new BehaviorSubject(undefined);
611
- this.displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
612
- this.anchor$ = this.displayContent$.pipe(map((x) => x.anchor), shareReplay(1));
613
- this.rippleDisabled$ = this.displayContent$.pipe(map((x) => x.ripple === false || (x.ripple !== true && !x.anchor)), distinctUntilChanged(), shareReplay(1));
614
- }
598
+ _displayContent = new BehaviorSubject(undefined);
599
+ displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
600
+ anchor$ = this.displayContent$.pipe(map((x) => x.anchor), shareReplay(1));
601
+ rippleDisabled$ = this.displayContent$.pipe(map((x) => x.ripple === false || (x.ripple !== true && !x.anchor)), distinctUntilChanged(), shareReplay(1));
615
602
  get formGroup() {
616
603
  return this.form;
617
604
  }
@@ -642,34 +629,29 @@ class DbxChecklistItemFieldComponent extends FieldType {
642
629
  ngOnDestroy() {
643
630
  this._displayContent.complete();
644
631
  }
645
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
646
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxChecklistItemFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-checklist-item-wrapper\" [formGroup]=\"formGroup\">\n <div *ngIf=\"label\" class=\"dbx-checklist-item-label\">{{ label }}</div>\n <div class=\"dbx-checklist-item\">\n <div class=\"dbx-checklist-item-check\">\n <mat-checkbox [formControlName]=\"formControlName\"></mat-checkbox>\n </div>\n <div class=\"dbx-checklist-item-content-wrapper\">\n <dbx-anchor [block]=\"true\" [anchor]=\"anchor$ | async\">\n <div class=\"dbx-checklist-item-content\" matRipple [matRippleDisabled]=\"(rippleDisabled$ | async) ?? false\">\n <dbx-checklist-item-content-component></dbx-checklist-item-content-component>\n <span class=\"spacer\"></span>\n <mat-icon *ngIf=\"(rippleDisabled$ | async) !== true\">navigate_next</mat-icon>\n </div>\n </dbx-anchor>\n </div>\n </div>\n <div *ngIf=\"description\" class=\"dbx-hint\">{{ description }}</div>\n</div>\n", dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.NgControlStatusGroup; }), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.FormGroupDirective; }), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.FormControlName; }), selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i0.forwardRef(function () { return i4$1.MatRipple; }), selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i0.forwardRef(function () { return i4$2.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i0.forwardRef(function () { return i7.MatIcon; }), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i0.forwardRef(function () { return i2$1.DbxAnchorComponent; }), selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i0.forwardRef(function () { return DbxChecklistItemContentComponent; }), selector: "dbx-checklist-item-content-component" }, { kind: "pipe", type: i0.forwardRef(function () { return i1.AsyncPipe; }), name: "async" }] }); }
632
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
633
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxChecklistItemFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-checklist-item-wrapper\" [formGroup]=\"formGroup\">\n <div *ngIf=\"label\" class=\"dbx-checklist-item-label\">{{ label }}</div>\n <div class=\"dbx-checklist-item\">\n <div class=\"dbx-checklist-item-check\">\n <mat-checkbox [formControlName]=\"formControlName\"></mat-checkbox>\n </div>\n <div class=\"dbx-checklist-item-content-wrapper\">\n <dbx-anchor [block]=\"true\" [anchor]=\"anchor$ | async\">\n <div class=\"dbx-checklist-item-content\" matRipple [matRippleDisabled]=\"(rippleDisabled$ | async) ?? false\">\n <dbx-checklist-item-content-component></dbx-checklist-item-content-component>\n <span class=\"spacer\"></span>\n <mat-icon *ngIf=\"(rippleDisabled$ | async) !== true\">navigate_next</mat-icon>\n </div>\n </dbx-anchor>\n </div>\n </div>\n <div *ngIf=\"description\" class=\"dbx-hint\">{{ description }}</div>\n</div>\n", dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(function () { return i2.NgControlStatusGroup; }), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(function () { return i2.FormGroupDirective; }), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.FormControlName; }), selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i0.forwardRef(function () { return i4.MatRipple; }), selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i0.forwardRef(function () { return i4$1.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i0.forwardRef(function () { return i7.MatIcon; }), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i0.forwardRef(function () { return i5.DbxAnchorComponent; }), selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i0.forwardRef(function () { return DbxChecklistItemContentComponent; }), selector: "dbx-checklist-item-content-component" }, { kind: "pipe", type: i0.forwardRef(function () { return i1.AsyncPipe; }), name: "async" }] });
647
634
  }
648
635
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemFieldComponent, decorators: [{
649
636
  type: Component,
650
637
  args: [{ template: "<div class=\"dbx-checklist-item-wrapper\" [formGroup]=\"formGroup\">\n <div *ngIf=\"label\" class=\"dbx-checklist-item-label\">{{ label }}</div>\n <div class=\"dbx-checklist-item\">\n <div class=\"dbx-checklist-item-check\">\n <mat-checkbox [formControlName]=\"formControlName\"></mat-checkbox>\n </div>\n <div class=\"dbx-checklist-item-content-wrapper\">\n <dbx-anchor [block]=\"true\" [anchor]=\"anchor$ | async\">\n <div class=\"dbx-checklist-item-content\" matRipple [matRippleDisabled]=\"(rippleDisabled$ | async) ?? false\">\n <dbx-checklist-item-content-component></dbx-checklist-item-content-component>\n <span class=\"spacer\"></span>\n <mat-icon *ngIf=\"(rippleDisabled$ | async) !== true\">navigate_next</mat-icon>\n </div>\n </dbx-anchor>\n </div>\n </div>\n <div *ngIf=\"description\" class=\"dbx-hint\">{{ description }}</div>\n</div>\n" }]
651
638
  }] });
652
639
  class DbxChecklistItemContentComponent extends AbstractSubscriptionDirective {
653
- constructor(checklistItemFieldComponent, cdRef) {
654
- super();
655
- this.checklistItemFieldComponent = checklistItemFieldComponent;
656
- this.cdRef = cdRef;
657
- }
658
- ngOnInit() {
659
- this.config = {
660
- componentClass: this.checklistItemFieldComponent.componentClass,
661
- init: (instance) => {
662
- this.checklistItemFieldComponent.displayContent$.subscribe((x) => {
663
- instance.displayContent = x;
664
- safeDetectChanges(this.cdRef);
665
- });
666
- }
667
- };
668
- }
669
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemContentComponent, deps: [{ token: DbxChecklistItemFieldComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
670
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxChecklistItemContentComponent, selector: "dbx-checklist-item-content-component", usesInheritance: true, ngImport: i0, template: `
640
+ cdRef = inject(ChangeDetectorRef);
641
+ checklistItemFieldComponent = inject((DbxChecklistItemFieldComponent));
642
+ config = {
643
+ componentClass: this.checklistItemFieldComponent.componentClass,
644
+ init: (instance) => {
645
+ this.sub = this.checklistItemFieldComponent.displayContent$.subscribe((x) => {
646
+ instance.displayContent = x;
647
+ safeDetectChanges(this.cdRef);
648
+ });
649
+ }
650
+ };
651
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
652
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxChecklistItemContentComponent, selector: "dbx-checklist-item-content-component", usesInheritance: true, ngImport: i0, template: `
671
653
  <dbx-injection [config]="config"></dbx-injection>
672
- `, isInline: true, dependencies: [{ kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] }); }
654
+ `, isInline: true, dependencies: [{ kind: "component", type: i6.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
673
655
  }
674
656
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxChecklistItemContentComponent, decorators: [{
675
657
  type: Component,
@@ -679,7 +661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
679
661
  <dbx-injection [config]="config"></dbx-injection>
680
662
  `
681
663
  }]
682
- }], ctorParameters: function () { return [{ type: DbxChecklistItemFieldComponent }, { type: i0.ChangeDetectorRef }]; } });
664
+ }] });
683
665
 
684
666
  class DbxFormInfoWrapperComponent extends FieldWrapper {
685
667
  get infoWrapper() {
@@ -688,8 +670,8 @@ class DbxFormInfoWrapperComponent extends FieldWrapper {
688
670
  onInfoClick() {
689
671
  this.infoWrapper.onInfoClick();
690
672
  }
691
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormInfoWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
692
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormInfoWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
673
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormInfoWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
674
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormInfoWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
693
675
  <div class="dbx-form-info-wrapper" fxLayout="row">
694
676
  <div class="dbx-form-info-wrapper-content" fxFlex="grow">
695
677
  <ng-container #fieldComponent></ng-container>
@@ -700,7 +682,7 @@ class DbxFormInfoWrapperComponent extends FieldWrapper {
700
682
  </button>
701
683
  </div>
702
684
  </div>
703
- `, isInline: true, dependencies: [{ kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i11.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i11.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] }); }
685
+ `, isInline: true, dependencies: [{ kind: "component", type: i6$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }] });
704
686
  }
705
687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormInfoWrapperComponent, decorators: [{
706
688
  type: Component,
@@ -724,12 +706,12 @@ class DbxFormSectionWrapperComponent extends FieldWrapper {
724
706
  get headerConfig() {
725
707
  return this.props;
726
708
  }
727
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
728
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSectionWrapperComponent, selector: "dbx-form-section-wrapper", usesInheritance: true, ngImport: i0, template: `
709
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
710
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSectionWrapperComponent, selector: "dbx-form-section-wrapper", usesInheritance: true, ngImport: i0, template: `
729
711
  <dbx-section [headerConfig]="headerConfig">
730
712
  <ng-container #fieldComponent></ng-container>
731
713
  </dbx-section>
732
- `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxSectionComponent, selector: "dbx-section", inputs: ["elevate"] }] }); }
714
+ `, isInline: true, dependencies: [{ kind: "component", type: i5.DbxSectionComponent, selector: "dbx-section", inputs: ["elevate"] }] });
733
715
  }
734
716
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSectionWrapperComponent, decorators: [{
735
717
  type: Component,
@@ -756,12 +738,12 @@ class DbxFormFlexWrapperComponent extends FieldWrapper {
756
738
  get breakToColumn() {
757
739
  return this.flexWrapper.breakToColumn ?? false;
758
740
  }
759
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFlexWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
760
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormFlexWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
741
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFlexWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
742
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormFlexWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
761
743
  <div class="dbx-form-flex-section" dbxFlexGroup [content]="false" [relative]="relative" [breakpoint]="breakpoint" [breakToColumn]="breakToColumn">
762
744
  <ng-container #fieldComponent></ng-container>
763
745
  </div>
764
- `, isInline: true, dependencies: [{ kind: "directive", type: i2$1.DbxFlexGroupDirective, selector: "[dbxFlexGroup]", inputs: ["breakToColumn", "content", "relative", "breakpoint"] }] }); }
746
+ `, isInline: true, dependencies: [{ kind: "directive", type: i5.DbxFlexGroupDirective, selector: "[dbxFlexGroup]", inputs: ["breakToColumn", "content", "relative", "breakpoint"] }] });
765
747
  }
766
748
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFlexWrapperComponent, decorators: [{
767
749
  type: Component,
@@ -778,12 +760,12 @@ class DbxFormSubsectionWrapperComponent extends FieldWrapper {
778
760
  get headerConfig() {
779
761
  return this.props;
780
762
  }
781
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSubsectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
782
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSubsectionWrapperComponent, selector: "dbx-form-subsection-wrapper", usesInheritance: true, ngImport: i0, template: `
763
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSubsectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
764
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSubsectionWrapperComponent, selector: "dbx-form-subsection-wrapper", usesInheritance: true, ngImport: i0, template: `
783
765
  <dbx-subsection [headerConfig]="headerConfig">
784
766
  <ng-container #fieldComponent></ng-container>
785
767
  </dbx-subsection>
786
- `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxSubSectionComponent, selector: "dbx-subsection" }] }); }
768
+ `, isInline: true, dependencies: [{ kind: "component", type: i5.DbxSubSectionComponent, selector: "dbx-subsection" }] });
787
769
  }
788
770
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSubsectionWrapperComponent, decorators: [{
789
771
  type: Component,
@@ -798,32 +780,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
798
780
  }] });
799
781
 
800
782
  const DEFAULT_HAS_VALUE_FN = (x) => !objectIsEmpty(x);
801
- class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
802
- constructor() {
803
- super(...arguments);
804
- this._formControlObs = new BehaviorSubject(undefined);
805
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
806
- this._toggleOpen = new BehaviorSubject(undefined);
807
- this.show$ = this._toggleOpen.pipe(switchMap((toggleOpen) => {
808
- if (toggleOpen != null) {
809
- return of(toggleOpen);
810
- }
811
- else {
812
- return this.hasValue$;
813
- }
814
- }), distinctUntilChanged(), shareReplay(1));
815
- this.hasValue$ = this.formControl$.pipe(switchMap((x) => x.valueChanges.pipe(startWith(x.value), map((value) => {
816
- return this.hasValueFn(value);
817
- }), shareReplay(1))));
818
- }
819
- get expandableSection() {
783
+ class AbstractFormExpandSectionWrapperDirective extends FieldWrapper {
784
+ _formControlObs = new BehaviorSubject(undefined);
785
+ _toggleOpen = new BehaviorSubject(undefined);
786
+ formControl$ = this._formControlObs.pipe(filterMaybe());
787
+ show$ = this._toggleOpen.pipe(switchMap((toggleOpen) => {
788
+ if (toggleOpen != null) {
789
+ return of(toggleOpen);
790
+ }
791
+ else {
792
+ return this.hasValue$;
793
+ }
794
+ }), distinctUntilChanged(), shareReplay(1));
795
+ hasValue$ = this.formControl$.pipe(switchMap((x) => x.valueChanges.pipe(startWith(x.value), map((value) => {
796
+ return this.hasValueFn(value);
797
+ }), shareReplay(1))));
798
+ get expandSection() {
820
799
  return this.props;
821
800
  }
822
801
  get hasValueFn() {
823
- return this.expandableSection.hasValueFn ?? DEFAULT_HAS_VALUE_FN;
802
+ return this.expandSection.hasValueFn ?? DEFAULT_HAS_VALUE_FN;
824
803
  }
825
804
  get expandLabel() {
826
- let label = this.expandableSection.expandLabel ?? this.field.props?.label;
805
+ let label = this.expandSection.expandLabel ?? this.field.props?.label;
827
806
  if (label == null) {
828
807
  const firstFieldGroup = this.field.fieldGroup?.[0];
829
808
  if (firstFieldGroup) {
@@ -842,22 +821,22 @@ class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
842
821
  this._toggleOpen.complete();
843
822
  this._formControlObs.complete();
844
823
  }
845
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormExpandableSectionWrapperDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
846
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractFormExpandableSectionWrapperDirective, usesInheritance: true, ngImport: i0 }); }
824
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormExpandSectionWrapperDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
825
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractFormExpandSectionWrapperDirective, usesInheritance: true, ngImport: i0 });
847
826
  }
848
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormExpandableSectionWrapperDirective, decorators: [{
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormExpandSectionWrapperDirective, decorators: [{
849
828
  type: Directive
850
829
  }] });
851
830
 
852
831
  /**
853
832
  * Section that is expandable by a button until a value is set, or the button is pressed.
854
833
  */
855
- class DbxFormExpandWrapperComponent extends AbstractFormExpandableSectionWrapperDirective {
834
+ class DbxFormExpandWrapperComponent extends AbstractFormExpandSectionWrapperDirective {
856
835
  get buttonType() {
857
- return this.expandableSection.buttonType ?? 'button';
836
+ return this.expandSection.buttonType ?? 'button';
858
837
  }
859
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExpandWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
860
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormExpandWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
838
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExpandWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
839
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormExpandWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
861
840
  <ng-container [ngSwitch]="show$ | async">
862
841
  <ng-container *ngSwitchCase="true">
863
842
  <ng-container #fieldComponent></ng-container>
@@ -866,7 +845,7 @@ class DbxFormExpandWrapperComponent extends AbstractFormExpandableSectionWrapper
866
845
  <span class="dbx-form-expand-wrapper-button" (click)="open()">{{ expandLabel }}</span>
867
846
  </ng-container>
868
847
  </ng-container>
869
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
848
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
870
849
  }
871
850
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExpandWrapperComponent, decorators: [{
872
851
  type: Component,
@@ -896,10 +875,10 @@ class AutoTouchFieldWrapperComponent extends FieldWrapper {
896
875
  }
897
876
  });
898
877
  }
899
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutoTouchFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
900
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutoTouchFieldWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
878
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutoTouchFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
879
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutoTouchFieldWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
901
880
  <ng-container #fieldComponent></ng-container>
902
- `, isInline: true }); }
881
+ `, isInline: true });
903
882
  }
904
883
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutoTouchFieldWrapperComponent, decorators: [{
905
884
  type: Component,
@@ -911,27 +890,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
911
890
  }] });
912
891
 
913
892
  /**
914
- * Section that is expandable by a button until a value is set, or the button is pressed.
893
+ * Section that can be expanded by a button until a value is set, or the button is pressed.
915
894
  */
916
- class DbxFormToggleWrapperComponent extends AbstractFormExpandableSectionWrapperDirective {
917
- constructor() {
918
- super(...arguments);
919
- this.slideLabel$ = this._toggleOpen.pipe(switchMap((x) => {
920
- if (this.expandableSection?.toggleLabelObs) {
921
- return this.expandableSection?.toggleLabelObs(x);
922
- }
923
- else {
924
- return of(this.expandLabel);
925
- }
926
- }), shareReplay(1));
927
- }
895
+ class DbxFormToggleWrapperComponent extends AbstractFormExpandSectionWrapperDirective {
896
+ slideLabel$ = this._toggleOpen.pipe(switchMap((x) => {
897
+ if (this.expandSection?.toggleLabelObs) {
898
+ return this.expandSection?.toggleLabelObs(x);
899
+ }
900
+ else {
901
+ return of(this.expandLabel);
902
+ }
903
+ }), shareReplay(1));
928
904
  onToggleChange() {
929
905
  this.show$.pipe(first()).subscribe((show) => {
930
906
  this._toggleOpen.next(!show);
931
907
  });
932
908
  }
933
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormToggleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
934
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormToggleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
909
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormToggleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
910
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormToggleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
935
911
  <div class="dbx-form-toggle-wrapper" [ngSwitch]="show$ | async">
936
912
  <div class="dbx-form-toggle-wrapper-toggle">
937
913
  <mat-slide-toggle [checked]="show$ | async" (toggleChange)="onToggleChange()">{{ slideLabel$ | async }}</mat-slide-toggle>
@@ -940,7 +916,7 @@ class DbxFormToggleWrapperComponent extends AbstractFormExpandableSectionWrapper
940
916
  <ng-container #fieldComponent></ng-container>
941
917
  </ng-container>
942
918
  </div>
943
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
919
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
944
920
  }
945
921
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormToggleWrapperComponent, decorators: [{
946
922
  type: Component,
@@ -959,13 +935,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
959
935
  }] });
960
936
 
961
937
  class DbxFormStyleWrapperComponent extends FieldWrapper {
962
- constructor() {
963
- super(...arguments);
964
- this._style = new BehaviorSubject(undefined);
965
- this._class = new BehaviorSubject(undefined);
966
- this.style$ = this._style.pipe(switchMapMaybeDefault({}), shareReplay(1));
967
- this.class$ = this._class.pipe(switchMapMaybeDefault(''), shareReplay(1));
968
- }
938
+ _style = new BehaviorSubject(undefined);
939
+ _class = new BehaviorSubject(undefined);
940
+ style$ = this._style.pipe(switchMapMaybeDefault({}), shareReplay(1));
941
+ class$ = this._class.pipe(switchMapMaybeDefault(''), shareReplay(1));
969
942
  get styleGetter() {
970
943
  return this.props.styleGetter;
971
944
  }
@@ -984,12 +957,12 @@ class DbxFormStyleWrapperComponent extends FieldWrapper {
984
957
  this._style.complete();
985
958
  this._class.complete();
986
959
  }
987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormStyleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
988
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormStyleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
960
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormStyleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
961
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormStyleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
989
962
  <div class="dbx-form-style-wrapper" [ngClass]="(class$ | async) ?? ''" [ngStyle]="(style$ | async) ?? {}">
990
963
  <ng-container #fieldComponent></ng-container>
991
964
  </div>
992
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$3.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: "directive", type: i2$3.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
965
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.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: "directive", type: i2$2.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
993
966
  }
994
967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormStyleWrapperComponent, decorators: [{
995
968
  type: Component,
@@ -1008,11 +981,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1008
981
  * By default shows loading during asynchronous validation of a field (FormControl status is "PENDING")
1009
982
  */
1010
983
  class DbxFormWorkingWrapperComponent extends FieldWrapper {
1011
- constructor() {
1012
- super(...arguments);
1013
- this.sub = new SubscriptionObject();
1014
- this.workingContext = new SimpleLoadingContext(false);
1015
- }
984
+ sub = new SubscriptionObject();
985
+ workingContext = new SimpleLoadingContext(false);
1016
986
  ngOnInit() {
1017
987
  this.sub.subscription = this.formControl?.statusChanges.subscribe({
1018
988
  next: (x) => this.workingContext.setLoading(x === 'PENDING')
@@ -1022,13 +992,13 @@ class DbxFormWorkingWrapperComponent extends FieldWrapper {
1022
992
  this.workingContext.destroy();
1023
993
  this.sub.destroy();
1024
994
  }
1025
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormWorkingWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1026
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormWorkingWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
995
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormWorkingWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
996
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormWorkingWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1027
997
  <div class="dbx-form-working-wrapper">
1028
998
  <ng-container #fieldComponent></ng-container>
1029
999
  <dbx-loading [linear]="true" [context]="workingContext"></dbx-loading>
1030
1000
  </div>
1031
- `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }] }); }
1001
+ `, isInline: true, dependencies: [{ kind: "component", type: i5.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }] });
1032
1002
  }
1033
1003
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormWorkingWrapperComponent, decorators: [{
1034
1004
  type: Component,
@@ -1043,7 +1013,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1043
1013
  }] });
1044
1014
 
1045
1015
  const AUTO_TOUCH_WRAPPER_KEY = 'autotouch';
1046
- const EXPANDABLE_WRAPPER_KEY = 'expandable';
1047
1016
  const TOGGLE_WRAPPER_KEY = 'toggle';
1048
1017
  const SECTION_WRAPPER_KEY = 'section';
1049
1018
  const SUBSECTION_WRAPPER_KEY = 'subsection';
@@ -1051,10 +1020,11 @@ const INFO_WRAPPER_KEY = 'info';
1051
1020
  const FLEX_WRAPPER_KEY = 'flex';
1052
1021
  const STYLE_WRAPPER_KEY = 'style';
1053
1022
  const WORKING_WRAPPER_KEY = 'working';
1023
+ const EXPAND_WRAPPER_KEY = 'expand';
1054
1024
 
1055
1025
  class DbxFormFormlyWrapperModule {
1056
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1057
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, declarations: [AutoTouchFieldWrapperComponent, DbxFormSectionWrapperComponent, DbxFormSubsectionWrapperComponent, DbxFormInfoWrapperComponent, DbxFormExpandWrapperComponent, DbxFormToggleWrapperComponent, DbxFormFlexWrapperComponent, DbxFormStyleWrapperComponent, DbxFormWorkingWrapperComponent], imports: [CommonModule,
1026
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1027
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, declarations: [AutoTouchFieldWrapperComponent, DbxFormSectionWrapperComponent, DbxFormSubsectionWrapperComponent, DbxFormInfoWrapperComponent, DbxFormExpandWrapperComponent, DbxFormToggleWrapperComponent, DbxFormFlexWrapperComponent, DbxFormStyleWrapperComponent, DbxFormWorkingWrapperComponent], imports: [CommonModule,
1058
1028
  DbxTextModule,
1059
1029
  DbxLoadingModule,
1060
1030
  DbxFlexLayoutModule,
@@ -1062,8 +1032,8 @@ class DbxFormFormlyWrapperModule {
1062
1032
  MatButtonModule,
1063
1033
  MatSlideToggleModule,
1064
1034
  MatIconModule,
1065
- FlexLayoutModule, i1$1.FormlyModule] }); }
1066
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, imports: [CommonModule,
1035
+ FlexLayoutModule, i1$1.FormlyModule] });
1036
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, imports: [CommonModule,
1067
1037
  DbxTextModule,
1068
1038
  DbxLoadingModule,
1069
1039
  DbxFlexLayoutModule,
@@ -1075,7 +1045,7 @@ class DbxFormFormlyWrapperModule {
1075
1045
  FormlyModule.forChild({
1076
1046
  wrappers: [
1077
1047
  { name: AUTO_TOUCH_WRAPPER_KEY, component: AutoTouchFieldWrapperComponent },
1078
- { name: EXPANDABLE_WRAPPER_KEY, component: DbxFormExpandWrapperComponent },
1048
+ { name: EXPAND_WRAPPER_KEY, component: DbxFormExpandWrapperComponent },
1079
1049
  { name: TOGGLE_WRAPPER_KEY, component: DbxFormToggleWrapperComponent },
1080
1050
  { name: SECTION_WRAPPER_KEY, component: DbxFormSectionWrapperComponent },
1081
1051
  { name: SUBSECTION_WRAPPER_KEY, component: DbxFormSubsectionWrapperComponent },
@@ -1084,7 +1054,7 @@ class DbxFormFormlyWrapperModule {
1084
1054
  { name: STYLE_WRAPPER_KEY, component: DbxFormStyleWrapperComponent },
1085
1055
  { name: WORKING_WRAPPER_KEY, component: DbxFormWorkingWrapperComponent }
1086
1056
  ]
1087
- })] }); }
1057
+ })] });
1088
1058
  }
1089
1059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyWrapperModule, decorators: [{
1090
1060
  type: NgModule,
@@ -1102,7 +1072,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1102
1072
  FormlyModule.forChild({
1103
1073
  wrappers: [
1104
1074
  { name: AUTO_TOUCH_WRAPPER_KEY, component: AutoTouchFieldWrapperComponent },
1105
- { name: EXPANDABLE_WRAPPER_KEY, component: DbxFormExpandWrapperComponent },
1075
+ { name: EXPAND_WRAPPER_KEY, component: DbxFormExpandWrapperComponent },
1106
1076
  { name: TOGGLE_WRAPPER_KEY, component: DbxFormToggleWrapperComponent },
1107
1077
  { name: SECTION_WRAPPER_KEY, component: DbxFormSectionWrapperComponent },
1108
1078
  { name: SUBSECTION_WRAPPER_KEY, component: DbxFormSubsectionWrapperComponent },
@@ -1119,8 +1089,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1119
1089
  }] });
1120
1090
 
1121
1091
  class DbxFormFormlyChecklistItemFieldModule {
1122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1123
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, declarations: [DbxChecklistItemFieldComponent, DbxChecklistItemContentComponent, DbxDefaultChecklistItemFieldDisplayComponent], imports: [CommonModule,
1092
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1093
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, declarations: [DbxChecklistItemFieldComponent, DbxChecklistItemContentComponent, DbxDefaultChecklistItemFieldDisplayComponent], imports: [CommonModule,
1124
1094
  DbxTextModule,
1125
1095
  FormsModule,
1126
1096
  ReactiveFormsModule,
@@ -1130,8 +1100,8 @@ class DbxFormFormlyChecklistItemFieldModule {
1130
1100
  MatIconModule,
1131
1101
  DbxRouterAnchorModule,
1132
1102
  DbxInjectionComponentModule,
1133
- DbxFormFormlyWrapperModule, i1$1.FormlyModule], exports: [DbxFormFormlyWrapperModule] }); }
1134
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, imports: [CommonModule,
1103
+ DbxFormFormlyWrapperModule, i1$1.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
1104
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, imports: [CommonModule,
1135
1105
  DbxTextModule,
1136
1106
  FormsModule,
1137
1107
  ReactiveFormsModule,
@@ -1144,7 +1114,7 @@ class DbxFormFormlyChecklistItemFieldModule {
1144
1114
  DbxFormFormlyWrapperModule,
1145
1115
  FormlyModule.forChild({
1146
1116
  types: [{ name: 'checklistitem', component: DbxChecklistItemFieldComponent }]
1147
- }), DbxFormFormlyWrapperModule] }); }
1117
+ }), DbxFormFormlyWrapperModule] });
1148
1118
  }
1149
1119
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, decorators: [{
1150
1120
  type: NgModule,
@@ -1283,10 +1253,10 @@ function checklistItemField(config) {
1283
1253
  * Used for building a set of configurations for a data-type object that has as second object that is used as a checklist.
1284
1254
  */
1285
1255
  class ChecklistItemFieldDataSetBuilder {
1256
+ _fields = new Map();
1257
+ dataObs$;
1286
1258
  constructor(dataObs) {
1287
- this.dataObs = dataObs;
1288
- this._fields = new Map();
1289
- this.dataObs$ = this.dataObs;
1259
+ this.dataObs$ = dataObs;
1290
1260
  }
1291
1261
  /**
1292
1262
  * Merges the input config with existing configuration.
@@ -1382,10 +1352,10 @@ class DbxFormComponentFieldComponent extends FieldType {
1382
1352
  get config() {
1383
1353
  return this.field.componentField;
1384
1354
  }
1385
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormComponentFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1386
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormComponentFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1355
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormComponentFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1356
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormComponentFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1387
1357
  <div class="dbx-form-component" dbx-injection [config]="config"></div>
1388
- `, isInline: true, dependencies: [{ kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] }); }
1358
+ `, isInline: true, dependencies: [{ kind: "component", type: i6.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
1389
1359
  }
1390
1360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormComponentFieldComponent, decorators: [{
1391
1361
  type: Component,
@@ -1397,14 +1367,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1397
1367
  }] });
1398
1368
 
1399
1369
  class DbxFormFormlyComponentFieldModule {
1400
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1401
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, declarations: [DbxFormComponentFieldComponent], imports: [CommonModule,
1402
- DbxInjectionComponentModule, i1$1.FormlyModule], exports: [DbxFormComponentFieldComponent] }); }
1403
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, imports: [CommonModule,
1370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1371
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, declarations: [DbxFormComponentFieldComponent], imports: [CommonModule,
1372
+ DbxInjectionComponentModule, i1$1.FormlyModule], exports: [DbxFormComponentFieldComponent] });
1373
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, imports: [CommonModule,
1404
1374
  DbxInjectionComponentModule,
1405
1375
  FormlyModule.forChild({
1406
1376
  types: [{ name: 'component', component: DbxFormComponentFieldComponent }]
1407
- })] }); }
1377
+ })] });
1408
1378
  }
1409
1379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyComponentFieldModule, decorators: [{
1410
1380
  type: NgModule,
@@ -1446,36 +1416,33 @@ function dbxListField(config) {
1446
1416
  * Used for picking items by identifier from a DbxList component.
1447
1417
  */
1448
1418
  class DbxItemListFieldComponent extends FieldType {
1449
- constructor() {
1450
- super(...arguments);
1451
- this._selectionEventSub = new SubscriptionObject();
1452
- this._loadMoreSub = new SubscriptionObject();
1453
- this._formControlObs = new BehaviorSubject(undefined);
1454
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
1455
- this._formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
1456
- this.values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
1457
- this._listComponentClassObs = new BehaviorSubject(undefined);
1458
- this.listComponentClass$ = this._listComponentClassObs.pipe(switchMapMaybeObs());
1459
- this.config$ = this.listComponentClass$.pipe(map((componentClass) => {
1460
- const loadMore = this.loadMore;
1461
- const config = {
1462
- componentClass,
1463
- init: (listView) => {
1464
- listView.selectionMode = 'select'; // always enable select
1465
- listView.state$ = this.field.props.state$;
1466
- if (loadMore != null) {
1467
- this._loadMoreSub.subscription = listView.loadMore.subscribe(() => loadMore());
1468
- }
1469
- // set subscription
1470
- this._selectionEventSub.subscription = listView.selectionChange.subscribe((x) => this.updateForSelection(x));
1419
+ _selectionEventSub = new SubscriptionObject();
1420
+ _loadMoreSub = new SubscriptionObject();
1421
+ _formControlObs = new BehaviorSubject(undefined);
1422
+ formControl$ = this._formControlObs.pipe(filterMaybe());
1423
+ _formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
1424
+ values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
1425
+ _listComponentClassObs = new BehaviorSubject(undefined);
1426
+ listComponentClass$ = this._listComponentClassObs.pipe(switchMapMaybeObs());
1427
+ config$ = this.listComponentClass$.pipe(map((componentClass) => {
1428
+ const loadMore = this.loadMore;
1429
+ const config = {
1430
+ componentClass,
1431
+ init: (listView) => {
1432
+ listView.selectionMode = 'select'; // always enable select
1433
+ listView.state$ = this.field.props.state$;
1434
+ if (loadMore != null) {
1435
+ this._loadMoreSub.subscription = listView.loadMore.subscribe(() => loadMore());
1471
1436
  }
1472
- };
1473
- return config;
1474
- }));
1475
- this.isSelectedModifierFunction$ = this.values$.pipe(distinctUntilHasDifferentValues(), map((values) => {
1476
- return dbxValueListItemDecisionFunction(isSelectedDecisionFunctionFactory({ readKey: this.readKey })(values));
1477
- }), shareReplay(1));
1478
- }
1437
+ // set subscription
1438
+ this._selectionEventSub.subscription = listView.selectionChange.subscribe((x) => this.updateForSelection(x));
1439
+ }
1440
+ };
1441
+ return config;
1442
+ }));
1443
+ isSelectedModifierFunction$ = this.values$.pipe(distinctUntilHasDifferentValues(), map((values) => {
1444
+ return dbxValueListItemDecisionFunction(isSelectedDecisionFunctionFactory({ readKey: this.readKey })(values));
1445
+ }), shareReplay(1));
1479
1446
  get label() {
1480
1447
  return this.field.props.label;
1481
1448
  }
@@ -1513,17 +1480,17 @@ class DbxItemListFieldComponent extends FieldType {
1513
1480
  this.formControl.markAsTouched();
1514
1481
  }
1515
1482
  }
1516
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxItemListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1517
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxItemListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <dbx-label class=\"dbx-label-padded\" *ngIf=\"label\">{{ label }}</dbx-label>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <dbx-form-description *ngIf=\"description\">{{ description }}</dbx-form-description>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "directive", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: i2$1.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "directive", type: i2$1.DbxListItemIsSelectedModifierDirective, selector: "[dbxListItemIsSelectedModifier]", inputs: ["dbxListItemIsSelectedModifier"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxItemListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1484
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxItemListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <span class=\"dbx-label dbx-label-padded\" *ngIf=\"label\">{{ label }}</span>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <div class=\"dbx-form-description\" *ngIf=\"description\">{{ description }}</div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: i5.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "directive", type: i5.DbxListItemIsSelectedModifierDirective, selector: "[dbxListItemIsSelectedModifier]", inputs: ["dbxListItemIsSelectedModifier"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1518
1485
  }
1519
1486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxItemListFieldComponent, decorators: [{
1520
1487
  type: Component,
1521
- args: [{ template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <dbx-label class=\"dbx-label-padded\" *ngIf=\"label\">{{ label }}</dbx-label>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <dbx-form-description *ngIf=\"description\">{{ description }}</dbx-form-description>\n</div>\n" }]
1488
+ args: [{ template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <span class=\"dbx-label dbx-label-padded\" *ngIf=\"label\">{{ label }}</span>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <div class=\"dbx-form-description\" *ngIf=\"description\">{{ description }}</div>\n</div>\n" }]
1522
1489
  }] });
1523
1490
 
1524
1491
  class DbxFormFormlyDbxListFieldModule {
1525
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1526
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, declarations: [DbxItemListFieldComponent], imports: [CommonModule,
1492
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1493
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, declarations: [DbxItemListFieldComponent], imports: [CommonModule,
1527
1494
  DbxTextModule,
1528
1495
  DbxLoadingModule,
1529
1496
  DbxButtonModule,
@@ -1536,8 +1503,8 @@ class DbxFormFormlyDbxListFieldModule {
1536
1503
  MatAutocompleteModule,
1537
1504
  MatIconModule,
1538
1505
  DbxInjectionComponentModule,
1539
- DbxListLayoutModule, i1$1.FormlyModule], exports: [DbxItemListFieldComponent] }); }
1540
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, imports: [CommonModule,
1506
+ DbxListLayoutModule, i1$1.FormlyModule], exports: [DbxItemListFieldComponent] });
1507
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, imports: [CommonModule,
1541
1508
  DbxTextModule,
1542
1509
  DbxLoadingModule,
1543
1510
  DbxButtonModule,
@@ -1553,7 +1520,7 @@ class DbxFormFormlyDbxListFieldModule {
1553
1520
  DbxListLayoutModule,
1554
1521
  FormlyModule.forChild({
1555
1522
  types: [{ name: 'dbxlistfield', component: DbxItemListFieldComponent }]
1556
- })] }); }
1523
+ })] });
1557
1524
  }
1558
1525
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDbxListFieldModule, decorators: [{
1559
1526
  type: NgModule,
@@ -1586,77 +1553,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1586
1553
  * Used for picking pre-set values using items as the presentation.
1587
1554
  */
1588
1555
  class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
1589
- constructor() {
1590
- super(...arguments);
1591
- this.inputCtrl = new FormControl('');
1592
- this._formControlObs = new BehaviorSubject(undefined);
1593
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
1594
- this._clearDisplayHashMapSub = new SubscriptionObject();
1595
- this._displayHashMap = new BehaviorSubject(new Map());
1596
- this.filterInputValue$ = this.inputCtrl.valueChanges.pipe(startWith(undefined));
1597
- this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay(1));
1598
- this.loadResultsDisplayValuesState$ = this.formControl$.pipe(first(), switchMap(() => this.loadValuesFn().pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)), startWithBeginLoading())), shareReplay(1));
1599
- this._formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
1600
- this.loadResultsDisplayValues$ = this.loadResultsDisplayValuesState$.pipe(map((x) => x?.value ?? []));
1601
- /**
1602
- * Current values in the form control.
1603
- */
1604
- this.values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
1605
- /**
1606
- * Current values with their display value.
1607
- */
1608
- this.displayValuesState$ = combineLatest([this.loadResultsDisplayValues$, this.values$]).pipe(switchMap(([displayValues, currentValues]) => {
1609
- const displayValuesMap = makeValuesGroupMap(displayValues, (x) => this.hashForValue(x.value));
1610
- const valuesNotInDisplayMap = [];
1611
- currentValues.forEach((x) => {
1612
- const key = this.hashForValue(x);
1613
- const displayValue = displayValuesMap.get(key)?.[0];
1614
- if (!displayValue) {
1615
- valuesNotInDisplayMap.push(x);
1616
- }
1617
- });
1618
- if (valuesNotInDisplayMap.length) {
1619
- return this.loadDisplayValuesForValues(valuesNotInDisplayMap).pipe(map((x) => mapLoadingStateResults(x, {
1620
- mapValue: (loadedValues) => {
1621
- loadedValues.forEach((x) => (x.isUnknown = x.isUnknown ?? true)); // Assign unknown flag.
1622
- return [...displayValues, ...loadedValues];
1623
- }
1624
- })));
1625
- }
1626
- else {
1627
- return of(successResult(displayValues));
1628
- }
1629
- }));
1630
- /**
1631
- * Results to be displayed if filtered.
1632
- */
1633
- this.filteredSearchResultsState$ = this.loadResultsDisplayValues$.pipe(switchMap((values) => this.filterInputValueString$.pipe(switchMap((text) => combineLatest([this._filterValues(text, values), this.displayValuesState$]).pipe(map(([values, displayState]) => mapLoadingStateResults(displayState, {
1634
- mapValue: (displayValues) => {
1635
- const valueHashSet = new Set(values.map((x) => this.hashForValue(x)));
1636
- return displayValues.filter((x) => !x.isUnknown && valueHashSet.has(x._hash));
1637
- }
1638
- })), startWithBeginLoading())))), shareReplay(1));
1639
- this.filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map((x) => x?.value), filterMaybe(), shareReplay(1));
1640
- this.items$ = combineLatest([this.filteredSearchResults$, this.values$]).pipe(map(([displayValues, values]) => {
1641
- const selectedHashValuesSet = new Set(values.map((x) => this.hashForValue(x)));
1642
- let items = displayValues.map((x) => ({ itemValue: x, selected: selectedHashValuesSet.has(x._hash) }));
1643
- if (this.sortItems) {
1644
- items = this.sortItems(items);
1556
+ filterMatInput;
1557
+ inputCtrl = new FormControl('');
1558
+ _formControlObs = new BehaviorSubject(undefined);
1559
+ formControl$ = this._formControlObs.pipe(filterMaybe());
1560
+ _clearDisplayHashMapSub = new SubscriptionObject();
1561
+ _displayHashMap = new BehaviorSubject(new Map());
1562
+ filterInputValue$ = this.inputCtrl.valueChanges.pipe(startWith(undefined));
1563
+ filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay(1));
1564
+ loadResultsDisplayValuesState$ = this.formControl$.pipe(first(), switchMap(() => this.loadValuesFn().pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)), startWithBeginLoading())), shareReplay(1));
1565
+ _formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
1566
+ loadResultsDisplayValues$ = this.loadResultsDisplayValuesState$.pipe(map((x) => x?.value ?? []));
1567
+ /**
1568
+ * Current values in the form control.
1569
+ */
1570
+ values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
1571
+ /**
1572
+ * Current values with their display value.
1573
+ */
1574
+ displayValuesState$ = combineLatest([this.loadResultsDisplayValues$, this.values$]).pipe(switchMap(([displayValues, currentValues]) => {
1575
+ const displayValuesMap = makeValuesGroupMap(displayValues, (x) => this.hashForValue(x.value));
1576
+ const valuesNotInDisplayMap = [];
1577
+ currentValues.forEach((x) => {
1578
+ const key = this.hashForValue(x);
1579
+ const displayValue = displayValuesMap.get(key)?.[0];
1580
+ if (!displayValue) {
1581
+ valuesNotInDisplayMap.push(x);
1645
1582
  }
1646
- return items;
1647
- }), shareReplay(1));
1648
- this.itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap(() => this.items$.pipe(first(), map((x) => successResult(x)), startWithBeginLoading(), shareReplay(1))));
1649
- /**
1650
- * Context used for managing the loading of items, or when the current results change.
1651
- */
1652
- this.context = new ListLoadingStateContextInstance({ obs: this.itemsLoadingState$, showLoadingOnNoValue: false });
1653
- this.filterItemsLoadingState$ = this.items$.pipe(map((x) => successResult(x)), startWithBeginLoading(), shareReplay(1));
1654
- /**
1655
- * Context used for searching/filtering.
1656
- */
1657
- this.filterResultsContext = new ListLoadingStateContextInstance({ obs: this.filteredSearchResultsState$, showLoadingOnNoValue: true });
1658
- this.noItemsAvailable$ = this.filterItemsLoadingState$.pipe(isListLoadingStateEmpty(), distinctUntilChanged());
1659
- }
1583
+ });
1584
+ if (valuesNotInDisplayMap.length) {
1585
+ return this.loadDisplayValuesForValues(valuesNotInDisplayMap).pipe(map((x) => mapLoadingStateResults(x, {
1586
+ mapValue: (loadedValues) => {
1587
+ loadedValues.forEach((x) => (x.isUnknown = x.isUnknown ?? true)); // Assign unknown flag.
1588
+ return [...displayValues, ...loadedValues];
1589
+ }
1590
+ })));
1591
+ }
1592
+ else {
1593
+ return of(successResult(displayValues));
1594
+ }
1595
+ }));
1596
+ /**
1597
+ * Results to be displayed if filtered.
1598
+ */
1599
+ filteredSearchResultsState$ = this.loadResultsDisplayValues$.pipe(switchMap((values) => this.filterInputValueString$.pipe(switchMap((text) => combineLatest([this._filterValues(text, values), this.displayValuesState$]).pipe(map(([values, displayState]) => mapLoadingStateResults(displayState, {
1600
+ mapValue: (displayValues) => {
1601
+ const valueHashSet = new Set(values.map((x) => this.hashForValue(x)));
1602
+ return displayValues.filter((x) => !x.isUnknown && valueHashSet.has(x._hash));
1603
+ }
1604
+ })), startWithBeginLoading())))), shareReplay(1));
1605
+ filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map((x) => x?.value), filterMaybe(), shareReplay(1));
1606
+ items$ = combineLatest([this.filteredSearchResults$, this.values$]).pipe(map(([displayValues, values]) => {
1607
+ const selectedHashValuesSet = new Set(values.map((x) => this.hashForValue(x)));
1608
+ let items = displayValues.map((x) => ({ itemValue: x, selected: selectedHashValuesSet.has(x._hash) }));
1609
+ if (this.sortItems) {
1610
+ items = this.sortItems(items);
1611
+ }
1612
+ return items;
1613
+ }), shareReplay(1));
1614
+ itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap(() => this.items$.pipe(first(), map((x) => successResult(x)), startWithBeginLoading(), shareReplay(1))));
1615
+ /**
1616
+ * Context used for managing the loading of items, or when the current results change.
1617
+ */
1618
+ context = new ListLoadingStateContextInstance({ obs: this.itemsLoadingState$, showLoadingOnNoValue: false });
1619
+ filterItemsLoadingState$ = this.items$.pipe(map((x) => successResult(x)), startWithBeginLoading(), shareReplay(1));
1620
+ /**
1621
+ * Context used for searching/filtering.
1622
+ */
1623
+ filterResultsContext = new ListLoadingStateContextInstance({ obs: this.filteredSearchResultsState$, showLoadingOnNoValue: true });
1624
+ noItemsAvailable$ = this.filterItemsLoadingState$.pipe(mapIsListLoadingStateWithEmptyValue(), distinctUntilChanged());
1660
1625
  get readonly() {
1661
1626
  return this.props.readonly;
1662
1627
  }
@@ -1837,8 +1802,8 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
1837
1802
  this.formControl.markAsTouched();
1838
1803
  this.formControl.markAsDirty();
1839
1804
  }
1840
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxPickableItemFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
1841
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxPickableItemFieldDirective, viewQueries: [{ propertyName: "filterMatInput", first: true, predicate: ["filterMatInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 }); }
1805
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxPickableItemFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1806
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxPickableItemFieldDirective, viewQueries: [{ propertyName: "filterMatInput", first: true, predicate: ["filterMatInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
1842
1807
  }
1843
1808
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxPickableItemFieldDirective, decorators: [{
1844
1809
  type: Directive
@@ -1861,8 +1826,8 @@ class DbxPickableChipListFieldComponent extends AbstractDbxPickableItemFieldDire
1861
1826
  }
1862
1827
  }
1863
1828
  }
1864
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableChipListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1865
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableChipListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-pickable-item-field\">\n <dbx-loading [context]=\"context\" [linear]=\"true\">\n <ng-container *ngIf=\"showFilterInput\">\n <ng-container *ngTemplateOutlet=\"filterTemplate\"></ng-container>\n </ng-container>\n <!-- Content -->\n <div class=\"dbx-pickable-item-field-chips\">\n <mat-chip-listbox [multiple]=\"multiSelect\" [required]=\"required\" [selectable]=\"!isReadonlyOrDisabled\" [disabled]=\"readonly\" #chipList>\n <mat-chip-option *ngFor=\"let item of items$ | async\" (click)=\"itemClicked(item)\" [selected]=\"item.selected\" [disabled]=\"isReadonlyOrDisabled || item.disabled\">\n <mat-icon matChipAvatar *ngIf=\"item.itemValue.icon\">{{ item.itemValue.icon }}</mat-icon>\n <span class=\"dbx-chip-label\">{{ item.itemValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"item.itemValue.sublabel\">{{ item.itemValue.sublabel }}</span>\n </mat-chip-option>\n </mat-chip-listbox>\n <dbx-injection [config]=\"footerConfig\"></dbx-injection>\n </div>\n </dbx-loading>\n</div>\n\n<!-- Filter Input -->\n<ng-template #filterTemplate>\n <div class=\"dbx-pickable-item-field-filter\">\n <div class=\"dbx-label\">{{ filterLabel }}</div>\n <input [name]=\"name\" autocomplete=\"{{ autocomplete }}\" #filterMatInput=\"matInput\" matInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n <mat-divider></mat-divider>\n <dbx-loading [linear]=\"true\" [context]=\"filterResultsContext\"></dbx-loading>\n <!-- No items found. -->\n <p *ngIf=\"noItemsAvailable$ | async\" class=\"dbx-label\">No items match this filter.</p>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i6.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i6.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1829
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableChipListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1830
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableChipListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-pickable-item-field\">\n <dbx-loading [context]=\"context\" [linear]=\"true\">\n <ng-container *ngIf=\"showFilterInput\">\n <ng-container *ngTemplateOutlet=\"filterTemplate\"></ng-container>\n </ng-container>\n <!-- Content -->\n <div class=\"dbx-pickable-item-field-chips\">\n <mat-chip-listbox [multiple]=\"multiSelect\" [required]=\"required\" [selectable]=\"!isReadonlyOrDisabled\" [disabled]=\"readonly\" #chipList>\n <mat-chip-option *ngFor=\"let item of items$ | async\" (click)=\"itemClicked(item)\" [selected]=\"item.selected\" [disabled]=\"isReadonlyOrDisabled || item.disabled\">\n <mat-icon matChipAvatar *ngIf=\"item.itemValue.icon\">{{ item.itemValue.icon }}</mat-icon>\n <span class=\"dbx-chip-label\">{{ item.itemValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"item.itemValue.sublabel\">{{ item.itemValue.sublabel }}</span>\n </mat-chip-option>\n </mat-chip-listbox>\n <dbx-injection [config]=\"footerConfig\"></dbx-injection>\n </div>\n </dbx-loading>\n</div>\n\n<!-- Filter Input -->\n<ng-template #filterTemplate>\n <div class=\"dbx-pickable-item-field-filter\">\n <div class=\"dbx-label\">{{ filterLabel }}</div>\n <input [name]=\"name\" autocomplete=\"{{ autocomplete }}\" #filterMatInput=\"matInput\" matInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n <mat-divider></mat-divider>\n <dbx-loading [linear]=\"true\" [context]=\"filterResultsContext\"></dbx-loading>\n <!-- No items found. -->\n <p *ngIf=\"noItemsAvailable$ | async\" class=\"dbx-label\">No items match this filter.</p>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6$2.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i6$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i6$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1866
1831
  }
1867
1832
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableChipListFieldComponent, decorators: [{
1868
1833
  type: Component,
@@ -1878,8 +1843,8 @@ class DbxPickableListFieldComponent extends AbstractDbxPickableItemFieldDirectiv
1878
1843
  const values = items.map((x) => x.itemValue.value);
1879
1844
  this.setValues(values);
1880
1845
  }
1881
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1882
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-pickable-item-field\">\n <dbx-loading [context]=\"context\">\n <ng-container *ngIf=\"showFilterInput\">\n <ng-container *ngTemplateOutlet=\"filterTemplate\"></ng-container>\n </ng-container>\n <!-- Content -->\n <div class=\"dbx-pickable-item-field-list\">\n <div class=\"dbx-pickable-item-field-list-content\">\n <dbx-form-pickable-item-field-item-list [disabled]=\"isReadonlyOrDisabled\" [state$]=\"filterItemsLoadingState$\" (selectionChange)=\"onSelectionChange($event)\"></dbx-form-pickable-item-field-item-list>\n </div>\n <dbx-injection [config]=\"footerConfig\"></dbx-injection>\n </div>\n </dbx-loading>\n</div>\n\n<!-- Filter Input -->\n<ng-template #filterTemplate>\n <div class=\"dbx-pickable-item-field-filter\">\n <div class=\"dbx-label\">{{ filterLabel }}</div>\n <input [name]=\"name\" autocomplete=\"{{ autocomplete }}\" #filterMatInput=\"matInput\" matInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n <mat-divider></mat-divider>\n <dbx-loading [linear]=\"true\" [context]=\"filterResultsContext\"></dbx-loading>\n <!-- No items found. -->\n <p *ngIf=\"noItemsAvailable$ | async\" class=\"dbx-label\">No items match this filter.</p>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(function () { return i2$1.DbxLoadingComponent; }), selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.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: i0.forwardRef(function () { return i3$1.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(function () { return i4$3.MatInput; }), selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i0.forwardRef(function () { return i3$1.FormControlDirective; }), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i0.forwardRef(function () { return i5.MatDivider; }), selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i0.forwardRef(function () { return i2.DbxInjectionComponent; }), selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i0.forwardRef(function () { return DbxPickableListFieldItemListComponent; }), selector: "dbx-form-pickable-item-field-item-list" }, { kind: "pipe", type: i0.forwardRef(function () { return i1.AsyncPipe; }), name: "async" }] }); }
1846
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1847
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-pickable-item-field\">\n <dbx-loading [context]=\"context\">\n <ng-container *ngIf=\"showFilterInput\">\n <ng-container *ngTemplateOutlet=\"filterTemplate\"></ng-container>\n </ng-container>\n <!-- Content -->\n <div class=\"dbx-pickable-item-field-list\">\n <div class=\"dbx-pickable-item-field-list-content\">\n <dbx-form-pickable-item-field-item-list [disabled]=\"isReadonlyOrDisabled\" [state$]=\"filterItemsLoadingState$\" (selectionChange)=\"onSelectionChange($event)\"></dbx-form-pickable-item-field-item-list>\n </div>\n <dbx-injection [config]=\"footerConfig\"></dbx-injection>\n </div>\n </dbx-loading>\n</div>\n\n<!-- Filter Input -->\n<ng-template #filterTemplate>\n <div class=\"dbx-pickable-item-field-filter\">\n <div class=\"dbx-label\">{{ filterLabel }}</div>\n <input [name]=\"name\" autocomplete=\"{{ autocomplete }}\" #filterMatInput=\"matInput\" matInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n <mat-divider></mat-divider>\n <dbx-loading [linear]=\"true\" [context]=\"filterResultsContext\"></dbx-loading>\n <!-- No items found. -->\n <p *ngIf=\"noItemsAvailable$ | async\" class=\"dbx-label\">No items match this filter.</p>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(function () { return i5.DbxLoadingComponent; }), selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.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: i0.forwardRef(function () { return i2.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(function () { return i4$2.MatInput; }), selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.FormControlDirective; }), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i0.forwardRef(function () { return i5$1.MatDivider; }), selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i0.forwardRef(function () { return i6.DbxInjectionComponent; }), selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i0.forwardRef(function () { return DbxPickableListFieldItemListComponent; }), selector: "dbx-form-pickable-item-field-item-list" }, { kind: "pipe", type: i0.forwardRef(function () { return i1.AsyncPipe; }), name: "async" }] });
1883
1848
  }
1884
1849
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldComponent, decorators: [{
1885
1850
  type: Component,
@@ -1892,8 +1857,8 @@ class DbxPickableListFieldItemListComponent extends AbstractDbxSelectionListWrap
1892
1857
  componentClass: DbxPickableListFieldItemListViewComponent
1893
1858
  });
1894
1859
  }
1895
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1896
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListComponent, selector: "dbx-form-pickable-item-field-item-list", usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1860
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListComponent, selector: "dbx-form-pickable-item-field-item-list", usesInheritance: true, ngImport: i0, template: "\n<dbx-list [state$]=\"state$\" [config]=\"config$ | async\" [disabled]=\"disabled\" [selectionMode]=\"selectionMode\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n</dbx-list>\n", isInline: true, dependencies: [{ kind: "component", type: i5.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1897
1862
  }
1898
1863
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListComponent, decorators: [{
1899
1864
  type: Component,
@@ -1906,6 +1871,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1906
1871
  * NOTE: Values input are PickableItemFieldItem<T>, but output values are PickableValueFieldDisplayValue<T>.
1907
1872
  */
1908
1873
  class DbxPickableListFieldItemListViewComponent extends AbstractDbxSelectionListViewDirective {
1874
+ dbxPickableListFieldComponent = inject((DbxPickableListFieldComponent));
1875
+ // TODO: any belongs here for now, but item list typings need to be updated.
1876
+ config = {
1877
+ componentClass: DbxPickableListFieldItemListViewItemComponent
1878
+ };
1909
1879
  get multiple() {
1910
1880
  return !this.dbxPickableListFieldComponent.pickOnlyOne;
1911
1881
  }
@@ -1916,21 +1886,13 @@ class DbxPickableListFieldItemListViewComponent extends AbstractDbxSelectionList
1916
1886
  }
1917
1887
  return selectionMode;
1918
1888
  }
1919
- constructor(dbxPickableListFieldComponent) {
1920
- super();
1921
- this.dbxPickableListFieldComponent = dbxPickableListFieldComponent;
1922
- // TODO: any belongs here for now, but item list typings need to be updated.
1923
- this.config = {
1924
- componentClass: DbxPickableListFieldItemListViewItemComponent
1925
- };
1926
- this.items$ = this.values$.pipe(
1927
- // NOTE: This causes the "value" to be a PickableValueFieldDisplayValue<T>, which means we emit PickableValueFieldDisplayValue<T> to DbxPickableListFieldComponent.
1928
- map((x) => addConfigToValueListItems(this.config, x)), shareReplay(1));
1929
- }
1930
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, deps: [{ token: DbxPickableListFieldComponent }], target: i0.ɵɵFactoryTarget.Component }); }
1931
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListViewComponent, selector: "ng-component", providers: provideDbxListView(DbxPickableListFieldItemListViewComponent), usesInheritance: true, ngImport: i0, template: `
1889
+ items$ = this.values$.pipe(
1890
+ // NOTE: This causes the "value" to be a PickableValueFieldDisplayValue<T>, which means we emit PickableValueFieldDisplayValue<T> to DbxPickableListFieldComponent.
1891
+ map((x) => addConfigToValueListItems(this.config, x)), shareReplay(1));
1892
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1893
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListViewComponent, selector: "ng-component", providers: provideDbxListView(DbxPickableListFieldItemListViewComponent), usesInheritance: true, ngImport: i0, template: `
1932
1894
  <dbx-selection-list-view-content [multiple]="multiple" [selectionMode]="selectionMode" [items]="items$ | async"></dbx-selection-list-view-content>
1933
- `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxSelectionValueListViewContentComponent, selector: "dbx-selection-list-view-content", inputs: ["multiple", "selectionMode"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1895
+ `, isInline: true, dependencies: [{ kind: "component", type: i5.DbxSelectionValueListViewContentComponent, selector: "dbx-selection-list-view-content", inputs: ["multiple", "selectionMode"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1934
1896
  }
1935
1897
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, decorators: [{
1936
1898
  type: Component,
@@ -1940,7 +1902,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1940
1902
  `,
1941
1903
  providers: provideDbxListView(DbxPickableListFieldItemListViewComponent)
1942
1904
  }]
1943
- }], ctorParameters: function () { return [{ type: DbxPickableListFieldComponent }]; } });
1905
+ }] });
1944
1906
  class DbxPickableListFieldItemListViewItemComponent extends AbstractDbxValueListViewItemComponent {
1945
1907
  get label() {
1946
1908
  return this.itemValue.label;
@@ -1951,14 +1913,14 @@ class DbxPickableListFieldItemListViewItemComponent extends AbstractDbxValueList
1951
1913
  get icon() {
1952
1914
  return this.itemValue.icon;
1953
1915
  }
1954
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1955
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1916
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1917
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPickableListFieldItemListViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1956
1918
  <div class="dbx-default-pickable-item-field-list-item dbx-flex-bar">
1957
1919
  <mat-icon class="dbx-icon-spacer" *ngIf="icon">{{ icon }}</mat-icon>
1958
1920
  <span class="dbx-chip-label">{{ label }}</span>
1959
1921
  <span class="dbx-chip-sublabel" *ngIf="sublabel">({{ sublabel }})</span>
1960
1922
  </div>
1961
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
1923
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
1962
1924
  }
1963
1925
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPickableListFieldItemListViewItemComponent, decorators: [{
1964
1926
  type: Component,
@@ -1974,8 +1936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1974
1936
  }] });
1975
1937
 
1976
1938
  class DbxFormFormlyPickableFieldModule {
1977
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1978
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, declarations: [DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent], imports: [CommonModule,
1939
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1940
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, declarations: [DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent], imports: [CommonModule,
1979
1941
  DbxTextModule,
1980
1942
  DbxLoadingModule,
1981
1943
  DbxButtonModule,
@@ -1991,8 +1953,8 @@ class DbxFormFormlyPickableFieldModule {
1991
1953
  MatChipsModule,
1992
1954
  MatIconModule,
1993
1955
  DbxInjectionComponentModule,
1994
- DbxListLayoutModule, i1$1.FormlyModule] }); }
1995
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, imports: [CommonModule,
1956
+ DbxListLayoutModule, i1$1.FormlyModule] });
1957
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, imports: [CommonModule,
1996
1958
  DbxTextModule,
1997
1959
  DbxLoadingModule,
1998
1960
  DbxButtonModule,
@@ -2014,7 +1976,7 @@ class DbxFormFormlyPickableFieldModule {
2014
1976
  { name: 'pickablechipfield', component: DbxPickableChipListFieldComponent, wrappers: ['form-field'] },
2015
1977
  { name: 'pickablelistfield', component: DbxPickableListFieldComponent, wrappers: ['form-field'] }
2016
1978
  ]
2017
- })] }); }
1979
+ })] });
2018
1980
  }
2019
1981
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPickableFieldModule, decorators: [{
2020
1982
  type: NgModule,
@@ -2109,35 +2071,33 @@ function pickableValueFieldValuesConfigForStaticLabeledValues(input) {
2109
2071
 
2110
2072
  const DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN = new InjectionToken('DbxSearchableField');
2111
2073
  class DbxSearchableFieldAutocompleteItemComponent {
2112
- constructor() {
2113
- this._displayValue = new BehaviorSubject(undefined);
2114
- this.displayValue$ = this._displayValue.pipe(filterMaybe(), shareReplay(1));
2115
- this.config$ = this.displayValue$.pipe(map((x) => {
2116
- const config = {
2117
- ...x.display,
2118
- providers: mergeArraysIntoArray([
2119
- {
2120
- provide: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN,
2121
- useValue: x
2122
- }
2123
- ], x.display.providers)
2124
- };
2125
- return config;
2126
- }));
2127
- this.anchor$ = this.displayValue$.pipe(map((x) => x.anchor));
2128
- }
2074
+ _displayValue = new BehaviorSubject(undefined);
2075
+ displayValue$ = this._displayValue.pipe(filterMaybe(), shareReplay(1));
2076
+ config$ = this.displayValue$.pipe(map((x) => {
2077
+ const config = {
2078
+ ...x.display,
2079
+ providers: mergeArraysIntoArray([
2080
+ {
2081
+ provide: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN,
2082
+ useValue: x
2083
+ }
2084
+ ], x.display.providers)
2085
+ };
2086
+ return config;
2087
+ }));
2088
+ anchor$ = this.displayValue$.pipe(map((x) => x.anchor));
2129
2089
  set displayValue(displayValue) {
2130
2090
  this._displayValue.next(displayValue);
2131
2091
  }
2132
2092
  ngOnDestroy() {
2133
2093
  this._displayValue.complete();
2134
2094
  }
2135
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableFieldAutocompleteItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2136
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: { displayValue: "displayValue" }, ngImport: i0, template: `
2095
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableFieldAutocompleteItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2096
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: { displayValue: "displayValue" }, ngImport: i0, template: `
2137
2097
  <dbx-anchor [block]="true" [anchor]="anchor$ | async">
2138
2098
  <dbx-injection [config]="config$ | async"></dbx-injection>
2139
2099
  </dbx-anchor>
2140
- `, isInline: true, dependencies: [{ kind: "component", type: i2$1.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2100
+ `, isInline: true, dependencies: [{ kind: "component", type: i5.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i6.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
2141
2101
  }
2142
2102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableFieldAutocompleteItemComponent, decorators: [{
2143
2103
  type: Component,
@@ -2154,30 +2114,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2154
2114
  }] } });
2155
2115
  // MARK: Default
2156
2116
  class AbstractDbxSearchableFieldDisplayDirective {
2157
- constructor(displayValue) {
2158
- this.displayValue = displayValue;
2159
- }
2160
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableFieldDisplayDirective, deps: [{ token: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN }], target: i0.ɵɵFactoryTarget.Directive }); }
2161
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxSearchableFieldDisplayDirective, ngImport: i0 }); }
2117
+ displayValue = inject(DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN);
2118
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableFieldDisplayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2119
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxSearchableFieldDisplayDirective, ngImport: i0 });
2162
2120
  }
2163
2121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableFieldDisplayDirective, decorators: [{
2164
2122
  type: Directive
2165
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2166
- type: Inject,
2167
- args: [DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN]
2168
- }] }]; } });
2123
+ }] });
2169
2124
  class DbxDefaultSearchableFieldDisplayComponent extends AbstractDbxSearchableFieldDisplayDirective {
2170
2125
  get icon() {
2171
2126
  return this.displayValue.icon;
2172
2127
  }
2173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultSearchableFieldDisplayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDefaultSearchableFieldDisplayComponent, selector: "dbx-default-searchable-field-display", usesInheritance: true, ngImport: i0, template: `
2128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultSearchableFieldDisplayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDefaultSearchableFieldDisplayComponent, selector: "dbx-default-searchable-field-display", usesInheritance: true, ngImport: i0, template: `
2175
2130
  <div class="dbx-default-searchable-field-display dbx-flex-bar">
2176
2131
  <mat-icon class="dbx-icon-spacer" *ngIf="icon">{{ icon }}</mat-icon>
2177
2132
  <span class="dbx-chip-label">{{ displayValue.label }}</span>
2178
2133
  <span class="dbx-chip-sublabel" *ngIf="displayValue.sublabel">({{ displayValue.sublabel }})</span>
2179
2134
  </div>
2180
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
2135
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
2181
2136
  }
2182
2137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDefaultSearchableFieldDisplayComponent, decorators: [{
2183
2138
  type: Component,
@@ -2199,6 +2154,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2199
2154
  * Display values are cached for performance.
2200
2155
  */
2201
2156
  class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
2157
+ cdRef = inject(ChangeDetectorRef);
2158
+ /**
2159
+ * Whether or not to allow syncing to
2160
+ */
2161
+ allowSyncValueToInput = false;
2162
+ /**
2163
+ * Optional override set by the parent class for picking a default display for this directive.
2164
+ */
2165
+ defaultDisplay;
2166
+ textInput;
2167
+ inputCtrl = new FormControl('');
2168
+ _formControlObs = new BehaviorSubject(undefined);
2169
+ formControl$ = this._formControlObs.pipe(filterMaybe());
2170
+ _clearDisplayHashMapSub = new SubscriptionObject();
2171
+ _displayHashMap = new BehaviorSubject(new Map());
2172
+ inputValue$ = this.inputCtrl.valueChanges.pipe(startWith(this.inputCtrl.value), map((x) => x || ''));
2173
+ inputValueString$ = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged());
2174
+ searchResultsState$ = this.inputValueString$.pipe(switchMap((text) => (text || this.searchOnEmptyText ? this.search(text ?? '') : of([])).pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)),
2175
+ // Return begin loading to setup the loading state.
2176
+ startWithBeginLoading())), shareReplay(1));
2177
+ _singleValueSyncSubscription = new SubscriptionObject();
2178
+ searchContext = new LoadingStateContextInstance({ obs: this.searchResultsState$, showLoadingOnNoValue: false });
2179
+ searchResults$ = this.searchResultsState$.pipe(map((x) => x?.value ?? []));
2180
+ _formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
2181
+ values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
2182
+ displayValuesState$ = this.values$.pipe(distinctUntilChanged(), switchMap((values) => this.loadDisplayValuesForValues(values)), shareReplay(1));
2183
+ displayValues$ = this.displayValuesState$.pipe(map((x) => x?.value ?? []));
2202
2184
  get name() {
2203
2185
  return this.field.name ?? camelCase(this.label ?? this.key);
2204
2186
  }
@@ -2311,31 +2293,6 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
2311
2293
  return obs;
2312
2294
  }));
2313
2295
  }
2314
- constructor(cdRef) {
2315
- super();
2316
- this.cdRef = cdRef;
2317
- /**
2318
- * Whether or not to allow syncing to
2319
- */
2320
- this.allowSyncValueToInput = false;
2321
- this.inputCtrl = new FormControl('');
2322
- this._formControlObs = new BehaviorSubject(undefined);
2323
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
2324
- this._clearDisplayHashMapSub = new SubscriptionObject();
2325
- this._displayHashMap = new BehaviorSubject(new Map());
2326
- this.inputValue$ = this.inputCtrl.valueChanges.pipe(startWith(this.inputCtrl.value), map((x) => x || ''));
2327
- this.inputValueString$ = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged());
2328
- this.searchResultsState$ = this.inputValueString$.pipe(switchMap((text) => (text || this.searchOnEmptyText ? this.search(text ?? '') : of([])).pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)),
2329
- // Return begin loading to setup the loading state.
2330
- startWithBeginLoading())), shareReplay(1));
2331
- this._singleValueSyncSubscription = new SubscriptionObject();
2332
- this.searchContext = new LoadingStateContextInstance({ obs: this.searchResultsState$, showLoadingOnNoValue: false });
2333
- this.searchResults$ = this.searchResultsState$.pipe(map((x) => x?.value ?? []));
2334
- this._formControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
2335
- this.values$ = this._formControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
2336
- this.displayValuesState$ = this.values$.pipe(distinctUntilChanged(), switchMap((values) => this.loadDisplayValuesForValues(values)), shareReplay(1));
2337
- this.displayValues$ = this.displayValuesState$.pipe(map((x) => x?.value ?? []));
2338
- }
2339
2296
  ngOnInit() {
2340
2297
  this._formControlObs.next(this.formControl);
2341
2298
  if (this.refreshDisplayValues$ != null) {
@@ -2451,23 +2408,20 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
2451
2408
  this.formControl.markAsDirty();
2452
2409
  this.formControl.markAsTouched();
2453
2410
  }
2454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableValueFieldDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2455
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxSearchableValueFieldDirective, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true }], usesInheritance: true, ngImport: i0 }); }
2411
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableValueFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2412
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractDbxSearchableValueFieldDirective, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true }], usesInheritance: true, ngImport: i0 });
2456
2413
  }
2457
2414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractDbxSearchableValueFieldDirective, decorators: [{
2458
2415
  type: Directive
2459
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { textInput: [{
2416
+ }], propDecorators: { textInput: [{
2460
2417
  type: ViewChild,
2461
2418
  args: ['textInput']
2462
2419
  }] } });
2463
2420
 
2464
2421
  class DbxSearchableChipFieldComponent extends AbstractDbxSearchableValueFieldDirective {
2465
- constructor() {
2466
- super(...arguments);
2467
- this._blur = new Subject();
2468
- this._blurSub = new SubscriptionObject();
2469
- this.separatorKeysCodes = [ENTER, COMMA];
2470
- }
2422
+ _blur = new Subject();
2423
+ _blurSub = new SubscriptionObject();
2424
+ separatorKeysCodes = [ENTER, COMMA];
2471
2425
  selected(event) {
2472
2426
  this.addWithDisplayValue(event.option.value);
2473
2427
  }
@@ -2506,8 +2460,8 @@ class DbxSearchableChipFieldComponent extends AbstractDbxSearchableValueFieldDir
2506
2460
  onBlur() {
2507
2461
  this._blur.next();
2508
2462
  }
2509
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableChipFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2510
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableChipFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-field\">\n <!-- View -->\n <mat-chip-grid [required]=\"required\" [disabled]=\"readonly\" #chipList>\n <mat-chip-row *ngFor=\"let displayValue of displayValues$ | async\" [removable]=\"true\" (removed)=\"removeWithDisplayValue(displayValue)\">\n <mat-icon matChipAvatar *ngIf=\"displayValue.icon\">{{ displayValue.icon }}</mat-icon>\n <span class=\"dbx-chip-label\">{{ displayValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"displayValue.sublabel\">{{ displayValue.sublabel }}</span>\n <mat-icon matChipRemove *ngIf=\"!readonly\">cancel</mat-icon>\n </mat-chip-row>\n <input #textInput [name]=\"name\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\" autocomplete=\"{{ autocomplete }}\" [matAutocompleteDisabled]=\"readonly\" [matChipInputFor]=\"chipList\" (keydown)=\"tabPressedOnInput($event)\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"addChip($event)\" (blur)=\"onBlur()\" />\n </mat-chip-grid>\n <div class=\"searchable-field-form-loading\">\n <dbx-loading [linear]=\"true\" [context]=\"searchContext\"></dbx-loading>\n </div>\n</div>\n\n<!-- Autocomplete -->\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of searchResults$ | async\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\"></dbx-searchable-field-autocomplete-item>\n </mat-option>\n</mat-autocomplete>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i6.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i6.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2463
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableChipFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2464
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableChipFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-field\">\n <!-- View -->\n <mat-chip-grid [required]=\"required\" [disabled]=\"readonly\" #chipList>\n <mat-chip-row *ngFor=\"let displayValue of displayValues$ | async\" [removable]=\"true\" (removed)=\"removeWithDisplayValue(displayValue)\">\n <mat-icon matChipAvatar *ngIf=\"displayValue.icon\">{{ displayValue.icon }}</mat-icon>\n <span class=\"dbx-chip-label\">{{ displayValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"displayValue.sublabel\">{{ displayValue.sublabel }}</span>\n <mat-icon matChipRemove *ngIf=\"!readonly\">cancel</mat-icon>\n </mat-chip-row>\n <input #textInput [name]=\"name\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\" autocomplete=\"{{ autocomplete }}\" [matAutocompleteDisabled]=\"readonly\" [matChipInputFor]=\"chipList\" (keydown)=\"tabPressedOnInput($event)\" [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"addChip($event)\" (blur)=\"onBlur()\" />\n </mat-chip-grid>\n <div class=\"searchable-field-form-loading\">\n <dbx-loading [linear]=\"true\" [context]=\"searchContext\"></dbx-loading>\n </div>\n</div>\n\n<!-- Autocomplete -->\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of searchResults$ | async\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\"></dbx-searchable-field-autocomplete-item>\n </mat-option>\n</mat-autocomplete>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i6$2.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i6$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
2511
2465
  }
2512
2466
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableChipFieldComponent, decorators: [{
2513
2467
  type: Component,
@@ -2584,14 +2538,10 @@ function searchableTextField(config) {
2584
2538
  * Display component for selecting a single item/value.
2585
2539
  */
2586
2540
  class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDirective {
2587
- constructor() {
2588
- super(...arguments);
2589
- this.allowSyncValueToInput = true;
2590
- this.selectedDisplayValue$ = this.displayValues$.pipe(map((x) => x[0]), shareReplay(1), tapDetectChanges(this.cdRef));
2591
- this.hasValue$ = this.selectedDisplayValue$.pipe(map((x) => Boolean(x)));
2592
- this.showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map((x) => this.showSelectedValue && Boolean(x)), distinctUntilChanged(), shareReplay(1), tapDetectChanges(this.cdRef));
2593
- this._clearInputSub = new SubscriptionObject();
2594
- }
2541
+ allowSyncValueToInput = true;
2542
+ selectedDisplayValue$ = this.displayValues$.pipe(map((x) => x[0]), shareReplay(1), tapDetectChanges(this.cdRef));
2543
+ hasValue$ = this.selectedDisplayValue$.pipe(map((x) => Boolean(x)));
2544
+ showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map((x) => this.showSelectedValue && Boolean(x)), distinctUntilChanged(), shareReplay(1), tapDetectChanges(this.cdRef));
2595
2545
  get searchableField() {
2596
2546
  return this.props;
2597
2547
  }
@@ -2601,6 +2551,7 @@ class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDir
2601
2551
  get multiSelect() {
2602
2552
  return false;
2603
2553
  }
2554
+ _clearInputSub = new SubscriptionObject();
2604
2555
  ngOnInit() {
2605
2556
  super.ngOnInit();
2606
2557
  this._clearInputSub.subscription = this.inputValue$.pipe(skipWhile((x) => !x)).subscribe((x) => {
@@ -2616,8 +2567,8 @@ class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDir
2616
2567
  selected(event) {
2617
2568
  this.addWithDisplayValue(event.option.value);
2618
2569
  }
2619
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableTextFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2620
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableTextFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-text-field\" [ngClass]=\"{ 'dbx-searchable-text-field-has-value': (hasValue$ | async), 'dbx-searchable-text-field-show-value': showSelectedValue }\">\n <!-- Result View -->\n <div class=\"dbx-searchable-text-field-value mat-option mat-option-text\" *ngIf=\"showSelectedDisplayValue$ | async\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"(selectedDisplayValue$ | async)!\"></dbx-searchable-field-autocomplete-item>\n </div>\n <div class=\"dbx-searchable-text-field-input\">\n <div *ngIf=\"searchLabel\" class=\"dbx-label\">{{ searchLabel }}</div>\n <!-- View -->\n <input type=\"search\" [name]=\"name\" matInput #textInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\" [matAutocompleteDisabled]=\"readonly\" autocomplete=\"{{ autocomplete }}\" />\n <div class=\"searchable-field-form-loading\">\n <dbx-loading [linear]=\"true\" [context]=\"searchContext\"></dbx-loading>\n </div>\n </div>\n</div>\n\n<!-- Autocomplete -->\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of searchResults$ | async\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\"></dbx-searchable-field-autocomplete-item>\n </mat-option>\n <!-- Add/Pick String Value -->\n <mat-option *ngIf=\"allowStringValues && (inputValue$ | async)\" [value]=\"{ value: (inputValue$ | async) }\">\n <p class=\"dbx-clear-hint text-center\">\"{{ inputValue$ | async }}\"</p>\n </mat-option>\n <!-- Show clear value -->\n <mat-option *ngIf=\"showClearValue && (hasValue$ | async)\" value=\"\">\n <p class=\"dbx-clear-hint text-center\">Clear</p>\n </mat-option>\n</mat-autocomplete>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2570
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableTextFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2571
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxSearchableTextFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-text-field\" [ngClass]=\"{ 'dbx-searchable-text-field-has-value': (hasValue$ | async), 'dbx-searchable-text-field-show-value': showSelectedValue }\">\n <!-- Result View -->\n <div class=\"dbx-searchable-text-field-value mat-option mat-option-text\" *ngIf=\"showSelectedDisplayValue$ | async\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"(selectedDisplayValue$ | async)!\"></dbx-searchable-field-autocomplete-item>\n </div>\n <div class=\"dbx-searchable-text-field-input\">\n <div *ngIf=\"searchLabel\" class=\"dbx-label\">{{ searchLabel }}</div>\n <!-- View -->\n <input type=\"search\" [name]=\"name\" matInput #textInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\" [matAutocompleteDisabled]=\"readonly\" autocomplete=\"{{ autocomplete }}\" />\n <div class=\"searchable-field-form-loading\">\n <dbx-loading [linear]=\"true\" [context]=\"searchContext\"></dbx-loading>\n </div>\n </div>\n</div>\n\n<!-- Autocomplete -->\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of searchResults$ | async\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\"></dbx-searchable-field-autocomplete-item>\n </mat-option>\n <!-- Add/Pick String Value -->\n <mat-option *ngIf=\"allowStringValues && (inputValue$ | async)\" [value]=\"{ value: (inputValue$ | async) }\">\n <p class=\"dbx-clear-hint text-center\">\"{{ inputValue$ | async }}\"</p>\n </mat-option>\n <!-- Show clear value -->\n <mat-option *ngIf=\"showClearValue && (hasValue$ | async)\" value=\"\">\n <p class=\"dbx-clear-hint text-center\">Clear</p>\n </mat-option>\n</mat-autocomplete>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
2621
2572
  }
2622
2573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxSearchableTextFieldComponent, decorators: [{
2623
2574
  type: Component,
@@ -2625,8 +2576,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2625
2576
  }] });
2626
2577
 
2627
2578
  class DbxFormFormlySearchableFieldModule {
2628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2629
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, declarations: [DbxSearchableChipFieldComponent, DbxSearchableTextFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxDefaultSearchableFieldDisplayComponent], imports: [CommonModule,
2579
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2580
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, declarations: [DbxSearchableChipFieldComponent, DbxSearchableTextFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxDefaultSearchableFieldDisplayComponent], imports: [CommonModule,
2630
2581
  DbxTextModule,
2631
2582
  DbxLoadingModule,
2632
2583
  DbxButtonModule,
@@ -2641,8 +2592,8 @@ class DbxFormFormlySearchableFieldModule {
2641
2592
  DbxRouterAnchorModule,
2642
2593
  MatChipsModule,
2643
2594
  MatIconModule,
2644
- DbxInjectionComponentModule, i1$1.FormlyModule], exports: [DbxSearchableChipFieldComponent, DbxSearchableTextFieldComponent] }); }
2645
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, imports: [CommonModule,
2595
+ DbxInjectionComponentModule, i1$1.FormlyModule], exports: [DbxSearchableChipFieldComponent, DbxSearchableTextFieldComponent] });
2596
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, imports: [CommonModule,
2646
2597
  DbxTextModule,
2647
2598
  DbxLoadingModule,
2648
2599
  DbxButtonModule,
@@ -2663,7 +2614,7 @@ class DbxFormFormlySearchableFieldModule {
2663
2614
  { name: 'searchablechipfield', component: DbxSearchableChipFieldComponent, wrappers: ['form-field'] },
2664
2615
  { name: 'searchabletextfield', component: DbxSearchableTextFieldComponent, wrappers: ['form-field'] }
2665
2616
  ]
2666
- })] }); }
2617
+ })] });
2667
2618
  }
2668
2619
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySearchableFieldModule, decorators: [{
2669
2620
  type: NgModule,
@@ -2714,158 +2665,136 @@ function chipTextField(config) {
2714
2665
  * Component that displays a select view (multi or not)
2715
2666
  */
2716
2667
  class DbxFormSourceSelectFieldComponent extends FieldType$2 {
2717
- constructor() {
2718
- super(...arguments);
2719
- this._cacheMetaSub = new SubscriptionObject();
2720
- this._clearDisplayHashMapSub = new SubscriptionObject();
2721
- this._valueMetaHashMap = new BehaviorSubject(new Map());
2722
- this._displayHashMap = new BehaviorSubject(new Map());
2723
- this._formControlObs = new BehaviorSubject(undefined);
2724
- this._fromOpenSource = new BehaviorSubject({ values: [], valuesSet: new Set() });
2725
- this._loadSources = new BehaviorSubject(undefined);
2726
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
2727
- this.currentFormControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
2728
- this.values$ = this.currentFormControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
2729
- this.allValuesEverSelected$ = this.values$.pipe(scan((acc, values) => {
2730
- let result = acc;
2731
- if (!setContainsAllValues(acc, values)) {
2732
- result = addToSetCopy(acc, values);
2668
+ _cacheMetaSub = new SubscriptionObject();
2669
+ _clearDisplayHashMapSub = new SubscriptionObject();
2670
+ _valueMetaHashMap = new BehaviorSubject(new Map());
2671
+ _displayHashMap = new BehaviorSubject(new Map());
2672
+ _formControlObs = new BehaviorSubject(undefined);
2673
+ _fromOpenSource = new BehaviorSubject({ values: [], valuesSet: new Set() });
2674
+ _loadSources = new BehaviorSubject(undefined);
2675
+ buttonElement;
2676
+ formControl$ = this._formControlObs.pipe(filterMaybe());
2677
+ currentFormControlValue$ = this.formControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), shareReplay(1));
2678
+ values$ = this.currentFormControlValue$.pipe(map(convertMaybeToArray), shareReplay(1));
2679
+ allValuesEverSelected$ = this.values$.pipe(scan((acc, values) => {
2680
+ let result = acc;
2681
+ if (!setContainsAllValues(acc, values)) {
2682
+ result = addToSetCopy(acc, values);
2683
+ }
2684
+ return result;
2685
+ }, new Set()), distinctUntilChanged(), map((x) => Array.from(x)), shareReplay(1));
2686
+ sourceSelectValuesFromValuesState$ = this.allValuesEverSelected$.pipe(distinctUntilChanged(), switchMap((values) => this.loadSourceSelectValueForValues(values)), shareReplay(1));
2687
+ loadSources$ = this._loadSources.pipe(filterMaybe(), switchMap((loadSource) => {
2688
+ const { valueReader } = this;
2689
+ return loadSource.pipe(switchMap((sources) => {
2690
+ const sourceObs = sources.map((x) => x.meta.pipe(map((metaState) => ({ ...metaState, label: x.label }))));
2691
+ if (sourceObs.length === 0) {
2692
+ return of(successResult([]));
2733
2693
  }
2734
- return result;
2735
- }, new Set()), distinctUntilChanged(), map((x) => Array.from(x)), shareReplay(1));
2736
- this.sourceSelectValuesFromValuesState$ = this.allValuesEverSelected$.pipe(distinctUntilChanged(), switchMap((values) => this.loadSourceSelectValueForValues(values)), shareReplay(1));
2737
- this.loadSources$ = this._loadSources.pipe(filterMaybe(), switchMap((loadSource) => {
2738
- const { valueReader } = this;
2739
- return loadSource.pipe(switchMap((sources) => {
2740
- const sourceObs = sources.map((x) => x.meta.pipe(map((metaState) => ({ ...metaState, label: x.label }))));
2741
- if (sourceObs.length === 0) {
2742
- return of(successResult([]));
2743
- }
2744
- else {
2745
- return combineLatest(sourceObs).pipe(map((x) => {
2746
- const statesWithValues = x.filter((y) => loadingStateHasValue(y));
2747
- const loading = x.findIndex(loadingStateIsLoading) !== -1;
2748
- const value = statesWithValues.map((y) => {
2749
- const group = {
2750
- label: y.label,
2751
- values: y.value.map((meta) => ({ meta, value: valueReader(meta) }))
2752
- };
2753
- return group;
2754
- });
2755
- return {
2756
- loading,
2757
- value
2694
+ else {
2695
+ return combineLatest(sourceObs).pipe(map((x) => {
2696
+ const statesWithValues = x.filter((y) => isLoadingStateWithDefinedValue(y));
2697
+ const loading = x.findIndex(isLoadingStateLoading) !== -1;
2698
+ const value = statesWithValues.map((y) => {
2699
+ const group = {
2700
+ label: y.label,
2701
+ values: y.value.map((meta) => ({ meta, value: valueReader(meta) }))
2758
2702
  };
2759
- }));
2760
- }
2761
- }));
2703
+ return group;
2704
+ });
2705
+ return {
2706
+ loading,
2707
+ value
2708
+ };
2709
+ }));
2710
+ }
2762
2711
  }));
2763
- this.fromOpenSource$ = this._fromOpenSource.pipe(distinctUntilChanged((a, b) => setsAreEquivalent(a.valuesSet, b.valuesSet)), map((x) => {
2764
- const group = {
2712
+ }));
2713
+ fromOpenSource$ = this._fromOpenSource.pipe(distinctUntilChanged((a, b) => setsAreEquivalent(a.valuesSet, b.valuesSet)), map((x) => {
2714
+ const group = {
2715
+ label: '',
2716
+ values: x.values
2717
+ };
2718
+ return group;
2719
+ }), shareReplay(1));
2720
+ valueGroupsFromSourcesState$ = combineLatest([this.fromOpenSource$, this.loadSources$]).pipe(map(([fromOpenSourceGroup, loadSources]) => {
2721
+ const loadSourcesValue = loadSources.value ?? [];
2722
+ const value = [fromOpenSourceGroup, ...loadSourcesValue];
2723
+ const result = {
2724
+ loading: loadSources.loading,
2725
+ value
2726
+ };
2727
+ return result;
2728
+ }), shareReplay(1));
2729
+ allValueGroupsState$ = this.sourceSelectValuesFromValuesState$.pipe(switchMap((sourceSelectValuesFromValues) => {
2730
+ if (isLoadingStateWithDefinedValue(sourceSelectValuesFromValues)) {
2731
+ const valuesFromValuesGroup = {
2765
2732
  label: '',
2766
- values: x.values
2733
+ values: sourceSelectValuesFromValues.value
2767
2734
  };
2768
- return group;
2769
- }), shareReplay(1));
2770
- this.valueGroupsFromSourcesState$ = combineLatest([this.fromOpenSource$, this.loadSources$]).pipe(map(([fromOpenSourceGroup, loadSources]) => {
2771
- const loadSourcesValue = loadSources.value ?? [];
2772
- const value = [fromOpenSourceGroup, ...loadSourcesValue];
2773
- const result = {
2774
- loading: loadSources.loading,
2775
- value
2776
- };
2777
- return result;
2778
- }), shareReplay(1));
2779
- this.allValueGroupsState$ = this.sourceSelectValuesFromValuesState$.pipe(switchMap((sourceSelectValuesFromValues) => {
2780
- if (loadingStateHasValue(sourceSelectValuesFromValues)) {
2781
- const valuesFromValuesGroup = {
2782
- label: '',
2783
- values: sourceSelectValuesFromValues.value
2735
+ return this.valueGroupsFromSourcesState$.pipe(map((sourcesState) => {
2736
+ const allGroups = [valuesFromValuesGroup, ...sourcesState.value];
2737
+ const result = {
2738
+ loading: sourceSelectValuesFromValues.loading || sourcesState.loading,
2739
+ value: allGroups
2784
2740
  };
2785
- return this.valueGroupsFromSourcesState$.pipe(map((sourcesState) => {
2786
- const allGroups = [valuesFromValuesGroup, ...sourcesState.value];
2787
- const result = {
2788
- loading: sourceSelectValuesFromValues.loading || sourcesState.loading,
2789
- value: allGroups
2790
- };
2791
- return result;
2792
- }));
2793
- }
2794
- else {
2795
- return of(beginLoading({}));
2796
- }
2797
- }), shareReplay(1));
2798
- this.allOptionGroupsState$ = this.allValueGroupsState$.pipe(mapLoadingStateValueWithOperator(switchMap((groups) => {
2799
- const allGroupsReducedByLabel = makeValuesGroupMap(groups, (x) => x.label);
2800
- const valuesEncountered = new Set();
2801
- const allUniqueValues = [];
2802
- const simplifiedValuesGroups = [];
2803
- // sort to put the blank label first
2804
- Array.from(allGroupsReducedByLabel.entries())
2805
- .sort(sortByStringFunction((x) => x[0]))
2806
- .forEach(([label, groups]) => {
2807
- const values = [];
2808
- groups.forEach((group) => {
2809
- group.values.forEach((selectValue) => {
2810
- if (!valuesEncountered.has(selectValue.value)) {
2811
- values.push(selectValue);
2812
- allUniqueValues.push(selectValue);
2813
- valuesEncountered.add(selectValue.value);
2814
- }
2815
- });
2741
+ return result;
2742
+ }));
2743
+ }
2744
+ else {
2745
+ return of(beginLoading({}));
2746
+ }
2747
+ }), shareReplay(1));
2748
+ allOptionGroupsState$ = this.allValueGroupsState$.pipe(mapLoadingStateValueWithOperator(switchMap((groups) => {
2749
+ const allGroupsReducedByLabel = makeValuesGroupMap(groups, (x) => x.label);
2750
+ const valuesEncountered = new Set();
2751
+ const allUniqueValues = [];
2752
+ const simplifiedValuesGroups = [];
2753
+ // sort to put the blank label first
2754
+ Array.from(allGroupsReducedByLabel.entries())
2755
+ .sort(sortByStringFunction((x) => x[0]))
2756
+ .forEach(([label, groups]) => {
2757
+ const values = [];
2758
+ groups.forEach((group) => {
2759
+ group.values.forEach((selectValue) => {
2760
+ if (!valuesEncountered.has(selectValue.value)) {
2761
+ values.push(selectValue);
2762
+ allUniqueValues.push(selectValue);
2763
+ valuesEncountered.add(selectValue.value);
2764
+ }
2816
2765
  });
2817
- if (values.length > 0) {
2818
- simplifiedValuesGroups.push({
2819
- label,
2820
- values
2821
- });
2822
- }
2823
2766
  });
2824
- const obs = this.getDisplayValuesForSelectValues(allUniqueValues).pipe(map((displayValues) => {
2825
- const displayValuesMap = new Map(displayValues.map((x) => [x.value, x]));
2826
- const displayGroups = simplifiedValuesGroups.map((valueGroup) => {
2827
- const values = filterMaybeValues(valueGroup.values.map((x) => displayValuesMap.get(x.value)));
2828
- return {
2829
- label: valueGroup.label,
2830
- values
2831
- };
2767
+ if (values.length > 0) {
2768
+ simplifiedValuesGroups.push({
2769
+ label,
2770
+ values
2832
2771
  });
2833
- return displayGroups;
2834
- }));
2835
- return obs;
2836
- })), shareReplay(1));
2837
- this.allOptionGroups$ = this.allOptionGroupsState$.pipe(valueFromLoadingState(), shareReplay(1));
2838
- this.options$ = this.allOptionGroups$.pipe(map((x) => {
2839
- const { included: groupedValues, excluded: nonGroupedGroup } = separateValues(x, (y) => Boolean(y.label));
2840
- const result = {
2841
- nonGroupedValues: nonGroupedGroup[0]?.values ?? [],
2842
- groupedValues
2843
- };
2844
- return result;
2845
- }), shareReplay(1));
2846
- this.nonGroupedValues$ = this.options$.pipe(map((x) => x.nonGroupedValues));
2847
- this.groupedOptions$ = this.options$.pipe(map((x) => x.groupedValues));
2848
- this.context = loadingStateContext({ obs: this.allOptionGroupsState$ });
2849
- this.handleSelectOptions = (_, context) => {
2850
- const { openSource } = this;
2851
- if (openSource) {
2852
- const origin = this.buttonElement.nativeElement;
2853
- const sourceObs = openSource({ origin });
2854
- context.startWorkingWithObservable(sourceObs.pipe(first(), tap((result) => {
2855
- const valuesToAdd = mergeArrays([result.select, result.options]);
2856
- if (valuesToAdd.length) {
2857
- this.addToOpenSourceMap(valuesToAdd);
2858
- }
2859
- if (result.select) {
2860
- this.addToCurrentValue(result.select.map((x) => this.valueReader(x)));
2861
- }
2862
- })));
2863
- }
2864
- else {
2865
- context.reject();
2866
2772
  }
2773
+ });
2774
+ const obs = this.getDisplayValuesForSelectValues(allUniqueValues).pipe(map((displayValues) => {
2775
+ const displayValuesMap = new Map(displayValues.map((x) => [x.value, x]));
2776
+ const displayGroups = simplifiedValuesGroups.map((valueGroup) => {
2777
+ const values = filterMaybeValues(valueGroup.values.map((x) => displayValuesMap.get(x.value)));
2778
+ return {
2779
+ label: valueGroup.label,
2780
+ values
2781
+ };
2782
+ });
2783
+ return displayGroups;
2784
+ }));
2785
+ return obs;
2786
+ })), shareReplay(1));
2787
+ allOptionGroups$ = this.allOptionGroupsState$.pipe(valueFromLoadingState(), shareReplay(1));
2788
+ options$ = this.allOptionGroups$.pipe(map((x) => {
2789
+ const { included: groupedValues, excluded: nonGroupedGroup } = separateValues(x, (y) => Boolean(y.label));
2790
+ const result = {
2791
+ nonGroupedValues: nonGroupedGroup[0]?.values ?? [],
2792
+ groupedValues
2867
2793
  };
2868
- }
2794
+ return result;
2795
+ }), shareReplay(1));
2796
+ nonGroupedValues$ = this.options$.pipe(map((x) => x.nonGroupedValues));
2797
+ groupedOptions$ = this.options$.pipe(map((x) => x.groupedValues));
2869
2798
  get sourceSelectField() {
2870
2799
  return this.props;
2871
2800
  }
@@ -2958,6 +2887,7 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
2958
2887
  return obs;
2959
2888
  }));
2960
2889
  }
2890
+ context = loadingStateContext({ obs: this.allOptionGroupsState$ });
2961
2891
  ngOnInit() {
2962
2892
  const { loadSources } = this;
2963
2893
  this._loadSources.next(loadSources?.() || of([]));
@@ -2980,6 +2910,25 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
2980
2910
  this._loadSources.complete();
2981
2911
  this.context.destroy();
2982
2912
  }
2913
+ handleSelectOptions = (_, context) => {
2914
+ const { openSource } = this;
2915
+ if (openSource) {
2916
+ const origin = this.buttonElement.nativeElement;
2917
+ const sourceObs = openSource({ origin });
2918
+ context.startWorkingWithObservable(sourceObs.pipe(first(), tap((result) => {
2919
+ const valuesToAdd = mergeArrays([result.select, result.options]);
2920
+ if (valuesToAdd.length) {
2921
+ this.addToOpenSourceMap(valuesToAdd);
2922
+ }
2923
+ if (result.select) {
2924
+ this.addToCurrentValue(result.select.map((x) => this.valueReader(x)));
2925
+ }
2926
+ })));
2927
+ }
2928
+ else {
2929
+ context.reject();
2930
+ }
2931
+ };
2983
2932
  addToOpenSourceMap(input) {
2984
2933
  const { valueReader } = this;
2985
2934
  const { values: meta, valuesSet: initialValues } = this._fromOpenSource.value;
@@ -3007,8 +2956,8 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
3007
2956
  this.formControl.markAsDirty();
3008
2957
  this.formControl.markAsTouched();
3009
2958
  }
3010
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3011
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSourceSelectFieldComponent, selector: "ng-component", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2959
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2960
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSourceSelectFieldComponent, selector: "ng-component", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "padding", "context", "loading", "error"] }, { kind: "directive", type: i6.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i5.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i5.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: i6.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i6.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i6.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
3012
2961
  }
3013
2962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, decorators: [{
3014
2963
  type: Component,
@@ -3032,8 +2981,8 @@ function sourceSelectField(config) {
3032
2981
  }
3033
2982
 
3034
2983
  class DbxFormFormlySourceSelectModule {
3035
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3036
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, declarations: [DbxFormSourceSelectFieldComponent], imports: [CommonModule,
2984
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2985
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, declarations: [DbxFormSourceSelectFieldComponent], imports: [CommonModule,
3037
2986
  FormsModule,
3038
2987
  MatInputModule,
3039
2988
  MatDividerModule,
@@ -3050,8 +2999,8 @@ class DbxFormFormlySourceSelectModule {
3050
2999
  DbxActionModule,
3051
3000
  MatChipsModule,
3052
3001
  MatIconModule,
3053
- FlexLayoutModule, i1$1.FormlyModule], exports: [DbxFormSourceSelectFieldComponent] }); }
3054
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, imports: [CommonModule,
3002
+ FlexLayoutModule, i1$1.FormlyModule], exports: [DbxFormSourceSelectFieldComponent] });
3003
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, imports: [CommonModule,
3055
3004
  FormsModule,
3056
3005
  MatInputModule,
3057
3006
  MatDividerModule,
@@ -3071,7 +3020,7 @@ class DbxFormFormlySourceSelectModule {
3071
3020
  FlexLayoutModule,
3072
3021
  FormlyModule.forChild({
3073
3022
  types: [{ name: 'sourceselectfield', component: DbxFormSourceSelectFieldComponent, wrappers: ['form-field'] }]
3074
- })] }); }
3023
+ })] });
3075
3024
  }
3076
3025
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySourceSelectModule, decorators: [{
3077
3026
  type: NgModule,
@@ -3140,9 +3089,9 @@ function addValueSelectionOptionFunction(label) {
3140
3089
  }
3141
3090
 
3142
3091
  class DbxFormFormlySelectionModule {
3143
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3144
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [CommonModule], exports: [DbxFormFormlyDbxListFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySourceSelectModule] }); }
3145
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [CommonModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySourceSelectModule] }); }
3092
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3093
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [CommonModule], exports: [DbxFormFormlyDbxListFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySourceSelectModule] });
3094
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [CommonModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySourceSelectModule] });
3146
3095
  }
3147
3096
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlySelectionModule, decorators: [{
3148
3097
  type: NgModule,
@@ -3154,14 +3103,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3154
3103
  }] });
3155
3104
 
3156
3105
  class DbxTextEditorFieldComponent extends FieldType$1 {
3157
- constructor(compact) {
3158
- super();
3159
- this.compact = compact;
3160
- this._sub = new SubscriptionObject();
3161
- this.compactClass$ = mapCompactModeObs(this.compact?.mode$, {
3162
- compact: 'dbx-texteditor-field-compact'
3163
- });
3164
- }
3106
+ _compactContextStore = inject(CompactContextStore, { optional: true });
3107
+ _editor;
3108
+ _sub = new SubscriptionObject();
3109
+ compactClass$ = mapCompactModeObs(this._compactContextStore?.mode$, {
3110
+ compact: 'dbx-texteditor-field-compact'
3111
+ });
3165
3112
  get formGroupName() {
3166
3113
  return this.field.key;
3167
3114
  }
@@ -3195,50 +3142,48 @@ class DbxTextEditorFieldComponent extends FieldType$1 {
3195
3142
  }
3196
3143
  this._sub.destroy();
3197
3144
  }
3198
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxTextEditorFieldComponent, deps: [{ token: i2$1.CompactContextStore, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
3199
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxTextEditorFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxTextEditorFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3146
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxTextEditorFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3200
3147
  <div class="dbx-texteditor-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
3201
- <dbx-label *ngIf="label">{{ label }}</dbx-label>
3148
+ <span class="dbx-label" *ngIf="label">{{ label }}</span>
3202
3149
  <div class="dbx-texteditor-field-input">
3203
3150
  <ngx-editor [editor]="editor" outputFormat="html" [placeholder]="placeholder" [formControlName]="formGroupName"></ngx-editor>
3204
3151
  </div>
3205
3152
  <div class="dbx-texteditor-field-menu">
3206
3153
  <ngx-editor-menu [editor]="editor"></ngx-editor-menu>
3207
3154
  </div>
3208
- <dbx-form-description *ngIf="description">{{ description }}</dbx-form-description>
3155
+ <div class="dbx-form-description" *ngIf="description">{{ description }}</div>
3209
3156
  </div>
3210
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "directive", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$5.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i4$5.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
3157
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$1.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i3$1.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
3211
3158
  }
3212
3159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxTextEditorFieldComponent, decorators: [{
3213
3160
  type: Component,
3214
3161
  args: [{
3215
3162
  template: `
3216
3163
  <div class="dbx-texteditor-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
3217
- <dbx-label *ngIf="label">{{ label }}</dbx-label>
3164
+ <span class="dbx-label" *ngIf="label">{{ label }}</span>
3218
3165
  <div class="dbx-texteditor-field-input">
3219
3166
  <ngx-editor [editor]="editor" outputFormat="html" [placeholder]="placeholder" [formControlName]="formGroupName"></ngx-editor>
3220
3167
  </div>
3221
3168
  <div class="dbx-texteditor-field-menu">
3222
3169
  <ngx-editor-menu [editor]="editor"></ngx-editor-menu>
3223
3170
  </div>
3224
- <dbx-form-description *ngIf="description">{{ description }}</dbx-form-description>
3171
+ <div class="dbx-form-description" *ngIf="description">{{ description }}</div>
3225
3172
  </div>
3226
3173
  `
3227
3174
  }]
3228
- }], ctorParameters: function () { return [{ type: i2$1.CompactContextStore, decorators: [{
3229
- type: Optional
3230
- }] }]; } });
3175
+ }] });
3231
3176
 
3232
3177
  class DbxFormFormlyTextEditorFieldModule {
3233
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3234
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, declarations: [DbxTextEditorFieldComponent], imports: [CommonModule,
3178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3179
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, declarations: [DbxTextEditorFieldComponent], imports: [CommonModule,
3235
3180
  DbxTextModule,
3236
3181
  FormsModule,
3237
3182
  ReactiveFormsModule,
3238
3183
  NgxEditorModule,
3239
3184
  MatFormFieldModule,
3240
- MatInputModule, i1$1.FormlyModule] }); }
3241
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, imports: [CommonModule,
3185
+ MatInputModule, i1$1.FormlyModule] });
3186
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, imports: [CommonModule,
3242
3187
  DbxTextModule,
3243
3188
  FormsModule,
3244
3189
  ReactiveFormsModule,
@@ -3247,7 +3192,7 @@ class DbxFormFormlyTextEditorFieldModule {
3247
3192
  MatInputModule,
3248
3193
  FormlyModule.forChild({
3249
3194
  types: [{ name: 'texteditor', component: DbxTextEditorFieldComponent }]
3250
- })] }); }
3195
+ })] });
3251
3196
  }
3252
3197
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, decorators: [{
3253
3198
  type: NgModule,
@@ -3290,27 +3235,21 @@ function textEditorField(config) {
3290
3235
  }
3291
3236
 
3292
3237
  class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
3293
- constructor() {
3294
- super(...arguments);
3295
- this._labelForField = cachedGetter(() => {
3296
- const input = this.repeatArrayField.labelForField;
3297
- if (typeof input === 'function') {
3298
- return input;
3299
- }
3300
- else {
3301
- return makeGetter(input ?? '');
3302
- }
3303
- });
3304
- this._allowRemove = cachedGetter(() => {
3305
- return asDecisionFunction(this.field.props.allowRemove, true);
3306
- });
3307
- this._allowDuplicate = cachedGetter(() => {
3308
- return asDecisionFunction(this.field.props.allowDuplicate || false, false);
3309
- });
3310
- this.trackByFunction = (i, x) => {
3311
- return x.key;
3312
- };
3313
- }
3238
+ _labelForField = cachedGetter(() => {
3239
+ const input = this.repeatArrayField.labelForField;
3240
+ if (typeof input === 'function') {
3241
+ return input;
3242
+ }
3243
+ else {
3244
+ return makeGetter(input ?? '');
3245
+ }
3246
+ });
3247
+ _allowRemove = cachedGetter(() => {
3248
+ return asDecisionFunction(this.field.props.allowRemove, true);
3249
+ });
3250
+ _allowDuplicate = cachedGetter(() => {
3251
+ return asDecisionFunction(this.field.props.allowDuplicate || false, false);
3252
+ });
3314
3253
  get repeatArrayField() {
3315
3254
  return this.field.props;
3316
3255
  }
@@ -3375,6 +3314,9 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
3375
3314
  return this.count < max;
3376
3315
  }
3377
3316
  }
3317
+ trackByFunction = (i, x) => {
3318
+ return x.key;
3319
+ };
3378
3320
  /**
3379
3321
  * Moves the target index up one value.
3380
3322
  *
@@ -3425,8 +3367,8 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
3425
3367
  fieldConfig
3426
3368
  });
3427
3369
  }
3428
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3429
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormRepeatArrayTypeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormRepeatArrayTypeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
3430
3372
  <div class="dbx-form-repeat-array">
3431
3373
  <dbx-subsection [header]="label" [hint]="description">
3432
3374
  <!-- Fields -->
@@ -3454,7 +3396,7 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
3454
3396
  </div>
3455
3397
  </dbx-subsection>
3456
3398
  </div>
3457
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i2$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i2$1.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$1.FormlyField, selector: "formly-field", inputs: ["field"] }] }); }
3399
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$4.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$4.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i5.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i5.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { kind: "component", type: i5.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i5.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$1.FormlyField, selector: "formly-field", inputs: ["field"] }] });
3458
3400
  }
3459
3401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
3460
3402
  type: Component,
@@ -3492,8 +3434,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3492
3434
  }] });
3493
3435
 
3494
3436
  class DbxFormFormlyArrayFieldModule {
3495
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3496
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, declarations: [DbxFormRepeatArrayTypeComponent], imports: [CommonModule,
3437
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3438
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, declarations: [DbxFormRepeatArrayTypeComponent], imports: [CommonModule,
3497
3439
  MatFormFieldModule,
3498
3440
  ReactiveFormsModule,
3499
3441
  MatDividerModule,
@@ -3502,8 +3444,8 @@ class DbxFormFormlyArrayFieldModule {
3502
3444
  DragDropModule,
3503
3445
  DbxSectionLayoutModule,
3504
3446
  DbxBarLayoutModule,
3505
- DbxButtonModule, i1$1.FormlyModule] }); }
3506
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, imports: [CommonModule,
3447
+ DbxButtonModule, i1$1.FormlyModule] });
3448
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, imports: [CommonModule,
3507
3449
  MatFormFieldModule,
3508
3450
  ReactiveFormsModule,
3509
3451
  MatDividerModule,
@@ -3515,7 +3457,7 @@ class DbxFormFormlyArrayFieldModule {
3515
3457
  DbxButtonModule,
3516
3458
  FormlyModule.forChild({
3517
3459
  types: [{ name: 'repeatarray', component: DbxFormRepeatArrayTypeComponent }]
3518
- })] }); }
3460
+ })] });
3519
3461
  }
3520
3462
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyArrayFieldModule, decorators: [{
3521
3463
  type: NgModule,
@@ -3567,9 +3509,9 @@ function repeatArrayField(config) {
3567
3509
  }
3568
3510
 
3569
3511
  class DbxFormFormlyBooleanFieldModule {
3570
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3571
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule }); }
3572
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule }); }
3512
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3513
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule });
3514
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule });
3573
3515
  }
3574
3516
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, decorators: [{
3575
3517
  type: NgModule,
@@ -3656,31 +3598,23 @@ function dateTimePreset(config) {
3656
3598
 
3657
3599
  const DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN = new InjectionToken('DbxDateTimeFieldMenuPresetsServicePresets');
3658
3600
  class DbxDateTimeFieldMenuPresetsService {
3601
+ _configurations = new BehaviorSubject(inject(DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, { optional: true }) ?? []);
3602
+ configurations$ = this._configurations.asObservable();
3659
3603
  get configurations() {
3660
3604
  return this._configurations.value;
3661
3605
  }
3662
3606
  set configurations(configurations) {
3663
3607
  this._configurations.next(configurations);
3664
3608
  }
3665
- constructor(initialConfigs) {
3666
- this.initialConfigs = initialConfigs;
3667
- this._configurations = new BehaviorSubject(this.initialConfigs ?? []);
3668
- this.configurations$ = this._configurations.asObservable();
3669
- }
3670
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, deps: [{ token: DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
3671
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, providedIn: 'root' }); }
3609
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3610
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, providedIn: 'root' });
3672
3611
  }
3673
3612
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, decorators: [{
3674
3613
  type: Injectable,
3675
3614
  args: [{
3676
3615
  providedIn: 'root'
3677
3616
  }]
3678
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3679
- type: Inject,
3680
- args: [DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN]
3681
- }, {
3682
- type: Optional
3683
- }] }]; } });
3617
+ }] });
3684
3618
 
3685
3619
  var DbxDateTimeValueMode;
3686
3620
  (function (DbxDateTimeValueMode) {
@@ -3855,6 +3789,81 @@ const DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR = 'dateTimeFieldDateNotInSc
3855
3789
  */
3856
3790
  const DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR = 'dateTimeFieldTimeNotInRange';
3857
3791
  class DbxDateTimeFieldComponent extends FieldType$1 {
3792
+ cdRef = inject(ChangeDetectorRef);
3793
+ dbxDateTimeFieldConfigService = inject(DbxDateTimeFieldMenuPresetsService);
3794
+ _sub = new SubscriptionObject();
3795
+ _valueSub = new SubscriptionObject();
3796
+ _autoFillDateSync = new SubscriptionObject();
3797
+ _config = new BehaviorSubject(undefined);
3798
+ latestConfig$ = this._config.pipe(switchMapMaybeDefault(), distinctUntilChanged(), shareReplay(1));
3799
+ _syncConfigObs = new BehaviorSubject(undefined);
3800
+ _defaultTimezone = new BehaviorSubject(undefined);
3801
+ _timeDate = new BehaviorSubject(undefined);
3802
+ _presets = new BehaviorSubject(of([]));
3803
+ _fullDayInputCtrl;
3804
+ _fullDayControlObs = new BehaviorSubject(undefined);
3805
+ fullDayControl$ = this._fullDayControlObs.pipe(filterMaybe());
3806
+ _offset = new BehaviorSubject(0);
3807
+ _formControlObs = new BehaviorSubject(undefined);
3808
+ formControl$ = this._formControlObs.pipe(filterMaybe());
3809
+ _cleared = new Subject();
3810
+ _updateTime = new Subject();
3811
+ _resyncTimeInputSub = new SubscriptionObject();
3812
+ _resyncTimeInput = new Subject();
3813
+ timeErrorStateMatcher = {
3814
+ isErrorState: (control, form) => {
3815
+ if (control) {
3816
+ return (control.invalid && (control.dirty || control.touched)) || this.errorStateMatcher.isErrorState(this.formControl, form);
3817
+ }
3818
+ else {
3819
+ return false;
3820
+ }
3821
+ }
3822
+ };
3823
+ resyncTimeInput$ = this._resyncTimeInput.pipe(debounceTime(200), shareReplay(1));
3824
+ _configUpdateTimeSync = new SubscriptionObject(this.latestConfig$.pipe(skip(1)).subscribe((x) => {
3825
+ this._updateTime.next();
3826
+ }));
3827
+ timezone$ = this._defaultTimezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
3828
+ return defaultTimezone ?? guessCurrentTimezone();
3829
+ }), distinctUntilChanged(), shareReplay(1));
3830
+ timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
3831
+ timeDate$ = this._timeDate.pipe(switchMapMaybeDefault(), switchMap((x) => {
3832
+ let obs;
3833
+ if (x) {
3834
+ // if the string is not a date string, then treat it as a path
3835
+ if ((typeof x === 'string' && !isISO8601DayStringStart(x)) || isDbxDateTimeFieldTimeDateConfig(x)) {
3836
+ const { path, mapValue } = typeof x === 'string' ? { path: x } : x;
3837
+ obs =
3838
+ streamValueFromControl(this.form, path)?.pipe(map(mapValue ?? mapIdentityFunction()), map((x) => (x ? toJsDayDate(x) : undefined))) ?? of(undefined);
3839
+ }
3840
+ else {
3841
+ obs = of(toJsDayDate(x));
3842
+ }
3843
+ }
3844
+ else {
3845
+ obs = of(undefined);
3846
+ }
3847
+ return obs;
3848
+ }), distinctUntilChanged(isSameDateDay), shareReplay(1));
3849
+ valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
3850
+ return x.pipe(map(dbxDateTimeInputValueParseFactory(this.valueMode, timezoneInstance)));
3851
+ }), throttleTime(20, undefined, { leading: true, trailing: true }), // throttle incoming values and timezone changes
3852
+ distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
3853
+ refreshInteral$ = interval(10 * 1000);
3854
+ /**
3855
+ * Used to trigger/display visual updates (specifically on timeDistance, etc.).
3856
+ */
3857
+ displayValue$ = this.refreshInteral$.pipe(
3858
+ // every 10 seconds, refresh w/interval
3859
+ startWith(0), map(() => new Date().getMinutes()), distinctUntilChanged(), tap(() => this.cdRef.markForCheck()), switchMap(() => this.valueInSystemTimezone$), shareReplay(1));
3860
+ timeString$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? toLocalReadableTimeString(x) : '')), distinctUntilChanged(), shareReplay(1));
3861
+ dateInputCtrl = new FormControl(null, {
3862
+ validators: []
3863
+ });
3864
+ timeInputCtrl = new FormControl(null, {
3865
+ validators: [Validators.pattern(/^(now)$|^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)]
3866
+ });
3858
3867
  get dateLabel() {
3859
3868
  return this.props.dateLabel ?? 'Date';
3860
3869
  }
@@ -3936,242 +3945,165 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3936
3945
  get minuteStep() {
3937
3946
  return this.field.props.minuteStep ?? this.field.props.step ?? 5;
3938
3947
  }
3939
- constructor(cdRef, dbxDateTimeFieldConfigService) {
3940
- super();
3941
- this.cdRef = cdRef;
3942
- this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
3943
- this._sub = new SubscriptionObject();
3944
- this._valueSub = new SubscriptionObject();
3945
- this._autoFillDateSync = new SubscriptionObject();
3946
- this._config = new BehaviorSubject(undefined);
3947
- this.latestConfig$ = this._config.pipe(switchMapMaybeDefault(), distinctUntilChanged(), shareReplay(1));
3948
- this._syncConfigObs = new BehaviorSubject(undefined);
3949
- this._defaultTimezone = new BehaviorSubject(undefined);
3950
- this._timeDate = new BehaviorSubject(undefined);
3951
- this._presets = new BehaviorSubject(of([]));
3952
- this._fullDayControlObs = new BehaviorSubject(undefined);
3953
- this.fullDayControl$ = this._fullDayControlObs.pipe(filterMaybe());
3954
- this._offset = new BehaviorSubject(0);
3955
- this._formControlObs = new BehaviorSubject(undefined);
3956
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
3957
- this._cleared = new Subject();
3958
- this._updateTime = new Subject();
3959
- this._resyncTimeInputSub = new SubscriptionObject();
3960
- this._resyncTimeInput = new Subject();
3961
- this.timeErrorStateMatcher = {
3962
- isErrorState: (control, form) => {
3948
+ fullDay$ = this.fullDayControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), distinctUntilChanged(), shareReplay(1));
3949
+ showTimeInput$ = this.fullDay$.pipe(map((x) => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
3950
+ showAddTime$ = this.showTimeInput$.pipe(map((x) => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
3951
+ currentDate$ = this.dateInputCtrl.valueChanges.pipe(startWith(this.dateInputCtrl.value), shareReplay(1));
3952
+ date$ = this.currentDate$.pipe(filterMaybe(), shareReplay(1));
3953
+ timezoneAbbreviation$ = combineLatest([this.currentDate$, this.timezone$, this.timeDate$]).pipe(map(([date, timezone, timeDate]) => getTimezoneAbbreviation(timezone, timeDate ?? date ?? new Date())), distinctUntilChanged(), shareReplay(1));
3954
+ dateValue$ = merge(this.date$, this.valueInSystemTimezone$.pipe(skipFirstMaybe())).pipe(map((x) => (x ? startOfDay(x) : null)), distinctUntilChanged(isSameDateDay), shareReplay(1));
3955
+ timeInput$ = this._updateTime.pipe(debounceTime(5), map(() => this.timeInputCtrl.value || ''), distinctUntilChanged());
3956
+ syncConfigObs$ = this._syncConfigObs.pipe(switchMapMaybeDefault(), shareReplay(1));
3957
+ parsedSyncConfigs$ = this.syncConfigObs$.pipe(map((x) => {
3958
+ let parsed;
3959
+ if (x) {
3960
+ parsed = filterMaybeValues(asArray(x).map((y) => {
3961
+ const control = this.form.get(y.syncWith);
3963
3962
  if (control) {
3964
- return (control.invalid && (control.dirty || control.touched)) || this.errorStateMatcher.isErrorState(this.formControl, form);
3965
- }
3966
- else {
3967
- return false;
3968
- }
3969
- }
3970
- };
3971
- this.resyncTimeInput$ = this._resyncTimeInput.pipe(debounceTime(200), shareReplay(1));
3972
- this._configUpdateTimeSync = new SubscriptionObject(this.latestConfig$.pipe(skip(1)).subscribe((x) => {
3973
- this._updateTime.next();
3974
- }));
3975
- this.timezone$ = this._defaultTimezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
3976
- return defaultTimezone ?? guessCurrentTimezone();
3977
- }), distinctUntilChanged(), shareReplay(1));
3978
- this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
3979
- this.timeDate$ = this._timeDate.pipe(switchMapMaybeDefault(), switchMap((x) => {
3980
- let obs;
3981
- if (x) {
3982
- // if the string is not a date string, then treat it as a path
3983
- if ((typeof x === 'string' && !isISO8601DayStringStart(x)) || isDbxDateTimeFieldTimeDateConfig(x)) {
3984
- const { path, mapValue } = typeof x === 'string' ? { path: x } : x;
3985
- obs =
3986
- streamValueFromControl(this.form, path)?.pipe(map(mapValue ?? mapIdentityFunction()), map((x) => (x ? toJsDayDate(x) : undefined))) ?? of(undefined);
3963
+ return {
3964
+ control,
3965
+ ...y
3966
+ };
3987
3967
  }
3988
3968
  else {
3989
- obs = of(toJsDayDate(x));
3969
+ return undefined;
3990
3970
  }
3971
+ }));
3972
+ }
3973
+ else {
3974
+ parsed = [];
3975
+ }
3976
+ return parsed;
3977
+ }), shareReplay(1));
3978
+ syncConfigBeforeValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'before');
3979
+ syncConfigAfterValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'after');
3980
+ isTimeCleared$ = combineLatest([this.currentDate$, this._timeDate.pipe(startWith(null))]).pipe(switchMap(([date, time]) => {
3981
+ const isTimeCleared = Boolean(!date && !time);
3982
+ return this._cleared.pipe(map(() => true), startWith(isTimeCleared));
3983
+ }), distinctUntilChanged(), shareReplay(1));
3984
+ rawDateTime$ = combineLatest([
3985
+ this._config.pipe(first(), switchMap(() => (this.timeOnly ? of(null) : this.dateValue$))),
3986
+ this.timeInput$.pipe(startWith(null)),
3987
+ this.fullDay$,
3988
+ this.timeDate$,
3989
+ this.isTimeCleared$
3990
+ ]).pipe(map(([date, timeString, fullDay, timeDate, isTimeCleared]) => {
3991
+ let result;
3992
+ if (!isTimeCleared) {
3993
+ if (!date || this.timeOnly) {
3994
+ date = timeDate ?? new Date(); // use the time date, or default to the current day
3991
3995
  }
3992
- else {
3993
- obs = of(undefined);
3994
- }
3995
- return obs;
3996
- }), distinctUntilChanged(isSameDateDay), shareReplay(1));
3997
- this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
3998
- return x.pipe(map(dbxDateTimeInputValueParseFactory(this.valueMode, timezoneInstance)));
3999
- }), throttleTime(20, undefined, { leading: true, trailing: true }), // throttle incoming values and timezone changes
4000
- distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
4001
- this.refreshInteral$ = interval(10 * 1000);
4002
- /**
4003
- * Used to trigger/display visual updates (specifically on timeDistance, etc.).
4004
- */
4005
- this.displayValue$ = this.refreshInteral$.pipe(
4006
- // every 10 seconds, refresh w/interval
4007
- startWith(0), map(() => new Date().getMinutes()), distinctUntilChanged(), tap(() => this.cdRef.markForCheck()), switchMap(() => this.valueInSystemTimezone$), shareReplay(1));
4008
- this.timeString$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? toLocalReadableTimeString(x) : '')), distinctUntilChanged(), shareReplay(1));
4009
- this.dateInputCtrl = new FormControl(null, {
4010
- validators: []
4011
- });
4012
- this.timeInputCtrl = new FormControl(null, {
4013
- validators: [Validators.pattern(/^(now)$|^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)]
4014
- });
4015
- this.fullDay$ = this.fullDayControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), distinctUntilChanged(), shareReplay(1));
4016
- this.showTimeInput$ = this.fullDay$.pipe(map((x) => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
4017
- this.showAddTime$ = this.showTimeInput$.pipe(map((x) => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
4018
- this.currentDate$ = this.dateInputCtrl.valueChanges.pipe(startWith(this.dateInputCtrl.value), shareReplay(1));
4019
- this.date$ = this.currentDate$.pipe(filterMaybe(), shareReplay(1));
4020
- this.timezoneAbbreviation$ = combineLatest([this.currentDate$, this.timezone$, this.timeDate$]).pipe(map(([date, timezone, timeDate]) => getTimezoneAbbreviation(timezone, timeDate ?? date ?? new Date())), distinctUntilChanged(), shareReplay(1));
4021
- this.dateValue$ = merge(this.date$, this.valueInSystemTimezone$.pipe(skipFirstMaybe())).pipe(map((x) => (x ? startOfDay(x) : null)), distinctUntilChanged(isSameDateDay), shareReplay(1));
4022
- this.timeInput$ = this._updateTime.pipe(debounceTime(5), map(() => this.timeInputCtrl.value || ''), distinctUntilChanged());
4023
- this.syncConfigObs$ = this._syncConfigObs.pipe(switchMapMaybeDefault(), shareReplay(1));
4024
- this.parsedSyncConfigs$ = this.syncConfigObs$.pipe(map((x) => {
4025
- let parsed;
4026
- if (x) {
4027
- parsed = filterMaybeValues(asArray(x).map((y) => {
4028
- const control = this.form.get(y.syncWith);
4029
- if (control) {
4030
- return {
4031
- control,
4032
- ...y
4033
- };
3996
+ if (date) {
3997
+ if (fullDay) {
3998
+ if (this.dateTimeField.fullDayInUTC) {
3999
+ result = utcDayForDate(date);
4034
4000
  }
4035
4001
  else {
4036
- return undefined;
4002
+ result = startOfDay(date);
4037
4003
  }
4038
- }));
4039
- }
4040
- else {
4041
- parsed = [];
4042
- }
4043
- return parsed;
4044
- }), shareReplay(1));
4045
- this.syncConfigBeforeValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'before');
4046
- this.syncConfigAfterValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'after');
4047
- this.isTimeCleared$ = combineLatest([this.currentDate$, this._timeDate.pipe(startWith(null))]).pipe(switchMap(([date, time]) => {
4048
- const isTimeCleared = Boolean(!date && !time);
4049
- return this._cleared.pipe(map(() => true), startWith(isTimeCleared));
4050
- }), distinctUntilChanged(), shareReplay(1));
4051
- this.rawDateTime$ = combineLatest([
4052
- this._config.pipe(first(), switchMap(() => (this.timeOnly ? of(null) : this.dateValue$))),
4053
- this.timeInput$.pipe(startWith(null)),
4054
- this.fullDay$,
4055
- this.timeDate$,
4056
- this.isTimeCleared$
4057
- ]).pipe(map(([date, timeString, fullDay, timeDate, isTimeCleared]) => {
4058
- let result;
4059
- if (!isTimeCleared) {
4060
- if (!date || this.timeOnly) {
4061
- date = timeDate ?? new Date(); // use the time date, or default to the current day
4062
4004
  }
4063
- if (date) {
4064
- if (fullDay) {
4065
- if (this.dateTimeField.fullDayInUTC) {
4066
- result = utcDayForDate(date);
4067
- }
4068
- else {
4069
- result = startOfDay(date);
4070
- }
4071
- }
4072
- else if (timeString) {
4073
- result =
4074
- readableTimeStringToDate(timeString, {
4075
- date,
4076
- useSystemTimezone: true
4077
- }) ?? date;
4078
- }
4079
- else if (!this.timeOnly) {
4080
- if (this.timeMode !== DbxDateTimeFieldTimeMode.REQUIRED) {
4081
- // only autofill the date if the time is marked as required (and the time string is empty)
4082
- result = date;
4083
- }
4084
- }
4005
+ else if (timeString) {
4006
+ result =
4007
+ readableTimeStringToDate(timeString, {
4008
+ date,
4009
+ useSystemTimezone: true
4010
+ }) ?? date;
4085
4011
  }
4086
- }
4087
- return result;
4088
- }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
4089
- this.dateTimePickerConfig$ = combineLatest([this._config.pipe(switchMapMaybeObs()), this.syncConfigBeforeValue$, this.syncConfigAfterValue$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
4090
- let result = x;
4091
- if (dateInputMin != null || dateInputMax != null) {
4092
- const { min: limitMin, max: limitMax } = x?.limits ?? {};
4093
- const min = findMinDate([dateInputMin, dateFromLogicalDate(limitMin)]);
4094
- const max = findMaxDate([dateInputMax, dateFromLogicalDate(limitMax)]);
4095
- result = {
4096
- ...x,
4097
- limits: {
4098
- ...x?.limits,
4099
- min,
4100
- max
4101
- }
4102
- };
4103
- }
4104
- return result;
4105
- }), distinctUntilChanged(), shareReplay(1));
4106
- this.dateInputMin$ = this.dateTimePickerConfig$.pipe(map((x) => (x?.limits?.min ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
4107
- this.dateInputMax$ = this.dateTimePickerConfig$.pipe(map((x) => (x?.limits?.max ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
4108
- /**
4109
- * Whether or not there is a limited min/max date range applied/available.
4110
- */
4111
- this.hasRestrictedDateRange$ = combineLatest([this.dateInputMin$, this.dateInputMax$]).pipe(map(([a, b]) => Boolean(a || b)), distinctUntilChanged(), shareReplay(1));
4112
- this.dateMinAndMaxIsSameDay$ = combineLatest([this.dateInputMin$, this.dateInputMax$]).pipe(map(([a, b]) => Boolean(a && b) && isSameDateDay(a, b)), distinctUntilChanged(), shareReplay(1));
4113
- this.pickerFilter$ = this.dateTimePickerConfig$.pipe(distinctUntilChanged(), map((x) => {
4114
- if (x) {
4115
- const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
4116
- return (x) => (x != null ? filter(x) : true);
4117
- }
4118
- else {
4119
- return () => true;
4120
- }
4121
- }), shareReplay(1));
4122
- this.defaultPickerFilter = () => true;
4123
- this.timeOutput$ = combineLatest([this.rawDateTime$, this._offset, this.dateTimePickerConfig$]).pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME$1, undefined, { leading: false, trailing: true }), distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0 && current[2] === next[2]), tap(([, stepsOffset]) => (stepsOffset ? this._offset.next(0) : 0)), map(([date, stepsOffset, config]) => {
4124
- if (date != null) {
4125
- const instance = new DateTimeMinuteInstance({
4126
- date,
4127
- ...config,
4128
- roundDownToMinute: true
4129
- });
4130
- // only clamp when the steps offset is set
4131
- if (stepsOffset) {
4132
- date = instance.clamp(date);
4133
- const minutes = stepsOffset * this.minuteStep;
4134
- if (minutes != 0) {
4135
- date = addMinutes(date, minutes);
4136
- date = instance.clamp(date); // clamp the date again
4012
+ else if (!this.timeOnly) {
4013
+ if (this.timeMode !== DbxDateTimeFieldTimeMode.REQUIRED) {
4014
+ // only autofill the date if the time is marked as required (and the time string is empty)
4015
+ result = date;
4137
4016
  }
4138
4017
  }
4139
4018
  }
4140
- return date;
4141
- }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
4142
- this.dateTimePickerInstance$ = this.dateTimePickerConfig$.pipe(map((config) => {
4143
- return new DateTimeMinuteInstance({
4019
+ }
4020
+ return result;
4021
+ }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
4022
+ dateTimePickerConfig$ = combineLatest([this._config.pipe(switchMapMaybeObs()), this.syncConfigBeforeValue$, this.syncConfigAfterValue$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
4023
+ let result = x;
4024
+ if (dateInputMin != null || dateInputMax != null) {
4025
+ const { min: limitMin, max: limitMax } = x?.limits ?? {};
4026
+ const min = findMinDate([dateInputMin, dateFromLogicalDate(limitMin)]);
4027
+ const max = findMaxDate([dateInputMax, dateFromLogicalDate(limitMax)]);
4028
+ result = {
4029
+ ...x,
4030
+ limits: {
4031
+ ...x?.limits,
4032
+ min,
4033
+ max
4034
+ }
4035
+ };
4036
+ }
4037
+ return result;
4038
+ }), distinctUntilChanged(), shareReplay(1));
4039
+ dateInputMin$ = this.dateTimePickerConfig$.pipe(map((x) => (x?.limits?.min ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
4040
+ dateInputMax$ = this.dateTimePickerConfig$.pipe(map((x) => (x?.limits?.max ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
4041
+ /**
4042
+ * Whether or not there is a limited min/max date range applied/available.
4043
+ */
4044
+ hasRestrictedDateRange$ = combineLatest([this.dateInputMin$, this.dateInputMax$]).pipe(map(([a, b]) => Boolean(a || b)), distinctUntilChanged(), shareReplay(1));
4045
+ dateMinAndMaxIsSameDay$ = combineLatest([this.dateInputMin$, this.dateInputMax$]).pipe(map(([a, b]) => Boolean(a && b) && isSameDateDay(a, b)), distinctUntilChanged(), shareReplay(1));
4046
+ pickerFilter$ = this.dateTimePickerConfig$.pipe(distinctUntilChanged(), map((x) => {
4047
+ if (x) {
4048
+ const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
4049
+ return (x) => (x != null ? filter(x) : true);
4050
+ }
4051
+ else {
4052
+ return () => true;
4053
+ }
4054
+ }), shareReplay(1));
4055
+ defaultPickerFilter = () => true;
4056
+ timeOutput$ = combineLatest([this.rawDateTime$, this._offset, this.dateTimePickerConfig$]).pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME$1, undefined, { leading: false, trailing: true }), distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0 && current[2] === next[2]), tap(([, stepsOffset]) => (stepsOffset ? this._offset.next(0) : 0)), map(([date, stepsOffset, config]) => {
4057
+ if (date != null) {
4058
+ const instance = new DateTimeMinuteInstance({
4059
+ date,
4144
4060
  ...config,
4145
4061
  roundDownToMinute: true
4146
4062
  });
4147
- }), shareReplay(1));
4148
- this.hasEmptyDisplayValue$ = this.displayValue$.pipe(map((x) => !x), distinctUntilChanged(), shareReplay(1));
4149
- this.presets$ = this._presets.pipe(switchMapMaybeObs(), map((x) => x.map(dateTimePreset)), shareReplay(1));
4150
- this.showClearButton$ = this.hasEmptyDisplayValue$.pipe(map((x) => Boolean(this.showClearButton && !x)), distinctUntilChanged(), shareReplay(1));
4151
- this.canAutofillDateWithOnlyAvailableDate$ = this.dateMinAndMaxIsSameDay$;
4152
- this.showDateInput$ = this.dateMinAndMaxIsSameDay$.pipe(map((dateMinAndMaxIsSameDay) => {
4153
- return this.showDateInput && (this.alwaysShowDateInput || !dateMinAndMaxIsSameDay);
4154
- }), distinctUntilChanged(), shareReplay(1));
4155
- this.currentErrorMessage$ = this.formControl$.pipe(switchMap((formControl) => formControl.statusChanges.pipe(filter((x) => x === 'INVALID' || x === 'VALID'), map((x) => {
4156
- let currentErrorMessage;
4157
- if (x === 'INVALID') {
4158
- if (this.formControl.hasError('required')) {
4159
- currentErrorMessage = 'Date is required';
4160
- }
4161
- else if (this.formControl.hasError(DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR)) {
4162
- currentErrorMessage = 'Date does not fall on an available dates in schedule.';
4163
- }
4164
- else if (this.formControl.hasError(DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR)) {
4165
- currentErrorMessage = 'Time is not valid for the given date.';
4166
- }
4167
- else {
4168
- currentErrorMessage = 'The given date and time is invalid.';
4063
+ // only clamp when the steps offset is set
4064
+ if (stepsOffset) {
4065
+ date = instance.clamp(date);
4066
+ const minutes = stepsOffset * this.minuteStep;
4067
+ if (minutes != 0) {
4068
+ date = addMinutes(date, minutes);
4069
+ date = instance.clamp(date); // clamp the date again
4169
4070
  }
4170
4071
  }
4171
- return currentErrorMessage;
4172
- }))), startWith(undefined), shareReplay(1));
4173
- this.hasError$ = this.currentErrorMessage$.pipe(map((x) => Boolean(x)), distinctUntilChanged(), shareReplay(1));
4174
- }
4072
+ }
4073
+ return date;
4074
+ }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
4075
+ dateTimePickerInstance$ = this.dateTimePickerConfig$.pipe(map((config) => {
4076
+ return new DateTimeMinuteInstance({
4077
+ ...config,
4078
+ roundDownToMinute: true
4079
+ });
4080
+ }), shareReplay(1));
4081
+ hasEmptyDisplayValue$ = this.displayValue$.pipe(map((x) => !x), distinctUntilChanged(), shareReplay(1));
4082
+ presets$ = this._presets.pipe(switchMapMaybeObs(), map((x) => x.map(dateTimePreset)), shareReplay(1));
4083
+ showClearButton$ = this.hasEmptyDisplayValue$.pipe(map((x) => Boolean(this.showClearButton && !x)), distinctUntilChanged(), shareReplay(1));
4084
+ canAutofillDateWithOnlyAvailableDate$ = this.dateMinAndMaxIsSameDay$;
4085
+ showDateInput$ = this.dateMinAndMaxIsSameDay$.pipe(map((dateMinAndMaxIsSameDay) => {
4086
+ return this.showDateInput && (this.alwaysShowDateInput || !dateMinAndMaxIsSameDay);
4087
+ }), distinctUntilChanged(), shareReplay(1));
4088
+ currentErrorMessage$ = this.formControl$.pipe(switchMap((formControl) => formControl.statusChanges.pipe(filter((x) => x === 'INVALID' || x === 'VALID'), map((x) => {
4089
+ let currentErrorMessage;
4090
+ if (x === 'INVALID') {
4091
+ if (this.formControl.hasError('required')) {
4092
+ currentErrorMessage = 'Date is required';
4093
+ }
4094
+ else if (this.formControl.hasError(DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR)) {
4095
+ currentErrorMessage = 'Date does not fall on an available dates in schedule.';
4096
+ }
4097
+ else if (this.formControl.hasError(DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR)) {
4098
+ currentErrorMessage = 'Time is not valid for the given date.';
4099
+ }
4100
+ else {
4101
+ currentErrorMessage = 'The given date and time is invalid.';
4102
+ }
4103
+ }
4104
+ return currentErrorMessage;
4105
+ }))), startWith(undefined), shareReplay(1));
4106
+ hasError$ = this.currentErrorMessage$.pipe(map((x) => Boolean(x)), distinctUntilChanged(), shareReplay(1));
4175
4107
  ngOnInit() {
4176
4108
  this._formControlObs.next(this.formControl);
4177
4109
  const inputPickerConfig = this.dateTimeField.pickerConfig;
@@ -4451,13 +4383,13 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
4451
4383
  clearValue() {
4452
4384
  this._cleared.next();
4453
4385
  }
4454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DbxDateTimeFieldMenuPresetsService }], target: i0.ɵɵFactoryTarget.Component }); }
4455
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDateTimeFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutGap=\"6px grid\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput$ | async\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"(showDateInput$ | async) ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"mat-datepicker-button-highlight dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <!-- Date Hint -->\n <ng-container [ngSwitch]=\"hasError$ | async\">\n <ng-container *ngSwitchCase=\"false\">\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\">\n <ng-container [ngSwitch]=\"hasEmptyDisplayValue$ | async\">\n <ng-container *ngSwitchCase=\"true\">\n <span class=\"dbx-small\">No date/time set</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"false\">\n <ng-container [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"true\">\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [disabled]=\"disabled\" [required]=\"isDateRequired\" [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <button matPrefix class=\"dbx-datetime-row-button\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <button matSuffix *ngIf=\"showClearButton$ | async\" class=\"dbx-datetime-clear-button\" mat-icon-button aria-label=\"clears the date and time menu\" [disabled]=\"disabled\" (click)=\"clearValue()\">\n <mat-icon>clear</mat-icon>\n </button>\n <span matTextSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <ng-container *ngFor=\"let preset of presets$ | async\">\n <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n </ng-container>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput [errorStateMatcher]=\"timeErrorStateMatcher\" matInput [required]=\"isTimeRequired\" [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <button matPrefix class=\"dbx-datetime-row-button\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <span matTextSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n <mat-error *ngIf=\"timeInputCtrl.hasError('pattern')\">The input time is not recognizable.</mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i5$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i7$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i9.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i11.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i11.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i11.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i11.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i2.DateDistancePipe, name: "dateDistance" }, { kind: "pipe", type: i2.TimeDistancePipe, name: "timeDistance" }, { kind: "pipe", type: i2.GetValuePipe, name: "getValue" }] }); }
4386
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4387
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxDateTimeFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutGap=\"6px grid\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput$ | async\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"(showDateInput$ | async) ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"mat-datepicker-button-highlight dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <!-- Date Hint -->\n <ng-container [ngSwitch]=\"hasError$ | async\">\n <ng-container *ngSwitchCase=\"false\">\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\">\n <ng-container [ngSwitch]=\"hasEmptyDisplayValue$ | async\">\n <ng-container *ngSwitchCase=\"true\">\n <span class=\"dbx-small\">No date/time set</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"false\">\n <ng-container [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"true\">\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [disabled]=\"disabled\" [required]=\"isDateRequired\" [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <button matPrefix class=\"dbx-datetime-row-button\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <button matSuffix *ngIf=\"showClearButton$ | async\" class=\"dbx-datetime-clear-button\" mat-icon-button aria-label=\"clears the date and time menu\" [disabled]=\"disabled\" (click)=\"clearValue()\">\n <mat-icon>clear</mat-icon>\n </button>\n <span matTextSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <ng-container *ngFor=\"let preset of presets$ | async\">\n <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n </ng-container>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput [errorStateMatcher]=\"timeErrorStateMatcher\" matInput [required]=\"isTimeRequired\" [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <button matPrefix class=\"dbx-datetime-row-button\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <span matTextSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n <mat-error *ngIf=\"timeInputCtrl.hasError('pattern')\">The input time is not recognizable.</mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4$5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4$5.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$5.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4$6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i10.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i10.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i6.DateDistancePipe, name: "dateDistance" }, { kind: "pipe", type: i6.TimeDistancePipe, name: "timeDistance" }, { kind: "pipe", type: i6.GetValuePipe, name: "getValue" }] });
4456
4388
  }
4457
4389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, decorators: [{
4458
4390
  type: Component,
4459
4391
  args: [{ template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutGap=\"6px grid\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput$ | async\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"(showDateInput$ | async) ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"mat-datepicker-button-highlight dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <!-- Date Hint -->\n <ng-container [ngSwitch]=\"hasError$ | async\">\n <ng-container *ngSwitchCase=\"false\">\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\">\n <ng-container [ngSwitch]=\"hasEmptyDisplayValue$ | async\">\n <ng-container *ngSwitchCase=\"true\">\n <span class=\"dbx-small\">No date/time set</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"false\">\n <ng-container [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"true\">\n <mat-error *ngIf=\"currentErrorMessage$ | async\">{{ currentErrorMessage$ | async }}</mat-error>\n </ng-container>\n </ng-container>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [disabled]=\"disabled\" [required]=\"isDateRequired\" [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <button matPrefix class=\"dbx-datetime-row-button\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <button matSuffix *ngIf=\"showClearButton$ | async\" class=\"dbx-datetime-clear-button\" mat-icon-button aria-label=\"clears the date and time menu\" [disabled]=\"disabled\" (click)=\"clearValue()\">\n <mat-icon>clear</mat-icon>\n </button>\n <span matTextSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <ng-container *ngFor=\"let preset of presets$ | async\">\n <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n </ng-container>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput [errorStateMatcher]=\"timeErrorStateMatcher\" matInput [required]=\"isTimeRequired\" [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <button matPrefix class=\"dbx-datetime-row-button\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <span matTextSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n <mat-error *ngIf=\"timeInputCtrl.hasError('pattern')\">The input time is not recognizable.</mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n" }]
4460
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: DbxDateTimeFieldMenuPresetsService }]; } });
4392
+ }] });
4461
4393
 
4462
4394
  function dbxFixedDateRangeInputValueFactory(mode, timezoneInstance) {
4463
4395
  const dateInputTransformer = dbxDateTimeInputValueParseFactory(mode, timezoneInstance);
@@ -4487,6 +4419,30 @@ function dbxFixedDateRangeOutputValueFactory(mode, timezoneInstance) {
4487
4419
  }
4488
4420
  const TIME_OUTPUT_THROTTLE_TIME = 10;
4489
4421
  class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4422
+ dbxDateTimeFieldMenuPresetsService = inject(DbxDateTimeFieldMenuPresetsService);
4423
+ _sub = new SubscriptionObject();
4424
+ _inputRangeFormSub = new SubscriptionObject();
4425
+ _inputRangeFormValueSub = new SubscriptionObject();
4426
+ _dateRangeInputSub = new SubscriptionObject();
4427
+ _currentSelectionModeSub = new SubscriptionObject();
4428
+ _latestBoundarySub = new SubscriptionObject();
4429
+ _disableEndSub = new SubscriptionObject();
4430
+ _activeDateSub = new SubscriptionObject();
4431
+ _currentDateRangeInput = {};
4432
+ _currentSelectionMode = 'single';
4433
+ _latestBoundary = null;
4434
+ _config = new BehaviorSubject(undefined);
4435
+ _selectionMode = new BehaviorSubject(undefined);
4436
+ _dateRangeInput = new BehaviorSubject(undefined);
4437
+ _timezone = new BehaviorSubject(undefined);
4438
+ _presets = new BehaviorSubject(of([]));
4439
+ _selectionEvent = new Subject();
4440
+ selectedDateRange$ = this._selectionEvent.pipe(map((x) => x.range));
4441
+ _formControlObs = new BehaviorSubject(undefined);
4442
+ formControl$ = this._formControlObs.pipe(filterMaybe());
4443
+ calendar;
4444
+ startDateInputElement;
4445
+ endDateInputElement;
4490
4446
  get currentDateRangeInput() {
4491
4447
  return this._currentDateRangeInput;
4492
4448
  }
@@ -4496,6 +4452,18 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4496
4452
  get latestBoundary() {
4497
4453
  return this._latestBoundary;
4498
4454
  }
4455
+ config$ = this._config.pipe(filterMaybe(), switchMap((x) => x), distinctUntilChanged(), shareReplay(1));
4456
+ limitDateTimeInstance$ = this.config$.pipe(map(limitDateTimeInstance), shareReplay(1));
4457
+ selectionMode$ = this._selectionMode.pipe(switchMapMaybeDefault('single'), map((x) => x ?? 'single'), distinctUntilChanged(), shareReplay(1));
4458
+ dateRangeInput$ = this._dateRangeInput.pipe(switchMapMaybeDefault(), shareReplay(1));
4459
+ timezone$ = this._timezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
4460
+ return defaultTimezone ?? guessCurrentTimezone();
4461
+ }), distinctUntilChanged(), shareReplay(1));
4462
+ timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
4463
+ valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
4464
+ return x.pipe(map(dbxFixedDateRangeInputValueFactory(this.valueMode, timezoneInstance)));
4465
+ }), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
4466
+ distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4499
4467
  dateRangeSelectionForMode(mode) {
4500
4468
  const result = combineLatest([this.dateRangeInput$, this.limitDateTimeInstance$]).pipe(switchMap(([dateRangeInput, limitInstance]) => {
4501
4469
  const hasDateRangeConfiguration = Boolean(dateRangeInput);
@@ -4644,6 +4612,36 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4644
4612
  }));
4645
4613
  return result;
4646
4614
  }
4615
+ fullBoundary$ = this.dateRangeSelectionForMode('single').pipe(shareReplay(1));
4616
+ latestBoundary$ = this.selectionMode$.pipe(switchMap((mode) => {
4617
+ if (mode === 'arbitrary_quick') {
4618
+ // in arbitrary_quick mode, the latest value is the boundary, since we always set the value immediately.
4619
+ return this.valueInSystemTimezone$;
4620
+ }
4621
+ else {
4622
+ return this.fullBoundary$;
4623
+ }
4624
+ }));
4625
+ /**
4626
+ * Focuses on the date any time the selection event from the picker occured, otherwise use the system value
4627
+ */
4628
+ calendarFocusDate$ = this._selectionEvent.pipe(startWith(null)).pipe(switchMap((selectionEvent) => {
4629
+ if (selectionEvent && selectionEvent.type === 'calendar' && selectionEvent.range?.start) {
4630
+ return of(selectionEvent.range.start);
4631
+ }
4632
+ else {
4633
+ return this.fullBoundary$.pipe(first(), map((fullBoundary) => {
4634
+ return fullBoundary?.start ?? selectionEvent?.range?.start;
4635
+ }));
4636
+ }
4637
+ }), filterMaybe(), shareReplay(1));
4638
+ dateRangeSelection$ = this.selectionMode$.pipe(switchMap((mode) => this.dateRangeSelectionForMode(mode)));
4639
+ calendarSelection$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? new DateRange(x.start, x.end) : null)), shareReplay(1));
4640
+ endDisabled$ = this.selectionMode$.pipe(map((x) => x === 'single'), distinctUntilChanged(), shareReplay(1));
4641
+ inputRangeForm = new FormGroup({
4642
+ start: new FormControl(null),
4643
+ end: new FormControl(null)
4644
+ });
4647
4645
  get fixedDateRangeField() {
4648
4646
  return this.field.props;
4649
4647
  }
@@ -4668,86 +4666,20 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4668
4666
  get showRangeInput() {
4669
4667
  return this.field.props.showRangeInput ?? true;
4670
4668
  }
4671
- constructor(dbxDateTimeFieldConfigService) {
4672
- super();
4673
- this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
4674
- this._sub = new SubscriptionObject();
4675
- this._inputRangeFormSub = new SubscriptionObject();
4676
- this._inputRangeFormValueSub = new SubscriptionObject();
4677
- this._dateRangeInputSub = new SubscriptionObject();
4678
- this._currentSelectionModeSub = new SubscriptionObject();
4679
- this._latestBoundarySub = new SubscriptionObject();
4680
- this._disableEndSub = new SubscriptionObject();
4681
- this._activeDateSub = new SubscriptionObject();
4682
- this._currentDateRangeInput = {};
4683
- this._currentSelectionMode = 'single';
4684
- this._latestBoundary = null;
4685
- this._config = new BehaviorSubject(undefined);
4686
- this._selectionMode = new BehaviorSubject(undefined);
4687
- this._dateRangeInput = new BehaviorSubject(undefined);
4688
- this._timezone = new BehaviorSubject(undefined);
4689
- this._presets = new BehaviorSubject(of([]));
4690
- this._selectionEvent = new Subject();
4691
- this.selectedDateRange$ = this._selectionEvent.pipe(map((x) => x.range));
4692
- this._formControlObs = new BehaviorSubject(undefined);
4693
- this.formControl$ = this._formControlObs.pipe(filterMaybe());
4694
- this.config$ = this._config.pipe(filterMaybe(), switchMap((x) => x), distinctUntilChanged(), shareReplay(1));
4695
- this.limitDateTimeInstance$ = this.config$.pipe(map(limitDateTimeInstance), shareReplay(1));
4696
- this.selectionMode$ = this._selectionMode.pipe(switchMapMaybeDefault('single'), map((x) => x ?? 'single'), distinctUntilChanged(), shareReplay(1));
4697
- this.dateRangeInput$ = this._dateRangeInput.pipe(switchMapMaybeDefault(), shareReplay(1));
4698
- this.timezone$ = this._timezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
4699
- return defaultTimezone ?? guessCurrentTimezone();
4700
- }), distinctUntilChanged(), shareReplay(1));
4701
- this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
4702
- this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
4703
- return x.pipe(map(dbxFixedDateRangeInputValueFactory(this.valueMode, timezoneInstance)));
4704
- }), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
4705
- distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4706
- this.fullBoundary$ = this.dateRangeSelectionForMode('single').pipe(shareReplay(1));
4707
- this.latestBoundary$ = this.selectionMode$.pipe(switchMap((mode) => {
4708
- if (mode === 'arbitrary_quick') {
4709
- // in arbitrary_quick mode, the latest value is the boundary, since we always set the value immediately.
4710
- return this.valueInSystemTimezone$;
4711
- }
4712
- else {
4713
- return this.fullBoundary$;
4714
- }
4715
- }));
4716
- /**
4717
- * Focuses on the date any time the selection event from the picker occured, otherwise use the system value
4718
- */
4719
- this.calendarFocusDate$ = this._selectionEvent.pipe(startWith(null)).pipe(switchMap((selectionEvent) => {
4720
- if (selectionEvent && selectionEvent.type === 'calendar' && selectionEvent.range?.start) {
4721
- return of(selectionEvent.range.start);
4722
- }
4723
- else {
4724
- return this.fullBoundary$.pipe(first(), map((fullBoundary) => {
4725
- return fullBoundary?.start ?? selectionEvent?.range?.start;
4726
- }));
4727
- }
4728
- }), filterMaybe(), shareReplay(1));
4729
- this.dateRangeSelection$ = this.selectionMode$.pipe(switchMap((mode) => this.dateRangeSelectionForMode(mode)));
4730
- this.calendarSelection$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? new DateRange(x.start, x.end) : null)), shareReplay(1));
4731
- this.endDisabled$ = this.selectionMode$.pipe(map((x) => x === 'single'), distinctUntilChanged(), shareReplay(1));
4732
- this.inputRangeForm = new FormGroup({
4733
- start: new FormControl(null),
4734
- end: new FormControl(null)
4735
- });
4736
- this.minMaxRange$ = this.limitDateTimeInstance$.pipe(combineLatestWith(timer(MS_IN_MINUTE)), // refresh every minute
4737
- map(([x]) => x.dateRange()), distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4738
- this.min$ = this.minMaxRange$.pipe(map((x) => x?.start ?? null), distinctUntilChanged(), shareReplay(1));
4739
- this.max$ = this.minMaxRange$.pipe(map((x) => x?.end ?? null), distinctUntilChanged(), shareReplay(1));
4740
- this.pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
4741
- if (x) {
4742
- const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
4743
- return (x) => (x != null ? filter(x) : true);
4744
- }
4745
- else {
4746
- return () => true;
4747
- }
4748
- }), shareReplay(1));
4749
- this.defaultPickerFilter = () => true;
4750
- }
4669
+ minMaxRange$ = this.limitDateTimeInstance$.pipe(combineLatestWith(timer(MS_IN_MINUTE)), // refresh every minute
4670
+ map(([x]) => x.dateRange()), distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4671
+ min$ = this.minMaxRange$.pipe(map((x) => x?.start ?? null), distinctUntilChanged(), shareReplay(1));
4672
+ max$ = this.minMaxRange$.pipe(map((x) => x?.end ?? null), distinctUntilChanged(), shareReplay(1));
4673
+ pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
4674
+ if (x) {
4675
+ const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
4676
+ return (x) => (x != null ? filter(x) : true);
4677
+ }
4678
+ else {
4679
+ return () => true;
4680
+ }
4681
+ }), shareReplay(1));
4682
+ defaultPickerFilter = () => true;
4751
4683
  ngOnInit() {
4752
4684
  this._formControlObs.next(this.formControl);
4753
4685
  const dateRangeSelection = this.dateRangeSelection$.pipe(shareReplay(1));
@@ -4858,7 +4790,7 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4858
4790
  this._presets.next(asObservableFromGetter(this.presets));
4859
4791
  }
4860
4792
  else {
4861
- this._presets.next(this.dbxDateTimeFieldConfigService.configurations$);
4793
+ this._presets.next(this.dbxDateTimeFieldMenuPresetsService.configurations$);
4862
4794
  }
4863
4795
  this._activeDateSub.subscription = this.calendarFocusDate$.subscribe((x) => {
4864
4796
  this.calendar.activeDate = x;
@@ -4891,13 +4823,13 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4891
4823
  _createDateRange(date) {
4892
4824
  return date ? dateRange({ ...this._currentDateRangeInput, date }) : undefined;
4893
4825
  }
4894
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, deps: [{ token: DbxDateTimeFieldMenuPresetsService }], target: i0.ɵɵFactoryTarget.Component }); }
4895
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFixedDateRangeFieldComponent, selector: "ng-component", providers: [
4826
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
4827
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFixedDateRangeFieldComponent, selector: "ng-component", providers: [
4896
4828
  {
4897
4829
  provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
4898
4830
  useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
4899
4831
  }
4900
- ], viewQueries: [{ propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true }, { propertyName: "startDateInputElement", first: true, predicate: ["startDateInput"], descendants: true, read: ElementRef }, { propertyName: "endDateInputElement", first: true, predicate: ["endDateInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-fixeddaterange-field\">\n <mat-calendar #calendarView [selected]=\"calendarSelection$ | async\" [dateFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" [minDate]=\"min$ | async\" [maxDate]=\"max$ | async\" (selectedChange)=\"selectedChange($event)\"></mat-calendar>\n <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n <mat-date-range-input *ngIf=\"showRangeInput\" [formGroup]=\"inputRangeForm\">\n <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input #endDateInput [ngClass]=\"(endDisabled$ | async) ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"(endDisabled$ | async) ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n </mat-form-field>\n <mat-error *ngIf=\"formControl.hasError('required')\">Date range is required</mat-error>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$2.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: i5$2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i5$2.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i5$2.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
4832
+ ], viewQueries: [{ propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true }, { propertyName: "startDateInputElement", first: true, predicate: ["startDateInput"], descendants: true, read: ElementRef }, { propertyName: "endDateInputElement", first: true, predicate: ["endDateInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-fixeddaterange-field\">\n <mat-calendar #calendarView [selected]=\"calendarSelection$ | async\" [dateFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" [minDate]=\"min$ | async\" [maxDate]=\"max$ | async\" (selectedChange)=\"selectedChange($event)\"></mat-calendar>\n <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n <mat-date-range-input *ngIf=\"showRangeInput\" [formGroup]=\"inputRangeForm\">\n <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input #endDateInput [ngClass]=\"(endDisabled$ | async) ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"(endDisabled$ | async) ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n </mat-form-field>\n <mat-error *ngIf=\"formControl.hasError('required')\">Date range is required</mat-error>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4$5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4$6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: i4$6.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i4$6.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i4$6.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
4901
4833
  }
4902
4834
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, decorators: [{
4903
4835
  type: Component,
@@ -4907,7 +4839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4907
4839
  useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
4908
4840
  }
4909
4841
  ], template: "<div class=\"dbx-fixeddaterange-field\">\n <mat-calendar #calendarView [selected]=\"calendarSelection$ | async\" [dateFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" [minDate]=\"min$ | async\" [maxDate]=\"max$ | async\" (selectedChange)=\"selectedChange($event)\"></mat-calendar>\n <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n <mat-date-range-input *ngIf=\"showRangeInput\" [formGroup]=\"inputRangeForm\">\n <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input #endDateInput [ngClass]=\"(endDisabled$ | async) ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"(endDisabled$ | async) ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n </mat-form-field>\n <mat-error *ngIf=\"formControl.hasError('required')\">Date range is required</mat-error>\n</div>\n" }]
4910
- }], ctorParameters: function () { return [{ type: DbxDateTimeFieldMenuPresetsService }]; }, propDecorators: { calendar: [{
4842
+ }], propDecorators: { calendar: [{
4911
4843
  type: ViewChild,
4912
4844
  args: [MatCalendar]
4913
4845
  }], startDateInputElement: [{
@@ -4918,10 +4850,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4918
4850
  args: ['endDateInput', { read: ElementRef }]
4919
4851
  }] } });
4920
4852
  class DbxFixedDateRangeFieldSelectionStrategy {
4921
- constructor(_dateAdapter, dbxFixedDateRangeFieldComponent) {
4922
- this._dateAdapter = _dateAdapter;
4923
- this.dbxFixedDateRangeFieldComponent = dbxFixedDateRangeFieldComponent;
4924
- }
4853
+ _dateAdapter = inject((DateAdapter));
4854
+ dbxFixedDateRangeFieldComponent = inject(DbxFixedDateRangeFieldComponent);
4925
4855
  selectionFinished(date, currentRange, event) {
4926
4856
  // unused
4927
4857
  return currentRange;
@@ -4966,16 +4896,16 @@ class DbxFixedDateRangeFieldSelectionStrategy {
4966
4896
  const year = date.getFullYear();
4967
4897
  return this._dateAdapter.createDate(year, monthIndex, day);
4968
4898
  }
4969
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, deps: [{ token: i4$1.DateAdapter }, { token: DbxFixedDateRangeFieldComponent }], target: i0.ɵɵFactoryTarget.Injectable }); }
4970
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy }); }
4899
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4900
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy });
4971
4901
  }
4972
4902
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, decorators: [{
4973
4903
  type: Injectable
4974
- }], ctorParameters: function () { return [{ type: i4$1.DateAdapter }, { type: DbxFixedDateRangeFieldComponent }]; } });
4904
+ }] });
4975
4905
 
4976
4906
  class DbxFormFormlyDateFieldModule {
4977
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4978
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent], imports: [CommonModule,
4907
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4908
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent], imports: [CommonModule,
4979
4909
  FormsModule,
4980
4910
  MatInputModule,
4981
4911
  MatDividerModule,
@@ -4990,8 +4920,8 @@ class DbxFormFormlyDateFieldModule {
4990
4920
  DbxValuePipeModule,
4991
4921
  MatChipsModule,
4992
4922
  MatIconModule,
4993
- FlexLayoutModule, i1$1.FormlyModule], exports: [DbxFormFormlyWrapperModule] }); }
4994
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, imports: [CommonModule,
4923
+ FlexLayoutModule, i1$1.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
4924
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, imports: [CommonModule,
4995
4925
  FormsModule,
4996
4926
  MatInputModule,
4997
4927
  MatDividerModule,
@@ -5013,7 +4943,7 @@ class DbxFormFormlyDateFieldModule {
5013
4943
  { name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] },
5014
4944
  { name: 'fixeddaterange', component: DbxFixedDateRangeFieldComponent, wrappers: ['style', 'form-field'] }
5015
4945
  ]
5016
- }), DbxFormFormlyWrapperModule] }); }
4946
+ }), DbxFormFormlyWrapperModule] });
5017
4947
  }
5018
4948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, decorators: [{
5019
4949
  type: NgModule,
@@ -5059,7 +4989,7 @@ function autoTouchWrapper(fieldConfig, autoTouchWrapper = {}) {
5059
4989
  return addWrapperToFormlyFieldConfig(fieldConfig, AUTO_TOUCH_WRAPPER_KEY, autoTouchWrapper);
5060
4990
  }
5061
4991
  function expandWrapper(fieldConfig, expandWrapper = {}) {
5062
- return addWrapperToFormlyFieldConfig(fieldConfig, EXPANDABLE_WRAPPER_KEY, expandWrapper);
4992
+ return addWrapperToFormlyFieldConfig(fieldConfig, EXPAND_WRAPPER_KEY, expandWrapper);
5063
4993
  }
5064
4994
  function toggleWrapper(fieldConfig, toggleWrapper = {}) {
5065
4995
  return addWrapperToFormlyFieldConfig(fieldConfig, TOGGLE_WRAPPER_KEY, toggleWrapper);
@@ -5549,9 +5479,9 @@ function dollarAmountField(config) {
5549
5479
  }
5550
5480
 
5551
5481
  class DbxFormFormlyNumberFieldModule {
5552
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5553
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule, FormlyMatSliderModule], exports: [DbxFormFormlyWrapperModule] }); }
5554
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule, FormlyMatSliderModule, DbxFormFormlyWrapperModule] }); }
5482
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5483
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule, FormlyMatSliderModule], exports: [DbxFormFormlyWrapperModule] });
5484
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule, FormlyMatSliderModule, DbxFormFormlyWrapperModule] });
5555
5485
  }
5556
5486
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyNumberFieldModule, decorators: [{
5557
5487
  type: NgModule,
@@ -5564,21 +5494,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5564
5494
 
5565
5495
  const DEFAULT_PREFERRED_COUNTRIES = ['us'];
5566
5496
  class DbxPhoneFieldComponent extends FieldType$1 {
5567
- constructor() {
5568
- super(...arguments);
5569
- this.inputSync = new SubscriptionObject();
5570
- this.outputSync = new SubscriptionObject();
5571
- this.extensionErrorSync = new SubscriptionObject();
5572
- this.phoneErrorSync = new SubscriptionObject();
5573
- this.phoneCtrl = new FormControl('');
5574
- this.extensionCtrl = new FormControl('', {
5575
- validators: [isPhoneExtension()]
5576
- });
5577
- this.inputFormGroup = new FormGroup({
5578
- phone: this.phoneCtrl,
5579
- extension: this.extensionCtrl
5580
- });
5581
- }
5497
+ inputSync = new SubscriptionObject();
5498
+ outputSync = new SubscriptionObject();
5499
+ extensionErrorSync = new SubscriptionObject();
5500
+ phoneErrorSync = new SubscriptionObject();
5501
+ phoneCtrl = new FormControl('');
5502
+ extensionCtrl = new FormControl('', {
5503
+ validators: [isPhoneExtension()]
5504
+ });
5505
+ inputFormGroup = new FormGroup({
5506
+ phone: this.phoneCtrl,
5507
+ extension: this.extensionCtrl
5508
+ });
5582
5509
  get preferredCountries() {
5583
5510
  return this.props.preferredCountries ?? DEFAULT_PREFERRED_COUNTRIES;
5584
5511
  }
@@ -5643,8 +5570,8 @@ class DbxPhoneFieldComponent extends FieldType$1 {
5643
5570
  this.inputSync.destroy();
5644
5571
  this.outputSync.destroy();
5645
5572
  }
5646
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPhoneFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5647
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPhoneFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-form-phone-field\" [formGroup]=\"inputFormGroup\">\n <ngx-mat-intl-tel-input class=\"dbx-form-phone-field-phone-content\" [required]=\"required\" [preferredCountries]=\"preferredCountries\" [enablePlaceholder]=\"false\" name=\"phone\" [formControl]=\"phoneCtrl\"></ngx-mat-intl-tel-input>\n <div *ngIf=\"allowExtension\" class=\"dbx-form-phone-field-extension-content\">\n <span class=\"dbx-hint dbx-button-spacer\">Ext.</span>\n <input class=\"dbx-form-phone-field-extension-input\" placeholder=\"123\" minlength=\"0\" maxlength=\"6\" #extensionInput [formControl]=\"extensionCtrl\" />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$3.NgxMatIntlTelInputComponent, selector: "ngx-mat-intl-tel-input", inputs: ["preferredCountries", "enablePlaceholder", "inputPlaceholder", "cssClass", "name", "onlyCountries", "errorStateMatcher", "enableSearch", "searchPlaceholder", "describedBy", "format", "placeholder", "required", "disabled"], outputs: ["countryChanged"] }] }); }
5573
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPhoneFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5574
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxPhoneFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-form-phone-field\" [formGroup]=\"inputFormGroup\">\n <ngx-mat-intl-tel-input class=\"dbx-form-phone-field-phone-content\" [required]=\"required\" [preferredCountries]=\"preferredCountries\" [enablePlaceholder]=\"false\" name=\"phone\" [formControl]=\"phoneCtrl\"></ngx-mat-intl-tel-input>\n <div *ngIf=\"allowExtension\" class=\"dbx-form-phone-field-extension-content\">\n <span class=\"dbx-hint dbx-button-spacer\">Ext.</span>\n <input class=\"dbx-form-phone-field-extension-input\" placeholder=\"123\" minlength=\"0\" maxlength=\"6\" #extensionInput [formControl]=\"extensionCtrl\" />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.NgxMatIntlTelInputComponent, selector: "ngx-mat-intl-tel-input", inputs: ["preferredCountries", "enablePlaceholder", "inputPlaceholder", "cssClass", "name", "onlyCountries", "errorStateMatcher", "enableSearch", "searchPlaceholder", "describedBy", "format", "placeholder", "required", "disabled"], outputs: ["countryChanged"] }] });
5648
5575
  }
5649
5576
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxPhoneFieldComponent, decorators: [{
5650
5577
  type: Component,
@@ -5652,8 +5579,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5652
5579
  }] });
5653
5580
 
5654
5581
  class DbxFormFormlyPhoneFieldModule {
5655
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5656
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, declarations: [DbxPhoneFieldComponent], imports: [CommonModule,
5582
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5583
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, declarations: [DbxPhoneFieldComponent], imports: [CommonModule,
5657
5584
  MatInputModule,
5658
5585
  MatFormFieldModule,
5659
5586
  FormsModule,
@@ -5662,8 +5589,8 @@ class DbxFormFormlyPhoneFieldModule {
5662
5589
  MatChipsModule,
5663
5590
  MatIconModule,
5664
5591
  FlexLayoutModule,
5665
- FormlyMatFormFieldModule, i1$1.FormlyModule, NgxMatIntlTelInputComponent] }); }
5666
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, imports: [CommonModule,
5592
+ FormlyMatFormFieldModule, i1$1.FormlyModule, NgxMatIntlTelInputComponent] });
5593
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, imports: [CommonModule,
5667
5594
  MatInputModule,
5668
5595
  MatFormFieldModule,
5669
5596
  FormsModule,
@@ -5676,7 +5603,7 @@ class DbxFormFormlyPhoneFieldModule {
5676
5603
  FormlyModule.forChild({
5677
5604
  types: [{ name: 'intphone', component: DbxPhoneFieldComponent, wrappers: ['form-field'] }]
5678
5605
  }),
5679
- NgxMatIntlTelInputComponent] }); }
5606
+ NgxMatIntlTelInputComponent] });
5680
5607
  }
5681
5608
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, decorators: [{
5682
5609
  type: NgModule,
@@ -5984,9 +5911,9 @@ function addressListField(config = {}) {
5984
5911
  }
5985
5912
 
5986
5913
  class DbxFormFormlyTextFieldModule {
5987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5988
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [FormlyMaterialModule], exports: [DbxFormFormlyWrapperModule] }); }
5989
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [FormlyMaterialModule, DbxFormFormlyWrapperModule] }); }
5914
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5915
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [FormlyMaterialModule], exports: [DbxFormFormlyWrapperModule] });
5916
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [FormlyMaterialModule, DbxFormFormlyWrapperModule] });
5990
5917
  }
5991
5918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyTextFieldModule, decorators: [{
5992
5919
  type: NgModule,
@@ -6005,9 +5932,9 @@ function hiddenField({ key, required = false }) {
6005
5932
  }
6006
5933
 
6007
5934
  class DbxFormFormlyValueModule {
6008
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6009
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule], exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] }); }
6010
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] }); }
5935
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5936
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule], exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] });
5937
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] });
6011
5938
  }
6012
5939
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyValueModule, decorators: [{
6013
5940
  type: NgModule,
@@ -6019,9 +5946,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6019
5946
  }] });
6020
5947
 
6021
5948
  class DbxFormFormlyFieldModule {
6022
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6023
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [CommonModule], exports: [DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlySelectionModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule] }); }
6024
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [CommonModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlySelectionModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule] }); }
5949
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5950
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [CommonModule], exports: [DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlySelectionModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule] });
5951
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [CommonModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlySelectionModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule] });
6025
5952
  }
6026
5953
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFieldModule, decorators: [{
6027
5954
  type: NgModule,
@@ -6048,17 +5975,15 @@ function provideFormlyContext() {
6048
5975
  * DbxForm Instance that registers a delegate and manages the state of that form/delegate.
6049
5976
  */
6050
5977
  class DbxFormlyContext {
6051
- constructor() {
6052
- this.lockSet = new LockSet();
6053
- this._fields = new BehaviorSubject(undefined);
6054
- this._initialValue = new BehaviorSubject(undefined);
6055
- this._disabled = new BehaviorSubject(undefined);
6056
- this._delegate = new BehaviorSubject(undefined);
6057
- this.fields$ = this._fields.pipe(filterMaybe(), shareReplay(1));
6058
- this.disabled$ = this._disabled.pipe(filterMaybe(), shareReplay(1));
6059
- this.stream$ = this._delegate.pipe(distinctUntilChanged(), switchMap((x) => (x ? x.stream$ : of(DbxFormlyContext.INITIAL_STATE))), shareReplay(1));
6060
- }
6061
- static { this.INITIAL_STATE = { isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' }; }
5978
+ static INITIAL_STATE = { isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' };
5979
+ lockSet = new LockSet();
5980
+ _fields = new BehaviorSubject(undefined);
5981
+ _initialValue = new BehaviorSubject(undefined);
5982
+ _disabled = new BehaviorSubject(undefined);
5983
+ _delegate = new BehaviorSubject(undefined);
5984
+ fields$ = this._fields.pipe(filterMaybe(), shareReplay(1));
5985
+ disabled$ = this._disabled.pipe(filterMaybe(), shareReplay(1));
5986
+ stream$ = this._delegate.pipe(distinctUntilChanged(), switchMap((x) => (x ? x.stream$ : of(DbxFormlyContext.INITIAL_STATE))), shareReplay(1));
6062
5987
  destroy() {
6063
5988
  this.lockSet.destroyOnNextUnlock(() => {
6064
5989
  this._fields.complete();
@@ -6132,15 +6057,13 @@ class DbxFormlyContext {
6132
6057
  * Abstract component for wrapping a form.
6133
6058
  */
6134
6059
  class AbstractFormlyFormDirective {
6060
+ context = inject((DbxFormlyContext));
6135
6061
  get disabled() {
6136
6062
  return this.context.isDisabled();
6137
6063
  }
6138
6064
  set disabled(disabled) {
6139
6065
  this.context.setDisabled(undefined, disabled);
6140
6066
  }
6141
- constructor(context) {
6142
- this.context = context;
6143
- }
6144
6067
  ngOnDestroy() {
6145
6068
  this.context.destroy();
6146
6069
  }
@@ -6160,12 +6083,12 @@ class AbstractFormlyFormDirective {
6160
6083
  setDisabled(key, disabled) {
6161
6084
  this.context.setDisabled(key, disabled);
6162
6085
  }
6163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormlyFormDirective, deps: [{ token: DbxFormlyContext }], target: i0.ɵɵFactoryTarget.Directive }); }
6164
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractFormlyFormDirective, inputs: { disabled: "disabled" }, ngImport: i0 }); }
6086
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormlyFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6087
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractFormlyFormDirective, inputs: { disabled: "disabled" }, ngImport: i0 });
6165
6088
  }
6166
6089
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractFormlyFormDirective, decorators: [{
6167
6090
  type: Directive
6168
- }], ctorParameters: function () { return [{ type: DbxFormlyContext }]; }, propDecorators: { disabled: [{
6091
+ }], propDecorators: { disabled: [{
6169
6092
  type: Input
6170
6093
  }] } });
6171
6094
  /**
@@ -6175,8 +6098,8 @@ class AbstractSyncFormlyFormDirective extends AbstractFormlyFormDirective {
6175
6098
  ngOnInit() {
6176
6099
  this.context.fields = this.fields;
6177
6100
  }
6178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
6179
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractSyncFormlyFormDirective, usesInheritance: true, ngImport: i0 }); }
6101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6102
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractSyncFormlyFormDirective, usesInheritance: true, ngImport: i0 });
6180
6103
  }
6181
6104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractSyncFormlyFormDirective, decorators: [{
6182
6105
  type: Directive
@@ -6185,10 +6108,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6185
6108
  * Abstract component for wrapping an asyncrhronously-configured form.
6186
6109
  */
6187
6110
  class AbstractAsyncFormlyFormDirective extends AbstractFormlyFormDirective {
6188
- constructor() {
6189
- super(...arguments);
6190
- this._fieldsSub = new SubscriptionObject();
6191
- }
6111
+ _fieldsSub = new SubscriptionObject();
6192
6112
  ngOnInit() {
6193
6113
  this._fieldsSub.subscription = this.fields$.pipe(distinctUntilChanged()).subscribe((fields) => {
6194
6114
  this.context.fields = fields;
@@ -6198,19 +6118,16 @@ class AbstractAsyncFormlyFormDirective extends AbstractFormlyFormDirective {
6198
6118
  super.ngOnDestroy();
6199
6119
  this._fieldsSub.destroy();
6200
6120
  }
6201
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
6202
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractAsyncFormlyFormDirective, usesInheritance: true, ngImport: i0 }); }
6121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6122
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractAsyncFormlyFormDirective, usesInheritance: true, ngImport: i0 });
6203
6123
  }
6204
6124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractAsyncFormlyFormDirective, decorators: [{
6205
6125
  type: Directive
6206
6126
  }] });
6207
6127
  class AbstractConfigAsyncFormlyFormDirective extends AbstractAsyncFormlyFormDirective {
6208
- constructor() {
6209
- super(...arguments);
6210
- this._config = new BehaviorSubject(undefined);
6211
- this.currentConfig$ = this._config.asObservable();
6212
- this.config$ = this._config.pipe(filterMaybe(), shareReplay(1));
6213
- }
6128
+ _config = new BehaviorSubject(undefined);
6129
+ currentConfig$ = this._config.asObservable();
6130
+ config$ = this._config.pipe(filterMaybe(), shareReplay(1));
6214
6131
  get config() {
6215
6132
  return this._config.value;
6216
6133
  }
@@ -6221,8 +6138,8 @@ class AbstractConfigAsyncFormlyFormDirective extends AbstractAsyncFormlyFormDire
6221
6138
  super.ngOnDestroy();
6222
6139
  this._config.complete();
6223
6140
  }
6224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfigAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
6225
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractConfigAsyncFormlyFormDirective, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 }); }
6141
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfigAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6142
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractConfigAsyncFormlyFormDirective, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 });
6226
6143
  }
6227
6144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractConfigAsyncFormlyFormDirective, decorators: [{
6228
6145
  type: Directive
@@ -6250,73 +6167,70 @@ function dbxFormSearchFormFields(config) {
6250
6167
  * Used for rending a form from a DbxFormlyContext.
6251
6168
  */
6252
6169
  class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
6253
- constructor(context) {
6254
- super();
6255
- this.context = context;
6256
- this._fields = new BehaviorSubject(undefined);
6257
- this._events = new BehaviorSubject({ isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' });
6258
- this._disabled = new BehaviorSubject(undefined);
6259
- this._reset = new BehaviorSubject(new Date());
6260
- this._forceUpdate = new Subject();
6261
- this._disabledSub = new SubscriptionObject();
6262
- this._enforceDisabledSub = new SubscriptionObject();
6263
- this.form = new FormGroup({});
6264
- this.model = {};
6265
- this.options = {};
6266
- this.fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
6267
- this.stream$ = this._reset.pipe(switchMap((lastResetAt) => this.form.valueChanges.pipe(startWith(0), distinctUntilChanged(), throttleTime(50, undefined, { leading: true, trailing: true }), scanCount(-1),
6268
- // update on validation changes too. Does not count towards changes since last reset.
6269
- switchMap((changesSinceLastReset) => this.form.statusChanges.pipe(startWith(this.form.status), distinctUntilChanged()).pipe(map(() => changesSinceLastReset))), map((changesSinceLastResetCount) => ({
6270
- changesSinceLastResetCount,
6271
- isFormValid: this.form.status !== 'PENDING' && this.form.valid,
6272
- isFormDisabled: this.form.disabled
6273
- })), scan((acc, next) => {
6274
- // Pass forward valid if next was a disabled change/check, which changes angular form's isValid value.
6275
- // If it was valid prior, then it should be valid now, unless we just reset, in which case it might not be valid.
6276
- const valid = next.isFormValid || (next.isFormDisabled && acc.isFormValid && acc.changesSinceLastResetCount > 0);
6277
- return {
6278
- changesSinceLastResetCount: next.changesSinceLastResetCount,
6279
- isFormValid: valid,
6280
- isFormDisabled: next.isFormDisabled
6281
- };
6282
- }, {
6283
- changesSinceLastResetCount: 0,
6284
- isFormValid: false,
6285
- isFormDisabled: false
6286
- }), switchMap(({ changesSinceLastResetCount, isFormValid, isFormDisabled }) => {
6287
- const nextState = () => {
6288
- const isReset = changesSinceLastResetCount <= 1; // first emission after reset is the first value.
6289
- const complete = isFormValid;
6290
- const nextState = {
6291
- isComplete: complete,
6292
- state: isReset ? DbxFormState.RESET : DbxFormState.USED,
6293
- status: this.form.status,
6294
- untouched: this.form.untouched,
6295
- pristine: this.form.pristine,
6296
- changesCount: changesSinceLastResetCount,
6297
- lastResetAt,
6298
- disabled: this.disabled,
6299
- isDisabled: isFormDisabled
6300
- };
6301
- return nextState;
6170
+ _dbxFormlyContext = inject((DbxFormlyContext));
6171
+ _fields = new BehaviorSubject(undefined);
6172
+ _events = new BehaviorSubject({ isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' });
6173
+ _disabled = new BehaviorSubject(undefined);
6174
+ _reset = new BehaviorSubject(new Date());
6175
+ _forceUpdate = new Subject();
6176
+ _disabledSub = new SubscriptionObject();
6177
+ _enforceDisabledSub = new SubscriptionObject();
6178
+ form = new FormGroup({});
6179
+ model = {};
6180
+ options = {};
6181
+ fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
6182
+ stream$ = this._reset.pipe(switchMap((lastResetAt) => this.form.valueChanges.pipe(startWith(0), distinctUntilChanged(), throttleTime(50, undefined, { leading: true, trailing: true }), scanCount(-1),
6183
+ // update on validation changes too. Does not count towards changes since last reset.
6184
+ switchMap((changesSinceLastReset) => this.form.statusChanges.pipe(startWith(this.form.status), distinctUntilChanged()).pipe(map(() => changesSinceLastReset))), map((changesSinceLastResetCount) => ({
6185
+ changesSinceLastResetCount,
6186
+ isFormValid: this.form.status !== 'PENDING' && this.form.valid,
6187
+ isFormDisabled: this.form.disabled
6188
+ })), scan((acc, next) => {
6189
+ // Pass forward valid if next was a disabled change/check, which changes angular form's isValid value.
6190
+ // If it was valid prior, then it should be valid now, unless we just reset, in which case it might not be valid.
6191
+ const valid = next.isFormValid || (next.isFormDisabled && acc.isFormValid && acc.changesSinceLastResetCount > 0);
6192
+ return {
6193
+ changesSinceLastResetCount: next.changesSinceLastResetCount,
6194
+ isFormValid: valid,
6195
+ isFormDisabled: next.isFormDisabled
6196
+ };
6197
+ }, {
6198
+ changesSinceLastResetCount: 0,
6199
+ isFormValid: false,
6200
+ isFormDisabled: false
6201
+ }), switchMap(({ changesSinceLastResetCount, isFormValid, isFormDisabled }) => {
6202
+ const nextState = () => {
6203
+ const isReset = changesSinceLastResetCount <= 1; // first emission after reset is the first value.
6204
+ const complete = isFormValid;
6205
+ const nextState = {
6206
+ isComplete: complete,
6207
+ state: isReset ? DbxFormState.RESET : DbxFormState.USED,
6208
+ status: this.form.status,
6209
+ untouched: this.form.untouched,
6210
+ pristine: this.form.pristine,
6211
+ changesCount: changesSinceLastResetCount,
6212
+ lastResetAt,
6213
+ disabled: this.disabled,
6214
+ isDisabled: isFormDisabled
6302
6215
  };
6303
- const state = nextState();
6304
- if (isFormValid && this.form.untouched) {
6305
- return timer(150, 200).pipe(
6306
- // every 200 ms check if the form is now marked touched, then push a new state
6307
- filter(() => this.form.touched), map(() => nextState()),
6308
- // only push the new state once
6309
- first(),
6310
- // send the first value immediately
6311
- startWith(state));
6312
- }
6313
- else {
6314
- return of(state);
6315
- }
6316
- }))), shareReplay(1));
6317
- }
6216
+ return nextState;
6217
+ };
6218
+ const state = nextState();
6219
+ if (isFormValid && this.form.untouched) {
6220
+ return timer(150, 200).pipe(
6221
+ // every 200 ms check if the form is now marked touched, then push a new state
6222
+ filter(() => this.form.touched), map(() => nextState()),
6223
+ // only push the new state once
6224
+ first(),
6225
+ // send the first value immediately
6226
+ startWith(state));
6227
+ }
6228
+ else {
6229
+ return of(state);
6230
+ }
6231
+ }))), shareReplay(1));
6318
6232
  ngOnInit() {
6319
- this.context.setDelegate(this);
6233
+ this._dbxFormlyContext.setDelegate(this);
6320
6234
  const resyncDisabledState = () => {
6321
6235
  const isDisabled = BooleanStringKeyArrayUtilityInstance.isTrue(this._disabled.value);
6322
6236
  let change = false;
@@ -6338,9 +6252,9 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
6338
6252
  });
6339
6253
  }
6340
6254
  ngOnDestroy() {
6341
- this.context.lockSet.onNextUnlock(() => {
6255
+ this._dbxFormlyContext.lockSet.onNextUnlock(() => {
6342
6256
  super.ngOnDestroy();
6343
- this.context.clearDelegate(this);
6257
+ this._dbxFormlyContext.clearDelegate(this);
6344
6258
  this._events.complete();
6345
6259
  this._fields.complete();
6346
6260
  this._reset.complete();
@@ -6360,7 +6274,7 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
6360
6274
  }
6361
6275
  setValue(value) {
6362
6276
  // console.log('set value: ', value);
6363
- this.model = cloneDeep(value);
6277
+ this.model = structuredClone(value);
6364
6278
  if (this.options.updateInitialValue) {
6365
6279
  this.options.updateInitialValue();
6366
6280
  this.options.resetModel?.();
@@ -6401,12 +6315,12 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
6401
6315
  forceFormUpdate() {
6402
6316
  this._forceUpdate.next();
6403
6317
  }
6404
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFormComponent, deps: [{ token: DbxFormlyContext }], target: i0.ɵɵFactoryTarget.Component }); }
6405
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormlyFormComponent, selector: "dbx-formly", host: { classAttribute: "dbx-formly" }, providers: provideDbxMutableForm(DbxFormlyFormComponent), exportAs: ["formly"], usesInheritance: true, ngImport: i0, template: `
6318
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6319
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormlyFormComponent, selector: "dbx-formly", host: { classAttribute: "dbx-formly" }, providers: provideDbxMutableForm(DbxFormlyFormComponent), exportAs: ["formly"], usesInheritance: true, ngImport: i0, template: `
6406
6320
  <form [formGroup]="form" class="dbx-formly">
6407
6321
  <formly-form [form]="form" [fields]="(fields$ | async) ?? []" [model]="model"></formly-form>
6408
6322
  </form>
6409
- `, isInline: true, dependencies: [{ kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
6323
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1$1.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
6410
6324
  }
6411
6325
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFormComponent, decorators: [{
6412
6326
  type: Component,
@@ -6423,14 +6337,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6423
6337
  class: 'dbx-formly'
6424
6338
  }
6425
6339
  }]
6426
- }], ctorParameters: function () { return [{ type: DbxFormlyContext }]; } });
6340
+ }] });
6427
6341
 
6428
6342
  class DbxFormSearchFormComponent extends AbstractConfigAsyncFormlyFormDirective {
6429
- constructor() {
6430
- super(...arguments);
6431
- this.search = new EventEmitter();
6432
- this.fields$ = this.currentConfig$.pipe(map(dbxFormSearchFormFields));
6433
- }
6343
+ search = new EventEmitter();
6344
+ fields$ = this.currentConfig$.pipe(map(dbxFormSearchFormFields));
6434
6345
  searchChanged(value) {
6435
6346
  this.search.next(value.search ?? '');
6436
6347
  }
@@ -6438,10 +6349,10 @@ class DbxFormSearchFormComponent extends AbstractConfigAsyncFormlyFormDirective
6438
6349
  super.ngOnDestroy();
6439
6350
  this.search.complete();
6440
6351
  }
6441
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSearchFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6442
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSearchFormComponent, selector: "dbx-form-search-form", outputs: { search: "search" }, host: { classAttribute: "d-block dbx-form-search-form" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
6352
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSearchFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6353
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSearchFormComponent, selector: "dbx-form-search-form", outputs: { search: "search" }, host: { classAttribute: "d-block dbx-form-search-form" }, providers: [provideFormlyContext()], usesInheritance: true, ngImport: i0, template: `
6443
6354
  <dbx-formly (dbxFormValueChange)="searchChanged($event)"></dbx-formly>
6444
- `, isInline: true, dependencies: [{ kind: "directive", type: DbxFormValueChangesDirective, selector: "[dbxFormValueChange]", outputs: ["dbxFormValueChange"] }, { kind: "component", type: DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] }); }
6355
+ `, isInline: true, dependencies: [{ kind: "directive", type: DbxFormValueChangesDirective, selector: "[dbxFormValueChange]", outputs: ["dbxFormValueChange"] }, { kind: "component", type: DbxFormlyFormComponent, selector: "dbx-formly", exportAs: ["formly"] }] });
6445
6356
  }
6446
6357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSearchFormComponent, decorators: [{
6447
6358
  type: Component,
@@ -6463,11 +6374,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6463
6374
  * Provides an DbxFormlyContext and has an input for fields.
6464
6375
  */
6465
6376
  class DbxFormlyFieldsContextDirective extends AbstractAsyncFormlyFormDirective {
6466
- constructor() {
6467
- super(...arguments);
6468
- this._fields = new BehaviorSubject(undefined);
6469
- this.fields$ = this._fields.asObservable();
6470
- }
6377
+ _fields = new BehaviorSubject(undefined);
6378
+ fields$ = this._fields.asObservable();
6471
6379
  get fields() {
6472
6380
  return this._fields.value;
6473
6381
  }
@@ -6478,8 +6386,8 @@ class DbxFormlyFieldsContextDirective extends AbstractAsyncFormlyFormDirective {
6478
6386
  super.ngOnDestroy();
6479
6387
  this._fields.complete();
6480
6388
  }
6481
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFieldsContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
6482
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormlyFieldsContextDirective, selector: "[dbxFormlyFields]", inputs: { fields: ["dbxFormlyFields", "fields"] }, providers: provideFormlyContext(), usesInheritance: true, ngImport: i0 }); }
6389
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFieldsContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6390
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormlyFieldsContextDirective, selector: "[dbxFormlyFields]", inputs: { fields: ["dbxFormlyFields", "fields"] }, providers: provideFormlyContext(), usesInheritance: true, ngImport: i0 });
6483
6391
  }
6484
6392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyFieldsContextDirective, decorators: [{
6485
6393
  type: Directive,
@@ -6493,8 +6401,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6493
6401
  }] } });
6494
6402
 
6495
6403
  class DbxFormlyModule {
6496
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6497
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, declarations: [DbxFormlyFormComponent, DbxFormlyFieldsContextDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, FormlyModule, FormlyMatToggleModule], exports: [
6404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6405
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, declarations: [DbxFormlyFormComponent, DbxFormlyFieldsContextDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, FormlyModule, FormlyMatToggleModule], exports: [
6498
6406
  // Modules (?)
6499
6407
  FormsModule,
6500
6408
  ReactiveFormsModule,
@@ -6502,11 +6410,11 @@ class DbxFormlyModule {
6502
6410
  DbxFormlyFormComponent,
6503
6411
  DbxFormlyFieldsContextDirective
6504
6412
  // Helper Modules
6505
- ] }); }
6506
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, FormlyModule, FormlyMatToggleModule,
6413
+ ] });
6414
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, FormlyModule, FormlyMatToggleModule,
6507
6415
  // Modules (?)
6508
6416
  FormsModule,
6509
- ReactiveFormsModule] }); }
6417
+ ReactiveFormsModule] });
6510
6418
  }
6511
6419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormlyModule, decorators: [{
6512
6420
  type: NgModule,
@@ -6526,9 +6434,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6526
6434
  }] });
6527
6435
 
6528
6436
  class DbxFormFormlyFormModule {
6529
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6530
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, declarations: [DbxFormSearchFormComponent], imports: [CommonModule, DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule], exports: [DbxFormSearchFormComponent] }); }
6531
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, imports: [CommonModule, DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule] }); }
6437
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6438
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, declarations: [DbxFormSearchFormComponent], imports: [CommonModule, DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule], exports: [DbxFormSearchFormComponent] });
6439
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, imports: [CommonModule, DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule] });
6532
6440
  }
6533
6441
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormFormlyFormModule, decorators: [{
6534
6442
  type: NgModule,
@@ -6684,10 +6592,10 @@ function timezoneStringField(config = {}) {
6684
6592
  * Provides vertical spacing after a form.
6685
6593
  */
6686
6594
  class DbxFormSpacerComponent {
6687
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6688
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSpacerComponent, selector: "dbx-form-spacer", ngImport: i0, template: `
6595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6596
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxFormSpacerComponent, selector: "dbx-form-spacer", ngImport: i0, template: `
6689
6597
  <div class="dbx-form-spacer"></div>
6690
- `, isInline: true }); }
6598
+ `, isInline: true });
6691
6599
  }
6692
6600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSpacerComponent, decorators: [{
6693
6601
  type: Component,
@@ -6700,9 +6608,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6700
6608
  }] });
6701
6609
 
6702
6610
  class DbxFormLayoutModule {
6703
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6704
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, declarations: [DbxFormSpacerComponent], imports: [CommonModule], exports: [DbxFormSpacerComponent] }); }
6705
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, imports: [CommonModule] }); }
6611
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6612
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, declarations: [DbxFormSpacerComponent], imports: [CommonModule], exports: [DbxFormSpacerComponent] });
6613
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, imports: [CommonModule] });
6706
6614
  }
6707
6615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormLayoutModule, decorators: [{
6708
6616
  type: NgModule,
@@ -6714,9 +6622,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6714
6622
  }] });
6715
6623
 
6716
6624
  class DbxFormExtensionModule {
6717
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6718
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, exports: [DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule] }); }
6719
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, imports: [DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule] }); }
6625
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6626
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, exports: [DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule] });
6627
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, imports: [DbxFormModule, DbxFormlyModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule] });
6720
6628
  }
6721
6629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormExtensionModule, decorators: [{
6722
6630
  type: NgModule,
@@ -6729,5 +6637,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6729
6637
  * Generated bundle index. Do not edit.
6730
6638
  */
6731
6639
 
6732
- export { APP_ACTION_FORM_DISABLED_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective, AbstractFormExpandableSectionWrapperDirective, AbstractFormlyFormDirective, AbstractSyncFormlyFormDirective, AutoTouchFieldWrapperComponent, ChecklistItemFieldDataSetBuilder, DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR, DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR, DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN, DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS, DEFAULT_FORM_DISABLED_KEY, DEFAULT_HAS_VALUE_FN, DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldMenuPresetsService, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySelectionModule, DbxFormFormlySourceSelectModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyTextFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule, DbxFormInfoWrapperComponent, DbxFormIoModule, DbxFormLayoutModule, DbxFormLoadingSourceDirective, DbxFormModule, DbxFormRepeatArrayTypeComponent, DbxFormSearchFormComponent, DbxFormSectionWrapperComponent, DbxFormSourceDirective, DbxFormSourceSelectFieldComponent, DbxFormSpacerComponent, DbxFormState, DbxFormSubsectionWrapperComponent, DbxFormToggleWrapperComponent, DbxFormValueChangesDirective, DbxFormWorkingWrapperComponent, DbxFormlyContext, DbxFormlyFieldsContextDirective, DbxFormlyFormComponent, DbxFormlyModule, DbxItemListFieldComponent, DbxMutableForm, DbxPhoneFieldComponent, DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent, DbxSearchableChipFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxSearchableTextFieldComponent, DbxTextEditorFieldComponent, FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY, INVALID_PHONE_NUMBER_EXTENSION_MESSAGE, INVALID_PHONE_NUMBER_MESSAGE, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, addValueSelectionOptionFunction, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dateTimePreset, dateTimeRangeField, dbxDateRangeIsSameDateRangeFieldValue, dbxDateTimeInputValueParseFactory, dbxDateTimeIsSameDateTimeFieldValue, dbxDateTimeOutputValueFactory, dbxFormSearchFormFields, dbxFormSourceObservable, dbxFormSourceObservableFromStream, dbxListField, defaultValidationMessages, disableFormlyFieldAutofillAttributes, dollarAmountField, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, fixedDateRangeField, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDbxDateTimeFieldTimeDateConfig, isDivisibleBy, isDomain, isE164PhoneNumber, isE164PhoneNumberWithValidExtension, isInRange, isPhoneExtension, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, numberSliderField, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, pickableValueFieldValuesConfigForStaticLabeledValues, propsAndConfigForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, sortPickableItemsByLabelStringFunction, sourceSelectField, stateField, streamValueFromControl, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleDisableFormControl, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
6640
+ export { APP_ACTION_FORM_DISABLED_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective, AbstractFormExpandSectionWrapperDirective, AbstractFormlyFormDirective, AbstractSyncFormlyFormDirective, AutoTouchFieldWrapperComponent, ChecklistItemFieldDataSetBuilder, DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR, DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR, DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN, DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS, DEFAULT_FORM_DISABLED_KEY, DEFAULT_HAS_VALUE_FN, DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldMenuPresetsService, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySelectionModule, DbxFormFormlySourceSelectModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyTextFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule, DbxFormInfoWrapperComponent, DbxFormIoModule, DbxFormLayoutModule, DbxFormLoadingSourceDirective, DbxFormModule, DbxFormRepeatArrayTypeComponent, DbxFormSearchFormComponent, DbxFormSectionWrapperComponent, DbxFormSourceDirective, DbxFormSourceSelectFieldComponent, DbxFormSpacerComponent, DbxFormState, DbxFormSubsectionWrapperComponent, DbxFormToggleWrapperComponent, DbxFormValueChangesDirective, DbxFormWorkingWrapperComponent, DbxFormlyContext, DbxFormlyFieldsContextDirective, DbxFormlyFormComponent, DbxFormlyModule, DbxItemListFieldComponent, DbxMutableForm, DbxPhoneFieldComponent, DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent, DbxSearchableChipFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxSearchableTextFieldComponent, DbxTextEditorFieldComponent, FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY, INVALID_PHONE_NUMBER_EXTENSION_MESSAGE, INVALID_PHONE_NUMBER_MESSAGE, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, addValueSelectionOptionFunction, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dateTimePreset, dateTimeRangeField, dbxDateRangeIsSameDateRangeFieldValue, dbxDateTimeInputValueParseFactory, dbxDateTimeIsSameDateTimeFieldValue, dbxDateTimeOutputValueFactory, dbxFormSearchFormFields, dbxFormSourceObservable, dbxFormSourceObservableFromStream, dbxListField, defaultValidationMessages, disableFormlyFieldAutofillAttributes, dollarAmountField, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, fixedDateRangeField, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDbxDateTimeFieldTimeDateConfig, isDivisibleBy, isDomain, isE164PhoneNumber, isE164PhoneNumberWithValidExtension, isInRange, isPhoneExtension, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, numberSliderField, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, pickableValueFieldValuesConfigForStaticLabeledValues, propsAndConfigForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, sortPickableItemsByLabelStringFunction, sourceSelectField, stateField, streamValueFromControl, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleDisableFormControl, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
6733
6641
  //# sourceMappingURL=dereekb-dbx-form.mjs.map