tuain-ng-forms-lib 12.0.89 → 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.
- package/esm2020/lib/classes/forms/action.mjs +35 -0
- package/esm2020/lib/classes/forms/element.mjs +76 -0
- package/esm2020/lib/classes/forms/field.mjs +322 -0
- package/{esm2015/lib/classes/forms/form.constants.js → esm2020/lib/classes/forms/form.constants.mjs} +0 -0
- package/esm2020/lib/classes/forms/form.mjs +420 -0
- package/esm2020/lib/classes/forms/section.mjs +128 -0
- package/{esm2015/lib/classes/forms/subsection.js → esm2020/lib/classes/forms/subsection.mjs} +0 -0
- package/esm2020/lib/classes/forms/table/action.mjs +22 -0
- package/esm2020/lib/classes/forms/table/column.mjs +61 -0
- package/esm2020/lib/classes/forms/table/row-data.mjs +104 -0
- package/{esm2015/lib/classes/forms/table/table.js → esm2020/lib/classes/forms/table/table.mjs} +15 -20
- package/esm2020/lib/components/elements/action.component.mjs +58 -0
- package/esm2020/lib/components/elements/field.component.mjs +90 -0
- package/esm2020/lib/components/elements/layout/element.component.mjs +31 -0
- package/esm2020/lib/components/elements/layout/form-error.component.mjs +20 -0
- package/esm2020/lib/components/elements/layout/form-header.component.mjs +30 -0
- package/esm2020/lib/components/elements/layout/section.component.mjs +22 -0
- package/esm2020/lib/components/elements/layout/sub-section.component.mjs +24 -0
- package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +40 -0
- package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +25 -0
- package/esm2020/lib/components/elements/tables/table.component.mjs +95 -0
- package/esm2020/lib/components/forms/basic-form.mjs +1278 -0
- package/{esm2015/lib/services/event-manager.service.js → esm2020/lib/services/event-manager.service.mjs} +0 -0
- package/{esm2015/lib/services/file-manager.service.js → esm2020/lib/services/file-manager.service.mjs} +0 -0
- package/esm2020/lib/services/form-manager.service.mjs +80 -0
- package/esm2020/lib/tuain-ng-forms-lib.module.mjs +73 -0
- package/esm2020/public-api.mjs +19 -0
- package/{esm2015/tuain-ng-forms-lib.js → esm2020/tuain-ng-forms-lib.mjs} +0 -0
- package/fesm2015/{tuain-ng-forms-lib.js → tuain-ng-forms-lib.mjs} +238 -150
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
- package/fesm2020/tuain-ng-forms-lib.mjs +3475 -0
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -0
- package/lib/classes/forms/element.d.ts +1 -1
- package/lib/classes/forms/form.d.ts +20 -20
- package/lib/components/elements/action.component.d.ts +3 -0
- package/lib/components/elements/field.component.d.ts +3 -0
- package/lib/components/elements/layout/element.component.d.ts +3 -0
- package/lib/components/elements/layout/form-error.component.d.ts +3 -0
- package/lib/components/elements/layout/form-header.component.d.ts +3 -0
- package/lib/components/elements/layout/section.component.d.ts +3 -0
- package/lib/components/elements/layout/sub-section.component.d.ts +3 -0
- package/lib/components/elements/tables/table-record-action.component.d.ts +3 -0
- package/lib/components/elements/tables/table-record-field.component.d.ts +3 -0
- package/lib/components/elements/tables/table.component.d.ts +7 -3
- package/lib/components/forms/basic-form.d.ts +30 -27
- package/lib/tuain-ng-forms-lib.module.d.ts +18 -0
- package/package.json +26 -12
- package/tuain-ng-forms-lib.d.ts +1 -0
- package/bundles/tuain-ng-forms-lib.umd.js +0 -4972
- package/bundles/tuain-ng-forms-lib.umd.js.map +0 -1
- package/esm2015/lib/classes/forms/action.js +0 -36
- package/esm2015/lib/classes/forms/element.js +0 -77
- package/esm2015/lib/classes/forms/field.js +0 -328
- package/esm2015/lib/classes/forms/form.js +0 -427
- package/esm2015/lib/classes/forms/section.js +0 -129
- package/esm2015/lib/classes/forms/table/action.js +0 -23
- package/esm2015/lib/classes/forms/table/column.js +0 -64
- package/esm2015/lib/classes/forms/table/row-data.js +0 -104
- package/esm2015/lib/components/elements/action.component.js +0 -54
- package/esm2015/lib/components/elements/field.component.js +0 -89
- package/esm2015/lib/components/elements/layout/element.component.js +0 -29
- package/esm2015/lib/components/elements/layout/form-error.component.js +0 -15
- package/esm2015/lib/components/elements/layout/form-header.component.js +0 -23
- package/esm2015/lib/components/elements/layout/section.component.js +0 -18
- package/esm2015/lib/components/elements/layout/sub-section.component.js +0 -19
- package/esm2015/lib/components/elements/tables/table-record-action.component.js +0 -35
- package/esm2015/lib/components/elements/tables/table-record-field.component.js +0 -20
- package/esm2015/lib/components/elements/tables/table.component.js +0 -84
- package/esm2015/lib/components/forms/basic-form.js +0 -1390
- package/esm2015/lib/services/form-manager.service.js +0 -83
- package/esm2015/lib/tuain-ng-forms-lib.module.js +0 -42
- package/esm2015/public-api.js +0 -16
- package/fesm2015/tuain-ng-forms-lib.js.map +0 -1
- 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
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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;
|
|
@@ -341,6 +383,7 @@ class LibTableComponent {
|
|
|
341
383
|
this.start();
|
|
342
384
|
}
|
|
343
385
|
start() { }
|
|
386
|
+
updateTableData() { }
|
|
344
387
|
tableGlobalAction(actionCode) { this.table.notifyGlobalAction(actionCode); }
|
|
345
388
|
tableSelectionAction(actionCode) { this.table.notifySelectionAction(actionCode); }
|
|
346
389
|
tableActionSelected(actionEvent) { this.table.notifyInlineAction(actionEvent); }
|
|
@@ -352,6 +395,9 @@ class LibTableComponent {
|
|
|
352
395
|
globalFilterChanged() { var _a, _b; this.table.setGlobalFilterString((_b = (_a = this.globalFilterString) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : ''); }
|
|
353
396
|
syncAttribute(name, value) {
|
|
354
397
|
try {
|
|
398
|
+
if (name === 'visibleRecords') {
|
|
399
|
+
this.updateTableData();
|
|
400
|
+
}
|
|
355
401
|
this[name] = value;
|
|
356
402
|
return true;
|
|
357
403
|
}
|
|
@@ -368,20 +414,26 @@ class LibTableComponent {
|
|
|
368
414
|
}
|
|
369
415
|
}
|
|
370
416
|
}
|
|
371
|
-
LibTableComponent
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
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
|
+
}] } });
|
|
385
437
|
|
|
386
438
|
const NO_ERROR = '00';
|
|
387
439
|
const HEADER$1 = 'HEADER';
|
|
@@ -422,9 +474,11 @@ class FormElement {
|
|
|
422
474
|
this.customAttributes = (_c = elementDefinition === null || elementDefinition === void 0 ? void 0 : elementDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
|
|
423
475
|
}
|
|
424
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; }
|
|
425
|
-
setCustomAttribute(name, value) {
|
|
426
|
-
|
|
427
|
-
|
|
477
|
+
setCustomAttribute(name, value) {
|
|
478
|
+
if (name) {
|
|
479
|
+
this.customAttributes[name] = value;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
428
482
|
matchAttribute(name, value) { var _a; return ((_a = this.customAttributes) === null || _a === void 0 ? void 0 : _a[name]) === value; }
|
|
429
483
|
isField() { return this.elementType === elementTypes.field; }
|
|
430
484
|
isAction() { return this.elementType === elementTypes.action; }
|
|
@@ -2555,6 +2609,7 @@ class BasicFormComponent {
|
|
|
2555
2609
|
this._originToken = originToken;
|
|
2556
2610
|
return state;
|
|
2557
2611
|
}
|
|
2612
|
+
return null;
|
|
2558
2613
|
}
|
|
2559
2614
|
subscribeSectionActivation() {
|
|
2560
2615
|
const formSections = this._formStructure.sections;
|
|
@@ -2562,8 +2617,8 @@ class BasicFormComponent {
|
|
|
2562
2617
|
for (let index = 0; index < sectionNames.length; index++) {
|
|
2563
2618
|
const sectionName = sectionNames[index];
|
|
2564
2619
|
const section = formSections[sectionName];
|
|
2565
|
-
section.activation.subscribe(code => this.launchSectionActivation(code));
|
|
2566
|
-
section.inactivation.subscribe(code => this.launchSectionInactivation(code));
|
|
2620
|
+
section.activation.subscribe((code) => this.launchSectionActivation(code));
|
|
2621
|
+
section.inactivation.subscribe((code) => this.launchSectionInactivation(code));
|
|
2567
2622
|
}
|
|
2568
2623
|
}
|
|
2569
2624
|
subscribeFieldsSubjects() {
|
|
@@ -2900,6 +2955,7 @@ class BasicFormComponent {
|
|
|
2900
2955
|
}
|
|
2901
2956
|
yield Promise.all(clientValidationPromises);
|
|
2902
2957
|
}
|
|
2958
|
+
return true;
|
|
2903
2959
|
});
|
|
2904
2960
|
}
|
|
2905
2961
|
startFieldValidation(fieldCode, intrinsicValidation = true) {
|
|
@@ -3449,7 +3505,7 @@ class BasicFormComponent {
|
|
|
3449
3505
|
checkSectionRequiredFields(sectionCode, reqFieldMessage) {
|
|
3450
3506
|
this.cleanErrorFields(null, sectionCode);
|
|
3451
3507
|
const requiredFieldMessage = reqFieldMessage !== null && reqFieldMessage !== void 0 ? reqFieldMessage : this.formConfig.formStandardErrors.requiredField;
|
|
3452
|
-
const numErrors = this.tagFieldsWithError(this.getRequiredEmptyFields(null, sectionCode)
|
|
3508
|
+
const numErrors = this.tagFieldsWithError(requiredFieldMessage, this.getRequiredEmptyFields(null, sectionCode));
|
|
3453
3509
|
return (numErrors === 0);
|
|
3454
3510
|
}
|
|
3455
3511
|
validateSectionConsistency(sectionCode, reqFieldMessage) {
|
|
@@ -3457,14 +3513,14 @@ class BasicFormComponent {
|
|
|
3457
3513
|
const completeFields = this.checkSectionRequiredFields(sectionCode, reqFieldMessage);
|
|
3458
3514
|
if (!completeFields) {
|
|
3459
3515
|
this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
|
|
3460
|
-
return;
|
|
3516
|
+
return false;
|
|
3461
3517
|
}
|
|
3462
3518
|
let validationError = false;
|
|
3463
3519
|
const requiredEmptyFields = this.getRequiredEmptyFields(null, sectionCode);
|
|
3464
3520
|
if (requiredEmptyFields.length > 0) {
|
|
3465
3521
|
validationError = true;
|
|
3466
3522
|
this.setError(this.formConfig.formStandardErrors.typeWarning, this.formConfig.formStandardErrors.validationTitle, this.formConfig.formStandardErrors.requiredFields);
|
|
3467
|
-
this.tagFieldsWithError(
|
|
3523
|
+
this.tagFieldsWithError(this.formConfig.formStandardErrors.requiredField, requiredEmptyFields);
|
|
3468
3524
|
for (const fieldCode of requiredEmptyFields) {
|
|
3469
3525
|
const requiredEmptyField = this.getField(fieldCode);
|
|
3470
3526
|
requiredEmptyField === null || requiredEmptyField === void 0 ? void 0 : requiredEmptyField.focus();
|
|
@@ -3496,16 +3552,14 @@ class BasicFormComponent {
|
|
|
3496
3552
|
return true;
|
|
3497
3553
|
}
|
|
3498
3554
|
}
|
|
3499
|
-
BasicFormComponent
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
{ type: LibFileManagementService }
|
|
3508
|
-
];
|
|
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 }]; } });
|
|
3509
3563
|
|
|
3510
3564
|
const COMPONENTS = [
|
|
3511
3565
|
BasicFormComponent,
|
|
@@ -3522,21 +3576,55 @@ const COMPONENTS = [
|
|
|
3522
3576
|
];
|
|
3523
3577
|
class TuainNgFormsLibModule {
|
|
3524
3578
|
}
|
|
3525
|
-
TuainNgFormsLibModule
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
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
|
+
*/
|
|
3536
3624
|
|
|
3537
3625
|
/**
|
|
3538
3626
|
* Generated bundle index. Do not edit.
|
|
3539
3627
|
*/
|
|
3540
3628
|
|
|
3541
3629
|
export { ActionComponent, BasicFormComponent, ElementComponent, FieldComponent, FormErrorComponent, FormHeaderComponent, LibEventManagerService, LibFileManagementService, LibFormManagerService, LibTableComponent, LibTableRecordActionComponent, LibTableRecordFieldComponent, SectionComponent, SubSectionComponent, TuainNgFormsLibModule };
|
|
3542
|
-
//# sourceMappingURL=tuain-ng-forms-lib.
|
|
3630
|
+
//# sourceMappingURL=tuain-ng-forms-lib.mjs.map
|