tuain-ng-forms-lib 13.0.11 → 13.0.13
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/classes/forms/form.mjs +12 -10
- package/esm2020/lib/classes/forms/table/table.mjs +5 -3
- package/esm2020/lib/components/forms/basic-form.mjs +171 -75
- package/fesm2015/tuain-ng-forms-lib.mjs +204 -96
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -1
- package/fesm2020/tuain-ng-forms-lib.mjs +185 -85
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -1
- package/lib/classes/forms/form.d.ts +1 -1
- package/lib/components/forms/basic-form.d.ts +61 -33
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@ export declare class FormStructureAndData {
|
|
|
73
73
|
setFieldRequired(code: string, required: boolean): any;
|
|
74
74
|
setFieldErrorMessage(code: string, message: string): any;
|
|
75
75
|
setFieldOptions(code: string, optionsArray: any[], idAttribute: string, nameAttribute: string): any;
|
|
76
|
-
getFieldSet(filter: any, inputCodes: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
76
|
+
getFieldSet(filter: any, inputCodes: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
|
|
77
77
|
applyOnFields(processFunc: any, inputCodes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
78
78
|
enableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
79
79
|
showFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
@@ -30,13 +30,16 @@ export declare class BasicFormComponent {
|
|
|
30
30
|
private _tableActionsFinish;
|
|
31
31
|
private _tableGetDataStart;
|
|
32
32
|
private _tableGetDataFinish;
|
|
33
|
+
private _actionServerError;
|
|
34
|
+
private _fieldServerError;
|
|
35
|
+
private _tableServerError;
|
|
33
36
|
protected inputDataFields: any;
|
|
34
37
|
protected extraData: any;
|
|
35
38
|
protected _eventEmiter: LibEventManagerService;
|
|
36
39
|
protected enabledSections: RecordFormSection[];
|
|
37
40
|
formConfig: any;
|
|
38
|
-
name: string;
|
|
39
|
-
formSubject: string;
|
|
41
|
+
name: string | null;
|
|
42
|
+
formSubject: string | null;
|
|
40
43
|
_errorType: string;
|
|
41
44
|
errorCode: string;
|
|
42
45
|
errorMessage: string;
|
|
@@ -50,7 +53,7 @@ export declare class BasicFormComponent {
|
|
|
50
53
|
setTitle(title: string): void;
|
|
51
54
|
cleanData(): void;
|
|
52
55
|
getCurrentState(): string;
|
|
53
|
-
supportState(state: string): boolean;
|
|
56
|
+
supportState(state: string | null): boolean;
|
|
54
57
|
changeState(state: any): boolean;
|
|
55
58
|
getStates(): any[];
|
|
56
59
|
getImmutableElement(name: string): any;
|
|
@@ -63,14 +66,14 @@ export declare class BasicFormComponent {
|
|
|
63
66
|
getFieldValue(code: string): any;
|
|
64
67
|
getFieldOptionText(code: string): any;
|
|
65
68
|
getFieldsValues(codes: string[]): any;
|
|
66
|
-
getFieldOptions(code: string): FieldOption[];
|
|
69
|
+
getFieldOptions(code: string): FieldOption[] | null;
|
|
67
70
|
setFieldValue(code: string, value: any): any;
|
|
68
71
|
setFieldRequired(code: string, required: boolean): any;
|
|
69
72
|
setFieldErrorMessage(code: string, errorMessage: string): any;
|
|
70
73
|
setFieldError(code: string, errorCode: string, message: string, type?: string): any;
|
|
71
74
|
setFieldIntrinsicErrorMessage(code: string, message: string): any;
|
|
72
75
|
setFieldOptions(code: any, optionsArray: any, idAttribute: any, nameAttribute: any): any;
|
|
73
|
-
getFieldSet(filterFunc?: any, codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
76
|
+
getFieldSet(filterFunc?: any, codes?: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
|
|
74
77
|
applyOnFields(processFunc: any, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
75
78
|
applyProcessToAllFields(processFunc: any): number;
|
|
76
79
|
cleanFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
@@ -96,7 +99,7 @@ export declare class BasicFormComponent {
|
|
|
96
99
|
hideFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
97
100
|
getActionsByAttribute(name: string, value: any): FormAction[];
|
|
98
101
|
getHeaderActions(): FormAction[];
|
|
99
|
-
getAction(actionCode: string): FormAction;
|
|
102
|
+
getAction(actionCode: string): FormAction | null;
|
|
100
103
|
showActions(actionArray: any): void;
|
|
101
104
|
hideActions(actionArray: any): void;
|
|
102
105
|
enableActions(actionArray: any): void;
|
|
@@ -105,21 +108,21 @@ export declare class BasicFormComponent {
|
|
|
105
108
|
hideAction(code: string): void;
|
|
106
109
|
enableAction(code: string): void;
|
|
107
110
|
disableAction(code: string): void;
|
|
108
|
-
getSections(): RecordFormSection[];
|
|
111
|
+
getSections(): RecordFormSection[] | null;
|
|
109
112
|
activateSection(code: any): void;
|
|
110
|
-
getSectionsTitles(): string[];
|
|
111
|
-
getSection(code: string): RecordFormSection;
|
|
113
|
+
getSectionsTitles(): string[] | null;
|
|
114
|
+
getSection(code: string): RecordFormSection | null;
|
|
112
115
|
showSection(code: string): void;
|
|
113
116
|
hideSection(code: string): void;
|
|
114
117
|
showSections(codes: string[] | string): void;
|
|
115
118
|
hideSections(codes: string[] | string): void;
|
|
116
|
-
getSubSection(code: string, subCode: string): RecordFormSubSection;
|
|
119
|
+
getSubSection(code: string, subCode: string): RecordFormSubSection | null;
|
|
117
120
|
showSubSection(code: string, subCode: string): void;
|
|
118
121
|
hideSubSection(code: string, subCode: string): void;
|
|
119
122
|
showSubSections(code: string, subCodes: string[] | string): void;
|
|
120
123
|
hideSubSections(code: string, subCodes: string[] | string): void;
|
|
121
|
-
getSectionActions(code: string): FormAction[];
|
|
122
|
-
getSectionActionNames(code: string): string[];
|
|
124
|
+
getSectionActions(code: string): FormAction[] | null;
|
|
125
|
+
getSectionActionNames(code: string): string[] | null;
|
|
123
126
|
getTables(): RecordTable[];
|
|
124
127
|
showTables(codes: string[] | string): void;
|
|
125
128
|
hideTables(codes: string[] | string): void;
|
|
@@ -137,13 +140,13 @@ export declare class BasicFormComponent {
|
|
|
137
140
|
get formCode(): string;
|
|
138
141
|
set formCode(name: string);
|
|
139
142
|
get inServerProcess(): boolean;
|
|
140
|
-
get form(): FormStructureAndData;
|
|
141
|
-
get state(): string;
|
|
143
|
+
get form(): FormStructureAndData | null;
|
|
144
|
+
get state(): string | null;
|
|
142
145
|
get currentState(): string;
|
|
143
146
|
set currentState(state: string);
|
|
144
147
|
get immutableData(): any;
|
|
145
148
|
get extraInfo(): any;
|
|
146
|
-
get visibleSections(): RecordFormSection[];
|
|
149
|
+
get visibleSections(): RecordFormSection[] | null;
|
|
147
150
|
get formRoute(): string;
|
|
148
151
|
set formRoute(route: string);
|
|
149
152
|
get subject(): string;
|
|
@@ -162,19 +165,19 @@ export declare class BasicFormComponent {
|
|
|
162
165
|
/**
|
|
163
166
|
* @deprecated Use getField
|
|
164
167
|
*/
|
|
165
|
-
getFieldObject(code: string): FieldDescriptor;
|
|
168
|
+
getFieldObject(code: string): FieldDescriptor | null;
|
|
166
169
|
/**
|
|
167
170
|
* @deprecated Use getAction
|
|
168
171
|
*/
|
|
169
|
-
getActionObject(code: string): FormAction;
|
|
172
|
+
getActionObject(code: string): FormAction | null;
|
|
170
173
|
/**
|
|
171
174
|
* @deprecated Use getTable
|
|
172
175
|
*/
|
|
173
|
-
getTableObject(code: string): RecordTable;
|
|
176
|
+
getTableObject(code: string): RecordTable | null;
|
|
174
177
|
/**
|
|
175
178
|
* @deprecated Use getSection
|
|
176
179
|
*/
|
|
177
|
-
getSectionObject(code: string): RecordFormSection;
|
|
180
|
+
getSectionObject(code: string): RecordFormSection | null;
|
|
178
181
|
/**
|
|
179
182
|
* @deprecated Use changeState
|
|
180
183
|
*/
|
|
@@ -198,7 +201,7 @@ export declare class BasicFormComponent {
|
|
|
198
201
|
goBack(): void;
|
|
199
202
|
goBackForm(): void;
|
|
200
203
|
getOriginDetail(): any;
|
|
201
|
-
setError(errorType: string, errorMessage: string, errorDetail: string): void;
|
|
204
|
+
setError(errorType: string | null, errorMessage: string | null, errorDetail: string | null): void;
|
|
202
205
|
resetError(): void;
|
|
203
206
|
getErrorType(): string;
|
|
204
207
|
getErrorMessage(): string;
|
|
@@ -218,13 +221,22 @@ export declare class BasicFormComponent {
|
|
|
218
221
|
*/
|
|
219
222
|
requestFormAction(actionCode: string, actionSubject?: any): Promise<any>;
|
|
220
223
|
updateFormWithServerData(formContent: any): void;
|
|
224
|
+
/**
|
|
225
|
+
* Manejo de event handlers para errores Server del formulario
|
|
226
|
+
*/
|
|
227
|
+
cleanActionServerError(): void;
|
|
228
|
+
cleanFieldServerError(): void;
|
|
229
|
+
cleanTableServerError(): void;
|
|
230
|
+
onActionServerError(callback: any, properties?: any): void;
|
|
231
|
+
onValidationServerError(callback: any, properties?: any): void;
|
|
232
|
+
onTableServerError(callback: any, properties?: any): void;
|
|
221
233
|
/**
|
|
222
234
|
* Manejo de event handlers para acciones sobre el formulario
|
|
223
235
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
236
|
+
onSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
237
|
+
onSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
238
|
+
onActionStart(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
239
|
+
onActionFinish(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
228
240
|
launchSectionActivation(code: string): Promise<void>;
|
|
229
241
|
launchSectionInactivation(code: string): Promise<void>;
|
|
230
242
|
startAction(code: string): Promise<void>;
|
|
@@ -234,9 +246,9 @@ export declare class BasicFormComponent {
|
|
|
234
246
|
/**
|
|
235
247
|
* Manejadores de eventos para validaciones sobre campos
|
|
236
248
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
249
|
+
onFieldInput(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
250
|
+
onFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
251
|
+
onFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
240
252
|
startFieldInputValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<boolean>;
|
|
241
253
|
startFieldValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<void>;
|
|
242
254
|
startServerFieldValidation(inputField: string | FieldDescriptor): Promise<void>;
|
|
@@ -245,12 +257,12 @@ export declare class BasicFormComponent {
|
|
|
245
257
|
/**
|
|
246
258
|
* Manejadores de eventos para acciones sobre Tablas
|
|
247
259
|
*/
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
260
|
+
onTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
|
|
261
|
+
onTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
|
|
262
|
+
onTableSelectionStart(code: string, callback: any, properties?: any): void;
|
|
263
|
+
onTableSelectionFinish(code: string, callback: any, properties?: any): void;
|
|
264
|
+
onTableGetDataStart(code: string, callback: any, properties?: any): void;
|
|
265
|
+
onTableGetDataFinish(code: string, callback: any, properties?: any): void;
|
|
254
266
|
startTableGlobalAction(tableActionEvent: any): Promise<void>;
|
|
255
267
|
startTableServerGlobalAction(tableActionDetail: any): Promise<void>;
|
|
256
268
|
finishTableGlobalAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
|
|
@@ -270,6 +282,22 @@ export declare class BasicFormComponent {
|
|
|
270
282
|
checkSectionRequiredFields(sectionCode: string, reqFieldMessage?: string): boolean;
|
|
271
283
|
validateSectionConsistency(sectionCode: string, reqFieldMessage?: string): boolean;
|
|
272
284
|
copyTableRecordToFields(tableObj: any, mappingTable?: any): boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Métodos Legacy de compatibilidad hacia atrás
|
|
287
|
+
*/
|
|
288
|
+
addSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
289
|
+
addSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
290
|
+
addActionMethodStart(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
291
|
+
addActionMethodFinish(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
292
|
+
addFieldInputValidation(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
293
|
+
addFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
294
|
+
addFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
|
|
295
|
+
addTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
|
|
296
|
+
addTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
|
|
297
|
+
addTableSelectionStart(code: string, callback: any, properties?: any): void;
|
|
298
|
+
addTableSelectionFinish(code: string, callback: any, properties?: any): void;
|
|
299
|
+
addTableGetDataStart(code: string, callback: any, properties?: any): void;
|
|
300
|
+
addTableGetDataFinish(code: string, callback: any, properties?: any): void;
|
|
273
301
|
static ɵfac: i0.ɵɵFactoryDeclaration<BasicFormComponent, never>;
|
|
274
302
|
static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"]>;
|
|
275
303
|
}
|