@messaia/cdk 13.3.3 → 13.3.5-rc02
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/esm2020/lib/base/components/generic-form-base.component.mjs +15 -13
- package/esm2020/lib/forms/components/generic-form/generic-form.component.mjs +3 -3
- package/esm2020/lib/forms/constants/constants.mjs +3 -2
- package/esm2020/lib/forms/forms.module.mjs +4 -4
- package/esm2020/lib/forms/functions/decorators.mjs +49 -117
- package/esm2020/lib/forms/functions/functions.mjs +3 -26
- package/esm2020/lib/forms/models/form-field-group-definition.mjs +12 -0
- package/fesm2015/messaia-cdk.mjs +99 -188
- package/fesm2015/messaia-cdk.mjs.map +1 -1
- package/fesm2020/messaia-cdk.mjs +99 -186
- package/fesm2020/messaia-cdk.mjs.map +1 -1
- package/lib/base/components/generic-form-base.component.d.ts +2 -2
- package/lib/forms/components/generic-form/generic-form.component.d.ts +2 -2
- package/lib/forms/constants/constants.d.ts +2 -1
- package/lib/forms/forms.module.d.ts +3 -3
- package/lib/forms/functions/decorators.d.ts +4 -8
- package/lib/forms/functions/functions.d.ts +2 -9
- package/lib/forms/models/{form-field-group.d.ts → form-field-group-definition.d.ts} +5 -2
- package/package.json +1 -1
- package/esm2020/lib/forms/models/form-field-group.mjs +0 -12
|
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
|
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
7
|
import { IEntity } from '../../common/models/entity';
|
|
8
8
|
import { SaveAction } from '../../common/models/save-action';
|
|
9
|
-
import {
|
|
9
|
+
import { FormFieldGroupDefinition } from '../../forms/models/form-field-group-definition';
|
|
10
10
|
import { GenericService } from '../../http/services/generic.service';
|
|
11
11
|
import { TableMenuItem } from '../../table/models/table-menu-item';
|
|
12
12
|
import { BaseComponent } from './base.component';
|
|
@@ -150,7 +150,7 @@ export declare abstract class GenericFormBaseComponent<TEntity extends IEntity,
|
|
|
150
150
|
/**
|
|
151
151
|
* fieldGroups: FormFieldGroup[]
|
|
152
152
|
*/
|
|
153
|
-
fieldGroups:
|
|
153
|
+
fieldGroups: FormFieldGroupDefinition[];
|
|
154
154
|
/**
|
|
155
155
|
* panelId: string
|
|
156
156
|
*/
|
|
@@ -5,7 +5,7 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
|
5
5
|
import { MatChipInputEvent } from '@angular/material/chips';
|
|
6
6
|
import { FormFieldType } from '../../enums/form-field-type';
|
|
7
7
|
import { FormFieldDefinition } from '../../models/form-field-definition';
|
|
8
|
-
import {
|
|
8
|
+
import { FormFieldGroupDefinition } from '../../models/form-field-group-definition';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
/**
|
|
11
11
|
* VdEditorDirective class
|
|
@@ -47,7 +47,7 @@ export declare class VdGenericFormComponent implements OnInit {
|
|
|
47
47
|
/**
|
|
48
48
|
* fieldGroups: FormFieldGroup[]
|
|
49
49
|
*/
|
|
50
|
-
fieldGroups:
|
|
50
|
+
fieldGroups: FormFieldGroupDefinition[];
|
|
51
51
|
/**
|
|
52
52
|
* Group name
|
|
53
53
|
*/
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const formFieldsMetadataKey: unique symbol;
|
|
2
|
+
export declare const formFieldGroupsMetadataKey: unique symbol;
|
|
@@ -23,14 +23,14 @@ import * as i18 from "@angular/material/slide-toggle";
|
|
|
23
23
|
import * as i19 from "@angular/material/core";
|
|
24
24
|
import * as i20 from "@angular/material/autocomplete";
|
|
25
25
|
import * as i21 from "@angular/material/chips";
|
|
26
|
-
export { formFieldGroupMetadataKey } from './constants/constants';
|
|
26
|
+
export { formFieldGroupsMetadataKey as formFieldsMetadataKey, formFieldsMetadataKey as formFieldGroupMetadataKey } from './constants/constants';
|
|
27
27
|
export { FormFieldType } from './enums/form-field-type';
|
|
28
|
-
export { FormField,
|
|
28
|
+
export { FormField, FormFieldGroup } from './functions/decorators';
|
|
29
29
|
export { getFormGroups } from './functions/functions';
|
|
30
30
|
export { AbstractMatFormField } from './helpers/abstract-mat-form-field';
|
|
31
31
|
export { ValueAccessorBase } from './helpers/value-accessor-base';
|
|
32
32
|
export { FormFieldDefinition } from './models/form-field-definition';
|
|
33
|
-
export {
|
|
33
|
+
export { FormFieldGroupDefinition } from './models/form-field-group-definition';
|
|
34
34
|
export { EqualValidator } from './validators/equal-validator.directive';
|
|
35
35
|
export { NativeElementInjectorDirective, UniqueValidatorDirective, MatFormFieldEditorDirective };
|
|
36
36
|
export declare class VdFormsModule {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { Type } from "@angular/core";
|
|
2
2
|
import { FormFieldDefinition } from "../models/form-field-definition";
|
|
3
|
-
/**
|
|
4
|
-
* Property decorator to create form fields
|
|
5
|
-
* @param args
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare function FormFieldOld(args: Partial<FormFieldDefinition>): Function;
|
|
9
3
|
/**
|
|
10
4
|
* Property decorator to create form fields
|
|
11
5
|
* @param args
|
|
@@ -14,7 +8,9 @@ export declare function FormFieldOld(args: Partial<FormFieldDefinition>): Functi
|
|
|
14
8
|
export declare function FormField(args: Partial<FormFieldDefinition>): Function;
|
|
15
9
|
/**
|
|
16
10
|
* Property decorator to create form fields
|
|
17
|
-
* @param
|
|
11
|
+
* @param type
|
|
12
|
+
* @param header
|
|
13
|
+
* @param init
|
|
18
14
|
* @returns
|
|
19
15
|
*/
|
|
20
|
-
export declare function
|
|
16
|
+
export declare function FormFieldGroup<T>(type: Type<T>, header: string, init?: T): Function;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldGroupDefinition } from "../models/form-field-group-definition";
|
|
2
2
|
/**
|
|
3
3
|
* Gets poperties decoarated with @FormField grouped by row
|
|
4
4
|
* @param origin
|
|
5
5
|
* @returns
|
|
6
|
-
* @deprecated
|
|
7
6
|
*/
|
|
8
|
-
export declare function
|
|
9
|
-
/**
|
|
10
|
-
* Gets poperties decoarated with @FormField grouped by row
|
|
11
|
-
* @param origin
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export declare function getFormGroups(origin: object): FormFieldGroup[];
|
|
7
|
+
export declare function getFormGroups(origin: object): FormFieldGroupDefinition[];
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { Type } from "@angular/core";
|
|
1
2
|
import { FormFieldDefinition } from "./form-field-definition";
|
|
2
|
-
export declare class
|
|
3
|
+
export declare class FormFieldGroupDefinition {
|
|
3
4
|
name: string;
|
|
4
5
|
header?: string;
|
|
5
6
|
fields: FormFieldDefinition[];
|
|
6
7
|
groups: [FormFieldDefinition[]];
|
|
8
|
+
type?: Type<any>;
|
|
9
|
+
instance?: object;
|
|
7
10
|
/**
|
|
8
11
|
* constructor
|
|
9
12
|
* @param init
|
|
10
13
|
*/
|
|
11
|
-
constructor(init?: Partial<
|
|
14
|
+
constructor(init?: Partial<FormFieldGroupDefinition>);
|
|
12
15
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export class FormFieldGroup {
|
|
2
|
-
/**
|
|
3
|
-
* constructor
|
|
4
|
-
* @param init
|
|
5
|
-
*/
|
|
6
|
-
constructor(init) {
|
|
7
|
-
this.name = 'details';
|
|
8
|
-
this.fields = [];
|
|
9
|
-
Object.assign(this, init);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC1ncm91cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9zcmMvbGliL2Zvcm1zL21vZGVscy9mb3JtLWZpZWxkLWdyb3VwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxjQUFjO0lBTXZCOzs7T0FH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