tuain-ng-forms-lib 12.0.91 → 13.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 (75) 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 +105 -0
  11. package/esm2020/lib/classes/forms/table/table.mjs +370 -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 +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} +239 -154
  30. package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
  31. package/fesm2020/tuain-ng-forms-lib.mjs +3476 -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/classes/forms/table/row-data.d.ts +1 -1
  35. package/lib/components/elements/action.component.d.ts +3 -0
  36. package/lib/components/elements/field.component.d.ts +3 -0
  37. package/lib/components/elements/layout/element.component.d.ts +3 -0
  38. package/lib/components/elements/layout/form-error.component.d.ts +3 -0
  39. package/lib/components/elements/layout/form-header.component.d.ts +3 -0
  40. package/lib/components/elements/layout/section.component.d.ts +3 -0
  41. package/lib/components/elements/layout/sub-section.component.d.ts +3 -0
  42. package/lib/components/elements/tables/table-record-action.component.d.ts +3 -0
  43. package/lib/components/elements/tables/table-record-field.component.d.ts +3 -0
  44. package/lib/components/elements/tables/table.component.d.ts +6 -3
  45. package/lib/components/forms/basic-form.d.ts +30 -27
  46. package/lib/tuain-ng-forms-lib.module.d.ts +18 -0
  47. package/package.json +26 -12
  48. package/tuain-ng-forms-lib.d.ts +1 -0
  49. package/bundles/tuain-ng-forms-lib.umd.js +0 -4976
  50. package/bundles/tuain-ng-forms-lib.umd.js.map +0 -1
  51. package/esm2015/lib/classes/forms/action.js +0 -36
  52. package/esm2015/lib/classes/forms/element.js +0 -77
  53. package/esm2015/lib/classes/forms/field.js +0 -328
  54. package/esm2015/lib/classes/forms/form.js +0 -427
  55. package/esm2015/lib/classes/forms/section.js +0 -129
  56. package/esm2015/lib/classes/forms/table/action.js +0 -23
  57. package/esm2015/lib/classes/forms/table/column.js +0 -64
  58. package/esm2015/lib/classes/forms/table/row-data.js +0 -104
  59. package/esm2015/lib/classes/forms/table/table.js +0 -375
  60. package/esm2015/lib/components/elements/action.component.js +0 -54
  61. package/esm2015/lib/components/elements/field.component.js +0 -89
  62. package/esm2015/lib/components/elements/layout/element.component.js +0 -29
  63. package/esm2015/lib/components/elements/layout/form-error.component.js +0 -15
  64. package/esm2015/lib/components/elements/layout/form-header.component.js +0 -23
  65. package/esm2015/lib/components/elements/layout/section.component.js +0 -18
  66. package/esm2015/lib/components/elements/layout/sub-section.component.js +0 -19
  67. package/esm2015/lib/components/elements/tables/table-record-action.component.js +0 -35
  68. package/esm2015/lib/components/elements/tables/table-record-field.component.js +0 -20
  69. package/esm2015/lib/components/elements/tables/table.component.js +0 -88
  70. package/esm2015/lib/components/forms/basic-form.js +0 -1390
  71. package/esm2015/lib/services/form-manager.service.js +0 -83
  72. package/esm2015/lib/tuain-ng-forms-lib.module.js +0 -42
  73. package/esm2015/public-api.js +0 -16
  74. package/fesm2015/tuain-ng-forms-lib.js.map +0 -1
  75. 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; }
