tuain-ng-forms-lib 12.0.91 → 13.0.1

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 (73) 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 +322 -0
  4. package/{esm2015/lib/classes/forms/form.constants.js → esm2020/lib/classes/forms/form.constants.mjs} +0 -0
  5. package/esm2020/lib/classes/forms/form.mjs +420 -0
  6. package/esm2020/lib/classes/forms/section.mjs +128 -0
  7. package/{esm2015/lib/classes/forms/subsection.js → esm2020/lib/classes/forms/subsection.mjs} +0 -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 +104 -0
  11. package/{esm2015/lib/classes/forms/table/table.js → esm2020/lib/classes/forms/table/table.mjs} +15 -20
  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 +1278 -0
  23. package/{esm2015/lib/services/event-manager.service.js → esm2020/lib/services/event-manager.service.mjs} +0 -0
  24. package/{esm2015/lib/services/file-manager.service.js → esm2020/lib/services/file-manager.service.mjs} +0 -0
  25. package/esm2020/lib/services/form-manager.service.mjs +80 -0
  26. package/esm2020/lib/tuain-ng-forms-lib.module.mjs +73 -0
  27. package/esm2020/public-api.mjs +19 -0
  28. package/{esm2015/tuain-ng-forms-lib.js → esm2020/tuain-ng-forms-lib.mjs} +0 -0
  29. package/fesm2015/{tuain-ng-forms-lib.js → tuain-ng-forms-lib.mjs} +234 -150
  30. package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
  31. package/fesm2020/tuain-ng-forms-lib.mjs +3475 -0
  32. package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -0
  33. package/lib/classes/forms/form.d.ts +20 -20
  34. package/lib/components/elements/action.component.d.ts +3 -0
  35. package/lib/components/elements/field.component.d.ts +3 -0
  36. package/lib/components/elements/layout/element.component.d.ts +3 -0
  37. package/lib/components/elements/layout/form-error.component.d.ts +3 -0
  38. package/lib/components/elements/layout/form-header.component.d.ts +3 -0
  39. package/lib/components/elements/layout/section.component.d.ts +3 -0
  40. package/lib/components/elements/layout/sub-section.component.d.ts +3 -0
  41. package/lib/components/elements/tables/table-record-action.component.d.ts +3 -0
  42. package/lib/components/elements/tables/table-record-field.component.d.ts +3 -0
  43. package/lib/components/elements/tables/table.component.d.ts +6 -3
  44. package/lib/components/forms/basic-form.d.ts +30 -27
  45. package/lib/tuain-ng-forms-lib.module.d.ts +18 -0
  46. package/package.json +26 -12
  47. package/tuain-ng-forms-lib.d.ts +1 -0
  48. package/bundles/tuain-ng-forms-lib.umd.js +0 -4976
  49. package/bundles/tuain-ng-forms-lib.umd.js.map +0 -1
  50. package/esm2015/lib/classes/forms/action.js +0 -36
  51. package/esm2015/lib/classes/forms/element.js +0 -77
  52. package/esm2015/lib/classes/forms/field.js +0 -328
  53. package/esm2015/lib/classes/forms/form.js +0 -427
  54. package/esm2015/lib/classes/forms/section.js +0 -129
  55. package/esm2015/lib/classes/forms/table/action.js +0 -23
  56. package/esm2015/lib/classes/forms/table/column.js +0 -64
  57. package/esm2015/lib/classes/forms/table/row-data.js +0 -104
  58. package/esm2015/lib/components/elements/action.component.js +0 -54
  59. package/esm2015/lib/components/elements/field.component.js +0 -89
  60. package/esm2015/lib/components/elements/layout/element.component.js +0 -29
  61. package/esm2015/lib/components/elements/layout/form-error.component.js +0 -15
  62. package/esm2015/lib/components/elements/layout/form-header.component.js +0 -23
  63. package/esm2015/lib/components/elements/layout/section.component.js +0 -18
  64. package/esm2015/lib/components/elements/layout/sub-section.component.js +0 -19
  65. package/esm2015/lib/components/elements/tables/table-record-action.component.js +0 -35
  66. package/esm2015/lib/components/elements/tables/table-record-field.component.js +0 -20
  67. package/esm2015/lib/components/elements/tables/table.component.js +0 -88
  68. package/esm2015/lib/components/forms/basic-form.js +0 -1390
  69. package/esm2015/lib/services/form-manager.service.js +0 -83
  70. package/esm2015/lib/tuain-ng-forms-lib.module.js +0 -42
  71. package/esm2015/public-api.js +0 -16
  72. package/fesm2015/tuain-ng-forms-lib.js.map +0 -1
  73. package/tuain-ng-forms-lib.metadata.json +0 -1
