@stemy/ngx-dynamic-form 12.0.1 → 12.0.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.
- package/bundles/stemy-ngx-dynamic-form.umd.js +98 -81
- package/bundles/stemy-ngx-dynamic-form.umd.js.map +1 -1
- package/esm2015/ngx-dynamic-form/common-types.js +24 -8
- package/esm2015/ngx-dynamic-form/components/dynamic-form/dynamic-form.component.js +13 -4
- package/esm2015/ngx-dynamic-form/components/dynamic-form-file/dynamic-form-file.component.js +6 -13
- package/esm2015/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.js +9 -2
- package/esm2015/ngx-dynamic-form/components/dynamic-form-input/dynamic-form-input.component.js +3 -10
- package/esm2015/ngx-dynamic-form/components/dynamic-forms/dynamic-forms.component.js +12 -3
- package/esm2015/ngx-dynamic-form/directives/dynamic-form-group.directive.js +1 -3
- package/esm2015/public_api.js +3 -2
- package/esm2015/stemy-ngx-dynamic-form.js +1 -2
- package/fesm2015/stemy-ngx-dynamic-form.js +90 -66
- package/fesm2015/stemy-ngx-dynamic-form.js.map +1 -1
- package/ngx-dynamic-form/common-types.d.ts +14 -7
- package/ngx-dynamic-form/components/dynamic-form-file/dynamic-form-file.component.d.ts +1 -4
- package/ngx-dynamic-form/components/dynamic-form-group/dynamic-form-group.component.d.ts +3 -2
- package/ngx-dynamic-form/components/dynamic-form-input/dynamic-form-input.component.d.ts +0 -3
- package/ngx-dynamic-form/directives/dynamic-form-group.directive.d.ts +1 -2
- package/package.json +1 -1
- package/public_api.d.ts +2 -1
- package/stemy-ngx-dynamic-form.d.ts +0 -1
- package/stemy-ngx-dynamic-form.metadata.json +1 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, InjectionToken, Injector, TemplateRef, Type, ValueProvider } from "@angular/core";
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, InjectionToken, Injector, TemplateRef, Type, ValueProvider, OnInit } from "@angular/core";
|
|
2
2
|
import { FormControl, FormGroup, ValidationErrors } from "@angular/forms";
|
|
3
|
-
import { IResolveFactory, IAsyncMessage, IRequestOptions } from "@stemy/ngx-utils";
|
|
3
|
+
import { IResolveFactory, IAsyncMessage, IRequestOptions, ApiService, IToasterService, ILanguageService } from "@stemy/ngx-utils";
|
|
4
4
|
export declare const FORM_GROUP_TYPE: InjectionToken<Type<IFormControlComponent>>;
|
|
5
5
|
export declare const FORM_CONTROL_PROVIDER: InjectionToken<IFormControlProvider>;
|
|
6
6
|
export interface IFormControlComponent {
|
|
7
7
|
control: IDynamicFormControl;
|
|
8
8
|
}
|
|
9
9
|
export interface IFormGroupComponent {
|
|
10
|
-
form:
|
|
10
|
+
form: IDynamicFormBase;
|
|
11
11
|
control: IDynamicFormControl;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare const DYNAMIC_FORM: InjectionToken<IDynamicFormBase>;
|
|
14
|
+
export declare abstract class FormControlComponent<T extends IFormControlData> implements IFormControlComponent, OnInit {
|
|
15
|
+
readonly api: ApiService;
|
|
16
|
+
readonly form: IDynamicFormBase;
|
|
17
|
+
readonly language: ILanguageService;
|
|
18
|
+
readonly toaster: IToasterService;
|
|
14
19
|
control: IDynamicFormControl;
|
|
15
|
-
|
|
20
|
+
constructor(api: ApiService, form: IDynamicFormBase, language: ILanguageService, toaster: IToasterService);
|
|
21
|
+
ctrInit(): void;
|
|
22
|
+
ngOnInit(): void;
|
|
16
23
|
get data(): T;
|
|
17
24
|
get value(): any;
|
|
18
25
|
get meta(): any;
|
|
@@ -68,7 +75,7 @@ export interface IDynamicFormControl {
|
|
|
68
75
|
showErrors(): void;
|
|
69
76
|
}
|
|
70
77
|
export declare class DynamicFormGroup extends FormGroup implements IDynamicFormControl {
|
|
71
|
-
|
|
78
|
+
form: IDynamicFormBase;
|
|
72
79
|
get id(): string;
|
|
73
80
|
get type(): string;
|
|
74
81
|
get data(): IFormControlData;
|
|
@@ -119,12 +126,12 @@ export declare class DynamicFormControl extends FormControl implements IDynamicF
|
|
|
119
126
|
get data(): IFormControlData;
|
|
120
127
|
get visible(): boolean;
|
|
121
128
|
get meta(): any;
|
|
122
|
-
get form(): IDynamicFormBase;
|
|
123
129
|
get injector(): Injector;
|
|
124
130
|
get label(): string;
|
|
125
131
|
get provider(): IFormControlProvider;
|
|
126
132
|
get model(): any;
|
|
127
133
|
get formId(): string;
|
|
134
|
+
form: IDynamicFormBase;
|
|
128
135
|
private helper;
|
|
129
136
|
constructor(control: IFormControl, group: DynamicFormGroup);
|
|
130
137
|
getData<T extends IFormControlData>(): T;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { FormControlComponent, IDynamicFormControl, IFormFileData } from "../../common-types";
|
|
2
|
-
import { ApiService, IToasterService } from "@stemy/ngx-utils";
|
|
3
2
|
export declare class DynamicFormFileComponent extends FormControlComponent<IFormFileData> {
|
|
4
|
-
readonly api: ApiService;
|
|
5
|
-
readonly toaster: IToasterService;
|
|
6
3
|
private fileImageCache;
|
|
7
4
|
static acceptor(control: IDynamicFormControl): boolean;
|
|
8
5
|
static loader(): Promise<any>;
|
|
9
|
-
|
|
6
|
+
ctrInit(): void;
|
|
10
7
|
onSelect(input: HTMLInputElement): void;
|
|
11
8
|
protected processFiles(fileList: FileList): void;
|
|
12
9
|
protected upload(files: File[]): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IDynamicFormBase, IDynamicFormControl, IFormGroupComponent } from "../../common-types";
|
|
2
2
|
export declare class DynamicFormGroupComponent implements IFormGroupComponent {
|
|
3
|
-
form:
|
|
3
|
+
readonly form: IDynamicFormBase;
|
|
4
4
|
control: IDynamicFormControl;
|
|
5
|
+
constructor(form: IDynamicFormBase);
|
|
5
6
|
get classes(): string;
|
|
6
7
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { ILanguageService } from "@stemy/ngx-utils";
|
|
2
1
|
import { DynamicFormControl, FormControlComponent, IFormInputData } from "../../common-types";
|
|
3
2
|
export declare class DynamicFormInputComponent extends FormControlComponent<IFormInputData> {
|
|
4
|
-
private language;
|
|
5
3
|
static acceptor(control: DynamicFormControl): boolean;
|
|
6
4
|
static loader(): Promise<any>;
|
|
7
5
|
get isChecked(): boolean;
|
|
8
|
-
constructor(language: ILanguageService);
|
|
9
6
|
onDateChange(value: string): void;
|
|
10
7
|
onTextChange(value: string): void;
|
|
11
8
|
onNumberBlur(): void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges, ViewContainerRef } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { IDynamicFormControl, IFormControlComponent } from "../common-types";
|
|
3
3
|
import { DynamicFormService } from "../services/dynamic-form.service";
|
|
4
4
|
export declare class DynamicFormGroupDirective implements OnChanges {
|
|
5
5
|
private vcr;
|
|
6
6
|
private forms;
|
|
7
7
|
control: IDynamicFormControl;
|
|
8
|
-
form: IDynamicForm;
|
|
9
8
|
visible: boolean;
|
|
10
9
|
get component(): IFormControlComponent;
|
|
11
10
|
private comp;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { FORM_CONTROL_PROVIDER, IFormControlComponent, IFormGroupComponent, FormControlComponent, IFormControlProviderAcceptor, IFormControlProviderLoader, IFormControlOptions, IFormControlSerializer, IFormControlProvider, IFormSerializer, IFormSerializers, DynamicFormState, DynamicFormUpdateOn, IDynamicFormControl, DynamicFormGroup, DynamicFormControl, IFormControl, IFormControlData, IFormInputData, IFormSelectData, IFormStaticData, IFormFileData, IFormModelData, IFormFieldSet, IFormControlOption, IDynamicFormTemplates, IDynamicFormConfig, IDynamicSingleFormConfig, IDynamicMultiFormConfig, IDynamicFormsConfigs, IDynamicFormBase, AsyncSubmitMethod, IDynamicFormInfo, IDynamicForm, IDynamicFormFieldSets, FormControlTester, FormControlTesterFactory, FormControlValidator, FormControlValidatorFactory, defaultSerializer, FormSerializable, FormInput, FormSelect, FormStatic, FormModel, FormFile, FormFieldSet, FormGroupProvider, provideFormGroup, FormControlProvider, provideFormControl, defineFormControl, getFormFieldSets, getFormControl, getFormSerializer, createFormInput, createFormSelect, createFormStatic, createFormModel, createFormControl } from "./ngx-dynamic-form/common-types";
|
|
1
|
+
export { FORM_CONTROL_PROVIDER, IFormControlComponent, IFormGroupComponent, DYNAMIC_FORM, FormControlComponent, IFormControlProviderAcceptor, IFormControlProviderLoader, IFormControlOptions, IFormControlSerializer, IFormControlProvider, IFormSerializer, IFormSerializers, DynamicFormState, DynamicFormUpdateOn, IDynamicFormControl, DynamicFormGroup, DynamicFormControl, IFormControl, IFormControlData, IFormInputData, IFormSelectData, IFormStaticData, IFormFileData, IFormModelData, IFormFieldSet, IFormControlOption, IDynamicFormTemplates, IDynamicFormConfig, IDynamicSingleFormConfig, IDynamicMultiFormConfig, IDynamicFormsConfigs, IDynamicFormBase, AsyncSubmitMethod, IDynamicFormInfo, IDynamicForm, IDynamicFormFieldSets, FormControlTester, FormControlTesterFactory, FormControlValidator, FormControlValidatorFactory, defaultSerializer, FormSerializable, FormInput, FormSelect, FormStatic, FormModel, FormFile, FormFieldSet, FormGroupProvider, provideFormGroup, FormControlProvider, provideFormControl, defineFormControl, getFormFieldSets, getFormControl, getFormSerializer, createFormInput, createFormSelect, createFormStatic, createFormModel, createFormControl } from "./ngx-dynamic-form/common-types";
|
|
2
2
|
export { DynamicFormService } from "./ngx-dynamic-form/services/dynamic-form.service";
|
|
3
3
|
export { FormUtilities } from "./ngx-dynamic-form/services/form-utilities";
|
|
4
4
|
export { OpenApiService, IOpenApiSchemaProperty, IOpenApiSchema, IDynamicFormInputs } from "./ngx-dynamic-form/services/open-api.service";
|
|
5
5
|
export { AsyncSubmitDirective } from "./ngx-dynamic-form/directives/async-submit.directive";
|
|
6
6
|
export { DynamicFormControlDirective } from "./ngx-dynamic-form/directives/dynamic-form-control.directive";
|
|
7
7
|
export { DynamicFormTemplateDirective } from "./ngx-dynamic-form/directives/dynamic-form-template.directive";
|
|
8
|
+
export { DynamicFormGroupDirective } from "./ngx-dynamic-form/directives/dynamic-form-group.directive";
|
|
8
9
|
export { DynamicFormBaseComponent } from "./ngx-dynamic-form/components/base/dynamic-form-base.component";
|
|
9
10
|
export { DynamicFormComponent } from "./ngx-dynamic-form/components/dynamic-form/dynamic-form.component";
|
|
10
11
|
export { DynamicFormsComponent } from "./ngx-dynamic-form/components/dynamic-forms/dynamic-forms.component";
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './public_api';
|
|
5
5
|
export { FORM_GROUP_TYPE as ɵa } from './ngx-dynamic-form/common-types';
|
|
6
|
-
export { DynamicFormGroupDirective as ɵe } from './ngx-dynamic-form/directives/dynamic-form-group.directive';
|
|
7
6
|
export { components as ɵb, directives as ɵc, pipes as ɵd } from './ngx-dynamic-form/ngx-dynamic-form.module';
|