tuain-ng-forms-lib 17.2.20 → 17.2.22

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 (106) hide show
  1. package/.browserslistrc +16 -0
  2. package/.yarn/cache/nanoid-npm-4.0.0-924f5c6312-7d5946df5c.zip +0 -0
  3. package/.yarn/cache/tslib-npm-2.4.1-36f0ed04db-19480d6e03.zip +0 -0
  4. package/.yarn/cache/yn-npm-5.0.0-b001dab23c-f0ec7710d3.zip +0 -0
  5. package/.yarn/install-state.gz +0 -0
  6. package/karma.conf.js +44 -0
  7. package/ng-package.json +11 -0
  8. package/package.json +2 -16
  9. package/src/lib/classes/forms/action.ts +117 -0
  10. package/src/lib/classes/forms/element.ts +26 -0
  11. package/src/lib/classes/forms/field.ts +522 -0
  12. package/src/lib/classes/forms/form.constants.ts +28 -0
  13. package/src/lib/classes/forms/form.ts +692 -0
  14. package/src/lib/classes/forms/piece-propagate.ts +47 -0
  15. package/src/lib/classes/forms/piece.ts +164 -0
  16. package/src/lib/classes/forms/section.ts +165 -0
  17. package/src/lib/classes/forms/subsection.ts +109 -0
  18. package/src/lib/classes/forms/table/action.ts +41 -0
  19. package/src/lib/classes/forms/table/column.ts +94 -0
  20. package/src/lib/classes/forms/table/row-data.ts +121 -0
  21. package/src/lib/classes/forms/table/table.ts +582 -0
  22. package/src/lib/components/elements/action.component.ts +70 -0
  23. package/src/lib/components/elements/field.component.ts +115 -0
  24. package/src/lib/components/elements/layout/element.component.ts +14 -0
  25. package/src/lib/components/elements/layout/form-error.component.ts +11 -0
  26. package/src/lib/components/elements/layout/form-header.component.ts +14 -0
  27. package/src/lib/components/elements/layout/piece.component.ts +60 -0
  28. package/src/lib/components/elements/layout/section.component.ts +52 -0
  29. package/src/lib/components/elements/layout/sub-section.component.ts +52 -0
  30. package/src/lib/components/elements/tables/table-record-action.component.ts +66 -0
  31. package/src/lib/components/elements/tables/table-record-field.component.ts +20 -0
  32. package/src/lib/components/elements/tables/table.component.ts +112 -0
  33. package/src/lib/components/forms/basic-form.ts +1464 -0
  34. package/src/lib/services/event-manager.service.ts +45 -0
  35. package/src/lib/services/file-manager.service.ts +7 -0
  36. package/src/lib/services/form-manager.service.ts +89 -0
  37. package/src/lib/services/icon-dictionary.service.ts +159 -0
  38. package/src/lib/tuain-ng-forms-lib.module.ts +40 -0
  39. package/{public-api.d.ts → src/public-api.ts} +5 -0
  40. package/src/test.ts +27 -0
  41. package/tsconfig.lib.json +15 -0
  42. package/tsconfig.lib.prod.json +10 -0
  43. package/tsconfig.spec.json +17 -0
  44. package/esm2022/lib/classes/forms/action.mjs +0 -106
  45. package/esm2022/lib/classes/forms/element.mjs +0 -25
  46. package/esm2022/lib/classes/forms/field.mjs +0 -473
  47. package/esm2022/lib/classes/forms/form.constants.mjs +0 -26
  48. package/esm2022/lib/classes/forms/form.mjs +0 -608
  49. package/esm2022/lib/classes/forms/piece-propagate.mjs +0 -39
  50. package/esm2022/lib/classes/forms/piece.mjs +0 -134
  51. package/esm2022/lib/classes/forms/section.mjs +0 -151
  52. package/esm2022/lib/classes/forms/subsection.mjs +0 -99
  53. package/esm2022/lib/classes/forms/table/action.mjs +0 -38
  54. package/esm2022/lib/classes/forms/table/column.mjs +0 -74
  55. package/esm2022/lib/classes/forms/table/row-data.mjs +0 -116
  56. package/esm2022/lib/classes/forms/table/table.mjs +0 -541
  57. package/esm2022/lib/components/elements/action.component.mjs +0 -70
  58. package/esm2022/lib/components/elements/field.component.mjs +0 -115
  59. package/esm2022/lib/components/elements/layout/element.component.mjs +0 -21
  60. package/esm2022/lib/components/elements/layout/form-error.component.mjs +0 -23
  61. package/esm2022/lib/components/elements/layout/form-header.component.mjs +0 -23
  62. package/esm2022/lib/components/elements/layout/piece.component.mjs +0 -64
  63. package/esm2022/lib/components/elements/layout/section.component.mjs +0 -56
  64. package/esm2022/lib/components/elements/layout/sub-section.component.mjs +0 -56
  65. package/esm2022/lib/components/elements/tables/table-record-action.component.mjs +0 -72
  66. package/esm2022/lib/components/elements/tables/table-record-field.component.mjs +0 -31
  67. package/esm2022/lib/components/elements/tables/table.component.mjs +0 -109
  68. package/esm2022/lib/components/forms/basic-form.mjs +0 -1399
  69. package/esm2022/lib/services/event-manager.service.mjs +0 -43
  70. package/esm2022/lib/services/file-manager.service.mjs +0 -7
  71. package/esm2022/lib/services/form-manager.service.mjs +0 -81
  72. package/esm2022/lib/tuain-ng-forms-lib.module.mjs +0 -71
  73. package/esm2022/public-api.mjs +0 -19
  74. package/esm2022/tuain-ng-forms-lib.mjs +0 -5
  75. package/fesm2022/tuain-ng-forms-lib.mjs +0 -4598
  76. package/fesm2022/tuain-ng-forms-lib.mjs.map +0 -1
  77. package/index.d.ts +0 -5
  78. package/lib/classes/forms/action.d.ts +0 -40
  79. package/lib/classes/forms/element.d.ts +0 -9
  80. package/lib/classes/forms/field.d.ts +0 -206
  81. package/lib/classes/forms/form.constants.d.ts +0 -25
  82. package/lib/classes/forms/form.d.ts +0 -232
  83. package/lib/classes/forms/piece-propagate.d.ts +0 -13
  84. package/lib/classes/forms/piece.d.ts +0 -51
  85. package/lib/classes/forms/section.d.ts +0 -43
  86. package/lib/classes/forms/subsection.d.ts +0 -42
  87. package/lib/classes/forms/table/action.d.ts +0 -16
  88. package/lib/classes/forms/table/column.d.ts +0 -33
  89. package/lib/classes/forms/table/row-data.d.ts +0 -14
  90. package/lib/classes/forms/table/table.d.ts +0 -145
  91. package/lib/components/elements/action.component.d.ts +0 -22
  92. package/lib/components/elements/field.component.d.ts +0 -47
  93. package/lib/components/elements/layout/element.component.d.ts +0 -8
  94. package/lib/components/elements/layout/form-error.component.d.ts +0 -8
  95. package/lib/components/elements/layout/form-header.component.d.ts +0 -9
  96. package/lib/components/elements/layout/piece.component.d.ts +0 -18
  97. package/lib/components/elements/layout/section.component.d.ts +0 -13
  98. package/lib/components/elements/layout/sub-section.component.d.ts +0 -13
  99. package/lib/components/elements/tables/table-record-action.component.d.ts +0 -18
  100. package/lib/components/elements/tables/table-record-field.component.d.ts +0 -12
  101. package/lib/components/elements/tables/table.component.d.ts +0 -44
  102. package/lib/components/forms/basic-form.d.ts +0 -256
  103. package/lib/services/event-manager.service.d.ts +0 -11
  104. package/lib/services/file-manager.service.d.ts +0 -6
  105. package/lib/services/form-manager.service.d.ts +0 -28
  106. package/lib/tuain-ng-forms-lib.module.d.ts +0 -20
