tuain-ng-forms-lib 13.0.12 → 13.0.14

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.
@@ -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,15 +30,20 @@ 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;
45
+ errorFullCode: string;
46
+ errorName: string;
42
47
  errorMessage: string;
43
48
  errorDetail: string;
44
49
  visible: boolean;
@@ -50,7 +55,7 @@ export declare class BasicFormComponent {
50
55
  setTitle(title: string): void;
51
56
  cleanData(): void;
52
57
  getCurrentState(): string;
53
- supportState(state: string): boolean;
58
+ supportState(state: string | null): boolean;
54
59
  changeState(state: any): boolean;
55
60
  getStates(): any[];
56
61
  getImmutableElement(name: string): any;
@@ -63,14 +68,14 @@ export declare class BasicFormComponent {
63
68
  getFieldValue(code: string): any;
64
69
  getFieldOptionText(code: string): any;
65
70
  getFieldsValues(codes: string[]): any;
66
- getFieldOptions(code: string): FieldOption[];
71
+ getFieldOptions(code: string): FieldOption[] | null;
67
72
  setFieldValue(code: string, value: any): any;
68
73
  setFieldRequired(code: string, required: boolean): any;
69
74
  setFieldErrorMessage(code: string, errorMessage: string): any;
70
75
  setFieldError(code: string, errorCode: string, message: string, type?: string): any;
71
76
  setFieldIntrinsicErrorMessage(code: string, message: string): any;
72
77
  setFieldOptions(code: any, optionsArray: any, idAttribute: any, nameAttribute: any): any;
73
- getFieldSet(filterFunc?: any, codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
78
+ getFieldSet(filterFunc?: any, codes?: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
74
79
  applyOnFields(processFunc: any, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
75
80
  applyProcessToAllFields(processFunc: any): number;
76
81
  cleanFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
@@ -96,7 +101,7 @@ export declare class BasicFormComponent {
96
101
  hideFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
97
102
  getActionsByAttribute(name: string, value: any): FormAction[];
98
103
  getHeaderActions(): FormAction[];
99
- getAction(actionCode: string): FormAction;
104
+ getAction(actionCode: string): FormAction | null;
100
105
  showActions(actionArray: any): void;
101
106
  hideActions(actionArray: any): void;
102
107
  enableActions(actionArray: any): void;
@@ -105,21 +110,21 @@ export declare class BasicFormComponent {
105
110
  hideAction(code: string): void;
106
111
  enableAction(code: string): void;
107
112
  disableAction(code: string): void;
108
- getSections(): RecordFormSection[];
113
+ getSections(): RecordFormSection[] | null;
109
114
  activateSection(code: any): void;
110
- getSectionsTitles(): string[];
111
- getSection(code: string): RecordFormSection;
115
+ getSectionsTitles(): string[] | null;
116
+ getSection(code: string): RecordFormSection | null;
112
117
  showSection(code: string): void;
113
118
  hideSection(code: string): void;
114
119
  showSections(codes: string[] | string): void;
115
120
  hideSections(codes: string[] | string): void;
116
- getSubSection(code: string, subCode: string): RecordFormSubSection;
121
+ getSubSection(code: string, subCode: string): RecordFormSubSection | null;
117
122
  showSubSection(code: string, subCode: string): void;
118
123
  hideSubSection(code: string, subCode: string): void;
119
124
  showSubSections(code: string, subCodes: string[] | string): void;
120
125
  hideSubSections(code: string, subCodes: string[] | string): void;
121
- getSectionActions(code: string): FormAction[];
122
- getSectionActionNames(code: string): string[];
126
+ getSectionActions(code: string): FormAction[] | null;
127
+ getSectionActionNames(code: string): string[] | null;
123
128
  getTables(): RecordTable[];
124
129
  showTables(codes: string[] | string): void;
125
130
  hideTables(codes: string[] | string): void;
@@ -137,13 +142,13 @@ export declare class BasicFormComponent {
137
142
  get formCode(): string;
138
143
  set formCode(name: string);
139
144
  get inServerProcess(): boolean;
140
- get form(): FormStructureAndData;
141
- get state(): string;
145
+ get form(): FormStructureAndData | null;
146
+ get state(): string | null;
142
147
  get currentState(): string;
143
148
  set currentState(state: string);
144
149
  get immutableData(): any;
145
150
  get extraInfo(): any;
146
- get visibleSections(): RecordFormSection[];
151
+ get visibleSections(): RecordFormSection[] | null;
147
152
  get formRoute(): string;
148
153
  set formRoute(route: string);
149
154
  get subject(): string;
@@ -162,19 +167,19 @@ export declare class BasicFormComponent {
162
167
  /**
163
168
  * @deprecated Use getField
164
169
  */
165
- getFieldObject(code: string): FieldDescriptor;
170
+ getFieldObject(code: string): FieldDescriptor | null;
166
171
  /**
167
172
  * @deprecated Use getAction
168
173
  */
169
- getActionObject(code: string): FormAction;
174
+ getActionObject(code: string): FormAction | null;
170
175
  /**
171
176
  * @deprecated Use getTable
172
177
  */
173
- getTableObject(code: string): RecordTable;
178
+ getTableObject(code: string): RecordTable | null;
174
179
  /**
175
180
  * @deprecated Use getSection
176
181
  */
177
- getSectionObject(code: string): RecordFormSection;
182
+ getSectionObject(code: string): RecordFormSection | null;
178
183
  /**
179
184
  * @deprecated Use changeState
180
185
  */
@@ -198,11 +203,13 @@ export declare class BasicFormComponent {
198
203
  goBack(): void;
199
204
  goBackForm(): void;
200
205
  getOriginDetail(): any;
201
- setError(errorType: string, errorMessage: string, errorDetail: string): void;
206
+ setError(errorType: string | null, errorMessage: string | null, errorDetail: string | null): void;
202
207
  resetError(): void;
203
208
  getErrorType(): string;
204
209
  getErrorMessage(): string;
205
210
  getErrorDetail(): string;
211
+ getErrorName(): string;
212
+ getErrorFullCode(): string;
206
213
  getErrorCode(): string;
207
214
  getFormParameter(name: string): string;
208
215
  preocessInputParams(params: any): string | null;
@@ -218,13 +225,22 @@ export declare class BasicFormComponent {
218
225
  */
219
226
  requestFormAction(actionCode: string, actionSubject?: any): Promise<any>;
220
227
  updateFormWithServerData(formContent: any): void;
228
+ /**
229
+ * Manejo de event handlers para errores Server del formulario
230
+ */
231
+ cleanActionServerError(): void;
232
+ cleanFieldServerError(): void;
233
+ cleanTableServerError(): void;
234
+ onActionServerError(callback: any, properties?: any): void;
235
+ onValidationServerError(callback: any, properties?: any): void;
236
+ onTableServerError(callback: any, properties?: any): void;
221
237
  /**
222
238
  * Manejo de event handlers para acciones sobre el formulario
223
239
  */
224
- addSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
225
- addSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
226
- addActionMethodStart(codes: string[] | string | null, callback: any, properties?: any): void;
227
- addActionMethodFinish(codes: string[] | string | null, callback: any, properties?: any): void;
240
+ onSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
241
+ onSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
242
+ onActionStart(codes: string[] | string | null, callback: any, properties?: any): void;
243
+ onActionFinish(codes: string[] | string | null, callback: any, properties?: any): void;
228
244
  launchSectionActivation(code: string): Promise<void>;
229
245
  launchSectionInactivation(code: string): Promise<void>;
230
246
  startAction(code: string): Promise<void>;
@@ -234,9 +250,9 @@ export declare class BasicFormComponent {
234
250
  /**
235
251
  * Manejadores de eventos para validaciones sobre campos
236
252
  */
237
- addFieldInputValidation(codes: string[] | string | null, callback: any, properties?: any): void;
238
- addFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
239
- addFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
253
+ onFieldInput(codes: string[] | string | null, callback: any, properties?: any): void;
254
+ onFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
255
+ onFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
240
256
  startFieldInputValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<boolean>;
241
257
  startFieldValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<void>;
242
258
  startServerFieldValidation(inputField: string | FieldDescriptor): Promise<void>;
@@ -245,12 +261,12 @@ export declare class BasicFormComponent {
245
261
  /**
246
262
  * Manejadores de eventos para acciones sobre Tablas
247
263
  */
248
- addTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
249
- addTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
250
- addTableSelectionStart(code: string, callback: any, properties?: any): void;
251
- addTableSelectionFinish(code: string, callback: any, properties?: any): void;
252
- addTableGetDataStart(code: string, callback: any, properties?: any): void;
253
- addTableGetDataFinish(code: string, callback: any, properties?: any): void;
264
+ onTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
265
+ onTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
266
+ onTableSelectionStart(code: string, callback: any, properties?: any): void;
267
+ onTableSelectionFinish(code: string, callback: any, properties?: any): void;
268
+ onTableGetDataStart(code: string, callback: any, properties?: any): void;
269
+ onTableGetDataFinish(code: string, callback: any, properties?: any): void;
254
270
  startTableGlobalAction(tableActionEvent: any): Promise<void>;
255
271
  startTableServerGlobalAction(tableActionDetail: any): Promise<void>;
256
272
  finishTableGlobalAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
@@ -270,6 +286,22 @@ export declare class BasicFormComponent {
270
286
  checkSectionRequiredFields(sectionCode: string, reqFieldMessage?: string): boolean;
271
287
  validateSectionConsistency(sectionCode: string, reqFieldMessage?: string): boolean;
272
288
  copyTableRecordToFields(tableObj: any, mappingTable?: any): boolean;
289
+ /**
290
+ * Métodos Legacy de compatibilidad hacia atrás
291
+ */
292
+ addSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
293
+ addSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
294
+ addActionMethodStart(codes: string[] | string | null, callback: any, properties?: any): void;
295
+ addActionMethodFinish(codes: string[] | string | null, callback: any, properties?: any): void;
296
+ addFieldInputValidation(codes: string[] | string | null, callback: any, properties?: any): void;
297
+ addFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
298
+ addFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
299
+ addTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
300
+ addTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
301
+ addTableSelectionStart(code: string, callback: any, properties?: any): void;
302
+ addTableSelectionFinish(code: string, callback: any, properties?: any): void;
303
+ addTableGetDataStart(code: string, callback: any, properties?: any): void;
304
+ addTableGetDataFinish(code: string, callback: any, properties?: any): void;
273
305
  static ɵfac: i0.ɵɵFactoryDeclaration<BasicFormComponent, never>;
274
306
  static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"]>;
275
307
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-ng-forms-lib",
3
- "version": "13.0.12",
3
+ "version": "13.0.14",
4
4
  "description": "Componentes y Clases Angular para la gestión de formularios TUAIN",
5
5
  "author": "Mauricio Méndez, Imix Consulting",
6
6
  "license": "MIT",