@dereekb/dbx-form 9.16.1 → 9.16.3
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/esm2020/lib/formly/field/selection/selection.field.mjs +17 -3
- package/esm2020/lib/formly/field/value/array/array.field.component.mjs +63 -22
- package/esm2020/lib/formly/field/value/array/array.field.mjs +8 -3
- package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +7 -4
- package/fesm2015/dereekb-dbx-form.mjs +91 -36
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +90 -29
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/formly/field/selection/selection.field.d.ts +11 -1
- package/lib/formly/field/value/array/_array.scss +5 -1
- package/lib/formly/field/value/array/array.field.component.d.ts +43 -8
- package/lib/formly/field/value/array/array.field.d.ts +8 -7
- package/lib/formly/field/value/boolean/_boolean.scss +6 -0
- package/lib/formly/field/value/text/text.additional.field.d.ts +1 -1
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -26,7 +26,7 @@ import * as i1$2 from '@angular/material/button';
|
|
|
26
26
|
import { MatButtonModule } from '@angular/material/button';
|
|
27
27
|
import * as i3$3 from '@angular/flex-layout/flex';
|
|
28
28
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
29
|
-
import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, mergeIntoArray, lastValue, separateValues, arrayToMap, getValueFromGetter, filterMaybeValues, dateFromLogicalDate, WEBSITE_DOMAIN_NAME_REGEX, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, transformNumberFunction, concatArrays, transformStringFunction, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX, LAT_LNG_PATTERN, capitalizeFirstLetter, BooleanStringKeyArrayUtilityInstance } from '@dereekb/util';
|
|
29
|
+
import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, mergeIntoArray, lastValue, separateValues, arrayToMap, cachedGetter, makeGetter, asDecisionFunction, getValueFromGetter, filterMaybeValues, dateFromLogicalDate, WEBSITE_DOMAIN_NAME_REGEX, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, transformNumberFunction, concatArrays, transformStringFunction, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX, LAT_LNG_PATTERN, capitalizeFirstLetter, BooleanStringKeyArrayUtilityInstance } from '@dereekb/util';
|
|
30
30
|
import * as i2$1 from '@angular/material/slide-toggle';
|
|
31
31
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
32
32
|
import * as i2$2 from '@angular/flex-layout/extended';
|
|
@@ -2466,14 +2466,26 @@ function chipTextField(config) {
|
|
|
2466
2466
|
|
|
2467
2467
|
function valueSelectionField(config) {
|
|
2468
2468
|
var _a;
|
|
2469
|
-
const { key, native = false, selectAllOption: inputSelectAllOption } = config;
|
|
2469
|
+
const { key, native = false, addClearOption = false, selectAllOption: inputSelectAllOption, options: inputOptions } = config;
|
|
2470
2470
|
let selectAllOptionConfig;
|
|
2471
2471
|
if (inputSelectAllOption) {
|
|
2472
2472
|
selectAllOptionConfig = {
|
|
2473
2473
|
selectAllOption: typeof inputSelectAllOption === 'boolean' ? 'Select All' : inputSelectAllOption
|
|
2474
2474
|
};
|
|
2475
2475
|
}
|
|
2476
|
-
|
|
2476
|
+
const options = addClearOption ? asObservable(inputOptions).pipe(map(addValueSelectionOptionFunction(typeof addClearOption === 'string' ? addClearOption : undefined))) : inputOptions;
|
|
2477
|
+
return formlyField(Object.assign({ key, type: native ? 'native-select' : 'select' }, propsAndConfigForFieldConfig(config, Object.assign({ options, multiple: (_a = config.multiple) !== null && _a !== void 0 ? _a : false }, selectAllOptionConfig))));
|
|
2478
|
+
}
|
|
2479
|
+
function addValueSelectionOptionFunction(label) {
|
|
2480
|
+
return (options) => {
|
|
2481
|
+
const hasClear = options.findIndex((x) => x.clear) !== -1;
|
|
2482
|
+
if (hasClear) {
|
|
2483
|
+
return options;
|
|
2484
|
+
}
|
|
2485
|
+
else {
|
|
2486
|
+
return [{ label, clear: true }, ...options];
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2477
2489
|
}
|
|
2478
2490
|
|
|
2479
2491
|
class DbxFormFormlySelectionModule {
|
|
@@ -2628,6 +2640,21 @@ function textEditorField(config) {
|
|
|
2628
2640
|
}
|
|
2629
2641
|
|
|
2630
2642
|
class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
2643
|
+
constructor() {
|
|
2644
|
+
super(...arguments);
|
|
2645
|
+
this._labelForField = cachedGetter(() => {
|
|
2646
|
+
const input = this.repeatArrayField.labelForField;
|
|
2647
|
+
if (typeof input === 'function') {
|
|
2648
|
+
return input;
|
|
2649
|
+
}
|
|
2650
|
+
else {
|
|
2651
|
+
return makeGetter(input !== null && input !== void 0 ? input : '');
|
|
2652
|
+
}
|
|
2653
|
+
});
|
|
2654
|
+
this._allowRemove = cachedGetter(() => {
|
|
2655
|
+
return asDecisionFunction(this.field.props.allowRemove, true);
|
|
2656
|
+
});
|
|
2657
|
+
}
|
|
2631
2658
|
get repeatArrayField() {
|
|
2632
2659
|
return this.field.props;
|
|
2633
2660
|
}
|
|
@@ -2635,6 +2662,9 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2635
2662
|
var _a;
|
|
2636
2663
|
return (_a = this.field.props.label) !== null && _a !== void 0 ? _a : this.field.key;
|
|
2637
2664
|
}
|
|
2665
|
+
get description() {
|
|
2666
|
+
return this.field.props.description;
|
|
2667
|
+
}
|
|
2638
2668
|
get addText() {
|
|
2639
2669
|
var _a;
|
|
2640
2670
|
return (_a = this.repeatArrayField.addText) !== null && _a !== void 0 ? _a : 'Add';
|
|
@@ -2650,7 +2680,25 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2650
2680
|
var _a, _b;
|
|
2651
2681
|
return (_b = (_a = this.field.fieldGroup) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2652
2682
|
}
|
|
2653
|
-
get
|
|
2683
|
+
get disableRearrange() {
|
|
2684
|
+
return Boolean(this.field.props.disableRearrange);
|
|
2685
|
+
}
|
|
2686
|
+
get allowAdd() {
|
|
2687
|
+
var _a;
|
|
2688
|
+
return (_a = this.field.props.allowAdd) !== null && _a !== void 0 ? _a : true;
|
|
2689
|
+
}
|
|
2690
|
+
allowRemove(i) {
|
|
2691
|
+
const array = this.model;
|
|
2692
|
+
const value = array[i];
|
|
2693
|
+
return this._allowRemove()({
|
|
2694
|
+
i,
|
|
2695
|
+
value
|
|
2696
|
+
});
|
|
2697
|
+
}
|
|
2698
|
+
get addItemDisabled() {
|
|
2699
|
+
return !this.canAddItem;
|
|
2700
|
+
}
|
|
2701
|
+
get canAddItem() {
|
|
2654
2702
|
const max = this.max;
|
|
2655
2703
|
if (max == null) {
|
|
2656
2704
|
return true;
|
|
@@ -2686,65 +2734,70 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2686
2734
|
drop(event) {
|
|
2687
2735
|
this.swapIndexes(event.previousIndex, event.currentIndex);
|
|
2688
2736
|
}
|
|
2689
|
-
labelForItem(
|
|
2690
|
-
|
|
2691
|
-
|
|
2737
|
+
labelForItem(fieldConfig, i) {
|
|
2738
|
+
const array = this.model;
|
|
2739
|
+
const value = array[i];
|
|
2740
|
+
return getValueFromGetter(this._labelForField(), {
|
|
2741
|
+
i,
|
|
2742
|
+
value,
|
|
2743
|
+
fieldConfig
|
|
2744
|
+
});
|
|
2692
2745
|
}
|
|
2693
2746
|
}
|
|
2694
2747
|
DbxFormRepeatArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2695
2748
|
DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxFormRepeatArrayTypeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2696
2749
|
<div class="dbx-form-repeat-array">
|
|
2697
|
-
<dbx-subsection [header]="label">
|
|
2750
|
+
<dbx-subsection [header]="label" [hint]="description">
|
|
2698
2751
|
<!-- Fields -->
|
|
2699
|
-
<div class="dbx-form-repeat-array-fields" cdkDropList (cdkDropListDropped)="drop($event)">
|
|
2752
|
+
<div class="dbx-form-repeat-array-fields" cdkDropList [cdkDropListDisabled]="disableRearrange" (cdkDropListDropped)="drop($event)">
|
|
2700
2753
|
<div class="dbx-form-repeat-array-field" cdkDrag cdkDragLockAxis="y" *ngFor="let field of field.fieldGroup; let i = index; let last = last">
|
|
2701
|
-
<div class="
|
|
2702
|
-
<dbx-bar>
|
|
2703
|
-
<button cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2754
|
+
<div class="dbx-form-repeat-array-drag-placeholder" *cdkDragPlaceholder></div>
|
|
2755
|
+
<dbx-bar class="dbx-bar-fixed-height">
|
|
2756
|
+
<button *ngIf="!disableRearrange" cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2704
2757
|
<dbx-button-spacer></dbx-button-spacer>
|
|
2705
2758
|
<h4>
|
|
2706
2759
|
<span class="repeat-array-number">{{ i + 1 }}</span>
|
|
2707
|
-
<span>{{ labelForItem(field) }}</span>
|
|
2760
|
+
<span>{{ labelForItem(field, i) }}</span>
|
|
2708
2761
|
</h4>
|
|
2709
2762
|
<span class="dbx-spacer"></span>
|
|
2710
|
-
<
|
|
2763
|
+
<dbx-button *ngIf="allowRemove(i)" color="warn" [text]="removeText" (buttonClick)="remove(i)"></dbx-button>
|
|
2711
2764
|
</dbx-bar>
|
|
2712
2765
|
<formly-field class="dbx-form-repeat-array-field-content" [field]="field"></formly-field>
|
|
2713
2766
|
</div>
|
|
2714
2767
|
</div>
|
|
2715
2768
|
<!-- Add Button -->
|
|
2716
2769
|
<div class="dbx-form-repeat-array-footer">
|
|
2717
|
-
<button *ngIf="
|
|
2770
|
+
<dbx-button *ngIf="allowAdd" [raised]="true" [disabled]="addItemDisabled" [text]="addText" (buttonClick)="add()"></dbx-button>
|
|
2718
2771
|
</div>
|
|
2719
2772
|
</dbx-subsection>
|
|
2720
2773
|
</div>
|
|
2721
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: 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"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$5.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i1$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i1$1.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$3.FormlyField, selector: "formly-field", inputs: ["field"] }] });
|
|
2774
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: 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"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$5.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i1$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i1$1.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { kind: "component", type: i1$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$3.FormlyField, selector: "formly-field", inputs: ["field"] }] });
|
|
2722
2775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
|
|
2723
2776
|
type: Component,
|
|
2724
2777
|
args: [{
|
|
2725
2778
|
template: `
|
|
2726
2779
|
<div class="dbx-form-repeat-array">
|
|
2727
|
-
<dbx-subsection [header]="label">
|
|
2780
|
+
<dbx-subsection [header]="label" [hint]="description">
|
|
2728
2781
|
<!-- Fields -->
|
|
2729
|
-
<div class="dbx-form-repeat-array-fields" cdkDropList (cdkDropListDropped)="drop($event)">
|
|
2782
|
+
<div class="dbx-form-repeat-array-fields" cdkDropList [cdkDropListDisabled]="disableRearrange" (cdkDropListDropped)="drop($event)">
|
|
2730
2783
|
<div class="dbx-form-repeat-array-field" cdkDrag cdkDragLockAxis="y" *ngFor="let field of field.fieldGroup; let i = index; let last = last">
|
|
2731
|
-
<div class="
|
|
2732
|
-
<dbx-bar>
|
|
2733
|
-
<button cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2784
|
+
<div class="dbx-form-repeat-array-drag-placeholder" *cdkDragPlaceholder></div>
|
|
2785
|
+
<dbx-bar class="dbx-bar-fixed-height">
|
|
2786
|
+
<button *ngIf="!disableRearrange" cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2734
2787
|
<dbx-button-spacer></dbx-button-spacer>
|
|
2735
2788
|
<h4>
|
|
2736
2789
|
<span class="repeat-array-number">{{ i + 1 }}</span>
|
|
2737
|
-
<span>{{ labelForItem(field) }}</span>
|
|
2790
|
+
<span>{{ labelForItem(field, i) }}</span>
|
|
2738
2791
|
</h4>
|
|
2739
2792
|
<span class="dbx-spacer"></span>
|
|
2740
|
-
<
|
|
2793
|
+
<dbx-button *ngIf="allowRemove(i)" color="warn" [text]="removeText" (buttonClick)="remove(i)"></dbx-button>
|
|
2741
2794
|
</dbx-bar>
|
|
2742
2795
|
<formly-field class="dbx-form-repeat-array-field-content" [field]="field"></formly-field>
|
|
2743
2796
|
</div>
|
|
2744
2797
|
</div>
|
|
2745
2798
|
<!-- Add Button -->
|
|
2746
2799
|
<div class="dbx-form-repeat-array-footer">
|
|
2747
|
-
<button *ngIf="
|
|
2800
|
+
<dbx-button *ngIf="allowAdd" [raised]="true" [disabled]="addItemDisabled" [text]="addText" (buttonClick)="add()"></dbx-button>
|
|
2748
2801
|
</div>
|
|
2749
2802
|
</dbx-subsection>
|
|
2750
2803
|
</div>
|
|
@@ -2802,12 +2855,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
2802
2855
|
}] });
|
|
2803
2856
|
|
|
2804
2857
|
function repeatArrayField(config) {
|
|
2805
|
-
const { key, repeatFieldGroup, maxLength, addText, removeText, labelForField } = config;
|
|
2858
|
+
const { key, label, description, repeatFieldGroup, maxLength, addText, removeText, labelForField, disableRearrange, allowAdd, allowRemove } = config;
|
|
2806
2859
|
return formlyField(Object.assign(Object.assign({ key, type: 'repeatarray' }, propsAndConfigForFieldConfig(config, {
|
|
2860
|
+
label,
|
|
2861
|
+
description,
|
|
2807
2862
|
maxLength,
|
|
2808
2863
|
labelForField,
|
|
2809
2864
|
addText,
|
|
2810
|
-
removeText
|
|
2865
|
+
removeText,
|
|
2866
|
+
disableRearrange,
|
|
2867
|
+
allowAdd,
|
|
2868
|
+
allowRemove
|
|
2811
2869
|
})), { fieldArray: {
|
|
2812
2870
|
fieldGroup: asArray(repeatFieldGroup)
|
|
2813
2871
|
} }));
|
|
@@ -3654,16 +3712,15 @@ function phoneListField(repeatConfig = {}) {
|
|
|
3654
3712
|
const PHONE_LABEL_MAX_LENGTH = 100;
|
|
3655
3713
|
const LABEL_STRING_MAX_LENGTH = 100;
|
|
3656
3714
|
const SEARCH_STRING_MAX_LENGTH = 100;
|
|
3657
|
-
function nameField(
|
|
3658
|
-
|
|
3659
|
-
|
|
3715
|
+
function nameField(config = {}) {
|
|
3716
|
+
const { key = 'name', label = 'Name', placeholder = 'John Doe', required = false, minLength, maxLength, attributes } = config;
|
|
3717
|
+
return textField(Object.assign(Object.assign({}, config), { key,
|
|
3660
3718
|
label,
|
|
3661
3719
|
placeholder,
|
|
3662
3720
|
required,
|
|
3663
3721
|
minLength,
|
|
3664
3722
|
maxLength,
|
|
3665
|
-
attributes
|
|
3666
|
-
});
|
|
3723
|
+
attributes }));
|
|
3667
3724
|
}
|
|
3668
3725
|
function emailField(config = {}) {
|
|
3669
3726
|
const { key = 'email', label = 'Email Address', placeholder = 'you@example.com' } = config;
|
|
@@ -3688,16 +3745,14 @@ function cityField(config = {}) {
|
|
|
3688
3745
|
maxLength }));
|
|
3689
3746
|
}
|
|
3690
3747
|
function stateField(config = {}) {
|
|
3691
|
-
const { asCode = false, pattern = asCode ? US_STATE_CODE_STRING_REGEX : undefined, key = 'state', placeholder = '', label = 'State', autocomplete = 'state', maxLength = asCode ? ADDRESS_STATE_CODE_MAX_LENGTH : ADDRESS_STATE_MAX_LENGTH, required = false } = config;
|
|
3748
|
+
const { asCode = false, pattern = asCode ? US_STATE_CODE_STRING_REGEX : undefined, key = 'state', placeholder = '', label = 'State', autocomplete = 'state', maxLength = asCode ? ADDRESS_STATE_CODE_MAX_LENGTH : ADDRESS_STATE_MAX_LENGTH, transform, required = false } = config;
|
|
3692
3749
|
return textField(Object.assign(Object.assign({}, config), { key,
|
|
3693
3750
|
placeholder,
|
|
3694
3751
|
label,
|
|
3695
3752
|
pattern,
|
|
3696
3753
|
autocomplete,
|
|
3697
3754
|
required,
|
|
3698
|
-
maxLength, transform: {
|
|
3699
|
-
toUppercase: true
|
|
3700
|
-
} }));
|
|
3755
|
+
maxLength, transform: Object.assign(Object.assign({}, transform), { toUppercase: asCode || (transform === null || transform === void 0 ? void 0 : transform.toUppercase) }) }));
|
|
3701
3756
|
}
|
|
3702
3757
|
function countryField(config = {}) {
|
|
3703
3758
|
const { key = 'country', placeholder = '', label = 'Country', autocomplete = 'country', maxLength = ADDRESS_COUNTRY_MAX_LENGTH, required = false } = config;
|
|
@@ -4432,5 +4487,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
4432
4487
|
* Generated bundle index. Do not edit.
|
|
4433
4488
|
*/
|
|
4434
4489
|
|
|
4435
|
-
export { APP_ACTION_FORM_DISABLED_KEY, AUTO_TOUCH_WRAPPER_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_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyNumberFieldModule, 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, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, SECTION_WRAPPER_KEY, STYLE_WRAPPER_KEY, SUBSECTION_WRAPPER_KEY, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, TOGGLE_WRAPPER_KEY, WORKING_WRAPPER_KEY, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dbxDateTimeInputValueParseFactory, dbxDateTimeOutputValueFactory, dbxFormSourceObservable, dbxFormSourceObservableFromStream, defaultValidationMessages, disableFormlyFieldAutofillAttributes, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDivisibleBy, isDomain, isInRange, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, propsAndConfigForFieldConfig, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, stateField, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
|
|
4490
|
+
export { APP_ACTION_FORM_DISABLED_KEY, AUTO_TOUCH_WRAPPER_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_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyNumberFieldModule, 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, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, SECTION_WRAPPER_KEY, STYLE_WRAPPER_KEY, SUBSECTION_WRAPPER_KEY, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, TOGGLE_WRAPPER_KEY, WORKING_WRAPPER_KEY, addValueSelectionOptionFunction, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dbxDateTimeInputValueParseFactory, dbxDateTimeOutputValueFactory, dbxFormSourceObservable, dbxFormSourceObservableFromStream, defaultValidationMessages, disableFormlyFieldAutofillAttributes, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDivisibleBy, isDomain, isInRange, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, propsAndConfigForFieldConfig, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, stateField, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
|
|
4436
4491
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|