@ngx-formly/core 7.0.1 → 7.1.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.
@@ -17,6 +17,9 @@ export declare class FormlyJsonschema {
17
17
  private resolveMultiSchema;
18
18
  private resolveDefinition;
19
19
  private resolveDependencies;
20
+ private extractIfCondition;
21
+ private resolveIfThenElse;
22
+ private resolveConditionalSchema;
20
23
  private guessSchemaType;
21
24
  private addValidator;
22
25
  private isEnum;
@@ -6,5 +6,6 @@ import { FormlyConfig } from './services/formly.config';
6
6
  */
7
7
  export declare const FORMLY_CONFIG: InjectionToken<ConfigOption[]>;
8
8
  export declare function withDefaultConfig(config: FormlyConfig): ConfigOption;
9
+ export declare function withFormlyFieldExpression(): ConfigOption;
9
10
  export declare const provideFormlyCore: (configs?: ConfigOption | ConfigOption[]) => Provider;
10
11
  export declare const provideFormlyConfig: (configs?: ConfigOption | ConfigOption[]) => Provider;
package/lib/core.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { provideFormlyCore, provideFormlyConfig, FORMLY_CONFIG } from './core.config';
1
+ export { provideFormlyCore, provideFormlyConfig, FORMLY_CONFIG, withFormlyFieldExpression } from './core.config';
2
2
  export { LegacyFormlyForm, FormlyForm } from './components/formly.form';
3
- export { FormlyFieldConfig, FormlyTemplateOptions, FormlyFormOptions, FormlyFieldProps, ConfigOption, FormlyExtension, } from './models';
3
+ export { FormlyFieldConfig, FormlyTemplateOptions, FormlyFormOptions, FormlyFieldProps, ConfigOption, FormlyExtension, FormlyFieldConfigPresetProvider, } from './models';
4
4
  export { LegacyFormlyField, FormlyField } from './components/formly.field';
5
5
  export { LegacyFormlyAttributes, FormlyAttributes } from './templates/formly.attributes';
6
6
  export { FormlyGroup as ɵFormlyGroup } from './templates/formly.group';
@@ -1,13 +1,4 @@
1
- import { FormlyFieldConfigCache } from '../../models';
2
- import { FormlyExtension } from '../../models';
3
- export declare class FieldExpressionExtension implements FormlyExtension {
4
- onPopulate(field: FormlyFieldConfigCache): void;
5
- postPopulate(field: FormlyFieldConfigCache): void;
6
- private parseExpressions;
7
- private checkExpressions;
8
- private changeDisabledState;
9
- private changeHideState;
10
- private evalExpr;
11
- private emitExpressionChanges;
12
- private _evalExpressionPath;
1
+ import { FieldExpressionExtension as FieldExpressionLegacyExtension } from '../field-expression-legacy/field-expression';
2
+ export declare class FieldExpressionExtension extends FieldExpressionLegacyExtension {
3
+ protected _evalStringExpression(expression: string, argNames: string[]): any;
13
4
  }
@@ -1,2 +1,4 @@
1
- export declare function evalStringExpression(expression: string, argNames: string[]): any;
2
- export declare function evalExpression(expression: string | ((...value: any[]) => any) | boolean, thisArg: any, argVal: any[]): any;
1
+ /**
2
+ * Uses CSP-safe implementation
3
+ */
4
+ export declare function parseExpression(expression: string, argNames: string[]): any;
@@ -0,0 +1,16 @@
1
+ import { FormlyFieldConfigCache } from '../../models';
2
+ import { FormlyExtension } from '../../models';
3
+ export declare class FieldExpressionExtension implements FormlyExtension {
4
+ onPopulate(field: FormlyFieldConfigCache): void;
5
+ postPopulate(field: FormlyFieldConfigCache): void;
6
+ protected parseExpressions(field: FormlyFieldConfigCache, path: string, expr: any): {
7
+ callback: (ignoreCache?: boolean) => boolean;
8
+ };
9
+ protected _evalStringExpression(expression: string, argNames: string[]): any;
10
+ private checkExpressions;
11
+ private changeDisabledState;
12
+ private changeHideState;
13
+ private evalExpr;
14
+ private emitExpressionChanges;
15
+ private _evalExpressionPath;
16
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Legacy implementation
3
+ */
4
+ export declare function evalStringExpressionLegacy(expression: string, argNames: string[]): any;
5
+ export declare function evalExpression(expression: string | ((...value: any[]) => any) | boolean, thisArg: any, argVal: any[]): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngx-formly/core",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"
@@ -1,2 +0,0 @@
1
- export { FieldExpressionExtension } from './field-expression/field-expression';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvY29yZS9zcmMvbGliL2V4dGVuc2lvbnMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0scUNBQXFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBGaWVsZEV4cHJlc3Npb25FeHRlbnNpb24gfSBmcm9tICcuL2ZpZWxkLWV4cHJlc3Npb24vZmllbGQtZXhwcmVzc2lvbic7XG4iXX0=
@@ -1 +0,0 @@
1
- export { FieldExpressionExtension } from './field-expression/field-expression';