@ngx-formly/core 6.2.0 → 6.2.2

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.
Files changed (29) hide show
  1. package/esm2020/json-schema/formly-json-schema.service.mjs +9 -8
  2. package/esm2020/lib/components/formly.field.mjs +2 -2
  3. package/esm2020/lib/extensions/core/core.mjs +9 -8
  4. package/esm2020/lib/extensions/field-expression/field-expression.mjs +2 -5
  5. package/esm2020/lib/extensions/field-form/field-form.mjs +15 -2
  6. package/esm2020/lib/extensions/field-validation/field-validation.mjs +3 -8
  7. package/esm2020/lib/models/fieldconfig.cache.mjs +1 -1
  8. package/esm2020/lib/services/formly.builder.mjs +8 -10
  9. package/esm2020/lib/templates/field-array.type.mjs +14 -2
  10. package/esm2020/lib/templates/field.type.mjs +4 -4
  11. package/esm2020/lib/templates/field.wrapper.mjs +2 -1
  12. package/esm2020/lib/templates/formly.attributes.mjs +4 -3
  13. package/esm2020/lib/utils.mjs +4 -4
  14. package/fesm2015/ngx-formly-core-json-schema.mjs +9 -8
  15. package/fesm2015/ngx-formly-core-json-schema.mjs.map +1 -1
  16. package/fesm2015/ngx-formly-core.mjs +59 -38
  17. package/fesm2015/ngx-formly-core.mjs.map +1 -1
  18. package/fesm2020/ngx-formly-core-json-schema.mjs +9 -8
  19. package/fesm2020/ngx-formly-core-json-schema.mjs.map +1 -1
  20. package/fesm2020/ngx-formly-core.mjs +55 -37
  21. package/fesm2020/ngx-formly-core.mjs.map +1 -1
  22. package/lib/extensions/field-form/field-form.d.ts +1 -0
  23. package/lib/extensions/field-validation/field-validation.d.ts +0 -1
  24. package/lib/models/fieldconfig.cache.d.ts +1 -0
  25. package/lib/templates/field-array.type.d.ts +1 -0
  26. package/lib/templates/field.type.d.ts +1 -1
  27. package/lib/templates/field.wrapper.d.ts +3 -1
  28. package/lib/utils.d.ts +2 -2
  29. package/package.json +1 -1
@@ -6,5 +6,6 @@ export declare class FieldFormExtension implements FormlyExtension {
6
6
  postPopulate(field: FormlyFieldConfigCache): void;
7
7
  private addFormControl;
8
8
  private setValidators;
9
+ private hasValidators;
9
10
  private mergeValidators;
10
11
  }
@@ -7,6 +7,5 @@ export declare class FieldValidationExtension implements FormlyExtension {
7
7
  private initFieldValidation;
8
8
  private getPredefinedFieldValidation;
9
9
  private wrapNgValidatorFn;
10
- private handleAsyncResult;
11
10
  private handleResult;
12
11
  }
@@ -43,6 +43,7 @@ export interface FormlyFormOptionsCache extends FormlyFormOptions {
43
43
  _injector?: Injector;
44
44
  _hiddenFieldsForCheck?: FormlyFieldConfigCache[];
45
45
  _initialModel?: any;
46
+ _detectChanges?: (field: FormlyFieldConfig) => void;
46
47
  /** @deprecated */
47
48
  _buildForm?: () => void;
48
49
  /** @deprecated */
@@ -15,6 +15,7 @@ export declare abstract class FieldArrayType<F extends FormlyFieldConfig = Field
15
15
  markAsDirty: boolean;
16
16
  }): void;
17
17
  private _build;
18
+ private updateArrayElementKey;
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldArrayType<any>, never>;
19
20
  static ɵdir: i0.ɵɵDirectiveDeclaration<FieldArrayType<any>, never, never, {}, {}, never>;
20
21
  }
@@ -11,7 +11,7 @@ export interface FieldGroupTypeConfig<T = FormlyFieldConfig['props']> extends Fo
11
11
  props: NonNullable<T>;
12
12
  }
13
13
  export declare abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> {
14
- set controls(controls: QueryList<NgControl>);
14
+ set _formlyControls(controls: QueryList<NgControl>);
15
15
  field: F;
16
16
  defaultOptions?: Partial<F>;
17
17
  get model(): any;
@@ -1,8 +1,10 @@
1
- import { ViewContainerRef } from '@angular/core';
1
+ import { ViewContainerRef, QueryList } from '@angular/core';
2
2
  import { FieldType } from './field.type';
3
3
  import { FormlyFieldConfig } from '../models';
4
+ import { NgControl } from '@angular/forms';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare abstract class FieldWrapper<F extends FormlyFieldConfig = FormlyFieldConfig> extends FieldType<F> {
7
+ set _formlyControls(_: QueryList<NgControl>);
6
8
  fieldComponent: ViewContainerRef;
7
9
  set _staticContent(content: ViewContainerRef);
8
10
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldWrapper<any>, never>;
package/lib/utils.d.ts CHANGED
@@ -24,7 +24,7 @@ declare type IObserveFn<T> = (change: {
24
24
  firstChange: boolean;
25
25
  }) => void;
26
26
  export interface IObserver<T> {
27
- setValue: (value: T) => void;
27
+ setValue: (value: T, emitEvent?: boolean) => void;
28
28
  unsubscribe: Function;
29
29
  }
30
30
  interface IObserveTarget<T> {
@@ -37,7 +37,7 @@ interface IObserveTarget<T> {
37
37
  };
38
38
  }
39
39
  export declare function observeDeep<T = any>(source: IObserveTarget<T>, paths: string[], setFn: () => void): () => void;
40
- export declare function observe<T = any>(o: IObserveTarget<T>, paths: string[], setFn: IObserveFn<T>): IObserver<T>;
40
+ export declare function observe<T = any>(o: IObserveTarget<T>, paths: string[], setFn?: IObserveFn<T>): IObserver<T>;
41
41
  export declare function getField(f: FormlyFieldConfig, key: FormlyFieldConfig['key']): FormlyFieldConfig;
42
42
  export declare function markFieldForCheck(field: FormlyFieldConfigCache): void;
43
43
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngx-formly/core",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"