tuain-ng-forms-lib 12.0.24 → 12.0.25
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/tuain-ng-forms-lib.umd.js +905 -800
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/element.js +4 -2
- package/esm2015/lib/classes/forms/field.js +6 -2
- package/esm2015/lib/classes/forms/form.js +123 -190
- package/esm2015/lib/components/forms/basic-form.js +446 -223
- package/fesm2015/tuain-ng-forms-lib.js +798 -636
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/element.d.ts +9 -9
- package/lib/classes/forms/field.d.ts +4 -0
- package/lib/classes/forms/form.d.ts +84 -69
- package/lib/components/forms/basic-form.d.ts +145 -146
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
|
@@ -10,28 +10,28 @@ export declare class FormElement {
|
|
|
10
10
|
elementType: string;
|
|
11
11
|
customAttributes: any;
|
|
12
12
|
constructor(elementDefinition: any, formConfig: any);
|
|
13
|
-
getCustomAttribute(name:
|
|
14
|
-
setCustomAttribute(name:
|
|
15
|
-
matchAttribute(name:
|
|
13
|
+
getCustomAttribute(name: string): string;
|
|
14
|
+
setCustomAttribute(name: string, value: string): void;
|
|
15
|
+
matchAttribute(name: string, value: string): boolean;
|
|
16
16
|
isField(): boolean;
|
|
17
17
|
isAction(): boolean;
|
|
18
18
|
isTable(): boolean;
|
|
19
19
|
setVisibleStates(newStates: any): void;
|
|
20
20
|
setEnabledStates(newStates: any): void;
|
|
21
|
-
viewOnState(state:
|
|
22
|
-
enabledOnState(state:
|
|
21
|
+
viewOnState(state: string): boolean;
|
|
22
|
+
enabledOnState(state: string): boolean;
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated Utilizar viewOnState
|
|
25
25
|
*/
|
|
26
|
-
supportState(state:
|
|
26
|
+
supportState(state: string): boolean;
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated Utilizar viewOnState
|
|
29
29
|
*/
|
|
30
|
-
supportMode(state:
|
|
30
|
+
supportMode(state: string): boolean;
|
|
31
31
|
get visible(): boolean;
|
|
32
32
|
set visible(visible: boolean);
|
|
33
|
-
visibleOn(state:
|
|
34
|
-
enabledOn(state:
|
|
33
|
+
visibleOn(state: string): boolean;
|
|
34
|
+
enabledOn(state: string): boolean;
|
|
35
35
|
setVisibility(visible: boolean, forced?: boolean): void;
|
|
36
36
|
show(forced?: boolean): void;
|
|
37
37
|
hide(forced?: boolean): void;
|
|
@@ -40,11 +40,14 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
40
40
|
get attributeChange(): Subject<any>;
|
|
41
41
|
get editionPartial(): Subject<any>;
|
|
42
42
|
get detailRequest(): Subject<string>;
|
|
43
|
+
get info(): string;
|
|
43
44
|
get validating(): boolean;
|
|
44
45
|
set validating(isValidating: boolean);
|
|
45
46
|
setIntrinsicErrorMessage(message: string): void;
|
|
46
47
|
set intrinsicErrorMessage(message: string);
|
|
47
48
|
get fieldValue(): any;
|
|
49
|
+
getRequired(): boolean;
|
|
50
|
+
setRequired(required: boolean): void;
|
|
48
51
|
get required(): boolean;
|
|
49
52
|
set required(required: boolean);
|
|
50
53
|
get maxLength(): any;
|
|
@@ -87,6 +90,7 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
87
90
|
setErrorCode(code: any): void;
|
|
88
91
|
getErrorMessage(): string;
|
|
89
92
|
setErrorMessage(msg: any): void;
|
|
93
|
+
get empty(): boolean;
|
|
90
94
|
isEmpty(): boolean;
|
|
91
95
|
getValue(): any;
|
|
92
96
|
updateFromServer(fld: any): void;
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import { RecordFormSection } from './section';
|
|
2
1
|
import { FormAction } from './action';
|
|
3
2
|
import { FieldDescriptor } from './field';
|
|
4
3
|
import { RecordTable } from './table/table';
|
|
4
|
+
import { RecordFormSection } from './section';
|
|
5
|
+
import { RecordFormSubSection } from './subsection';
|
|
6
|
+
export interface FieldPayload {
|
|
7
|
+
fieldCode: string;
|
|
8
|
+
fieldValue: any;
|
|
9
|
+
editable: boolean;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
required: boolean;
|
|
12
|
+
fieldOptions: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TablePayload {
|
|
15
|
+
tableCode: string;
|
|
16
|
+
visible: boolean;
|
|
17
|
+
currentPage: number;
|
|
18
|
+
requestedPage: number;
|
|
19
|
+
recordsPerPage: number;
|
|
20
|
+
currentFilter: any;
|
|
21
|
+
sortingColumn: string;
|
|
22
|
+
sortingDirection: string;
|
|
23
|
+
}
|
|
5
24
|
export declare class FormStructureAndData {
|
|
6
25
|
state: string;
|
|
7
26
|
_name: string;
|
|
@@ -21,95 +40,91 @@ export declare class FormStructureAndData {
|
|
|
21
40
|
private _exclusiveSectionsByAttr;
|
|
22
41
|
constructor(definitionReceived: any, formConfig: any);
|
|
23
42
|
getTitle(): string;
|
|
24
|
-
setTitle(title:
|
|
43
|
+
setTitle(title: string): void;
|
|
25
44
|
get name(): string;
|
|
26
45
|
set name(name: string);
|
|
27
46
|
get defaultState(): string;
|
|
28
|
-
supportState(state:
|
|
29
|
-
supportMode(state:
|
|
30
|
-
get states():
|
|
47
|
+
supportState(state: string): boolean;
|
|
48
|
+
supportMode(state: string): boolean;
|
|
49
|
+
get states(): any[];
|
|
31
50
|
getCurrentState(): string;
|
|
32
|
-
changeState(newState:
|
|
33
|
-
setStateFlow(states?: any, transitions?: any, defaultState?:
|
|
34
|
-
getImmutableElement(name:
|
|
51
|
+
changeState(newState: string): boolean;
|
|
52
|
+
setStateFlow(states?: any, transitions?: any, defaultState?: string): void;
|
|
53
|
+
getImmutableElement(name: string): any;
|
|
35
54
|
set immutableData(immutableData: any);
|
|
36
55
|
get immutableData(): any;
|
|
37
|
-
getExtraInfo(name:
|
|
56
|
+
getExtraInfo(name: string): any;
|
|
38
57
|
set extraInfo(extraInfo: any);
|
|
39
58
|
get extraInfo(): any;
|
|
59
|
+
get fields(): {};
|
|
60
|
+
get fieldNames(): string[];
|
|
40
61
|
getFields(): FieldDescriptor[];
|
|
41
62
|
getFieldNames(): string[];
|
|
42
|
-
getField(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
tagFieldsWithError(errorMessage: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
|
|
71
|
-
cleanErrorFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): void;
|
|
72
|
-
tagEmptyRequiredFields(errorMessage: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): boolean;
|
|
63
|
+
getField(code: string): FieldDescriptor;
|
|
64
|
+
enableField(code: string): void;
|
|
65
|
+
disableField(code: string): void;
|
|
66
|
+
getFieldValue(code: string): void;
|
|
67
|
+
getFieldOptions(code: string): void;
|
|
68
|
+
setFieldValue(code: string, value: any): void;
|
|
69
|
+
setFieldError(code: string, message: string, type?: string): void;
|
|
70
|
+
setFieldIntrinsicErrorMessage(code: string, message: string): void;
|
|
71
|
+
setFieldRequired(code: string, required: boolean): void;
|
|
72
|
+
setFieldErrorMessage(code: string, message: string): void;
|
|
73
|
+
setFieldOptions(code: string, optionsArray: any[], idAttribute: string, nameAttribute: string): void;
|
|
74
|
+
getFieldSet(filter: any, inputCodes: string[] | string, secCode?: string, subCode?: string): any;
|
|
75
|
+
applyOnFields(processFunc: any, inputCodes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
76
|
+
enableFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
77
|
+
showFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
78
|
+
hideFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
79
|
+
showLabelFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
80
|
+
hideLabelFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
81
|
+
disableFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
82
|
+
cleanFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
83
|
+
tagFieldsWithError(message: any, codes?: string[] | string, secCode?: string, subCode?: string): number;
|
|
84
|
+
cleanErrorFields(codes?: string[] | string, secCode?: string, subCode?: string): void;
|
|
85
|
+
tagEmptyRequiredFields(message: any, codes?: any, secCode?: string, subCode?: string): boolean;
|
|
86
|
+
getRequiredFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
|
|
87
|
+
getRequiredEmptyFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
|
|
88
|
+
getChangedFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
|
|
89
|
+
getFieldsWithValidationIssues(codes?: string[] | string, secCode?: string, subCode?: string): any;
|
|
90
|
+
getFieldsValues(inputCodes?: string[] | string, secCode?: string, subCode?: string): {};
|
|
73
91
|
get actions(): {};
|
|
74
92
|
getActionsByAttribute(name: string, value: any): FormAction[];
|
|
75
93
|
getActions(): FormAction[];
|
|
76
94
|
getAction(code: string): any;
|
|
77
|
-
showActions(codes:
|
|
78
|
-
hideActions(codes:
|
|
79
|
-
enableActions(codes:
|
|
80
|
-
disableActions(codes:
|
|
81
|
-
execOnActions(codes:
|
|
82
|
-
tables():
|
|
95
|
+
showActions(codes: string[] | string): void;
|
|
96
|
+
hideActions(codes: string[] | string): void;
|
|
97
|
+
enableActions(codes: string[] | string): void;
|
|
98
|
+
disableActions(codes: string[] | string): void;
|
|
99
|
+
execOnActions(codes: string[] | string, functionName: string): void;
|
|
100
|
+
get tables(): any;
|
|
83
101
|
getTables(): RecordTable[];
|
|
84
|
-
getTable(code:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
102
|
+
getTable(code: string): any;
|
|
103
|
+
getTableRecord(code: string, id: string): any;
|
|
104
|
+
enableTables(codes: string[] | string): void;
|
|
105
|
+
disableTables(codes: string[] | string): void;
|
|
106
|
+
showTables(codes: string[] | string): void;
|
|
107
|
+
hideTables(codes: string[] | string): void;
|
|
108
|
+
cleanTables(codes: string[] | string): void;
|
|
109
|
+
execOnTables(codes: string[] | string, functionName: string): void;
|
|
92
110
|
get sections(): RecordFormSection[];
|
|
111
|
+
getSections(): RecordFormSection[];
|
|
93
112
|
getSectionsByAttribute(name: any, value: any): RecordFormSection[];
|
|
94
113
|
get sectionTitles(): string[];
|
|
95
114
|
get visibleSections(): RecordFormSection[];
|
|
96
|
-
getSection(code:
|
|
97
|
-
showSections(
|
|
98
|
-
hideSections(
|
|
99
|
-
activeSection():
|
|
100
|
-
getSubSection(code:
|
|
101
|
-
showSubSections(code:
|
|
102
|
-
hideSubSections(code:
|
|
103
|
-
activateSection(code:
|
|
104
|
-
execOnSections(codes:
|
|
105
|
-
execOnSubSections(code:
|
|
115
|
+
getSection(code: string): RecordFormSection;
|
|
116
|
+
showSections(codes: string[] | string): void;
|
|
117
|
+
hideSections(codes: string[] | string): void;
|
|
118
|
+
activeSection(): string;
|
|
119
|
+
getSubSection(code: string, subCode: any): RecordFormSubSection;
|
|
120
|
+
showSubSections(code: string, subCodes: string[] | string): void;
|
|
121
|
+
hideSubSections(code: string, subCodes: string[] | string): void;
|
|
122
|
+
activateSection(code: string): void;
|
|
123
|
+
execOnSections(codes: string[] | string, functionName: string): void;
|
|
124
|
+
execOnSubSections(code: string, subNames: string[] | string, functionName: string): void;
|
|
106
125
|
/**
|
|
107
126
|
* Métodos propios de gestión del formulario
|
|
108
127
|
*/
|
|
109
128
|
cleanData(): void;
|
|
110
|
-
|
|
111
|
-
getPayload(): {
|
|
112
|
-
fields: any[];
|
|
113
|
-
tables: any[];
|
|
114
|
-
};
|
|
129
|
+
getPayload(): any;
|
|
115
130
|
}
|