tuain-ng-forms-lib 14.0.1 → 14.0.3

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.
Files changed (99) hide show
  1. package/esm2020/lib/classes/forms/action.mjs +35 -0
  2. package/esm2020/lib/classes/forms/element.mjs +76 -0
  3. package/esm2020/lib/classes/forms/field.mjs +321 -0
  4. package/esm2020/lib/classes/forms/form.constants.mjs +26 -0
  5. package/esm2020/lib/classes/forms/form.mjs +422 -0
  6. package/esm2020/lib/classes/forms/section.mjs +132 -0
  7. package/esm2020/lib/classes/forms/subsection.mjs +70 -0
  8. package/esm2020/lib/classes/forms/table/action.mjs +22 -0
  9. package/esm2020/lib/classes/forms/table/column.mjs +61 -0
  10. package/esm2020/lib/classes/forms/table/row-data.mjs +111 -0
  11. package/esm2020/lib/classes/forms/table/table.mjs +372 -0
  12. package/esm2020/lib/components/elements/action.component.mjs +58 -0
  13. package/esm2020/lib/components/elements/field.component.mjs +90 -0
  14. package/esm2020/lib/components/elements/layout/element.component.mjs +31 -0
  15. package/esm2020/lib/components/elements/layout/form-error.component.mjs +20 -0
  16. package/esm2020/lib/components/elements/layout/form-header.component.mjs +30 -0
  17. package/esm2020/lib/components/elements/layout/section.component.mjs +22 -0
  18. package/esm2020/lib/components/elements/layout/sub-section.component.mjs +24 -0
  19. package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +40 -0
  20. package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +25 -0
  21. package/esm2020/lib/components/elements/tables/table.component.mjs +95 -0
  22. package/esm2020/lib/components/forms/basic-form.mjs +1425 -0
  23. package/esm2020/lib/services/event-manager.service.mjs +18 -0
  24. package/esm2020/lib/services/file-manager.service.mjs +6 -0
  25. package/esm2020/lib/services/form-manager.service.mjs +80 -0
  26. package/esm2020/lib/tuain-ng-forms-lib.module.mjs +71 -0
  27. package/esm2020/public-api.mjs +19 -0
  28. package/esm2020/tuain-ng-forms-lib.mjs +5 -0
  29. package/fesm2015/tuain-ng-forms-lib.mjs +3803 -0
  30. package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
  31. package/fesm2020/tuain-ng-forms-lib.mjs +3634 -0
  32. package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -0
  33. package/lib/classes/forms/action.d.ts +22 -0
  34. package/lib/classes/forms/element.d.ts +41 -0
  35. package/lib/classes/forms/field.d.ts +109 -0
  36. package/lib/classes/forms/form.constants.d.ts +25 -0
  37. package/lib/classes/forms/form.d.ts +134 -0
  38. package/lib/classes/forms/section.d.ts +39 -0
  39. package/lib/classes/forms/subsection.d.ts +26 -0
  40. package/lib/classes/forms/table/action.d.ts +20 -0
  41. package/lib/classes/forms/table/column.d.ts +33 -0
  42. package/lib/classes/forms/table/row-data.d.ts +14 -0
  43. package/lib/classes/forms/table/table.d.ts +100 -0
  44. package/lib/components/elements/action.component.d.ts +21 -0
  45. package/lib/components/elements/field.component.d.ts +43 -0
  46. package/lib/components/elements/layout/element.component.d.ts +14 -0
  47. package/lib/components/elements/layout/form-error.component.d.ts +8 -0
  48. package/lib/components/elements/layout/form-header.component.d.ts +12 -0
  49. package/lib/components/elements/layout/section.component.d.ts +10 -0
  50. package/lib/components/elements/layout/sub-section.component.d.ts +11 -0
  51. package/lib/components/elements/tables/table-record-action.component.d.ts +15 -0
  52. package/lib/components/elements/tables/table-record-field.component.d.ts +11 -0
  53. package/lib/components/elements/tables/table.component.d.ts +47 -0
  54. package/lib/components/forms/basic-form.d.ts +307 -0
  55. package/lib/services/event-manager.service.d.ts +9 -0
  56. package/lib/services/file-manager.service.d.ts +5 -0
  57. package/lib/services/form-manager.service.d.ts +28 -0
  58. package/lib/tuain-ng-forms-lib.module.d.ts +20 -0
  59. package/package.json +22 -2
  60. package/{src/public-api.ts → public-api.d.ts} +0 -5
  61. package/tuain-ng-forms-lib.d.ts +5 -0
  62. package/.browserslistrc +0 -16
  63. package/.yarn/cache/nanoid-npm-4.0.0-924f5c6312-7d5946df5c.zip +0 -0
  64. package/.yarn/cache/tslib-npm-2.4.0-9cb6dc5030-8c4aa6a3c5.zip +0 -0
  65. package/.yarn/cache/yn-npm-5.0.0-b001dab23c-f0ec7710d3.zip +0 -0
  66. package/.yarn/install-state.gz +0 -0
  67. package/karma.conf.js +0 -44
  68. package/ng-package.json +0 -11
  69. package/src/lib/classes/forms/action.ts +0 -55
  70. package/src/lib/classes/forms/element.ts +0 -98
  71. package/src/lib/classes/forms/field.ts +0 -408
  72. package/src/lib/classes/forms/form.constants.ts +0 -28
  73. package/src/lib/classes/forms/form.ts +0 -495
  74. package/src/lib/classes/forms/section.ts +0 -154
  75. package/src/lib/classes/forms/subsection.ts +0 -91
  76. package/src/lib/classes/forms/table/action.ts +0 -41
  77. package/src/lib/classes/forms/table/column.ts +0 -91
  78. package/src/lib/classes/forms/table/row-data.ts +0 -118
  79. package/src/lib/classes/forms/table/table.ts +0 -438
  80. package/src/lib/components/elements/action.component.ts +0 -53
  81. package/src/lib/components/elements/field.component.ts +0 -118
  82. package/src/lib/components/elements/layout/element.component.ts +0 -28
  83. package/src/lib/components/elements/layout/form-error.component.ts +0 -11
  84. package/src/lib/components/elements/layout/form-header.component.ts +0 -17
  85. package/src/lib/components/elements/layout/section.component.ts +0 -16
  86. package/src/lib/components/elements/layout/sub-section.component.ts +0 -17
  87. package/src/lib/components/elements/tables/table-record-action.component.ts +0 -37
  88. package/src/lib/components/elements/tables/table-record-field.component.ts +0 -19
  89. package/src/lib/components/elements/tables/table.component.ts +0 -102
  90. package/src/lib/components/forms/basic-form.ts +0 -1496
  91. package/src/lib/services/event-manager.service.ts +0 -21
  92. package/src/lib/services/file-manager.service.ts +0 -6
  93. package/src/lib/services/form-manager.service.ts +0 -89
  94. package/src/lib/services/icon-dictionary.service.ts +0 -159
  95. package/src/lib/tuain-ng-forms-lib.module.ts +0 -40
  96. package/src/test.ts +0 -27
  97. package/tsconfig.lib.json +0 -15
  98. package/tsconfig.lib.prod.json +0 -10
  99. package/tsconfig.spec.json +0 -17
