@stemy/ngx-dynamic-form 19.1.14 → 19.2.1
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/fesm2022/stemy-ngx-dynamic-form-ui-nebular.mjs +4 -4
- package/fesm2022/stemy-ngx-dynamic-form-ui-nebular.mjs.map +1 -1
- package/fesm2022/stemy-ngx-dynamic-form.mjs +858 -1661
- package/fesm2022/stemy-ngx-dynamic-form.mjs.map +1 -1
- package/ngx-dynamic-form/common-types.d.ts +109 -26
- package/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.d.ts +21 -0
- package/ngx-dynamic-form/components/dynamic-form-array/dynamic-form-array.component.d.ts +9 -0
- package/ngx-dynamic-form/components/dynamic-form-chips/dynamic-form-chips.component.d.ts +7 -0
- package/ngx-dynamic-form/components/dynamic-form-field/dynamic-form-field.component.d.ts +6 -0
- package/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.d.ts +7 -0
- package/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.d.ts +6 -0
- package/ngx-dynamic-form/components/dynamic-form-upload/dynamic-form-upload.component.d.ts +7 -0
- package/ngx-dynamic-form/directives/async-submit.directive.d.ts +17 -23
- package/ngx-dynamic-form/ngx-dynamic-form.imports.d.ts +5 -9
- package/ngx-dynamic-form/ngx-dynamic-form.module.d.ts +13 -11
- package/ngx-dynamic-form/services/dynamic-form-builder.service.d.ts +27 -0
- package/ngx-dynamic-form/services/dynamic-form.service.d.ts +28 -46
- package/ngx-dynamic-form/utils/customizer.d.ts +5 -12
- package/ngx-dynamic-form/utils/decorators.d.ts +10 -0
- package/ngx-dynamic-form/utils/misc.d.ts +2 -4
- package/ngx-dynamic-form/utils/validation.d.ts +13 -0
- package/package.json +21 -16
- package/public_api.d.ts +13 -18
- package/ui-nebular/index.d.ts +1 -5
- package/common-types.d.ts +0 -37
- package/components/base/dynamic-base-form-array.component.d.ts +0 -38
- package/components/base/dynamic-base-form-control-container.component.d.ts +0 -39
- package/components/base/dynamic-base-form-control.component.d.ts +0 -26
- package/components/base/dynamic-base-form-group.component.d.ts +0 -25
- package/components/base/dynamic-base-form.component.d.ts +0 -46
- package/components/base/dynamic-base-select.component.d.ts +0 -15
- package/directives/async-submit.directive.d.ts +0 -31
- package/esm2020/ngx-dynamic-form/common-types.mjs +0 -2
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-array.component.mjs +0 -104
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-control-container.component.mjs +0 -127
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-control.component.mjs +0 -57
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-group.component.mjs +0 -75
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form.component.mjs +0 -182
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-select.component.mjs +0 -66
- package/esm2020/ngx-dynamic-form/directives/async-submit.directive.mjs +0 -116
- package/esm2020/ngx-dynamic-form/ngx-dynamic-form.imports.mjs +0 -26
- package/esm2020/ngx-dynamic-form/ngx-dynamic-form.module.mjs +0 -116
- package/esm2020/ngx-dynamic-form/services/dynamic-form.service.mjs +0 -615
- package/esm2020/ngx-dynamic-form/utils/creators.mjs +0 -67
- package/esm2020/ngx-dynamic-form/utils/customizer.mjs +0 -28
- package/esm2020/ngx-dynamic-form/utils/dynamic-editor.model.mjs +0 -14
- package/esm2020/ngx-dynamic-form/utils/dynamic-form-array.model.mjs +0 -128
- package/esm2020/ngx-dynamic-form/utils/dynamic-form-group.model.mjs +0 -26
- package/esm2020/ngx-dynamic-form/utils/dynamic-select.model.mjs +0 -59
- package/esm2020/ngx-dynamic-form/utils/form-select-subject.mjs +0 -26
- package/esm2020/ngx-dynamic-form/utils/form-subject.mjs +0 -29
- package/esm2020/ngx-dynamic-form/utils/misc.mjs +0 -47
- package/esm2020/ngx-dynamic-form/utils/validation-errors.mjs +0 -22
- package/esm2020/ngx-dynamic-form/utils/validators.mjs +0 -56
- package/esm2020/public_api.mjs +0 -21
- package/esm2020/stemy-ngx-dynamic-form.mjs +0 -5
- package/fesm2015/stemy-ngx-dynamic-form.mjs +0 -1927
- package/fesm2015/stemy-ngx-dynamic-form.mjs.map +0 -1
- package/fesm2020/stemy-ngx-dynamic-form.mjs +0 -1893
- package/fesm2020/stemy-ngx-dynamic-form.mjs.map +0 -1
- package/fesm2022/stemy-ngx-dynamic-form-src-ngx-dynamic-form-nebular.mjs +0 -50
- package/fesm2022/stemy-ngx-dynamic-form-src-ngx-dynamic-form-nebular.mjs.map +0 -1
- package/imports.d.ts +0 -12
- package/ngx-dynamic-form/components/base/dynamic-base-form-array.component.d.ts +0 -38
- package/ngx-dynamic-form/components/base/dynamic-base-form-control-container.component.d.ts +0 -39
- package/ngx-dynamic-form/components/base/dynamic-base-form-control.component.d.ts +0 -26
- package/ngx-dynamic-form/components/base/dynamic-base-form-group.component.d.ts +0 -25
- package/ngx-dynamic-form/components/base/dynamic-base-form.component.d.ts +0 -46
- package/ngx-dynamic-form/components/base/dynamic-base-select.component.d.ts +0 -15
- package/ngx-dynamic-form/services/dynamic-form-layout.service.d.ts +0 -7
- package/ngx-dynamic-form/utils/creators.d.ts +0 -18
- package/ngx-dynamic-form/utils/dynamic-editor.model.d.ts +0 -11
- package/ngx-dynamic-form/utils/dynamic-form-array.model.d.ts +0 -69
- package/ngx-dynamic-form/utils/dynamic-form-group.model.d.ts +0 -14
- package/ngx-dynamic-form/utils/dynamic-select.model.d.ts +0 -39
- package/ngx-dynamic-form/utils/form-select-subject.d.ts +0 -6
- package/ngx-dynamic-form/utils/form-subject.d.ts +0 -10
- package/ngx-dynamic-form/utils/validators.d.ts +0 -8
- package/ngx-dynamic-form.imports.d.ts +0 -12
- package/ngx-dynamic-form.module.d.ts +0 -21
- package/services/dynamic-form.service.d.ts +0 -61
- package/src/ngx-dynamic-form/nebular/imports.d.ts +0 -4
- package/src/ngx-dynamic-form/nebular/index.d.ts +0 -5
- package/src/ngx-dynamic-form/nebular/ngx-dynamic-form.nebular.module.d.ts +0 -9
- package/src/ngx-dynamic-form/nebular/public_api.d.ts +0 -1
- package/stemy-ngx-dynamic-form.d.ts +0 -5
- package/ui-nebular/public_api.d.ts +0 -1
- package/utils/creators.d.ts +0 -18
- package/utils/customizer.d.ts +0 -14
- package/utils/dynamic-editor.model.d.ts +0 -11
- package/utils/dynamic-form-array.model.d.ts +0 -69
- package/utils/dynamic-form-group.model.d.ts +0 -14
- package/utils/dynamic-select.model.d.ts +0 -39
- package/utils/form-select-subject.d.ts +0 -6
- package/utils/form-subject.d.ts +0 -10
- package/utils/misc.d.ts +0 -11
- package/utils/validation-errors.d.ts +0 -11
- package/utils/validators.d.ts +0 -8
|
@@ -1,37 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AbstractControl } from "@angular/forms";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Injector, OutputRef, Signal } from "@angular/core";
|
|
2
|
+
import { AbstractControl, FormGroup } from "@angular/forms";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { FieldTypeConfig, FormlyFieldConfig, FormlyFieldProps } from "@ngx-formly/core";
|
|
5
|
+
import { FormlySelectOption } from "@ngx-formly/core/select";
|
|
6
|
+
import { IAsyncMessage, IOpenApiSchema, IOpenApiSchemaProperty, IRequestOptions } from "@stemy/ngx-utils";
|
|
7
|
+
export type PromiseOrNot<T> = Promise<T> | T;
|
|
8
|
+
export declare const FORM_ROOT_KEY = "__root";
|
|
5
9
|
export type DynamicFormState = "VALID" | "INVALID" | "PENDING" | "DISABLED" | "LOADING";
|
|
6
10
|
export type DynamicFormUpdateOn = "change" | "blur" | "submit";
|
|
7
|
-
export
|
|
8
|
-
|
|
11
|
+
export type UploadData = Record<string, any> | ArrayBuffer | FormData;
|
|
12
|
+
export interface FormBuilderOptions {
|
|
13
|
+
labelPrefix?: string;
|
|
9
14
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
export interface FormFieldProps extends FormlyFieldProps {
|
|
16
|
+
autocomplete?: string;
|
|
17
|
+
formCheck?: string;
|
|
18
|
+
indeterminate?: boolean;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
inline?: boolean;
|
|
21
|
+
allowEmpty?: boolean;
|
|
22
|
+
groupBy?: string;
|
|
23
|
+
useTabs?: boolean;
|
|
24
|
+
tabsLabel?: string;
|
|
25
|
+
addItem?: boolean;
|
|
26
|
+
insertItem?: boolean;
|
|
27
|
+
cloneItem?: boolean;
|
|
28
|
+
moveItem?: boolean;
|
|
29
|
+
removeItem?: boolean;
|
|
30
|
+
clearItems?: boolean;
|
|
31
|
+
accept?: string | string[];
|
|
32
|
+
url?: string;
|
|
33
|
+
maxSize?: number;
|
|
34
|
+
uploadOptions?: IRequestOptions;
|
|
35
|
+
createUploadData?: (file: File) => UploadData | Promise<UploadData>;
|
|
36
|
+
multi?: boolean;
|
|
37
|
+
asFile?: boolean;
|
|
38
|
+
uploadUrl?: string;
|
|
15
39
|
}
|
|
16
|
-
export
|
|
17
|
-
new (config: DynamicFormControlModelConfig): DynamicFormControlModel;
|
|
40
|
+
export interface FormBaseFieldConfig<T = FormFieldProps> extends FormlyFieldConfig<T> {
|
|
18
41
|
}
|
|
19
|
-
export type
|
|
20
|
-
export type
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
42
|
+
export type FormFieldSerializer = (field: FormBaseFieldConfig, injector: Injector) => PromiseOrNot<any>;
|
|
43
|
+
export declare type FormHookFn = (field: FormBaseFieldConfig) => void;
|
|
44
|
+
export interface FormHookConfig {
|
|
45
|
+
onInit?: FormHookFn | ((field: FormBaseFieldConfig) => Observable<any>);
|
|
46
|
+
onChanges?: FormHookFn;
|
|
47
|
+
afterContentInit?: FormHookFn;
|
|
48
|
+
afterViewInit?: FormHookFn;
|
|
49
|
+
onDestroy?: FormHookFn;
|
|
25
50
|
}
|
|
26
|
-
export interface
|
|
27
|
-
|
|
28
|
-
|
|
51
|
+
export interface FormFieldConfig<T = FormFieldProps> extends FormBaseFieldConfig<T> {
|
|
52
|
+
serializer?: FormFieldSerializer;
|
|
53
|
+
serialize?: boolean;
|
|
54
|
+
fieldSet?: string;
|
|
55
|
+
hooks?: FormHookConfig;
|
|
56
|
+
}
|
|
57
|
+
export interface FormFieldType<T = FormFieldProps> extends FieldTypeConfig<T> {
|
|
29
58
|
}
|
|
30
|
-
export interface
|
|
31
|
-
|
|
59
|
+
export interface FormSerializeResult {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}
|
|
62
|
+
export interface FormSelectOption extends FormlySelectOption {
|
|
63
|
+
className?: string;
|
|
64
|
+
classes?: string[] | string;
|
|
65
|
+
id?: any;
|
|
66
|
+
}
|
|
67
|
+
export type FormSelectOptions = FormSelectOption[] | Observable<FormSelectOption[]>;
|
|
68
|
+
export interface IDynamicForm {
|
|
69
|
+
readonly config: Signal<FormFieldConfig[]>;
|
|
70
|
+
readonly group: Signal<FormGroup>;
|
|
71
|
+
readonly status: Signal<DynamicFormState>;
|
|
72
|
+
readonly onSubmit: OutputRef<IDynamicForm>;
|
|
73
|
+
}
|
|
74
|
+
type FormFieldValidatorFn<T> = ((control: AbstractControl, field?: FormlyFieldConfig) => T) & {
|
|
75
|
+
validatorName?: string;
|
|
76
|
+
};
|
|
77
|
+
export type ValidationMessageFn = (error: any, field: FormFieldConfig) => string | Observable<string>;
|
|
78
|
+
interface FormFieldValidatorExpression<T> {
|
|
79
|
+
expression: FormFieldValidatorFn<T>;
|
|
80
|
+
message: ValidationMessageFn;
|
|
81
|
+
}
|
|
82
|
+
type FormFieldValidation<T, R> = {
|
|
83
|
+
validation?: (string | T)[];
|
|
84
|
+
} & {
|
|
85
|
+
[key: string]: FormFieldValidatorFn<R> | FormFieldValidatorExpression<R>;
|
|
86
|
+
};
|
|
87
|
+
export type ValidatorFn = FormFieldValidatorFn<boolean>;
|
|
88
|
+
export type ValidatorExpression = FormFieldValidatorExpression<boolean>;
|
|
89
|
+
export type Validators = FormFieldValidation<ValidatorFn, boolean>;
|
|
90
|
+
export type AsyncBoolean = Promise<boolean> | Observable<boolean>;
|
|
91
|
+
export type AsyncValidatorFn = FormFieldValidatorFn<AsyncBoolean>;
|
|
92
|
+
export type AsyncValidatorExpression = FormFieldValidatorExpression<AsyncBoolean>;
|
|
93
|
+
export type AsyncValidators = FormFieldValidation<AsyncValidatorFn, AsyncBoolean>;
|
|
94
|
+
export type FormFieldCustom = Pick<FormFieldConfig, "wrappers" | "hooks" | "fieldGroup" | "fieldArray">;
|
|
95
|
+
export type FormFieldData = Pick<FormFieldProps, "label" | "readonly" | "hidden"> & {
|
|
96
|
+
validators?: Validators | ValidatorFn[];
|
|
97
|
+
serializer?: FormFieldSerializer;
|
|
98
|
+
fieldSet?: string;
|
|
99
|
+
classes?: string[] | string;
|
|
100
|
+
};
|
|
101
|
+
export type FormInputData = FormFieldData & Pick<FormFieldProps, "type" | "pattern" | "placeholder" | "step" | "min" | "max" | "minLength" | "maxLength" | "autocomplete" | "indeterminate" | "cols" | "rows">;
|
|
102
|
+
export type FormSelectData = FormFieldData & Pick<FormFieldProps, "multiple" | "type" | "inline" | "allowEmpty" | "groupBy"> & {
|
|
103
|
+
options: (field: FormFieldConfig) => FormSelectOptions | Promise<FormSelectOption[]>;
|
|
104
|
+
};
|
|
105
|
+
export type FormUploadData = FormFieldData & Pick<FormFieldProps, "inline" | "multiple" | "accept" | "url" | "maxSize" | "uploadOptions" | "createUploadData" | "multi" | "asFile" | "uploadUrl">;
|
|
106
|
+
export type FormGroupData = FormFieldData;
|
|
107
|
+
export type FormArrayData = FormFieldData & Pick<FormFieldProps, "useTabs" | "tabsLabel" | "addItem" | "insertItem" | "cloneItem" | "moveItem" | "removeItem" | "clearItems">;
|
|
108
|
+
export type FormFieldCustomizer = (property: IOpenApiSchemaProperty, schema: IOpenApiSchema, field: FormlyFieldConfig, parent: FormFieldConfig, options: FormBuilderOptions, injector: Injector) => PromiseOrNot<FormlyFieldConfig | FormlyFieldConfig[]>;
|
|
109
|
+
export interface ConfigForSchemaOptions extends FormBuilderOptions {
|
|
110
|
+
customizer?: FormFieldCustomizer;
|
|
111
|
+
}
|
|
112
|
+
export interface ConfigForSchemaWrapOptions extends Omit<ConfigForSchemaOptions, "customizer"> {
|
|
113
|
+
schema: IOpenApiSchema;
|
|
114
|
+
injector?: Injector;
|
|
115
|
+
customizer?: (property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, field: FormFieldConfig, parent: FormFieldConfig) => Promise<FormFieldConfig[]>;
|
|
32
116
|
}
|
|
33
117
|
export declare type AsyncSubmitMethod = (form: IDynamicForm, context?: any) => Promise<IAsyncMessage>;
|
|
34
|
-
export type GetFormControlComponentType = (model: DynamicFormControlModel, injector: Injector) => Type<DynamicFormControlComponent>;
|
|
35
118
|
export interface IDynamicFormModuleConfig {
|
|
36
|
-
controlProvider?: (injector: Injector) => DynamicFormControlMapFn;
|
|
37
119
|
}
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormGroup } from "@angular/forms";
|
|
2
|
+
import { FormlyFormOptions } from "@ngx-formly/core";
|
|
3
|
+
import { FormFieldConfig, IDynamicForm } from "../../common-types";
|
|
4
|
+
import { DynamicFormBuilderService } from "../../services/dynamic-form-builder.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DynamicFormComponent implements IDynamicForm {
|
|
7
|
+
protected readonly builder: DynamicFormBuilderService;
|
|
8
|
+
readonly labelPrefix: import("@angular/core").InputSignal<string>;
|
|
9
|
+
readonly data: import("@angular/core").InputSignal<any>;
|
|
10
|
+
readonly fields: import("@angular/core").InputSignal<FormFieldConfig<import("../../common-types").FormFieldProps>[]>;
|
|
11
|
+
protected readonly config$: import("@angular/core").ResourceRef<FormFieldConfig<import("../../common-types").FormFieldProps>[]>;
|
|
12
|
+
readonly config: import("@angular/core").Signal<FormFieldConfig<import("../../common-types").FormFieldProps>[]>;
|
|
13
|
+
readonly group: import("@angular/core").Signal<FormGroup<{}>>;
|
|
14
|
+
protected readonly status$: import("@angular/core").ResourceRef<import("@angular/forms").FormControlStatus>;
|
|
15
|
+
readonly status: import("@angular/core").Signal<import("@angular/forms").FormControlStatus>;
|
|
16
|
+
readonly onSubmit: import("@angular/core").OutputEmitterRef<IDynamicForm>;
|
|
17
|
+
readonly options: FormlyFormOptions;
|
|
18
|
+
submit(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "dynamic-form", never, { "labelPrefix": { "alias": "labelPrefix"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; }, never, ["*"], false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldArrayType } from "@ngx-formly/core";
|
|
2
|
+
import { FormFieldConfig } from "../../common-types";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DynamicFormArrayComponent extends FieldArrayType<FormFieldConfig> {
|
|
5
|
+
readonly currentTab: import("@angular/core").WritableSignal<number>;
|
|
6
|
+
clear(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormArrayComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormArrayComponent, "dynamic-form-array", never, {}, {}, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldType } from "@ngx-formly/core";
|
|
2
|
+
import { FormFieldType } from "../../common-types";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DynamicFormChipsComponent extends FieldType<FormFieldType> {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormChipsComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormChipsComponent, "dynamic-form-chips", never, {}, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldWrapper } from "@ngx-formly/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DynamicFormFieldComponent extends FieldWrapper {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormFieldComponent, "dynamic-form-field", never, {}, {}, never, never, false, never>;
|
|
6
|
+
}
|
package/ngx-dynamic-form/components/dynamic-form-fieldset/dynamic-form-fieldset.component.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldWrapper } from "@ngx-formly/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DynamicFormFieldsetComponent extends FieldWrapper {
|
|
4
|
+
ngOnInit(): void;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormFieldsetComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormFieldsetComponent, "dynamic-form-field", never, {}, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldWrapper } from "@ngx-formly/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DynamicFormGroupComponent extends FieldWrapper {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormGroupComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormGroupComponent, "dynamic-form-group", never, {}, {}, never, never, false, never>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldType } from "@ngx-formly/core";
|
|
2
|
+
import { FormFieldType } from "../../common-types";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DynamicFormUploadComponent extends FieldType<FormFieldType> {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormUploadComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormUploadComponent, "dynamic-form-upload", never, {}, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { IAsyncMessage, IToasterService } from "@stemy/ngx-utils";
|
|
1
|
+
import { ElementRef, Renderer2 } from "@angular/core";
|
|
2
|
+
import { IAsyncMessage } from "@stemy/ngx-utils";
|
|
4
3
|
import { AsyncSubmitMethod, IDynamicForm } from "../common-types";
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class AsyncSubmitDirective
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
protected loading: boolean
|
|
18
|
-
protected
|
|
19
|
-
protected callback: Function;
|
|
20
|
-
protected subscription: Subscription;
|
|
5
|
+
export declare class AsyncSubmitDirective {
|
|
6
|
+
method: import("@angular/core").InputSignal<AsyncSubmitMethod>;
|
|
7
|
+
form: import("@angular/core").InputSignal<IDynamicForm>;
|
|
8
|
+
context: import("@angular/core").InputSignal<any>;
|
|
9
|
+
onSuccess: import("@angular/core").OutputEmitterRef<IAsyncMessage>;
|
|
10
|
+
onError: import("@angular/core").OutputEmitterRef<IAsyncMessage>;
|
|
11
|
+
toaster: import("@stemy/ngx-utils").IToasterService;
|
|
12
|
+
renderer: Renderer2;
|
|
13
|
+
elem: ElementRef<HTMLElement>;
|
|
14
|
+
protected status: import("@angular/core").Signal<import("../common-types").DynamicFormState>;
|
|
15
|
+
protected group: import("@angular/core").Signal<import("@angular/forms").FormGroup<any>>;
|
|
16
|
+
protected loading: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
protected callback: import("@angular/core").WritableSignal<() => void>;
|
|
21
18
|
get isDisabled(): boolean;
|
|
22
|
-
set isDisabled(value: boolean);
|
|
23
19
|
get isLoading(): boolean;
|
|
24
|
-
constructor(
|
|
25
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
26
|
-
ngOnDestroy(): void;
|
|
20
|
+
constructor();
|
|
27
21
|
click(): void;
|
|
28
22
|
callMethod(): void;
|
|
29
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncSubmitDirective, never>;
|
|
30
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AsyncSubmitDirective, "[async-submit]", ["async-submit"], { "method": { "alias": "async-submit"; "required": false; }; "form": { "alias": "form"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; }, never, never, false, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AsyncSubmitDirective, "[async-submit]", ["async-submit"], { "method": { "alias": "async-submit"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; }, never, never, false, never>;
|
|
31
25
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { DynamicFormControlMapFn } from "@ng-dynamic-forms/core";
|
|
2
1
|
import { AsyncSubmitDirective } from "./directives/async-submit.directive";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { DynamicBaseSelectComponent } from "./components/base/dynamic-base-select.component";
|
|
9
|
-
export declare const components: (typeof DynamicBaseFormComponent | typeof DynamicBaseFormControlContainerComponent | typeof DynamicBaseFormArrayComponent | typeof DynamicBaseFormControlComponent | typeof DynamicBaseFormGroupComponent | typeof DynamicBaseSelectComponent)[];
|
|
2
|
+
import { DynamicFormComponent } from "./components/dynamic-form/dynamic-form.component";
|
|
3
|
+
import { DynamicFormArrayComponent } from "./components/dynamic-form-array/dynamic-form-array.component";
|
|
4
|
+
import { DynamicFormChipsComponent } from "./components/dynamic-form-chips/dynamic-form-chips.component";
|
|
5
|
+
import { DynamicFormFieldComponent } from "./components/dynamic-form-field/dynamic-form-field.component";
|
|
6
|
+
export declare const components: (typeof DynamicFormComponent | typeof DynamicFormArrayComponent | typeof DynamicFormChipsComponent | typeof DynamicFormFieldComponent)[];
|
|
10
7
|
export declare const directives: (typeof AsyncSubmitDirective)[];
|
|
11
8
|
export declare const pipes: any[];
|
|
12
|
-
export declare function defaultFormControlProvider(): DynamicFormControlMapFn;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { EnvironmentProviders, ModuleWithProviders } from "@angular/core";
|
|
2
2
|
import { IDynamicFormModuleConfig } from "./common-types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./components/
|
|
5
|
-
import * as i2 from "./components/
|
|
6
|
-
import * as i3 from "./components/
|
|
7
|
-
import * as i4 from "./components/
|
|
8
|
-
import * as i5 from "./components/
|
|
9
|
-
import * as i6 from "./components/
|
|
10
|
-
import * as i7 from "./
|
|
11
|
-
import * as i8 from "
|
|
12
|
-
import * as i9 from "@angular/
|
|
13
|
-
import * as i10 from "@
|
|
4
|
+
import * as i1 from "./components/dynamic-form/dynamic-form.component";
|
|
5
|
+
import * as i2 from "./components/dynamic-form-array/dynamic-form-array.component";
|
|
6
|
+
import * as i3 from "./components/dynamic-form-chips/dynamic-form-chips.component";
|
|
7
|
+
import * as i4 from "./components/dynamic-form-field/dynamic-form-field.component";
|
|
8
|
+
import * as i5 from "./components/dynamic-form-fieldset/dynamic-form-fieldset.component";
|
|
9
|
+
import * as i6 from "./components/dynamic-form-group/dynamic-form-group.component";
|
|
10
|
+
import * as i7 from "./components/dynamic-form-upload/dynamic-form-upload.component";
|
|
11
|
+
import * as i8 from "./directives/async-submit.directive";
|
|
12
|
+
import * as i9 from "@angular/common";
|
|
13
|
+
import * as i10 from "@angular/forms";
|
|
14
|
+
import * as i11 from "@stemy/ngx-utils";
|
|
15
|
+
import * as i12 from "@ngx-formly/core";
|
|
14
16
|
export declare class NgxDynamicFormModule {
|
|
15
17
|
private static getProviders;
|
|
16
18
|
static forRoot(config?: IDynamicFormModuleConfig): ModuleWithProviders<NgxDynamicFormModule>;
|
|
17
19
|
static provideForms(config?: IDynamicFormModuleConfig): EnvironmentProviders;
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDynamicFormModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDynamicFormModule, [typeof i1.
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxDynamicFormModule, [typeof i1.DynamicFormComponent, typeof i2.DynamicFormArrayComponent, typeof i3.DynamicFormChipsComponent, typeof i4.DynamicFormFieldComponent, typeof i5.DynamicFormFieldsetComponent, typeof i6.DynamicFormGroupComponent, typeof i7.DynamicFormUploadComponent, typeof i8.AsyncSubmitDirective], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.NgxUtilsModule, typeof i12.FormlyModule], [typeof i1.DynamicFormComponent, typeof i2.DynamicFormArrayComponent, typeof i3.DynamicFormChipsComponent, typeof i4.DynamicFormFieldComponent, typeof i5.DynamicFormFieldsetComponent, typeof i6.DynamicFormGroupComponent, typeof i7.DynamicFormUploadComponent, typeof i8.AsyncSubmitDirective, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.NgxUtilsModule, typeof i12.FormlyModule]>;
|
|
20
22
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxDynamicFormModule>;
|
|
21
23
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Injector, Type } from "@angular/core";
|
|
2
|
+
import { IApiService, ILanguageService } from "@stemy/ngx-utils";
|
|
3
|
+
import { FormArrayData, FormBuilderOptions, FormFieldConfig, FormFieldData, FormFieldProps, FormGroupData, FormInputData, FormSelectData, FormSelectOption, FormUploadData } from "../common-types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type FormFieldBuilder = (fb: DynamicFormBuilderService, parent: FormFieldConfig, options: FormBuilderOptions) => FormFieldConfig;
|
|
6
|
+
export declare class DynamicFormBuilderService {
|
|
7
|
+
readonly injector: Injector;
|
|
8
|
+
readonly api: IApiService;
|
|
9
|
+
readonly language: ILanguageService;
|
|
10
|
+
constructor(injector: Injector, api: IApiService, language: ILanguageService);
|
|
11
|
+
protected getLabel(key: string, label: string, parent: FormFieldConfig, options: FormBuilderOptions): string;
|
|
12
|
+
protected createFormField(key: string, type: string, data: FormFieldData, props: FormFieldProps, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
13
|
+
resolveFormFields(target: Type<any>, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[];
|
|
14
|
+
resolveFormGroup(key: string, target: Type<any>, data: FormGroupData, parent?: FormFieldConfig, options?: FormBuilderOptions): FormFieldConfig;
|
|
15
|
+
resolveFormArray(key: string, itemType: string | FormInputData | Type<any>, data: FormArrayData, parent?: FormFieldConfig, options?: FormBuilderOptions): FormFieldConfig;
|
|
16
|
+
createFieldSets(fields: FormFieldConfig[], parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig[];
|
|
17
|
+
createFormInput(key: string, data: FormInputData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
18
|
+
createFormSelect(key: string, data: FormSelectData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
19
|
+
createFormUpload(key: string, data: FormUploadData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
20
|
+
createFormGroup(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig[], data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
21
|
+
createFormGroup(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig[]>, data: FormGroupData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>;
|
|
22
|
+
createFormArray(key: string, fields: (parent: FormFieldConfig) => FormFieldConfig | FormFieldConfig[], data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): FormFieldConfig;
|
|
23
|
+
createFormArray(key: string, fields: (parent: FormFieldConfig) => Promise<FormFieldConfig | FormFieldConfig[]>, data: FormArrayData, parent: FormFieldConfig, options: FormBuilderOptions): Promise<FormFieldConfig>;
|
|
24
|
+
fixSelectOptions(field: FormFieldConfig, options: FormSelectOption[]): Promise<FormSelectOption[]>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormBuilderService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicFormBuilderService>;
|
|
27
|
+
}
|
|
@@ -1,61 +1,43 @@
|
|
|
1
1
|
import { Injector } from "@angular/core";
|
|
2
|
-
import { AbstractControl,
|
|
3
|
-
import {
|
|
2
|
+
import { AbstractControl, FormGroup } from "@angular/forms";
|
|
3
|
+
import { FormlyFieldConfig } from "@ngx-formly/core";
|
|
4
4
|
import { IApiService, ILanguageService, IOpenApiSchema, IOpenApiSchemaProperty, IOpenApiSchemas, OpenApiService } from "@stemy/ngx-utils";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { DynamicEditorModelConfig } from "../utils/dynamic-editor.model";
|
|
8
|
-
import { DynamicFormArrayModel, DynamicFormArrayModelConfig } from "../utils/dynamic-form-array.model";
|
|
9
|
-
import { DynamicFormFieldSet, DynamicFormGroupModel, DynamicFormGroupModelConfig } from "../utils/dynamic-form-group.model";
|
|
10
|
-
import { DynamicFormOptionConfig, DynamicSelectModel, DynamicSelectModelConfig } from "../utils/dynamic-select.model";
|
|
11
|
-
import { DynamicBaseFormComponent } from "../components/base/dynamic-base-form.component";
|
|
12
|
-
import { AllValidationErrors } from "../utils/validation-errors";
|
|
5
|
+
import { ConfigForSchemaOptions, ConfigForSchemaWrapOptions, FormFieldConfig, FormFieldCustomizer, FormFieldData, FormSelectOptions, FormSerializeResult, IDynamicForm, Validators } from "../common-types";
|
|
6
|
+
import { DynamicFormBuilderService } from "./dynamic-form-builder.service";
|
|
13
7
|
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class DynamicFormService
|
|
8
|
+
export declare class DynamicFormService {
|
|
15
9
|
readonly openApi: OpenApiService;
|
|
16
10
|
readonly injector: Injector;
|
|
11
|
+
readonly builder: DynamicFormBuilderService;
|
|
17
12
|
get api(): IApiService;
|
|
18
13
|
get language(): ILanguageService;
|
|
19
14
|
protected schemas: IOpenApiSchemas;
|
|
20
|
-
constructor(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
getErrors(form: DynamicBaseFormComponent): Promise<AllValidationErrors[]>;
|
|
24
|
-
createFormGroup(formModel: DynamicFormModel, options?: AbstractControlOptions | null, parent?: DynamicPathable | null): import("@angular/forms").UntypedFormGroup;
|
|
25
|
-
patchGroup(value: any, formModel: DynamicFormModel, formGroup: FormGroup): void;
|
|
26
|
-
patchForm(value: any, component: DynamicBaseFormComponent): void;
|
|
15
|
+
constructor(openApi: OpenApiService, injector: Injector, builder: DynamicFormBuilderService);
|
|
16
|
+
getFormFieldsForSchema(name: string, customizeOrOptions?: FormFieldCustomizer | ConfigForSchemaOptions): Promise<FormlyFieldConfig[]>;
|
|
17
|
+
serializeForm(form: IDynamicForm, validate?: boolean): Promise<FormSerializeResult>;
|
|
27
18
|
validateForm(form: IDynamicForm, showErrors?: boolean): Promise<any>;
|
|
28
|
-
serialize(
|
|
29
|
-
showErrors(form: IDynamicForm): void;
|
|
30
|
-
notifyChanges(formModel: DynamicFormModel, formGroup: FormGroup, root: DynamicFormModel): void;
|
|
31
|
-
protected patchValues(value: any, formModel: DynamicFormModel, formGroup: FormGroup): void;
|
|
32
|
-
protected updateSelectOptions(formControlModel: DynamicFormControlModel, formControl: FormControl, root: DynamicFormModel): void;
|
|
19
|
+
serialize(fields: FormFieldConfig[]): Promise<FormSerializeResult>;
|
|
33
20
|
protected showErrorsForGroup(formGroup: FormGroup): void;
|
|
34
21
|
protected showErrorsForControls(controls: AbstractControl[]): void;
|
|
35
|
-
protected convertToDate(value: any):
|
|
36
|
-
|
|
37
|
-
protected
|
|
38
|
-
protected
|
|
39
|
-
protected
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
getFormUploadConfig(property: IOpenApiSchemaProperty, options: ModelForSchemaWrapOptions): DynamicFileUploadModelConfig;
|
|
52
|
-
getFormCheckboxConfig(property: IOpenApiSchemaProperty, options: ModelForSchemaWrapOptions): DynamicCheckboxModelConfig;
|
|
53
|
-
cloneFormArrayGroup(index: number, formArray: FormArray, formArrayModel: DynamicFormArrayModel): void;
|
|
22
|
+
protected convertToDate(value: any): any;
|
|
23
|
+
getFormFieldGroupForSchema(name: string, customizeOrOptions?: FormFieldCustomizer | ConfigForSchemaOptions): Promise<FormlyFieldConfig>;
|
|
24
|
+
protected getFormFieldsForSchemaDef(schema: IOpenApiSchema, parent: FormFieldConfig, options: ConfigForSchemaWrapOptions): Promise<FormFieldConfig[]>;
|
|
25
|
+
protected getFormFieldsForProp(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig[]>;
|
|
26
|
+
protected getFormFieldForProp(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormFieldConfig>;
|
|
27
|
+
protected getFormFieldData(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions): FormFieldData;
|
|
28
|
+
protected getFormArrayConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormlyFieldConfig>;
|
|
29
|
+
protected getFormGroupConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): Promise<FormlyFieldConfig>;
|
|
30
|
+
protected getFormInputConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
31
|
+
protected getFormTextareaConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
32
|
+
protected getFormDatepickerConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
33
|
+
protected getFormRadioConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
34
|
+
protected getFormSelectConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
35
|
+
protected getFormUploadConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
36
|
+
protected getFormCheckboxConfig(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, parent: FormFieldConfig): FormFieldConfig;
|
|
37
|
+
protected getFormSelectOptions(property: IOpenApiSchemaProperty, options: ConfigForSchemaWrapOptions, field: FormFieldConfig): FormSelectOptions;
|
|
54
38
|
protected replaceOptionsEndpoint(endpoint: string, key: string, value: any): string;
|
|
55
|
-
protected
|
|
56
|
-
protected
|
|
57
|
-
protected addPropertyValidators(validators: DynamicValidatorsConfig, property: IOpenApiSchemaProperty): void;
|
|
58
|
-
protected addItemsValidators(validators: DynamicValidatorsConfig, items: IOpenApiSchemaProperty): void;
|
|
39
|
+
protected addPropertyValidators(validators: Validators, property: IOpenApiSchemaProperty): void;
|
|
40
|
+
protected addItemsValidators(validators: Validators, items: IOpenApiSchemaProperty): void;
|
|
59
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormService, never>;
|
|
60
42
|
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicFormService>;
|
|
61
43
|
}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { Type } from "@angular/core";
|
|
2
|
-
import { DynamicFormControlComponent, DynamicFormControlModel, DynamicFormControlModelConfig } from "@ng-dynamic-forms/core";
|
|
3
1
|
import { CachedProvider, IOpenApiSchema, IOpenApiSchemaProperty } from "@stemy/ngx-utils";
|
|
4
|
-
import {
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { FormBuilderOptions, FormFieldConfig, FormFieldCustomizer, PromiseOrNot } from "../common-types";
|
|
3
|
+
export interface IFormFieldCustomizer {
|
|
4
|
+
acceptField(config: FormFieldConfig, parent: FormFieldConfig): boolean;
|
|
5
|
+
customizeField(config: FormFieldConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema, parent: FormFieldConfig, options: FormBuilderOptions): PromiseOrNot<FormFieldConfig | FormFieldConfig[]>;
|
|
8
6
|
}
|
|
9
|
-
export declare function
|
|
10
|
-
export interface IFormModelCustomizer {
|
|
11
|
-
acceptModel(model: DynamicFormControlModel, path: string): boolean;
|
|
12
|
-
customizeModel(model: DynamicFormControlModel, config: DynamicFormControlModelConfig, property: IOpenApiSchemaProperty, schema: IOpenApiSchema, path: string): PromiseOrNot<DynamicFormControlModel | DynamicFormControlModel[]>;
|
|
13
|
-
}
|
|
14
|
-
export declare function customizeFormModel(...providers: CachedProvider<IFormModelCustomizer>[]): FormModelCustomizer;
|
|
7
|
+
export declare function customizeFormField(...providers: CachedProvider<IFormFieldCustomizer>[]): FormFieldCustomizer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormArrayData, FormFieldSerializer, FormGroupData, FormInputData, FormSelectData, FormUploadData } from "../common-types";
|
|
2
|
+
import { Type } from "@angular/core";
|
|
3
|
+
export declare function FormSerializable(serializer?: FormFieldSerializer): PropertyDecorator;
|
|
4
|
+
export declare function FormInput(data?: FormInputData): PropertyDecorator;
|
|
5
|
+
export declare function FormSelect(data?: FormSelectData): PropertyDecorator;
|
|
6
|
+
export declare function FormUpload(data?: FormUploadData): PropertyDecorator;
|
|
7
|
+
export declare function FormFile(data?: FormUploadData): PropertyDecorator;
|
|
8
|
+
export declare function FormGroup(data?: FormGroupData): PropertyDecorator;
|
|
9
|
+
export declare function FormArray(itemType: string | FormInputData | Type<any>, data?: FormArrayData): PropertyDecorator;
|
|
10
|
+
export declare function FormModel(data?: FormGroupData): PropertyDecorator;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { DynamicFormModel, DynamicPathable } from "@ng-dynamic-forms/core";
|
|
2
1
|
import { IOpenApiSchemaProperty } from "@stemy/ngx-utils";
|
|
2
|
+
import { FormlyFieldConfig } from "@ngx-formly/core";
|
|
3
3
|
export declare function isStringWithVal(val: any): boolean;
|
|
4
4
|
export declare function findRefs(property: IOpenApiSchemaProperty): string[];
|
|
5
5
|
export declare function replaceSpecialChars(str: string, to?: string): string;
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function collectPathAble<T extends DynamicPathable>(start: T, getter: (cur: T & DynamicPathable) => string): string[];
|
|
8
|
-
export declare function getDynamicPath(start: DynamicPathable): string;
|
|
6
|
+
export declare function mergeFormFields(formFields: FormlyFieldConfig[][]): FormlyFieldConfig[];
|
|
9
7
|
export declare const MIN_INPUT_NUM = -999999999;
|
|
10
8
|
export declare const MAX_INPUT_NUM = 999999999;
|
|
11
9
|
export declare const EDITOR_FORMATS: string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { ValidationMessageFn, ValidatorFn } from "../common-types";
|
|
3
|
+
export declare function validationMessage(injector: Injector, key: string, labelPrefix?: string): ValidationMessageFn;
|
|
4
|
+
export declare function withName(fn: ValidatorFn, name: string): ValidatorFn;
|
|
5
|
+
export declare function jsonValidation(): ValidatorFn;
|
|
6
|
+
export declare function requiredValidation(): ValidatorFn;
|
|
7
|
+
export declare function translationValidation(langs?: string[]): ValidatorFn;
|
|
8
|
+
export declare function phoneValidation(): ValidatorFn;
|
|
9
|
+
export declare function emailValidation(): ValidatorFn;
|
|
10
|
+
export declare function minLengthValidation(minLength: number, each?: boolean): ValidatorFn;
|
|
11
|
+
export declare function maxLengthValidation(maxLength: number, each?: boolean): ValidatorFn;
|
|
12
|
+
export declare function minValueValidation(min: number, each?: boolean): ValidatorFn;
|
|
13
|
+
export declare function maxValueValidation(max: number, each?: boolean): ValidatorFn;
|
package/package.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stemy/ngx-dynamic-form",
|
|
3
|
-
"version": "19.1
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"public": true,
|
|
6
6
|
"repository": "https://github.com/stemyke/ngx-dynamic-form.git",
|
|
7
7
|
"author": "stemy <balazs.stemler@metrix.co.hu>",
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@angular/animations": "^
|
|
10
|
-
"@angular/common": "^
|
|
11
|
-
"@angular/compiler": "^
|
|
12
|
-
"@angular/core": "^
|
|
13
|
-
"@angular/forms": "^
|
|
14
|
-
"@angular/router": "^
|
|
15
|
-
"@angular/platform-browser": "^
|
|
16
|
-
"@angular/platform-server": "^
|
|
17
|
-
"express": "
|
|
9
|
+
"@angular/animations": "^19.2.14",
|
|
10
|
+
"@angular/common": "^19.2.14",
|
|
11
|
+
"@angular/compiler": "^19.2.14",
|
|
12
|
+
"@angular/core": "^19.2.14",
|
|
13
|
+
"@angular/forms": "^19.2.14",
|
|
14
|
+
"@angular/router": "^19.2.14",
|
|
15
|
+
"@angular/platform-browser": "^19.2.14",
|
|
16
|
+
"@angular/platform-server": "^19.2.14",
|
|
17
|
+
"express": "~4.21.2",
|
|
18
18
|
"element-resize-detector": "^1.2.4",
|
|
19
|
-
"rxjs": "^
|
|
20
|
-
"
|
|
19
|
+
"rxjs": "^7.8.2",
|
|
20
|
+
"luxon": "^3.6.1",
|
|
21
21
|
"invokable": "^1.0.3",
|
|
22
|
-
"ngx-device-detector": "^
|
|
22
|
+
"ngx-device-detector": "^9.0.0",
|
|
23
|
+
"@floating-ui/dom": "^1.7.1",
|
|
23
24
|
"json5": "^2.2.3",
|
|
24
|
-
"@stemy/ngx-utils": "^
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
25
|
+
"@stemy/ngx-utils": "^19.5.0",
|
|
26
|
+
"@ngx-formly/core": "^6.3.12",
|
|
27
|
+
"@ngx-formly/bootstrap": "^6.3.12",
|
|
27
28
|
"ngx-mask": "^17.1.8"
|
|
28
29
|
},
|
|
29
30
|
"main": "dist/bundles/stemy-ngx-dynamic-form.umd.js",
|
|
@@ -45,6 +46,10 @@
|
|
|
45
46
|
".": {
|
|
46
47
|
"types": "./index.d.ts",
|
|
47
48
|
"default": "./fesm2022/stemy-ngx-dynamic-form.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./ui-nebular": {
|
|
51
|
+
"types": "./ui-nebular/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/stemy-ngx-dynamic-form-ui-nebular.mjs"
|
|
48
53
|
}
|
|
49
54
|
},
|
|
50
55
|
"sideEffects": false
|