chrv-components 1.11.87 → 1.11.88
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.
|
Binary file
|
|
@@ -212,7 +212,7 @@ class RequiredValidatorDirective {
|
|
|
212
212
|
return requiredValue ? required(requiredValue)(control) : null;
|
|
213
213
|
}
|
|
214
214
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: RequiredValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
215
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: RequiredValidatorDirective, isStandalone: true, selector: "[
|
|
215
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: RequiredValidatorDirective, isStandalone: true, selector: "[chr-required]", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
216
216
|
{
|
|
217
217
|
provide: NG_VALIDATORS,
|
|
218
218
|
useExisting: RequiredValidatorDirective,
|
|
@@ -227,7 +227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
227
227
|
}, {
|
|
228
228
|
type: Directive,
|
|
229
229
|
args: [{
|
|
230
|
-
selector: '[
|
|
230
|
+
selector: '[chr-required]',
|
|
231
231
|
providers: [
|
|
232
232
|
{
|
|
233
233
|
provide: NG_VALIDATORS,
|
|
@@ -240,6 +240,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
240
240
|
}] });
|
|
241
241
|
function required(required = true) {
|
|
242
242
|
return (control) => {
|
|
243
|
+
if (required === false)
|
|
244
|
+
return null;
|
|
243
245
|
const value = control.value;
|
|
244
246
|
const isBoolean = typeof value === 'boolean';
|
|
245
247
|
const isValueValidBoolean = value === true || value === false;
|