@@ -1,3 +1,4 @@
1
+ import * as i0 from '@angular/core';
1
2
  import { Component, Input, EventEmitter, Output, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
3
  import { __awaiter } from 'tslib';
3
4
  import { Subject, ReplaySubject } from 'rxjs';
@@ -35,6 +36,7 @@ class ActionComponent {
35
36
  && this.relatedField !== ((_e = this.action) === null || _e === void 0 ? void 0 : _e.restrictedOnValue))) {
36
37
  return true;
37
38
  }
39
+ return false;
38
40
  }
39
41
  get visible() {
40
42
  var _a;
@@ -45,20 +47,27 @@ class ActionComponent {
45
47
  return !((_a = this.action) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
46
48
  }
47
49
  }
48
- ActionComponent.decorators = [
49
- { type: Component, args: [{
50
- selector: 'lib-action',
51
- template: `<ng-content></ng-content>`
52
- },] }
53
- ];
54
- ActionComponent.propDecorators = {
55
- action: [{ type: Input }],
56
- busy: [{ type: Input }],
57
- relatedField: [{ type: Input }],
58
- state: [{ type: Input }],
59
- style: [{ type: Input }],
60
- showLabel: [{ type: Input }]
61
- };
50
+ ActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: ActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
+ ActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: ActionComponent, selector: "lib-action", inputs: { action: "action", busy: "busy", relatedField: "relatedField", state: "state", style: "style", showLabel: "showLabel" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: ActionComponent, decorators: [{
53
+ type: Component,
54
+ args: [{
55
+ selector: 'lib-action',
56
+ template: `<ng-content></ng-content>`
57
+ }]
58
+ }], propDecorators: { action: [{
59
+ type: Input
60
+ }], busy: [{
61
+ type: Input
62
+ }], relatedField: [{
63
+ type: Input
64
+ }], state: [{
65
+ type: Input
66
+ }], style: [{
67
+ type: Input
68
+ }], showLabel: [{
69
+ type: Input
70
+ }] } });
62
71
 
63
72
  const VALUE = 'value';
64
73
  const FOCUS = 'focus';
@@ -137,16 +146,19 @@ class FieldComponent {
137
146
  return !((_a = this.field) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
138
147
  }
139
148
  }
140
- FieldComponent.decorators = [
141
- { type: Component, args: [{
142
- selector: 'lib-field',
143
- template: `<ng-content></ng-content>`
144
- },] }
145
- ];
146
- FieldComponent.propDecorators = {
147
- field: [{ type: Input }],
148
- state: [{ type: Input }]
149
- };
149
+ FieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
150
+ FieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: FieldComponent, selector: "lib-field", inputs: { field: "field", state: "state" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FieldComponent, decorators: [{
152
+ type: Component,
153
+ args: [{
154
+ selector: 'lib-field',
155
+ template: `<ng-content></ng-content>`
156
+ }]
157
+ }], propDecorators: { field: [{
158
+ type: Input
159
+ }], state: [{
160
+ type: Input
161
+ }] } });
150
162
 
151
163
  class ElementComponent {
152
164
  ngOnInit() {
@@ -164,31 +176,39 @@ class ElementComponent {
164
176
  return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
165
177
  }
166
178
  }
167
- ElementComponent.decorators = [
168
- { type: Component, args: [{
169
- selector: 'lib-element',
170
- template: `<ng-content></ng-content>`
171
- },] }
172
- ];
173
- ElementComponent.propDecorators = {
174
- element: [{ type: Input }],
175
- form: [{ type: Input }],
176
- state: [{ type: Input }]
177
- };
179
+ ElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: ElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
180
+ ElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: ElementComponent, selector: "lib-element", inputs: { element: "element", form: "form", state: "state" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: ElementComponent, decorators: [{
182
+ type: Component,
183
+ args: [{
184
+ selector: 'lib-element',
185
+ template: `<ng-content></ng-content>`
186
+ }]
187
+ }], propDecorators: { element: [{
188
+ type: Input
189
+ }], form: [{
190
+ type: Input
191
+ }], state: [{
192
+ type: Input
193
+ }] } });
178
194
 
179
195
  class FormErrorComponent {
180
196
  }