@@ -0,0 +1,10 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SectionComponent implements OnInit {
4
+ section: any;
5
+ formManager: any;
6
+ ngOnInit(): void;
7
+ start(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "lib-section", never, { "section": "section"; "formManager": "formManager"; }, {}, never, ["*"], false>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SubSectionComponent implements OnInit {
4
+ subSection: any;
5
+ showHeader: any;
6
+ formManager: any;
7
+ ngOnInit(): void;
8
+ start(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SubSectionComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SubSectionComponent, "lib-subsection", never, { "subSection": "subSection"; "showHeader": "showHeader"; "formManager": "formManager"; }, {}, never, ["*"], false>;
11
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibTableRecordActionComponent implements OnInit {
4
+ recordId: any;
5
+ recordData: any;
6
+ action: any;
7
+ actionSelected: EventEmitter<object>;
8
+ constructor();
9
+ ngOnInit(): void;
10
+ start(): void;
11
+ onActivate(): void;
12
+ class(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibTableRecordActionComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordActionComponent, "lib-table-record-action", never, { "recordId": "recordId"; "recordData": "recordData"; "action": "action"; }, { "actionSelected": "actionSelected"; }, never, ["*"], false>;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibTableRecordFieldComponent implements OnInit {
4
+ fieldCode: any;
5
+ fieldType: any;
6
+ fieldValue: any;
7
+ ngOnInit(): void;
8
+ start(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibTableRecordFieldComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordFieldComponent, "lib-table-record-field", never, { "fieldCode": "fieldCode"; "fieldType": "fieldType"; "fieldValue": "fieldValue"; }, {}, never, ["*"], false>;
11
+ }
@@ -0,0 +1,47 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { TableRecordData } from '../../../classes/forms/table/row-data';
3
+ import { TableActionEvent } from '../../../classes/forms/table/table';
4
+ import { RecordTable } from '../../../classes/forms/table/table';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LibTableComponent implements OnInit {
7
+ formConfig: any;
8
+ globalFilterString: string;
9
+ code: any;
10
+ columns: any;
11
+ currentPage: number;
12
+ globalSearch: boolean;
13
+ visibleRecords: any[];
14
+ selectedRecords: any[];
15
+ recordsPerPage: any;
16
+ totalRecordsNumber: number;
17
+ allSelected: boolean;
18
+ layout: string;
19
+ tableFieldStyles: any;
20
+ loaded: boolean;
21
+ selectable: boolean;
22
+ hasActions: boolean;
23
+ inlineActions: any;
24
+ globalActions: any;
25
+ selectionActions: any;
26
+ table: RecordTable;
27
+ tableRecords: TableRecordData[];
28
+ disabled: boolean;
29
+ state: string;
30
+ waiting: boolean;
31
+ ngOnInit(): void;
32
+ start(): void;
33
+ updateTableData(): void;
34
+ tableGlobalAction(actionCode: string): void;
35
+ tableSelectionAction(actionCode: string): void;
36
+ tableActionSelected(actionEvent: TableActionEvent): void;
37
+ tableSelectionToggle(recordId: any): void;
38
+ toggleSelectAll(): boolean;
39
+ globalFilterCompleted(): void;
40
+ changePage(requestedPage: number): void;
41
+ tableColumnSort(columnName: string, direction?: any): void;
42
+ globalFilterChanged(): void;
43
+ syncAttribute(name: string, value: any): boolean;
44
+ filterHasChanged(column: any, values: any): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibTableComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibTableComponent, "lib-table", never, { "table": "table"; "tableRecords": "tableRecords"; "disabled": "disabled"; "state": "state"; "waiting": "waiting"; }, {}, never, ["*"], false>;
47
+ }
@@ -0,0 +1,307 @@
1
+ import { FormStructureAndData } from '../../classes/forms/form';
2
+ import { LibFormManagerService } from '../../services/form-manager.service';
3
+ import { LibEventManagerService } from '../../services/event-manager.service';
4
+ import { LibFileManagementService } from '../../services/file-manager.service';
5
+ import { FormAction } from '../../classes/forms/action';
6
+ import { FieldDescriptor, FieldOption } from '../../classes/forms/field';
7
+ import { RecordTable } from '../../classes/forms/table/table';
8
+ import { RecordFormSection } from '../../classes/forms/section';
9
+ import { RecordFormSubSection } from '../../classes/forms/subsection';
10
+ import * as i0 from "@angular/core";
11
+ export declare class BasicFormComponent {
12
+ protected formManagerService: LibFormManagerService;
13
+ protected _eventManager: LibEventManagerService;
14
+ protected fileMgmtServices: LibFileManagementService;
15
+ private _formStructure;
16
+ private _controlToken;
17
+ private _originToken;
18
+ private _formRoute;
19
+ private _definitionObtained;
20
+ private _formSectionsActivate;
21
+ private _formSectionsInactivate;
22
+ private _formActionsStart;
23
+ private _formActionsFinish;
24
+ private _fieldInputValidation;
25
+ private _fieldValidationsStart;
26
+ private _fieldValidationsFinish;
27
+ private _tableSelectionsStart;
28
+ private _tableSelectionsFinish;
29
+ private _tableActionsStart;
30
+ private _tableActionsFinish;
31
+ private _tableGetDataStart;
32
+ private _tableGetDataFinish;
33
+ private _actionServerError;
34
+ private _fieldServerError;
35
+ private _tableServerError;
36
+ protected inputDataFields: any;
37
+ protected extraData: any;
38
+ protected _eventEmiter: LibEventManagerService;
39
+ protected enabledSections: RecordFormSection[];
40
+ formConfig: any;
41
+ name: string | null;
42
+ formSubject: string | null;
43
+ _errorType: string;
44
+ errorCode: string;
45
+ errorFullCode: string;
46
+ errorName: string;
47
+ errorMessage: string;
48
+ errorDetail: string;
49
+ visible: boolean;
50
+ fields: any;
51
+ actions: any;
52
+ sections: any;
53
+ busy: boolean;
54
+ getTitle(): string;
55
+ setTitle(title: string): void;
56
+ cleanData(): void;
57
+ getCurrentState(): string;
58
+ supportState(state: string | null): boolean;
59
+ changeState(state: any): boolean;
60
+ getStates(): any[];
61
+ getImmutableElement(name: string): any;
62
+ getExtraInfo(name: string): any;
63
+ getFields(): FieldDescriptor[];
64
+ getFieldNames(): string[];
65
+ getField(code: string): FieldDescriptor;
66
+ enableField(code: string): void;
67
+ disableField(code: string): void;
68
+ getFieldValue(code: string): any;
69
+ getFieldOptionText(code: string): any;
70
+ getFieldsValues(codes: string[]): any;
71
+ getFieldOptions(code: string): FieldOption[] | null;
72
+ setFieldValue(code: string, value: any): any;
73
+ setFieldRequired(code: string, required: boolean): any;
74
+ setFieldErrorMessage(code: string, errorMessage: string): any;
75
+ setFieldError(code: string, errorCode: string, message: string, type?: string): any;
76
+ setFieldIntrinsicErrorMessage(code: string, message: string): any;
77
+ setFieldOptions(code: any, optionsArray: any, idAttribute: any, nameAttribute: any): any;
78
+ getFieldSet(filterFunc?: any, codes?: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
79
+ applyOnFields(processFunc: any, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
80
+ applyProcessToAllFields(processFunc: any): number;
81
+ cleanFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
82
+ getRequiredFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
83
+ getRequiredEmptyFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
84
+ getChangedFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
85
+ getFieldsWithValidationIssues(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
86
+ tagFieldsWithError(errorMessage: string, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
87
+ cleanErrorFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
88
+ showLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
89
+ hideLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
90
+ enableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
91
+ disableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
92
+ /**
93
+ * @deprecated Use enableFields
94
+ */
95
+ enableEditFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
96
+ /**
97
+ * @deprecated Use disableFields
98
+ */
99
+ disableEditFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
100
+ showFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
101
+ hideFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
102
+ getActionsByAttribute(name: string, value: any): FormAction[];
103
+ getHeaderActions(): FormAction[];
104
+ getAction(actionCode: string): FormAction | null;
105
+ showActions(actionArray: any): void;
106
+ hideActions(actionArray: any): void;
107
+ enableActions(actionArray: any): void;
108
+ disableActions(actionArray: any): void;
109
+ showAction(code: string): void;
110
+ hideAction(code: string): void;
111
+ enableAction(code: string): void;
112
+ disableAction(code: string): void;
113
+ getSections(): RecordFormSection[] | null;
114
+ activateSection(code: any): void;
115
+ getSectionsTitles(): string[] | null;
116
+ getSection(code: string): RecordFormSection | null;
117
+ showSection(code: string): void;
118
+ hideSection(code: string): void;
119
+ showSections(codes: string[] | string): void;
120
+ hideSections(codes: string[] | string): void;
121
+ getSubSection(code: string, subCode: string): RecordFormSubSection | null;
122
+ showSubSection(code: string, subCode: string): void;
123
+ hideSubSection(code: string, subCode: string): void;
124
+ showSubSections(code: string, subCodes: string[] | string): void;
125
+ hideSubSections(code: string, subCodes: string[] | string): void;
126
+ getSectionActions(code: string): FormAction[] | null;
127
+ getSectionActionNames(code: string): string[] | null;
128
+ getTables(): RecordTable[];
129
+ showTables(codes: string[] | string): void;
130
+ hideTables(codes: string[] | string): void;
131
+ cleanTables(codes: string[] | string): void;
132
+ getTable(code: string): RecordTable;
133
+ showTable(code: string): void;
134
+ hideTable(code: string): void;
135
+ cleanTable(code: string): void;
136
+ getTableRecord(code: string, recordId: any): import("../../classes/forms/table/row-data").TableRecordData;
137
+ constructor(formManagerService: LibFormManagerService, _eventManager: LibEventManagerService, fileMgmtServices: LibFileManagementService);
138
+ setConfig(formConfig: any): void;
139
+ cleanStart(): void;
140
+ get formVisible(): boolean;
141
+ get formManager(): this;
142
+ get formCode(): string;
143
+ set formCode(name: string);
144
+ get inServerProcess(): boolean;
145
+ get form(): FormStructureAndData | null;
146
+ get state(): string | null;
147
+ get currentState(): string;
148
+ set currentState(state: string);
149
+ get immutableData(): any;
150
+ get extraInfo(): any;
151
+ get visibleSections(): RecordFormSection[] | null;
152
+ get formRoute(): string;
153
+ set formRoute(route: string);
154
+ get subject(): string;
155
+ customPreProcessing(): void;
156
+ customFormStart(): void;
157
+ displayActionServerError(): void;
158
+ displayValidationServerError(): void;
159
+ displayTableServerError(): void;
160
+ showFieldInfo(fieldCode?: string, detail?: any): void;
161
+ showModalDialog(title: any, body: any, options: any, callback?: any, params?: any): void;
162
+ openUploadDialog(title: any, body: any, options: any, callback?: any, params?: any): void;
163
+ /**
164
+ * @deprecated Use supportState
165
+ */
166
+ supportMode(state: string): boolean;
167
+ /**
168
+ * @deprecated Use getField
169
+ */
170
+ getFieldObject(code: string): FieldDescriptor | null;
171
+ /**
172
+ * @deprecated Use getAction
173
+ */
174
+ getActionObject(code: string): FormAction | null;
175
+ /**
176
+ * @deprecated Use getTable
177
+ */
178
+ getTableObject(code: string): RecordTable | null;
179
+ /**
180
+ * @deprecated Use getSection
181
+ */
182
+ getSectionObject(code: string): RecordFormSection | null;
183
+ /**
184
+ * @deprecated Use changeState
185
+ */
186
+ changeFormMode(state: string): boolean;
187
+ /**
188
+ * @deprecated Use subject
189
+ */
190
+ getFormSubject(): string;
191
+ /**
192
+ * @deprecated Use subject
193
+ */
194
+ getSubject(): string;
195
+ /**
196
+ * @deprecated Use subject
197
+ */
198
+ getformSubject(): string;
199
+ numSections(): number;
200
+ subscribeAppEvent(eventName: string, callback: any): void;
201
+ openForm(name: string, data?: any, backData?: any, cleanStack?: boolean): void;
202
+ canGoBack(): boolean;
203
+ goBack(): void;
204
+ goBackForm(): void;
205
+ getOriginDetail(): any;
206
+ setError(errorType: string | null, errorMessage: string | null, errorDetail: string | null): void;
207
+ resetError(): void;
208
+ getErrorType(): string;
209
+ getErrorMessage(): string;
210
+ getErrorDetail(): string;
211
+ getErrorName(): string;
212
+ getErrorFullCode(): string;
213
+ getErrorCode(): string;
214
+ getFormParameter(name: string): string;
215
+ preocessInputParams(params: any): string | null;
216
+ subscribeSectionActivation(): void;
217
+ subscribeFieldsSubjects(): void;
218
+ subscribeActionSubjects(): void;
219
+ subscribeTableSubjects(): void;
220
+ formInit(params: any): Promise<void>;
221
+ checkErrorRecordReceived(recordResponse: any): boolean;
222
+ errorOccured(): boolean;
223
+ /**
224
+ * Soporte manejo de eventos de formulario
225
+ */
226
+ requestFormAction(actionCode: string, actionSubject?: any): Promise<any>;
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;
237
+ /**
238
+ * Manejo de event handlers para acciones sobre el formulario
239
+ */
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;
244
+ launchSectionActivation(code: string): Promise<void>;
245
+ launchSectionInactivation(code: string): Promise<void>;
246
+ startAction(code: string): Promise<void>;
247
+ startServerAction(actionInput: any): Promise<void>;
248
+ finishAction(action: any, actionResult: any, serverError?: boolean): Promise<void>;
249
+ completeGlobalAction(action: any): Promise<void>;
250
+ /**
251
+ * Manejadores de eventos para validaciones sobre campos
252
+ */
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;
256
+ startFieldInputValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<boolean>;
257
+ startFieldValidation(fieldCode: string, intrinsicValidation?: boolean): Promise<void>;
258
+ startServerFieldValidation(inputField: string | FieldDescriptor): Promise<void>;
259
+ finishFieldValidation(fieldObject: any, validationResult: boolean, serverError?: boolean): Promise<void>;
260
+ continueFieldValidation(fieldCode: string): Promise<void>;
261
+ /**
262
+ * Manejadores de eventos para acciones sobre Tablas
263
+ */
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;
270
+ startTableGlobalAction(tableActionEvent: any): Promise<void>;
271
+ startTableServerGlobalAction(tableActionDetail: any): Promise<void>;
272
+ finishTableGlobalAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
273
+ startTableAction(tableActionEvent: any): Promise<void>;
274
+ startTableServerAction(tableActionDetail: any): Promise<void>;
275
+ completeInlineAction(tableAction: any): Promise<void>;
276
+ finishTableAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
277
+ startTableRecordSelection(tableActionEvent: any): Promise<void>;
278
+ startTableServerRecordSelection(tableSelectionDetail: any): Promise<void>;
279
+ finishTableRecordSelection(tableSelectionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
280
+ startTableSelectionAction(tableActionEvent: any): Promise<void>;
281
+ startTableServerSelectionAction(tableActionDetail: any): Promise<void>;
282
+ finishTableSelectionAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
283
+ startTableGetData(tableActionEvent: any): Promise<void>;
284
+ startTableServerGetData(tableActionDetail: any): Promise<void>;
285
+ finishTableGetData(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
286
+ checkSectionRequiredFields(sectionCode: string, reqFieldMessage?: string): boolean;
287
+ validateSectionConsistency(sectionCode: string, reqFieldMessage?: string): boolean;
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;
305
+ static ɵfac: i0.ɵɵFactoryDeclaration<BasicFormComponent, never>;
306
+ static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"], false>;
307
+ }
@@ -0,0 +1,9 @@
1
+ export declare class LibEventManagerService {
2
+ eventSubjects: any;
3
+ constructor(eventNames: any);
4
+ addEventName(name: any): void;
5
+ getEventNames(): string[];
6
+ getSubject(eventClassName: any): any;
7
+ subscribe(eventClassName: any, callback: any): void;
8
+ next(eventClassName: any, data: any): void;
9
+ }
@@ -0,0 +1,5 @@
1
+ export declare class LibFileManagementService {
2
+ openFile(fileBase64Data: any, fileName: any, fileType: any): void;
3
+ saveFileFromURL(fileUrl: any, fullFileName?: any): void;
4
+ saveFile(fileBase64Data: any, fileName: any, fileType: any): void;
5
+ }
@@ -0,0 +1,28 @@
1
+ export declare class LibFormManagerService {
2
+ pageStack: any[];
3
+ constructor();
4
+ getFormDefinition(formCode: any): void;
5
+ execServerAction(actionDetail: any): void;
6
+ goToForm(formCode: any, token: any, subject: any): void;
7
+ loadStack(): void;
8
+ saveStack(): void;
9
+ cleanStack(): void;
10
+ resetPageStack(): void;
11
+ findFormInStack(token: any): {
12
+ index: number;
13
+ data: any;
14
+ };
15
+ replaceItem(token: any, formInfo: any): void;
16
+ stack(origin: any, target: any): string;
17
+ unstack(token?: any): any;
18
+ getFormInfo(token: string): {
19
+ token: any;
20
+ subject: any;
21
+ state: any;
22
+ originToken: any;
23
+ fields: any;
24
+ extra: any;
25
+ };
26
+ openForm(origin: any, target: any): void;
27
+ backTo(targetToken?: any): void;
28
+ }
@@ -0,0 +1,20 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/forms/basic-form";
3
+ import * as i2 from "./components/elements/action.component";
4
+ import * as i3 from "./components/elements/field.component";
5
+ import * as i4 from "./components/elements/layout/element.component";
6
+ import * as i5 from "./components/elements/layout/form-error.component";
7
+ import * as i6 from "./components/elements/layout/form-header.component";
8
+ import * as i7 from "./components/elements/layout/section.component";
9
+ import * as i8 from "./components/elements/layout/sub-section.component";
10
+ import * as i9 from "./components/elements/tables/table-record-action.component";
11
+ import * as i10 from "./components/elements/tables/table-record-field.component";
12
+ import * as i11 from "./components/elements/tables/table.component";
13
+ import * as i12 from "@angular/common";
14
+ import * as i13 from "@angular/router";
15
+ import * as i14 from "@angular/forms";
16
+ export declare class TuainNgFormsLibModule {
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuainNgFormsLibModule, never>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TuainNgFormsLibModule, [typeof i1.BasicFormComponent, typeof i2.ActionComponent, typeof i3.FieldComponent, typeof i4.ElementComponent, typeof i5.FormErrorComponent, typeof i6.FormHeaderComponent, typeof i7.SectionComponent, typeof i8.SubSectionComponent, typeof i9.LibTableRecordActionComponent, typeof i10.LibTableRecordFieldComponent, typeof i11.LibTableComponent], [typeof i12.CommonModule, typeof i13.RouterModule, typeof i14.FormsModule], [typeof i1.BasicFormComponent, typeof i2.ActionComponent, typeof i3.FieldComponent, typeof i4.ElementComponent, typeof i5.FormErrorComponent, typeof i6.FormHeaderComponent, typeof i7.SectionComponent, typeof i8.SubSectionComponent, typeof i9.LibTableRecordActionComponent, typeof i10.LibTableRecordFieldComponent, typeof i11.LibTableComponent]>;
19
+ static ɵinj: i0.ɵɵInjectorDeclaration<TuainNgFormsLibModule>;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-ng-forms-lib",
3
- "version": "14.0.1",
3
+ "version": "14.0.3",
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",
@@ -22,5 +22,25 @@
22
22
  "nanoid": "^4.0.0",
23
23
  "tslib": "^2.4.0",
24
24
  "yn": "^5.0.0"
25
- }
25
+ },
26
+ "module": "fesm2015/tuain-ng-forms-lib.mjs",
27
+ "es2020": "fesm2020/tuain-ng-forms-lib.mjs",
28
+ "esm2020": "esm2020/tuain-ng-forms-lib.mjs",
29
+ "fesm2020": "fesm2020/tuain-ng-forms-lib.mjs",
30
+ "fesm2015": "fesm2015/tuain-ng-forms-lib.mjs",
31
+ "typings": "tuain-ng-forms-lib.d.ts",
32
+ "exports": {
33
+ "./package.json": {
34
+ "default": "./package.json"
35
+ },
36
+ ".": {
37
+ "types": "./tuain-ng-forms-lib.d.ts",
38
+ "esm2020": "./esm2020/tuain-ng-forms-lib.mjs",
39
+ "es2020": "./fesm2020/tuain-ng-forms-lib.mjs",
40
+ "es2015": "./fesm2015/tuain-ng-forms-lib.mjs",
41
+ "node": "./fesm2015/tuain-ng-forms-lib.mjs",
42
+ "default": "./fesm2020/tuain-ng-forms-lib.mjs"
43
+ }
44
+ },
45
+ "sideEffects": false
26
46
  }
@@ -1,7 +1,3 @@
1
- /*
2
- * Public API Surface of tuain-ng-forms-lib
3
- */
4
-
5
1
  export * from './lib/components/elements/action.component';
6
2
  export * from './lib/components/elements/field.component';
7
3
  export * from './lib/components/elements/layout/element.component';
@@ -17,4 +13,3 @@ export * from './lib/services/event-manager.service';
17
13
  export * from './lib/services/form-manager.service';
18
14
  export * from './lib/services/file-manager.service';
19
15
  export * from './lib/tuain-ng-forms-lib.module';
20
-
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="tuain-ng-forms-lib" />
5
+ export * from './public-api';
package/.browserslistrc DELETED
@@ -1,16 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
7
-
8
- # You can see what browsers were selected by your queries by running:
9
- # npx browserslist
10
-
11
- last 1 Chrome version
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- last 2 Safari major versions
15
- last 2 iOS major versions
16
- Firefox ESR
Binary file
package/karma.conf.js DELETED
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/tuain-ng-forms-lib'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
package/ng-package.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/tuain-ng-forms-lib",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- },
7
- "allowedNonPeerDependencies": [
8
- "nanoid",
9
- "yn"
10
- ]
11
- }