@abp/ng.theme.shared 5.3.1 → 6.0.0-rc.1
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/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +8 -3
- package/esm2020/lib/constants/validation.mjs +3 -3
- package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +2 -1
- package/fesm2015/abp-ng.theme.shared-extensions.mjs +7 -2
- package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2015/abp-ng.theme.shared.mjs +2 -2
- package/fesm2015/abp-ng.theme.shared.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared-extensions.mjs +7 -2
- package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared.mjs +2 -2
- package/fesm2020/abp-ng.theme.shared.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -415,12 +415,16 @@ class ExtensibleFormPropComponent {
|
|
|
415
415
|
this.asterisk = '';
|
|
416
416
|
this.options$ = of([]);
|
|
417
417
|
this.validators = [];
|
|
418
|
+
this.disabledFn = (data) => false;
|
|
418
419
|
this.search = (text$) => text$
|
|
419
420
|
? text$.pipe(debounceTime(300), distinctUntilChanged(), switchMap(text => this.prop.options(this.data, text)))
|
|
420
421
|
: of([]);
|
|
421
422
|
this.typeaheadFormatter = (option) => option.key;
|
|
422
423
|
this.form = groupDirective.form;
|
|
423
424
|
}
|
|
425
|
+
get disabled() {
|
|
426
|
+
return this.disabledFn(this.data);
|
|
427
|
+
}
|
|
424
428
|
setTypeaheadValue(selectedOption) {
|
|
425
429
|
this.typeaheadModel = selectedOption || { key: null, value: null };
|
|
426
430
|
const { key, value } = this.typeaheadModel;
|
|
@@ -499,8 +503,9 @@ class ExtensibleFormPropComponent {
|
|
|
499
503
|
this.options$ = options(this.data);
|
|
500
504
|
if (readonly)
|
|
501
505
|
this.readonly = readonly(this.data);
|
|
502
|
-
if (disabled)
|
|
503
|
-
this.
|
|
506
|
+
if (disabled) {
|
|
507
|
+
this.disabledFn = disabled;
|
|
508
|
+
}
|
|
504
509
|
if (validators) {
|
|
505
510
|
this.validators = validators(this.data);
|
|
506
511
|
this.setAsterisk();
|