tuain-ng-forms-lib 12.0.31 → 12.0.32
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/bundles/tuain-ng-forms-lib.umd.js +12 -17
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/components/elements/action.component.js +4 -4
- package/esm2015/lib/components/elements/field.component.js +4 -4
- package/esm2015/lib/components/elements/layout/element.component.js +4 -4
- package/esm2015/lib/components/elements/tables/table.component.js +2 -2
- package/esm2015/lib/components/forms/basic-form.js +3 -4
- package/fesm2015/tuain-ng-forms-lib.js +12 -13
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/components/elements/action.component.d.ts +1 -1
- package/lib/components/elements/field.component.d.ts +1 -1
- package/lib/components/elements/layout/element.component.d.ts +1 -1
- package/lib/components/elements/tables/table.component.d.ts +1 -1
- package/lib/components/forms/basic-form.d.ts +0 -1
- package/package.json +1 -1
- package/tuain-ng-forms-lib.metadata.json +1 -1
|
@@ -37,11 +37,11 @@ class ActionComponent {
|
|
|
37
37
|
}
|
|
38
38
|
get visible() {
|
|
39
39
|
var _a;
|
|
40
|
-
return ((_a = this.action) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
40
|
+
return ((_a = this.action) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state)) && this.visibleOnRestriction();
|
|
41
41
|
}
|
|
42
42
|
get disabled() {
|
|
43
43
|
var _a;
|
|
44
|
-
return !((_a = this.action) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
44
|
+
return !((_a = this.action) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
ActionComponent.decorators = [
|
|
@@ -54,7 +54,7 @@ ActionComponent.propDecorators = {
|
|
|
54
54
|
action: [{ type: Input }],
|
|
55
55
|
busy: [{ type: Input }],
|
|
56
56
|
relatedField: [{ type: Input }],
|
|
57
|
-
|
|
57
|
+
state: [{ type: Input }],
|
|
58
58
|
style: [{ type: Input }],
|
|
59
59
|
showLabel: [{ type: Input }]
|
|
60
60
|
};
|
|
@@ -122,11 +122,11 @@ class FieldComponent {
|
|
|
122
122
|
}
|
|
123
123
|
get visible() {
|
|
124
124
|
var _a;
|
|
125
|
-
return (_a = this.field) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
125
|
+
return (_a = this.field) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state);
|
|
126
126
|
}
|
|
127
127
|
get disabled() {
|
|
128
128
|
var _a;
|
|
129
|
-
return !((_a = this.field) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
129
|
+
return !((_a = this.field) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
FieldComponent.decorators = [
|
|
@@ -137,7 +137,7 @@ FieldComponent.decorators = [
|
|
|
137
137
|
];
|
|
138
138
|
FieldComponent.propDecorators = {
|
|
139
139
|
field: [{ type: Input }],
|
|
140
|
-
|
|
140
|
+
state: [{ type: Input }]
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
class ElementComponent {
|
|
@@ -149,11 +149,11 @@ class ElementComponent {
|
|
|
149
149
|
start() { }
|
|
150
150
|
get visible() {
|
|
151
151
|
var _a;
|
|
152
|
-
return (_a = this.element) === null || _a === void 0 ? void 0 : _a.visibleOn(this.
|
|
152
|
+
return (_a = this.element) === null || _a === void 0 ? void 0 : _a.visibleOn(this.state);
|
|
153
153
|
}
|
|
154
154
|
get disabled() {
|
|
155
155
|
var _a;
|
|
156
|
-
return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.
|
|
156
|
+
return !((_a = this.element) === null || _a === void 0 ? void 0 : _a.enabledOn(this.state));
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
ElementComponent.decorators = [
|
|
@@ -165,7 +165,7 @@ ElementComponent.decorators = [
|
|
|
165
165
|
ElementComponent.propDecorators = {
|
|
166
166
|
element: [{ type: Input }],
|
|
167
167
|
form: [{ type: Input }],
|
|
168
|
-
|
|
168
|
+
state: [{ type: Input }]
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
class FormErrorComponent {
|
|
@@ -1100,7 +1100,7 @@ LibTableComponent.propDecorators = {
|
|
|
1100
1100
|
table: [{ type: Input }],
|
|
1101
1101
|
tableRecords: [{ type: Input }],
|
|
1102
1102
|
disabled: [{ type: Input }],
|
|
1103
|
-
|
|
1103
|
+
state: [{ type: Input }],
|
|
1104
1104
|
waiting: [{ type: Input }]
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
@@ -2536,10 +2536,9 @@ class BasicFormComponent {
|
|
|
2536
2536
|
set formCode(name) { this.name = name; }
|
|
2537
2537
|
get inServerProcess() { return this.busy; }
|
|
2538
2538
|
get form() { return this._formStructure; }
|
|
2539
|
-
get state() { return this.
|
|
2539
|
+
get state() { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.state; }
|
|
2540
2540
|
get currentState() { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.state; }
|
|
2541
2541
|
set currentState(state) { this._formStructure.changeState(state); }
|
|
2542
|
-
get currentMode() { return this.currentState; }
|
|
2543
2542
|
get immutableData() { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.immutableData; }
|
|
2544
2543
|
get extraInfo() { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.extraInfo; }
|
|
2545
2544
|
get visibleSections() { var _a; return (_a = this._formStructure) === null || _a === void 0 ? void 0 : _a.visibleSections; }
|
|
@@ -2601,7 +2600,7 @@ class BasicFormComponent {
|
|
|
2601
2600
|
if (!cleanStack) {
|
|
2602
2601
|
origin = Object.assign(Object.assign({}, backData), { name: this.name, url: this._formRoute, token: this._controlToken });
|
|
2603
2602
|
origin.subject = (_a = origin === null || origin === void 0 ? void 0 : origin.subject) !== null && _a !== void 0 ? _a : this.formSubject;
|
|
2604
|
-
origin.state = (_b = origin === null || origin === void 0 ? void 0 : origin.state) !== null && _b !== void 0 ? _b : this.
|
|
2603
|
+
origin.state = (_b = origin === null || origin === void 0 ? void 0 : origin.state) !== null && _b !== void 0 ? _b : this.state;
|
|
2605
2604
|
origin.fields = (_c = origin === null || origin === void 0 ? void 0 : origin.fields) !== null && _c !== void 0 ? _c : {};
|
|
2606
2605
|
origin.extra = (_d = origin === null || origin === void 0 ? void 0 : origin.extra) !== null && _d !== void 0 ? _d : {};
|
|
2607
2606
|
}
|