tuain-ng-forms-lib 12.0.76 → 12.0.80
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 +13 -8
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/action.js +3 -3
- package/esm2015/lib/classes/forms/field.js +2 -2
- package/esm2015/lib/classes/forms/table/action.js +4 -4
- package/esm2015/lib/classes/forms/table/table.js +2 -2
- package/esm2015/lib/components/elements/tables/table.component.js +7 -2
- package/fesm2015/tuain-ng-forms-lib.js +13 -8
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/table/table.d.ts +1 -1
- package/package.json +1 -1
|
@@ -733,7 +733,12 @@
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
LibTableComponent.prototype.filterHasChanged = function (column, values) {
|
|
736
|
-
|
|
736
|
+
if (!values || values.length === 0) {
|
|
737
|
+
this.table.removeColumnFilter(column.fieldCode);
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
this.table.addColumnFilter(column.fieldCode, values);
|
|
741
|
+
}
|
|
737
742
|
};
|
|
738
743
|
return LibTableComponent;
|
|
739
744
|
}());
|
|
@@ -875,7 +880,7 @@
|
|
|
875
880
|
__extends(FormAction, _super);
|
|
876
881
|
function FormAction(actionDefinition, formConfig) {
|
|
877
882
|
var _this = this;
|
|
878
|
-
var _a;
|
|
883
|
+
var _a, _b;
|
|
879
884
|
_this = _super.call(this, actionDefinition, formConfig) || this;
|
|
880
885
|
_this._actionActivated = new rxjs.Subject();
|
|
881
886
|
_this.inProgress = false;
|
|
@@ -888,7 +893,7 @@
|
|
|
888
893
|
_this.newState = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.newState;
|
|
889
894
|
_this.restrictedOnField = actionDefinition.fieldRestrictedCode ? actionDefinition.fieldRestrictedCode.toString() : '';
|
|
890
895
|
_this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
|
|
891
|
-
_this.restrictedOnValue = actionDefinition.valueRestricted
|
|
896
|
+
_this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
|
|
892
897
|
_this.customValidation = function () { return true; };
|
|
893
898
|
return _this;
|
|
894
899
|
}
|
|
@@ -1218,7 +1223,7 @@
|
|
|
1218
1223
|
FieldDescriptor.prototype.setFieldOptions = function (newOptions) {
|
|
1219
1224
|
var _this = this;
|
|
1220
1225
|
var _a;
|
|
1221
|
-
if ((this.
|
|
1226
|
+
if ((!this._formConfig.captureTypesWithOptions.includes(this.captureType))
|
|
1222
1227
|
|| typeof newOptions === UNDEFINED || !newOptions
|
|
1223
1228
|
|| !Array.isArray(newOptions)) {
|
|
1224
1229
|
return;
|
|
@@ -1368,7 +1373,7 @@
|
|
|
1368
1373
|
|
|
1369
1374
|
var TableAction = /** @class */ (function () {
|
|
1370
1375
|
function TableAction(actionDefinition) {
|
|
1371
|
-
var _a, _b;
|
|
1376
|
+
var _a, _b, _c;
|
|
1372
1377
|
this.actionCode = actionDefinition.actionCode;
|
|
1373
1378
|
this.actionTitle = actionDefinition.actionTitle;
|
|
1374
1379
|
this.iconName = actionDefinition.iconName || this.actionCode;
|
|
@@ -1380,9 +1385,9 @@
|
|
|
1380
1385
|
this.enabledStates = actionDefinition.enabledStates || [];
|
|
1381
1386
|
this.backend = (_a = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.serverAction) !== null && _a !== void 0 ? _a : false;
|
|
1382
1387
|
this.restrictedOnField = actionDefinition.fieldRestrictedCode || '';
|
|
1383
|
-
this.restrictedOnValue = actionDefinition.valueRestricted
|
|
1388
|
+
this.restrictedOnValue = (_b = actionDefinition.valueRestricted) !== null && _b !== void 0 ? _b : '';
|
|
1384
1389
|
this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
|
|
1385
|
-
this.customAttributes = (
|
|
1390
|
+
this.customAttributes = (_c = actionDefinition === null || actionDefinition === void 0 ? void 0 : actionDefinition.customAttributes) !== null && _c !== void 0 ? _c : {};
|
|
1386
1391
|
}
|
|
1387
1392
|
TableAction.prototype.supportMode = function (state) { return this.viewOnState(state); };
|
|
1388
1393
|
TableAction.prototype.viewOnState = function (state) { return this.visibleStates.includes(state); };
|
|
@@ -1661,7 +1666,7 @@
|
|
|
1661
1666
|
enumerable: false,
|
|
1662
1667
|
configurable: true
|
|
1663
1668
|
});
|
|
1664
|
-
RecordTable.prototype.getLayout = function (
|
|
1669
|
+
RecordTable.prototype.getLayout = function () { return this.layout; };
|
|
1665
1670
|
RecordTable.prototype.setLayout = function (layout) { this.setAttr('layout', layout); };
|
|
1666
1671
|
RecordTable.prototype.hasActions = function () { return (this._actions.length > 0); };
|
|
1667
1672
|
RecordTable.prototype.getSelectedRecords = function () { return this.tableRecords.filter(function (rec) { return rec.selected; }).map(function (rec) { return rec.recordId; }); };
|