@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';
|
|
@@ -2502,23 +2502,35 @@ function chipTextField(config) {
|
|
|
2502
2502
|
}
|
|
2503
2503
|
|
|
2504
2504
|
function valueSelectionField(config) {
|
|
2505
|
-
const { key, native = false, selectAllOption: inputSelectAllOption } = config;
|
|
2505
|
+
const { key, native = false, addClearOption = false, selectAllOption: inputSelectAllOption, options: inputOptions } = config;
|
|
2506
2506
|
let selectAllOptionConfig;
|
|
2507
2507
|
if (inputSelectAllOption) {
|
|
2508
2508
|
selectAllOptionConfig = {
|
|
2509
2509
|
selectAllOption: typeof inputSelectAllOption === 'boolean' ? 'Select All' : inputSelectAllOption
|
|
2510
2510
|
};
|
|
2511
2511
|
}
|
|
2512
|
+
const options = addClearOption ? asObservable(inputOptions).pipe(map(addValueSelectionOptionFunction(typeof addClearOption === 'string' ? addClearOption : undefined))) : inputOptions;
|
|
2512
2513
|
return formlyField({
|
|
2513
2514
|
key,
|
|
2514
2515
|
type: native ? 'native-select' : 'select',
|
|
2515
2516
|
...propsAndConfigForFieldConfig(config, {
|
|
2516
|
-
options
|
|
2517
|
+
options,
|
|
2517
2518
|
multiple: config.multiple ?? false,
|
|
2518
2519
|
...selectAllOptionConfig
|
|
2519
2520
|
})
|
|
2520
2521
|
});
|
|
2521
2522
|
}
|
|
2523
|
+
function addValueSelectionOptionFunction(label) {
|
|
2524
|
+
return (options) => {
|
|
2525
|
+
const hasClear = options.findIndex((x) => x.clear) !== -1;
|
|
2526
|
+
if (hasClear) {
|
|
2527
|
+
return options;
|
|
2528
|
+
}
|
|
2529
|
+
else {
|
|
2530
|
+
return [{ label, clear: true }, ...options];
|
|
2531
|
+
}
|
|
2532
|
+
};
|
|
2533
|
+
}
|
|
2522
2534
|
|
|
2523
2535
|
class DbxFormFormlySelectionModule {
|
|
2524
2536
|
}
|
|
@@ -2674,12 +2686,30 @@ function textEditorField(config) {
|
|
|
2674
2686
|
}
|
|
2675
2687
|
|
|
2676
2688
|
class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
2689
|
+
constructor() {
|
|
2690
|
+
super(...arguments);
|
|
2691
|
+
this._labelForField = cachedGetter(() => {
|
|
2692
|
+
const input = this.repeatArrayField.labelForField;
|
|
2693
|
+
if (typeof input === 'function') {
|
|
2694
|
+
return input;
|
|
2695
|
+
}
|
|
2696
|
+
else {
|
|
2697
|
+
return makeGetter(input ?? '');
|
|
2698
|
+
}
|
|
2699
|
+
});
|
|
2700
|
+
this._allowRemove = cachedGetter(() => {
|
|
2701
|
+
return asDecisionFunction(this.field.props.allowRemove, true);
|
|
2702
|
+
});
|
|
2703
|
+
}
|
|
2677
2704
|
get repeatArrayField() {
|
|
2678
2705
|
return this.field.props;
|
|
2679
2706
|
}
|
|
2680
2707
|
get label() {
|
|
2681
2708
|
return this.field.props.label ?? this.field.key;
|
|
2682
2709
|
}
|
|
2710
|
+
get description() {
|
|
2711
|
+
return this.field.props.description;
|
|
2712
|
+
}
|
|
2683
2713
|
get addText() {
|
|
2684
2714
|
return this.repeatArrayField.addText ?? 'Add';
|
|
2685
2715
|
}
|
|
@@ -2692,7 +2722,24 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2692
2722
|
get count() {
|
|
2693
2723
|
return this.field.fieldGroup?.length ?? 0;
|
|
2694
2724
|
}
|
|
2695
|
-
get
|
|
2725
|
+
get disableRearrange() {
|
|
2726
|
+
return Boolean(this.field.props.disableRearrange);
|
|
2727
|
+
}
|
|
2728
|
+
get allowAdd() {
|
|
2729
|
+
return this.field.props.allowAdd ?? true;
|
|
2730
|
+
}
|
|
2731
|
+
allowRemove(i) {
|
|
2732
|
+
const array = this.model;
|
|
2733
|
+
const value = array[i];
|
|
2734
|
+
return this._allowRemove()({
|
|
2735
|
+
i,
|
|
2736
|
+
value
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
get addItemDisabled() {
|
|
2740
|
+
return !this.canAddItem;
|
|
2741
|
+
}
|
|
2742
|
+
get canAddItem() {
|
|
2696
2743
|
const max = this.max;
|
|
2697
2744
|
if (max == null) {
|
|
2698
2745
|
return true;
|
|
@@ -2728,64 +2775,70 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
|
|
|
2728
2775
|
drop(event) {
|
|
2729
2776
|
this.swapIndexes(event.previousIndex, event.currentIndex);
|
|
2730
2777
|
}
|
|
2731
|
-
labelForItem(
|
|
2732
|
-
|
|
2778
|
+
labelForItem(fieldConfig, i) {
|
|
2779
|
+
const array = this.model;
|
|
2780
|
+
const value = array[i];
|
|
2781
|
+
return getValueFromGetter(this._labelForField(), {
|
|
2782
|
+
i,
|
|
2783
|
+
value,
|
|
2784
|
+
fieldConfig
|
|
2785
|
+
});
|
|
2733
2786
|
}
|
|
2734
2787
|
}
|
|
2735
2788
|
DbxFormRepeatArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2736
2789
|
DbxFormRepeatArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: DbxFormRepeatArrayTypeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2737
2790
|
<div class="dbx-form-repeat-array">
|
|
2738
|
-
<dbx-subsection [header]="label">
|
|
2791
|
+
<dbx-subsection [header]="label" [hint]="description">
|
|
2739
2792
|
<!-- Fields -->
|
|
2740
|
-
<div class="dbx-form-repeat-array-fields" cdkDropList (cdkDropListDropped)="drop($event)">
|
|
2793
|
+
<div class="dbx-form-repeat-array-fields" cdkDropList [cdkDropListDisabled]="disableRearrange" (cdkDropListDropped)="drop($event)">
|
|
2741
2794
|
<div class="dbx-form-repeat-array-field" cdkDrag cdkDragLockAxis="y" *ngFor="let field of field.fieldGroup; let i = index; let last = last">
|
|
2742
|
-
<div class="
|
|
2743
|
-
<dbx-bar>
|
|
2744
|
-
<button cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2795
|
+
<div class="dbx-form-repeat-array-drag-placeholder" *cdkDragPlaceholder></div>
|
|
2796
|
+
<dbx-bar class="dbx-bar-fixed-height">
|
|
2797
|
+
<button *ngIf="!disableRearrange" cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2745
2798
|
<dbx-button-spacer></dbx-button-spacer>
|
|
2746
2799
|
<h4>
|
|
2747
2800
|
<span class="repeat-array-number">{{ i + 1 }}</span>
|
|
2748
|
-
<span>{{ labelForItem(field) }}</span>
|
|
2801
|
+
<span>{{ labelForItem(field, i) }}</span>
|
|
2749
2802
|
</h4>
|
|
2750
2803
|
<span class="dbx-spacer"></span>
|
|
2751
|
-
<
|
|
2804
|
+
<dbx-button *ngIf="allowRemove(i)" color="warn" [text]="removeText" (buttonClick)="remove(i)"></dbx-button>
|
|
2752
2805
|
</dbx-bar>
|
|
2753
2806
|
<formly-field class="dbx-form-repeat-array-field-content" [field]="field"></formly-field>
|
|
2754
2807
|
</div>
|
|
2755
2808
|
</div>
|
|
2756
2809
|
<!-- Add Button -->
|
|
2757
2810
|
<div class="dbx-form-repeat-array-footer">
|
|
2758
|
-
<button *ngIf="
|
|
2811
|
+
<dbx-button *ngIf="allowAdd" [raised]="true" [disabled]="addItemDisabled" [text]="addText" (buttonClick)="add()"></dbx-button>
|
|
2759
2812
|
</div>
|
|
2760
2813
|
</dbx-subsection>
|
|
2761
2814
|
</div>
|
|
2762
|
-
`, 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"] }] });
|
|
2815
|
+
`, 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"] }] });
|
|
2763
2816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
|
|
2764
2817
|
type: Component,
|
|
2765
2818
|
args: [{
|
|
2766
2819
|
template: `
|
|
2767
2820
|
<div class="dbx-form-repeat-array">
|
|
2768
|
-
<dbx-subsection [header]="label">
|
|
2821
|
+
<dbx-subsection [header]="label" [hint]="description">
|
|
2769
2822
|
<!-- Fields -->
|
|
2770
|
-
<div class="dbx-form-repeat-array-fields" cdkDropList (cdkDropListDropped)="drop($event)">
|
|
2823
|
+
<div class="dbx-form-repeat-array-fields" cdkDropList [cdkDropListDisabled]="disableRearrange" (cdkDropListDropped)="drop($event)">
|
|
2771
2824
|
<div class="dbx-form-repeat-array-field" cdkDrag cdkDragLockAxis="y" *ngFor="let field of field.fieldGroup; let i = index; let last = last">
|
|
2772
|
-
<div class="
|
|
2773
|
-
<dbx-bar>
|
|
2774
|
-
<button cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2825
|
+
<div class="dbx-form-repeat-array-drag-placeholder" *cdkDragPlaceholder></div>
|
|
2826
|
+
<dbx-bar class="dbx-bar-fixed-height">
|
|
2827
|
+
<button *ngIf="!disableRearrange" cdkDragHandle mat-flat-button><mat-icon>drag_handle</mat-icon></button>
|
|
2775
2828
|
<dbx-button-spacer></dbx-button-spacer>
|
|
2776
2829
|
<h4>
|
|
2777
2830
|
<span class="repeat-array-number">{{ i + 1 }}</span>
|
|
2778
|
-
<span>{{ labelForItem(field) }}</span>
|
|
2831
|
+
<span>{{ labelForItem(field, i) }}</span>
|
|
2779
2832
|
</h4>
|
|
2780
2833
|
<span class="dbx-spacer"></span>
|
|
2781
|
-
<
|
|
2834
|
+
<dbx-button *ngIf="allowRemove(i)" color="warn" [text]="removeText" (buttonClick)="remove(i)"></dbx-button>
|
|
2782
2835
|
</dbx-bar>
|
|
2783
2836
|
<formly-field class="dbx-form-repeat-array-field-content" [field]="field"></formly-field>
|
|
2784
2837
|
</div>
|
|
2785
2838
|
</div>
|
|
2786
2839
|
<!-- Add Button -->
|
|
2787
2840
|
<div class="dbx-form-repeat-array-footer">
|
|
2788
|
-
<button *ngIf="
|
|
2841
|
+
<dbx-button *ngIf="allowAdd" [raised]="true" [disabled]="addItemDisabled" [text]="addText" (buttonClick)="add()"></dbx-button>
|
|
2789
2842
|
</div>
|
|
2790
2843
|
</dbx-subsection>
|
|
2791
2844
|
</div>
|
|
@@ -2843,15 +2896,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
2843
2896
|
}] });
|
|
2844
2897
|
|
|
2845
2898
|
function repeatArrayField(config) {
|
|
2846
|
-
const { key, repeatFieldGroup, maxLength, addText, removeText, labelForField } = config;
|
|
2899
|
+
const { key, label, description, repeatFieldGroup, maxLength, addText, removeText, labelForField, disableRearrange, allowAdd, allowRemove } = config;
|
|
2847
2900
|
return formlyField({
|
|
2848
2901
|
key,
|
|
2849
2902
|
type: 'repeatarray',
|
|
2850
2903
|
...propsAndConfigForFieldConfig(config, {
|
|
2904
|
+
label,
|
|
2905
|
+
description,
|
|
2851
2906
|
maxLength,
|
|
2852
2907
|
labelForField,
|
|
2853
2908
|
addText,
|
|
2854
|
-
removeText
|
|
2909
|
+
removeText,
|
|
2910
|
+
disableRearrange,
|
|
2911
|
+
allowAdd,
|
|
2912
|
+
allowRemove
|
|
2855
2913
|
}),
|
|
2856
2914
|
fieldArray: {
|
|
2857
2915
|
fieldGroup: asArray(repeatFieldGroup)
|
|
@@ -3763,8 +3821,10 @@ function phoneListField(repeatConfig = {}) {
|
|
|
3763
3821
|
const PHONE_LABEL_MAX_LENGTH = 100;
|
|
3764
3822
|
const LABEL_STRING_MAX_LENGTH = 100;
|
|
3765
3823
|
const SEARCH_STRING_MAX_LENGTH = 100;
|
|
3766
|
-
function nameField(
|
|
3824
|
+
function nameField(config = {}) {
|
|
3825
|
+
const { key = 'name', label = 'Name', placeholder = 'John Doe', required = false, minLength, maxLength, attributes } = config;
|
|
3767
3826
|
return textField({
|
|
3827
|
+
...config,
|
|
3768
3828
|
key,
|
|
3769
3829
|
label,
|
|
3770
3830
|
placeholder,
|
|
@@ -3804,7 +3864,7 @@ function cityField(config = {}) {
|
|
|
3804
3864
|
});
|
|
3805
3865
|
}
|
|
3806
3866
|
function stateField(config = {}) {
|
|
3807
|
-
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;
|
|
3867
|
+
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;
|
|
3808
3868
|
return textField({
|
|
3809
3869
|
...config,
|
|
3810
3870
|
key,
|
|
@@ -3815,7 +3875,8 @@ function stateField(config = {}) {
|
|
|
3815
3875
|
required,
|
|
3816
3876
|
maxLength,
|
|
3817
3877
|
transform: {
|
|
3818
|
-
|
|
3878
|
+
...transform,
|
|
3879
|
+
toUppercase: asCode || transform?.toUppercase
|
|
3819
3880
|
}
|
|
3820
3881
|
});
|
|
3821
3882
|
}
|
|
@@ -4595,5 +4656,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
|
4595
4656
|
* Generated bundle index. Do not edit.
|
|
4596
4657
|
*/
|
|
4597
4658
|
|
|
4598
|
-
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 };
|
|
4659
|
+
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 };
|
|
4599
4660
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|