@@ -974,12 +1024,13 @@ class TableRecordData {
974
1024
  getFieldValue(fieldCode) {
975
1025
  return (fieldCode && this.recordData) ? this.recordData[fieldCode] : null;
976
1026
  }
977
- hasPattern(words) {
1027
+ hasPattern(words, columnObj) {
978
1028
  if (!words || words.length === 0) {
979
1029
  return true;
980
1030
  }
981
1031
  for (const fieldCode in this.recordData) {
982
- if (this.recordData.hasOwnProperty(fieldCode)) {
1032
+ const columnDef = columnObj === null || columnObj === void 0 ? void 0 : columnObj[fieldCode];
1033
+ if (columnDef && (columnDef === null || columnDef === void 0 ? void 0 : columnDef.visible) && this.recordData.hasOwnProperty(fieldCode)) {
983
1034
  for (const word of words) {
984
1035
  const term = word.toUpperCase();
985
1036
  const fieldValue = this.recordData[fieldCode];
@@ -1322,7 +1373,7 @@ class RecordTable extends FormElement {
1322
1373
  filteredRecords = filteredRecords.filter(record => record.recordId === this.restrictedId);
1323
1374
  }
1324
1375
  if (this.globalFilterStrings.length > 0) {
1325
- filteredRecords = filteredRecords.filter(record => record.hasPattern(this.globalFilterStrings));
1376
+ filteredRecords = filteredRecords.filter(record => record.hasPattern(this.globalFilterStrings, this._tableColumnObj));
1326
1377
  }
1327
1378
  const columnFilters = this.columns.filter(column => column.filter).map(column => column.filter);
1328
1379
  if (columnFilters.length > 0) {
@@ -1388,7 +1439,7 @@ class RecordTable extends FormElement {
1388
1439
  return;
1389
1440
  }
1390
1441
  this.tableRecords.sort((a, b) => this.recordCompare(a, b, this.sorting.columnName, this.sorting.direction));
1391
- this.unSelectAll();
1442
+ //this.unSelectAll();
1392
1443
  this.updateVisibleRecords();
1393
1444
  }
1394
1445
  recordCompare(recordA, recordB, columnCompare, direction) {
@@ -2559,6 +2610,7 @@ class BasicFormComponent {
2559
2610
  this._originToken = originToken;
2560
2611
  return state;
2561
2612
  }
2613
+ return null;
2562
2614
  }
2563
2615
  subscribeSectionActivation() {
2564
2616
  const formSections = this._formStructure.sections;
@@ -2566,8 +2618,8 @@ class BasicFormComponent {
2566
2618
  for (let index = 0; index < sectionNames.length; index++) {
2567
2619
  const sectionName = sectionNames[index];
2568
2620
  const section = formSections[sectionName];
2569
- section.activation.subscribe(code => this.launchSectionActivation(code));
2570
- section.inactivation.subscribe(code => this.launchSectionInactivation(code));
2621
+ section.activation.subscribe((code) => this.launchSectionActivation(code));
2622
+ section.inactivation.subscribe((code) => this.launchSectionInactivation(code));
2571
2623
  }
2572
2624
  }
2573
2625
  subscribeFieldsSubjects() {
@@ -2904,6 +2956,7 @@ class BasicFormComponent {
2904
2956
  }
2905
2957
  yield Promise.all(clientValidationPromises);
2906
2958
  }
2959
+ return true;
2907
2960
  });
2908
2961
  }
2909
2962
  startFieldValidation(fieldCode, intrinsicValidation = true) {
@@ -3453,7 +3506,7 @@ class BasicFormComponent {
3453
3506
  checkSectionRequiredFields(sectionCode, reqFieldMessage) {
3454
3507
  this.cleanErrorFields(null, sectionCode);
3455
3508
  const requiredFieldMessage = reqFieldMessage !== null && reqFieldMessage !== void 0 ? reqFieldMessage : this.formConfig.formStandardErrors.requiredField;
3456
- const numErrors = this.tagFieldsWithError(this.getRequiredEmptyFields(null, sectionCode), null, requiredFieldMessage);
3509
+ const numErrors = this.tagFieldsWithError(requiredFieldMessage, this.getRequiredEmptyFields(null, sectionCode));
3457
3510
  return (numErrors === 0);
3458
3511
  }
3459
3512
  validateSectionConsistency(sectionCode, reqFieldMessage) {
@@ -3461,14 +3514,14 @@ class BasicFormComponent {
3461
3514
  const completeFields = this.checkSectionRequiredFields(sectionCode, reqFieldMessage);
3462
3515
  if (!completeFields) {
3463
3516
  this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
3464
- return;
3517
+ return false;
3465
3518
  }
3466
3519
  let validationError = false;
3467
3520
  const requiredEmptyFields = this.getRequiredEmptyFields(null, sectionCode);
3468
3521
  if (requiredEmptyFields.length > 0) {
3469
3522
  validationError = true;
3470
3523
  this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
3471
- this.tagFieldsWithError(requiredEmptyFields, null, this.formConfig.formStandardErrors.requiredField);
3524
+ this.tagFieldsWithError(this.formConfig.formStandardErrors.requiredField, requiredEmptyFields);
3472
3525
  for (const fieldCode of requiredEmptyFields) {
3473
3526
  const requiredEmptyField = this.getField(fieldCode);
3474
3527
  requiredEmptyField === null || requiredEmptyField === void 0 ? void 0 : requiredEmptyField.focus();
@@ -3500,16 +3553,14 @@ class BasicFormComponent {
3500
3553
  return true;
3501
3554
  }
3502
3555
  }
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
- ];
3556
+ 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 });
3557
+ 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 });
3558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: BasicFormComponent, decorators: [{
3559
+ type: Component,
3560
+ args: [{
3561
+ template: `<ng-content></ng-content>`
3562
+ }]
3563
+ }], ctorParameters: function () { return [{ type: LibFormManagerService }, { type: LibEventManagerService }, { type: LibFileManagementService }]; } });
3513
3564
 
3514
3565
  const COMPONENTS = [
3515
3566
  BasicFormComponent,
@@ -3526,21 +3577,55 @@ const COMPONENTS = [
3526
3577
  ];
3527
3578
  class TuainNgFormsLibModule {
3528
3579
  }
3529
- TuainNgFormsLibModule.decorators = [
3530
- { type: NgModule, args: [{
3531
- declarations: COMPONENTS,
3532
- imports: [
3533
- CommonModule,
3534
- RouterModule,
3535
- FormsModule,
3536
- ],
3537
- exports: COMPONENTS
3538
- },] }
3539
- ];
3580
+ TuainNgFormsLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3581
+ TuainNgFormsLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, declarations: [BasicFormComponent,
3582
+ ActionComponent,
3583
+ FieldComponent,
3584
+ ElementComponent,
3585
+ FormErrorComponent,
3586
+ FormHeaderComponent,
3587
+ SectionComponent,
3588
+ SubSectionComponent,
3589
+ LibTableRecordActionComponent,
3590
+ LibTableRecordFieldComponent,
3591
+ LibTableComponent], imports: [CommonModule,
3592
+ RouterModule,
3593
+ FormsModule], exports: [BasicFormComponent,
3594
+ ActionComponent,
3595
+ FieldComponent,
3596
+ ElementComponent,
3597
+ FormErrorComponent,
3598
+ FormHeaderComponent,
3599
+ SectionComponent,
3600
+ SubSectionComponent,
3601
+ LibTableRecordActionComponent,
3602
+ LibTableRecordFieldComponent,
3603
+ LibTableComponent] });
3604
+ TuainNgFormsLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, imports: [[
3605
+ CommonModule,
3606
+ RouterModule,
3607
+ FormsModule,
3608
+ ]] });
3609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: TuainNgFormsLibModule, decorators: [{
3610
+ type: NgModule,
3611
+ args: [{
3612
+ declarations: COMPONENTS,
3613
+ imports: [
3614
+ CommonModule,
3615
+ RouterModule,
3616
+ FormsModule,
3617
+ ],
3618
+ exports: COMPONENTS
3619
+ }]
3620
+ }] });
3621
+
3622
+ /*
3623
+ * Public API Surface of tuain-ng-forms-lib
3624
+ */
3540
3625
 
3541
3626
  /**
3542
3627
  * Generated bundle index. Do not edit.
3543
3628
  */
3544
3629
 
3545
3630
  export { ActionComponent, BasicFormComponent, ElementComponent, FieldComponent, FormErrorComponent, FormHeaderComponent, LibEventManagerService, LibFileManagementService, LibFormManagerService, LibTableComponent, LibTableRecordActionComponent, LibTableRecordFieldComponent, SectionComponent, SubSectionComponent, TuainNgFormsLibModule };
3546
- //# sourceMappingURL=tuain-ng-forms-lib.js.map
3631
+ //# sourceMappingURL=tuain-ng-forms-lib.mjs.map