@ngx-formly/core 6.3.7 → 6.3.9
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/json-schema/formly-json-schema.service.mjs +3 -3
- package/esm2020/lib/components/formly.field.mjs +7 -5
- package/esm2020/lib/components/formly.form.mjs +7 -2
- package/esm2020/lib/models/fieldconfig.mjs +1 -1
- package/esm2020/lib/templates/field-array.type.mjs +3 -3
- package/fesm2015/ngx-formly-core-json-schema.mjs +2 -2
- package/fesm2015/ngx-formly-core-json-schema.mjs.map +1 -1
- package/fesm2015/ngx-formly-core.mjs +13 -6
- package/fesm2015/ngx-formly-core.mjs.map +1 -1
- package/fesm2020/ngx-formly-core-json-schema.mjs +2 -2
- package/fesm2020/ngx-formly-core-json-schema.mjs.map +1 -1
- package/fesm2020/ngx-formly-core.mjs +13 -6
- package/fesm2020/ngx-formly-core.mjs.map +1 -1
- package/lib/models/fieldconfig.d.ts +10 -3
- package/package.json +1 -1
|
@@ -4,6 +4,15 @@ import { FieldType } from '../templates/field.type';
|
|
|
4
4
|
import { FieldWrapper } from '../templates/field.wrapper';
|
|
5
5
|
import { ValidationMessageOption } from '../models';
|
|
6
6
|
import { Type } from '@angular/core';
|
|
7
|
+
declare type FieldExpression<T = any> = string | ((field: FormlyFieldConfig) => T) | Observable<T>;
|
|
8
|
+
declare type FieldExpressions = {
|
|
9
|
+
[property: string]: FieldExpression;
|
|
10
|
+
} & {
|
|
11
|
+
className?: FieldExpression<string>;
|
|
12
|
+
hide?: FieldExpression<boolean>;
|
|
13
|
+
'props.disabled'?: FieldExpression<boolean>;
|
|
14
|
+
'props.required'?: FieldExpression<boolean>;
|
|
15
|
+
};
|
|
7
16
|
export interface FormlyFieldConfig<Props = FormlyFieldProps & {
|
|
8
17
|
[additionalProperties: string]: any;
|
|
9
18
|
}> {
|
|
@@ -94,9 +103,7 @@ export interface FormlyFieldConfig<Props = FormlyFieldProps & {
|
|
|
94
103
|
/**
|
|
95
104
|
* An object where the key is a property to be set on the main field config and the value is an expression used to assign that property.
|
|
96
105
|
*/
|
|
97
|
-
expressions?:
|
|
98
|
-
[property: string]: string | ((field: FormlyFieldConfig) => any) | Observable<any>;
|
|
99
|
-
};
|
|
106
|
+
expressions?: FieldExpressions;
|
|
100
107
|
/**
|
|
101
108
|
* You can specify your own class that will be applied to the `formly-field` component.
|
|
102
109
|
*/
|