181
- FormErrorComponent.decorators = [
182
- { type: Component, args: [{
183
- selector: 'lib-form-error',
184
- template: `<ng-content></ng-content>`
185
- },] }
186
- ];
187
- FormErrorComponent.propDecorators = {
188
- errorTitle: [{ type: Input }],
189
- errorMessage: [{ type: Input }],
190
- errorType: [{ type: Input }]
191
- };
197
+ FormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
198
+ FormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: FormErrorComponent, selector: "lib-form-error", inputs: { errorTitle: "errorTitle", errorMessage: "errorMessage", errorType: "errorType" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FormErrorComponent, decorators: [{
200
+ type: Component,
201
+ args: [{
202
+ selector: 'lib-form-error',
203
+ template: `<ng-content></ng-content>`
204
+ }]
205
+ }], propDecorators: { errorTitle: [{
206
+ type: Input
207
+ }], errorMessage: [{
208
+ type: Input
209
+ }], errorType: [{
210
+ type: Input
211
+ }] } });
192
212
 
193
213
  class FormHeaderComponent {
194
214
  constructor() {
@@ -198,19 +218,25 @@ class FormHeaderComponent {
198
218
  this.goBackEvent.emit();
199
219
  }
200
220
  }
201
- FormHeaderComponent.decorators = [
202
- { type: Component, args: [{
203
- selector: 'lib-form-header',
204
- template: `<ng-content></ng-content>`
205
- },] }
206
- ];
207
- FormHeaderComponent.propDecorators = {
208
- formManager: [{ type: Input }],
209
- goBackAction: [{ type: Input }],
210
- showTitle: [{ type: Input }],
211
- headerActions: [{ type: Input }],
212
- goBackEvent: [{ type: Output }]
213
- };
221
+ FormHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FormHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
+ FormHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: FormHeaderComponent, selector: "lib-form-header", inputs: { formManager: "formManager", goBackAction: "goBackAction", showTitle: "showTitle", headerActions: "headerActions" }, outputs: { goBackEvent: "goBackEvent" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: FormHeaderComponent, decorators: [{
224
+ type: Component,
225
+ args: [{
226
+ selector: 'lib-form-header',
227
+ template: `<ng-content></ng-content>`
228
+ }]
229
+ }], propDecorators: { formManager: [{
230
+ type: Input
231
+ }], goBackAction: [{
232
+ type: Input
233
+ }], showTitle: [{
234
+ type: Input
235
+ }], headerActions: [{
236
+ type: Input
237
+ }], goBackEvent: [{
238
+ type: Output
239
+ }] } });
214
240
 
215
241
  class SectionComponent {
216
242
  ngOnInit() {
@@ -218,16 +244,19 @@ class SectionComponent {
218
244
  }
219
245
  start() { }
220
246
  }
221
- SectionComponent.decorators = [
222
- { type: Component, args: [{
223
- selector: 'lib-section',
224
- template: `<ng-content></ng-content>`
225
- },] }
226
- ];
227
- SectionComponent.propDecorators = {
228
- section: [{ type: Input }],
229
- formManager: [{ type: Input }]
230
- };
247
+ SectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
248
+ SectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SectionComponent, selector: "lib-section", inputs: { section: "section", formManager: "formManager" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SectionComponent, decorators: [{
250
+ type: Component,
251
+ args: [{
252
+ selector: 'lib-section',
253
+ template: `<ng-content></ng-content>`
254
+ }]
255
+ }], propDecorators: { section: [{
256
+ type: Input
257
+ }], formManager: [{
258
+ type: Input
259
+ }] } });
231
260
 
232
261
  class SubSectionComponent {
233
262
  ngOnInit() {
@@ -235,17 +264,21 @@ class SubSectionComponent {
235
264
  }
236
265
  start() { }
237
266
  }
238
- SubSectionComponent.decorators = [
239
- { type: Component, args: [{
240
- selector: 'lib-subsection',
241
- template: `<ng-content></ng-content>`
242
- },] }
243
- ];
244
- SubSectionComponent.propDecorators = {
245
- subSection: [{ type: Input }],
246
- showHeader: [{ type: Input }],
247
- formManager: [{ type: Input }]
248
- };
267
+ SubSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SubSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
268
+ SubSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SubSectionComponent, selector: "lib-subsection", inputs: { subSection: "subSection", showHeader: "showHeader", formManager: "formManager" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SubSectionComponent, decorators: [{
270
+ type: Component,
271
+ args: [{
272
+ selector: 'lib-subsection',
273
+ template: `<ng-content></ng-content>`
274
+ }]
275
+ }], propDecorators: { subSection: [{
276
+ type: Input
277
+ }], showHeader: [{
278
+ type: Input
279
+ }], formManager: [{
280
+ type: Input
281
+ }] } });
249
282
 
