@ngx-formly/core 7.0.0-alpha.0 → 7.0.0-next.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.
- package/README.md +2 -2
- package/esm2022/json-schema/formly-json-schema.service.mjs +4 -4
- package/esm2022/lib/components/formly.field.mjs +10 -10
- package/esm2022/lib/components/formly.form.mjs +9 -8
- package/esm2022/lib/components/formly.template.mjs +8 -8
- package/esm2022/lib/core.mjs +3 -3
- package/esm2022/lib/core.module.mjs +16 -16
- package/esm2022/lib/extensions/core/core.mjs +1 -5
- package/esm2022/lib/extensions/field-expression/field-expression.mjs +1 -5
- package/esm2022/lib/extensions/field-expression/utils.mjs +1 -1
- package/esm2022/lib/extensions/field-form/field-form.mjs +1 -1
- package/esm2022/lib/extensions/field-form/utils.mjs +1 -1
- package/esm2022/lib/extensions/field-validation/field-validation.mjs +1 -1
- package/esm2022/lib/models/fieldconfig.cache.mjs +1 -1
- package/esm2022/lib/services/formly.builder.mjs +9 -11
- package/esm2022/lib/services/formly.config.mjs +25 -18
- package/esm2022/lib/templates/field-array.type.mjs +4 -4
- package/esm2022/lib/templates/field-template.type.mjs +5 -5
- package/esm2022/lib/templates/field.type.mjs +3 -3
- package/esm2022/lib/templates/field.wrapper.mjs +3 -3
- package/esm2022/lib/templates/formly.attributes.mjs +20 -6
- package/esm2022/lib/templates/formly.group.mjs +3 -3
- package/esm2022/lib/templates/formly.validation-message.mjs +20 -5
- package/esm2022/lib/utils.mjs +2 -2
- package/esm2022/preset/preset-substitution.extension.mjs +1 -1
- package/esm2022/preset/preset.module.mjs +4 -4
- package/esm2022/preset/public_api.mjs +2 -1
- package/esm2022/select/public_api.mjs +2 -2
- package/esm2022/select/select-options.pipe.mjs +13 -5
- package/esm2022/select/select.module.mjs +8 -8
- package/esm2022/testing/component-factory.mjs +5 -5
- package/fesm2022/ngx-formly-core-json-schema.mjs +13 -13
- package/fesm2022/ngx-formly-core-json-schema.mjs.map +1 -1
- package/fesm2022/ngx-formly-core-preset.mjs +7 -7
- package/fesm2022/ngx-formly-core-preset.mjs.map +1 -1
- package/fesm2022/ngx-formly-core-select.mjs +19 -11
- package/fesm2022/ngx-formly-core-select.mjs.map +1 -1
- package/fesm2022/ngx-formly-core-testing.mjs +4 -4
- package/fesm2022/ngx-formly-core-testing.mjs.map +1 -1
- package/fesm2022/ngx-formly-core.mjs +126 -100
- package/fesm2022/ngx-formly-core.mjs.map +1 -1
- package/lib/core.d.ts +2 -2
- package/lib/core.module.d.ts +3 -3
- package/lib/models/fieldconfig.cache.d.ts +0 -6
- package/lib/services/formly.config.d.ts +4 -3
- package/lib/templates/formly.attributes.d.ts +5 -1
- package/lib/templates/formly.validation-message.d.ts +5 -1
- package/lib/utils.d.ts +2 -2
- package/package.json +1 -1
- package/preset/public_api.d.ts +1 -0
- package/select/public_api.d.ts +1 -1
- package/select/select-options.pipe.d.ts +5 -1
- package/select/select.module.d.ts +1 -1
- package/testing/component-factory.d.ts +2 -2
package/lib/core.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export { provideFormlyCore, provideFormlyConfig, FORMLY_CONFIG } from './core.co
|
|
|
2
2
|
export { LegacyFormlyForm, FormlyForm } from './components/formly.form';
|
|
3
3
|
export { FormlyFieldConfig, FormlyTemplateOptions, FormlyFormOptions, FormlyFieldProps, ConfigOption, FormlyExtension, } from './models';
|
|
4
4
|
export { LegacyFormlyField, FormlyField } from './components/formly.field';
|
|
5
|
-
export { FormlyAttributes
|
|
5
|
+
export { LegacyFormlyAttributes, FormlyAttributes } from './templates/formly.attributes';
|
|
6
6
|
export { FormlyGroup as ɵFormlyGroup } from './templates/formly.group';
|
|
7
7
|
export { FormlyTemplate as ɵFormlyTemplate } from './components/formly.template';
|
|
8
|
-
export { FormlyValidationMessage
|
|
8
|
+
export { LegacyFormlyValidationMessage, FormlyValidationMessage } from './templates/formly.validation-message';
|
|
9
9
|
export { FormlyConfig } from './services/formly.config';
|
|
10
10
|
export { FormlyFormBuilder } from './services/formly.builder';
|
|
11
11
|
export { FieldType, FieldTypeConfig, FieldGroupTypeConfig } from './templates/field.type';
|
package/lib/core.module.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import * as i1 from "./components/formly.template";
|
|
|
5
5
|
import * as i2 from "./components/formly.form";
|
|
6
6
|
import * as i3 from "./components/formly.field";
|
|
7
7
|
import * as i4 from "./templates/formly.attributes";
|
|
8
|
-
import * as i5 from "./templates/formly.
|
|
9
|
-
import * as i6 from "./templates/formly.
|
|
8
|
+
import * as i5 from "./templates/formly.validation-message";
|
|
9
|
+
import * as i6 from "./templates/formly.group";
|
|
10
10
|
import * as i7 from "./templates/field-template.type";
|
|
11
11
|
import * as i8 from "@angular/common";
|
|
12
12
|
export declare class FormlyModule {
|
|
13
13
|
static forRoot(config?: ConfigOption): ModuleWithProviders<FormlyModule>;
|
|
14
14
|
static forChild(config?: ConfigOption): ModuleWithProviders<FormlyModule>;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyModule, [typeof i1.FormlyTemplate, typeof i2.LegacyFormlyForm, typeof i3.LegacyFormlyField, typeof i4.
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyModule, [typeof i1.FormlyTemplate, typeof i2.LegacyFormlyForm, typeof i3.LegacyFormlyField, typeof i4.LegacyFormlyAttributes, typeof i5.LegacyFormlyValidationMessage, typeof i6.FormlyGroup, typeof i7.FormlyTemplateType], [typeof i8.CommonModule], [typeof i1.FormlyTemplate, typeof i2.LegacyFormlyForm, typeof i3.LegacyFormlyField, typeof i4.LegacyFormlyAttributes, typeof i5.LegacyFormlyValidationMessage, typeof i6.FormlyGroup]>;
|
|
17
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyModule>;
|
|
18
18
|
}
|
|
@@ -47,10 +47,4 @@ export interface FormlyFormOptionsCache extends FormlyFormOptions {
|
|
|
47
47
|
}[];
|
|
48
48
|
_initialModel?: any;
|
|
49
49
|
_detectChanges?: (field: FormlyFieldConfig) => void;
|
|
50
|
-
/** @deprecated */
|
|
51
|
-
_buildForm?: () => void;
|
|
52
|
-
/** @deprecated */
|
|
53
|
-
_checkField?: (field: FormlyFieldConfig, ingoreCache?: boolean) => void;
|
|
54
|
-
/** @deprecated */
|
|
55
|
-
_markForCheck?: (field: FormlyFieldConfig) => void;
|
|
56
50
|
}
|
|
@@ -27,6 +27,7 @@ export declare class FormlyConfig {
|
|
|
27
27
|
[name: string]: FormlyFieldConfig | FormlyFieldConfigPresetProvider;
|
|
28
28
|
};
|
|
29
29
|
private extensionsByPriority;
|
|
30
|
+
private componentRefs;
|
|
30
31
|
addConfig(config: ConfigOption | ConfigOption[]): void;
|
|
31
32
|
/**
|
|
32
33
|
* Allows you to specify a custom type which you can use in your field configuration.
|
|
@@ -38,6 +39,8 @@ export declare class FormlyConfig {
|
|
|
38
39
|
getMergedField(field?: FormlyFieldConfig): any;
|
|
39
40
|
/** @ignore @internal */
|
|
40
41
|
resolveFieldTypeRef(field?: FormlyFieldConfigCache): ComponentRef<FieldType>;
|
|
42
|
+
/** @ignore @internal */
|
|
43
|
+
clearRefs(): void;
|
|
41
44
|
setWrapper(options: WrapperOption): void;
|
|
42
45
|
getWrapper(name: string | Type<FieldWrapper>): WrapperOption;
|
|
43
46
|
/** @ignore */
|
|
@@ -45,9 +48,7 @@ export declare class FormlyConfig {
|
|
|
45
48
|
setValidator(options: ValidatorOption): void;
|
|
46
49
|
getValidator(name: string): ValidatorOption;
|
|
47
50
|
addValidatorMessage(name: string, message: ValidationMessageOption['message']): void;
|
|
48
|
-
getValidatorMessage(name: string): string | ((error: any, field: FormlyFieldConfig
|
|
49
|
-
[additionalProperties: string]: any;
|
|
50
|
-
}>) => string | import("rxjs").Observable<string>);
|
|
51
|
+
getValidatorMessage(name: string): string | ((error: any, field: FormlyFieldConfig) => string | import("rxjs").Observable<string>);
|
|
51
52
|
private setSortedExtensions;
|
|
52
53
|
private mergeExtendedType;
|
|
53
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyConfig, never>;
|
|
@@ -44,5 +44,9 @@ export declare class FormlyAttributes implements OnChanges, DoCheck, OnDestroy {
|
|
|
44
44
|
private setAttribute;
|
|
45
45
|
private removeAttribute;
|
|
46
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyAttributes, never>;
|
|
47
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormlyAttributes, "[formlyAttributes]", never, { "field": { "alias": "formlyAttributes"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never,
|
|
47
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FormlyAttributes, "[formlyAttributes]", never, { "field": { "alias": "formlyAttributes"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
|
|
48
|
+
}
|
|
49
|
+
export declare class LegacyFormlyAttributes extends FormlyAttributes {
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlyAttributes, never>;
|
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LegacyFormlyAttributes, "[formlyAttributes]", never, {}, {}, never, never, false, never>;
|
|
48
52
|
}
|
|
@@ -15,5 +15,9 @@ export declare class FormlyValidationMessage implements OnChanges {
|
|
|
15
15
|
ngOnChanges(): void;
|
|
16
16
|
get errorMessage(): string | Observable<string>;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyValidationMessage, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyValidationMessage, "formly-validation-message", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never,
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyValidationMessage, "formly-validation-message", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
20
|
+
export declare class LegacyFormlyValidationMessage extends FormlyValidationMessage {
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlyValidationMessage, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LegacyFormlyValidationMessage, "formly-validation-message", never, {}, {}, never, never, false, never>;
|
|
19
23
|
}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormlyFieldConfig } from './models';
|
|
2
2
|
import { FormlyFieldConfigCache } from './models';
|
|
3
|
-
import { NgZone } from '@angular/core';
|
|
3
|
+
import { NgZone, ɵNoopNgZone } from '@angular/core';
|
|
4
4
|
export declare function disableTreeValidityCall(form: any, callback: () => void): void;
|
|
5
5
|
export declare function getFieldId(formId: string, field: FormlyFieldConfig, index: string | number): string;
|
|
6
6
|
export declare function hasKey(field: FormlyFieldConfig): boolean;
|
|
@@ -41,7 +41,7 @@ export declare function observeDeep<T = any>(source: IObserveTarget<T>, paths: s
|
|
|
41
41
|
export declare function observe<T = any>(o: IObserveTarget<T>, paths: string[], setFn?: IObserveFn<T>): IObserver<T>;
|
|
42
42
|
export declare function getField(f: FormlyFieldConfig, key: FormlyFieldConfig['key']): FormlyFieldConfig;
|
|
43
43
|
export declare function markFieldForCheck(field: FormlyFieldConfigCache): void;
|
|
44
|
-
export declare function isNoopNgZone(ngZone: NgZone):
|
|
44
|
+
export declare function isNoopNgZone(ngZone: NgZone): ngZone is ɵNoopNgZone;
|
|
45
45
|
export declare function isHiddenField(field: FormlyFieldConfig): boolean;
|
|
46
46
|
export declare function isSignalRequired(): boolean;
|
|
47
47
|
export {};
|
package/package.json
CHANGED
package/preset/public_api.d.ts
CHANGED
package/select/public_api.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { FormlySelectModule } from './select.module';
|
|
2
|
-
export { FormlySelectOptionsPipe, FormlySelectOption, FormlyFieldSelectProps } from './select-options.pipe';
|
|
2
|
+
export { LegacyFormlySelectOptionsPipe, FormlySelectOptionsPipe, FormlySelectOption, FormlyFieldSelectProps, } from './select-options.pipe';
|
|
@@ -25,5 +25,9 @@ export declare class FormlySelectOptionsPipe implements PipeTransform, OnDestroy
|
|
|
25
25
|
private dispose;
|
|
26
26
|
private observableOf;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectOptionsPipe, never>;
|
|
28
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FormlySelectOptionsPipe, "formlySelectOptions",
|
|
28
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormlySelectOptionsPipe, "formlySelectOptions", true>;
|
|
29
|
+
}
|
|
30
|
+
export declare class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe implements PipeTransform, OnDestroy {
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlySelectOptionsPipe, never>;
|
|
32
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LegacyFormlySelectOptionsPipe, "formlySelectOptions", false>;
|
|
29
33
|
}
|
|
@@ -2,6 +2,6 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./select-options.pipe";
|
|
3
3
|
export declare class FormlySelectModule {
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlySelectModule, [typeof i1.
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlySelectModule, [typeof i1.LegacyFormlySelectOptionsPipe], never, [typeof i1.LegacyFormlySelectOptionsPipe]>;
|
|
6
6
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormlySelectModule>;
|
|
7
7
|
}
|
|
@@ -15,7 +15,7 @@ export declare function createComponent<T>({ template, inputs, config, detectCha
|
|
|
15
15
|
detectChanges: (checkNoChanges?: boolean) => void;
|
|
16
16
|
setInputs: (inputs: Partial<T>) => void;
|
|
17
17
|
query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
|
|
18
|
-
queryAll: <
|
|
18
|
+
queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
|
|
19
19
|
};
|
|
20
20
|
export declare function createFieldComponent(field: FormlyFieldConfig, config?: IComponentOptions<{
|
|
21
21
|
field: FormlyFieldConfig;
|
|
@@ -30,6 +30,6 @@ export declare function createFieldComponent(field: FormlyFieldConfig, config?:
|
|
|
30
30
|
field: FormlyFieldConfig;
|
|
31
31
|
}>) => void;
|
|
32
32
|
query: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>;
|
|
33
|
-
queryAll: <
|
|
33
|
+
queryAll: <E extends Element = Element>(selector: string) => IFormlyDebugElement<E>[];
|
|
34
34
|
};
|
|
35
35
|
export {};
|