@dereekb/dbx-form 1.2.0 → 3.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.
- package/README.md +1 -1
- package/esm2020/lib/form/action/form.action.directive.mjs +34 -19
- package/esm2020/lib/form/action/form.action.module.mjs +4 -4
- package/esm2020/lib/form/action/transition/form.action.transition.module.mjs +4 -4
- package/esm2020/lib/form/action/transition/form.action.transition.safety.directive.mjs +9 -9
- package/esm2020/lib/form/form.mjs +11 -1
- package/esm2020/lib/form/form.module.mjs +4 -4
- package/esm2020/lib/form/io/form.changes.directive.mjs +18 -7
- package/esm2020/lib/form/io/form.input.directive.mjs +36 -18
- package/esm2020/lib/form/io/form.io.module.mjs +4 -4
- package/esm2020/lib/form/io/form.loading.directive.mjs +27 -17
- package/esm2020/lib/form.module.mjs +4 -4
- package/esm2020/lib/formly/config/validation.mjs +3 -3
- package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +8 -8
- package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +3 -3
- package/esm2020/lib/formly/field/checklist/checklist.item.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/component/component.field.component.mjs +8 -21
- package/esm2020/lib/formly/field/component/component.field.mjs +3 -5
- package/esm2020/lib/formly/field/component/component.field.module.mjs +14 -14
- package/esm2020/lib/formly/field/form.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/selection/pickable/pickable.chip.field.component.mjs +7 -7
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +8 -6
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +2 -2
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +28 -21
- package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +4 -4
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.mjs +16 -16
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +7 -8
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.module.mjs +13 -13
- package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/selection/selection.module.mjs +4 -4
- package/esm2020/lib/formly/field/texteditor/texteditor.field.component.mjs +4 -5
- package/esm2020/lib/formly/field/texteditor/texteditor.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/array/array.field.component.mjs +7 -7
- package/esm2020/lib/formly/field/value/array/array.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/boolean/boolean.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/date/date.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +51 -40
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +7 -7
- package/esm2020/lib/formly/field/value/enum/enum.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/value/phone/phone.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +15 -18
- package/esm2020/lib/formly/field/value/text/text.address.field.mjs +2 -2
- package/esm2020/lib/formly/field/value/text/text.field.mjs +3 -2
- package/esm2020/lib/formly/field/value/text/text.field.module.mjs +4 -4
- package/esm2020/lib/formly/field/value/value.module.mjs +4 -4
- package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/flex.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/form.wrapper.module.mjs +18 -10
- package/esm2020/lib/formly/field/wrapper/index.mjs +2 -1
- package/esm2020/lib/formly/field/wrapper/info.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/section.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +4 -4
- package/esm2020/lib/formly/field/wrapper/subsection.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +3 -3
- package/esm2020/lib/formly/field/wrapper/working.wrapper.component.mjs +45 -0
- package/esm2020/lib/formly/field/wrapper/wrapper.mjs +7 -1
- package/esm2020/lib/formly/formly.context.directive.mjs +3 -3
- package/esm2020/lib/formly/formly.context.mjs +19 -8
- package/esm2020/lib/formly/formly.directive.mjs +17 -14
- package/esm2020/lib/formly/formly.form.component.mjs +63 -22
- package/esm2020/lib/formly/formly.module.mjs +9 -6
- package/esm2020/lib/formly/index.mjs +2 -1
- package/esm2020/lib/formly/template/available.mjs +16 -0
- package/esm2020/lib/formly/template/index.mjs +3 -0
- package/esm2020/lib/formly/template/login.mjs +90 -0
- package/esm2020/lib/layout/form.layout.module.mjs +4 -4
- package/esm2020/lib/layout/form.spacer.component.mjs +3 -3
- package/esm2020/lib/validator/available.mjs +32 -0
- package/esm2020/lib/validator/field.mjs +31 -0
- package/esm2020/lib/validator/index.mjs +3 -1
- package/fesm2015/dereekb-dbx-form.mjs +818 -505
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +834 -501
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.directive.d.ts +13 -16
- package/lib/form/action/transition/form.action.transition.safety.directive.d.ts +3 -3
- package/lib/form/form.d.ts +30 -3
- package/lib/form/io/form.changes.directive.d.ts +7 -3
- package/lib/form/io/form.input.directive.d.ts +19 -7
- package/lib/form/io/form.loading.directive.d.ts +8 -2
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +2 -2
- package/lib/formly/field/checklist/checklist.item.field.module.d.ts +1 -1
- package/lib/formly/field/component/component.field.component.d.ts +8 -21
- package/lib/formly/field/component/component.field.d.ts +3 -5
- package/lib/formly/field/component/component.field.module.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +8 -3
- package/lib/formly/field/selection/pickable/pickable.field.module.d.ts +1 -1
- package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +8 -6
- package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +2 -1
- package/lib/formly/field/selection/searchable/searchable.d.ts +3 -3
- package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +3 -3
- package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +4 -4
- package/lib/formly/field/selection/searchable/searchable.field.module.d.ts +1 -1
- package/lib/formly/field/texteditor/_texteditor.scss +0 -2
- package/lib/formly/field/value/array/array.field.component.d.ts +2 -2
- package/lib/formly/field/value/date/datetime.field.component.d.ts +8 -10
- package/lib/formly/field/value/date/datetime.field.d.ts +2 -2
- package/lib/formly/field/value/phone/_phone.scss +4 -0
- package/lib/formly/field/value/text/text.additional.field.d.ts +1 -1
- package/lib/formly/field/value/text/text.field.d.ts +2 -0
- package/lib/formly/field/wrapper/form.wrapper.module.d.ts +9 -8
- package/lib/formly/field/wrapper/index.d.ts +1 -0
- package/lib/formly/field/wrapper/style.wrapper.component.d.ts +3 -3
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +22 -0
- package/lib/formly/field/wrapper/wrapper.d.ts +3 -0
- package/lib/formly/formly.context.d.ts +9 -6
- package/lib/formly/formly.directive.d.ts +2 -0
- package/lib/formly/formly.form.component.d.ts +13 -3
- package/lib/formly/index.d.ts +1 -0
- package/lib/formly/template/available.d.ts +7 -0
- package/lib/formly/template/index.d.ts +2 -0
- package/lib/formly/template/login.d.ts +59 -0
- package/lib/validator/available.d.ts +30 -0
- package/lib/validator/field.d.ts +32 -0
- package/lib/validator/index.d.ts +2 -0
- package/package.json +17 -44
- package/lib/formly/field/fields_TODO.scss +0 -4
- package/lib/formly/form_TODO.scss +0 -153
|
@@ -6,13 +6,13 @@ import * as i4 from '@angular/material/dialog';
|
|
|
6
6
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
7
7
|
import * as i3 from '@uirouter/core';
|
|
8
8
|
import * as i2 from '@dereekb/dbx-core';
|
|
9
|
-
import { AbstractSubscriptionDirective, safeDetectChanges,
|
|
9
|
+
import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges } from '@dereekb/dbx-core';
|
|
10
10
|
import * as i1$1 from '@dereekb/dbx-web';
|
|
11
|
-
import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxFlexLayoutModule, DbxSectionLayoutModule,
|
|
11
|
+
import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxLoadingModule, DbxFlexLayoutModule, DbxSectionLayoutModule, DbxRouterAnchorModule, AbstractDbxSelectionListWrapperDirective, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, addConfigToValueListItems, ProvideDbxListView, AbstractDbxValueListViewItemComponent, DbxButtonModule, DbxListLayoutModule, mapCompactModeObs, DbxBarLayoutModule } from '@dereekb/dbx-web';
|
|
12
12
|
import { isPast, addSeconds, isSameMinute, startOfDay, isSameDay, addMinutes } from 'date-fns';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, mergeMap, shareReplay as shareReplay$1, startWith, debounceTime, Subject, skipWhile, interval, merge, throttleTime as throttleTime$1, scan } from 'rxjs';
|
|
14
|
+
import { LockSet, SubscriptionObject, asObservable, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, beginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, skipFirstMaybe, asyncPusherCache, scanCount } from '@dereekb/rxjs';
|
|
15
|
+
import { distinctUntilChanged as distinctUntilChanged$1, shareReplay, map as map$1, delay as delay$1, debounceTime as debounceTime$1, filter as filter$1, switchMap as switchMap$1, startWith as startWith$1, tap, throttleTime, first as first$1 } from 'rxjs/operators';
|
|
16
16
|
import * as i1$4 from '@ngx-formly/core';
|
|
17
17
|
import { FieldType, FieldWrapper, FormlyModule, FieldArrayType } from '@ngx-formly/core';
|
|
18
18
|
import * as i1 from '@angular/material/checkbox';
|
|
@@ -27,12 +27,12 @@ import * as i1$2 from '@angular/material/button';
|
|
|
27
27
|
import { MatButtonModule } from '@angular/material/button';
|
|
28
28
|
import * as i3$1 from '@angular/flex-layout/flex';
|
|
29
29
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
30
|
-
import { objectIsEmpty, mergeObjects, filterFromPOJO, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, mergeIntoArray, lastValue, separateValues, arrayToMap,
|
|
30
|
+
import { objectIsEmpty, mergeObjects, filterFromPOJO, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, mergeIntoArray, lastValue, separateValues, arrayToMap, getValueFromGetter, dateFromLogicalDate, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, capitalizeFirstLetter, BooleanStringKeyArrayUtilityInstance } from '@dereekb/util';
|
|
31
31
|
import * as i1$3 from '@angular/material/slide-toggle';
|
|
32
32
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
33
33
|
import * as i2$2 from '@angular/flex-layout/extended';
|
|
34
34
|
import * as i6$1 from '@angular/material/input';
|
|
35
|
-
import { MatInputModule
|
|
35
|
+
import { MatInputModule } from '@angular/material/input';
|
|
36
36
|
import { FieldType as FieldType$1, FormlyMaterialModule } from '@ngx-formly/material';
|
|
37
37
|
import { camelCase } from 'change-case';
|
|
38
38
|
import * as i1$5 from '@angular/material/chips';
|
|
@@ -45,7 +45,7 @@ import { MatListModule } from '@angular/material/list';
|
|
|
45
45
|
import * as i3$2 from '@angular/material/form-field';
|
|
46
46
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
47
47
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
48
|
-
import { skipUntilTimeElapsedAfterLastEmission, guessCurrentTimezone, toReadableTimeString, utcDayForDate, readableTimeStringToDate, DateTimeMinuteInstance } from '@dereekb/date';
|
|
48
|
+
import { skipUntilTimeElapsedAfterLastEmission, guessCurrentTimezone, toReadableTimeString, utcDayForDate, readableTimeStringToDate, DateTimeMinuteInstance, toLocalReadableTimeString } from '@dereekb/date';
|
|
49
49
|
import * as i2$3 from 'ngx-editor';
|
|
50
50
|
import { Editor, NgxEditorModule } from 'ngx-editor';
|
|
51
51
|
import * as i5$1 from '@angular/cdk/drag-drop';
|
|
@@ -65,10 +65,20 @@ import { FormlyMatToggleModule } from '@ngx-formly/material/toggle';
|
|
|
65
65
|
*/
|
|
66
66
|
var DbxFormState;
|
|
67
67
|
(function (DbxFormState) {
|
|
68
|
+
/**
|
|
69
|
+
* Form is not finished initializing.
|
|
70
|
+
*/
|
|
68
71
|
DbxFormState[DbxFormState["INITIALIZING"] = -1] = "INITIALIZING";
|
|
72
|
+
/**
|
|
73
|
+
* Form is initialized but has not yet used.
|
|
74
|
+
*/
|
|
69
75
|
DbxFormState[DbxFormState["RESET"] = 0] = "RESET";
|
|
76
|
+
/**
|
|
77
|
+
* Form has been used.
|
|
78
|
+
*/
|
|
70
79
|
DbxFormState[DbxFormState["USED"] = 1] = "USED";
|
|
71
80
|
})(DbxFormState || (DbxFormState = {}));
|
|
81
|
+
const DEFAULT_FORM_DISABLED_KEY = 'dbx_form_disabled';
|
|
72
82
|
/**
|
|
73
83
|
* Form that has an event stream, value, and state items.
|
|
74
84
|
*/
|
|
@@ -86,7 +96,7 @@ function ProvideDbxMutableForm(sourceType) {
|
|
|
86
96
|
];
|
|
87
97
|
}
|
|
88
98
|
|
|
89
|
-
const APP_ACTION_FORM_DISABLED_KEY = '
|
|
99
|
+
const APP_ACTION_FORM_DISABLED_KEY = 'dbx_action_form';
|
|
90
100
|
/**
|
|
91
101
|
* Used with an action to bind a form to an action as it's value source.
|
|
92
102
|
*
|
|
@@ -99,16 +109,25 @@ class DbxActionFormDirective {
|
|
|
99
109
|
this.form = form;
|
|
100
110
|
this.source = source;
|
|
101
111
|
this.lockSet = new LockSet();
|
|
112
|
+
this._formDisabledWhileWorking = new BehaviorSubject(true);
|
|
102
113
|
this._triggeredSub = new SubscriptionObject();
|
|
103
114
|
this._isCompleteSub = new SubscriptionObject();
|
|
115
|
+
this._isWorkingSub = new SubscriptionObject();
|
|
104
116
|
if (form.lockSet) {
|
|
105
117
|
this.lockSet.addChildLockSet(form.lockSet, 'form');
|
|
106
118
|
}
|
|
107
119
|
this.lockSet.addChildLockSet(source.lockSet, 'source');
|
|
108
120
|
}
|
|
121
|
+
get formDisabledOnWorking() {
|
|
122
|
+
return this._formDisabledWhileWorking.value;
|
|
123
|
+
}
|
|
124
|
+
set formDisabledOnWorking(formDisabledOnWorking) {
|
|
125
|
+
this._formDisabledWhileWorking.next(Boolean(formDisabledOnWorking ?? true));
|
|
126
|
+
}
|
|
109
127
|
ngOnInit() {
|
|
110
128
|
// Pass data from the form to the source when triggered.
|
|
111
|
-
this._triggeredSub.subscription = this.source.triggered$.pipe(switchMap(() => this.form.stream$.pipe(first(), exhaustMap((
|
|
129
|
+
this._triggeredSub.subscription = this.source.triggered$.pipe(switchMap(() => this.form.stream$.pipe(first(), exhaustMap((stream) => {
|
|
130
|
+
const { isComplete } = stream;
|
|
112
131
|
const doNothing = {}; // nothing, form not complete
|
|
113
132
|
let obs;
|
|
114
133
|
if (isComplete) {
|
|
@@ -119,7 +138,7 @@ class DbxActionFormDirective {
|
|
|
119
138
|
else {
|
|
120
139
|
return of(doNothing);
|
|
121
140
|
}
|
|
122
|
-
}), catchError((error) => of({ error })))));
|
|
141
|
+
}), catchError((error) => of({ reject: error })))));
|
|
123
142
|
}
|
|
124
143
|
else {
|
|
125
144
|
obs = of(doNothing);
|
|
@@ -137,7 +156,7 @@ class DbxActionFormDirective {
|
|
|
137
156
|
}
|
|
138
157
|
});
|
|
139
158
|
// Update the enabled/disabled state
|
|
140
|
-
this._isCompleteSub.subscription = this.form.stream$.pipe(filter((x) => x.state !== DbxFormState.INITIALIZING), switchMap((event) => {
|
|
159
|
+
this._isCompleteSub.subscription = this.form.stream$.pipe(delay(0), filter((x) => x.state !== DbxFormState.INITIALIZING), switchMap((event) => {
|
|
141
160
|
return this.form.getValue().pipe(first(), exhaustMap((value) => {
|
|
142
161
|
// Use both changes count and whether or not something was in the past to guage whether or not the item has been touched.
|
|
143
162
|
// Angular Form's untouched is whether or not focus has been lost but we can still recieve value updates.
|
|
@@ -147,7 +166,7 @@ class DbxActionFormDirective {
|
|
|
147
166
|
let validatorObs;
|
|
148
167
|
const initialIsValidCheck = event.isComplete;
|
|
149
168
|
if (initialIsValidCheck) {
|
|
150
|
-
validatorObs = (this.
|
|
169
|
+
validatorObs = (this.dbxActionFormValidator) ? this.dbxActionFormValidator(value) : of(true);
|
|
151
170
|
}
|
|
152
171
|
else {
|
|
153
172
|
validatorObs = of(false);
|
|
@@ -155,7 +174,7 @@ class DbxActionFormDirective {
|
|
|
155
174
|
let modifiedObs;
|
|
156
175
|
const isConsideredModified = (event.pristine === false && isProbablyTouched);
|
|
157
176
|
if (isConsideredModified) {
|
|
158
|
-
modifiedObs = (this.
|
|
177
|
+
modifiedObs = (this.dbxActionFormModified) ? this.dbxActionFormModified(value) : of(true);
|
|
159
178
|
}
|
|
160
179
|
else {
|
|
161
180
|
modifiedObs = of(false);
|
|
@@ -172,19 +191,24 @@ class DbxActionFormDirective {
|
|
|
172
191
|
// Disable if the form is not yet complete/valid.
|
|
173
192
|
this.source.enable(APP_ACTION_FORM_DISABLED_KEY, valid);
|
|
174
193
|
});
|
|
175
|
-
//
|
|
176
|
-
|
|
194
|
+
// Watch the working state and disable form while working
|
|
195
|
+
this._isWorkingSub.subscription = combineLatest([this.source.isWorking$, this._formDisabledWhileWorking]).pipe(map(([isWorking, lockOnWorking]) => lockOnWorking && isWorking), distinctUntilChanged()).subscribe((disable) => {
|
|
196
|
+
this.form.setDisabled(APP_ACTION_FORM_DISABLED_KEY, disable);
|
|
197
|
+
});
|
|
177
198
|
}
|
|
178
199
|
ngOnDestroy() {
|
|
179
200
|
this.source.enable(APP_ACTION_FORM_DISABLED_KEY);
|
|
180
201
|
this.lockSet.destroyOnNextUnlock(() => {
|
|
181
202
|
this._triggeredSub.destroy();
|
|
182
203
|
this._isCompleteSub.destroy();
|
|
204
|
+
this._isWorkingSub.destroy();
|
|
205
|
+
this._formDisabledWhileWorking.complete();
|
|
206
|
+
this.form.setDisabled(APP_ACTION_FORM_DISABLED_KEY, false);
|
|
183
207
|
});
|
|
184
208
|
}
|
|
185
209
|
preCheckReadyValue(value) {
|
|
186
|
-
let validatorObs = (this.
|
|
187
|
-
let modifiedObs = (this.
|
|
210
|
+
let validatorObs = (this.dbxActionFormValidator) ? this.dbxActionFormValidator(value) : of(true);
|
|
211
|
+
let modifiedObs = (this.dbxActionFormModified) ? this.dbxActionFormModified(value) : of(true);
|
|
188
212
|
return combineLatest([
|
|
189
213
|
validatorObs,
|
|
190
214
|
modifiedObs
|
|
@@ -194,18 +218,20 @@ class DbxActionFormDirective {
|
|
|
194
218
|
return of({ value });
|
|
195
219
|
}
|
|
196
220
|
}
|
|
197
|
-
DbxActionFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
198
|
-
DbxActionFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
221
|
+
DbxActionFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionFormDirective, deps: [{ token: DbxMutableForm, host: true }, { token: i2.DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
222
|
+
DbxActionFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: { dbxActionFormValidator: "dbxActionFormValidator", dbxActionFormModified: "dbxActionFormModified", formDisabledOnWorking: "formDisabledOnWorking" }, ngImport: i0 });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionFormDirective, decorators: [{
|
|
200
224
|
type: Directive,
|
|
201
225
|
args: [{
|
|
202
226
|
selector: '[dbxActionForm]'
|
|
203
227
|
}]
|
|
204
228
|
}], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
|
|
205
229
|
type: Host
|
|
206
|
-
}] }, { type: i2.
|
|
230
|
+
}] }, { type: i2.DbxActionContextStoreSourceInstance }]; }, propDecorators: { dbxActionFormValidator: [{
|
|
231
|
+
type: Input
|
|
232
|
+
}], dbxActionFormModified: [{
|
|
207
233
|
type: Input
|
|
208
|
-
}],
|
|
234
|
+
}], formDisabledOnWorking: [{
|
|
209
235
|
type: Input
|
|
210
236
|
}] } });
|
|
211
237
|
|
|
@@ -215,37 +241,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
215
241
|
* NOTE: Only works with UIRouter
|
|
216
242
|
*/
|
|
217
243
|
class DbxActionFormSafetyDirective extends DbxActionTransitionSafetyDirective {
|
|
218
|
-
constructor(
|
|
244
|
+
constructor(dbxActionForm, source, transitionService, viewContainerRef, dialog) {
|
|
219
245
|
super(source, transitionService, viewContainerRef, dialog);
|
|
220
|
-
this.
|
|
246
|
+
this.dbxActionForm = dbxActionForm;
|
|
221
247
|
}
|
|
222
248
|
_handleOnBeforeTransition(transition) {
|
|
223
|
-
this.
|
|
249
|
+
this.dbxActionForm.form.forceFormUpdate();
|
|
224
250
|
return super._handleOnBeforeTransition(transition);
|
|
225
251
|
}
|
|
226
252
|
}
|
|
227
|
-
DbxActionFormSafetyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
228
|
-
DbxActionFormSafetyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
253
|
+
DbxActionFormSafetyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", 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 });
|
|
254
|
+
DbxActionFormSafetyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionFormSafetyDirective, selector: "[dbxActionFormSafety]", inputs: { inputSafetyType: ["dbxActionFormSafety", "inputSafetyType"] }, usesInheritance: true, ngImport: i0 });
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionFormSafetyDirective, decorators: [{
|
|
230
256
|
type: Directive,
|
|
231
257
|
args: [{
|
|
232
258
|
selector: '[dbxActionFormSafety]',
|
|
233
259
|
}]
|
|
234
260
|
}], ctorParameters: function () { return [{ type: DbxActionFormDirective, decorators: [{
|
|
235
261
|
type: Host
|
|
236
|
-
}] }, { type: i2.
|
|
262
|
+
}] }, { type: i2.DbxActionContextStoreSourceInstance }, { type: i3.TransitionService }, { type: i0.ViewContainerRef }, { type: i4.MatDialog }]; }, propDecorators: { inputSafetyType: [{
|
|
237
263
|
type: Input,
|
|
238
264
|
args: ['dbxActionFormSafety']
|
|
239
265
|
}] } });
|
|
240
266
|
|
|
241
267
|
class DbxFormActionTransitionModule {
|
|
242
268
|
}
|
|
243
|
-
DbxFormActionTransitionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
244
|
-
DbxFormActionTransitionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
245
|
-
DbxFormActionTransitionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
269
|
+
DbxFormActionTransitionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionTransitionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
270
|
+
DbxFormActionTransitionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionTransitionModule, declarations: [DbxActionFormSafetyDirective], imports: [CommonModule], exports: [DbxActionFormSafetyDirective] });
|
|
271
|
+
DbxFormActionTransitionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionTransitionModule, imports: [[
|
|
246
272
|
CommonModule
|
|
247
273
|
]] });
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionTransitionModule, decorators: [{
|
|
249
275
|
type: NgModule,
|
|
250
276
|
args: [{
|
|
251
277
|
imports: [
|
|
@@ -262,14 +288,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
262
288
|
|
|
263
289
|
class DbxFormActionModule {
|
|
264
290
|
}
|
|
265
|
-
DbxFormActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
266
|
-
DbxFormActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
291
|
+
DbxFormActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
292
|
+
DbxFormActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionModule, declarations: [DbxActionFormDirective], imports: [CommonModule,
|
|
267
293
|
MatDialogModule], exports: [DbxActionFormDirective] });
|
|
268
|
-
DbxFormActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
294
|
+
DbxFormActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionModule, imports: [[
|
|
269
295
|
CommonModule,
|
|
270
296
|
MatDialogModule
|
|
271
297
|
]] });
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormActionModule, decorators: [{
|
|
273
299
|
type: NgModule,
|
|
274
300
|
args: [{
|
|
275
301
|
imports: [
|
|
@@ -285,6 +311,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
285
311
|
}]
|
|
286
312
|
}] });
|
|
287
313
|
|
|
314
|
+
function dbxFormSourceObservable(form, inputObs, mode$) {
|
|
315
|
+
const observable = asObservable(inputObs);
|
|
316
|
+
return combineLatest([
|
|
317
|
+
observable.pipe(distinctUntilChanged()),
|
|
318
|
+
mode$.pipe(distinctUntilChanged())
|
|
319
|
+
]).pipe(switchMap(([value, mode]) => form.stream$.pipe(
|
|
320
|
+
// wait for the form to finish initializing.
|
|
321
|
+
filter((x) => x.state !== DbxFormState.INITIALIZING),
|
|
322
|
+
// if mode is reset, then filter out changes until the form is reset again.
|
|
323
|
+
filter((x) => ((mode === 'reset') ? (x.state === DbxFormState.RESET) : true)), first(), map((_) => value))));
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Used with a FormComponent to set the value based on the input value.
|
|
327
|
+
*/
|
|
328
|
+
class DbxFormSourceDirective extends AbstractSubscriptionDirective {
|
|
329
|
+
constructor(form) {
|
|
330
|
+
super();
|
|
331
|
+
this.form = form;
|
|
332
|
+
this._mode = new BehaviorSubject('reset');
|
|
333
|
+
}
|
|
334
|
+
get mode() {
|
|
335
|
+
return this._mode.value;
|
|
336
|
+
}
|
|
337
|
+
set mode(mode) {
|
|
338
|
+
this._mode.next(mode);
|
|
339
|
+
}
|
|
340
|
+
set obs(obs) {
|
|
341
|
+
this.setObs(obs);
|
|
342
|
+
}
|
|
343
|
+
setObs(inputObs) {
|
|
344
|
+
let subscription;
|
|
345
|
+
if (inputObs) {
|
|
346
|
+
subscription = dbxFormSourceObservable(this.form, inputObs, this._mode).subscribe((x) => {
|
|
347
|
+
this.form.setValue(x);
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
this.sub = subscription;
|
|
351
|
+
}
|
|
352
|
+
ngOnDestroy() {
|
|
353
|
+
super.ngOnDestroy();
|
|
354
|
+
this._mode.complete();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
DbxFormSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSourceDirective, deps: [{ token: DbxMutableForm, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
358
|
+
DbxFormSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: { mode: ["dbxFormSourceMode", "mode"], obs: ["dbxFormSource", "obs"] }, usesInheritance: true, ngImport: i0 });
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSourceDirective, decorators: [{
|
|
360
|
+
type: Directive,
|
|
361
|
+
args: [{
|
|
362
|
+
selector: '[dbxFormSource]'
|
|
363
|
+
}]
|
|
364
|
+
}], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
|
|
365
|
+
type: Host
|
|
366
|
+
}] }]; }, propDecorators: { mode: [{
|
|
367
|
+
type: Input,
|
|
368
|
+
args: ['dbxFormSourceMode']
|
|
369
|
+
}], obs: [{
|
|
370
|
+
type: Input,
|
|
371
|
+
args: ['dbxFormSource']
|
|
372
|
+
}] } });
|
|
373
|
+
|
|
288
374
|
/**
|
|
289
375
|
* Used with a FormComponent to set the value from a LoadingState when the value is available.
|
|
290
376
|
*/
|
|
@@ -292,6 +378,13 @@ class DbxFormLoadingSourceDirective extends AbstractSubscriptionDirective {
|
|
|
292
378
|
constructor(form) {
|
|
293
379
|
super();
|
|
294
380
|
this.form = form;
|
|
381
|
+
this._mode = new BehaviorSubject('reset');
|
|
382
|
+
}
|
|
383
|
+
get mode() {
|
|
384
|
+
return this._mode.value;
|
|
385
|
+
}
|
|
386
|
+
set mode(mode) {
|
|
387
|
+
this._mode.next(mode);
|
|
295
388
|
}
|
|
296
389
|
/**
|
|
297
390
|
* Sets a LoadingContext that is watched for the loading state.
|
|
@@ -299,39 +392,43 @@ class DbxFormLoadingSourceDirective extends AbstractSubscriptionDirective {
|
|
|
299
392
|
set obs(obs) {
|
|
300
393
|
this._setObs(obs);
|
|
301
394
|
}
|
|
302
|
-
_setObs(
|
|
395
|
+
_setObs(inputObs) {
|
|
303
396
|
let subscription;
|
|
304
|
-
if (
|
|
305
|
-
subscription =
|
|
306
|
-
|
|
307
|
-
this.form.stream$.pipe(filter((x) => x.state !== DbxFormState.INITIALIZING), first()),
|
|
308
|
-
obs
|
|
309
|
-
]).pipe(map((x) => x[1]), filter((x) => Boolean(x)), distinctUntilChanged((x, y) => x.value === y.value)).subscribe((x) => {
|
|
310
|
-
if (!x.error && !x.loading) {
|
|
311
|
-
// console.log('Setting value: ', x.model);
|
|
397
|
+
if (inputObs) {
|
|
398
|
+
subscription = dbxFormSourceObservable(this.form, inputObs, this._mode).subscribe((x) => {
|
|
399
|
+
if (loadingStateHasFinishedLoading(x)) {
|
|
312
400
|
this.form.setValue(x.value);
|
|
313
401
|
}
|
|
314
402
|
});
|
|
315
403
|
}
|
|
316
404
|
this.sub = subscription;
|
|
317
405
|
}
|
|
406
|
+
ngOnDestroy() {
|
|
407
|
+
super.ngOnDestroy();
|
|
408
|
+
this._mode.complete();
|
|
409
|
+
}
|
|
318
410
|
}
|
|
319
|
-
DbxFormLoadingSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
320
|
-
DbxFormLoadingSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
411
|
+
DbxFormLoadingSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLoadingSourceDirective, deps: [{ token: DbxMutableForm, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
412
|
+
DbxFormLoadingSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormLoadingSourceDirective, selector: "[dbxFormLoadingSource]", inputs: { mode: ["dbxFormLoadingSourceMode", "mode"], obs: ["dbxFormLoadingSource", "obs"] }, usesInheritance: true, ngImport: i0 });
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLoadingSourceDirective, decorators: [{
|
|
322
414
|
type: Directive,
|
|
323
415
|
args: [{
|
|
324
416
|
selector: '[dbxFormLoadingSource]'
|
|
325
417
|
}]
|
|
326
418
|
}], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
|
|
327
419
|
type: Host
|
|
328
|
-
}] }]; }, propDecorators: {
|
|
420
|
+
}] }]; }, propDecorators: { mode: [{
|
|
421
|
+
type: Input,
|
|
422
|
+
args: ['dbxFormLoadingSourceMode']
|
|
423
|
+
}], obs: [{
|
|
329
424
|
type: Input,
|
|
330
425
|
args: ['dbxFormLoadingSource']
|
|
331
426
|
}] } });
|
|
332
427
|
|
|
333
428
|
/**
|
|
334
429
|
* Used to see form value changes.
|
|
430
|
+
*
|
|
431
|
+
* Emits undefined when the form is incomplete, and the value when the form is complete.
|
|
335
432
|
*/
|
|
336
433
|
class DbxFormValueChangesDirective extends AbstractSubscriptionDirective {
|
|
337
434
|
constructor(form) {
|
|
@@ -340,14 +437,23 @@ class DbxFormValueChangesDirective extends AbstractSubscriptionDirective {
|
|
|
340
437
|
this.dbxFormValueChange = new EventEmitter();
|
|
341
438
|
}
|
|
342
439
|
ngOnInit() {
|
|
343
|
-
this.sub = this.form.stream$.pipe(
|
|
344
|
-
|
|
440
|
+
this.sub = this.form.stream$.pipe(mergeMap((x) => this.form.getValue().pipe(first(), map((value) => ({ isComplete: x.isComplete, value })))), delay(0)).subscribe(({ isComplete, value }) => {
|
|
441
|
+
if (isComplete) {
|
|
442
|
+
this.dbxFormValueChange.next(value);
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
this.dbxFormValueChange.next(undefined);
|
|
446
|
+
}
|
|
345
447
|
});
|
|
346
448
|
}
|
|
449
|
+
ngOnDestroy() {
|
|
450
|
+
super.ngOnDestroy();
|
|
451
|
+
this.dbxFormValueChange.complete();
|
|
452
|
+
}
|
|
347
453
|
}
|
|
348
|
-
DbxFormValueChangesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
349
|
-
DbxFormValueChangesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
454
|
+
DbxFormValueChangesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormValueChangesDirective, deps: [{ token: DbxForm, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
455
|
+
DbxFormValueChangesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormValueChangesDirective, selector: "[dbxFormValueChange]", outputs: { dbxFormValueChange: "dbxFormValueChange" }, usesInheritance: true, ngImport: i0 });
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormValueChangesDirective, decorators: [{
|
|
351
457
|
type: Directive,
|
|
352
458
|
args: [{
|
|
353
459
|
selector: '[dbxFormValueChange]'
|
|
@@ -358,60 +464,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
358
464
|
type: Output
|
|
359
465
|
}] } });
|
|
360
466
|
|
|
361
|
-
/**
|
|
362
|
-
* Used with a FormComponent to set the value based on the input value.
|
|
363
|
-
*/
|
|
364
|
-
class DbxFormSourceDirective extends AbstractSubscriptionDirective {
|
|
365
|
-
constructor(form) {
|
|
366
|
-
super();
|
|
367
|
-
this.form = form;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Sets a LoadingContext that is watched for the loading state.
|
|
371
|
-
*/
|
|
372
|
-
set obs(obs) {
|
|
373
|
-
this._setObs(obs);
|
|
374
|
-
}
|
|
375
|
-
_setObs(obs) {
|
|
376
|
-
let subscription;
|
|
377
|
-
if (obs) {
|
|
378
|
-
subscription = combineLatest([
|
|
379
|
-
// Emit the first time initializing isn't there.
|
|
380
|
-
this.form.stream$.pipe(filter((x) => x.state !== DbxFormState.INITIALIZING), first()),
|
|
381
|
-
obs
|
|
382
|
-
]).pipe(map((x) => x[1]), distinctUntilChanged((x, y) => x === y)).subscribe((x) => {
|
|
383
|
-
this.form.setValue(x);
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
this.sub = subscription;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
DbxFormSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxFormSourceDirective, deps: [{ token: DbxMutableForm, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
390
|
-
DbxFormSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.4", type: DbxFormSourceDirective, selector: "[dbxFormSource]", inputs: { obs: ["dbxFormSource", "obs"] }, usesInheritance: true, ngImport: i0 });
|
|
391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxFormSourceDirective, decorators: [{
|
|
392
|
-
type: Directive,
|
|
393
|
-
args: [{
|
|
394
|
-
selector: '[dbxFormSource]'
|
|
395
|
-
}]
|
|
396
|
-
}], ctorParameters: function () { return [{ type: DbxMutableForm, decorators: [{
|
|
397
|
-
type: Host
|
|
398
|
-
}] }]; }, propDecorators: { obs: [{
|
|
399
|
-
type: Input,
|
|
400
|
-
args: ['dbxFormSource']
|
|
401
|
-
}] } });
|
|
402
|
-
|
|
403
467
|
class DbxFormIoModule {
|
|
404
468
|
}
|
|
405
|
-
DbxFormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
406
|
-
DbxFormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
469
|
+
DbxFormIoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormIoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
470
|
+
DbxFormIoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormIoModule, declarations: [DbxFormSourceDirective,
|
|
407
471
|
DbxFormValueChangesDirective,
|
|
408
472
|
DbxFormLoadingSourceDirective], imports: [CommonModule], exports: [DbxFormSourceDirective,
|
|
409
473
|
DbxFormValueChangesDirective,
|
|
410
474
|
DbxFormLoadingSourceDirective] });
|
|
411
|
-
DbxFormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
475
|
+
DbxFormIoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormIoModule, imports: [[
|
|
412
476
|
CommonModule
|
|
413
477
|
]] });
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormIoModule, decorators: [{
|
|
415
479
|
type: NgModule,
|
|
416
480
|
args: [{
|
|
417
481
|
imports: [
|
|
@@ -432,14 +496,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
432
496
|
|
|
433
497
|
class DbxFormModule {
|
|
434
498
|
}
|
|
435
|
-
DbxFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
436
|
-
DbxFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
499
|
+
DbxFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
500
|
+
DbxFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormModule, exports: [DbxFormActionTransitionModule,
|
|
437
501
|
DbxFormActionModule,
|
|
438
502
|
DbxFormIoModule] });
|
|
439
|
-
DbxFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
503
|
+
DbxFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormModule, imports: [DbxFormActionTransitionModule,
|
|
440
504
|
DbxFormActionModule,
|
|
441
505
|
DbxFormIoModule] });
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormModule, decorators: [{
|
|
443
507
|
type: NgModule,
|
|
444
508
|
args: [{
|
|
445
509
|
exports: [
|
|
@@ -463,8 +527,8 @@ function maxValidationMessage(err, field) {
|
|
|
463
527
|
return `This value should be less than ${field.templateOptions.max}`;
|
|
464
528
|
}
|
|
465
529
|
const REQUIRED_VALIDATION_MESSAGE = { name: 'required', message: 'This field is required' };
|
|
466
|
-
const MIN_LENGTH_VALIDATION_MESSAGE = { name: '
|
|
467
|
-
const MAX_LENGTH_VALIDATION_MESSAGE = { name: '
|
|
530
|
+
const MIN_LENGTH_VALIDATION_MESSAGE = { name: 'minLength', message: minLengthValidationMessage };
|
|
531
|
+
const MAX_LENGTH_VALIDATION_MESSAGE = { name: 'maxLength', message: maxLengthValidationMessage };
|
|
468
532
|
const MIN_VALIDATION_MESSAGE = { name: 'min', message: minValidationMessage };
|
|
469
533
|
const MAX_VALIDATION_MESSAGE = { name: 'max', message: maxValidationMessage };
|
|
470
534
|
const INVALID_PHONE_NUMBER_MESSAGE = { name: 'validatePhoneNumber', message: 'This is not a valid phone number.' };
|
|
@@ -484,15 +548,15 @@ class DbxDefaultChecklistItemFieldDisplayComponent {
|
|
|
484
548
|
return this.displayContent?.description;
|
|
485
549
|
}
|
|
486
550
|
}
|
|
487
|
-
DbxDefaultChecklistItemFieldDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
488
|
-
DbxDefaultChecklistItemFieldDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
551
|
+
DbxDefaultChecklistItemFieldDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDefaultChecklistItemFieldDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
552
|
+
DbxDefaultChecklistItemFieldDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxDefaultChecklistItemFieldDisplayComponent, selector: "ng-component", inputs: { displayContent: "displayContent" }, ngImport: i0, template: `
|
|
489
553
|
<div *ngIf="displayContent" class="dbx-default-checklist-item-field">
|
|
490
554
|
<div *ngIf="label" class="item-label">{{ label }}</div>
|
|
491
555
|
<div *ngIf="sublabel" class="item-sublabel">{{ sublabel }}</div>
|
|
492
556
|
<div *ngIf="description" class="dbx-hint item-description">{{ description }}</div>
|
|
493
557
|
</div>
|
|
494
558
|
`, isInline: true, directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDefaultChecklistItemFieldDisplayComponent, decorators: [{
|
|
496
560
|
type: Component,
|
|
497
561
|
args: [{
|
|
498
562
|
template: `
|
|
@@ -511,9 +575,9 @@ class DbxChecklistItemFieldComponent extends FieldType {
|
|
|
511
575
|
constructor() {
|
|
512
576
|
super(...arguments);
|
|
513
577
|
this._displayContent = new BehaviorSubject(undefined);
|
|
514
|
-
this.displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
|
|
515
|
-
this.anchor$ = this.displayContent$.pipe(map(x => x.anchor), shareReplay(1));
|
|
516
|
-
this.rippleDisabled$ = this.displayContent$.pipe(map(x => x.ripple === false || (x.ripple !== true && !x.anchor)), distinctUntilChanged(), shareReplay(1));
|
|
578
|
+
this.displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged$1(), shareReplay(1));
|
|
579
|
+
this.anchor$ = this.displayContent$.pipe(map$1(x => x.anchor), shareReplay(1));
|
|
580
|
+
this.rippleDisabled$ = this.displayContent$.pipe(map$1(x => x.ripple === false || (x.ripple !== true && !x.anchor)), distinctUntilChanged$1(), shareReplay(1));
|
|
517
581
|
}
|
|
518
582
|
get formGroup() {
|
|
519
583
|
return this.form;
|
|
@@ -546,9 +610,9 @@ class DbxChecklistItemFieldComponent extends FieldType {
|
|
|
546
610
|
this._displayContent.complete();
|
|
547
611
|
}
|
|
548
612
|
}
|
|
549
|
-
DbxChecklistItemFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
550
|
-
DbxChecklistItemFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
613
|
+
DbxChecklistItemFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
614
|
+
DbxChecklistItemFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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)\">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", components: [{ type: i0.forwardRef(function () { return i1.MatCheckbox; }), selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i0.forwardRef(function () { return i1$1.DbxAnchorComponent; }), selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { type: i0.forwardRef(function () { return DbxChecklistItemContentComponent; }), selector: "dbx-checklist-item-content-component" }, { type: i0.forwardRef(function () { return i2$1.MatIcon; }), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i0.forwardRef(function () { return i4$1.NgControlStatusGroup; }), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i0.forwardRef(function () { return i4$1.FormGroupDirective; }), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i0.forwardRef(function () { return i5.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i4$1.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { type: i0.forwardRef(function () { return i4$1.FormControlName; }), selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i0.forwardRef(function () { return i6.MatRipple; }), selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], pipes: { "async": i0.forwardRef(function () { return i5.AsyncPipe; }) } });
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemFieldComponent, decorators: [{
|
|
552
616
|
type: Component,
|
|
553
617
|
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)\">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" }]
|
|
554
618
|
}] });
|
|
@@ -570,13 +634,13 @@ class DbxChecklistItemContentComponent extends AbstractSubscriptionDirective {
|
|
|
570
634
|
};
|
|
571
635
|
}
|
|
572
636
|
}
|
|
573
|
-
DbxChecklistItemContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
574
|
-
DbxChecklistItemContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
637
|
+
DbxChecklistItemContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemContentComponent, deps: [{ token: DbxChecklistItemFieldComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
638
|
+
DbxChecklistItemContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxChecklistItemContentComponent, selector: "dbx-checklist-item-content-component", usesInheritance: true, ngImport: i0, template: `<dbx-injection [config]="config"></dbx-injection>`, isInline: true, components: [{ type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
|
|
639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemContentComponent, decorators: [{
|
|
576
640
|
type: Component,
|
|
577
641
|
args: [{
|
|
578
642
|
selector: 'dbx-checklist-item-content-component',
|
|
579
|
-
template: `<dbx-
|
|
643
|
+
template: `<dbx-injection [config]="config"></dbx-injection>`
|
|
580
644
|
}]
|
|
581
645
|
}], ctorParameters: function () { return [{ type: DbxChecklistItemFieldComponent }, { type: i0.ChangeDetectorRef }]; } });
|
|
582
646
|
|
|
@@ -588,8 +652,8 @@ class DbxFormInfoWrapperComponent extends FieldWrapper {
|
|
|
588
652
|
this.infoWrapper.onInfoClick();
|
|
589
653
|
}
|
|
590
654
|
}
|
|
591
|
-
DbxFormInfoWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
592
|
-
DbxFormInfoWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
655
|
+
DbxFormInfoWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormInfoWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
656
|
+
DbxFormInfoWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormInfoWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
593
657
|
<div class="dbx-form-info-wrapper" fxLayout="row">
|
|
594
658
|
<div class="dbx-form-info-wrapper-content" fxFlex="grow">
|
|
595
659
|
<ng-container #fieldComponent></ng-container>
|
|
@@ -602,7 +666,7 @@ DbxFormInfoWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
602
666
|
</div>
|
|
603
667
|
</div>
|
|
604
668
|
`, isInline: true, components: [{ type: i1$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3$1.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"] }, { type: i3$1.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"] }, { type: i3$1.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"] }] });
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormInfoWrapperComponent, decorators: [{
|
|
606
670
|
type: Component,
|
|
607
671
|
args: [{
|
|
608
672
|
template: `
|
|
@@ -629,13 +693,13 @@ class DbxFormSectionWrapperComponent extends FieldWrapper {
|
|
|
629
693
|
return this.to.sectionWrapper?.hint;
|
|
630
694
|
}
|
|
631
695
|
}
|
|
632
|
-
DbxFormSectionWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
633
|
-
DbxFormSectionWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
696
|
+
DbxFormSectionWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
697
|
+
DbxFormSectionWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormSectionWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
634
698
|
<dbx-section [header]="header" [hint]="hint">
|
|
635
699
|
<ng-container #fieldComponent></ng-container>
|
|
636
700
|
</dbx-section>
|
|
637
701
|
`, isInline: true, components: [{ type: i1$1.DbxSectionComponent, selector: "dbx-section", inputs: ["elevated"] }] });
|
|
638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSectionWrapperComponent, decorators: [{
|
|
639
703
|
type: Component,
|
|
640
704
|
args: [{
|
|
641
705
|
template: `
|
|
@@ -657,13 +721,13 @@ class DbxFormFlexWrapperComponent extends FieldWrapper {
|
|
|
657
721
|
return this.flexWrapper?.relative ?? false;
|
|
658
722
|
}
|
|
659
723
|
}
|
|
660
|
-
DbxFormFlexWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
661
|
-
DbxFormFlexWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
724
|
+
DbxFormFlexWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFlexWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
725
|
+
DbxFormFlexWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormFlexWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
662
726
|
<div class="dbx-form-flex-section" dbxFlexGroup [content]="false" [relative]="relative" [breakpoint]="breakpoint">
|
|
663
727
|
<ng-container #fieldComponent></ng-container>
|
|
664
728
|
</div>
|
|
665
729
|
`, isInline: true, directives: [{ type: i1$1.DbxFlexGroupDirective, selector: "[dbxFlexGroup]", inputs: ["content", "relative", "breakpoint"] }] });
|
|
666
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFlexWrapperComponent, decorators: [{
|
|
667
731
|
type: Component,
|
|
668
732
|
args: [{
|
|
669
733
|
template: `
|
|
@@ -682,13 +746,13 @@ class DbxFormSubsectionWrapperComponent extends FieldWrapper {
|
|
|
682
746
|
return this.to.subsectionWrapper?.hint;
|
|
683
747
|
}
|
|
684
748
|
}
|
|
685
|
-
DbxFormSubsectionWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
686
|
-
DbxFormSubsectionWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
749
|
+
DbxFormSubsectionWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSubsectionWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
750
|
+
DbxFormSubsectionWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormSubsectionWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
687
751
|
<dbx-subsection [header]="header" [hint]="hint">
|
|
688
752
|
<ng-container #fieldComponent></ng-container>
|
|
689
753
|
</dbx-subsection>
|
|
690
754
|
`, isInline: true, components: [{ type: i1$1.DbxSubSectionComponent, selector: "dbx-subsection" }] });
|
|
691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSubsectionWrapperComponent, decorators: [{
|
|
692
756
|
type: Component,
|
|
693
757
|
args: [{
|
|
694
758
|
template: `
|
|
@@ -706,7 +770,7 @@ class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
|
|
|
706
770
|
this._formControlObs = new BehaviorSubject(undefined);
|
|
707
771
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
708
772
|
this._toggleOpen = new BehaviorSubject(undefined);
|
|
709
|
-
this.show$ = this._toggleOpen.pipe(switchMap
|
|
773
|
+
this.show$ = this._toggleOpen.pipe(switchMap((toggleOpen) => {
|
|
710
774
|
if (toggleOpen != null) {
|
|
711
775
|
return of(toggleOpen);
|
|
712
776
|
}
|
|
@@ -714,7 +778,7 @@ class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
|
|
|
714
778
|
return this.hasValue$;
|
|
715
779
|
}
|
|
716
780
|
}), shareReplay$1(1));
|
|
717
|
-
this.hasValue$ = this.formControl$.pipe(switchMap
|
|
781
|
+
this.hasValue$ = this.formControl$.pipe(switchMap((x) => x.valueChanges.pipe(startWith(x.value), map((value) => {
|
|
718
782
|
return this.hasValueFn(value);
|
|
719
783
|
}), shareReplay$1(1))));
|
|
720
784
|
}
|
|
@@ -745,9 +809,9 @@ class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
|
|
|
745
809
|
this._formControlObs.complete();
|
|
746
810
|
}
|
|
747
811
|
}
|
|
748
|
-
AbstractFormExpandableSectionWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
749
|
-
AbstractFormExpandableSectionWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
812
|
+
AbstractFormExpandableSectionWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFormExpandableSectionWrapperDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
813
|
+
AbstractFormExpandableSectionWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractFormExpandableSectionWrapperDirective, usesInheritance: true, ngImport: i0 });
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFormExpandableSectionWrapperDirective, decorators: [{
|
|
751
815
|
type: Directive
|
|
752
816
|
}] });
|
|
753
817
|
|
|
@@ -759,8 +823,8 @@ class DbxFormExpandWrapperComponent extends AbstractFormExpandableSectionWrapper
|
|
|
759
823
|
return this.expandableSection?.buttonType ?? 'button';
|
|
760
824
|
}
|
|
761
825
|
}
|
|
762
|
-
DbxFormExpandWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
763
|
-
DbxFormExpandWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
826
|
+
DbxFormExpandWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExpandWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
827
|
+
DbxFormExpandWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormExpandWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
764
828
|
<ng-container [ngSwitch]="show$ | async">
|
|
765
829
|
<ng-container *ngSwitchCase="true">
|
|
766
830
|
<ng-container #fieldComponent></ng-container>
|
|
@@ -770,7 +834,7 @@ DbxFormExpandWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
770
834
|
</ng-container>
|
|
771
835
|
</ng-container>
|
|
772
836
|
`, isInline: true, directives: [{ type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i5.AsyncPipe } });
|
|
773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExpandWrapperComponent, decorators: [{
|
|
774
838
|
type: Component,
|
|
775
839
|
args: [{
|
|
776
840
|
template: `
|
|
@@ -799,9 +863,9 @@ class AutoTouchFieldWrapperComponent extends FieldWrapper {
|
|
|
799
863
|
});
|
|
800
864
|
}
|
|
801
865
|
}
|
|
802
|
-
AutoTouchFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
803
|
-
AutoTouchFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
866
|
+
AutoTouchFieldWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutoTouchFieldWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
867
|
+
AutoTouchFieldWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: AutoTouchFieldWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `<ng-container #fieldComponent></ng-container>`, isInline: true });
|
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AutoTouchFieldWrapperComponent, decorators: [{
|
|
805
869
|
type: Component,
|
|
806
870
|
args: [{
|
|
807
871
|
template: `<ng-container #fieldComponent></ng-container>`
|
|
@@ -814,7 +878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
814
878
|
class DbxFormToggleWrapperComponent extends AbstractFormExpandableSectionWrapperDirective {
|
|
815
879
|
constructor() {
|
|
816
880
|
super(...arguments);
|
|
817
|
-
this.slideLabel$ = this._toggleOpen.pipe(switchMap
|
|
881
|
+
this.slideLabel$ = this._toggleOpen.pipe(switchMap(x => {
|
|
818
882
|
if (this.expandableSection?.toggleLabelObs) {
|
|
819
883
|
return this.expandableSection?.toggleLabelObs(x);
|
|
820
884
|
}
|
|
@@ -824,13 +888,13 @@ class DbxFormToggleWrapperComponent extends AbstractFormExpandableSectionWrapper
|
|
|
824
888
|
}), shareReplay$1(1));
|
|
825
889
|
}
|
|
826
890
|
onToggleChange() {
|
|
827
|
-
this.show$.pipe(first
|
|
891
|
+
this.show$.pipe(first()).subscribe((show) => {
|
|
828
892
|
this._toggleOpen.next(!show);
|
|
829
893
|
});
|
|
830
894
|
}
|
|
831
895
|
}
|
|
832
|
-
DbxFormToggleWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
833
|
-
DbxFormToggleWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
896
|
+
DbxFormToggleWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormToggleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
897
|
+
DbxFormToggleWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormToggleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
834
898
|
<div class="dbx-form-toggle-wrapper" [ngSwitch]="show$ | async">
|
|
835
899
|
<div class="dbx-form-toggle-wrapper-toggle">
|
|
836
900
|
<mat-slide-toggle [checked]="show$ | async" (toggleChange)="onToggleChange()">{{ slideLabel$ | async }}</mat-slide-toggle>
|
|
@@ -840,7 +904,7 @@ DbxFormToggleWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
|
|
|
840
904
|
</ng-container>
|
|
841
905
|
</div>
|
|
842
906
|
`, isInline: true, components: [{ type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "async": i5.AsyncPipe } });
|
|
843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormToggleWrapperComponent, decorators: [{
|
|
844
908
|
type: Component,
|
|
845
909
|
args: [{
|
|
846
910
|
template: `
|
|
@@ -875,13 +939,13 @@ class DbxFormStyleWrapperComponent extends FieldWrapper {
|
|
|
875
939
|
this._style.complete();
|
|
876
940
|
}
|
|
877
941
|
}
|
|
878
|
-
DbxFormStyleWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
879
|
-
DbxFormStyleWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
942
|
+
DbxFormStyleWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormStyleWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
943
|
+
DbxFormStyleWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormStyleWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
880
944
|
<div [ngClass]="(style$ | async) ?? ''">
|
|
881
945
|
<ng-container #fieldComponent></ng-container>
|
|
882
946
|
</div>
|
|
883
947
|
`, isInline: true, directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"] }], pipes: { "async": i5.AsyncPipe } });
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormStyleWrapperComponent, decorators: [{
|
|
885
949
|
type: Component,
|
|
886
950
|
args: [{
|
|
887
951
|
template: `
|
|
@@ -892,27 +956,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
892
956
|
}]
|
|
893
957
|
}] });
|
|
894
958
|
|
|
959
|
+
/**
|
|
960
|
+
* Adds a loading bar to help signify asynchronos work is occuring.
|
|
961
|
+
*
|
|
962
|
+
* By default shows loading during asynchronous validation of a field (FormControl status is "PENDING")
|
|
963
|
+
*/
|
|
964
|
+
class DbxFormWorkingWrapperComponent extends FieldWrapper {
|
|
965
|
+
constructor() {
|
|
966
|
+
super(...arguments);
|
|
967
|
+
this.sub = new SubscriptionObject();
|
|
968
|
+
this.workingContext = new SimpleLoadingContext(false);
|
|
969
|
+
}
|
|
970
|
+
ngOnInit() {
|
|
971
|
+
this.sub.subscription = this.formControl?.statusChanges.subscribe({
|
|
972
|
+
next: (x) => this.workingContext.setLoading(x === 'PENDING')
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
ngOnDestroy() {
|
|
976
|
+
this.workingContext.destroy();
|
|
977
|
+
this.sub.destroy();
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
DbxFormWorkingWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormWorkingWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
981
|
+
DbxFormWorkingWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormWorkingWrapperComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
982
|
+
<div class="dbx-form-working-wrapper">
|
|
983
|
+
<ng-container #fieldComponent></ng-container>
|
|
984
|
+
<dbx-loading [linear]="true" [context]="workingContext"></dbx-loading>
|
|
985
|
+
</div>
|
|
986
|
+
`, isInline: true, components: [{ type: i1$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }] });
|
|
987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormWorkingWrapperComponent, decorators: [{
|
|
988
|
+
type: Component,
|
|
989
|
+
args: [{
|
|
990
|
+
template: `
|
|
991
|
+
<div class="dbx-form-working-wrapper">
|
|
992
|
+
<ng-container #fieldComponent></ng-container>
|
|
993
|
+
<dbx-loading [linear]="true" [context]="workingContext"></dbx-loading>
|
|
994
|
+
</div>
|
|
995
|
+
`
|
|
996
|
+
}]
|
|
997
|
+
}] });
|
|
998
|
+
|
|
895
999
|
class DbxFormFormlyWrapperModule {
|
|
896
1000
|
}
|
|
897
|
-
DbxFormFormlyWrapperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
898
|
-
DbxFormFormlyWrapperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1001
|
+
DbxFormFormlyWrapperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1002
|
+
DbxFormFormlyWrapperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyWrapperModule, declarations: [AutoTouchFieldWrapperComponent,
|
|
899
1003
|
DbxFormSectionWrapperComponent,
|
|
900
1004
|
DbxFormSubsectionWrapperComponent,
|
|
901
1005
|
DbxFormInfoWrapperComponent,
|
|
902
1006
|
DbxFormExpandWrapperComponent,
|
|
903
1007
|
DbxFormToggleWrapperComponent,
|
|
904
1008
|
DbxFormFlexWrapperComponent,
|
|
905
|
-
DbxFormStyleWrapperComponent
|
|
1009
|
+
DbxFormStyleWrapperComponent,
|
|
1010
|
+
DbxFormWorkingWrapperComponent], imports: [CommonModule,
|
|
906
1011
|
DbxTextModule,
|
|
1012
|
+
DbxLoadingModule,
|
|
907
1013
|
DbxFlexLayoutModule,
|
|
908
1014
|
DbxSectionLayoutModule,
|
|
909
1015
|
MatButtonModule,
|
|
910
1016
|
MatSlideToggleModule,
|
|
911
1017
|
MatIconModule,
|
|
912
1018
|
FlexLayoutModule, i1$4.FormlyModule] });
|
|
913
|
-
DbxFormFormlyWrapperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1019
|
+
DbxFormFormlyWrapperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyWrapperModule, imports: [[
|
|
914
1020
|
CommonModule,
|
|
915
1021
|
DbxTextModule,
|
|
1022
|
+
DbxLoadingModule,
|
|
916
1023
|
DbxFlexLayoutModule,
|
|
917
1024
|
DbxSectionLayoutModule,
|
|
918
1025
|
MatButtonModule,
|
|
@@ -928,16 +1035,18 @@ DbxFormFormlyWrapperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.
|
|
|
928
1035
|
{ name: 'subsection', component: DbxFormSubsectionWrapperComponent },
|
|
929
1036
|
{ name: 'info', component: DbxFormInfoWrapperComponent },
|
|
930
1037
|
{ name: 'flex', component: DbxFormFlexWrapperComponent },
|
|
931
|
-
{ name: 'style', component: DbxFormStyleWrapperComponent }
|
|
1038
|
+
{ name: 'style', component: DbxFormStyleWrapperComponent },
|
|
1039
|
+
{ name: 'working', component: DbxFormWorkingWrapperComponent }
|
|
932
1040
|
]
|
|
933
1041
|
})
|
|
934
1042
|
]] });
|
|
935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyWrapperModule, decorators: [{
|
|
936
1044
|
type: NgModule,
|
|
937
1045
|
args: [{
|
|
938
1046
|
imports: [
|
|
939
1047
|
CommonModule,
|
|
940
1048
|
DbxTextModule,
|
|
1049
|
+
DbxLoadingModule,
|
|
941
1050
|
DbxFlexLayoutModule,
|
|
942
1051
|
DbxSectionLayoutModule,
|
|
943
1052
|
MatButtonModule,
|
|
@@ -953,7 +1062,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
953
1062
|
{ name: 'subsection', component: DbxFormSubsectionWrapperComponent },
|
|
954
1063
|
{ name: 'info', component: DbxFormInfoWrapperComponent },
|
|
955
1064
|
{ name: 'flex', component: DbxFormFlexWrapperComponent },
|
|
956
|
-
{ name: 'style', component: DbxFormStyleWrapperComponent }
|
|
1065
|
+
{ name: 'style', component: DbxFormStyleWrapperComponent },
|
|
1066
|
+
{ name: 'working', component: DbxFormWorkingWrapperComponent }
|
|
957
1067
|
]
|
|
958
1068
|
})
|
|
959
1069
|
],
|
|
@@ -965,7 +1075,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
965
1075
|
DbxFormExpandWrapperComponent,
|
|
966
1076
|
DbxFormToggleWrapperComponent,
|
|
967
1077
|
DbxFormFlexWrapperComponent,
|
|
968
|
-
DbxFormStyleWrapperComponent
|
|
1078
|
+
DbxFormStyleWrapperComponent,
|
|
1079
|
+
DbxFormWorkingWrapperComponent
|
|
969
1080
|
],
|
|
970
1081
|
exports: []
|
|
971
1082
|
}]
|
|
@@ -973,8 +1084,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
973
1084
|
|
|
974
1085
|
class DbxFormFormlyChecklistItemFieldModule {
|
|
975
1086
|
}
|
|
976
|
-
DbxFormFormlyChecklistItemFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
977
|
-
DbxFormFormlyChecklistItemFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1087
|
+
DbxFormFormlyChecklistItemFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1088
|
+
DbxFormFormlyChecklistItemFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, declarations: [DbxChecklistItemFieldComponent,
|
|
978
1089
|
DbxChecklistItemContentComponent,
|
|
979
1090
|
DbxDefaultChecklistItemFieldDisplayComponent], imports: [CommonModule,
|
|
980
1091
|
DbxTextModule,
|
|
@@ -984,10 +1095,10 @@ DbxFormFormlyChecklistItemFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVers
|
|
|
984
1095
|
MatCheckboxModule,
|
|
985
1096
|
MatButtonModule,
|
|
986
1097
|
MatIconModule,
|
|
987
|
-
|
|
988
|
-
|
|
1098
|
+
DbxRouterAnchorModule,
|
|
1099
|
+
DbxInjectionComponentModule,
|
|
989
1100
|
DbxFormFormlyWrapperModule, i1$4.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
|
|
990
|
-
DbxFormFormlyChecklistItemFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1101
|
+
DbxFormFormlyChecklistItemFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, imports: [[
|
|
991
1102
|
CommonModule,
|
|
992
1103
|
DbxTextModule,
|
|
993
1104
|
FormsModule,
|
|
@@ -996,8 +1107,8 @@ DbxFormFormlyChecklistItemFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVers
|
|
|
996
1107
|
MatCheckboxModule,
|
|
997
1108
|
MatButtonModule,
|
|
998
1109
|
MatIconModule,
|
|
999
|
-
|
|
1000
|
-
|
|
1110
|
+
DbxRouterAnchorModule,
|
|
1111
|
+
DbxInjectionComponentModule,
|
|
1001
1112
|
DbxFormFormlyWrapperModule,
|
|
1002
1113
|
FormlyModule.forChild({
|
|
1003
1114
|
types: [
|
|
@@ -1005,7 +1116,7 @@ DbxFormFormlyChecklistItemFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVers
|
|
|
1005
1116
|
]
|
|
1006
1117
|
})
|
|
1007
1118
|
], DbxFormFormlyWrapperModule] });
|
|
1008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyChecklistItemFieldModule, decorators: [{
|
|
1009
1120
|
type: NgModule,
|
|
1010
1121
|
args: [{
|
|
1011
1122
|
imports: [
|
|
@@ -1017,8 +1128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1017
1128
|
MatCheckboxModule,
|
|
1018
1129
|
MatButtonModule,
|
|
1019
1130
|
MatIconModule,
|
|
1020
|
-
|
|
1021
|
-
|
|
1131
|
+
DbxRouterAnchorModule,
|
|
1132
|
+
DbxInjectionComponentModule,
|
|
1022
1133
|
DbxFormFormlyWrapperModule,
|
|
1023
1134
|
FormlyModule.forChild({
|
|
1024
1135
|
types: [
|
|
@@ -1129,7 +1240,7 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1129
1240
|
mergedConfig.displayContentObs = combineLatest([
|
|
1130
1241
|
currentField.displayContentObs,
|
|
1131
1242
|
config.displayContentObs
|
|
1132
|
-
]).pipe(map(([a, b]) => {
|
|
1243
|
+
]).pipe(map$1(([a, b]) => {
|
|
1133
1244
|
const result = {
|
|
1134
1245
|
...a,
|
|
1135
1246
|
...b
|
|
@@ -1185,7 +1296,7 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1185
1296
|
}
|
|
1186
1297
|
// MARK: Utility
|
|
1187
1298
|
customContentFromData(mapFn) {
|
|
1188
|
-
return this.dataObs$.pipe(map(mapFn));
|
|
1299
|
+
return this.dataObs$.pipe(map$1(mapFn));
|
|
1189
1300
|
}
|
|
1190
1301
|
contentWithValueFromData(key, contentFn) {
|
|
1191
1302
|
return this.customContentFromData((data) => {
|
|
@@ -1205,78 +1316,63 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1205
1316
|
}
|
|
1206
1317
|
}
|
|
1207
1318
|
|
|
1208
|
-
class
|
|
1209
|
-
}
|
|
1210
|
-
class FormComponentFieldComponent extends FieldType {
|
|
1319
|
+
class DbxFormComponentFieldComponent extends FieldType {
|
|
1211
1320
|
get config() {
|
|
1212
|
-
return this._config;
|
|
1213
|
-
}
|
|
1214
|
-
get componentField() {
|
|
1215
1321
|
return this.field.componentField;
|
|
1216
1322
|
}
|
|
1217
|
-
ngOnInit() {
|
|
1218
|
-
this._config = {
|
|
1219
|
-
componentClass: this.componentField.componentClass,
|
|
1220
|
-
init: (instance) => {
|
|
1221
|
-
instance.field = this;
|
|
1222
|
-
}
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
1323
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
<div class="form-
|
|
1229
|
-
`, isInline: true, components: [{ type: i2.
|
|
1230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1324
|
+
DbxFormComponentFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormComponentFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1325
|
+
DbxFormComponentFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormComponentFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
1326
|
+
<div class="dbx-form-component" dbx-injection [config]="config"></div>
|
|
1327
|
+
`, isInline: true, components: [{ type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }] });
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormComponentFieldComponent, decorators: [{
|
|
1231
1329
|
type: Component,
|
|
1232
1330
|
args: [{
|
|
1233
1331
|
template: `
|
|
1234
|
-
<div class="form-
|
|
1332
|
+
<div class="dbx-form-component" dbx-injection [config]="config"></div>
|
|
1235
1333
|
`
|
|
1236
1334
|
}]
|
|
1237
1335
|
}] });
|
|
1238
1336
|
|
|
1239
1337
|
class DbxFormFormlyComponentFieldModule {
|
|
1240
1338
|
}
|
|
1241
|
-
DbxFormFormlyComponentFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1242
|
-
DbxFormFormlyComponentFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1243
|
-
|
|
1244
|
-
DbxFormFormlyComponentFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1339
|
+
DbxFormFormlyComponentFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyComponentFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1340
|
+
DbxFormFormlyComponentFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyComponentFieldModule, declarations: [DbxFormComponentFieldComponent], imports: [CommonModule,
|
|
1341
|
+
DbxInjectionComponentModule, i1$4.FormlyModule], exports: [DbxFormComponentFieldComponent] });
|
|
1342
|
+
DbxFormFormlyComponentFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyComponentFieldModule, imports: [[
|
|
1245
1343
|
CommonModule,
|
|
1246
|
-
|
|
1344
|
+
DbxInjectionComponentModule,
|
|
1247
1345
|
FormlyModule.forChild({
|
|
1248
1346
|
types: [
|
|
1249
|
-
{ name: 'component', component:
|
|
1347
|
+
{ name: 'component', component: DbxFormComponentFieldComponent }
|
|
1250
1348
|
]
|
|
1251
1349
|
})
|
|
1252
1350
|
]] });
|
|
1253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyComponentFieldModule, decorators: [{
|
|
1254
1352
|
type: NgModule,
|
|
1255
1353
|
args: [{
|
|
1256
1354
|
imports: [
|
|
1257
1355
|
CommonModule,
|
|
1258
|
-
|
|
1356
|
+
DbxInjectionComponentModule,
|
|
1259
1357
|
FormlyModule.forChild({
|
|
1260
1358
|
types: [
|
|
1261
|
-
{ name: 'component', component:
|
|
1359
|
+
{ name: 'component', component: DbxFormComponentFieldComponent }
|
|
1262
1360
|
]
|
|
1263
1361
|
})
|
|
1264
1362
|
],
|
|
1265
1363
|
declarations: [
|
|
1266
|
-
|
|
1364
|
+
DbxFormComponentFieldComponent
|
|
1267
1365
|
],
|
|
1268
1366
|
exports: [
|
|
1269
|
-
|
|
1367
|
+
DbxFormComponentFieldComponent
|
|
1270
1368
|
]
|
|
1271
1369
|
}]
|
|
1272
1370
|
}] });
|
|
1273
1371
|
|
|
1274
|
-
function componentField(
|
|
1372
|
+
function componentField(config) {
|
|
1275
1373
|
return {
|
|
1276
1374
|
type: 'component',
|
|
1277
|
-
componentField:
|
|
1278
|
-
componentClass
|
|
1279
|
-
}
|
|
1375
|
+
componentField: config
|
|
1280
1376
|
};
|
|
1281
1377
|
}
|
|
1282
1378
|
|
|
@@ -1291,18 +1387,18 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1291
1387
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
1292
1388
|
this._displayHashMap = new BehaviorSubject(new Map());
|
|
1293
1389
|
this.filterInputValue$ = this.inputCtrl.valueChanges.pipe(startWith(undefined));
|
|
1294
|
-
this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged
|
|
1295
|
-
this.loadResultsDisplayValuesState$ = this.formControl$.pipe(first
|
|
1296
|
-
this._formControlValue = this.formControl$.pipe(switchMap
|
|
1297
|
-
this.loadResultsDisplayValues$ = this.loadResultsDisplayValuesState$.pipe(map
|
|
1390
|
+
this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay$1(1));
|
|
1391
|
+
this.loadResultsDisplayValuesState$ = this.formControl$.pipe(first(), switchMap(() => this.loadValuesFn().pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)), startWith(beginLoading()))), shareReplay$1(1));
|
|
1392
|
+
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay$1(1))));
|
|
1393
|
+
this.loadResultsDisplayValues$ = this.loadResultsDisplayValuesState$.pipe(map(x => x?.value ?? []));
|
|
1298
1394
|
/**
|
|
1299
1395
|
* Current values in the form control.
|
|
1300
1396
|
*/
|
|
1301
|
-
this.values$ = this._formControlValue.pipe(map
|
|
1397
|
+
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay$1(1));
|
|
1302
1398
|
/**
|
|
1303
1399
|
* Current values with their display value.
|
|
1304
1400
|
*/
|
|
1305
|
-
this.displayValuesState$ = combineLatest([this.loadResultsDisplayValues$, this.values$]).pipe(switchMap
|
|
1401
|
+
this.displayValuesState$ = combineLatest([this.loadResultsDisplayValues$, this.values$]).pipe(switchMap(([displayValues, currentValues]) => {
|
|
1306
1402
|
const displayValuesMap = makeValuesGroupMap(displayValues, (x) => this.hashForValue(x.value));
|
|
1307
1403
|
const valuesNotInDisplayMap = [];
|
|
1308
1404
|
currentValues.forEach((x) => {
|
|
@@ -1313,7 +1409,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1313
1409
|
}
|
|
1314
1410
|
});
|
|
1315
1411
|
if (valuesNotInDisplayMap.length) {
|
|
1316
|
-
return this.loadDisplayValuesForValues(valuesNotInDisplayMap).pipe(map
|
|
1412
|
+
return this.loadDisplayValuesForValues(valuesNotInDisplayMap).pipe(map(x => mapLoadingStateResults(x, {
|
|
1317
1413
|
mapValue: (loadedValues) => {
|
|
1318
1414
|
loadedValues.forEach(x => x.isUnknown = x.isUnknown ?? true); // Assign unknown flag.
|
|
1319
1415
|
return ([...displayValues, ...loadedValues]);
|
|
@@ -1327,32 +1423,32 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1327
1423
|
/**
|
|
1328
1424
|
* Results to be displayed if filtered.
|
|
1329
1425
|
*/
|
|
1330
|
-
this.filteredSearchResultsState$ = this.loadResultsDisplayValues$.pipe(switchMap
|
|
1426
|
+
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, {
|
|
1331
1427
|
mapValue: (displayValues) => {
|
|
1332
1428
|
const valueHashSet = new Set(values.map(x => this.hashForValue(x)));
|
|
1333
1429
|
return displayValues.filter(x => !x.isUnknown && valueHashSet.has(x._hash));
|
|
1334
1430
|
}
|
|
1335
1431
|
})), startWith(beginLoading()))))), shareReplay$1(1));
|
|
1336
|
-
this.filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map
|
|
1337
|
-
this.items$ = combineLatest([this.filteredSearchResults$, this.values$]).pipe(map
|
|
1432
|
+
this.filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map(x => x?.value), filterMaybe(), shareReplay$1(1));
|
|
1433
|
+
this.items$ = combineLatest([this.filteredSearchResults$, this.values$]).pipe(map(([displayValues, values]) => {
|
|
1338
1434
|
const selectedHashValuesSet = new Set(values.map(x => this.hashForValue(x)));
|
|
1339
|
-
let items = displayValues.map((x) => ({
|
|
1435
|
+
let items = displayValues.map((x) => ({ itemValue: x, selected: selectedHashValuesSet.has(x._hash) }));
|
|
1340
1436
|
if (this.sortItems) {
|
|
1341
1437
|
items = this.sortItems(items);
|
|
1342
1438
|
}
|
|
1343
1439
|
return items;
|
|
1344
1440
|
}), shareReplay$1(1));
|
|
1345
|
-
this.itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap
|
|
1441
|
+
this.itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap(x => this.items$.pipe(first(), map(x => successResult(x)), startWith(beginLoading()), shareReplay$1(1))));
|
|
1346
1442
|
/**
|
|
1347
1443
|
* Context used for managing the loading of items, or when the current results change.
|
|
1348
1444
|
*/
|
|
1349
1445
|
this.context = new ListLoadingStateContextInstance({ obs: this.itemsLoadingState$, showLoadingOnNoValue: false });
|
|
1350
|
-
this.filterItemsLoadingState$ = this.items$.pipe(map
|
|
1446
|
+
this.filterItemsLoadingState$ = this.items$.pipe(map(x => successResult(x)), startWith(beginLoading()), shareReplay$1(1));
|
|
1351
1447
|
/**
|
|
1352
1448
|
* Context used for searching/filtering.
|
|
1353
1449
|
*/
|
|
1354
1450
|
this.filterResultsContext = new ListLoadingStateContextInstance({ obs: this.filteredSearchResultsState$, showLoadingOnNoValue: true });
|
|
1355
|
-
this.noItemsAvailable$ = this.filterItemsLoadingState$.pipe(isListLoadingStateEmpty(), distinctUntilChanged
|
|
1451
|
+
this.noItemsAvailable$ = this.filterItemsLoadingState$.pipe(isListLoadingStateEmpty(), distinctUntilChanged());
|
|
1356
1452
|
}
|
|
1357
1453
|
get readonly() {
|
|
1358
1454
|
return this.field.templateOptions?.readonly;
|
|
@@ -1381,6 +1477,9 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1381
1477
|
get autocomplete() {
|
|
1382
1478
|
return this.field.templateOptions?.attributes?.['autocomplete'] ?? this.key;
|
|
1383
1479
|
}
|
|
1480
|
+
get changeSelectionModeToViewOnDisabled() {
|
|
1481
|
+
return this.pickableField.changeSelectionModeToViewOnDisabled ?? false;
|
|
1482
|
+
}
|
|
1384
1483
|
get sortItems() {
|
|
1385
1484
|
return this.pickableField.sortItems;
|
|
1386
1485
|
}
|
|
@@ -1434,7 +1533,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1434
1533
|
return this.loadDisplayValuesForFieldValues(values.map((value) => ({ value })));
|
|
1435
1534
|
}
|
|
1436
1535
|
loadDisplayValuesForFieldValues(values) {
|
|
1437
|
-
return this.getDisplayValuesForFieldValues(values).pipe(map
|
|
1536
|
+
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)), startWith(beginLoading()), shareReplay$1(1));
|
|
1438
1537
|
}
|
|
1439
1538
|
getDisplayValuesForFieldValues(values) {
|
|
1440
1539
|
return this._displayHashMap.pipe(mergeMap((displayMap) => {
|
|
@@ -1446,7 +1545,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1446
1545
|
if (needsDisplay.length > 0) {
|
|
1447
1546
|
// Go get the display value.
|
|
1448
1547
|
const displayValuesObs = this.displayForValue(needsDisplay.map(x => x[2]));
|
|
1449
|
-
return displayValuesObs.pipe(first
|
|
1548
|
+
return displayValuesObs.pipe(first(), map((displayResults) => {
|
|
1450
1549
|
const displayResultsWithHash = displayResults.map((x) => {
|
|
1451
1550
|
x._hash = this.hashForValue(x.value);
|
|
1452
1551
|
return x;
|
|
@@ -1469,10 +1568,9 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1469
1568
|
}));
|
|
1470
1569
|
}
|
|
1471
1570
|
ngOnInit() {
|
|
1472
|
-
super.ngOnInit();
|
|
1473
1571
|
this._formControlObs.next(this.formControl);
|
|
1474
1572
|
// Focus after finished loading for the first time.
|
|
1475
|
-
this.context.loading$.pipe(delay(10), filter
|
|
1573
|
+
this.context.loading$.pipe(delay(10), filter(x => x), first()).subscribe(() => {
|
|
1476
1574
|
this.filterMatInput?.focus();
|
|
1477
1575
|
});
|
|
1478
1576
|
}
|
|
@@ -1515,9 +1613,9 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1515
1613
|
this.formControl.markAsDirty();
|
|
1516
1614
|
}
|
|
1517
1615
|
}
|
|
1518
|
-
AbstractDbxPickableItemFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1519
|
-
AbstractDbxPickableItemFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1616
|
+
AbstractDbxPickableItemFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxPickableItemFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1617
|
+
AbstractDbxPickableItemFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxPickableItemFieldDirective, viewQueries: [{ propertyName: "filterMatInput", first: true, predicate: ["filterMatInput"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
|
|
1618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxPickableItemFieldDirective, decorators: [{
|
|
1521
1619
|
type: Directive
|
|
1522
1620
|
}], propDecorators: { filterMatInput: [{
|
|
1523
1621
|
type: ViewChild,
|
|
@@ -1531,19 +1629,19 @@ class DbxPickableChipListFieldComponent extends AbstractDbxPickableItemFieldDire
|
|
|
1531
1629
|
itemClicked(item) {
|
|
1532
1630
|
if (!item.disabled && !this.isReadonlyOrDisabled) {
|
|
1533
1631
|
if (item.selected) {
|
|
1534
|
-
this.removeValue(item.
|
|
1632
|
+
this.removeValue(item.itemValue.value);
|
|
1535
1633
|
}
|
|
1536
1634
|
else {
|
|
1537
|
-
this.addValue(item.
|
|
1635
|
+
this.addValue(item.itemValue.value);
|
|
1538
1636
|
}
|
|
1539
1637
|
}
|
|
1540
1638
|
}
|
|
1541
1639
|
}
|
|
1542
|
-
DbxPickableChipListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1543
|
-
DbxPickableChipListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1640
|
+
DbxPickableChipListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableChipListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1641
|
+
DbxPickableChipListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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-list [required]=\"required\" [selectable]=\"!isReadonlyOrDisabled\" #chipList>\n <mat-chip *ngFor=\"let item of items$ | async\" (click)=\"itemClicked(item)\" [selected]=\"item.selected\"\n [disabled]=\"isReadonlyOrDisabled || item.disabled\">\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>\n </mat-chip-list>\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\n [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", components: [{ type: i1$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { type: i1$5.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { type: i4$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i6$1.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"] }, { type: i4$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]" }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i5.AsyncPipe } });
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableChipListFieldComponent, decorators: [{
|
|
1545
1643
|
type: Component,
|
|
1546
|
-
args: [{ 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-list [required]=\"required\" [selectable]=\"!isReadonlyOrDisabled\" #chipList>\n <mat-chip *ngFor=\"let item of items$ | async\" (click)=\"itemClicked(item)\" [selected]=\"item.selected\"\n [disabled]=\"isReadonlyOrDisabled || item.disabled\">\n <span class=\"dbx-chip-label\">{{ item.
|
|
1644
|
+
args: [{ 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-list [required]=\"required\" [selectable]=\"!isReadonlyOrDisabled\" #chipList>\n <mat-chip *ngFor=\"let item of items$ | async\" (click)=\"itemClicked(item)\" [selected]=\"item.selected\"\n [disabled]=\"isReadonlyOrDisabled || item.disabled\">\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>\n </mat-chip-list>\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\n [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" }]
|
|
1547
1645
|
}] });
|
|
1548
1646
|
|
|
1549
1647
|
/**
|
|
@@ -1552,15 +1650,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1552
1650
|
class DbxPickableListFieldComponent extends AbstractDbxPickableItemFieldDirective {
|
|
1553
1651
|
onSelectionChange(event) {
|
|
1554
1652
|
const items = event.items;
|
|
1555
|
-
const values = items.map(x => x.
|
|
1653
|
+
const values = items.map(x => x.itemValue.value);
|
|
1556
1654
|
this.setValues(values);
|
|
1557
1655
|
}
|
|
1558
1656
|
}
|
|
1559
|
-
DbxPickableListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1560
|
-
DbxPickableListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1657
|
+
DbxPickableListFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1658
|
+
DbxPickableListFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </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\n [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", components: [{ type: i0.forwardRef(function () { return i1$1.DbxLoadingComponent; }), selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { type: i0.forwardRef(function () { return DbxPickableListFieldItemListComponent; }), selector: "dbx-form-pickable-item-field-item-list" }, { type: i0.forwardRef(function () { return i2.DbxInjectionComponent; }), selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { type: i0.forwardRef(function () { return i4$2.MatDivider; }), selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i0.forwardRef(function () { return i5.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i0.forwardRef(function () { return i5.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i0.forwardRef(function () { return i6$1.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"] }, { type: i0.forwardRef(function () { return i4$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]" }, { type: i0.forwardRef(function () { return i4$1.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { type: i0.forwardRef(function () { return i4$1.FormControlDirective; }), selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i0.forwardRef(function () { return i5.AsyncPipe; }) } });
|
|
1659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldComponent, decorators: [{
|
|
1562
1660
|
type: Component,
|
|
1563
|
-
args: [{ 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$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </dbx-form-pickable-item-field-item-list>\n </div>\n <dbx-
|
|
1661
|
+
args: [{ 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$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </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\n [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" }]
|
|
1564
1662
|
}] });
|
|
1565
1663
|
// MARK: Selection List
|
|
1566
1664
|
class DbxPickableListFieldItemListComponent extends AbstractDbxSelectionListWrapperDirective {
|
|
@@ -1570,9 +1668,9 @@ class DbxPickableListFieldItemListComponent extends AbstractDbxSelectionListWrap
|
|
|
1570
1668
|
});
|
|
1571
1669
|
}
|
|
1572
1670
|
}
|
|
1573
|
-
DbxPickableListFieldItemListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1574
|
-
DbxPickableListFieldItemListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1671
|
+
DbxPickableListFieldItemListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1672
|
+
DbxPickableListFieldItemListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", 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</dbx-list>\n", isInline: true, components: [{ type: i1$1.DbxListComponent, selector: "dbx-list", inputs: ["padded", "state$", "config", "disabled", "selectionMode"], outputs: ["contentScrolled"] }], pipes: { "async": i5.AsyncPipe } });
|
|
1673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListComponent, decorators: [{
|
|
1576
1674
|
type: Component,
|
|
1577
1675
|
args: [{
|
|
1578
1676
|
selector: 'dbx-form-pickable-item-field-item-list',
|
|
@@ -1582,7 +1680,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1582
1680
|
/**
|
|
1583
1681
|
* NOTE: Values input are PickableItemFieldItem<T>, but output values are PickableValueFieldDisplayValue<T>.
|
|
1584
1682
|
*/
|
|
1585
|
-
class DbxPickableListFieldItemListViewComponent extends
|
|
1683
|
+
class DbxPickableListFieldItemListViewComponent extends AbstractDbxSelectionListViewDirective {
|
|
1586
1684
|
constructor(dbxPickableListFieldComponent) {
|
|
1587
1685
|
super();
|
|
1588
1686
|
this.dbxPickableListFieldComponent = dbxPickableListFieldComponent;
|
|
@@ -1591,31 +1689,38 @@ class DbxPickableListFieldItemListViewComponent extends AbstractSelectionValueLi
|
|
|
1591
1689
|
};
|
|
1592
1690
|
this.items$ = this.values$.pipe(
|
|
1593
1691
|
// NOTE: This causes the "value" to be a PickableValueFieldDisplayValue<T>, which means we emit PickableValueFieldDisplayValue<T> to DbxPickableListFieldComponent.
|
|
1594
|
-
map
|
|
1692
|
+
map(x => addConfigToValueListItems(this.config, x)), shareReplay$1(1));
|
|
1595
1693
|
}
|
|
1596
1694
|
get multiple() {
|
|
1597
1695
|
return this.dbxPickableListFieldComponent.multiSelect;
|
|
1598
1696
|
}
|
|
1697
|
+
get selectionMode() {
|
|
1698
|
+
let selectionMode = 'select';
|
|
1699
|
+
if (this.dbxPickableListFieldComponent.disabled && this.dbxPickableListFieldComponent.changeSelectionModeToViewOnDisabled) {
|
|
1700
|
+
selectionMode = 'view';
|
|
1701
|
+
}
|
|
1702
|
+
return selectionMode;
|
|
1703
|
+
}
|
|
1599
1704
|
}
|
|
1600
|
-
DbxPickableListFieldItemListViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1601
|
-
DbxPickableListFieldItemListViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1705
|
+
DbxPickableListFieldItemListViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, deps: [{ token: DbxPickableListFieldComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
1706
|
+
DbxPickableListFieldItemListViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxPickableListFieldItemListViewComponent, selector: "ng-component", providers: ProvideDbxListView(DbxPickableListFieldItemListViewComponent), usesInheritance: true, ngImport: i0, template: `<dbx-selection-list-view-content [multiple]="multiple" [selectionMode]="selectionMode" [items]="items$ | async"></dbx-selection-list-view-content>`, isInline: true, components: [{ type: i1$1.DbxSelectionValueListItemViewComponent, selector: "dbx-selection-list-view-content", inputs: ["multiple", "selectionMode"] }], pipes: { "async": i5.AsyncPipe } });
|
|
1707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, decorators: [{
|
|
1603
1708
|
type: Component,
|
|
1604
1709
|
args: [{
|
|
1605
|
-
template: `<dbx-selection-list-view-content [multiple]="multiple" [items]="items$ | async"></dbx-selection-list-view-content>`,
|
|
1710
|
+
template: `<dbx-selection-list-view-content [multiple]="multiple" [selectionMode]="selectionMode" [items]="items$ | async"></dbx-selection-list-view-content>`,
|
|
1606
1711
|
providers: ProvideDbxListView(DbxPickableListFieldItemListViewComponent)
|
|
1607
1712
|
}]
|
|
1608
1713
|
}], ctorParameters: function () { return [{ type: DbxPickableListFieldComponent }]; } });
|
|
1609
|
-
class DbxPickableListFieldItemListViewItemComponent extends
|
|
1714
|
+
class DbxPickableListFieldItemListViewItemComponent extends AbstractDbxValueListViewItemComponent {
|
|
1610
1715
|
get label() {
|
|
1611
|
-
return this.
|
|
1716
|
+
return this.itemValue.label;
|
|
1612
1717
|
}
|
|
1613
1718
|
}
|
|
1614
|
-
DbxPickableListFieldItemListViewItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1615
|
-
DbxPickableListFieldItemListViewItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1719
|
+
DbxPickableListFieldItemListViewItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1720
|
+
DbxPickableListFieldItemListViewItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxPickableListFieldItemListViewItemComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
1616
1721
|
<p>{{ label }}</p>
|
|
1617
1722
|
`, isInline: true });
|
|
1618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewItemComponent, decorators: [{
|
|
1619
1724
|
type: Component,
|
|
1620
1725
|
args: [{
|
|
1621
1726
|
template: `
|
|
@@ -1626,8 +1731,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1626
1731
|
|
|
1627
1732
|
class DbxFormFormlyPickableFieldModule {
|
|
1628
1733
|
}
|
|
1629
|
-
DbxFormFormlyPickableFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1630
|
-
DbxFormFormlyPickableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1734
|
+
DbxFormFormlyPickableFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPickableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1735
|
+
DbxFormFormlyPickableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPickableFieldModule, declarations: [DbxPickableChipListFieldComponent,
|
|
1631
1736
|
DbxPickableListFieldComponent,
|
|
1632
1737
|
DbxPickableListFieldItemListComponent,
|
|
1633
1738
|
DbxPickableListFieldItemListViewComponent,
|
|
@@ -1643,12 +1748,12 @@ DbxFormFormlyPickableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion:
|
|
|
1643
1748
|
MatAutocompleteModule,
|
|
1644
1749
|
MatListModule,
|
|
1645
1750
|
DbxDatePipeModule,
|
|
1646
|
-
|
|
1751
|
+
DbxRouterAnchorModule,
|
|
1647
1752
|
MatChipsModule,
|
|
1648
1753
|
MatIconModule,
|
|
1649
|
-
|
|
1754
|
+
DbxInjectionComponentModule,
|
|
1650
1755
|
DbxListLayoutModule, i1$4.FormlyModule] });
|
|
1651
|
-
DbxFormFormlyPickableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1756
|
+
DbxFormFormlyPickableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPickableFieldModule, imports: [[
|
|
1652
1757
|
CommonModule,
|
|
1653
1758
|
DbxTextModule,
|
|
1654
1759
|
DbxLoadingModule,
|
|
@@ -1661,10 +1766,10 @@ DbxFormFormlyPickableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion:
|
|
|
1661
1766
|
MatAutocompleteModule,
|
|
1662
1767
|
MatListModule,
|
|
1663
1768
|
DbxDatePipeModule,
|
|
1664
|
-
|
|
1769
|
+
DbxRouterAnchorModule,
|
|
1665
1770
|
MatChipsModule,
|
|
1666
1771
|
MatIconModule,
|
|
1667
|
-
|
|
1772
|
+
DbxInjectionComponentModule,
|
|
1668
1773
|
DbxListLayoutModule,
|
|
1669
1774
|
FormlyModule.forChild({
|
|
1670
1775
|
types: [
|
|
@@ -1673,7 +1778,7 @@ DbxFormFormlyPickableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion:
|
|
|
1673
1778
|
]
|
|
1674
1779
|
})
|
|
1675
1780
|
]] });
|
|
1676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPickableFieldModule, decorators: [{
|
|
1677
1782
|
type: NgModule,
|
|
1678
1783
|
args: [{
|
|
1679
1784
|
imports: [
|
|
@@ -1689,10 +1794,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1689
1794
|
MatAutocompleteModule,
|
|
1690
1795
|
MatListModule,
|
|
1691
1796
|
DbxDatePipeModule,
|
|
1692
|
-
|
|
1797
|
+
DbxRouterAnchorModule,
|
|
1693
1798
|
MatChipsModule,
|
|
1694
1799
|
MatIconModule,
|
|
1695
|
-
|
|
1800
|
+
DbxInjectionComponentModule,
|
|
1696
1801
|
DbxListLayoutModule,
|
|
1697
1802
|
FormlyModule.forChild({
|
|
1698
1803
|
types: [
|
|
@@ -1724,7 +1829,7 @@ function filterPickableItemFieldValuesByLabel(filterText, values) {
|
|
|
1724
1829
|
return of(filteredValues.map(x => x.value));
|
|
1725
1830
|
}
|
|
1726
1831
|
function sortPickableItemsByLabel(chips) {
|
|
1727
|
-
return chips.sort((a, b) => a.
|
|
1832
|
+
return chips.sort((a, b) => a.itemValue.label.localeCompare(b.itemValue.label));
|
|
1728
1833
|
}
|
|
1729
1834
|
function pickableItemChipField(config) {
|
|
1730
1835
|
const { key } = config;
|
|
@@ -1749,22 +1854,22 @@ function pickableItemListField(config) {
|
|
|
1749
1854
|
});
|
|
1750
1855
|
}
|
|
1751
1856
|
|
|
1752
|
-
const
|
|
1857
|
+
const DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN = new InjectionToken('DbxSearchableField');
|
|
1753
1858
|
class DbxSearchableFieldAutocompleteItemComponent {
|
|
1754
1859
|
constructor() {
|
|
1755
1860
|
this._displayValue = new BehaviorSubject(undefined);
|
|
1756
1861
|
this.displayValue$ = this._displayValue.pipe(filterMaybe(), shareReplay$1(1));
|
|
1757
|
-
this.config$ = this.displayValue$.pipe(map
|
|
1862
|
+
this.config$ = this.displayValue$.pipe(map(x => {
|
|
1758
1863
|
const config = {
|
|
1759
1864
|
...x.display,
|
|
1760
1865
|
providers: mergeIntoArray([{
|
|
1761
|
-
provide:
|
|
1866
|
+
provide: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN,
|
|
1762
1867
|
useValue: x
|
|
1763
1868
|
}], x.display.providers)
|
|
1764
1869
|
};
|
|
1765
1870
|
return config;
|
|
1766
1871
|
}));
|
|
1767
|
-
this.anchor$ = this.displayValue$.pipe(map
|
|
1872
|
+
this.anchor$ = this.displayValue$.pipe(map(x => x.anchor));
|
|
1768
1873
|
}
|
|
1769
1874
|
set displayValue(displayValue) {
|
|
1770
1875
|
this._displayValue.next(displayValue);
|
|
@@ -1773,19 +1878,19 @@ class DbxSearchableFieldAutocompleteItemComponent {
|
|
|
1773
1878
|
this._displayValue.complete();
|
|
1774
1879
|
}
|
|
1775
1880
|
}
|
|
1776
|
-
DbxSearchableFieldAutocompleteItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1777
|
-
DbxSearchableFieldAutocompleteItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1881
|
+
DbxSearchableFieldAutocompleteItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableFieldAutocompleteItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1882
|
+
DbxSearchableFieldAutocompleteItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: { displayValue: "displayValue" }, ngImport: i0, template: `
|
|
1778
1883
|
<dbx-anchor [block]="true" [anchor]="anchor$ | async">
|
|
1779
|
-
<dbx-
|
|
1884
|
+
<dbx-injection [config]="config$ | async"></dbx-injection>
|
|
1780
1885
|
</dbx-anchor>
|
|
1781
|
-
`, isInline: true, components: [{ type: i1$1.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { type: i2.
|
|
1782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1886
|
+
`, isInline: true, components: [{ type: i1$1.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }], pipes: { "async": i5.AsyncPipe } });
|
|
1887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableFieldAutocompleteItemComponent, decorators: [{
|
|
1783
1888
|
type: Component,
|
|
1784
1889
|
args: [{
|
|
1785
1890
|
selector: 'dbx-searchable-field-autocomplete-item',
|
|
1786
1891
|
template: `
|
|
1787
1892
|
<dbx-anchor [block]="true" [anchor]="anchor$ | async">
|
|
1788
|
-
<dbx-
|
|
1893
|
+
<dbx-injection [config]="config$ | async"></dbx-injection>
|
|
1789
1894
|
</dbx-anchor>
|
|
1790
1895
|
`
|
|
1791
1896
|
}]
|
|
@@ -1798,24 +1903,24 @@ class AbstractDbxSearchableFieldDisplayDirective {
|
|
|
1798
1903
|
this.displayValue = displayValue;
|
|
1799
1904
|
}
|
|
1800
1905
|
}
|
|
1801
|
-
AbstractDbxSearchableFieldDisplayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1802
|
-
AbstractDbxSearchableFieldDisplayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1906
|
+
AbstractDbxSearchableFieldDisplayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxSearchableFieldDisplayDirective, deps: [{ token: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1907
|
+
AbstractDbxSearchableFieldDisplayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxSearchableFieldDisplayDirective, ngImport: i0 });
|
|
1908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxSearchableFieldDisplayDirective, decorators: [{
|
|
1804
1909
|
type: Directive
|
|
1805
1910
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1806
1911
|
type: Inject,
|
|
1807
|
-
args: [
|
|
1912
|
+
args: [DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN]
|
|
1808
1913
|
}] }]; } });
|
|
1809
1914
|
class DbxDefaultSearchableFieldDisplayComponent extends AbstractDbxSearchableFieldDisplayDirective {
|
|
1810
1915
|
}
|
|
1811
|
-
DbxDefaultSearchableFieldDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1812
|
-
DbxDefaultSearchableFieldDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
1916
|
+
DbxDefaultSearchableFieldDisplayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDefaultSearchableFieldDisplayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1917
|
+
DbxDefaultSearchableFieldDisplayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxDefaultSearchableFieldDisplayComponent, selector: "dbx-default-searchable-field-display", usesInheritance: true, ngImport: i0, template: `
|
|
1813
1918
|
<div class="dbx-default-searchable-field-display">
|
|
1814
1919
|
<span class="dbx-chip-label">{{ displayValue.label }}</span>
|
|
1815
1920
|
<span class="dbx-chip-sublabel" *ngIf="displayValue.sublabel">({{ displayValue.sublabel }})</span>
|
|
1816
1921
|
</div>
|
|
1817
1922
|
`, isInline: true, directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDefaultSearchableFieldDisplayComponent, decorators: [{
|
|
1819
1924
|
type: Component,
|
|
1820
1925
|
args: [{
|
|
1821
1926
|
selector: 'dbx-default-searchable-field-display',
|
|
@@ -1846,17 +1951,17 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1846
1951
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
1847
1952
|
this._displayHashMap = new BehaviorSubject(new Map());
|
|
1848
1953
|
this.inputValue$ = this.inputCtrl.valueChanges.pipe(startWith(this.inputCtrl.value));
|
|
1849
|
-
this.inputValueString$ = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged
|
|
1850
|
-
this.searchResultsState$ = this.inputValueString$.pipe(switchMap
|
|
1954
|
+
this.inputValueString$ = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged());
|
|
1955
|
+
this.searchResultsState$ = this.inputValueString$.pipe(switchMap((text) => ((text || this.searchOnEmptyText) ? this.search(text ?? '') : of([])).pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)),
|
|
1851
1956
|
// Return begin loading to setup the loading state.
|
|
1852
1957
|
startWith(beginLoading()))), shareReplay$1(1));
|
|
1853
1958
|
this.singleValueSyncSubscription = new SubscriptionObject();
|
|
1854
1959
|
this.searchContext = new LoadingStateContextInstance({ obs: this.searchResultsState$, showLoadingOnNoValue: false });
|
|
1855
|
-
this.searchResults$ = this.searchResultsState$.pipe(map
|
|
1856
|
-
this._formControlValue = this.formControl$.pipe(switchMap
|
|
1857
|
-
this.values$ = this._formControlValue.pipe(map
|
|
1858
|
-
this.displayValuesState$ = this.values$.pipe(distinctUntilChanged
|
|
1859
|
-
this.displayValues$ = this.displayValuesState$.pipe(map
|
|
1960
|
+
this.searchResults$ = this.searchResultsState$.pipe(map(x => x?.value ?? []));
|
|
1961
|
+
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay$1(1))));
|
|
1962
|
+
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay$1(1));
|
|
1963
|
+
this.displayValuesState$ = this.values$.pipe(distinctUntilChanged(), switchMap((values) => this.loadDisplayValuesForValues(values)), shareReplay$1(1));
|
|
1964
|
+
this.displayValues$ = this.displayValuesState$.pipe(map(x => x?.value ?? []));
|
|
1860
1965
|
}
|
|
1861
1966
|
get name() {
|
|
1862
1967
|
return this.field.name ?? (camelCase(this.label ?? this.key));
|
|
@@ -1910,7 +2015,7 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1910
2015
|
return this.loadDisplayValuesForFieldValues(values.map((value) => ({ value })));
|
|
1911
2016
|
}
|
|
1912
2017
|
loadDisplayValuesForFieldValues(values) {
|
|
1913
|
-
return this.getDisplayValuesForFieldValues(values).pipe(map
|
|
2018
|
+
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)), startWith(beginLoading()), shareReplay$1(1));
|
|
1914
2019
|
}
|
|
1915
2020
|
getDisplayValuesForFieldValues(values) {
|
|
1916
2021
|
return this._displayHashMap.pipe(mergeMap((displayMap) => {
|
|
@@ -1923,16 +2028,16 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1923
2028
|
if (needsDisplay.length > 0) {
|
|
1924
2029
|
// Go get the display value.
|
|
1925
2030
|
const displayValuesObs = this.displayForValue(needsDisplay.map(x => x[2]));
|
|
1926
|
-
const defaultDisplay =
|
|
2031
|
+
const defaultDisplay = mergeDbxInjectionComponentConfigs([this.defaultDisplay, this.display]);
|
|
1927
2032
|
const anchorForValue = this.useAnchor && this.anchorForValue;
|
|
1928
|
-
obs = displayValuesObs.pipe(first
|
|
2033
|
+
obs = displayValuesObs.pipe(first(), map((displayResults) => {
|
|
1929
2034
|
// Assign the default component classes to complete configuration.
|
|
1930
2035
|
displayResults.forEach(x => {
|
|
1931
2036
|
if (!x.display) {
|
|
1932
2037
|
x.display = defaultDisplay;
|
|
1933
2038
|
}
|
|
1934
2039
|
else {
|
|
1935
|
-
x.display =
|
|
2040
|
+
x.display = mergeDbxInjectionComponentConfigs([defaultDisplay, x.display]);
|
|
1936
2041
|
}
|
|
1937
2042
|
if (!x.anchor && anchorForValue) {
|
|
1938
2043
|
x.anchor = anchorForValue(x);
|
|
@@ -1957,7 +2062,6 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1957
2062
|
}));
|
|
1958
2063
|
}
|
|
1959
2064
|
ngOnInit() {
|
|
1960
|
-
super.ngOnInit();
|
|
1961
2065
|
this._formControlObs.next(this.formControl);
|
|
1962
2066
|
if (this.searchableField.textInputValidator) {
|
|
1963
2067
|
this.inputCtrl.setValidators(this.searchableField.textInputValidator);
|
|
@@ -2062,9 +2166,9 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
2062
2166
|
this.formControl.markAsTouched();
|
|
2063
2167
|
}
|
|
2064
2168
|
}
|
|
2065
|
-
AbstractDbxSearchableValueFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2066
|
-
AbstractDbxSearchableValueFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2169
|
+
AbstractDbxSearchableValueFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxSearchableValueFieldDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2170
|
+
AbstractDbxSearchableValueFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxSearchableValueFieldDirective, viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxSearchableValueFieldDirective, decorators: [{
|
|
2068
2172
|
type: Directive
|
|
2069
2173
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { textInput: [{
|
|
2070
2174
|
type: ViewChild,
|
|
@@ -2111,9 +2215,9 @@ class DbxSearchableChipFieldComponent extends AbstractDbxSearchableValueFieldDir
|
|
|
2111
2215
|
this._blur.next();
|
|
2112
2216
|
}
|
|
2113
2217
|
}
|
|
2114
|
-
DbxSearchableChipFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2115
|
-
DbxSearchableChipFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
2116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2218
|
+
DbxSearchableChipFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableChipFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2219
|
+
DbxSearchableChipFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxSearchableChipFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-field\">\n <!-- View -->\n <mat-chip-list [selectable]=\"!readonly\" [required]=\"required\" [disabled]=\"readonly\" #chipList>\n <mat-chip *ngFor=\"let displayValue of displayValues$ | async\" [removable]=\"true\"\n (removed)=\"removeWithDisplayValue(displayValue)\">\n <span class=\"dbx-chip-label\">{{ displayValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"displayValue.sublabel\">{{ displayValue.sublabel }}</span>\n <mat-icon *ngIf=\"!readonly\" matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input #textInput [name]=\"name\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\"\n autocomplete=\"{{ autocomplete }}\" [matAutocompleteDisabled]=\"readonly\" [matChipInputFor]=\"chipList\" (keydown)=\"tabPressedOnInput($event)\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"addChip($event)\" (blur)=\"onBlur()\">\n </mat-chip-list>\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\"\n (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of (searchResults$ | async)\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\">\n </dbx-searchable-field-autocomplete-item>\n </mat-option>\n</mat-autocomplete>\n", components: [{ type: i1$5.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { type: i4$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$5.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$5.MatChipRemove, selector: "[matChipRemove]" }, { type: i4$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]" }, { type: i4$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i1$5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], pipes: { "async": i5.AsyncPipe } });
|
|
2220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableChipFieldComponent, decorators: [{
|
|
2117
2221
|
type: Component,
|
|
2118
2222
|
args: [{ template: "<div class=\"dbx-searchable-field\">\n <!-- View -->\n <mat-chip-list [selectable]=\"!readonly\" [required]=\"required\" [disabled]=\"readonly\" #chipList>\n <mat-chip *ngFor=\"let displayValue of displayValues$ | async\" [removable]=\"true\"\n (removed)=\"removeWithDisplayValue(displayValue)\">\n <span class=\"dbx-chip-label\">{{ displayValue.label }}</span>\n <span class=\"dbx-chip-sublabel\" *ngIf=\"displayValue.sublabel\">{{ displayValue.sublabel }}</span>\n <mat-icon *ngIf=\"!readonly\" matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input #textInput [name]=\"name\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\"\n autocomplete=\"{{ autocomplete }}\" [matAutocompleteDisabled]=\"readonly\" [matChipInputFor]=\"chipList\" (keydown)=\"tabPressedOnInput($event)\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"addChip($event)\" (blur)=\"onBlur()\">\n </mat-chip-list>\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\"\n (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let displayValue of (searchResults$ | async)\" [value]=\"displayValue\">\n <dbx-searchable-field-autocomplete-item [displayValue]=\"displayValue\">\n </dbx-searchable-field-autocomplete-item>\n </mat-option>\n</mat-autocomplete>\n" }]
|
|
2119
2223
|
}] });
|
|
@@ -2130,7 +2234,7 @@ function makeMetaFilterSearchableFieldValueDisplayFn({ loadMetaForValues, makeDi
|
|
|
2130
2234
|
let allValues;
|
|
2131
2235
|
if (needLoading.length > 0) {
|
|
2132
2236
|
const loadingResult = loadMetaForValues(needLoading);
|
|
2133
|
-
allValues = loadingResult.pipe(map((result) => {
|
|
2237
|
+
allValues = loadingResult.pipe(map$1((result) => {
|
|
2134
2238
|
const resultMap = arrayToMap(result, (x) => x.value);
|
|
2135
2239
|
const mergedWithLoad = needLoading.map((x) => {
|
|
2136
2240
|
const id = x.value;
|
|
@@ -2144,12 +2248,12 @@ function makeMetaFilterSearchableFieldValueDisplayFn({ loadMetaForValues, makeDi
|
|
|
2144
2248
|
};
|
|
2145
2249
|
}).filter(x => !x.meta);
|
|
2146
2250
|
return mergedWithLoad;
|
|
2147
|
-
}), map((result) => [...loaded, ...result]));
|
|
2251
|
+
}), map$1((result) => [...loaded, ...result]));
|
|
2148
2252
|
}
|
|
2149
2253
|
else {
|
|
2150
2254
|
allValues = of(loaded);
|
|
2151
2255
|
}
|
|
2152
|
-
return allValues.pipe(switchMap
|
|
2256
|
+
return allValues.pipe(switchMap((x) => makeDisplayForValues(x)));
|
|
2153
2257
|
};
|
|
2154
2258
|
}
|
|
2155
2259
|
function searchableStringChipField(config) {
|
|
@@ -2188,9 +2292,9 @@ function searchableTextField(config) {
|
|
|
2188
2292
|
class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDirective {
|
|
2189
2293
|
constructor() {
|
|
2190
2294
|
super(...arguments);
|
|
2191
|
-
this.selectedDisplayValue$ = this.displayValues$.pipe(map
|
|
2192
|
-
this.hasValue$ = this.selectedDisplayValue$.pipe(map
|
|
2193
|
-
this.showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map
|
|
2295
|
+
this.selectedDisplayValue$ = this.displayValues$.pipe(map(x => x[0]), shareReplay$1(1), tapDetectChanges(this.cdRef));
|
|
2296
|
+
this.hasValue$ = this.selectedDisplayValue$.pipe(map(x => Boolean(x)));
|
|
2297
|
+
this.showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map(x => this.showSelectedValue && Boolean(x)), distinctUntilChanged(), shareReplay$1(1), tapDetectChanges(this.cdRef));
|
|
2194
2298
|
this.multiSelect = false;
|
|
2195
2299
|
this._clearInputSub = new SubscriptionObject();
|
|
2196
2300
|
}
|
|
@@ -2217,17 +2321,17 @@ class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDir
|
|
|
2217
2321
|
this.addWithDisplayValue(e.option.value);
|
|
2218
2322
|
}
|
|
2219
2323
|
}
|
|
2220
|
-
DbxSearchableTextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2221
|
-
DbxSearchableTextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
2222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2324
|
+
DbxSearchableTextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableTextFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2325
|
+
DbxSearchableTextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxSearchableTextFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-searchable-text-field\"\n [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)!\">\n </dbx-searchable-field-autocomplete-item>\n </div>\n <div class=\"dbx-searchable-text-field-input\">\n <div class=\"dbx-label\">Search</div>\n <!-- View -->\n <input type=\"search\" [name]=\"name\" matInput #textInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\"\n [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\">\n </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", components: [{ type: DbxSearchableFieldAutocompleteItemComponent, selector: "dbx-searchable-field-autocomplete-item", inputs: ["displayValue"] }, { type: i1$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { type: i4$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.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"] }, { type: i4$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]" }, { type: i4$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe } });
|
|
2326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableTextFieldComponent, decorators: [{
|
|
2223
2327
|
type: Component,
|
|
2224
2328
|
args: [{ template: "<div class=\"dbx-searchable-text-field\"\n [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)!\">\n </dbx-searchable-field-autocomplete-item>\n </div>\n <div class=\"dbx-searchable-text-field-input\">\n <div class=\"dbx-label\">Search</div>\n <!-- View -->\n <input type=\"search\" [name]=\"name\" matInput #textInput [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\"\n [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\">\n </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" }]
|
|
2225
2329
|
}] });
|
|
2226
2330
|
|
|
2227
2331
|
class DbxFormFormlySearchableFieldModule {
|
|
2228
2332
|
}
|
|
2229
|
-
DbxFormFormlySearchableFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2230
|
-
DbxFormFormlySearchableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2333
|
+
DbxFormFormlySearchableFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySearchableFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2334
|
+
DbxFormFormlySearchableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySearchableFieldModule, declarations: [DbxSearchableChipFieldComponent,
|
|
2231
2335
|
DbxSearchableTextFieldComponent,
|
|
2232
2336
|
DbxSearchableFieldAutocompleteItemComponent,
|
|
2233
2337
|
DbxDefaultSearchableFieldDisplayComponent], imports: [CommonModule,
|
|
@@ -2242,12 +2346,12 @@ DbxFormFormlySearchableFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion
|
|
|
2242
2346
|
MatAutocompleteModule,
|
|
2243
2347
|
MatListModule,
|
|
2244
2348
|
DbxDatePipeModule,
|
|
2245
|
-
|
|
2349
|
+
DbxRouterAnchorModule,
|
|
2246
2350
|
MatChipsModule,
|
|
2247
2351
|
MatIconModule,
|
|
2248
|
-
|
|
2352
|
+
DbxInjectionComponentModule, i1$4.FormlyModule], exports: [DbxSearchableChipFieldComponent,
|
|
2249
2353
|
DbxSearchableTextFieldComponent] });
|
|
2250
|
-
DbxFormFormlySearchableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2354
|
+
DbxFormFormlySearchableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySearchableFieldModule, imports: [[
|
|
2251
2355
|
CommonModule,
|
|
2252
2356
|
DbxTextModule,
|
|
2253
2357
|
DbxLoadingModule,
|
|
@@ -2260,10 +2364,10 @@ DbxFormFormlySearchableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion
|
|
|
2260
2364
|
MatAutocompleteModule,
|
|
2261
2365
|
MatListModule,
|
|
2262
2366
|
DbxDatePipeModule,
|
|
2263
|
-
|
|
2367
|
+
DbxRouterAnchorModule,
|
|
2264
2368
|
MatChipsModule,
|
|
2265
2369
|
MatIconModule,
|
|
2266
|
-
|
|
2370
|
+
DbxInjectionComponentModule,
|
|
2267
2371
|
FormlyModule.forChild({
|
|
2268
2372
|
types: [
|
|
2269
2373
|
{ name: 'searchablechipfield', component: DbxSearchableChipFieldComponent, wrappers: ['form-field'] },
|
|
@@ -2271,7 +2375,7 @@ DbxFormFormlySearchableFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion
|
|
|
2271
2375
|
]
|
|
2272
2376
|
})
|
|
2273
2377
|
]] });
|
|
2274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySearchableFieldModule, decorators: [{
|
|
2275
2379
|
type: NgModule,
|
|
2276
2380
|
args: [{
|
|
2277
2381
|
imports: [
|
|
@@ -2287,10 +2391,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2287
2391
|
MatAutocompleteModule,
|
|
2288
2392
|
MatListModule,
|
|
2289
2393
|
DbxDatePipeModule,
|
|
2290
|
-
|
|
2394
|
+
DbxRouterAnchorModule,
|
|
2291
2395
|
MatChipsModule,
|
|
2292
2396
|
MatIconModule,
|
|
2293
|
-
|
|
2397
|
+
DbxInjectionComponentModule,
|
|
2294
2398
|
FormlyModule.forChild({
|
|
2295
2399
|
types: [
|
|
2296
2400
|
{ name: 'searchablechipfield', component: DbxSearchableChipFieldComponent, wrappers: ['form-field'] },
|
|
@@ -2326,14 +2430,14 @@ function chipTextField(config) {
|
|
|
2326
2430
|
|
|
2327
2431
|
class DbxFormFormlySelectionModule {
|
|
2328
2432
|
}
|
|
2329
|
-
DbxFormFormlySelectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2330
|
-
DbxFormFormlySelectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2433
|
+
DbxFormFormlySelectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2434
|
+
DbxFormFormlySelectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [CommonModule], exports: [DbxFormFormlyPickableFieldModule,
|
|
2331
2435
|
DbxFormFormlySearchableFieldModule] });
|
|
2332
|
-
DbxFormFormlySelectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2436
|
+
DbxFormFormlySelectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySelectionModule, imports: [[
|
|
2333
2437
|
CommonModule
|
|
2334
2438
|
], DbxFormFormlyPickableFieldModule,
|
|
2335
2439
|
DbxFormFormlySearchableFieldModule] });
|
|
2336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlySelectionModule, decorators: [{
|
|
2337
2441
|
type: NgModule,
|
|
2338
2442
|
args: [{
|
|
2339
2443
|
imports: [
|
|
@@ -2372,10 +2476,9 @@ class DbxTextEditorFieldComponent extends FieldType$1 {
|
|
|
2372
2476
|
return this.to.description;
|
|
2373
2477
|
}
|
|
2374
2478
|
ngOnInit() {
|
|
2375
|
-
super.ngOnInit();
|
|
2376
2479
|
this._editor = new Editor({});
|
|
2377
2480
|
// Watch for value changes every second and update the pristine level.
|
|
2378
|
-
this._sub.subscription = this.editor.valueChanges.pipe(debounceTime$1(100), filter(_ => this.editor.view.hasFocus())).subscribe(() => {
|
|
2481
|
+
this._sub.subscription = this.editor.valueChanges.pipe(debounceTime$1(100), filter$1(_ => this.editor.view.hasFocus())).subscribe(() => {
|
|
2379
2482
|
this.formControl.updateValueAndValidity();
|
|
2380
2483
|
this.formControl.markAsDirty();
|
|
2381
2484
|
});
|
|
@@ -2389,8 +2492,8 @@ class DbxTextEditorFieldComponent extends FieldType$1 {
|
|
|
2389
2492
|
this._sub.destroy();
|
|
2390
2493
|
}
|
|
2391
2494
|
}
|
|
2392
|
-
DbxTextEditorFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2393
|
-
DbxTextEditorFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
2495
|
+
DbxTextEditorFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxTextEditorFieldComponent, deps: [{ token: i1$1.CompactContextStore, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2496
|
+
DbxTextEditorFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxTextEditorFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2394
2497
|
<div class="dbx-texteditor-field" [ngClass]="(compactClass$ | async) ?? ''" [formGroup]="formGroup">
|
|
2395
2498
|
<dbx-label *ngIf="label">{{ label }}</dbx-label>
|
|
2396
2499
|
<div class="dbx-texteditor-field-input">
|
|
@@ -2404,7 +2507,7 @@ DbxTextEditorFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2404
2507
|
</div>
|
|
2405
2508
|
</div>
|
|
2406
2509
|
`, isInline: true, components: [{ type: i1$1.DbxLabelComponent, selector: "dbx-label" }, { type: i2$3.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { type: i2$3.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { type: i1$1.DbxHintComponent, selector: "dbx-hint" }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "async": i5.AsyncPipe } });
|
|
2407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxTextEditorFieldComponent, decorators: [{
|
|
2408
2511
|
type: Component,
|
|
2409
2512
|
args: [{
|
|
2410
2513
|
template: `
|
|
@@ -2428,15 +2531,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2428
2531
|
|
|
2429
2532
|
class DbxFormFormlyTextEditorFieldModule {
|
|
2430
2533
|
}
|
|
2431
|
-
DbxFormFormlyTextEditorFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2432
|
-
DbxFormFormlyTextEditorFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2534
|
+
DbxFormFormlyTextEditorFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2535
|
+
DbxFormFormlyTextEditorFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, declarations: [DbxTextEditorFieldComponent], imports: [CommonModule,
|
|
2433
2536
|
DbxTextModule,
|
|
2434
2537
|
FormsModule,
|
|
2435
2538
|
ReactiveFormsModule,
|
|
2436
2539
|
NgxEditorModule,
|
|
2437
2540
|
MatFormFieldModule,
|
|
2438
2541
|
MatInputModule, i1$4.FormlyModule] });
|
|
2439
|
-
DbxFormFormlyTextEditorFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2542
|
+
DbxFormFormlyTextEditorFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, imports: [[
|
|
2440
2543
|
CommonModule,
|
|
2441
2544
|
DbxTextModule,
|
|
2442
2545
|
FormsModule,
|
|
@@ -2450,7 +2553,7 @@ DbxFormFormlyTextEditorFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion
|
|
|
2450
2553
|
]
|
|
2451
2554
|
})
|
|
2452
2555
|
]] });
|
|
2453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextEditorFieldModule, decorators: [{
|
|
2454
2557
|
type: NgModule,
|
|
2455
2558
|
args: [{
|
|
2456
2559
|
imports: [
|
|
@@ -2548,11 +2651,11 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2548
2651
|
this.swapIndexes(event.previousIndex, event.currentIndex);
|
|
2549
2652
|
}
|
|
2550
2653
|
labelForItem(field) {
|
|
2551
|
-
return
|
|
2654
|
+
return getValueFromGetter(this.repeatArrayField.labelForField ?? '', field);
|
|
2552
2655
|
}
|
|
2553
2656
|
}
|
|
2554
|
-
DbxFormRepeatArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2555
|
-
DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
2657
|
+
DbxFormRepeatArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2658
|
+
DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormRepeatArrayTypeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2556
2659
|
<div class="dbx-form-repeat-array">
|
|
2557
2660
|
<dbx-subsection [header]="label">
|
|
2558
2661
|
<!-- Fields -->
|
|
@@ -2575,8 +2678,8 @@ DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
2575
2678
|
</div>
|
|
2576
2679
|
</dbx-subsection>
|
|
2577
2680
|
</div>
|
|
2578
|
-
`, isInline: true, components: [{ type: i1$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { type: i1$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$
|
|
2579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2681
|
+
`, isInline: true, components: [{ type: i1$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { type: i1$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i5$1.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"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i5$1.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { type: i1$1.DbxBarDirective, selector: "dbx-bar", inputs: ["color"] }, { type: i5$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,dbxButtonSpacer" }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
|
|
2580
2683
|
type: Component,
|
|
2581
2684
|
args: [{
|
|
2582
2685
|
template: `
|
|
@@ -2608,8 +2711,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2608
2711
|
|
|
2609
2712
|
class DbxFormFormlyArrayFieldModule {
|
|
2610
2713
|
}
|
|
2611
|
-
DbxFormFormlyArrayFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2612
|
-
DbxFormFormlyArrayFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2714
|
+
DbxFormFormlyArrayFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyArrayFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2715
|
+
DbxFormFormlyArrayFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyArrayFieldModule, declarations: [DbxFormRepeatArrayTypeComponent], imports: [CommonModule,
|
|
2613
2716
|
MatFormFieldModule,
|
|
2614
2717
|
ReactiveFormsModule,
|
|
2615
2718
|
MatDividerModule,
|
|
@@ -2619,7 +2722,7 @@ DbxFormFormlyArrayFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12
|
|
|
2619
2722
|
DbxSectionLayoutModule,
|
|
2620
2723
|
DbxBarLayoutModule,
|
|
2621
2724
|
DbxButtonModule, i1$4.FormlyModule] });
|
|
2622
|
-
DbxFormFormlyArrayFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2725
|
+
DbxFormFormlyArrayFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyArrayFieldModule, imports: [[
|
|
2623
2726
|
CommonModule,
|
|
2624
2727
|
MatFormFieldModule,
|
|
2625
2728
|
ReactiveFormsModule,
|
|
@@ -2636,7 +2739,7 @@ DbxFormFormlyArrayFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12
|
|
|
2636
2739
|
]
|
|
2637
2740
|
})
|
|
2638
2741
|
]] });
|
|
2639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyArrayFieldModule, decorators: [{
|
|
2640
2743
|
type: NgModule,
|
|
2641
2744
|
args: [{
|
|
2642
2745
|
imports: [
|
|
@@ -2684,10 +2787,10 @@ function repeatArrayField(config) {
|
|
|
2684
2787
|
|
|
2685
2788
|
class DbxFormFormlyBooleanFieldModule {
|
|
2686
2789
|
}
|
|
2687
|
-
DbxFormFormlyBooleanFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2688
|
-
DbxFormFormlyBooleanFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2689
|
-
DbxFormFormlyBooleanFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2790
|
+
DbxFormFormlyBooleanFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2791
|
+
DbxFormFormlyBooleanFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyBooleanFieldModule });
|
|
2792
|
+
DbxFormFormlyBooleanFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, imports: [[]] });
|
|
2793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyBooleanFieldModule, decorators: [{
|
|
2691
2794
|
type: NgModule,
|
|
2692
2795
|
args: [{
|
|
2693
2796
|
imports: [],
|
|
@@ -2736,21 +2839,21 @@ export function acceptTermsField({ key = 'accept', label = 'Accept Terms', descr
|
|
|
2736
2839
|
}
|
|
2737
2840
|
*/
|
|
2738
2841
|
|
|
2739
|
-
var
|
|
2740
|
-
(function (
|
|
2842
|
+
var DbxDateTimeFieldTimeMode;
|
|
2843
|
+
(function (DbxDateTimeFieldTimeMode) {
|
|
2741
2844
|
/**
|
|
2742
2845
|
* Time is required.
|
|
2743
2846
|
*/
|
|
2744
|
-
|
|
2847
|
+
DbxDateTimeFieldTimeMode["REQUIRED"] = "required";
|
|
2745
2848
|
/**
|
|
2746
2849
|
* Time is optional.
|
|
2747
2850
|
*/
|
|
2748
|
-
|
|
2851
|
+
DbxDateTimeFieldTimeMode["OPTIONAL"] = "optional";
|
|
2749
2852
|
/**
|
|
2750
2853
|
* Time is permenantly off.
|
|
2751
2854
|
*/
|
|
2752
|
-
|
|
2753
|
-
})(
|
|
2855
|
+
DbxDateTimeFieldTimeMode["NONE"] = "none";
|
|
2856
|
+
})(DbxDateTimeFieldTimeMode || (DbxDateTimeFieldTimeMode = {}));
|
|
2754
2857
|
class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
2755
2858
|
constructor(cdRef) {
|
|
2756
2859
|
super();
|
|
@@ -2763,35 +2866,37 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2763
2866
|
this._formControlObs = new BehaviorSubject(undefined);
|
|
2764
2867
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
2765
2868
|
this._updateTime = new Subject();
|
|
2766
|
-
this.value$ = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith$1(control.value))), distinctUntilChanged((a, b) => isSameMinute(a, b)), shareReplay(1));
|
|
2869
|
+
this.value$ = this.formControl$.pipe(switchMap$1(control => control.valueChanges.pipe(startWith$1(control.value))), distinctUntilChanged$1((a, b) => isSameMinute(a, b)), shareReplay(1));
|
|
2767
2870
|
/**
|
|
2768
2871
|
* Used to trigger/display visual updates (specifically on timeDistance, etc.).
|
|
2769
2872
|
*/
|
|
2770
|
-
this.displayValue$ = interval(10 * 1000).pipe(startWith$1(0), map(_ => new Date().getMinutes()), distinctUntilChanged(), tap((_) => this.cdRef.markForCheck()), switchMap(_ => this.value$), shareReplay(1));
|
|
2771
|
-
this.timeString$ = this.value$.pipe(filterMaybe(), map((x) => {
|
|
2873
|
+
this.displayValue$ = interval(10 * 1000).pipe(startWith$1(0), map$1(_ => new Date().getMinutes()), distinctUntilChanged$1(), tap((_) => this.cdRef.markForCheck()), switchMap$1(_ => this.value$), shareReplay(1));
|
|
2874
|
+
this.timeString$ = this.value$.pipe(filterMaybe(), map$1((x) => {
|
|
2772
2875
|
const timezone = guessCurrentTimezone();
|
|
2773
2876
|
const timeString = toReadableTimeString(x, timezone);
|
|
2774
2877
|
return timeString;
|
|
2775
2878
|
}));
|
|
2879
|
+
this.dateInputCtrl = new FormControl(new Date(), {
|
|
2880
|
+
validators: []
|
|
2881
|
+
});
|
|
2776
2882
|
this.timeInputCtrl = new FormControl('', {
|
|
2777
2883
|
validators: [
|
|
2778
|
-
Validators.pattern(/^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)
|
|
2884
|
+
Validators.pattern(/^(now)$|^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)
|
|
2779
2885
|
]
|
|
2780
2886
|
});
|
|
2781
|
-
this._date = new BehaviorSubject(new Date());
|
|
2782
2887
|
this._config = new BehaviorSubject(undefined);
|
|
2783
|
-
this.fullDay$ = this.fullDayControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith$1(control.value))));
|
|
2784
|
-
this.showTimeInput$ = this.fullDay$.pipe(map(x => !x && this.timeMode !==
|
|
2785
|
-
this.showAddTime$ = this.showTimeInput$.pipe(map(x => !x && this.timeMode ===
|
|
2786
|
-
this.date$ = this.
|
|
2787
|
-
this.dateValue$ = merge(this.value$.pipe(
|
|
2788
|
-
this.timeInput$ = this._updateTime.pipe(debounceTime$1(5), map(_ => this.timeInputCtrl.value), distinctUntilChanged());
|
|
2888
|
+
this.fullDay$ = this.fullDayControl$.pipe(switchMap$1(control => control.valueChanges.pipe(startWith$1(control.value))));
|
|
2889
|
+
this.showTimeInput$ = this.fullDay$.pipe(map$1(x => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
|
|
2890
|
+
this.showAddTime$ = this.showTimeInput$.pipe(map$1(x => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
|
|
2891
|
+
this.date$ = this.dateInputCtrl.valueChanges.pipe(startWith$1(this.dateInputCtrl.value), filterMaybe(), shareReplay(1));
|
|
2892
|
+
this.dateValue$ = merge(this.date$, this.value$.pipe(skipFirstMaybe())).pipe(map$1((x) => (x) ? startOfDay(x) : x), distinctUntilChanged$1((a, b) => Boolean(a && b) && isSameDay(a, b)), shareReplay(1));
|
|
2893
|
+
this.timeInput$ = this._updateTime.pipe(debounceTime$1(5), map$1(_ => this.timeInputCtrl.value), distinctUntilChanged$1());
|
|
2789
2894
|
this.config$ = this._config.pipe(switchMapMaybeDefault(), shareReplay(1));
|
|
2790
2895
|
this.rawDateTime$ = combineLatest([
|
|
2791
2896
|
this.dateValue$,
|
|
2792
2897
|
this.timeInput$.pipe(startWith$1(null)),
|
|
2793
2898
|
this.fullDay$
|
|
2794
|
-
]).pipe(map(([date, timeString, fullDay]) => {
|
|
2899
|
+
]).pipe(map$1(([date, timeString, fullDay]) => {
|
|
2795
2900
|
let result;
|
|
2796
2901
|
if (date) {
|
|
2797
2902
|
if (fullDay) {
|
|
@@ -2813,12 +2918,12 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2813
2918
|
}
|
|
2814
2919
|
}
|
|
2815
2920
|
return result;
|
|
2816
|
-
}), distinctUntilChanged((a, b) => Boolean(a && b) && isSameMinute(a, b)), shareReplay(1));
|
|
2921
|
+
}), distinctUntilChanged$1((a, b) => Boolean(a && b) && isSameMinute(a, b)), shareReplay(1));
|
|
2817
2922
|
this.timeOutput$ = combineLatest([
|
|
2818
2923
|
this.rawDateTime$,
|
|
2819
2924
|
this._offset,
|
|
2820
|
-
this.config$.pipe(distinctUntilChanged()),
|
|
2821
|
-
]).pipe(throttleTime(40, undefined, { leading: false, trailing: true }), distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0), tap(([_, stepsOffset]) => (stepsOffset) ? this._offset.next(0) : 0), map(([date, stepsOffset, config]) => {
|
|
2925
|
+
this.config$.pipe(distinctUntilChanged$1()),
|
|
2926
|
+
]).pipe(throttleTime(40, undefined, { leading: false, trailing: true }), distinctUntilChanged$1((current, next) => current[0] === next[0] && next[1] === 0), tap(([_, stepsOffset]) => (stepsOffset) ? this._offset.next(0) : 0), map$1(([date, stepsOffset, config]) => {
|
|
2822
2927
|
if (date != null) {
|
|
2823
2928
|
const instance = new DateTimeMinuteInstance({
|
|
2824
2929
|
date,
|
|
@@ -2830,10 +2935,10 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2830
2935
|
date = addMinutes(date, minutes);
|
|
2831
2936
|
}
|
|
2832
2937
|
return date;
|
|
2833
|
-
}), distinctUntilChanged((a, b) => Boolean(a && b) && isSameMinute(a, b)), shareReplay(1));
|
|
2938
|
+
}), distinctUntilChanged$1((a, b) => Boolean(a && b) && isSameMinute(a, b)), shareReplay(1));
|
|
2834
2939
|
}
|
|
2835
2940
|
get dateOnly() {
|
|
2836
|
-
return this.timeMode ===
|
|
2941
|
+
return this.timeMode === DbxDateTimeFieldTimeMode.NONE;
|
|
2837
2942
|
}
|
|
2838
2943
|
get dateTimeField() {
|
|
2839
2944
|
return this.field.dateTimeField;
|
|
@@ -2845,13 +2950,12 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2845
2950
|
return !this.timeOnly;
|
|
2846
2951
|
}
|
|
2847
2952
|
get timeMode() {
|
|
2848
|
-
return (this.timeOnly) ?
|
|
2953
|
+
return (this.timeOnly) ? DbxDateTimeFieldTimeMode.REQUIRED : (this.dateTimeField.timeMode ?? DbxDateTimeFieldTimeMode.REQUIRED);
|
|
2849
2954
|
}
|
|
2850
2955
|
get description() {
|
|
2851
2956
|
return this.field.templateOptions?.description;
|
|
2852
2957
|
}
|
|
2853
2958
|
ngOnInit() {
|
|
2854
|
-
super.ngOnInit();
|
|
2855
2959
|
this._formControlObs.next(this.formControl);
|
|
2856
2960
|
this._config.next(this.dateTimeField.getConfigObs?.());
|
|
2857
2961
|
this._sub.subscription = this.timeOutput$.pipe(skipFirstMaybe()).subscribe((value) => {
|
|
@@ -2864,7 +2968,18 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2864
2968
|
if (!this.timeInputCtrl.value && x === '12:00AM') {
|
|
2865
2969
|
return;
|
|
2866
2970
|
}
|
|
2867
|
-
this.
|
|
2971
|
+
this.setTime(x);
|
|
2972
|
+
});
|
|
2973
|
+
// Watch for disabled changes so we can propogate them properly.
|
|
2974
|
+
this.formControl.registerOnDisabledChange((disabled) => {
|
|
2975
|
+
if (disabled) {
|
|
2976
|
+
this.dateInputCtrl.disable({ emitEvent: false });
|
|
2977
|
+
this.timeInputCtrl.disable({ emitEvent: false });
|
|
2978
|
+
}
|
|
2979
|
+
else {
|
|
2980
|
+
this.dateInputCtrl.enable({ emitEvent: false });
|
|
2981
|
+
this.timeInputCtrl.enable({ emitEvent: false });
|
|
2982
|
+
}
|
|
2868
2983
|
});
|
|
2869
2984
|
const isFullDayField = this.dateTimeField.fullDayFieldName;
|
|
2870
2985
|
let fullDayFieldCtrl;
|
|
@@ -2881,38 +2996,40 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2881
2996
|
}
|
|
2882
2997
|
this._fullDayControlObs.next(fullDayFieldCtrl);
|
|
2883
2998
|
switch (this.dateTimeField.timeMode) {
|
|
2884
|
-
case
|
|
2999
|
+
case DbxDateTimeFieldTimeMode.OPTIONAL:
|
|
2885
3000
|
break;
|
|
2886
|
-
case
|
|
3001
|
+
case DbxDateTimeFieldTimeMode.NONE:
|
|
2887
3002
|
this.removeTime();
|
|
2888
3003
|
break;
|
|
2889
|
-
case
|
|
3004
|
+
case DbxDateTimeFieldTimeMode.REQUIRED:
|
|
2890
3005
|
this.addTime();
|
|
2891
3006
|
break;
|
|
2892
3007
|
}
|
|
2893
3008
|
}
|
|
2894
3009
|
ngOnDestroy() {
|
|
2895
3010
|
super.ngOnDestroy();
|
|
3011
|
+
this._fullDayControlObs.complete();
|
|
3012
|
+
this._offset.complete();
|
|
2896
3013
|
this._formControlObs.complete();
|
|
2897
|
-
this._date.complete();
|
|
2898
|
-
this._updateTime.complete();
|
|
2899
3014
|
this._config.complete();
|
|
3015
|
+
this._updateTime.complete();
|
|
2900
3016
|
this._sub.destroy();
|
|
2901
3017
|
this._valueSub.destroy();
|
|
2902
3018
|
}
|
|
2903
|
-
dateTextChanged(e) {
|
|
2904
|
-
const value = this.dateInput.value;
|
|
2905
|
-
if (value == null) {
|
|
2906
|
-
this._date.next(undefined);
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
3019
|
datePicked(event) {
|
|
2910
3020
|
const date = event.value;
|
|
2911
3021
|
if (date) {
|
|
2912
|
-
this.
|
|
3022
|
+
this.dateInputCtrl.setValue(date);
|
|
2913
3023
|
this._updateTime.next();
|
|
2914
3024
|
}
|
|
2915
3025
|
}
|
|
3026
|
+
setLogicalTime(time) {
|
|
3027
|
+
const date = dateFromLogicalDate(time);
|
|
3028
|
+
if (date) {
|
|
3029
|
+
const timeString = toLocalReadableTimeString(date);
|
|
3030
|
+
this.setTime(timeString);
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
2916
3033
|
setTime(time) {
|
|
2917
3034
|
this.timeInputCtrl.setValue(time);
|
|
2918
3035
|
this._offset.next(0);
|
|
@@ -2955,25 +3072,22 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2955
3072
|
this.setFullDay(true);
|
|
2956
3073
|
}
|
|
2957
3074
|
setFullDay(fullDay) {
|
|
2958
|
-
this.fullDayControl$.pipe(first()).subscribe((x) => {
|
|
3075
|
+
this.fullDayControl$.pipe(first$1()).subscribe((x) => {
|
|
2959
3076
|
x.setValue(fullDay);
|
|
2960
3077
|
});
|
|
2961
3078
|
}
|
|
2962
3079
|
}
|
|
2963
|
-
DbxDateTimeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2964
|
-
DbxDateTimeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
2965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3080
|
+
DbxDateTimeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDateTimeFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3081
|
+
DbxDateTimeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxDateTimeFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div class=\"add-time-button-wrapper\" *ngIf=\"showAddTime$ | async\">\n <button mat-button class=\"add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon> Add Time\n </button>\n </div>\n </div>\n <div class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\"><b class=\"dbx-ok\">All Day</b> {{ dateValue$ | async | date:'fullDate' }}\n ({{ dateValue$ | async | dateDistance }})</small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"value$ | async\"><b class=\"dbx-ok\">At</b> {{ displayValue$ | async | date:'medium' }}\n ({{ displayValue$ | async | timeDistance }})</ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>Date</mat-label>\n <input #dateInput matInput [formControl]=\"dateInputCtrl\" [matDatepicker]=\"picker\" (dateChange)=\"datePicked($event)\"\n [value]=\"dateValue$ | async\">\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\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 <button mat-menu-item (click)=\"setLogicalTime('now')\">\n <span>Now</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00AM')\">\n <span>Midnight</span>\n </button>\n <button mat-menu-item (click)=\"setTime('6:00AM')\">\n <span>6:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('8:00AM')\">\n <span>8:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('10:00AM')\">\n <span>10:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00PM')\">\n <span>Noon</span>\n </button>\n <button mat-menu-item (click)=\"setTime('2:00PM')\">\n <span>2:00PM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('5:00PM')\">\n <span>5:00PM</span>\n </button>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>Time</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\"\n (keydown)=\"keydownOnInput($event)\">\n </mat-form-field>\n</ng-template>\n", components: [{ type: i1$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i4$4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i5$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i4$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i3$1.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"] }, { type: i3$1.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"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.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"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { 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"] }, { type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3$2.MatLabel, selector: "mat-label" }, { type: i6$1.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"] }, { type: i4$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]" }, { type: i4$4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], pipes: { "async": i5.AsyncPipe, "date": i5.DatePipe, "dateDistance": i2.DateDistancePipe, "timeDistance": i2.TimeDistancePipe } });
|
|
3082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDateTimeFieldComponent, decorators: [{
|
|
2966
3083
|
type: Component,
|
|
2967
|
-
args: [{ template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div class=\"add-time-button-wrapper\" *ngIf=\"showAddTime$ | async\">\n <button mat-button class=\"add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon> Add Time\n </button>\n </div>\n </div>\n <div class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\"><b class=\"dbx-ok\">All Day</b> {{ dateValue$ | async | date:'fullDate' }}\n ({{ dateValue$ | async | dateDistance }})</small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"value$ | async\"><b class=\"dbx-ok\">At</b> {{ displayValue$ | async | date:'medium' }}\n ({{ displayValue$ | async | timeDistance }})</ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button mat-icon-button (click)=\"picker.open()\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>Date</mat-label>\n <input #dateInput matInput [
|
|
2968
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }
|
|
2969
|
-
type: ViewChild,
|
|
2970
|
-
args: ['dateInput', { read: MatInput }]
|
|
2971
|
-
}] } });
|
|
3084
|
+
args: [{ template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div class=\"add-time-button-wrapper\" *ngIf=\"showAddTime$ | async\">\n <button mat-button class=\"add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon> Add Time\n </button>\n </div>\n </div>\n <div class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\"><b class=\"dbx-ok\">All Day</b> {{ dateValue$ | async | date:'fullDate' }}\n ({{ dateValue$ | async | dateDistance }})</small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"value$ | async\"><b class=\"dbx-ok\">At</b> {{ displayValue$ | async | date:'medium' }}\n ({{ displayValue$ | async | timeDistance }})</ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>Date</mat-label>\n <input #dateInput matInput [formControl]=\"dateInputCtrl\" [matDatepicker]=\"picker\" (dateChange)=\"datePicked($event)\"\n [value]=\"dateValue$ | async\">\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\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 <button mat-menu-item (click)=\"setLogicalTime('now')\">\n <span>Now</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00AM')\">\n <span>Midnight</span>\n </button>\n <button mat-menu-item (click)=\"setTime('6:00AM')\">\n <span>6:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('8:00AM')\">\n <span>8:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('10:00AM')\">\n <span>10:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00PM')\">\n <span>Noon</span>\n </button>\n <button mat-menu-item (click)=\"setTime('2:00PM')\">\n <span>2:00PM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('5:00PM')\">\n <span>5:00PM</span>\n </button>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>Time</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\"\n (keydown)=\"keydownOnInput($event)\">\n </mat-form-field>\n</ng-template>\n" }]
|
|
3085
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
2972
3086
|
|
|
2973
3087
|
class DbxFormFormlyDateFieldModule {
|
|
2974
3088
|
}
|
|
2975
|
-
DbxFormFormlyDateFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2976
|
-
DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3089
|
+
DbxFormFormlyDateFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyDateFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3090
|
+
DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent], imports: [CommonModule,
|
|
2977
3091
|
FormsModule,
|
|
2978
3092
|
MatInputModule,
|
|
2979
3093
|
MatDividerModule,
|
|
@@ -2987,7 +3101,7 @@ DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.
|
|
|
2987
3101
|
MatChipsModule,
|
|
2988
3102
|
MatIconModule,
|
|
2989
3103
|
FlexLayoutModule, i1$4.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
|
|
2990
|
-
DbxFormFormlyDateFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3104
|
+
DbxFormFormlyDateFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyDateFieldModule, imports: [[
|
|
2991
3105
|
CommonModule,
|
|
2992
3106
|
FormsModule,
|
|
2993
3107
|
MatInputModule,
|
|
@@ -3008,7 +3122,7 @@ DbxFormFormlyDateFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
|
|
|
3008
3122
|
]
|
|
3009
3123
|
})
|
|
3010
3124
|
], DbxFormFormlyWrapperModule] });
|
|
3011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyDateFieldModule, decorators: [{
|
|
3012
3126
|
type: NgModule,
|
|
3013
3127
|
args: [{
|
|
3014
3128
|
imports: [
|
|
@@ -3048,20 +3162,20 @@ const TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS = () => of({
|
|
|
3048
3162
|
/**
|
|
3049
3163
|
* Same as DateTime field but with the Date input hidden by default.
|
|
3050
3164
|
*/
|
|
3051
|
-
function timeOnlyField(config) {
|
|
3165
|
+
function timeOnlyField(config = {}) {
|
|
3052
3166
|
return dateTimeField({
|
|
3053
3167
|
...config,
|
|
3054
|
-
timeMode:
|
|
3168
|
+
timeMode: DbxDateTimeFieldTimeMode.REQUIRED,
|
|
3055
3169
|
timeOnly: true
|
|
3056
3170
|
});
|
|
3057
3171
|
}
|
|
3058
|
-
function dateTimeField(config) {
|
|
3059
|
-
const { key = 'date', timeMode =
|
|
3172
|
+
function dateTimeField(config = {}) {
|
|
3173
|
+
const { key = 'date', timeMode = DbxDateTimeFieldTimeMode.REQUIRED, fullDayFieldName, getConfigObs, timeOnly = false } = config;
|
|
3060
3174
|
const fieldConfig = formlyField({
|
|
3061
3175
|
key,
|
|
3062
3176
|
type: 'datetime',
|
|
3063
3177
|
dateTimeField: {
|
|
3064
|
-
timeMode: (timeOnly) ?
|
|
3178
|
+
timeMode: (timeOnly) ? DbxDateTimeFieldTimeMode.REQUIRED : timeMode,
|
|
3065
3179
|
fullDayFieldName,
|
|
3066
3180
|
getConfigObs,
|
|
3067
3181
|
timeOnly,
|
|
@@ -3093,10 +3207,10 @@ function staticEnumField({ key, label = '', placeholder = '', description, multi
|
|
|
3093
3207
|
|
|
3094
3208
|
class DbxFormFormlyEnumFieldModule {
|
|
3095
3209
|
}
|
|
3096
|
-
DbxFormFormlyEnumFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3097
|
-
DbxFormFormlyEnumFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3098
|
-
DbxFormFormlyEnumFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3210
|
+
DbxFormFormlyEnumFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyEnumFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3211
|
+
DbxFormFormlyEnumFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyEnumFieldModule });
|
|
3212
|
+
DbxFormFormlyEnumFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyEnumFieldModule, imports: [[]] });
|
|
3213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyEnumFieldModule, decorators: [{
|
|
3100
3214
|
type: NgModule,
|
|
3101
3215
|
args: [{
|
|
3102
3216
|
imports: [],
|
|
@@ -3119,17 +3233,17 @@ class DbxPhoneFieldComponent extends FieldType$1 {
|
|
|
3119
3233
|
return this.phoneField.onlyCountries ?? [];
|
|
3120
3234
|
}
|
|
3121
3235
|
}
|
|
3122
|
-
DbxPhoneFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3123
|
-
DbxPhoneFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
3124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3236
|
+
DbxPhoneFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPhoneFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3237
|
+
DbxPhoneFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxPhoneFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ngx-mat-intl-tel-input class=\"dbx-form-phone-field\" [required]=\"required\" [preferredCountries]=\"preferredCountries\"\n [enablePlaceholder]=\"false\" name=\"phone\" [formControl]=\"formControl\">\n</ngx-mat-intl-tel-input>\n", components: [{ type: i1$6.NgxMatIntlTelInputComponent, selector: "ngx-mat-intl-tel-input", inputs: ["preferredCountries", "enablePlaceholder", "inputPlaceholder", "cssClass", "name", "onlyCountries", "errorStateMatcher", "enableSearch", "searchPlaceholder", "describedBy", "format", "placeholder", "required", "disabled"], outputs: ["countryChanged"] }], directives: [{ type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
3238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPhoneFieldComponent, decorators: [{
|
|
3125
3239
|
type: Component,
|
|
3126
3240
|
args: [{ template: "<ngx-mat-intl-tel-input class=\"dbx-form-phone-field\" [required]=\"required\" [preferredCountries]=\"preferredCountries\"\n [enablePlaceholder]=\"false\" name=\"phone\" [formControl]=\"formControl\">\n</ngx-mat-intl-tel-input>\n" }]
|
|
3127
3241
|
}] });
|
|
3128
3242
|
|
|
3129
3243
|
class DbxFormFormlyPhoneFieldModule {
|
|
3130
3244
|
}
|
|
3131
|
-
DbxFormFormlyPhoneFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3132
|
-
DbxFormFormlyPhoneFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3245
|
+
DbxFormFormlyPhoneFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3246
|
+
DbxFormFormlyPhoneFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, declarations: [DbxPhoneFieldComponent], imports: [CommonModule,
|
|
3133
3247
|
MatInputModule,
|
|
3134
3248
|
MatFormFieldModule,
|
|
3135
3249
|
FormsModule,
|
|
@@ -3140,7 +3254,7 @@ DbxFormFormlyPhoneFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12
|
|
|
3140
3254
|
MatIconModule,
|
|
3141
3255
|
FlexLayoutModule,
|
|
3142
3256
|
FormlyMatFormFieldModule, i1$4.FormlyModule] });
|
|
3143
|
-
DbxFormFormlyPhoneFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3257
|
+
DbxFormFormlyPhoneFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, imports: [[
|
|
3144
3258
|
CommonModule,
|
|
3145
3259
|
MatInputModule,
|
|
3146
3260
|
MatFormFieldModule,
|
|
@@ -3158,7 +3272,7 @@ DbxFormFormlyPhoneFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12
|
|
|
3158
3272
|
]
|
|
3159
3273
|
})
|
|
3160
3274
|
]] });
|
|
3161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyPhoneFieldModule, decorators: [{
|
|
3162
3276
|
type: NgModule,
|
|
3163
3277
|
args: [{
|
|
3164
3278
|
imports: [
|
|
@@ -3193,6 +3307,7 @@ const SUBSECTION_WRAPPER_KEY = 'subsection';
|
|
|
3193
3307
|
const INFO_WRAPPER_KEY = 'info';
|
|
3194
3308
|
const FLEX_WRAPPER_KEY = 'flex';
|
|
3195
3309
|
const STYLE_WRAPPER_KEY = 'style';
|
|
3310
|
+
const WORKING_WRAPPER_KEY = 'working';
|
|
3196
3311
|
function addWrapperToFormlyFieldConfig(fieldConfig, wrapperKey, wrapperTemplateOptionsConfig) {
|
|
3197
3312
|
fieldConfig.templateOptions = {
|
|
3198
3313
|
...fieldConfig.templateOptions,
|
|
@@ -3234,6 +3349,11 @@ function styleWrapper(fieldConfig, styleWrapper) {
|
|
|
3234
3349
|
styleWrapper
|
|
3235
3350
|
});
|
|
3236
3351
|
}
|
|
3352
|
+
function workingWrapper(fieldConfig, workingWrapper) {
|
|
3353
|
+
return addWrapperToFormlyFieldConfig(fieldConfig, WORKING_WRAPPER_KEY, {
|
|
3354
|
+
workingWrapper
|
|
3355
|
+
});
|
|
3356
|
+
}
|
|
3237
3357
|
function checkIsFieldFlexLayoutGroupFieldConfig(input) {
|
|
3238
3358
|
if (input.field != null) {
|
|
3239
3359
|
return true;
|
|
@@ -3268,11 +3388,12 @@ function flexLayoutWrapper(fieldConfigs, { relative, breakpoint, size: defaultSi
|
|
|
3268
3388
|
}
|
|
3269
3389
|
|
|
3270
3390
|
function textField(config) {
|
|
3271
|
-
const { key, pattern, minLength, maxLength = 1000 } = config;
|
|
3391
|
+
const { key, pattern, minLength, maxLength = 1000, inputType: type = 'text' } = config;
|
|
3272
3392
|
return formlyField({
|
|
3273
3393
|
key,
|
|
3274
3394
|
type: 'input',
|
|
3275
3395
|
...templateOptionsForFieldConfig(config, {
|
|
3396
|
+
type,
|
|
3276
3397
|
minLength,
|
|
3277
3398
|
maxLength,
|
|
3278
3399
|
pattern
|
|
@@ -3367,24 +3488,22 @@ function nameField({ key = 'name', label = 'Name', placeholder = 'John Doe', req
|
|
|
3367
3488
|
attributes
|
|
3368
3489
|
});
|
|
3369
3490
|
}
|
|
3370
|
-
function emailField(
|
|
3371
|
-
|
|
3491
|
+
function emailField(config = {}) {
|
|
3492
|
+
const { key = 'email', label = 'Email Address', placeholder = 'you@example.com' } = config;
|
|
3493
|
+
const emailFieldConfig = textField({
|
|
3494
|
+
...config,
|
|
3372
3495
|
key,
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
placeholder,
|
|
3377
|
-
description,
|
|
3378
|
-
required,
|
|
3379
|
-
readonly
|
|
3380
|
-
},
|
|
3381
|
-
validators: {
|
|
3382
|
-
email: {
|
|
3383
|
-
expression: (c) => !Validators.email(c),
|
|
3384
|
-
message: () => `Not a valid email address.`
|
|
3385
|
-
}
|
|
3386
|
-
},
|
|
3496
|
+
label,
|
|
3497
|
+
placeholder,
|
|
3498
|
+
inputType: 'email'
|
|
3387
3499
|
});
|
|
3500
|
+
emailFieldConfig.validators = {
|
|
3501
|
+
email: {
|
|
3502
|
+
expression: (c) => !Validators.email(c),
|
|
3503
|
+
message: () => `Not a valid email address.`
|
|
3504
|
+
}
|
|
3505
|
+
};
|
|
3506
|
+
return emailFieldConfig;
|
|
3388
3507
|
}
|
|
3389
3508
|
function cityField({ key = 'city', required = false } = {}) {
|
|
3390
3509
|
return textField({
|
|
@@ -3483,12 +3602,12 @@ function addressListField({ key = 'addresses', required = false, maxAddresses =
|
|
|
3483
3602
|
|
|
3484
3603
|
class DbxFormFormlyTextFieldModule {
|
|
3485
3604
|
}
|
|
3486
|
-
DbxFormFormlyTextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3487
|
-
DbxFormFormlyTextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3488
|
-
DbxFormFormlyTextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3605
|
+
DbxFormFormlyTextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3606
|
+
DbxFormFormlyTextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [FormlyMaterialModule], exports: [DbxFormFormlyWrapperModule] });
|
|
3607
|
+
DbxFormFormlyTextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextFieldModule, imports: [[
|
|
3489
3608
|
FormlyMaterialModule
|
|
3490
3609
|
], DbxFormFormlyWrapperModule] });
|
|
3491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyTextFieldModule, decorators: [{
|
|
3492
3611
|
type: NgModule,
|
|
3493
3612
|
args: [{
|
|
3494
3613
|
imports: [
|
|
@@ -3510,14 +3629,14 @@ function hiddenField({ key, required = false }) {
|
|
|
3510
3629
|
|
|
3511
3630
|
class DbxFormFormlyValueModule {
|
|
3512
3631
|
}
|
|
3513
|
-
DbxFormFormlyValueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3514
|
-
DbxFormFormlyValueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3632
|
+
DbxFormFormlyValueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3633
|
+
DbxFormFormlyValueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule], exports: [DbxFormFormlyArrayFieldModule,
|
|
3515
3634
|
DbxFormFormlyBooleanFieldModule,
|
|
3516
3635
|
DbxFormFormlyDateFieldModule,
|
|
3517
3636
|
DbxFormFormlyEnumFieldModule,
|
|
3518
3637
|
DbxFormFormlyPhoneFieldModule,
|
|
3519
3638
|
DbxFormFormlyTextFieldModule] });
|
|
3520
|
-
DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3639
|
+
DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [[
|
|
3521
3640
|
CommonModule
|
|
3522
3641
|
], DbxFormFormlyArrayFieldModule,
|
|
3523
3642
|
DbxFormFormlyBooleanFieldModule,
|
|
@@ -3525,7 +3644,7 @@ DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
|
|
|
3525
3644
|
DbxFormFormlyEnumFieldModule,
|
|
3526
3645
|
DbxFormFormlyPhoneFieldModule,
|
|
3527
3646
|
DbxFormFormlyTextFieldModule] });
|
|
3528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, decorators: [{
|
|
3529
3648
|
type: NgModule,
|
|
3530
3649
|
args: [{
|
|
3531
3650
|
imports: [
|
|
@@ -3545,14 +3664,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3545
3664
|
|
|
3546
3665
|
class DbxFormFormlyFieldModule {
|
|
3547
3666
|
}
|
|
3548
|
-
DbxFormFormlyFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3549
|
-
DbxFormFormlyFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3667
|
+
DbxFormFormlyFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3668
|
+
DbxFormFormlyFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [CommonModule], exports: [DbxFormFormlyChecklistItemFieldModule,
|
|
3550
3669
|
DbxFormFormlyComponentFieldModule,
|
|
3551
3670
|
DbxFormFormlySelectionModule,
|
|
3552
3671
|
DbxFormFormlyTextEditorFieldModule,
|
|
3553
3672
|
DbxFormFormlyValueModule,
|
|
3554
3673
|
DbxFormFormlyWrapperModule] });
|
|
3555
|
-
DbxFormFormlyFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3674
|
+
DbxFormFormlyFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyFieldModule, imports: [[
|
|
3556
3675
|
CommonModule
|
|
3557
3676
|
], DbxFormFormlyChecklistItemFieldModule,
|
|
3558
3677
|
DbxFormFormlyComponentFieldModule,
|
|
@@ -3560,7 +3679,7 @@ DbxFormFormlyFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0"
|
|
|
3560
3679
|
DbxFormFormlyTextEditorFieldModule,
|
|
3561
3680
|
DbxFormFormlyValueModule,
|
|
3562
3681
|
DbxFormFormlyWrapperModule] });
|
|
3563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyFieldModule, decorators: [{
|
|
3564
3683
|
type: NgModule,
|
|
3565
3684
|
args: [{
|
|
3566
3685
|
imports: [
|
|
@@ -3578,6 +3697,164 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3578
3697
|
}]
|
|
3579
3698
|
}] });
|
|
3580
3699
|
|
|
3700
|
+
const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';
|
|
3701
|
+
/**
|
|
3702
|
+
* Validator for validating all values within an object.
|
|
3703
|
+
*
|
|
3704
|
+
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3705
|
+
*
|
|
3706
|
+
* @param config
|
|
3707
|
+
* @returns
|
|
3708
|
+
*/
|
|
3709
|
+
function fieldValuesAreEqualValidator(config = {}) {
|
|
3710
|
+
const { keysFilter, valuesFilter: inputValuesFilter, isEqual = ((a, b) => a === b), message = 'Field values are not equal.' } = config;
|
|
3711
|
+
const valuesFilter = inputValuesFilter ?? {
|
|
3712
|
+
valueFilter: KeyValueTypleValueFilter.NONE,
|
|
3713
|
+
keysFilter
|
|
3714
|
+
};
|
|
3715
|
+
return (control) => {
|
|
3716
|
+
const object = control.value;
|
|
3717
|
+
const values = valuesFromPOJO(object, valuesFilter);
|
|
3718
|
+
const isValid = allObjectsAreEqual(values, isEqual);
|
|
3719
|
+
if (isValid) {
|
|
3720
|
+
return null;
|
|
3721
|
+
}
|
|
3722
|
+
else {
|
|
3723
|
+
return {
|
|
3724
|
+
[FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }
|
|
3725
|
+
};
|
|
3726
|
+
}
|
|
3727
|
+
};
|
|
3728
|
+
}
|
|
3729
|
+
|
|
3730
|
+
;
|
|
3731
|
+
/**
|
|
3732
|
+
* Configured simple text password field.
|
|
3733
|
+
*
|
|
3734
|
+
* @param config
|
|
3735
|
+
* @returns
|
|
3736
|
+
*/
|
|
3737
|
+
function textPasswordField(config) {
|
|
3738
|
+
return textField({
|
|
3739
|
+
key: 'password',
|
|
3740
|
+
...config,
|
|
3741
|
+
label: config?.label ?? 'Password',
|
|
3742
|
+
inputType: 'password',
|
|
3743
|
+
required: true
|
|
3744
|
+
});
|
|
3745
|
+
}
|
|
3746
|
+
/**
|
|
3747
|
+
* Configured verify field for a password.
|
|
3748
|
+
* @param config
|
|
3749
|
+
* @returns
|
|
3750
|
+
*/
|
|
3751
|
+
function textVerifyPasswordField(config) {
|
|
3752
|
+
return textPasswordField({
|
|
3753
|
+
key: 'verifyPassword',
|
|
3754
|
+
label: 'Verify Password',
|
|
3755
|
+
...config,
|
|
3756
|
+
required: true
|
|
3757
|
+
});
|
|
3758
|
+
}
|
|
3759
|
+
function textPasswordWithVerifyFieldGroup(config) {
|
|
3760
|
+
const passwordFieldConfig = textPasswordField(config.password);
|
|
3761
|
+
const verifyPasswordFieldKey = config.verifyPassword?.key ?? `verify${capitalizeFirstLetter(String(passwordFieldConfig.key))}`;
|
|
3762
|
+
const verifyPasswordField = textVerifyPasswordField({
|
|
3763
|
+
...config.password,
|
|
3764
|
+
...config.verifyPassword,
|
|
3765
|
+
label: (config.verifyPassword?.label) ?? `Verify ${passwordFieldConfig.templateOptions?.label}`,
|
|
3766
|
+
key: verifyPasswordFieldKey
|
|
3767
|
+
});
|
|
3768
|
+
const validators = {
|
|
3769
|
+
validation: [{
|
|
3770
|
+
errorPath: verifyPasswordFieldKey,
|
|
3771
|
+
expression: fieldValuesAreEqualValidator({ keysFilter: [passwordFieldConfig.key, verifyPasswordField.key], message: 'The passwords do not match.' })
|
|
3772
|
+
}]
|
|
3773
|
+
};
|
|
3774
|
+
const groupFieldConfig = {
|
|
3775
|
+
validators,
|
|
3776
|
+
fieldGroup: [passwordFieldConfig, verifyPasswordField]
|
|
3777
|
+
};
|
|
3778
|
+
return groupFieldConfig;
|
|
3779
|
+
}
|
|
3780
|
+
;
|
|
3781
|
+
/**
|
|
3782
|
+
* Template for login field that takes in a username and password.
|
|
3783
|
+
*
|
|
3784
|
+
* @param param0
|
|
3785
|
+
* @returns
|
|
3786
|
+
*/
|
|
3787
|
+
function usernamePasswordLoginFields({ username, password, verifyPassword }) {
|
|
3788
|
+
let usernameField;
|
|
3789
|
+
let usernameFieldConfig = username;
|
|
3790
|
+
const defaultUsernameFieldConfig = { key: 'username', required: true };
|
|
3791
|
+
if (typeof username === 'string') {
|
|
3792
|
+
if (username === 'email') {
|
|
3793
|
+
usernameFieldConfig = {
|
|
3794
|
+
email: defaultUsernameFieldConfig
|
|
3795
|
+
};
|
|
3796
|
+
}
|
|
3797
|
+
else {
|
|
3798
|
+
usernameFieldConfig = {
|
|
3799
|
+
username: defaultUsernameFieldConfig
|
|
3800
|
+
};
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
if (usernameFieldConfig.email) {
|
|
3804
|
+
usernameField = emailField({ ...usernameFieldConfig.username, ...defaultUsernameFieldConfig });
|
|
3805
|
+
}
|
|
3806
|
+
else {
|
|
3807
|
+
usernameField = textField({ ...usernameFieldConfig.username, ...defaultUsernameFieldConfig });
|
|
3808
|
+
}
|
|
3809
|
+
const passwordField = (verifyPassword) ? (textPasswordWithVerifyFieldGroup({ password, verifyPassword: (verifyPassword === true) ? undefined : verifyPassword })) : textPasswordField(password);
|
|
3810
|
+
return [
|
|
3811
|
+
usernameField,
|
|
3812
|
+
passwordField
|
|
3813
|
+
];
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';
|
|
3817
|
+
const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';
|
|
3818
|
+
/**
|
|
3819
|
+
* Validator for validating all values within an object.
|
|
3820
|
+
*
|
|
3821
|
+
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3822
|
+
*
|
|
3823
|
+
* @param config
|
|
3824
|
+
* @returns
|
|
3825
|
+
*/
|
|
3826
|
+
function fieldValueIsAvailableValidator(config) {
|
|
3827
|
+
const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;
|
|
3828
|
+
const pusher = asyncPusherCache({
|
|
3829
|
+
throttle
|
|
3830
|
+
});
|
|
3831
|
+
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap$1((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3832
|
+
if (isAvailable) {
|
|
3833
|
+
return null;
|
|
3834
|
+
}
|
|
3835
|
+
else {
|
|
3836
|
+
return {
|
|
3837
|
+
[FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }
|
|
3838
|
+
};
|
|
3839
|
+
}
|
|
3840
|
+
}), catchError(() => of({
|
|
3841
|
+
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3842
|
+
})), first$1());
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
function textIsAvailableField(config) {
|
|
3846
|
+
const field = textField(config);
|
|
3847
|
+
field.asyncValidators = {
|
|
3848
|
+
validation: [{
|
|
3849
|
+
expression: fieldValueIsAvailableValidator({
|
|
3850
|
+
...config,
|
|
3851
|
+
message: config?.isNotAvailableErrorMessage
|
|
3852
|
+
}),
|
|
3853
|
+
}]
|
|
3854
|
+
};
|
|
3855
|
+
return workingWrapper(field, {});
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3581
3858
|
/**
|
|
3582
3859
|
* Allows a directive to provide a formly context and form.
|
|
3583
3860
|
*/
|
|
@@ -3596,10 +3873,11 @@ class DbxFormlyContext {
|
|
|
3596
3873
|
this.lockSet = new LockSet();
|
|
3597
3874
|
this._fields = new BehaviorSubject(undefined);
|
|
3598
3875
|
this._initialValue = new BehaviorSubject(undefined);
|
|
3599
|
-
this._disabled = new BehaviorSubject(
|
|
3876
|
+
this._disabled = new BehaviorSubject(undefined);
|
|
3600
3877
|
this._delegate = new BehaviorSubject(undefined);
|
|
3601
3878
|
this.fields$ = this._fields.pipe(filterMaybe());
|
|
3602
|
-
this.
|
|
3879
|
+
this.disabled$ = this._disabled.pipe(filterMaybe());
|
|
3880
|
+
this.stream$ = this._delegate.pipe(distinctUntilChanged(), switchMap(x => (x) ? x.stream$ : of(DbxFormlyContext.INITIAL_STATE)), shareReplay$1(1));
|
|
3603
3881
|
}
|
|
3604
3882
|
destroy() {
|
|
3605
3883
|
this.lockSet.destroyOnNextUnlock(() => {
|
|
@@ -3614,8 +3892,8 @@ class DbxFormlyContext {
|
|
|
3614
3892
|
if (delegate != null) {
|
|
3615
3893
|
delegate.init({
|
|
3616
3894
|
fields: this.fields$,
|
|
3617
|
-
|
|
3618
|
-
|
|
3895
|
+
initialDisabled: this._disabled.value,
|
|
3896
|
+
initialValue: this._initialValue.value
|
|
3619
3897
|
});
|
|
3620
3898
|
}
|
|
3621
3899
|
this._delegate.next(delegate);
|
|
@@ -3634,7 +3912,7 @@ class DbxFormlyContext {
|
|
|
3634
3912
|
}
|
|
3635
3913
|
// MARK: FormComponent
|
|
3636
3914
|
getValue() {
|
|
3637
|
-
return this._delegate.pipe(filterMaybe(), switchMap
|
|
3915
|
+
return this._delegate.pipe(filterMaybe(), switchMap(x => x.getValue()), shareReplay$1(1));
|
|
3638
3916
|
}
|
|
3639
3917
|
setValue(value) {
|
|
3640
3918
|
this._initialValue.next(value);
|
|
@@ -3643,10 +3921,19 @@ class DbxFormlyContext {
|
|
|
3643
3921
|
}
|
|
3644
3922
|
}
|
|
3645
3923
|
isDisabled() {
|
|
3924
|
+
return BooleanStringKeyArrayUtilityInstance.isTrue(this.disabled);
|
|
3925
|
+
}
|
|
3926
|
+
get disabled() {
|
|
3646
3927
|
return this._disabled.value;
|
|
3647
3928
|
}
|
|
3648
|
-
|
|
3649
|
-
this._disabled.
|
|
3929
|
+
getDisabled() {
|
|
3930
|
+
return this._disabled.asObservable();
|
|
3931
|
+
}
|
|
3932
|
+
setDisabled(key, disabled = true) {
|
|
3933
|
+
this._disabled.next(BooleanStringKeyArrayUtilityInstance.set(this.disabled, key ?? DEFAULT_FORM_DISABLED_KEY, disabled));
|
|
3934
|
+
if (this._delegate.value) {
|
|
3935
|
+
this._delegate.value.setDisabled(key, disabled);
|
|
3936
|
+
}
|
|
3650
3937
|
}
|
|
3651
3938
|
resetForm() {
|
|
3652
3939
|
if (this._delegate.value) {
|
|
@@ -3659,7 +3946,7 @@ class DbxFormlyContext {
|
|
|
3659
3946
|
}
|
|
3660
3947
|
}
|
|
3661
3948
|
}
|
|
3662
|
-
DbxFormlyContext.INITIAL_STATE = { isComplete: false, state: DbxFormState.INITIALIZING };
|
|
3949
|
+
DbxFormlyContext.INITIAL_STATE = { isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' };
|
|
3663
3950
|
|
|
3664
3951
|
/**
|
|
3665
3952
|
* Abstract component for wrapping a form.
|
|
@@ -3672,7 +3959,7 @@ class AbstractFormlyFormDirective {
|
|
|
3672
3959
|
return this.context.isDisabled();
|
|
3673
3960
|
}
|
|
3674
3961
|
set disabled(disabled) {
|
|
3675
|
-
this.context.setDisabled(disabled);
|
|
3962
|
+
this.context.setDisabled(undefined, disabled);
|
|
3676
3963
|
}
|
|
3677
3964
|
ngOnDestroy() {
|
|
3678
3965
|
this.context.destroy();
|
|
@@ -3690,10 +3977,13 @@ class AbstractFormlyFormDirective {
|
|
|
3690
3977
|
clearValue() {
|
|
3691
3978
|
this.setValue({});
|
|
3692
3979
|
}
|
|
3980
|
+
setDisabled(key, disabled) {
|
|
3981
|
+
this.context.setDisabled(key, disabled);
|
|
3982
|
+
}
|
|
3693
3983
|
}
|
|
3694
|
-
AbstractFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3695
|
-
AbstractFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3984
|
+
AbstractFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFormlyFormDirective, deps: [{ token: DbxFormlyContext }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3985
|
+
AbstractFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractFormlyFormDirective, inputs: { disabled: "disabled" }, ngImport: i0 });
|
|
3986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFormlyFormDirective, decorators: [{
|
|
3697
3987
|
type: Directive
|
|
3698
3988
|
}], ctorParameters: function () { return [{ type: DbxFormlyContext }]; }, propDecorators: { disabled: [{
|
|
3699
3989
|
type: Input
|
|
@@ -3706,9 +3996,9 @@ class AbstractSyncFormlyFormDirective extends AbstractFormlyFormDirective {
|
|
|
3706
3996
|
this.context.fields = this.fields;
|
|
3707
3997
|
}
|
|
3708
3998
|
}
|
|
3709
|
-
AbstractSyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3710
|
-
AbstractSyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3999
|
+
AbstractSyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractSyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4000
|
+
AbstractSyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractSyncFormlyFormDirective, usesInheritance: true, ngImport: i0 });
|
|
4001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractSyncFormlyFormDirective, decorators: [{
|
|
3712
4002
|
type: Directive
|
|
3713
4003
|
}] });
|
|
3714
4004
|
/**
|
|
@@ -3720,7 +4010,7 @@ class AbstractAsyncFormlyFormDirective extends AbstractFormlyFormDirective {
|
|
|
3720
4010
|
this._fieldsSub = new SubscriptionObject();
|
|
3721
4011
|
}
|
|
3722
4012
|
ngOnInit() {
|
|
3723
|
-
this._fieldsSub.subscription = this.fields$.pipe(distinctUntilChanged
|
|
4013
|
+
this._fieldsSub.subscription = this.fields$.pipe(distinctUntilChanged()).subscribe((fields) => {
|
|
3724
4014
|
this.context.fields = fields;
|
|
3725
4015
|
});
|
|
3726
4016
|
}
|
|
@@ -3729,9 +4019,9 @@ class AbstractAsyncFormlyFormDirective extends AbstractFormlyFormDirective {
|
|
|
3729
4019
|
this._fieldsSub.destroy();
|
|
3730
4020
|
}
|
|
3731
4021
|
}
|
|
3732
|
-
AbstractAsyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3733
|
-
AbstractAsyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4022
|
+
AbstractAsyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4023
|
+
AbstractAsyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractAsyncFormlyFormDirective, usesInheritance: true, ngImport: i0 });
|
|
4024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractAsyncFormlyFormDirective, decorators: [{
|
|
3735
4025
|
type: Directive
|
|
3736
4026
|
}] });
|
|
3737
4027
|
class AbstractConfigAsyncFormlyFormDirective extends AbstractAsyncFormlyFormDirective {
|
|
@@ -3751,9 +4041,9 @@ class AbstractConfigAsyncFormlyFormDirective extends AbstractAsyncFormlyFormDire
|
|
|
3751
4041
|
this._config.complete();
|
|
3752
4042
|
}
|
|
3753
4043
|
}
|
|
3754
|
-
AbstractConfigAsyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3755
|
-
AbstractConfigAsyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4044
|
+
AbstractConfigAsyncFormlyFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractConfigAsyncFormlyFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4045
|
+
AbstractConfigAsyncFormlyFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractConfigAsyncFormlyFormDirective, inputs: { config: "config" }, usesInheritance: true, ngImport: i0 });
|
|
4046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractConfigAsyncFormlyFormDirective, decorators: [{
|
|
3757
4047
|
type: Directive
|
|
3758
4048
|
}], propDecorators: { config: [{
|
|
3759
4049
|
type: Input
|
|
@@ -3779,9 +4069,9 @@ class DbxFormlyFieldsContextDirective extends AbstractAsyncFormlyFormDirective {
|
|
|
3779
4069
|
this._fields.complete();
|
|
3780
4070
|
}
|
|
3781
4071
|
}
|
|
3782
|
-
DbxFormlyFieldsContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3783
|
-
DbxFormlyFieldsContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3784
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4072
|
+
DbxFormlyFieldsContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFieldsContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
4073
|
+
DbxFormlyFieldsContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormlyFieldsContextDirective, selector: "[dbxFormlyFields]", inputs: { fields: ["dbxFormlyFields", "fields"] }, providers: ProvideFormlyContext(), usesInheritance: true, ngImport: i0 });
|
|
4074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFieldsContextDirective, decorators: [{
|
|
3785
4075
|
type: Directive,
|
|
3786
4076
|
args: [{
|
|
3787
4077
|
selector: '[dbxFormlyFields]',
|
|
@@ -3800,30 +4090,65 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
3800
4090
|
super();
|
|
3801
4091
|
this.context = context;
|
|
3802
4092
|
this._fields = new BehaviorSubject(undefined);
|
|
3803
|
-
this._events = new BehaviorSubject({ isComplete: false, state: DbxFormState.INITIALIZING });
|
|
4093
|
+
this._events = new BehaviorSubject({ isComplete: false, state: DbxFormState.INITIALIZING, status: 'PENDING' });
|
|
4094
|
+
this._disabled = new BehaviorSubject(undefined);
|
|
3804
4095
|
this._reset = new BehaviorSubject(new Date());
|
|
3805
4096
|
this._forceUpdate = new Subject();
|
|
4097
|
+
this._disabledSub = new SubscriptionObject();
|
|
3806
4098
|
this.form = new FormGroup({});
|
|
3807
4099
|
this.model = {};
|
|
3808
4100
|
this.options = {};
|
|
3809
|
-
this.fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged
|
|
3810
|
-
this.stream$ = this._reset.pipe(switchMap
|
|
3811
|
-
|
|
3812
|
-
|
|
4101
|
+
this.fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay$1(1));
|
|
4102
|
+
this.stream$ = this._reset.pipe(switchMap((lastResetAt) => this.form.valueChanges.pipe(startWith(0), distinctUntilChanged(), throttleTime$1(50, undefined, { leading: true, trailing: true }), scanCount(-1),
|
|
4103
|
+
// update on validation changes too. Does not count towards changes since last reset.
|
|
4104
|
+
switchMap(changesSinceLastReset => this.form.statusChanges.pipe(startWith(this.form.status), distinctUntilChanged()).pipe(map(_ => changesSinceLastReset))), map((changesSinceLastResetCount) => ({
|
|
4105
|
+
changesSinceLastResetCount,
|
|
4106
|
+
isFormValid: this.form.status !== 'PENDING' && this.form.valid,
|
|
4107
|
+
isFormDisabled: this.form.disabled
|
|
4108
|
+
})), scan((acc, next) => {
|
|
4109
|
+
// Pass forward valid if next was a disabled change/check, which changes angular form's isValid value.
|
|
4110
|
+
// If it was valid prior, then it should be valid now, unless we just reset, in which case it might not be valid.
|
|
4111
|
+
const valid = next.isFormValid || (next.isFormDisabled && acc.isFormValid && acc.changesSinceLastResetCount > 0);
|
|
4112
|
+
return {
|
|
4113
|
+
changesSinceLastResetCount: next.changesSinceLastResetCount,
|
|
4114
|
+
isFormValid: valid,
|
|
4115
|
+
isFormDisabled: next.isFormDisabled
|
|
4116
|
+
};
|
|
4117
|
+
}, {
|
|
4118
|
+
changesSinceLastResetCount: 0,
|
|
4119
|
+
isFormValid: false,
|
|
4120
|
+
isFormDisabled: false
|
|
4121
|
+
}), map(({ changesSinceLastResetCount, isFormValid, isFormDisabled }) => {
|
|
4122
|
+
const isReset = changesSinceLastResetCount <= 1; // first emission after reset is the first value.
|
|
4123
|
+
const complete = isFormValid;
|
|
3813
4124
|
const nextState = {
|
|
3814
4125
|
isComplete: complete,
|
|
3815
4126
|
state: (isReset) ? DbxFormState.RESET : DbxFormState.USED,
|
|
4127
|
+
status: this.form.status,
|
|
3816
4128
|
untouched: this.form.untouched,
|
|
3817
4129
|
pristine: this.form.pristine,
|
|
3818
4130
|
changesCount: changesSinceLastResetCount,
|
|
3819
4131
|
lastResetAt,
|
|
3820
|
-
|
|
4132
|
+
disabled: this.disabled,
|
|
4133
|
+
isDisabled: isFormDisabled
|
|
3821
4134
|
};
|
|
4135
|
+
// console.log('Change: ', nextState);
|
|
3822
4136
|
return nextState;
|
|
3823
4137
|
}))), shareReplay$1(1));
|
|
3824
4138
|
}
|
|
3825
4139
|
ngOnInit() {
|
|
3826
4140
|
this.context.setDelegate(this);
|
|
4141
|
+
this._disabledSub.subscription = this._disabled.pipe(distinctUntilChanged()).subscribe((disabled) => {
|
|
4142
|
+
const isDisabled = BooleanStringKeyArrayUtilityInstance.isTrue(disabled);
|
|
4143
|
+
if (this.form.disabled !== isDisabled) {
|
|
4144
|
+
if (isDisabled) {
|
|
4145
|
+
this.form.disable({ emitEvent: true });
|
|
4146
|
+
}
|
|
4147
|
+
else {
|
|
4148
|
+
this.form.enable({ emitEvent: true });
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4151
|
+
});
|
|
3827
4152
|
}
|
|
3828
4153
|
ngOnDestroy() {
|
|
3829
4154
|
this.context.lockSet.onNextUnlock(() => {
|
|
@@ -3833,11 +4158,14 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
3833
4158
|
this._fields.complete();
|
|
3834
4159
|
this._reset.complete();
|
|
3835
4160
|
this._forceUpdate.complete();
|
|
4161
|
+
this._disabled.complete();
|
|
4162
|
+
this._disabledSub.destroy();
|
|
3836
4163
|
});
|
|
3837
4164
|
}
|
|
3838
4165
|
// MARK: Delegate
|
|
3839
4166
|
init(initialize) {
|
|
3840
4167
|
this._fields.next(initialize.fields);
|
|
4168
|
+
this._disabled.next(initialize.initialDisabled);
|
|
3841
4169
|
}
|
|
3842
4170
|
getValue() {
|
|
3843
4171
|
return of(this.form.value);
|
|
@@ -3859,37 +4187,39 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
3859
4187
|
this.form.markAsPristine();
|
|
3860
4188
|
}
|
|
3861
4189
|
}, 500);
|
|
4190
|
+
// ping reset
|
|
4191
|
+
this.resetForm();
|
|
3862
4192
|
}
|
|
3863
4193
|
resetForm() {
|
|
3864
4194
|
if (this.options.resetModel) {
|
|
3865
4195
|
this.options.resetModel();
|
|
3866
4196
|
}
|
|
4197
|
+
this._reset.next(new Date());
|
|
4198
|
+
}
|
|
4199
|
+
get isDisabled() {
|
|
4200
|
+
return BooleanStringKeyArrayUtilityInstance.isTrue(this.disabled);
|
|
3867
4201
|
}
|
|
3868
4202
|
get disabled() {
|
|
3869
|
-
return this.
|
|
4203
|
+
return this._disabled.value;
|
|
3870
4204
|
}
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
else {
|
|
3877
|
-
this.form.enable({ emitEvent: true });
|
|
3878
|
-
}
|
|
3879
|
-
}
|
|
4205
|
+
getDisabled() {
|
|
4206
|
+
return this._disabled.asObservable();
|
|
4207
|
+
}
|
|
4208
|
+
setDisabled(key, disabled = true) {
|
|
4209
|
+
this._disabled.next(BooleanStringKeyArrayUtilityInstance.set(this.disabled, key ?? DEFAULT_FORM_DISABLED_KEY, disabled));
|
|
3880
4210
|
}
|
|
3881
4211
|
// MARK: Update
|
|
3882
4212
|
forceFormUpdate() {
|
|
3883
4213
|
this._forceUpdate.next();
|
|
3884
4214
|
}
|
|
3885
4215
|
}
|
|
3886
|
-
DbxFormlyFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3887
|
-
DbxFormlyFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
4216
|
+
DbxFormlyFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFormComponent, deps: [{ token: DbxFormlyContext }], target: i0.ɵɵFactoryTarget.Component });
|
|
4217
|
+
DbxFormlyFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormlyFormComponent, selector: "dbx-formly", host: { classAttribute: "dbx-formly" }, providers: ProvideDbxMutableForm(DbxFormlyFormComponent), exportAs: ["formly"], usesInheritance: true, ngImport: i0, template: `
|
|
3888
4218
|
<form [formGroup]="form" class="dbx-formly">
|
|
3889
4219
|
<formly-form [form]="form" [fields]="(fields$ | async) ?? []" [model]="model"></formly-form>
|
|
3890
4220
|
</form>
|
|
3891
4221
|
`, isInline: true, components: [{ type: i1$4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }], directives: [{ type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "async": i5.AsyncPipe } });
|
|
3892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFormComponent, decorators: [{
|
|
3893
4223
|
type: Component,
|
|
3894
4224
|
args: [{
|
|
3895
4225
|
selector: 'dbx-formly',
|
|
@@ -3908,8 +4238,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3908
4238
|
|
|
3909
4239
|
class DbxFormlyModule {
|
|
3910
4240
|
}
|
|
3911
|
-
DbxFormlyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3912
|
-
DbxFormlyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
4241
|
+
DbxFormlyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4242
|
+
DbxFormlyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyModule, declarations: [DbxFormlyFormComponent,
|
|
3913
4243
|
DbxFormlyFieldsContextDirective], imports: [CommonModule,
|
|
3914
4244
|
FormsModule,
|
|
3915
4245
|
ReactiveFormsModule,
|
|
@@ -3920,8 +4250,10 @@ DbxFormlyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
3920
4250
|
ReactiveFormsModule,
|
|
3921
4251
|
// Directives
|
|
3922
4252
|
DbxFormlyFormComponent,
|
|
3923
|
-
DbxFormlyFieldsContextDirective
|
|
3924
|
-
|
|
4253
|
+
DbxFormlyFieldsContextDirective
|
|
4254
|
+
// Helper Modules
|
|
4255
|
+
] });
|
|
4256
|
+
DbxFormlyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyModule, imports: [[
|
|
3925
4257
|
CommonModule,
|
|
3926
4258
|
FormsModule,
|
|
3927
4259
|
ReactiveFormsModule,
|
|
@@ -3931,7 +4263,7 @@ DbxFormlyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
|
|
|
3931
4263
|
// Modules (?)
|
|
3932
4264
|
FormsModule,
|
|
3933
4265
|
ReactiveFormsModule] });
|
|
3934
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyModule, decorators: [{
|
|
3935
4267
|
type: NgModule,
|
|
3936
4268
|
args: [{
|
|
3937
4269
|
imports: [
|
|
@@ -3952,6 +4284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3952
4284
|
// Directives
|
|
3953
4285
|
DbxFormlyFormComponent,
|
|
3954
4286
|
DbxFormlyFieldsContextDirective
|
|
4287
|
+
// Helper Modules
|
|
3955
4288
|
]
|
|
3956
4289
|
}]
|
|
3957
4290
|
}] });
|
|
@@ -3961,9 +4294,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3961
4294
|
*/
|
|
3962
4295
|
class DbxFormSpacerComponent {
|
|
3963
4296
|
}
|
|
3964
|
-
DbxFormSpacerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3965
|
-
DbxFormSpacerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2
|
|
3966
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4297
|
+
DbxFormSpacerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4298
|
+
DbxFormSpacerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormSpacerComponent, selector: "dbx-form-spacer", ngImport: i0, template: `<div class="dbx-form-spacer"></div>`, isInline: true });
|
|
4299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormSpacerComponent, decorators: [{
|
|
3967
4300
|
type: Component,
|
|
3968
4301
|
args: [{
|
|
3969
4302
|
selector: 'dbx-form-spacer',
|
|
@@ -3973,12 +4306,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3973
4306
|
|
|
3974
4307
|
class DbxFormLayoutModule {
|
|
3975
4308
|
}
|
|
3976
|
-
DbxFormLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3977
|
-
DbxFormLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3978
|
-
DbxFormLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
4309
|
+
DbxFormLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4310
|
+
DbxFormLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLayoutModule, declarations: [DbxFormSpacerComponent], imports: [CommonModule], exports: [DbxFormSpacerComponent] });
|
|
4311
|
+
DbxFormLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLayoutModule, imports: [[
|
|
3979
4312
|
CommonModule
|
|
3980
4313
|
]] });
|
|
3981
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormLayoutModule, decorators: [{
|
|
3982
4315
|
type: NgModule,
|
|
3983
4316
|
args: [{
|
|
3984
4317
|
imports: [
|
|
@@ -4033,14 +4366,14 @@ function IsInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER)
|
|
|
4033
4366
|
|
|
4034
4367
|
class DbxFormExtensionModule {
|
|
4035
4368
|
}
|
|
4036
|
-
DbxFormExtensionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
4037
|
-
DbxFormExtensionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
4369
|
+
DbxFormExtensionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4370
|
+
DbxFormExtensionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, exports: [DbxFormModule,
|
|
4038
4371
|
DbxFormlyModule,
|
|
4039
4372
|
DbxFormFormlyFieldModule] });
|
|
4040
|
-
DbxFormExtensionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
4373
|
+
DbxFormExtensionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, imports: [DbxFormModule,
|
|
4041
4374
|
DbxFormlyModule,
|
|
4042
4375
|
DbxFormFormlyFieldModule] });
|
|
4043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, decorators: [{
|
|
4044
4377
|
type: NgModule,
|
|
4045
4378
|
args: [{
|
|
4046
4379
|
exports: [
|
|
@@ -4055,5 +4388,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
4055
4388
|
* Generated bundle index. Do not edit.
|
|
4056
4389
|
*/
|
|
4057
4390
|
|
|
4058
|
-
export { ADDRESS_CITY_MAX_LENGTH, ADDRESS_COUNTRY_MAX_LENGTH, ADDRESS_LINE_MAX_LENGTH, ADDRESS_STATE_MAX_LENGTH, ADDRESS_ZIP_MAX_LENGTH, APP_ACTION_FORM_DISABLED_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective,
|
|
4391
|
+
export { ADDRESS_CITY_MAX_LENGTH, ADDRESS_COUNTRY_MAX_LENGTH, ADDRESS_LINE_MAX_LENGTH, ADDRESS_STATE_MAX_LENGTH, ADDRESS_ZIP_MAX_LENGTH, APP_ACTION_FORM_DISABLED_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective, AbstractFormExpandableSectionWrapperDirective, AbstractFormlyFormDirective, AbstractSyncFormlyFormDirective, AutoTouchFieldWrapperComponent, ChecklistItemFieldDataSetBuilder, DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN, DEFAULT_FORM_DISABLED_KEY, DEFAULT_HAS_VALUE_FN, DEFAULT_PREFERRED_COUNTRIES, DOMAIN_NAME_REGEX, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldTimeMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySelectionModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyTextFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule, DbxFormInfoWrapperComponent, DbxFormIoModule, DbxFormLayoutModule, DbxFormLoadingSourceDirective, DbxFormModule, DbxFormRepeatArrayTypeComponent, DbxFormSectionWrapperComponent, DbxFormSourceDirective, DbxFormSpacerComponent, DbxFormState, DbxFormSubsectionWrapperComponent, DbxFormToggleWrapperComponent, DbxFormValueChangesDirective, DbxFormWorkingWrapperComponent, DbxFormlyContext, DbxFormlyFieldsContextDirective, DbxFormlyFormComponent, DbxFormlyModule, DbxMutableForm, DbxPhoneFieldComponent, DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent, DbxSearchableChipFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxSearchableTextFieldComponent, DbxTextEditorFieldComponent, EXPANDABLE_WRAPPER_KEY, FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY, FLEX_WRAPPER_KEY, INFO_WRAPPER_KEY, INVALID_PHONE_NUMBER_MESSAGE, IsDomain, IsInRange, IsTruthy, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, ProvideDbxForm, ProvideDbxMutableForm, ProvideFormlyContext, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, SECTION_WRAPPER_KEY, STYLE_WRAPPER_KEY, SUBSECTION_WRAPPER_KEY, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, TOGGLE_WRAPPER_KEY, WORKING_WRAPPER_KEY, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressListField, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateTimeField, dbxFormSourceObservable, defaultValidationMessages, disableFormlyFieldAutofillAttributes, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPickableItemFieldValuesByLabel, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, minLengthValidationMessage, minValidationMessage, nameField, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, stateField, staticEnumField, styleWrapper, subsectionWrapper, templateOptionsForFieldConfig, templateOptionsValueForFieldConfig, textAreaField, textEditorField, textField, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, toggleField, toggleWrapper, usernamePasswordLoginFields, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
|
|
4059
4392
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|