@@ -1,256 +0,0 @@
1
- import { OnInit, OnDestroy } from '@angular/core';
2
- import { FormStructureAndData } from '../../classes/forms/form';
3
- import { LibFormManagerService } from '../../services/form-manager.service';
4
- import { LibEventManagerService } from '../../services/event-manager.service';
5
- import { LibFileManagementService } from '../../services/file-manager.service';
6
- import { FieldDescriptor } from '../../classes/forms/field';
7
- import { RecordFormSection } from '../../classes/forms/section';
8
- import * as i0 from "@angular/core";
9
- export declare class BasicFormComponent extends FormStructureAndData implements OnInit, OnDestroy {
10
- protected formManagerService: LibFormManagerService;
11
- protected _eventManager: LibEventManagerService;
12
- protected fileMgmtServices: LibFileManagementService;
13
- private destroy$;
14
- private _controlToken;
15
- private _originToken;
16
- private _formRoute;
17
- private _definitionObtained;
18
- private _notifyFormActivity;
19
- private _formChangeState;
20
- private _formSectionsCanDeactivate;
21
- private _formSectionsActivate;
22
- private _formSectionsInactivate;
23
- private _formActionsStart;
24
- private _formActionsFinish;
25
- private _fieldCustomeEvent;
26
- private _fieldInputValidation;
27
- private _fieldValidationsStart;
28
- private _fieldValidationsFinish;
29
- private _tableSelectionsStart;
30
- private _tableSelectionsFinish;
31
- private _tableActionsStart;
32
- private _tableActionsFinish;
33
- private _tableGetDataStart;
34
- private _tableGetDataFinish;
35
- private _actionServerError;
36
- private _fieldServerError;
37
- private _tableServerError;
38
- private _actionsInProgress;
39
- protected inputDataFields: any;
40
- protected extraData: any;
41
- protected _eventEmiter: LibEventManagerService;
42
- protected enabledSections: RecordFormSection[];
43
- _errorType: string;
44
- errorCode: string;
45
- errorFullCode: string;
46
- errorName: string;
47
- errorMessage: string;
48
- errorDetail: string;
49
- visible: boolean;
50
- busy: import("@angular/core").WritableSignal<boolean>;
51
- constructor(formManagerService: LibFormManagerService, _eventManager: LibEventManagerService, fileMgmtServices: LibFileManagementService);
52
- cleanStart(): void;
53
- get formVisible(): boolean;
54
- get form(): this;
55
- ngOnInit(): void;
56
- preStart(): void;
57
- start(): void;
58
- /**
59
- * @deprecated Use preStart
60
- */
61
- customPreProcessing(): void;
62
- /**
63
- * @deprecated Overload start
64
- */
65
- customFormStart(): void;
66
- displayActionServerError(): void;
67
- displayValidationServerError(): void;
68
- displayTableServerError(): void;
69
- showFieldInfo(code?: string, detail?: any): void;
70
- showModalDialog(title: any, body: any, options: any, callback?: any, params?: any): void;
71
- openUploadDialog(title: any, body: any, options: any, callback?: any, params?: any): void;
72
- subscribeAppEvent(eventName: string, callback: any): void;
73
- openForm(name: string, data?: any, backData?: any, cleanStack?: boolean): void;
74
- enableActivityNotification(): void;
75
- disableActivityNotification(): void;
76
- canGoBack(): boolean;
77
- goBack(): void;
78
- goBackForm(): void;
79
- getOriginDetail(): any;
80
- setError(errorType: string | null, errorMessage: string | null, errorDetail: string | null): void;
81
- resetError(): void;
82
- getErrorType(): string;
83
- getErrorMessage(): string;
84
- getErrorDetail(): string;
85
- getErrorName(): string;
86
- getErrorFullCode(): string;
87
- getErrorCode(): string;
88
- getFormParameter(name: string): string;
89
- preocessInputParams(params: any): string | null;
90
- subscribeSectionActivation(): void;
91
- subscribeFieldsSubjects(): void;
92
- subscribeActionSubjects(): void;
93
- subscribeTableSubjects(): void;
94
- formInit(params: any, forceReload?: boolean): Promise<void>;
95
- changeState(state: string | undefined): boolean;
96
- checkErrorRecordReceived(recordResponse: any): boolean;
97
- errorOccured(): boolean;
98
- /**
99
- * Soporte manejo de eventos de formulario
100
- */
101
- requestFormAction(actionCode: string, actionSubject?: any): Promise<any>;
102
- updateFormWithServerData(formContent: any): void;
103
- /**
104
- * Manejo de event handlers para errores Server del formulario
105
- */
106
- cleanActionServerError(): void;
107
- cleanFieldServerError(): void;
108
- cleanTableServerError(): void;
109
- onActionServerError(callback: any, properties?: any): void;
110
- onValidationServerError(callback: any, properties?: any): void;
111
- onTableServerError(callback: any, properties?: any): void;
112
- /**
113
- * Manejo de event handlers para acciones sobre el formulario
114
- */
115
- onFormChange(callback: any): void;
116
- onSectionCanDeactivate(codes: string[] | string | null, callback: any, properties?: any): void;
117
- onSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
118
- onSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
119
- onActionStart(codes: string[] | string | null, callback: any, properties?: any): void;
120
- onActionFinish(codes: string[] | string | null, callback: any, properties?: any): void;
121
- verifySectionActivation(code: string): Promise<boolean>;
122
- launchSectionActivation(code: string): Promise<void>;
123
- launchSectionInactivation(code: string): Promise<void>;
124
- startAction(code: string): Promise<void>;
125
- startServerAction(actionInput: any): Promise<void>;
126
- finishAction(action: any, actionResult: any, serverError?: boolean): Promise<void>;
127
- completeGlobalAction(action: any): Promise<void>;
128
- /**
129
- * Manejadores de eventos para validaciones sobre campos
130
- */
131
- onFieldInput(codes: string[] | string | null, callback: any, properties?: any): void;
132
- onFieldCustomEvent(codes: string[] | string | null, callback: any, properties?: any): void;
133
- onFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
134
- onFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
135
- startFieldInputValidation(code: string, intrinsicValidation?: boolean): Promise<boolean>;
136
- startFieldCustomEvent(code: string, eventName: string, eventData: any): Promise<void>;
137
- startFieldValidation(code: string, intrinsicValidation?: boolean): Promise<void>;
138
- startServerFieldValidation(inputField: string | FieldDescriptor): Promise<void>;
139
- finishFieldValidation(fieldObject: any, validationResult: boolean, serverError?: boolean): Promise<void>;
140
- continueFieldValidation(code: string): Promise<void>;
141
- /**
142
- * Manejadores de eventos para acciones sobre Tablas
143
- */
144
- onTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
145
- onTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
146
- onTableSelectionStart(code: string, callback: any, properties?: any): void;
147
- onTableSelectionFinish(code: string, callback: any, properties?: any): void;
148
- onTableGetDataStart(code: string, callback: any, properties?: any): void;
149
- onTableGetDataFinish(code: string, callback: any, properties?: any): void;
150
- startTableGlobalAction(tableActionEvent: any): Promise<void>;
151
- startTableServerGlobalAction(tableActionDetail: any): Promise<void>;
152
- finishTableGlobalAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
153
- startTableAction(tableActionEvent: any): Promise<void>;
154
- startTableServerAction(tableActionDetail: any): Promise<void>;
155
- completeInlineAction(tableAction: any): Promise<void>;
156
- finishTableAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
157
- startTableRecordSelection(tableActionEvent: any): Promise<void>;
158
- startTableServerRecordSelection(tableSelectionDetail: any): Promise<void>;
159
- finishTableRecordSelection(tableSelectionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
160
- startTableSelectionAction(tableActionEvent: any): Promise<void>;
161
- startTableServerSelectionAction(tableActionDetail: any): Promise<void>;
162
- finishTableSelectionAction(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
163
- startTableGetData(tableActionEvent: any): Promise<void>;
164
- startTableServerGetData(tableActionDetail: any): Promise<void>;
165
- finishTableGetData(tableActionDetail: any, actionResult: any, serverError?: boolean): Promise<void>;
166
- checkSectionRequiredFields(sectionCode: string, reqFieldMessage?: string): boolean;
167
- validateSectionConsistency(sectionCode: string, reqFieldMessage?: string): boolean;
168
- copyTableRecordToFields(tableObj: any, mappingTable?: any): boolean;
169
- notifyFormActivity(): void;
170
- /**
171
- * Métodos Legacy de compatibilidad hacia atrás
172
- */
173
- /**
174
- * @deprecated Use name
175
- */
176
- get formCode(): string;
177
- /**
178
- * @deprecated Use name
179
- */
180
- set formCode(name: string);
181
- /**
182
- * @deprecated Use busy signal
183
- */
184
- get inServerProcess(): boolean;
185
- /**
186
- * @deprecated Use state
187
- */
188
- get currentState(): string;
189
- /**
190
- * @deprecated Use changeState
191
- */
192
- set currentState(state: string);
193
- /**
194
- * @deprecated Use onSectionActivation
195
- */
196
- get formRoute(): string;
197
- /**
198
- * @deprecated Use onSectionActivation
199
- */
200
- set formRoute(route: string);
201
- /**
202
- * @deprecated Use onSectionActivation
203
- */
204
- addSectionActivation(codes: string[] | string | null, callback: any, properties?: any): void;
205
- /**
206
- * @deprecated Use onSectionInactivation
207
- */
208
- addSectionInactivation(codes: string[] | string | null, callback: any, properties?: any): void;
209
- /**
210
- * @deprecated Use onActionStart
211
- */
212
- addActionMethodStart(codes: string[] | string | null, callback: any, properties?: any): void;
213
- /**
214
- * @deprecated Use onActionFinish
215
- */
216
- addActionMethodFinish(codes: string[] | string | null, callback: any, properties?: any): void;
217
- /**
218
- * @deprecated Use onFieldInput
219
- */
220
- addFieldInputValidation(codes: string[] | string | null, callback: any, properties?: any): void;
221
- /**
222
- * @deprecated Use onFieldValidationStart
223
- */
224
- addFieldValidationStart(codes: string[] | string | null, callback: any, properties?: any): void;
225
- /**
226
- * @deprecated Use onFieldValidationFinish
227
- */
228
- addFieldValidationFinish(codes: string[] | string | null, callback: any, properties?: any): void;
229
- /**
230
- * @deprecated Use onTableActionStart
231
- */
232
- addTableActionStart(code: string, actionCode: string, callback: any, properties?: any): void;
233
- /**
234
- * @deprecated Use onTableActionFinish
235
- */
236
- addTableActionFinish(code: string, actionCode: string, callback: any, properties?: any): void;
237
- /**
238
- * @deprecated Use onTableSelectionStart
239
- */
240
- addTableSelectionStart(code: string, callback: any, properties?: any): void;
241
- /**
242
- * @deprecated Use onTableSelectionFinish
243
- */
244
- addTableSelectionFinish(code: string, callback: any, properties?: any): void;
245
- /**
246
- * @deprecated Use onTableGetDataStart
247
- */
248
- addTableGetDataStart(code: string, callback: any, properties?: any): void;
249
- /**
250
- * @deprecated Use onTableGetDataFinish
251
- */
252
- addTableGetDataFinish(code: string, callback: any, properties?: any): void;
253
- ngOnDestroy(): void;
254
- static ɵfac: i0.ɵɵFactoryDeclaration<BasicFormComponent, never>;
255
- static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"], false, never>;
256
- }
@@ -1,11 +0,0 @@
1
- export declare class LibEventManagerService {
2
- eventSubjects: any;
3
- eventSubjectParams: any;
4
- constructor(eventSet: any[]);
5
- addEventName(event: any, rebuild?: boolean): void;
6
- resetSubject(eventClassName: any): void;
7
- getEventNames(): string[];
8
- getSubject(eventClassName: any): any;
9
- subscribe(eventClassName: any, callback: any): any;
10
- next(eventClassName: any, data: any): void;
11
- }
@@ -1,6 +0,0 @@
1
- export declare class LibFileManagementService {
2
- openFile(fileBase64Data: any, fileName: any, fileType: any): void;
3
- saveFileFromURL(fileUrl: any, fileName?: any, fileType?: any): void;
4
- saveFile(fileBase64Data: any, fileName: any, fileType: any): void;
5
- printPdfFile(pdfBufferData: any): void;
6
- }
@@ -1,28 +0,0 @@
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(): Promise<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
- }
@@ -1,20 +0,0 @@
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
- }