@dereekb/dbx-form 8.6.1 → 8.7.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/esm2020/lib/formly/field/field.mjs +27 -2
- package/esm2020/lib/formly/field/value/hidden.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/index.mjs +2 -1
- package/esm2020/lib/formly/field/value/number/index.mjs +3 -0
- package/esm2020/lib/formly/field/value/number/number.field.mjs +23 -0
- package/esm2020/lib/formly/field/value/number/number.field.module.mjs +18 -0
- package/esm2020/lib/formly/field/value/text/text.field.mjs +1 -1
- package/esm2020/lib/formly/field/value/value.module.mjs +5 -4
- package/esm2020/lib/formly/formly.directive.mjs +1 -1
- package/esm2020/lib/formly/template/available.mjs +1 -1
- package/esm2020/lib/validator/number.mjs +23 -1
- package/fesm2015/dereekb-dbx-form.mjs +178 -102
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +186 -105
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/formly/field/field.d.ts +23 -1
- package/lib/formly/field/value/hidden.field.d.ts +1 -1
- package/lib/formly/field/value/index.d.ts +1 -0
- package/lib/formly/field/value/number/index.d.ts +2 -0
- package/lib/formly/field/value/number/number.field.d.ts +13 -0
- package/lib/formly/field/value/number/number.field.module.d.ts +8 -0
- package/lib/formly/field/value/text/text.field.d.ts +4 -4
- package/lib/formly/field/value/value.module.d.ts +3 -2
- package/lib/formly/formly.directive.d.ts +1 -1
- package/lib/formly/template/available.d.ts +1 -1
- package/lib/validator/number.d.ts +8 -0
- package/package.json +3 -3
|
@@ -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$1 from '@angular/flex-layout/flex';
|
|
28
28
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
29
|
-
import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, mergeIntoArray, lastValue, separateValues, arrayToMap, getValueFromGetter, dateFromLogicalDate, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, capitalizeFirstLetter, BooleanStringKeyArrayUtilityInstance } from '@dereekb/util';
|
|
29
|
+
import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, makeValuesGroupMap, findUnique, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, mergeIntoArray, lastValue, separateValues, arrayToMap, getValueFromGetter, dateFromLogicalDate, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, capitalizeFirstLetter, BooleanStringKeyArrayUtilityInstance } from '@dereekb/util';
|
|
30
30
|
import * as i1$3 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';
|
|
@@ -1227,6 +1227,31 @@ function disableFormlyFieldAutofillAttributes() {
|
|
|
1227
1227
|
autocomplete: 'off'
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
|
+
function validatorsForFieldConfig(input) {
|
|
1231
|
+
const validators = asArray(input.validators);
|
|
1232
|
+
const asyncValidators = asArray(input.asyncValidators);
|
|
1233
|
+
const messages = input.messages;
|
|
1234
|
+
let config;
|
|
1235
|
+
if (messages || validators.length || asyncValidators.length) {
|
|
1236
|
+
config = {};
|
|
1237
|
+
if (validators.length) {
|
|
1238
|
+
config.validators = {
|
|
1239
|
+
validation: validators
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
if (asyncValidators.length) {
|
|
1243
|
+
config.validators = {
|
|
1244
|
+
validation: asyncValidators
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
if (messages && !objectHasNoKeys(messages)) {
|
|
1248
|
+
config.validation = {
|
|
1249
|
+
messages
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return config;
|
|
1254
|
+
}
|
|
1230
1255
|
|
|
1231
1256
|
function checklistItemField(config) {
|
|
1232
1257
|
const { key, displayContentObs, componentClass } = config;
|
|
@@ -3102,6 +3127,154 @@ function dateTimeField(config = {}) {
|
|
|
3102
3127
|
return fieldConfig;
|
|
3103
3128
|
}
|
|
3104
3129
|
|
|
3130
|
+
function isTruthy() {
|
|
3131
|
+
return (control) => {
|
|
3132
|
+
const value = control.value;
|
|
3133
|
+
if (!value) {
|
|
3134
|
+
return {
|
|
3135
|
+
isTruthy: value
|
|
3136
|
+
};
|
|
3137
|
+
}
|
|
3138
|
+
return {};
|
|
3139
|
+
};
|
|
3140
|
+
}
|
|
3141
|
+
|
|
3142
|
+
const DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
3143
|
+
function isDomain() {
|
|
3144
|
+
return Validators.pattern(DOMAIN_NAME_REGEX);
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';
|
|
3148
|
+
/**
|
|
3149
|
+
* Validator for validating all values within an object.
|
|
3150
|
+
*
|
|
3151
|
+
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3152
|
+
*
|
|
3153
|
+
* @param config
|
|
3154
|
+
* @returns
|
|
3155
|
+
*/
|
|
3156
|
+
function fieldValuesAreEqualValidator(config = {}) {
|
|
3157
|
+
const { keysFilter, valuesFilter: inputValuesFilter, isEqual = (a, b) => a === b, message = 'Field values are not equal.' } = config;
|
|
3158
|
+
const valuesFilter = inputValuesFilter !== null && inputValuesFilter !== void 0 ? inputValuesFilter : {
|
|
3159
|
+
valueFilter: KeyValueTypleValueFilter.NONE,
|
|
3160
|
+
keysFilter
|
|
3161
|
+
};
|
|
3162
|
+
return (control) => {
|
|
3163
|
+
const object = control.value;
|
|
3164
|
+
const values = valuesFromPOJO(object, valuesFilter);
|
|
3165
|
+
const isValid = allObjectsAreEqual(values, isEqual);
|
|
3166
|
+
if (isValid) {
|
|
3167
|
+
return null;
|
|
3168
|
+
}
|
|
3169
|
+
else {
|
|
3170
|
+
return {
|
|
3171
|
+
[FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }
|
|
3172
|
+
};
|
|
3173
|
+
}
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* Merges the use of the min and max validator.
|
|
3179
|
+
*
|
|
3180
|
+
* @param min
|
|
3181
|
+
* @param max
|
|
3182
|
+
* @returns
|
|
3183
|
+
*/
|
|
3184
|
+
function isInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
3185
|
+
const minFn = Validators.min(min);
|
|
3186
|
+
const maxFn = Validators.max(max);
|
|
3187
|
+
return (control) => {
|
|
3188
|
+
const minError = minFn(control);
|
|
3189
|
+
const maxError = maxFn(control);
|
|
3190
|
+
let errors = null;
|
|
3191
|
+
if (minError || maxError) {
|
|
3192
|
+
errors = Object.assign(Object.assign({}, minError), maxError);
|
|
3193
|
+
}
|
|
3194
|
+
return errors;
|
|
3195
|
+
};
|
|
3196
|
+
}
|
|
3197
|
+
const IS_DIVISIBLE_BY_VALIDATION_KEY = 'isDivisibleBy';
|
|
3198
|
+
function isDivisibleBy(divisor) {
|
|
3199
|
+
if (divisor === 0) {
|
|
3200
|
+
throw new Error('Divisior must be greater than zero.');
|
|
3201
|
+
}
|
|
3202
|
+
return (control) => {
|
|
3203
|
+
const value = control.value;
|
|
3204
|
+
if (value != null && !isNumberDivisibleBy(value, divisor)) {
|
|
3205
|
+
const nearest = nearestDivisibleValues(value, divisor);
|
|
3206
|
+
return {
|
|
3207
|
+
[IS_DIVISIBLE_BY_VALIDATION_KEY]: {
|
|
3208
|
+
value,
|
|
3209
|
+
divisor,
|
|
3210
|
+
nearest,
|
|
3211
|
+
message: `Number must by divisible by ${divisor}. The two nearest valid values are ${nearest.nearestFloor} and ${nearest.nearestCeil}.`
|
|
3212
|
+
}
|
|
3213
|
+
};
|
|
3214
|
+
}
|
|
3215
|
+
return {};
|
|
3216
|
+
};
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';
|
|
3220
|
+
const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';
|
|
3221
|
+
/**
|
|
3222
|
+
* Validator for validating all values within an object.
|
|
3223
|
+
*
|
|
3224
|
+
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3225
|
+
*
|
|
3226
|
+
* @param config
|
|
3227
|
+
* @returns
|
|
3228
|
+
*/
|
|
3229
|
+
function fieldValueIsAvailableValidator(config) {
|
|
3230
|
+
const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;
|
|
3231
|
+
const pusher = asyncPusherCache({
|
|
3232
|
+
throttle
|
|
3233
|
+
});
|
|
3234
|
+
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3235
|
+
if (isAvailable) {
|
|
3236
|
+
return null;
|
|
3237
|
+
}
|
|
3238
|
+
else {
|
|
3239
|
+
return {
|
|
3240
|
+
[FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }
|
|
3241
|
+
};
|
|
3242
|
+
}
|
|
3243
|
+
}), catchError(() => of({
|
|
3244
|
+
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3245
|
+
})), first());
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
function numberField(config) {
|
|
3249
|
+
const { key, min, max, step, enforceStep, inputType: type = 'number' } = config;
|
|
3250
|
+
const validators = [];
|
|
3251
|
+
if (step && enforceStep) {
|
|
3252
|
+
validators.push(isDivisibleBy(step));
|
|
3253
|
+
}
|
|
3254
|
+
return formlyField(Object.assign(Object.assign({ key, type: 'input' }, propsForFieldConfig(config, {
|
|
3255
|
+
type,
|
|
3256
|
+
min,
|
|
3257
|
+
max,
|
|
3258
|
+
step
|
|
3259
|
+
})), validatorsForFieldConfig({
|
|
3260
|
+
validators
|
|
3261
|
+
})));
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
class DbxFormFormlyNumberFieldModule {
|
|
3265
|
+
}
|
|
3266
|
+
DbxFormFormlyNumberFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3267
|
+
DbxFormFormlyNumberFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule], exports: [DbxFormFormlyWrapperModule] });
|
|
3268
|
+
DbxFormFormlyNumberFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [[FormlyMaterialModule], DbxFormFormlyWrapperModule] });
|
|
3269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, decorators: [{
|
|
3270
|
+
type: NgModule,
|
|
3271
|
+
args: [{
|
|
3272
|
+
imports: [FormlyMaterialModule],
|
|
3273
|
+
declarations: [],
|
|
3274
|
+
exports: [DbxFormFormlyWrapperModule]
|
|
3275
|
+
}]
|
|
3276
|
+
}] });
|
|
3277
|
+
|
|
3105
3278
|
/**
|
|
3106
3279
|
* @deprecated use valueSelectionField instead.
|
|
3107
3280
|
*/
|
|
@@ -3426,14 +3599,14 @@ function hiddenField({ key, required = false }) {
|
|
|
3426
3599
|
class DbxFormFormlyValueModule {
|
|
3427
3600
|
}
|
|
3428
3601
|
DbxFormFormlyValueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3429
|
-
DbxFormFormlyValueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule], exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyTextFieldModule] });
|
|
3430
|
-
DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [[CommonModule], DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyTextFieldModule] });
|
|
3602
|
+
DbxFormFormlyValueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [CommonModule], exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] });
|
|
3603
|
+
DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [[CommonModule], DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule] });
|
|
3431
3604
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, decorators: [{
|
|
3432
3605
|
type: NgModule,
|
|
3433
3606
|
args: [{
|
|
3434
3607
|
imports: [CommonModule],
|
|
3435
3608
|
declarations: [],
|
|
3436
|
-
exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyTextFieldModule]
|
|
3609
|
+
exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule]
|
|
3437
3610
|
}]
|
|
3438
3611
|
}] });
|
|
3439
3612
|
|
|
@@ -3451,36 +3624,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3451
3624
|
}]
|
|
3452
3625
|
}] });
|
|
3453
3626
|
|
|
3454
|
-
const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';
|
|
3455
|
-
/**
|
|
3456
|
-
* Validator for validating all values within an object.
|
|
3457
|
-
*
|
|
3458
|
-
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3459
|
-
*
|
|
3460
|
-
* @param config
|
|
3461
|
-
* @returns
|
|
3462
|
-
*/
|
|
3463
|
-
function fieldValuesAreEqualValidator(config = {}) {
|
|
3464
|
-
const { keysFilter, valuesFilter: inputValuesFilter, isEqual = (a, b) => a === b, message = 'Field values are not equal.' } = config;
|
|
3465
|
-
const valuesFilter = inputValuesFilter !== null && inputValuesFilter !== void 0 ? inputValuesFilter : {
|
|
3466
|
-
valueFilter: KeyValueTypleValueFilter.NONE,
|
|
3467
|
-
keysFilter
|
|
3468
|
-
};
|
|
3469
|
-
return (control) => {
|
|
3470
|
-
const object = control.value;
|
|
3471
|
-
const values = valuesFromPOJO(object, valuesFilter);
|
|
3472
|
-
const isValid = allObjectsAreEqual(values, isEqual);
|
|
3473
|
-
if (isValid) {
|
|
3474
|
-
return null;
|
|
3475
|
-
}
|
|
3476
|
-
else {
|
|
3477
|
-
return {
|
|
3478
|
-
[FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }
|
|
3479
|
-
};
|
|
3480
|
-
}
|
|
3481
|
-
};
|
|
3482
|
-
}
|
|
3483
|
-
|
|
3484
3627
|
/**
|
|
3485
3628
|
* Configured simple text password field.
|
|
3486
3629
|
*
|
|
@@ -3550,35 +3693,6 @@ function usernamePasswordLoginFields({ username, password, verifyPassword }) {
|
|
|
3550
3693
|
return [usernameField, passwordField];
|
|
3551
3694
|
}
|
|
3552
3695
|
|
|
3553
|
-
const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';
|
|
3554
|
-
const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';
|
|
3555
|
-
/**
|
|
3556
|
-
* Validator for validating all values within an object.
|
|
3557
|
-
*
|
|
3558
|
-
* This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.
|
|
3559
|
-
*
|
|
3560
|
-
* @param config
|
|
3561
|
-
* @returns
|
|
3562
|
-
*/
|
|
3563
|
-
function fieldValueIsAvailableValidator(config) {
|
|
3564
|
-
const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;
|
|
3565
|
-
const pusher = asyncPusherCache({
|
|
3566
|
-
throttle
|
|
3567
|
-
});
|
|
3568
|
-
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3569
|
-
if (isAvailable) {
|
|
3570
|
-
return null;
|
|
3571
|
-
}
|
|
3572
|
-
else {
|
|
3573
|
-
return {
|
|
3574
|
-
[FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }
|
|
3575
|
-
};
|
|
3576
|
-
}
|
|
3577
|
-
}), catchError(() => of({
|
|
3578
|
-
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3579
|
-
})), first());
|
|
3580
|
-
}
|
|
3581
|
-
|
|
3582
3696
|
function textIsAvailableField(config) {
|
|
3583
3697
|
const field = textField(config);
|
|
3584
3698
|
field.asyncValidators = {
|
|
@@ -4041,44 +4155,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4041
4155
|
}]
|
|
4042
4156
|
}] });
|
|
4043
4157
|
|
|
4044
|
-
function isTruthy() {
|
|
4045
|
-
return (control) => {
|
|
4046
|
-
const value = control.value;
|
|
4047
|
-
if (!value) {
|
|
4048
|
-
return {
|
|
4049
|
-
isTruthy: value
|
|
4050
|
-
};
|
|
4051
|
-
}
|
|
4052
|
-
return {};
|
|
4053
|
-
};
|
|
4054
|
-
}
|
|
4055
|
-
|
|
4056
|
-
const DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
4057
|
-
function isDomain() {
|
|
4058
|
-
return Validators.pattern(DOMAIN_NAME_REGEX);
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
/**
|
|
4062
|
-
* Merges the use of the min and max validator.
|
|
4063
|
-
*
|
|
4064
|
-
* @param min
|
|
4065
|
-
* @param max
|
|
4066
|
-
* @returns
|
|
4067
|
-
*/
|
|
4068
|
-
function isInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
4069
|
-
const minFn = Validators.min(min);
|
|
4070
|
-
const maxFn = Validators.max(max);
|
|
4071
|
-
return (control) => {
|
|
4072
|
-
const minError = minFn(control);
|
|
4073
|
-
const maxError = maxFn(control);
|
|
4074
|
-
let errors = null;
|
|
4075
|
-
if (minError || maxError) {
|
|
4076
|
-
errors = Object.assign(Object.assign({}, minError), maxError);
|
|
4077
|
-
}
|
|
4078
|
-
return errors;
|
|
4079
|
-
};
|
|
4080
|
-
}
|
|
4081
|
-
|
|
4082
4158
|
class DbxFormExtensionModule {
|
|
4083
4159
|
}
|
|
4084
4160
|
DbxFormExtensionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -4095,5 +4171,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4095
4171
|
* Generated bundle index. Do not edit.
|
|
4096
4172
|
*/
|
|
4097
4173
|
|
|
4098
|
-
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, 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_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, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateTimeField, dbxFormSourceObservable, defaultValidationMessages, disableFormlyFieldAutofillAttributes, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDomain, isInRange, isTruthy, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, stateField, staticEnumField, styleWrapper, subsectionWrapper, textAreaField, textEditorField, textField, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, toggleField, toggleWrapper, usernamePasswordLoginFields, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
|
|
4174
|
+
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, 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_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, 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, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateTimeField, dbxFormSourceObservable, defaultValidationMessages, disableFormlyFieldAutofillAttributes, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDivisibleBy, isDomain, isInRange, isTruthy, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, stateField, staticEnumField, styleWrapper, subsectionWrapper, textAreaField, textEditorField, textField, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
|
|
4099
4175
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|