@ngx-formly/core 8.0.0 → 10.0.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 +46 -19
- package/fesm2022/ngx-formly-core-json-schema.mjs +8 -6
- package/fesm2022/ngx-formly-core-json-schema.mjs.map +1 -1
- package/fesm2022/ngx-formly-core-preset.mjs +4 -4
- package/fesm2022/ngx-formly-core-select.mjs +10 -10
- package/fesm2022/ngx-formly-core-testing.mjs +3 -3
- package/fesm2022/ngx-formly-core.mjs +194 -94
- package/fesm2022/ngx-formly-core.mjs.map +1 -1
- package/package.json +9 -8
- package/{json-schema/formly-json-schema.service.d.ts → types/ngx-formly-core-json-schema.d.ts} +11 -3
- package/types/ngx-formly-core-preset.d.ts +13 -0
- package/{select/select-options.pipe.d.ts → types/ngx-formly-core-select.d.ts} +17 -7
- package/{testing/component-factory.d.ts → types/ngx-formly-core-testing.d.ts} +7 -5
- package/types/ngx-formly-core.d.ts +745 -0
- package/index.d.ts +0 -5
- package/json-schema/index.d.ts +0 -5
- package/json-schema/public_api.d.ts +0 -1
- package/lib/components/formly.field.d.ts +0 -47
- package/lib/components/formly.form.d.ts +0 -50
- package/lib/components/formly.template.d.ts +0 -19
- package/lib/core.config.d.ts +0 -11
- package/lib/core.d.ts +0 -20
- package/lib/core.module.d.ts +0 -25
- package/lib/extensions/core/core.d.ts +0 -14
- package/lib/extensions/field-expression/field-expression.d.ts +0 -4
- package/lib/extensions/field-expression/utils.d.ts +0 -4
- package/lib/extensions/field-expression-legacy/field-expression.d.ts +0 -16
- package/lib/extensions/field-expression-legacy/utils.d.ts +0 -5
- package/lib/extensions/field-form/field-form.d.ts +0 -11
- package/lib/extensions/field-form/utils.d.ts +0 -7
- package/lib/extensions/field-validation/field-validation.d.ts +0 -11
- package/lib/models/config.d.ts +0 -90
- package/lib/models/fieldconfig.cache.d.ts +0 -50
- package/lib/models/fieldconfig.d.ts +0 -243
- package/lib/models/index.d.ts +0 -3
- package/lib/services/formly.builder.d.ts +0 -18
- package/lib/services/formly.config.d.ts +0 -56
- package/lib/templates/field-array.type.d.ts +0 -22
- package/lib/templates/field-template.type.d.ts +0 -12
- package/lib/templates/field.type.d.ts +0 -30
- package/lib/templates/field.wrapper.d.ts +0 -12
- package/lib/templates/formly.attributes.d.ts +0 -55
- package/lib/templates/formly.group.d.ts +0 -7
- package/lib/templates/formly.validation-message.d.ts +0 -23
- package/lib/utils.d.ts +0 -47
- package/preset/index.d.ts +0 -5
- package/preset/preset-substitution.extension.d.ts +0 -13
- package/preset/preset.config.d.ts +0 -2
- package/preset/preset.module.d.ts +0 -7
- package/preset/public_api.d.ts +0 -2
- package/public_api.d.ts +0 -1
- package/select/index.d.ts +0 -5
- package/select/public_api.d.ts +0 -2
- package/select/select.module.d.ts +0 -7
- package/testing/index.d.ts +0 -5
- package/testing/public_api.d.ts +0 -1
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { UntypedFormGroup, UntypedFormArray, AbstractControl, FormGroupDirective, ValidatorFn, AsyncValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Subject, Observable } from 'rxjs';
|
|
3
|
-
import { FieldType } from '../templates/field.type';
|
|
4
|
-
import { FieldWrapper } from '../templates/field.wrapper';
|
|
5
|
-
import { ValidationMessageOption } from '../models';
|
|
6
|
-
import { Type } from '@angular/core';
|
|
7
|
-
type FieldExpression<T = any> = string | ((field: FormlyFieldConfig) => T) | Observable<T>;
|
|
8
|
-
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
|
-
};
|
|
16
|
-
export interface FormlyFieldConfig<Props = FormlyFieldProps & {
|
|
17
|
-
[additionalProperties: string]: any;
|
|
18
|
-
}> {
|
|
19
|
-
/**
|
|
20
|
-
* The key that relates to the model. This will link the field value to the model
|
|
21
|
-
*/
|
|
22
|
-
key?: string | number | (string | number)[];
|
|
23
|
-
/**
|
|
24
|
-
* This should be a formly-field type added either by you or a plugin. More information over at Creating Formly Fields.
|
|
25
|
-
*/
|
|
26
|
-
type?: string | Type<FieldType>;
|
|
27
|
-
/**
|
|
28
|
-
* Use `defaultValue` to initialize it the model. If this is provided and the value of the model at compile-time is undefined, then the value of the model will be assigned to `defaultValue`.
|
|
29
|
-
*/
|
|
30
|
-
defaultValue?: any;
|
|
31
|
-
/**
|
|
32
|
-
* This allows you to specify the `id` of your field. Note, the `id` is generated if not set.
|
|
33
|
-
*/
|
|
34
|
-
id?: string;
|
|
35
|
-
/**
|
|
36
|
-
* If you wish, you can specify a specific `name` for your field. This is useful if you're posting the form to a server using techniques of yester-year.
|
|
37
|
-
*/
|
|
38
|
-
name?: string;
|
|
39
|
-
/**
|
|
40
|
-
* This is reserved for the templates. Any template-specific options go in here. Look at your specific template implementation to know the options required for this.
|
|
41
|
-
*/
|
|
42
|
-
props?: Props;
|
|
43
|
-
/** @deprecated Use `props` instead. */
|
|
44
|
-
templateOptions?: FormlyTemplateOptions;
|
|
45
|
-
/**
|
|
46
|
-
* An object with a few useful properties
|
|
47
|
-
* - `validation.messages`: A map of message names that will be displayed when the field has errors.
|
|
48
|
-
* - `validation.show`: A boolean you as the developer can set to force displaying errors whatever the state of field. This is useful when you're trying to call the user's attention to some fields for some reason.
|
|
49
|
-
*/
|
|
50
|
-
validation?: {
|
|
51
|
-
messages?: {
|
|
52
|
-
[messageProperties: string]: ValidationMessageOption['message'];
|
|
53
|
-
} & {
|
|
54
|
-
/** @deprecated use `minLength` */
|
|
55
|
-
minlength?: ValidationMessageOption['message'];
|
|
56
|
-
/** @deprecated use `maxLength` */
|
|
57
|
-
maxlength?: ValidationMessageOption['message'];
|
|
58
|
-
};
|
|
59
|
-
show?: boolean;
|
|
60
|
-
[additionalProperties: string]: any;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Used to set validation rules for a particular field.
|
|
64
|
-
* Should be an object of key - value pairs. The value can either be an expression to evaluate or a function to run.
|
|
65
|
-
* Each should return a boolean value, returning true when the field is valid. See Validation for more information.
|
|
66
|
-
*/
|
|
67
|
-
validators?: FormlyValidation<ValidatorFn, boolean>;
|
|
68
|
-
/**
|
|
69
|
-
* Use this one for anything that needs to validate asynchronously.
|
|
70
|
-
* Pretty much exactly the same as the validators api, except it must be a function that returns a promise.
|
|
71
|
-
*/
|
|
72
|
-
asyncValidators?: FormlyValidation<AsyncValidatorFn, Promise<boolean> | Observable<boolean>>;
|
|
73
|
-
/**
|
|
74
|
-
* Can be set instead of `type` to render custom html content.
|
|
75
|
-
*/
|
|
76
|
-
template?: string;
|
|
77
|
-
/**
|
|
78
|
-
* It is expected to be the name of the wrappers.
|
|
79
|
-
* The formly field template will be wrapped by the first wrapper, then the second, then the third, etc.
|
|
80
|
-
* You can also specify these as part of a type (which is the recommended approach).
|
|
81
|
-
*/
|
|
82
|
-
wrappers?: (string | Type<FieldWrapper>)[];
|
|
83
|
-
/**
|
|
84
|
-
* Whether to hide the field. Defaults to false. If you wish this to be conditional use `expressions: { hide: ... }`
|
|
85
|
-
*/
|
|
86
|
-
hide?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Whether to reset the value on hide or not. Defaults to `true`.
|
|
89
|
-
*/
|
|
90
|
-
resetOnHide?: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Conditionally hiding Field based on values from other Fields
|
|
93
|
-
* @deprecated use `expressions: { hide: ... }`
|
|
94
|
-
*/
|
|
95
|
-
hideExpression?: boolean | string | ((model: any, formState: any, field?: FormlyFieldConfig) => boolean);
|
|
96
|
-
/**
|
|
97
|
-
* 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.
|
|
98
|
-
* @deprecated use `expressions`
|
|
99
|
-
*/
|
|
100
|
-
expressionProperties?: {
|
|
101
|
-
[property: string]: string | ((model: any, formState: any, field?: FormlyFieldConfig) => any) | Observable<any>;
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
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.
|
|
105
|
-
*/
|
|
106
|
-
expressions?: FieldExpressions;
|
|
107
|
-
/**
|
|
108
|
-
* You can specify your own class that will be applied to the `formly-field` component.
|
|
109
|
-
*/
|
|
110
|
-
className?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Specify your own class that will be applied to the `formly-group` component.
|
|
113
|
-
*/
|
|
114
|
-
fieldGroupClassName?: string;
|
|
115
|
-
/**
|
|
116
|
-
* A field group is a way to group fields together, making advanced layout very simple.
|
|
117
|
-
* It can also be used to group fields that are associated with the same model (useful if it's different than the model for the rest of the fields).
|
|
118
|
-
*/
|
|
119
|
-
fieldGroup?: FormlyFieldConfig[];
|
|
120
|
-
fieldArray?: FormlyFieldConfig | ((field: FormlyFieldConfig) => FormlyFieldConfig);
|
|
121
|
-
/**
|
|
122
|
-
* Whether to focus or blur the element field. Defaults to false. If you wish this to be conditional use `expressions`
|
|
123
|
-
*/
|
|
124
|
-
focus?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* An object with a few useful properties to control the model changes
|
|
127
|
-
* - `debounce`: integer value which contains the debounce model update value in milliseconds. A value of 0 triggers an immediate update.
|
|
128
|
-
* - `updateOn`: string event value that instructs when the control should be updated
|
|
129
|
-
*/
|
|
130
|
-
modelOptions?: {
|
|
131
|
-
debounce?: {
|
|
132
|
-
default: number;
|
|
133
|
-
};
|
|
134
|
-
updateOn?: 'change' | 'blur' | 'submit';
|
|
135
|
-
};
|
|
136
|
-
hooks?: FormlyHookConfig;
|
|
137
|
-
/**
|
|
138
|
-
* Array of functions to execute, as a pipeline, whenever the model updates, usually via user input.
|
|
139
|
-
*/
|
|
140
|
-
parsers?: ((value: any) => any)[];
|
|
141
|
-
/**
|
|
142
|
-
* Returns child field by key name
|
|
143
|
-
*/
|
|
144
|
-
get?: (key: FormlyFieldConfig['key']) => FormlyFieldConfig;
|
|
145
|
-
/**
|
|
146
|
-
* The model that stores all the data, where the model[key] is the value of the field
|
|
147
|
-
*/
|
|
148
|
-
readonly model?: any;
|
|
149
|
-
/**
|
|
150
|
-
* The parent field.
|
|
151
|
-
*/
|
|
152
|
-
readonly parent?: FormlyFieldConfig;
|
|
153
|
-
/**
|
|
154
|
-
* The form options.
|
|
155
|
-
*/
|
|
156
|
-
readonly options?: FormlyFormOptions;
|
|
157
|
-
/**
|
|
158
|
-
* The parent form.
|
|
159
|
-
*/
|
|
160
|
-
readonly form?: UntypedFormGroup | UntypedFormArray;
|
|
161
|
-
/**
|
|
162
|
-
* This is the [FormControl](https://angular.io/api/forms/FormControl) for the field.
|
|
163
|
-
* It provides you more control like running validators, calculating status, and resetting state.
|
|
164
|
-
*/
|
|
165
|
-
readonly formControl?: AbstractControl;
|
|
166
|
-
/** @deprecated */
|
|
167
|
-
optionsTypes?: string[];
|
|
168
|
-
}
|
|
169
|
-
export type FormlyAttributeEvent = (field: FormlyFieldConfig, event?: any) => void;
|
|
170
|
-
/** @deprecated */
|
|
171
|
-
export interface FormlyTemplateOptions extends FormlyFieldProps {
|
|
172
|
-
[additionalProperties: string]: any;
|
|
173
|
-
}
|
|
174
|
-
export interface FormlyFieldProps {
|
|
175
|
-
type?: string;
|
|
176
|
-
label?: string;
|
|
177
|
-
placeholder?: string;
|
|
178
|
-
disabled?: boolean;
|
|
179
|
-
options?: any[] | Observable<any[]>;
|
|
180
|
-
rows?: number;
|
|
181
|
-
cols?: number;
|
|
182
|
-
description?: string;
|
|
183
|
-
hidden?: boolean;
|
|
184
|
-
max?: number;
|
|
185
|
-
min?: number;
|
|
186
|
-
minLength?: number;
|
|
187
|
-
/** @deprecated use `minLength` */
|
|
188
|
-
minlength?: number;
|
|
189
|
-
maxLength?: number;
|
|
190
|
-
/** @deprecated use `maxLength` */
|
|
191
|
-
maxlength?: number;
|
|
192
|
-
pattern?: string | RegExp;
|
|
193
|
-
required?: boolean;
|
|
194
|
-
tabindex?: number;
|
|
195
|
-
readonly?: boolean;
|
|
196
|
-
attributes?: {
|
|
197
|
-
[key: string]: string | number;
|
|
198
|
-
};
|
|
199
|
-
step?: number;
|
|
200
|
-
focus?: FormlyAttributeEvent;
|
|
201
|
-
blur?: FormlyAttributeEvent;
|
|
202
|
-
keyup?: FormlyAttributeEvent;
|
|
203
|
-
keydown?: FormlyAttributeEvent;
|
|
204
|
-
click?: FormlyAttributeEvent;
|
|
205
|
-
change?: FormlyAttributeEvent;
|
|
206
|
-
keypress?: FormlyAttributeEvent;
|
|
207
|
-
wheel?: FormlyAttributeEvent;
|
|
208
|
-
}
|
|
209
|
-
export type FormlyHookFn = (field: FormlyFieldConfig) => void;
|
|
210
|
-
export interface FormlyHookConfig {
|
|
211
|
-
onInit?: FormlyHookFn | ((field: FormlyFieldConfig) => Observable<any>);
|
|
212
|
-
onChanges?: FormlyHookFn;
|
|
213
|
-
afterContentInit?: FormlyHookFn;
|
|
214
|
-
afterViewInit?: FormlyHookFn;
|
|
215
|
-
onDestroy?: FormlyHookFn;
|
|
216
|
-
}
|
|
217
|
-
export interface FormlyFormOptions {
|
|
218
|
-
updateInitialValue?: (model?: any) => void;
|
|
219
|
-
resetModel?: (model?: any) => void;
|
|
220
|
-
formState?: any;
|
|
221
|
-
fieldChanges?: Subject<FormlyValueChangeEvent>;
|
|
222
|
-
showError?: (field: FieldType) => boolean;
|
|
223
|
-
build?: (field?: FormlyFieldConfig) => FormlyFieldConfig;
|
|
224
|
-
checkExpressions?: (field: FormlyFieldConfig) => void;
|
|
225
|
-
detectChanges?: (field: FormlyFieldConfig) => void;
|
|
226
|
-
parentForm?: FormGroupDirective | null;
|
|
227
|
-
}
|
|
228
|
-
export interface FormlyValueChangeEvent {
|
|
229
|
-
field: FormlyFieldConfig;
|
|
230
|
-
type: string;
|
|
231
|
-
value: any;
|
|
232
|
-
[meta: string]: any;
|
|
233
|
-
}
|
|
234
|
-
interface FormlyValidation<T, R> {
|
|
235
|
-
validation?: (string | T)[] | any;
|
|
236
|
-
[key: string]: FormlyValidatorFn<R> | FormlyValidatorExpressionFn<R> | any;
|
|
237
|
-
}
|
|
238
|
-
type FormlyValidatorFn<T> = (control: AbstractControl, field: FormlyFieldConfig) => T;
|
|
239
|
-
interface FormlyValidatorExpressionFn<T> {
|
|
240
|
-
expression: FormlyValidatorFn<T>;
|
|
241
|
-
message: string | ((error: any, field: FormlyFieldConfig) => string | Observable<string>);
|
|
242
|
-
}
|
|
243
|
-
export {};
|
package/lib/models/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Injector, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { UntypedFormGroup, UntypedFormArray, FormGroupDirective } from '@angular/forms';
|
|
3
|
-
import { FormlyConfig } from './formly.config';
|
|
4
|
-
import { FormlyFieldConfig, FormlyFormOptions, ConfigOption } from '../models';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class FormlyFormBuilder {
|
|
7
|
-
private config;
|
|
8
|
-
private injector;
|
|
9
|
-
private viewContainerRef;
|
|
10
|
-
private parentForm;
|
|
11
|
-
constructor(config: FormlyConfig, injector: Injector, viewContainerRef: ViewContainerRef, parentForm: FormGroupDirective, configs?: ConfigOption[]);
|
|
12
|
-
buildForm(form: UntypedFormGroup | UntypedFormArray, fieldGroup: FormlyFieldConfig[], model: any, options: FormlyFormOptions): void;
|
|
13
|
-
build(field: FormlyFieldConfig): void;
|
|
14
|
-
private _build;
|
|
15
|
-
private _setOptions;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFormBuilder, [null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FormlyFormBuilder>;
|
|
18
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ComponentRef, Type } from '@angular/core';
|
|
2
|
-
import { FieldType } from './../templates/field.type';
|
|
3
|
-
import { FormlyFieldConfig, FormlyFieldConfigCache, ConfigOption, TypeOption, ValidatorOption, WrapperOption, FormlyExtension, ValidationMessageOption, FormlyFieldConfigPresetProvider } from '../models';
|
|
4
|
-
import { FieldWrapper } from '../templates/field.wrapper';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Maintains list of formly config options. This can be used to register new field type.
|
|
8
|
-
*/
|
|
9
|
-
export declare class FormlyConfig {
|
|
10
|
-
types: {
|
|
11
|
-
[name: string]: TypeOption;
|
|
12
|
-
};
|
|
13
|
-
validators: {
|
|
14
|
-
[name: string]: ValidatorOption;
|
|
15
|
-
};
|
|
16
|
-
wrappers: {
|
|
17
|
-
[name: string]: WrapperOption;
|
|
18
|
-
};
|
|
19
|
-
messages: {
|
|
20
|
-
[name: string]: ValidationMessageOption['message'];
|
|
21
|
-
};
|
|
22
|
-
extras: NonNullable<ConfigOption['extras']>;
|
|
23
|
-
extensions: {
|
|
24
|
-
[name: string]: FormlyExtension;
|
|
25
|
-
};
|
|
26
|
-
presets: {
|
|
27
|
-
[name: string]: FormlyFieldConfig | FormlyFieldConfigPresetProvider;
|
|
28
|
-
};
|
|
29
|
-
private extensionsByPriority;
|
|
30
|
-
private componentRefs;
|
|
31
|
-
addConfig(config: ConfigOption | ConfigOption[]): void;
|
|
32
|
-
/**
|
|
33
|
-
* Allows you to specify a custom type which you can use in your field configuration.
|
|
34
|
-
* You can pass an object of options, or an array of objects of options.
|
|
35
|
-
*/
|
|
36
|
-
setType(options: TypeOption | TypeOption[]): void;
|
|
37
|
-
getType(name: FormlyFieldConfig['type'], throwIfNotFound?: boolean): TypeOption;
|
|
38
|
-
/** @ignore */
|
|
39
|
-
getMergedField(field?: FormlyFieldConfig): any;
|
|
40
|
-
/** @ignore @internal */
|
|
41
|
-
resolveFieldTypeRef(field?: FormlyFieldConfigCache): ComponentRef<FieldType>;
|
|
42
|
-
/** @ignore @internal */
|
|
43
|
-
clearRefs(): void;
|
|
44
|
-
setWrapper(options: WrapperOption): void;
|
|
45
|
-
getWrapper(name: string | Type<FieldWrapper>): WrapperOption;
|
|
46
|
-
/** @ignore */
|
|
47
|
-
setTypeWrapper(type: string, name: string): void;
|
|
48
|
-
setValidator(options: ValidatorOption): void;
|
|
49
|
-
getValidator(name: string): ValidatorOption;
|
|
50
|
-
addValidatorMessage(name: string, message: ValidationMessageOption['message']): void;
|
|
51
|
-
getValidatorMessage(name: string): string | ((error: any, field: FormlyFieldConfig) => string | import("rxjs").Observable<string>);
|
|
52
|
-
private setSortedExtensions;
|
|
53
|
-
private mergeExtendedType;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyConfig, never>;
|
|
55
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FormlyConfig>;
|
|
56
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UntypedFormArray } from '@angular/forms';
|
|
2
|
-
import { FieldType } from './field.type';
|
|
3
|
-
import { FormlyFieldConfig, FormlyExtension } from '../models';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export interface FieldArrayTypeConfig<T = FormlyFieldConfig['props']> extends FormlyFieldConfig<T> {
|
|
6
|
-
formControl: UntypedFormArray;
|
|
7
|
-
props: NonNullable<T>;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class FieldArrayType<F extends FormlyFieldConfig = FieldArrayTypeConfig> extends FieldType<F> implements FormlyExtension<F> {
|
|
10
|
-
onPopulate(field: F): void;
|
|
11
|
-
add(i?: number, initialModel?: any, { markAsDirty }?: {
|
|
12
|
-
markAsDirty: boolean;
|
|
13
|
-
}): void;
|
|
14
|
-
remove(i: number, { markAsDirty }?: {
|
|
15
|
-
markAsDirty: boolean;
|
|
16
|
-
}): void;
|
|
17
|
-
private _build;
|
|
18
|
-
private updateArrayElementKey;
|
|
19
|
-
private markFieldForCheck;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldArrayType<any>, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldArrayType<any>, never, never, {}, {}, never, never, true, never>;
|
|
22
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import { FieldType } from './field.type';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
export declare class FormlyTemplateType extends FieldType {
|
|
6
|
-
private sanitizer;
|
|
7
|
-
get template(): SafeHtml;
|
|
8
|
-
private innerHtml;
|
|
9
|
-
constructor(sanitizer: DomSanitizer);
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyTemplateType, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyTemplateType, "formly-template", never, {}, {}, never, never, false, never>;
|
|
12
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { QueryList } from '@angular/core';
|
|
2
|
-
import { UntypedFormControl, NgControl, UntypedFormGroup } from '@angular/forms';
|
|
3
|
-
import { FormlyFieldConfig } from '../models';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export interface FieldTypeConfig<T = FormlyFieldConfig['props']> extends FormlyFieldConfig<T> {
|
|
6
|
-
formControl: UntypedFormControl;
|
|
7
|
-
props: NonNullable<T>;
|
|
8
|
-
}
|
|
9
|
-
export interface FieldGroupTypeConfig<T = FormlyFieldConfig['props']> extends FormlyFieldConfig<T> {
|
|
10
|
-
formControl: UntypedFormGroup;
|
|
11
|
-
props: NonNullable<T>;
|
|
12
|
-
}
|
|
13
|
-
export declare abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig> {
|
|
14
|
-
set _formlyControls(controls: QueryList<NgControl>);
|
|
15
|
-
field: F;
|
|
16
|
-
defaultOptions?: Partial<F>;
|
|
17
|
-
get model(): any;
|
|
18
|
-
get form(): UntypedFormGroup | import("@angular/forms").UntypedFormArray;
|
|
19
|
-
get options(): import("../models").FormlyFormOptions;
|
|
20
|
-
get key(): string | number | (string | number)[];
|
|
21
|
-
get formControl(): NonNullable<F["formControl"]>;
|
|
22
|
-
get props(): NonNullable<F["props"]>;
|
|
23
|
-
/** @deprecated Use `props` instead. */
|
|
24
|
-
get to(): NonNullable<F["props"]>;
|
|
25
|
-
get showError(): boolean;
|
|
26
|
-
get id(): string;
|
|
27
|
-
get formState(): any;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldType<any>, never>;
|
|
29
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldType<any>, never, never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef, QueryList } from '@angular/core';
|
|
2
|
-
import { FieldType } from './field.type';
|
|
3
|
-
import { FormlyFieldConfig } from '../models';
|
|
4
|
-
import { NgControl } from '@angular/forms';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare abstract class FieldWrapper<F extends FormlyFieldConfig = FormlyFieldConfig> extends FieldType<F> {
|
|
7
|
-
set _formlyControls(_: QueryList<NgControl>);
|
|
8
|
-
fieldComponent: ViewContainerRef;
|
|
9
|
-
set _staticContent(content: ViewContainerRef);
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldWrapper<any>, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldWrapper<any>, never, never, {}, {}, never, never, true, never>;
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, SimpleChanges, Renderer2, DoCheck, OnDestroy } from '@angular/core';
|
|
2
|
-
import { FormlyFieldConfig } from '../models';
|
|
3
|
-
import { FormlyField } from '../components/formly.field';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Allow to link the `field` HTML attributes (`id`, `name` ...) and Event attributes (`focus`, `blur` ...) to an element in the DOM.
|
|
7
|
-
*/
|
|
8
|
-
export declare class FormlyAttributes implements OnChanges, DoCheck, OnDestroy {
|
|
9
|
-
private renderer;
|
|
10
|
-
private elementRef;
|
|
11
|
-
private formlyField?;
|
|
12
|
-
/** The field config. */
|
|
13
|
-
field: FormlyFieldConfig;
|
|
14
|
-
id: string;
|
|
15
|
-
private document;
|
|
16
|
-
private uiAttributesCache;
|
|
17
|
-
private uiAttributes;
|
|
18
|
-
private focusObserver;
|
|
19
|
-
/**
|
|
20
|
-
* HostBinding doesn't register listeners conditionally which may produce some perf issues.
|
|
21
|
-
*
|
|
22
|
-
* Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1991
|
|
23
|
-
*/
|
|
24
|
-
private uiEvents;
|
|
25
|
-
private get props();
|
|
26
|
-
private get fieldAttrElements();
|
|
27
|
-
constructor(renderer: Renderer2, elementRef: ElementRef, _document: any, formlyField?: FormlyField);
|
|
28
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
29
|
-
/**
|
|
30
|
-
* We need to re-evaluate all the attributes on every change detection cycle, because
|
|
31
|
-
* by using a HostBinding we run into certain edge cases. This means that whatever logic
|
|
32
|
-
* is in here has to be super lean or we risk seriously damaging or destroying the performance.
|
|
33
|
-
*
|
|
34
|
-
* Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1317
|
|
35
|
-
* Material issue: https://github.com/angular/components/issues/14024
|
|
36
|
-
*/
|
|
37
|
-
ngDoCheck(): void;
|
|
38
|
-
ngOnDestroy(): void;
|
|
39
|
-
toggleFocus(value: boolean): void;
|
|
40
|
-
onFocus($event: any): void;
|
|
41
|
-
onBlur($event: any): void;
|
|
42
|
-
onHostChange($event: any): void;
|
|
43
|
-
onChange($event: any): void;
|
|
44
|
-
private attachElementRef;
|
|
45
|
-
private detachElementRef;
|
|
46
|
-
private getSafeAttributeValue;
|
|
47
|
-
private setAttribute;
|
|
48
|
-
private removeAttribute;
|
|
49
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyAttributes, [null, null, null, { optional: true; }]>;
|
|
50
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FormlyAttributes, "[formlyAttributes]", never, { "field": { "alias": "formlyAttributes"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
|
|
51
|
-
}
|
|
52
|
-
export declare class LegacyFormlyAttributes extends FormlyAttributes {
|
|
53
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LegacyFormlyAttributes, never>;
|
|
54
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<LegacyFormlyAttributes, "[formlyAttributes]", never, {}, {}, never, never, false, never>;
|
|
55
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FieldType, FieldGroupTypeConfig } from './field.type';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/** @ignore */
|
|
4
|
-
export declare class FormlyGroup extends FieldType<FieldGroupTypeConfig> {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyGroup, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyGroup, "formly-group", never, {}, {}, never, ["*"], false, never>;
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnChanges } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { FormlyFieldConfig } from '../models';
|
|
4
|
-
import { FormlyConfig } from '../services/formly.config';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* The `<formly-validation-message>` component renders the error message of a given `field`.
|
|
8
|
-
*/
|
|
9
|
-
export declare class FormlyValidationMessage implements OnChanges {
|
|
10
|
-
private config;
|
|
11
|
-
/** The field config. */
|
|
12
|
-
field: FormlyFieldConfig;
|
|
13
|
-
errorMessage$: Observable<string>;
|
|
14
|
-
constructor(config: FormlyConfig);
|
|
15
|
-
ngOnChanges(): void;
|
|
16
|
-
get errorMessage(): string | Observable<string>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyValidationMessage, 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>;
|
|
23
|
-
}
|
package/lib/utils.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { FormlyFieldConfig } from './models';
|
|
2
|
-
import { FormlyFieldConfigCache } from './models';
|
|
3
|
-
import { NgZone, ɵNoopNgZone } from '@angular/core';
|
|
4
|
-
export declare function disableTreeValidityCall(form: any, callback: () => void): void;
|
|
5
|
-
export declare function getFieldId(formId: string, field: FormlyFieldConfig, index: string | number): string;
|
|
6
|
-
export declare function hasKey(field: FormlyFieldConfig): boolean;
|
|
7
|
-
export declare function getKeyPath(field: FormlyFieldConfigCache): string[];
|
|
8
|
-
export declare const FORMLY_VALIDATORS: string[];
|
|
9
|
-
export declare function assignFieldValue(field: FormlyFieldConfigCache, value: any): void;
|
|
10
|
-
export declare function assignModelValue(model: any, paths: string[], value: any): void;
|
|
11
|
-
export declare function getFieldValue(field: FormlyFieldConfig): any;
|
|
12
|
-
export declare function reverseDeepMerge(dest: any, ...args: any[]): any;
|
|
13
|
-
export declare function isNil(value: any): boolean;
|
|
14
|
-
export declare function isUndefined(value: any): boolean;
|
|
15
|
-
export declare function isBlankString(value: any): boolean;
|
|
16
|
-
export declare function isFunction(value: any): boolean;
|
|
17
|
-
export declare function objAndSameType(obj1: any, obj2: any): boolean;
|
|
18
|
-
export declare function isObject(x: any): boolean;
|
|
19
|
-
export declare function isPromise(obj: any): obj is Promise<any>;
|
|
20
|
-
export declare function clone(value: any): any;
|
|
21
|
-
export declare function defineHiddenProp(field: any, prop: string, defaultValue: any): void;
|
|
22
|
-
type IObserveFn<T> = (change: {
|
|
23
|
-
currentValue: T;
|
|
24
|
-
previousValue?: T;
|
|
25
|
-
firstChange: boolean;
|
|
26
|
-
}) => void;
|
|
27
|
-
export interface IObserver<T> {
|
|
28
|
-
setValue: (value: T, emitEvent?: boolean) => void;
|
|
29
|
-
unsubscribe: () => void;
|
|
30
|
-
}
|
|
31
|
-
interface IObserveTarget<T> {
|
|
32
|
-
[prop: string]: any;
|
|
33
|
-
_observers?: {
|
|
34
|
-
[prop: string]: {
|
|
35
|
-
value: T;
|
|
36
|
-
onChange: IObserveFn<T>[];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export declare function observeDeep<T = any>(source: IObserveTarget<T>, paths: string[], setFn: () => void): () => void;
|
|
41
|
-
export declare function observe<T = any>(o: IObserveTarget<T>, paths: string[], setFn?: IObserveFn<T>): IObserver<T>;
|
|
42
|
-
export declare function getField(f: FormlyFieldConfig, key: FormlyFieldConfig['key']): FormlyFieldConfig;
|
|
43
|
-
export declare function markFieldForCheck(field: FormlyFieldConfigCache): void;
|
|
44
|
-
export declare function isNoopNgZone(ngZone: NgZone): ngZone is ɵNoopNgZone;
|
|
45
|
-
export declare function isHiddenField(field: FormlyFieldConfig): boolean;
|
|
46
|
-
export declare function isSignalRequired(): boolean;
|
|
47
|
-
export {};
|
package/preset/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FormlyConfig, FormlyExtension, FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
-
export declare class PresetSubstitutionExtension implements FormlyExtension {
|
|
3
|
-
private formlyConfig;
|
|
4
|
-
constructor(formlyConfig: FormlyConfig);
|
|
5
|
-
prePopulate(field: FormlyFieldConfig): void;
|
|
6
|
-
}
|
|
7
|
-
export declare function registerLibraryConfigReplacementExtension(formlyConfig: FormlyConfig): {
|
|
8
|
-
extensions: {
|
|
9
|
-
name: string;
|
|
10
|
-
extension: PresetSubstitutionExtension;
|
|
11
|
-
priority: number;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@ngx-formly/core";
|
|
3
|
-
export declare class FormlyPresetModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyPresetModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyPresetModule, never, [typeof i1.FormlyModule], never>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyPresetModule>;
|
|
7
|
-
}
|
package/preset/public_api.d.ts
DELETED
package/public_api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/core';
|
package/select/index.d.ts
DELETED
package/select/public_api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./select-options.pipe";
|
|
3
|
-
export declare class FormlySelectModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlySelectModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlySelectModule, [typeof i1.LegacyFormlySelectOptionsPipe], never, [typeof i1.LegacyFormlySelectOptionsPipe]>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<FormlySelectModule>;
|
|
7
|
-
}
|
package/testing/index.d.ts
DELETED
package/testing/public_api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './component-factory';
|