250
283
  const INLINE_ACTION$1 = 'INLINE';
251
284
  class LibTableRecordActionComponent {
@@ -266,20 +299,24 @@ class LibTableRecordActionComponent {
266
299
  }
267
300
  class() { }
268
301
  }
269
- LibTableRecordActionComponent.decorators = [
270
- { type: Component, args: [{
271
- selector: 'lib-table-record-action',
272
- template: `<ng-content></ng-content>`,
273
- changeDetection: ChangeDetectionStrategy.OnPush
274
- },] }
275
- ];
276
- LibTableRecordActionComponent.ctorParameters = () => [];
277
- LibTableRecordActionComponent.propDecorators = {
278
- recordId: [{ type: Input }],
279
- recordData: [{ type: Input }],
280
- action: [{ type: Input }],
281
- actionSelected: [{ type: Output }]
282
- };
302
+ LibTableRecordActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableRecordActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
303
+ LibTableRecordActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: LibTableRecordActionComponent, selector: "lib-table-record-action", inputs: { recordId: "recordId", recordData: "recordData", action: "action" }, outputs: { actionSelected: "actionSelected" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableRecordActionComponent, decorators: [{
305
+ type: Component,
306
+ args: [{
307
+ selector: 'lib-table-record-action',
308
+ template: `<ng-content></ng-content>`,
309
+ changeDetection: ChangeDetectionStrategy.OnPush
310
+ }]
311
+ }], ctorParameters: function () { return []; }, propDecorators: { recordId: [{
312
+ type: Input
313
+ }], recordData: [{
314
+ type: Input
315
+ }], action: [{
316
+ type: Input
317
+ }], actionSelected: [{
318
+ type: Output
319
+ }] } });
283
320
 
284
321
  class LibTableRecordFieldComponent {
285
322
  ngOnInit() {
@@ -287,18 +324,22 @@ class LibTableRecordFieldComponent {
287
324
  }
288
325
  start() { }
289
326
  }
290
- LibTableRecordFieldComponent.decorators = [
291
- { type: Component, args: [{
292
- selector: 'lib-table-record-field',
293
- template: `<ng-content></ng-content>`,
294
- changeDetection: ChangeDetectionStrategy.OnPush
295
- },] }
296
- ];
297
- LibTableRecordFieldComponent.propDecorators = {
298
- fieldCode: [{ type: Input }],
299
- fieldType: [{ type: Input }],
300
- fieldValue: [{ type: Input }]
301
- };
327
+ LibTableRecordFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableRecordFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
328
+ LibTableRecordFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: LibTableRecordFieldComponent, selector: "lib-table-record-field", inputs: { fieldCode: "fieldCode", fieldType: "fieldType", fieldValue: "fieldValue" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableRecordFieldComponent, decorators: [{
330
+ type: Component,
331
+ args: [{
332
+ selector: 'lib-table-record-field',
333
+ template: `<ng-content></ng-content>`,
334
+ changeDetection: ChangeDetectionStrategy.OnPush
335
+ }]
336
+ }], propDecorators: { fieldCode: [{
337
+ type: Input
338
+ }], fieldType: [{
339
+ type: Input
340
+ }], fieldValue: [{
341
+ type: Input
342
+ }] } });
302
343
 
303
344
  const changeViewAttributes = ['visibleRecords', 'currentPage', 'recordsPerPage'];
304
345
  class LibTableComponent {
@@ -312,6 +353,7 @@ class LibTableComponent {
312
353
  this.loaded = false;
313
354
  this.selectable = false;
314
355
  this.hasActions = false;
356
+ this.disabled = false;
315
357
  }
316
358
  ngOnInit() {
317
359
  var _a;
@@ -372,20 +414,26 @@ class LibTableComponent {
372
414
  }
373
415
  }
374
416
  }
