@dereekb/dbx-form 4.1.0 → 5.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/LICENSE +21 -0
- package/esm2020/lib/form/action/form.action.directive.mjs +4 -4
- package/esm2020/lib/form/form.mjs +4 -4
- package/esm2020/lib/form/io/form.changes.directive.mjs +1 -1
- package/esm2020/lib/form/io/form.input.directive.mjs +2 -2
- package/esm2020/lib/form/io/form.loading.directive.mjs +1 -1
- package/esm2020/lib/formly/config/validation.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.field.mjs +5 -5
- package/esm2020/lib/formly/field/checklist/checklist.item.field.component.mjs +6 -8
- package/esm2020/lib/formly/field/checklist/checklist.item.field.content.default.component.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.item.field.mjs +1 -1
- package/esm2020/lib/formly/field/checklist/checklist.item.mjs +1 -1
- package/esm2020/lib/formly/field/component/component.field.component.mjs +1 -1
- package/esm2020/lib/formly/field/component/component.field.mjs +1 -1
- package/esm2020/lib/formly/field/field.mjs +1 -1
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.directive.mjs +9 -9
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +1 -1
- package/esm2020/lib/formly/field/selection/pickable/pickable.list.field.component.mjs +4 -4
- package/esm2020/lib/formly/field/selection/pickable/pickable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.chip.field.component.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.directive.mjs +6 -6
- package/esm2020/lib/formly/field/selection/searchable/searchable.field.mjs +2 -3
- package/esm2020/lib/formly/field/selection/searchable/searchable.mjs +1 -1
- package/esm2020/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +2 -3
- package/esm2020/lib/formly/field/selection/selection.mjs +1 -1
- package/esm2020/lib/formly/field/texteditor/texteditor.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/value/array/array.field.component.mjs +2 -2
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +9 -9
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/enum/enum.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/hidden.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/phone/phone.field.mjs +2 -3
- package/esm2020/lib/formly/field/value/text/text.address.field.mjs +2 -1
- package/esm2020/lib/formly/field/wrapper/autotouch.wrapper.component.mjs +2 -2
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.component.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/expandable.wrapper.delegate.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +2 -2
- package/esm2020/lib/formly/field/wrapper/toggle.wrapper.component.mjs +1 -1
- package/esm2020/lib/formly/field/wrapper/working.wrapper.component.mjs +2 -2
- package/esm2020/lib/formly/field/wrapper/wrapper.mjs +1 -1
- package/esm2020/lib/formly/formly.context.directive.mjs +4 -4
- package/esm2020/lib/formly/formly.context.mjs +4 -4
- package/esm2020/lib/formly/formly.directive.mjs +1 -1
- package/esm2020/lib/formly/formly.form.component.mjs +5 -5
- package/esm2020/lib/formly/template/login.mjs +1 -2
- package/esm2020/lib/validator/available.mjs +2 -3
- package/esm2020/lib/validator/boolean.mjs +2 -2
- package/esm2020/lib/validator/email.mjs +2 -2
- package/esm2020/lib/validator/field.mjs +1 -1
- package/esm2020/lib/validator/number.mjs +20 -16
- package/fesm2015/dereekb-dbx-form.mjs +105 -105
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +108 -105
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.directive.d.ts +4 -4
- package/lib/form/form.d.ts +4 -4
- package/lib/form/io/form.changes.directive.d.ts +3 -3
- package/lib/form/io/form.input.directive.d.ts +3 -3
- package/lib/form/io/form.loading.directive.d.ts +3 -3
- package/lib/formly/config/validation.d.ts +4 -4
- package/lib/formly/field/checklist/checklist.field.d.ts +3 -3
- package/lib/formly/field/checklist/checklist.item.d.ts +3 -3
- package/lib/formly/field/checklist/checklist.item.field.component.d.ts +7 -9
- package/lib/formly/field/checklist/checklist.item.field.content.default.component.d.ts +4 -4
- package/lib/formly/field/checklist/checklist.item.field.d.ts +3 -3
- package/lib/formly/field/component/component.field.component.d.ts +3 -4
- package/lib/formly/field/component/component.field.d.ts +2 -3
- package/lib/formly/field/field.d.ts +3 -3
- package/lib/formly/field/selection/pickable/pickable.d.ts +7 -9
- package/lib/formly/field/selection/pickable/pickable.field.d.ts +3 -3
- package/lib/formly/field/selection/pickable/pickable.field.directive.d.ts +39 -40
- package/lib/formly/field/selection/pickable/pickable.list.field.component.d.ts +2 -2
- package/lib/formly/field/selection/searchable/searchable.chip.field.component.d.ts +8 -8
- package/lib/formly/field/selection/searchable/searchable.d.ts +9 -8
- package/lib/formly/field/selection/searchable/searchable.field.autocomplete.item.component.d.ts +1 -1
- package/lib/formly/field/selection/searchable/searchable.field.d.ts +9 -9
- package/lib/formly/field/selection/searchable/searchable.field.directive.d.ts +25 -25
- package/lib/formly/field/selection/searchable/searchable.text.field.component.d.ts +12 -9
- package/lib/formly/field/selection/selection.d.ts +4 -4
- package/lib/formly/field/texteditor/texteditor.field.component.d.ts +1 -2
- package/lib/formly/field/value/array/array.field.component.d.ts +1 -1
- package/lib/formly/field/value/date/datetime.field.component.d.ts +2 -3
- package/lib/formly/field/value/date/datetime.field.d.ts +1 -2
- package/lib/formly/field/value/enum/enum.field.d.ts +1 -1
- package/lib/formly/field/value/hidden.field.d.ts +1 -2
- package/lib/formly/field/value/text/text.address.field.d.ts +1 -2
- package/lib/formly/field/wrapper/expandable.wrapper.component.d.ts +4 -4
- package/lib/formly/field/wrapper/expandable.wrapper.delegate.d.ts +11 -11
- package/lib/formly/field/wrapper/toggle.wrapper.component.d.ts +4 -4
- package/lib/formly/field/wrapper/working.wrapper.component.d.ts +4 -2
- package/lib/formly/field/wrapper/wrapper.d.ts +2 -2
- package/lib/formly/formly.context.d.ts +4 -5
- package/lib/formly/formly.context.directive.d.ts +1 -1
- package/lib/formly/formly.directive.d.ts +1 -1
- package/lib/formly/formly.form.component.d.ts +2 -2
- package/lib/formly/template/login.d.ts +1 -2
- package/lib/validator/boolean.d.ts +1 -1
- package/lib/validator/email.d.ts +1 -1
- package/lib/validator/field.d.ts +4 -4
- package/lib/validator/number.d.ts +8 -1
- package/package.json +4 -3
|
@@ -3,16 +3,15 @@ import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Com
|
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@dereekb/dbx-web';
|
|
6
|
-
import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxLoadingModule, DbxFlexLayoutModule, DbxSectionLayoutModule, DbxRouterAnchorModule, AbstractDbxSelectionListWrapperDirective, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, addConfigToValueListItems,
|
|
6
|
+
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';
|
|
7
7
|
import { isPast, addSeconds, isSameMinute, startOfDay, isSameDay, addMinutes } from 'date-fns';
|
|
8
|
-
import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, mergeMap, shareReplay
|
|
9
|
-
import { LockSet, SubscriptionObject, asObservable, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext,
|
|
8
|
+
import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, mergeMap, shareReplay, startWith, debounceTime, Subject, skipWhile, interval, tap, merge, throttleTime, scan } from 'rxjs';
|
|
9
|
+
import { LockSet, SubscriptionObject, asObservable, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, skipFirstMaybe, asyncPusherCache, scanCount } from '@dereekb/rxjs';
|
|
10
10
|
import * as i2 from '@dereekb/dbx-core';
|
|
11
11
|
import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges } from '@dereekb/dbx-core';
|
|
12
12
|
import * as i3 from '@uirouter/core';
|
|
13
13
|
import * as i4 from '@angular/material/dialog';
|
|
14
14
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
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
15
|
import * as i1$4 from '@ngx-formly/core';
|
|
17
16
|
import { FieldType, FieldWrapper, FormlyModule, FieldArrayType } from '@ngx-formly/core';
|
|
18
17
|
import * as i1 from '@angular/material/checkbox';
|
|
@@ -86,12 +85,12 @@ class DbxForm {
|
|
|
86
85
|
}
|
|
87
86
|
class DbxMutableForm extends DbxForm {
|
|
88
87
|
}
|
|
89
|
-
function
|
|
88
|
+
function provideDbxForm(sourceType) {
|
|
90
89
|
return [{ provide: DbxForm, useExisting: forwardRef(() => sourceType) }];
|
|
91
90
|
}
|
|
92
|
-
function
|
|
91
|
+
function provideDbxMutableForm(sourceType) {
|
|
93
92
|
return [
|
|
94
|
-
...
|
|
93
|
+
...provideDbxForm(sourceType),
|
|
95
94
|
{ provide: DbxMutableForm, useExisting: forwardRef(() => sourceType) }
|
|
96
95
|
];
|
|
97
96
|
}
|
|
@@ -185,7 +184,7 @@ class DbxActionFormDirective {
|
|
|
185
184
|
modifiedObs
|
|
186
185
|
]).pipe(first(), map(([valid, modified]) => ({ valid, modified, value, event })));
|
|
187
186
|
}));
|
|
188
|
-
})).subscribe(({ valid, modified
|
|
187
|
+
})).subscribe(({ valid, modified /*, value, event */ }) => {
|
|
189
188
|
// console.log('x: ', value, event, valid, modified);
|
|
190
189
|
// Update Modified State
|
|
191
190
|
this.source.setIsModified(modified);
|
|
@@ -208,8 +207,8 @@ class DbxActionFormDirective {
|
|
|
208
207
|
});
|
|
209
208
|
}
|
|
210
209
|
preCheckReadyValue(value) {
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
const validatorObs = (this.dbxActionFormValidator) ? this.dbxActionFormValidator(value) : of(true);
|
|
211
|
+
const modifiedObs = (this.dbxActionFormModified) ? this.dbxActionFormModified(value) : of(true);
|
|
213
212
|
return combineLatest([
|
|
214
213
|
validatorObs,
|
|
215
214
|
modifiedObs
|
|
@@ -325,7 +324,7 @@ function dbxFormSourceObservable(form, inputObs, mode$) {
|
|
|
325
324
|
// wait for the form to finish initializing.
|
|
326
325
|
filter((x) => x.state !== DbxFormState.INITIALIZING),
|
|
327
326
|
// if mode is reset, then filter out changes until the form is reset again.
|
|
328
|
-
filter((x) => ((mode === 'reset') ? (x.state === DbxFormState.RESET) : true)), first(), map((
|
|
327
|
+
filter((x) => ((mode === 'reset') ? (x.state === DbxFormState.RESET) : true)), first(), map(() => value))));
|
|
329
328
|
}
|
|
330
329
|
/**
|
|
331
330
|
* Used with a FormComponent to set the value based on the input value.
|
|
@@ -589,9 +588,9 @@ class DbxChecklistItemFieldComponent extends FieldType {
|
|
|
589
588
|
constructor() {
|
|
590
589
|
super(...arguments);
|
|
591
590
|
this._displayContent = new BehaviorSubject(undefined);
|
|
592
|
-
this.displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged
|
|
593
|
-
this.anchor$ = this.displayContent$.pipe(map
|
|
594
|
-
this.rippleDisabled$ = this.displayContent$.pipe(map
|
|
591
|
+
this.displayContent$ = this._displayContent.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
|
|
592
|
+
this.anchor$ = this.displayContent$.pipe(map(x => x.anchor), shareReplay(1));
|
|
593
|
+
this.rippleDisabled$ = this.displayContent$.pipe(map(x => x.ripple === false || (x.ripple !== true && !x.anchor)), distinctUntilChanged(), shareReplay(1));
|
|
595
594
|
}
|
|
596
595
|
get formGroup() {
|
|
597
596
|
return this.form;
|
|
@@ -630,10 +629,10 @@ class DbxChecklistItemFieldComponent extends FieldType {
|
|
|
630
629
|
}
|
|
631
630
|
}
|
|
632
631
|
DbxChecklistItemFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
633
|
-
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=\"
|
|
632
|
+
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) !== true\">navigate_next</mat-icon>\n </div>\n </dbx-anchor>\n </div>\n </div>\n <div *ngIf=\"description\" class=\"dbx-hint\">{{ description }}</div>\n</div>\n", 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; }) } });
|
|
634
633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxChecklistItemFieldComponent, decorators: [{
|
|
635
634
|
type: Component,
|
|
636
|
-
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=\"
|
|
635
|
+
args: [{ template: "<div class=\"dbx-checklist-item-wrapper\" [formGroup]=\"formGroup\">\n <div *ngIf=\"label\" class=\"dbx-checklist-item-label\">{{ label }}</div>\n <div class=\"dbx-checklist-item\">\n <div class=\"dbx-checklist-item-check\">\n <mat-checkbox [formControlName]=\"formControlName\"></mat-checkbox>\n </div>\n <div class=\"dbx-checklist-item-content-wrapper\">\n <dbx-anchor [block]=\"true\" [anchor]=\"anchor$ | async\">\n <div class=\"dbx-checklist-item-content\" matRipple [matRippleDisabled]=\"(rippleDisabled$ | async) ?? false\">\n <dbx-checklist-item-content-component></dbx-checklist-item-content-component>\n <span class=\"spacer\"></span>\n <mat-icon *ngIf=\"(rippleDisabled$ | async) !== true\">navigate_next</mat-icon>\n </div>\n </dbx-anchor>\n </div>\n </div>\n <div *ngIf=\"description\" class=\"dbx-hint\">{{ description }}</div>\n</div>\n" }]
|
|
637
636
|
}] });
|
|
638
637
|
class DbxChecklistItemContentComponent extends AbstractSubscriptionDirective {
|
|
639
638
|
constructor(checklistItemFieldComponent, cdRef) {
|
|
@@ -802,10 +801,10 @@ class AbstractFormExpandableSectionWrapperDirective extends FieldWrapper {
|
|
|
802
801
|
else {
|
|
803
802
|
return this.hasValue$;
|
|
804
803
|
}
|
|
805
|
-
}), shareReplay
|
|
804
|
+
}), shareReplay(1));
|
|
806
805
|
this.hasValue$ = this.formControl$.pipe(switchMap((x) => x.valueChanges.pipe(startWith(x.value), map((value) => {
|
|
807
806
|
return this.hasValueFn(value);
|
|
808
|
-
}), shareReplay
|
|
807
|
+
}), shareReplay(1))));
|
|
809
808
|
}
|
|
810
809
|
get expandableSection() {
|
|
811
810
|
return this.to.expandWrapper;
|
|
@@ -883,7 +882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
883
882
|
*/
|
|
884
883
|
class AutoTouchFieldWrapperComponent extends FieldWrapper {
|
|
885
884
|
ngOnInit() {
|
|
886
|
-
this.formControl.valueChanges.pipe(delay
|
|
885
|
+
this.formControl.valueChanges.pipe(delay(200)).subscribe(() => {
|
|
887
886
|
if (!this.formControl.pristine && this.formControl.untouched) {
|
|
888
887
|
this.formControl.markAsTouched();
|
|
889
888
|
this.formControl.updateValueAndValidity();
|
|
@@ -914,7 +913,7 @@ class DbxFormToggleWrapperComponent extends AbstractFormExpandableSectionWrapper
|
|
|
914
913
|
else {
|
|
915
914
|
return of(this.expandLabel);
|
|
916
915
|
}
|
|
917
|
-
}), shareReplay
|
|
916
|
+
}), shareReplay(1));
|
|
918
917
|
}
|
|
919
918
|
onToggleChange() {
|
|
920
919
|
this.show$.pipe(first()).subscribe((show) => {
|
|
@@ -953,7 +952,7 @@ class DbxFormStyleWrapperComponent extends FieldWrapper {
|
|
|
953
952
|
constructor() {
|
|
954
953
|
super(...arguments);
|
|
955
954
|
this._style = new BehaviorSubject(undefined);
|
|
956
|
-
this.style$ = this._style.pipe(switchMapMaybeDefault(''), shareReplay
|
|
955
|
+
this.style$ = this._style.pipe(switchMapMaybeDefault(''), shareReplay(1));
|
|
957
956
|
}
|
|
958
957
|
get styleWrapper() {
|
|
959
958
|
return this.field.styleWrapper;
|
|
@@ -1255,7 +1254,7 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1255
1254
|
mergedConfig.displayContentObs = combineLatest([
|
|
1256
1255
|
currentField.displayContentObs,
|
|
1257
1256
|
config.displayContentObs
|
|
1258
|
-
]).pipe(map
|
|
1257
|
+
]).pipe(map(([a, b]) => {
|
|
1259
1258
|
const result = Object.assign(Object.assign({}, a), b);
|
|
1260
1259
|
// console.log('A and b: ', a, b, result);
|
|
1261
1260
|
return result;
|
|
@@ -1283,10 +1282,11 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1283
1282
|
}
|
|
1284
1283
|
field(config) {
|
|
1285
1284
|
const key = config.key;
|
|
1286
|
-
|
|
1285
|
+
const field = {
|
|
1287
1286
|
key,
|
|
1288
1287
|
field: config
|
|
1289
|
-
}
|
|
1288
|
+
};
|
|
1289
|
+
this._fields.set(key, field);
|
|
1290
1290
|
}
|
|
1291
1291
|
// MARK: Build/Finish
|
|
1292
1292
|
build() {
|
|
@@ -1296,7 +1296,7 @@ class ChecklistItemFieldDataSetBuilder {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
// MARK: Utility
|
|
1298
1298
|
customContentFromData(mapFn) {
|
|
1299
|
-
return this.dataObs$.pipe(map
|
|
1299
|
+
return this.dataObs$.pipe(map(mapFn));
|
|
1300
1300
|
}
|
|
1301
1301
|
contentWithValueFromData(key, contentFn) {
|
|
1302
1302
|
return this.customContentFromData((data) => {
|
|
@@ -1384,14 +1384,14 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1384
1384
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
1385
1385
|
this._displayHashMap = new BehaviorSubject(new Map());
|
|
1386
1386
|
this.filterInputValue$ = this.inputCtrl.valueChanges.pipe(startWith(undefined));
|
|
1387
|
-
this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay
|
|
1388
|
-
this.loadResultsDisplayValuesState$ = this.formControl$.pipe(first(), switchMap(() => this.loadValuesFn().pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)),
|
|
1389
|
-
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay
|
|
1387
|
+
this.filterInputValueString$ = this.filterInputValue$.pipe(debounceTime(200), distinctUntilChanged(), shareReplay(1));
|
|
1388
|
+
this.loadResultsDisplayValuesState$ = this.formControl$.pipe(first(), switchMap(() => this.loadValuesFn().pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)), startWithBeginLoading())), shareReplay(1));
|
|
1389
|
+
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
|
|
1390
1390
|
this.loadResultsDisplayValues$ = this.loadResultsDisplayValuesState$.pipe(map(x => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.value) !== null && _a !== void 0 ? _a : []; }));
|
|
1391
1391
|
/**
|
|
1392
1392
|
* Current values in the form control.
|
|
1393
1393
|
*/
|
|
1394
|
-
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay
|
|
1394
|
+
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay(1));
|
|
1395
1395
|
/**
|
|
1396
1396
|
* Current values with their display value.
|
|
1397
1397
|
*/
|
|
@@ -1401,7 +1401,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1401
1401
|
currentValues.forEach((x) => {
|
|
1402
1402
|
var _a;
|
|
1403
1403
|
const key = this.hashForValue(x);
|
|
1404
|
-
|
|
1404
|
+
const displayValue = (_a = displayValuesMap.get(key)) === null || _a === void 0 ? void 0 : _a[0];
|
|
1405
1405
|
if (!displayValue) {
|
|
1406
1406
|
valuesNotInDisplayMap.push(x);
|
|
1407
1407
|
}
|
|
@@ -1426,8 +1426,8 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1426
1426
|
const valueHashSet = new Set(values.map(x => this.hashForValue(x)));
|
|
1427
1427
|
return displayValues.filter(x => !x.isUnknown && valueHashSet.has(x._hash));
|
|
1428
1428
|
}
|
|
1429
|
-
})),
|
|
1430
|
-
this.filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map(x => x === null || x === void 0 ? void 0 : x.value), filterMaybe(), shareReplay
|
|
1429
|
+
})), startWithBeginLoading())))), shareReplay(1));
|
|
1430
|
+
this.filteredSearchResults$ = this.filteredSearchResultsState$.pipe(map(x => x === null || x === void 0 ? void 0 : x.value), filterMaybe(), shareReplay(1));
|
|
1431
1431
|
this.items$ = combineLatest([this.filteredSearchResults$, this.values$]).pipe(map(([displayValues, values]) => {
|
|
1432
1432
|
const selectedHashValuesSet = new Set(values.map(x => this.hashForValue(x)));
|
|
1433
1433
|
let items = displayValues.map((x) => ({ itemValue: x, selected: selectedHashValuesSet.has(x._hash) }));
|
|
@@ -1435,13 +1435,13 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1435
1435
|
items = this.sortItems(items);
|
|
1436
1436
|
}
|
|
1437
1437
|
return items;
|
|
1438
|
-
}), shareReplay
|
|
1439
|
-
this.itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap(
|
|
1438
|
+
}), shareReplay(1));
|
|
1439
|
+
this.itemsLoadingState$ = this.loadResultsDisplayValues$.pipe(switchMap(() => this.items$.pipe(first(), map(x => successResult(x)), startWithBeginLoading(), shareReplay(1))));
|
|
1440
1440
|
/**
|
|
1441
1441
|
* Context used for managing the loading of items, or when the current results change.
|
|
1442
1442
|
*/
|
|
1443
1443
|
this.context = new ListLoadingStateContextInstance({ obs: this.itemsLoadingState$, showLoadingOnNoValue: false });
|
|
1444
|
-
this.filterItemsLoadingState$ = this.items$.pipe(map(x => successResult(x)),
|
|
1444
|
+
this.filterItemsLoadingState$ = this.items$.pipe(map(x => successResult(x)), startWithBeginLoading(), shareReplay(1));
|
|
1445
1445
|
/**
|
|
1446
1446
|
* Context used for searching/filtering.
|
|
1447
1447
|
*/
|
|
@@ -1479,7 +1479,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
get autocomplete() {
|
|
1481
1481
|
var _a, _b, _c;
|
|
1482
|
-
return (_c = (_b = (_a = this.field.templateOptions) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b['autocomplete']) !== null && _c !== void 0 ? _c : this.key;
|
|
1482
|
+
return ((_c = ((_b = (_a = this.field.templateOptions) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b['autocomplete'])) !== null && _c !== void 0 ? _c : this.key);
|
|
1483
1483
|
}
|
|
1484
1484
|
get changeSelectionModeToViewOnDisabled() {
|
|
1485
1485
|
var _a;
|
|
@@ -1543,7 +1543,7 @@ class AbstractDbxPickableItemFieldDirective extends FieldType$1 {
|
|
|
1543
1543
|
return this.loadDisplayValuesForFieldValues(values.map((value) => ({ value })));
|
|
1544
1544
|
}
|
|
1545
1545
|
loadDisplayValuesForFieldValues(values) {
|
|
1546
|
-
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)),
|
|
1546
|
+
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)), startWithBeginLoading(), shareReplay(1));
|
|
1547
1547
|
}
|
|
1548
1548
|
getDisplayValuesForFieldValues(values) {
|
|
1549
1549
|
return this._displayHashMap.pipe(mergeMap((displayMap) => {
|
|
@@ -1700,7 +1700,7 @@ class DbxPickableListFieldItemListViewComponent extends AbstractDbxSelectionList
|
|
|
1700
1700
|
};
|
|
1701
1701
|
this.items$ = this.values$.pipe(
|
|
1702
1702
|
// NOTE: This causes the "value" to be a PickableValueFieldDisplayValue<T>, which means we emit PickableValueFieldDisplayValue<T> to DbxPickableListFieldComponent.
|
|
1703
|
-
map(x => addConfigToValueListItems(this.config, x)), shareReplay
|
|
1703
|
+
map(x => addConfigToValueListItems(this.config, x)), shareReplay(1));
|
|
1704
1704
|
}
|
|
1705
1705
|
get multiple() {
|
|
1706
1706
|
return this.dbxPickableListFieldComponent.multiSelect;
|
|
@@ -1714,12 +1714,12 @@ class DbxPickableListFieldItemListViewComponent extends AbstractDbxSelectionList
|
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
DbxPickableListFieldItemListViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, deps: [{ token: DbxPickableListFieldComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
1717
|
-
DbxPickableListFieldItemListViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxPickableListFieldItemListViewComponent, selector: "ng-component", providers:
|
|
1717
|
+
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 } });
|
|
1718
1718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPickableListFieldItemListViewComponent, decorators: [{
|
|
1719
1719
|
type: Component,
|
|
1720
1720
|
args: [{
|
|
1721
1721
|
template: `<dbx-selection-list-view-content [multiple]="multiple" [selectionMode]="selectionMode" [items]="items$ | async"></dbx-selection-list-view-content>`,
|
|
1722
|
-
providers:
|
|
1722
|
+
providers: provideDbxListView(DbxPickableListFieldItemListViewComponent)
|
|
1723
1723
|
}]
|
|
1724
1724
|
}], ctorParameters: function () { return [{ type: DbxPickableListFieldComponent }]; } });
|
|
1725
1725
|
class DbxPickableListFieldItemListViewItemComponent extends AbstractDbxValueListViewItemComponent {
|
|
@@ -1859,7 +1859,7 @@ const DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN = new InjectionToken('DbxSearcha
|
|
|
1859
1859
|
class DbxSearchableFieldAutocompleteItemComponent {
|
|
1860
1860
|
constructor() {
|
|
1861
1861
|
this._displayValue = new BehaviorSubject(undefined);
|
|
1862
|
-
this.displayValue$ = this._displayValue.pipe(filterMaybe(), shareReplay
|
|
1862
|
+
this.displayValue$ = this._displayValue.pipe(filterMaybe(), shareReplay(1));
|
|
1863
1863
|
this.config$ = this.displayValue$.pipe(map(x => {
|
|
1864
1864
|
const config = Object.assign(Object.assign({}, x.display), { providers: mergeIntoArray([{
|
|
1865
1865
|
provide: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN,
|
|
@@ -1954,13 +1954,13 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1954
1954
|
this.inputValueString$ = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged());
|
|
1955
1955
|
this.searchResultsState$ = this.inputValueString$.pipe(switchMap((text) => ((text || this.searchOnEmptyText) ? this.search(text !== null && text !== void 0 ? text : '') : of([])).pipe(switchMap((x) => this.loadDisplayValuesForFieldValues(x)),
|
|
1956
1956
|
// Return begin loading to setup the loading state.
|
|
1957
|
-
|
|
1957
|
+
startWithBeginLoading())), shareReplay(1));
|
|
1958
1958
|
this.singleValueSyncSubscription = new SubscriptionObject();
|
|
1959
1959
|
this.searchContext = new LoadingStateContextInstance({ obs: this.searchResultsState$, showLoadingOnNoValue: false });
|
|
1960
1960
|
this.searchResults$ = this.searchResultsState$.pipe(map(x => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.value) !== null && _a !== void 0 ? _a : []; }));
|
|
1961
|
-
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay
|
|
1962
|
-
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay
|
|
1963
|
-
this.displayValuesState$ = this.values$.pipe(distinctUntilChanged(), switchMap((values) => this.loadDisplayValuesForValues(values)), shareReplay
|
|
1961
|
+
this._formControlValue = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value), shareReplay(1))));
|
|
1962
|
+
this.values$ = this._formControlValue.pipe(map(convertMaybeToArray), shareReplay(1));
|
|
1963
|
+
this.displayValuesState$ = this.values$.pipe(distinctUntilChanged(), switchMap((values) => this.loadDisplayValuesForValues(values)), shareReplay(1));
|
|
1964
1964
|
this.displayValues$ = this.displayValuesState$.pipe(map(x => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.value) !== null && _a !== void 0 ? _a : []; }));
|
|
1965
1965
|
}
|
|
1966
1966
|
get name() {
|
|
@@ -1984,7 +1984,7 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
1984
1984
|
}
|
|
1985
1985
|
get autocomplete() {
|
|
1986
1986
|
var _a, _b, _c;
|
|
1987
|
-
return (_c = (_b = (_a = this.field.templateOptions) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b['autocomplete']) !== null && _c !== void 0 ? _c : this.key;
|
|
1987
|
+
return ((_c = (_b = (_a = this.field.templateOptions) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b['autocomplete']) !== null && _c !== void 0 ? _c : this.key);
|
|
1988
1988
|
}
|
|
1989
1989
|
get hashForValue() {
|
|
1990
1990
|
var _a;
|
|
@@ -2024,7 +2024,7 @@ class AbstractDbxSearchableValueFieldDirective extends FieldType$1 {
|
|
|
2024
2024
|
return this.loadDisplayValuesForFieldValues(values.map((value) => ({ value })));
|
|
2025
2025
|
}
|
|
2026
2026
|
loadDisplayValuesForFieldValues(values) {
|
|
2027
|
-
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)),
|
|
2027
|
+
return this.getDisplayValuesForFieldValues(values).pipe(map((displayValues) => successResult(displayValues)), startWithBeginLoading(), shareReplay(1));
|
|
2028
2028
|
}
|
|
2029
2029
|
getDisplayValuesForFieldValues(values) {
|
|
2030
2030
|
return this._displayHashMap.pipe(mergeMap((displayMap) => {
|
|
@@ -2243,7 +2243,7 @@ function makeMetaFilterSearchableFieldValueDisplayFn({ loadMetaForValues, makeDi
|
|
|
2243
2243
|
let allValues;
|
|
2244
2244
|
if (needLoading.length > 0) {
|
|
2245
2245
|
const loadingResult = loadMetaForValues(needLoading);
|
|
2246
|
-
allValues = loadingResult.pipe(map
|
|
2246
|
+
allValues = loadingResult.pipe(map((result) => {
|
|
2247
2247
|
const resultMap = arrayToMap(result, (x) => x.value);
|
|
2248
2248
|
const mergedWithLoad = needLoading.map((x) => {
|
|
2249
2249
|
var _a;
|
|
@@ -2255,7 +2255,7 @@ function makeMetaFilterSearchableFieldValueDisplayFn({ loadMetaForValues, makeDi
|
|
|
2255
2255
|
meta });
|
|
2256
2256
|
}).filter(x => !x.meta);
|
|
2257
2257
|
return mergedWithLoad;
|
|
2258
|
-
}), map
|
|
2258
|
+
}), map((result) => [...loaded, ...result]));
|
|
2259
2259
|
}
|
|
2260
2260
|
else {
|
|
2261
2261
|
allValues = of(loaded);
|
|
@@ -2286,9 +2286,9 @@ function searchableTextField(config) {
|
|
|
2286
2286
|
class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDirective {
|
|
2287
2287
|
constructor() {
|
|
2288
2288
|
super(...arguments);
|
|
2289
|
-
this.selectedDisplayValue$ = this.displayValues$.pipe(map(x => x[0]), shareReplay
|
|
2289
|
+
this.selectedDisplayValue$ = this.displayValues$.pipe(map(x => x[0]), shareReplay(1), tapDetectChanges(this.cdRef));
|
|
2290
2290
|
this.hasValue$ = this.selectedDisplayValue$.pipe(map(x => Boolean(x)));
|
|
2291
|
-
this.showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map(x => this.showSelectedValue && Boolean(x)), distinctUntilChanged(), shareReplay
|
|
2291
|
+
this.showSelectedDisplayValue$ = this.selectedDisplayValue$.pipe(map(x => this.showSelectedValue && Boolean(x)), distinctUntilChanged(), shareReplay(1), tapDetectChanges(this.cdRef));
|
|
2292
2292
|
this.multiSelect = false;
|
|
2293
2293
|
this._clearInputSub = new SubscriptionObject();
|
|
2294
2294
|
}
|
|
@@ -2312,8 +2312,7 @@ class DbxSearchableTextFieldComponent extends AbstractDbxSearchableValueFieldDir
|
|
|
2312
2312
|
this._clearInputSub.destroy();
|
|
2313
2313
|
}
|
|
2314
2314
|
selected(event) {
|
|
2315
|
-
|
|
2316
|
-
this.addWithDisplayValue(e.option.value);
|
|
2315
|
+
this.addWithDisplayValue(event.option.value);
|
|
2317
2316
|
}
|
|
2318
2317
|
}
|
|
2319
2318
|
DbxSearchableTextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxSearchableTextFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2469,7 +2468,7 @@ class DbxTextEditorFieldComponent extends FieldType$1 {
|
|
|
2469
2468
|
ngOnInit() {
|
|
2470
2469
|
this._editor = new Editor({});
|
|
2471
2470
|
// Watch for value changes every second and update the pristine level.
|
|
2472
|
-
this._sub.subscription = this.editor.valueChanges.pipe(debounceTime
|
|
2471
|
+
this._sub.subscription = this.editor.valueChanges.pipe(debounceTime(100), filter(() => this.editor.view.hasFocus())).subscribe(() => {
|
|
2473
2472
|
this.formControl.updateValueAndValidity();
|
|
2474
2473
|
this.formControl.markAsDirty();
|
|
2475
2474
|
});
|
|
@@ -2671,7 +2670,7 @@ DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
2671
2670
|
</div>
|
|
2672
2671
|
</dbx-subsection>
|
|
2673
2672
|
</div>
|
|
2674
|
-
`, 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"] }] });
|
|
2673
|
+
`, 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,[dbxBar]", 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"] }] });
|
|
2675
2674
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
|
|
2676
2675
|
type: Component,
|
|
2677
2676
|
args: [{
|
|
@@ -2842,12 +2841,12 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2842
2841
|
this._formControlObs = new BehaviorSubject(undefined);
|
|
2843
2842
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
2844
2843
|
this._updateTime = new Subject();
|
|
2845
|
-
this.value$ = this.formControl$.pipe(switchMap
|
|
2844
|
+
this.value$ = this.formControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value))), distinctUntilChanged((a, b) => isSameMinute(a, b)), shareReplay(1));
|
|
2846
2845
|
/**
|
|
2847
2846
|
* Used to trigger/display visual updates (specifically on timeDistance, etc.).
|
|
2848
2847
|
*/
|
|
2849
|
-
this.displayValue$ = interval(10 * 1000).pipe(startWith
|
|
2850
|
-
this.timeString$ = this.value$.pipe(filterMaybe(), map
|
|
2848
|
+
this.displayValue$ = interval(10 * 1000).pipe(startWith(0), map(() => new Date().getMinutes()), distinctUntilChanged(), tap(() => this.cdRef.markForCheck()), switchMap(() => this.value$), shareReplay(1));
|
|
2849
|
+
this.timeString$ = this.value$.pipe(filterMaybe(), map((x) => {
|
|
2851
2850
|
const timezone = guessCurrentTimezone();
|
|
2852
2851
|
const timeString = toReadableTimeString(x, timezone);
|
|
2853
2852
|
return timeString;
|
|
@@ -2861,18 +2860,18 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2861
2860
|
]
|
|
2862
2861
|
});
|
|
2863
2862
|
this._config = new BehaviorSubject(undefined);
|
|
2864
|
-
this.fullDay$ = this.fullDayControl$.pipe(switchMap
|
|
2865
|
-
this.showTimeInput$ = this.fullDay$.pipe(map
|
|
2866
|
-
this.showAddTime$ = this.showTimeInput$.pipe(map
|
|
2867
|
-
this.date$ = this.dateInputCtrl.valueChanges.pipe(startWith
|
|
2868
|
-
this.dateValue$ = merge(this.date$, this.value$.pipe(skipFirstMaybe())).pipe(map
|
|
2869
|
-
this.timeInput$ = this._updateTime.pipe(debounceTime
|
|
2863
|
+
this.fullDay$ = this.fullDayControl$.pipe(switchMap(control => control.valueChanges.pipe(startWith(control.value))));
|
|
2864
|
+
this.showTimeInput$ = this.fullDay$.pipe(map(x => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
|
|
2865
|
+
this.showAddTime$ = this.showTimeInput$.pipe(map(x => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
|
|
2866
|
+
this.date$ = this.dateInputCtrl.valueChanges.pipe(startWith(this.dateInputCtrl.value), filterMaybe(), shareReplay(1));
|
|
2867
|
+
this.dateValue$ = merge(this.date$, this.value$.pipe(skipFirstMaybe())).pipe(map((x) => (x) ? startOfDay(x) : x), distinctUntilChanged((a, b) => a != null && b != null && isSameDay(a, b)), shareReplay(1));
|
|
2868
|
+
this.timeInput$ = this._updateTime.pipe(debounceTime(5), map(() => this.timeInputCtrl.value), distinctUntilChanged());
|
|
2870
2869
|
this.config$ = this._config.pipe(switchMapMaybeDefault(), shareReplay(1));
|
|
2871
2870
|
this.rawDateTime$ = combineLatest([
|
|
2872
2871
|
this.dateValue$,
|
|
2873
|
-
this.timeInput$.pipe(startWith
|
|
2872
|
+
this.timeInput$.pipe(startWith(null)),
|
|
2874
2873
|
this.fullDay$
|
|
2875
|
-
]).pipe(map
|
|
2874
|
+
]).pipe(map(([date, timeString, fullDay]) => {
|
|
2876
2875
|
var _a;
|
|
2877
2876
|
let result;
|
|
2878
2877
|
if (date) {
|
|
@@ -2895,12 +2894,12 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2895
2894
|
}
|
|
2896
2895
|
}
|
|
2897
2896
|
return result;
|
|
2898
|
-
}), distinctUntilChanged
|
|
2897
|
+
}), distinctUntilChanged((a, b) => a != null && b != null && isSameMinute(a, b)), shareReplay(1));
|
|
2899
2898
|
this.timeOutput$ = combineLatest([
|
|
2900
2899
|
this.rawDateTime$,
|
|
2901
2900
|
this._offset,
|
|
2902
|
-
this.config$.pipe(distinctUntilChanged
|
|
2903
|
-
]).pipe(throttleTime(40, undefined, { leading: false, trailing: true }), distinctUntilChanged
|
|
2901
|
+
this.config$.pipe(distinctUntilChanged()),
|
|
2902
|
+
]).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]) => {
|
|
2904
2903
|
if (date != null) {
|
|
2905
2904
|
const instance = new DateTimeMinuteInstance(Object.assign(Object.assign({ date }, config), { roundDownToMinute: true }));
|
|
2906
2905
|
date = instance.limit(date);
|
|
@@ -2908,7 +2907,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
2908
2907
|
date = addMinutes(date, minutes);
|
|
2909
2908
|
}
|
|
2910
2909
|
return date;
|
|
2911
|
-
}), distinctUntilChanged
|
|
2910
|
+
}), distinctUntilChanged((a, b) => a != null && b != null && isSameMinute(a, b)), shareReplay(1));
|
|
2912
2911
|
}
|
|
2913
2912
|
get dateOnly() {
|
|
2914
2913
|
return this.timeMode === DbxDateTimeFieldTimeMode.NONE;
|
|
@@ -3038,6 +3037,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3038
3037
|
}
|
|
3039
3038
|
}
|
|
3040
3039
|
focusTime() {
|
|
3040
|
+
// do nothing
|
|
3041
3041
|
}
|
|
3042
3042
|
focusOutTime() {
|
|
3043
3043
|
this._updateTime.next();
|
|
@@ -3049,7 +3049,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3049
3049
|
this.setFullDay(true);
|
|
3050
3050
|
}
|
|
3051
3051
|
setFullDay(fullDay) {
|
|
3052
|
-
this.fullDayControl$.pipe(first
|
|
3052
|
+
this.fullDayControl$.pipe(first()).subscribe((x) => {
|
|
3053
3053
|
x.setValue(fullDay);
|
|
3054
3054
|
});
|
|
3055
3055
|
}
|
|
@@ -3528,6 +3528,7 @@ function addressField({ key = 'address', required = false } = {}) {
|
|
|
3528
3528
|
function addressListField({ key = 'addresses', required = false, maxAddresses = 6 } = {}) {
|
|
3529
3529
|
return repeatArrayField({
|
|
3530
3530
|
key,
|
|
3531
|
+
required,
|
|
3531
3532
|
label: 'Addresses',
|
|
3532
3533
|
labelForField: 'Address',
|
|
3533
3534
|
addText: 'Add Address',
|
|
@@ -3664,7 +3665,6 @@ function fieldValuesAreEqualValidator(config = {}) {
|
|
|
3664
3665
|
};
|
|
3665
3666
|
}
|
|
3666
3667
|
|
|
3667
|
-
;
|
|
3668
3668
|
/**
|
|
3669
3669
|
* Configured simple text password field.
|
|
3670
3670
|
*
|
|
@@ -3751,7 +3751,7 @@ function fieldValueIsAvailableValidator(config) {
|
|
|
3751
3751
|
const pusher = asyncPusherCache({
|
|
3752
3752
|
throttle
|
|
3753
3753
|
});
|
|
3754
|
-
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap
|
|
3754
|
+
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3755
3755
|
if (isAvailable) {
|
|
3756
3756
|
return null;
|
|
3757
3757
|
}
|
|
@@ -3762,7 +3762,7 @@ function fieldValueIsAvailableValidator(config) {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
}), catchError(() => of({
|
|
3764
3764
|
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3765
|
-
})), first
|
|
3765
|
+
})), first());
|
|
3766
3766
|
}
|
|
3767
3767
|
|
|
3768
3768
|
function textIsAvailableField(config) {
|
|
@@ -3778,12 +3778,12 @@ function textIsAvailableField(config) {
|
|
|
3778
3778
|
/**
|
|
3779
3779
|
* Allows a directive to provide a formly context and form.
|
|
3780
3780
|
*/
|
|
3781
|
-
function
|
|
3781
|
+
function provideFormlyContext() {
|
|
3782
3782
|
return [{
|
|
3783
3783
|
provide: DbxFormlyContext,
|
|
3784
3784
|
useClass: DbxFormlyContext
|
|
3785
3785
|
},
|
|
3786
|
-
...
|
|
3786
|
+
...provideDbxMutableForm(DbxFormlyContext)];
|
|
3787
3787
|
}
|
|
3788
3788
|
/**
|
|
3789
3789
|
* DbxForm Instance that registers a delegate and manages the state of that form/delegate.
|
|
@@ -3797,7 +3797,7 @@ class DbxFormlyContext {
|
|
|
3797
3797
|
this._delegate = new BehaviorSubject(undefined);
|
|
3798
3798
|
this.fields$ = this._fields.pipe(filterMaybe());
|
|
3799
3799
|
this.disabled$ = this._disabled.pipe(filterMaybe());
|
|
3800
|
-
this.stream$ = this._delegate.pipe(distinctUntilChanged(), switchMap(x => (x) ? x.stream$ : of(DbxFormlyContext.INITIAL_STATE)), shareReplay
|
|
3800
|
+
this.stream$ = this._delegate.pipe(distinctUntilChanged(), switchMap(x => (x) ? x.stream$ : of(DbxFormlyContext.INITIAL_STATE)), shareReplay(1));
|
|
3801
3801
|
}
|
|
3802
3802
|
destroy() {
|
|
3803
3803
|
this.lockSet.destroyOnNextUnlock(() => {
|
|
@@ -3832,7 +3832,7 @@ class DbxFormlyContext {
|
|
|
3832
3832
|
}
|
|
3833
3833
|
// MARK: FormComponent
|
|
3834
3834
|
getValue() {
|
|
3835
|
-
return this._delegate.pipe(filterMaybe(), switchMap(x => x.getValue()), shareReplay
|
|
3835
|
+
return this._delegate.pipe(filterMaybe(), switchMap(x => x.getValue()), shareReplay(1));
|
|
3836
3836
|
}
|
|
3837
3837
|
setValue(value) {
|
|
3838
3838
|
this._initialValue.next(value);
|
|
@@ -3948,7 +3948,7 @@ class AbstractConfigAsyncFormlyFormDirective extends AbstractAsyncFormlyFormDire
|
|
|
3948
3948
|
constructor() {
|
|
3949
3949
|
super(...arguments);
|
|
3950
3950
|
this._config = new BehaviorSubject(undefined);
|
|
3951
|
-
this.config$ = this._config.pipe(filterMaybe(), shareReplay
|
|
3951
|
+
this.config$ = this._config.pipe(filterMaybe(), shareReplay(1));
|
|
3952
3952
|
}
|
|
3953
3953
|
get config() {
|
|
3954
3954
|
return this._config.value;
|
|
@@ -3990,12 +3990,12 @@ class DbxFormlyFieldsContextDirective extends AbstractAsyncFormlyFormDirective {
|
|
|
3990
3990
|
}
|
|
3991
3991
|
}
|
|
3992
3992
|
DbxFormlyFieldsContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFieldsContextDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3993
|
-
DbxFormlyFieldsContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormlyFieldsContextDirective, selector: "[dbxFormlyFields]", inputs: { fields: ["dbxFormlyFields", "fields"] }, providers:
|
|
3993
|
+
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 });
|
|
3994
3994
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFieldsContextDirective, decorators: [{
|
|
3995
3995
|
type: Directive,
|
|
3996
3996
|
args: [{
|
|
3997
3997
|
selector: '[dbxFormlyFields]',
|
|
3998
|
-
providers:
|
|
3998
|
+
providers: provideFormlyContext()
|
|
3999
3999
|
}]
|
|
4000
4000
|
}], propDecorators: { fields: [{
|
|
4001
4001
|
type: Input,
|
|
@@ -4018,10 +4018,10 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
4018
4018
|
this.form = new FormGroup({});
|
|
4019
4019
|
this.model = {};
|
|
4020
4020
|
this.options = {};
|
|
4021
|
-
this.fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay
|
|
4022
|
-
this.stream$ = this._reset.pipe(switchMap((lastResetAt) => this.form.valueChanges.pipe(startWith(0), distinctUntilChanged(), throttleTime
|
|
4021
|
+
this.fields$ = this._fields.pipe(switchMapMaybeObs(), distinctUntilChanged(), shareReplay(1));
|
|
4022
|
+
this.stream$ = this._reset.pipe(switchMap((lastResetAt) => this.form.valueChanges.pipe(startWith(0), distinctUntilChanged(), throttleTime(50, undefined, { leading: true, trailing: true }), scanCount(-1),
|
|
4023
4023
|
// update on validation changes too. Does not count towards changes since last reset.
|
|
4024
|
-
switchMap(changesSinceLastReset => this.form.statusChanges.pipe(startWith(this.form.status), distinctUntilChanged()).pipe(map(
|
|
4024
|
+
switchMap(changesSinceLastReset => this.form.statusChanges.pipe(startWith(this.form.status), distinctUntilChanged()).pipe(map(() => changesSinceLastReset))), map((changesSinceLastResetCount) => ({
|
|
4025
4025
|
changesSinceLastResetCount,
|
|
4026
4026
|
isFormValid: this.form.status !== 'PENDING' && this.form.valid,
|
|
4027
4027
|
isFormDisabled: this.form.disabled
|
|
@@ -4054,7 +4054,7 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
4054
4054
|
};
|
|
4055
4055
|
// console.log('Change: ', nextState);
|
|
4056
4056
|
return nextState;
|
|
4057
|
-
}))), shareReplay
|
|
4057
|
+
}))), shareReplay(1));
|
|
4058
4058
|
}
|
|
4059
4059
|
ngOnInit() {
|
|
4060
4060
|
this.context.setDelegate(this);
|
|
@@ -4135,7 +4135,7 @@ class DbxFormlyFormComponent extends AbstractSubscriptionDirective {
|
|
|
4135
4135
|
}
|
|
4136
4136
|
}
|
|
4137
4137
|
DbxFormlyFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormlyFormComponent, deps: [{ token: DbxFormlyContext }], target: i0.ɵɵFactoryTarget.Component });
|
|
4138
|
-
DbxFormlyFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxFormlyFormComponent, selector: "dbx-formly", host: { classAttribute: "dbx-formly" }, providers:
|
|
4138
|
+
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: `
|
|
4139
4139
|
<form [formGroup]="form" class="dbx-formly">
|
|
4140
4140
|
<formly-form [form]="form" [fields]="(fields$ | async) ?? []" [model]="model"></formly-form>
|
|
4141
4141
|
</form>
|
|
@@ -4150,7 +4150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4150
4150
|
<formly-form [form]="form" [fields]="(fields$ | async) ?? []" [model]="model"></formly-form>
|
|
4151
4151
|
</form>
|
|
4152
4152
|
`,
|
|
4153
|
-
providers:
|
|
4153
|
+
providers: provideDbxMutableForm(DbxFormlyFormComponent),
|
|
4154
4154
|
host: {
|
|
4155
4155
|
'class': 'dbx-formly'
|
|
4156
4156
|
}
|
|
@@ -4247,7 +4247,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4247
4247
|
}]
|
|
4248
4248
|
}] });
|
|
4249
4249
|
|
|
4250
|
-
function
|
|
4250
|
+
function isTruthy() {
|
|
4251
4251
|
return (control) => {
|
|
4252
4252
|
const value = control.value;
|
|
4253
4253
|
if (!value) {
|
|
@@ -4260,26 +4260,26 @@ function IsTruthy() {
|
|
|
4260
4260
|
}
|
|
4261
4261
|
|
|
4262
4262
|
const DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
4263
|
-
function
|
|
4263
|
+
function isDomain() {
|
|
4264
4264
|
return Validators.pattern(DOMAIN_NAME_REGEX);
|
|
4265
4265
|
}
|
|
4266
4266
|
|
|
4267
|
-
|
|
4267
|
+
/**
|
|
4268
|
+
* Merges the use of the min and max validator.
|
|
4269
|
+
*
|
|
4270
|
+
* @param min
|
|
4271
|
+
* @param max
|
|
4272
|
+
* @returns
|
|
4273
|
+
*/
|
|
4274
|
+
function isInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
4275
|
+
const minFn = Validators.min(min);
|
|
4276
|
+
const maxFn = Validators.max(max);
|
|
4268
4277
|
return (control) => {
|
|
4269
|
-
const
|
|
4270
|
-
const
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
const bigEnough = value >= min;
|
|
4275
|
-
const smallEnough = value <= max;
|
|
4276
|
-
if (!bigEnough) {
|
|
4277
|
-
errors.min = value;
|
|
4278
|
-
}
|
|
4279
|
-
if (!smallEnough) {
|
|
4280
|
-
errors.max = value;
|
|
4281
|
-
}
|
|
4282
|
-
}
|
|
4278
|
+
const minError = minFn(control);
|
|
4279
|
+
const maxError = maxFn(control);
|
|
4280
|
+
let errors = null;
|
|
4281
|
+
if (minError || maxError) {
|
|
4282
|
+
errors = Object.assign(Object.assign({}, minError), maxError);
|
|
4283
4283
|
}
|
|
4284
4284
|
return errors;
|
|
4285
4285
|
};
|
|
@@ -4309,5 +4309,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4309
4309
|
* Generated bundle index. Do not edit.
|
|
4310
4310
|
*/
|
|
4311
4311
|
|
|
4312
|
-
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,
|
|
4312
|
+
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, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, 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, isDomain, isInRange, isTruthy, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, minLengthValidationMessage, minValidationMessage, nameField, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, provideDbxForm, provideDbxMutableForm, provideFormlyContext, 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 };
|
|
4313
4313
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|