@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';
|
|
@@ -1212,6 +1212,31 @@ function disableFormlyFieldAutofillAttributes() {
|
|
|
1212
1212
|
autocomplete: 'off'
|
|
1213
1213
|
};
|
|
1214
1214
|
}
|
|
1215
|
+
function validatorsForFieldConfig(input) {
|
|
1216
|
+
const validators = asArray(input.validators);
|
|
1217
|
+
const asyncValidators = asArray(input.asyncValidators);
|
|
1218
|
+
const messages = input.messages;
|
|
1219
|
+
let config;
|
|
1220
|
+
if (messages || validators.length || asyncValidators.length) {
|
|
1221
|
+
config = {};
|
|
1222
|
+
if (validators.length) {
|
|
1223
|
+
config.validators = {
|
|
1224
|
+
validation: validators
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
if (asyncValidators.length) {
|
|
1228
|
+
config.validators = {
|
|
1229
|
+
validation: asyncValidators
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
if (messages && !objectHasNoKeys(messages)) {
|
|
1233
|
+
config.validation = {
|
|
1234
|
+
messages
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
return config;
|
|
1239
|
+
}
|
|
1215
1240
|
|
|
1216
1241
|
function checklistItemField(config) {
|
|
1217
1242
|
const { key, displayContentObs, componentClass } = config;
|
|
@@ -3163,6 +3188,162 @@ function dateTimeField(config = {}) {
|
|
|
3163
3188
|
return fieldConfig;
|
|
3164
3189
|
}
|
|
3165
3190
|
|
|
3191
|
+
function isTruthy() {
|
|
3192
|
+
return (control) => {
|
|
3193
|
+
const value = control.value;
|
|
3194
|
+
if (!value) {
|
|
3195
|
+
return {
|
|
3196
|
+
isTruthy: value
|
|
3197
|
+
};
|
|
3198
|
+
}
|
|
3199
|
+
return {};
|
|
3200
|
+
};
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
const DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
3204
|
+
function isDomain() {
|
|
3205
|
+
return Validators.pattern(DOMAIN_NAME_REGEX);
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';
|
|
3209
|
+
/**
|
|
3210
|
+
* Validator for validating all values within an object.
|
|
3211
|
+
*
|
|
3212
|
+
* 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.
|
|
3213
|
+
*
|
|
3214
|
+
* @param config
|
|
3215
|
+
* @returns
|
|
3216
|
+
*/
|
|
3217
|
+
function fieldValuesAreEqualValidator(config = {}) {
|
|
3218
|
+
const { keysFilter, valuesFilter: inputValuesFilter, isEqual = (a, b) => a === b, message = 'Field values are not equal.' } = config;
|
|
3219
|
+
const valuesFilter = inputValuesFilter ?? {
|
|
3220
|
+
valueFilter: KeyValueTypleValueFilter.NONE,
|
|
3221
|
+
keysFilter
|
|
3222
|
+
};
|
|
3223
|
+
return (control) => {
|
|
3224
|
+
const object = control.value;
|
|
3225
|
+
const values = valuesFromPOJO(object, valuesFilter);
|
|
3226
|
+
const isValid = allObjectsAreEqual(values, isEqual);
|
|
3227
|
+
if (isValid) {
|
|
3228
|
+
return null;
|
|
3229
|
+
}
|
|
3230
|
+
else {
|
|
3231
|
+
return {
|
|
3232
|
+
[FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }
|
|
3233
|
+
};
|
|
3234
|
+
}
|
|
3235
|
+
};
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
/**
|
|
3239
|
+
* Merges the use of the min and max validator.
|
|
3240
|
+
*
|
|
3241
|
+
* @param min
|
|
3242
|
+
* @param max
|
|
3243
|
+
* @returns
|
|
3244
|
+
*/
|
|
3245
|
+
function isInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
3246
|
+
const minFn = Validators.min(min);
|
|
3247
|
+
const maxFn = Validators.max(max);
|
|
3248
|
+
return (control) => {
|
|
3249
|
+
const minError = minFn(control);
|
|
3250
|
+
const maxError = maxFn(control);
|
|
3251
|
+
let errors = null;
|
|
3252
|
+
if (minError || maxError) {
|
|
3253
|
+
errors = {
|
|
3254
|
+
...minError,
|
|
3255
|
+
...maxError
|
|
3256
|
+
};
|
|
3257
|
+
}
|
|
3258
|
+
return errors;
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
const IS_DIVISIBLE_BY_VALIDATION_KEY = 'isDivisibleBy';
|
|
3262
|
+
function isDivisibleBy(divisor) {
|
|
3263
|
+
if (divisor === 0) {
|
|
3264
|
+
throw new Error('Divisior must be greater than zero.');
|
|
3265
|
+
}
|
|
3266
|
+
return (control) => {
|
|
3267
|
+
const value = control.value;
|
|
3268
|
+
if (value != null && !isNumberDivisibleBy(value, divisor)) {
|
|
3269
|
+
const nearest = nearestDivisibleValues(value, divisor);
|
|
3270
|
+
return {
|
|
3271
|
+
[IS_DIVISIBLE_BY_VALIDATION_KEY]: {
|
|
3272
|
+
value,
|
|
3273
|
+
divisor,
|
|
3274
|
+
nearest,
|
|
3275
|
+
message: `Number must by divisible by ${divisor}. The two nearest valid values are ${nearest.nearestFloor} and ${nearest.nearestCeil}.`
|
|
3276
|
+
}
|
|
3277
|
+
};
|
|
3278
|
+
}
|
|
3279
|
+
return {};
|
|
3280
|
+
};
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';
|
|
3284
|
+
const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';
|
|
3285
|
+
/**
|
|
3286
|
+
* Validator for validating all values within an object.
|
|
3287
|
+
*
|
|
3288
|
+
* 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.
|
|
3289
|
+
*
|
|
3290
|
+
* @param config
|
|
3291
|
+
* @returns
|
|
3292
|
+
*/
|
|
3293
|
+
function fieldValueIsAvailableValidator(config) {
|
|
3294
|
+
const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;
|
|
3295
|
+
const pusher = asyncPusherCache({
|
|
3296
|
+
throttle
|
|
3297
|
+
});
|
|
3298
|
+
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3299
|
+
if (isAvailable) {
|
|
3300
|
+
return null;
|
|
3301
|
+
}
|
|
3302
|
+
else {
|
|
3303
|
+
return {
|
|
3304
|
+
[FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }
|
|
3305
|
+
};
|
|
3306
|
+
}
|
|
3307
|
+
}), catchError(() => of({
|
|
3308
|
+
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3309
|
+
})), first());
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
function numberField(config) {
|
|
3313
|
+
const { key, min, max, step, enforceStep, inputType: type = 'number' } = config;
|
|
3314
|
+
const validators = [];
|
|
3315
|
+
if (step && enforceStep) {
|
|
3316
|
+
validators.push(isDivisibleBy(step));
|
|
3317
|
+
}
|
|
3318
|
+
return formlyField({
|
|
3319
|
+
key,
|
|
3320
|
+
type: 'input',
|
|
3321
|
+
...propsForFieldConfig(config, {
|
|
3322
|
+
type,
|
|
3323
|
+
min,
|
|
3324
|
+
max,
|
|
3325
|
+
step
|
|
3326
|
+
}),
|
|
3327
|
+
...validatorsForFieldConfig({
|
|
3328
|
+
validators
|
|
3329
|
+
})
|
|
3330
|
+
});
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
class DbxFormFormlyNumberFieldModule {
|
|
3334
|
+
}
|
|
3335
|
+
DbxFormFormlyNumberFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3336
|
+
DbxFormFormlyNumberFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [FormlyMaterialModule], exports: [DbxFormFormlyWrapperModule] });
|
|
3337
|
+
DbxFormFormlyNumberFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, imports: [[FormlyMaterialModule], DbxFormFormlyWrapperModule] });
|
|
3338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyNumberFieldModule, decorators: [{
|
|
3339
|
+
type: NgModule,
|
|
3340
|
+
args: [{
|
|
3341
|
+
imports: [FormlyMaterialModule],
|
|
3342
|
+
declarations: [],
|
|
3343
|
+
exports: [DbxFormFormlyWrapperModule]
|
|
3344
|
+
}]
|
|
3345
|
+
}] });
|
|
3346
|
+
|
|
3166
3347
|
/**
|
|
3167
3348
|
* @deprecated use valueSelectionField instead.
|
|
3168
3349
|
*/
|
|
@@ -3510,14 +3691,14 @@ function hiddenField({ key, required = false }) {
|
|
|
3510
3691
|
class DbxFormFormlyValueModule {
|
|
3511
3692
|
}
|
|
3512
3693
|
DbxFormFormlyValueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3513
|
-
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] });
|
|
3514
|
-
DbxFormFormlyValueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, imports: [[CommonModule], DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyTextFieldModule] });
|
|
3694
|
+
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] });
|
|
3695
|
+
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] });
|
|
3515
3696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormFormlyValueModule, decorators: [{
|
|
3516
3697
|
type: NgModule,
|
|
3517
3698
|
args: [{
|
|
3518
3699
|
imports: [CommonModule],
|
|
3519
3700
|
declarations: [],
|
|
3520
|
-
exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyTextFieldModule]
|
|
3701
|
+
exports: [DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyEnumFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyTextFieldModule]
|
|
3521
3702
|
}]
|
|
3522
3703
|
}] });
|
|
3523
3704
|
|
|
@@ -3535,36 +3716,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3535
3716
|
}]
|
|
3536
3717
|
}] });
|
|
3537
3718
|
|
|
3538
|
-
const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';
|
|
3539
|
-
/**
|
|
3540
|
-
* Validator for validating all values within an object.
|
|
3541
|
-
*
|
|
3542
|
-
* 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.
|
|
3543
|
-
*
|
|
3544
|
-
* @param config
|
|
3545
|
-
* @returns
|
|
3546
|
-
*/
|
|
3547
|
-
function fieldValuesAreEqualValidator(config = {}) {
|
|
3548
|
-
const { keysFilter, valuesFilter: inputValuesFilter, isEqual = (a, b) => a === b, message = 'Field values are not equal.' } = config;
|
|
3549
|
-
const valuesFilter = inputValuesFilter ?? {
|
|
3550
|
-
valueFilter: KeyValueTypleValueFilter.NONE,
|
|
3551
|
-
keysFilter
|
|
3552
|
-
};
|
|
3553
|
-
return (control) => {
|
|
3554
|
-
const object = control.value;
|
|
3555
|
-
const values = valuesFromPOJO(object, valuesFilter);
|
|
3556
|
-
const isValid = allObjectsAreEqual(values, isEqual);
|
|
3557
|
-
if (isValid) {
|
|
3558
|
-
return null;
|
|
3559
|
-
}
|
|
3560
|
-
else {
|
|
3561
|
-
return {
|
|
3562
|
-
[FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }
|
|
3563
|
-
};
|
|
3564
|
-
}
|
|
3565
|
-
};
|
|
3566
|
-
}
|
|
3567
|
-
|
|
3568
3719
|
/**
|
|
3569
3720
|
* Configured simple text password field.
|
|
3570
3721
|
*
|
|
@@ -3648,35 +3799,6 @@ function usernamePasswordLoginFields({ username, password, verifyPassword }) {
|
|
|
3648
3799
|
return [usernameField, passwordField];
|
|
3649
3800
|
}
|
|
3650
3801
|
|
|
3651
|
-
const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';
|
|
3652
|
-
const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';
|
|
3653
|
-
/**
|
|
3654
|
-
* Validator for validating all values within an object.
|
|
3655
|
-
*
|
|
3656
|
-
* 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.
|
|
3657
|
-
*
|
|
3658
|
-
* @param config
|
|
3659
|
-
* @returns
|
|
3660
|
-
*/
|
|
3661
|
-
function fieldValueIsAvailableValidator(config) {
|
|
3662
|
-
const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;
|
|
3663
|
-
const pusher = asyncPusherCache({
|
|
3664
|
-
throttle
|
|
3665
|
-
});
|
|
3666
|
-
return (control) => pusher(control.valueChanges)(control.value).pipe(switchMap((x) => checkValueIsAvailable(x)), map((isAvailable) => {
|
|
3667
|
-
if (isAvailable) {
|
|
3668
|
-
return null;
|
|
3669
|
-
}
|
|
3670
|
-
else {
|
|
3671
|
-
return {
|
|
3672
|
-
[FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }
|
|
3673
|
-
};
|
|
3674
|
-
}
|
|
3675
|
-
}), catchError(() => of({
|
|
3676
|
-
[FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }
|
|
3677
|
-
})), first());
|
|
3678
|
-
}
|
|
3679
|
-
|
|
3680
3802
|
function textIsAvailableField(config) {
|
|
3681
3803
|
const field = textField(config);
|
|
3682
3804
|
field.asyncValidators = {
|
|
@@ -4141,47 +4263,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4141
4263
|
}]
|
|
4142
4264
|
}] });
|
|
4143
4265
|
|
|
4144
|
-
function isTruthy() {
|
|
4145
|
-
return (control) => {
|
|
4146
|
-
const value = control.value;
|
|
4147
|
-
if (!value) {
|
|
4148
|
-
return {
|
|
4149
|
-
isTruthy: value
|
|
4150
|
-
};
|
|
4151
|
-
}
|
|
4152
|
-
return {};
|
|
4153
|
-
};
|
|
4154
|
-
}
|
|
4155
|
-
|
|
4156
|
-
const DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
4157
|
-
function isDomain() {
|
|
4158
|
-
return Validators.pattern(DOMAIN_NAME_REGEX);
|
|
4159
|
-
}
|
|
4160
|
-
|
|
4161
|
-
/**
|
|
4162
|
-
* Merges the use of the min and max validator.
|
|
4163
|
-
*
|
|
4164
|
-
* @param min
|
|
4165
|
-
* @param max
|
|
4166
|
-
* @returns
|
|
4167
|
-
*/
|
|
4168
|
-
function isInRange(min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
4169
|
-
const minFn = Validators.min(min);
|
|
4170
|
-
const maxFn = Validators.max(max);
|
|
4171
|
-
return (control) => {
|
|
4172
|
-
const minError = minFn(control);
|
|
4173
|
-
const maxError = maxFn(control);
|
|
4174
|
-
let errors = null;
|
|
4175
|
-
if (minError || maxError) {
|
|
4176
|
-
errors = {
|
|
4177
|
-
...minError,
|
|
4178
|
-
...maxError
|
|
4179
|
-
};
|
|
4180
|
-
}
|
|
4181
|
-
return errors;
|
|
4182
|
-
};
|
|
4183
|
-
}
|
|
4184
|
-
|
|
4185
4266
|
class DbxFormExtensionModule {
|
|
4186
4267
|
}
|
|
4187
4268
|
DbxFormExtensionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFormExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -4198,5 +4279,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4198
4279
|
* Generated bundle index. Do not edit.
|
|
4199
4280
|
*/
|
|
4200
4281
|
|
|
4201
|
-
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 };
|
|
4282
|
+
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 };
|
|
4202
4283
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|