375
- LibTableComponent.decorators = [
376
- { type: Component, args: [{
377
- selector: 'lib-table',
378
- template: `<ng-content></ng-content>`,
379
- changeDetection: ChangeDetectionStrategy.OnPush
380
- },] }
381
- ];
382
- LibTableComponent.propDecorators = {
383
- table: [{ type: Input }],
384
- tableRecords: [{ type: Input }],
385
- disabled: [{ type: Input }],
386
- state: [{ type: Input }],
387
- waiting: [{ type: Input }]
388
- };
417
+ LibTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
418
+ LibTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: LibTableComponent, selector: "lib-table", inputs: { table: "table", tableRecords: "tableRecords", disabled: "disabled", state: "state", waiting: "waiting" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: LibTableComponent, decorators: [{
420
+ type: Component,
421
+ args: [{
422
+ selector: 'lib-table',
423
+ template: `<ng-content></ng-content>`,
424
+ changeDetection: ChangeDetectionStrategy.OnPush
425
+ }]
426
+ }], propDecorators: { table: [{
427
+ type: Input
428
+ }], tableRecords: [{
429
+ type: Input
430
+ }], disabled: [{
431
+ type: Input
432
+ }], state: [{
433
+ type: Input
434
+ }], waiting: [{
435
+ type: Input
436
+ }] } });
389
437
 
390
438
  const NO_ERROR = '00';
391
439
  const HEADER$1 = 'HEADER';
@@ -426,9 +474,11 @@ class FormElement {
426
474
  this.customAttributes = (_c = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
427
475
  }
428
476
  getCustomAttribute(name) { var _a, _b; return (_b = (_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) !== null && _b !== void 0 ? _b : null; }
429
- setCustomAttribute(name, value) { if (name) {
430
- this.customAttributes[name] = value;
431
- } }
477
+ setCustomAttribute(name, value) {
478
+ if (name) {
479
+ this.customAttributes[name] = value;
480
+ }
481
+ }
432
482
  matchAttribute(name, value) { var _a; return ((_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) === value; }
433
483
  isField() { return this.elementType === elementTypes.field; }
434
484
  isAction() { return this.elementType === elementTypes.action; }
@@ -2559,6 +2609,7 @@ class BasicFormComponent {
2559
2609
  this._originToken = originToken;
2560
2610
  return state;
2561
2611
  }
2612
+ return null;
2562
2613
  }
2563
2614
  subscribeSectionActivation() {
2564
2615
  const formSections = this._formStructure.sections;
@@ -2566,8 +2617,8 @@ class BasicFormComponent {
2566
2617
  for (let index = 0; index < sectionNames.length; index++) {
2567
2618
  const sectionName = sectionNames[index];
2568
2619
  const section = formSections[sectionName];
2569
- section.activation.subscribe(code => this.launchSectionActivation(code));
2570
- section.inactivation.subscribe(code => this.launchSectionInactivation(code));
2620
+ section.activation.subscribe((code) => this.launchSectionActivation(code));
2621
+ section.inactivation.subscribe((code) => this.launchSectionInactivation(code));
2571
2622
  }
2572
2623
  }
2573
2624
  subscribeFieldsSubjects() {
@@ -2904,6 +2955,7 @@ class BasicFormComponent {
2904
2955
  }
2905
2956
  yield Promise.all(clientValidationPromises);
2906
2957
  }
2958
+ return true;
2907
2959
  });
2908
2960
  }
2909
2961
  startFieldValidation(fieldCode, intrinsicValidation = true) {
@@ -3453,7 +3505,7 @@ class BasicFormComponent {
3453
3505
  checkSectionRequiredFields(sectionCode, reqFieldMessage) {
3454
3506
  this.cleanErrorFields(null, sectionCode);
3455
3507
  const requiredFieldMessage = reqFieldMessage !== null && reqFieldMessage !== void 0 ? reqFieldMessage : this.formConfig.formStandardErrors.requiredField;
3456
- const numErrors = this.tagFieldsWithError(this.getRequiredEmptyFields(null, sectionCode), null, requiredFieldMessage);
3508
+ const numErrors = this.tagFieldsWithError(requiredFieldMessage, this.getRequiredEmptyFields(null, sectionCode));
3457
3509
  return (numErrors === 0);
3458
3510
  }
3459
3511
  validateSectionConsistency(sectionCode, reqFieldMessage) {
@@ -3461,14 +3513,14 @@ class BasicFormComponent {
3461
3513
  const completeFields = this.checkSectionRequiredFields(sectionCode, reqFieldMessage);
3462
3514
  if (!completeFields) {
3463
3515
  this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
3464
- return;
3516
+ return false;
3465
3517
  }
3466
3518
  let validationError = false;
3467
3519
  const requiredEmptyFields = this.getRequiredEmptyFields(null, sectionCode);
3468
3520
  if (requiredEmptyFields.length > 0) {
3469
3521
  validationError = true;
3470
3522
  this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
3471
- this.tagFieldsWithError(requiredEmptyFields, null, this.formConfig.formStandardErrors.requiredField);
3523
+ this.tagFieldsWithError(this.formConfig.formStandardErrors.requiredField, requiredEmptyFields);
3472
3524
  for (const fieldCode of requiredEmptyFields) {
3473
3525
  const requiredEmptyField = this.getField(fieldCode);
3474
3526
  requiredEmptyField === null || requiredEmptyField === void 0 ? void 0 : requiredEmptyField.focus();
@@ -3500,16 +3552,14 @@ class BasicFormComponent {
3500
3552
  return true;
3501
3553
  }
3502
3554
  }
3503
- BasicFormComponent.decorators = [
3504
- { type: Component, args: [{
3505
- template: `<ng-content></ng-content>`
3506
- },] }
3507
- ];
3508
- BasicFormComponent.ctorParameters = () => [
3509
- { type: LibFormManagerService },
3510
- { type: LibEventManagerService },
3511
- { type: LibFileManagementService }
3512
- ];
3555
+ BasicFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: BasicFormComponent, deps: [{ token: LibFormManagerService }, { token: LibEventManagerService }, { token: LibFileManagementService }], target: i0.ɵɵFactoryTarget.Component });
3556
+ BasicFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: BasicFormComponent, selector: "ng-component", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
3557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: BasicFormComponent, decorators: [{
3558
+ type: Component,
3559
+ args: [{
3560
+ template: `<ng-content></ng-content>`
3561
+ }]
3562
+ }], ctorParameters: function () { return [{ type: LibFormManagerService }, { type: LibEventManagerService }, { type: LibFileManagementService }]; } });
3513
3563
 
3514
3564
  const COMPONENTS = [
3515
3565
  BasicFormComponent,
@@ -3526,21 +3576,55 @@ const COMPONENTS = [
3526
3576
  ];
3527
3577
  class TuainNgFormsLibModule {
3528
3578
  }
3529
- TuainNgFormsLibModule.decorators = [
3530
- { type: NgModule, args: [{
3531
- declarations: COMPONENTS,
3532
- imports: [
3533
- CommonModule,
3534
- RouterModule,
3535
- FormsModule,
3536
- ],
3537
- exports: COMPONENTS
3538
- },] }
3539
- ];
3579
+ TuainNgFormsLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3580
+ TuainNgFormsLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, declarations: [BasicFormComponent,
3581
+ ActionComponent,
3582
+ FieldComponent,
3583
+ ElementComponent,
3584
+ FormErrorComponent,
3585
+ FormHeaderComponent,
3586
+ SectionComponent,
3587
+ SubSectionComponent,
3588
+ LibTableRecordActionComponent,
3589
+ LibTableRecordFieldComponent,
3590
+ LibTableComponent], imports: [CommonModule,
3591
+ RouterModule,
3592
+ FormsModule], exports: [BasicFormComponent,
3593
+ ActionComponent,
3594
+ FieldComponent,
3595
+ ElementComponent,
3596
+ FormErrorComponent,
3597
+ FormHeaderComponent,
3598
+ SectionComponent,
3599
+ SubSectionComponent,
3600
+ LibTableRecordActionComponent,
3601
+ LibTableRecordFieldComponent,
3602
+ LibTableComponent] });
3603
+ TuainNgFormsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, imports: [[
3604
+ CommonModule,
3605
+ RouterModule,
3606
+ FormsModule,
3607
+ ]] });
3608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, decorators: [{
3609
+ type: NgModule,
3610
+ args: [{
3611
+ declarations: COMPONENTS,
3612
+ imports: [
3613
+ CommonModule,
3614
+ RouterModule,
3615
+ FormsModule,
3616
+ ],
3617
+ exports: COMPONENTS
3618
+ }]
3619
+ }] });
3620
+
3621
+ /*
3622
+ * Public API Surface of tuain-ng-forms-lib
3623
+ */
3540
3624
 
3541
3625
  /**
3542
3626
  * Generated bundle index. Do not edit.
3543
3627
  */
3544
3628
 
3545
3629
  export { ActionComponent, BasicFormComponent, ElementComponent, FieldComponent, FormErrorComponent, FormHeaderComponent, LibEventManagerService, LibFileManagementService, LibFormManagerService, LibTableComponent, LibTableRecordActionComponent, LibTableRecordFieldComponent, SectionComponent, SubSectionComponent, TuainNgFormsLibModule };
3546
- //# sourceMappingURL=tuain-ng-forms-lib.js.map
3630
+ //# sourceMappingURL=tuain-ng-forms-lib.mjs.map