tuain-ng-forms-lib 12.0.67 → 12.0.68
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 +23 -19
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/form.constants.js +11 -11
- package/esm2015/lib/classes/forms/table/column.js +6 -3
- package/esm2015/lib/classes/forms/table/row-data.js +4 -4
- package/esm2015/lib/components/elements/tables/table.component.js +6 -5
- package/fesm2015/tuain-ng-forms-lib.js +23 -19
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/form.constants.d.ts +3 -3
- package/lib/classes/forms/table/column.d.ts +1 -0
- package/lib/components/elements/tables/table.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -726,13 +726,14 @@
|
|
|
726
726
|
LibTableComponent.prototype.syncAttribute = function (name, value) {
|
|
727
727
|
try {
|
|
728
728
|
this[name] = value;
|
|
729
|
+
return true;
|
|
729
730
|
}
|
|
730
|
-
catch (
|
|
731
|
-
|
|
731
|
+
catch (_a) {
|
|
732
|
+
return false;
|
|
732
733
|
}
|
|
733
734
|
};
|
|
734
|
-
LibTableComponent.prototype.filterHasChanged = function (
|
|
735
|
-
this.table.addColumnFilter(
|
|
735
|
+
LibTableComponent.prototype.filterHasChanged = function (column, values) {
|
|
736
|
+
this.table.addColumnFilter(column.fieldCode, values);
|
|
736
737
|
};
|
|
737
738
|
return LibTableComponent;
|
|
738
739
|
}());
|
|
@@ -765,16 +766,16 @@
|
|
|
765
766
|
validate: 'VALIDATE',
|
|
766
767
|
};
|
|
767
768
|
var operators = {
|
|
768
|
-
G: '
|
|
769
|
-
L: '
|
|
770
|
-
GE: '
|
|
771
|
-
LE: '
|
|
772
|
-
EQ: '
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
BETWEEN: '
|
|
777
|
-
IN: '
|
|
769
|
+
G: 'G',
|
|
770
|
+
L: 'L',
|
|
771
|
+
GE: 'GE',
|
|
772
|
+
LE: 'LE',
|
|
773
|
+
EQ: 'EQ',
|
|
774
|
+
NEQ: 'NEQ',
|
|
775
|
+
HAS: 'HAS',
|
|
776
|
+
NOTHAS: 'NOTHAS',
|
|
777
|
+
BETWEEN: 'BETWEEN',
|
|
778
|
+
IN: 'IN'
|
|
778
779
|
};
|
|
779
780
|
|
|
780
781
|
var FormElement = /** @class */ (function () {
|
|
@@ -1303,11 +1304,14 @@
|
|
|
1303
1304
|
this.fieldAlignment = (recTableColReceived.alignment != null) ? recTableColReceived.alignment.toLowerCase() : defaultTypeAlignment;
|
|
1304
1305
|
this.visible = (_a = recTableColReceived === null || recTableColReceived === void 0 ? void 0 : recTableColReceived.visible) !== null && _a !== void 0 ? _a : true;
|
|
1305
1306
|
this.sortable = (_b = recTableColReceived === null || recTableColReceived === void 0 ? void 0 : recTableColReceived.sortable) !== null && _b !== void 0 ? _b : false;
|
|
1306
|
-
this.sortDirections = (this.sortable) ? ['ascend', 'descend'
|
|
1307
|
+
this.sortDirections = (this.sortable) ? ['ascend', 'descend'] : [null];
|
|
1307
1308
|
this.fieldFormat = recTableColReceived.format || '';
|
|
1308
1309
|
this.customAttributes = (_c = recTableColReceived === null || recTableColReceived === void 0 ? void 0 : recTableColReceived.customAttributes) !== null && _c !== void 0 ? _c : {};
|
|
1309
1310
|
}
|
|
1310
1311
|
}
|
|
1312
|
+
RecordTableColumn.prototype.hideFilter = function () {
|
|
1313
|
+
this.filterVisible = false;
|
|
1314
|
+
};
|
|
1311
1315
|
RecordTableColumn.prototype.addFilterDefinition = function (filterDefinition) {
|
|
1312
1316
|
var _a;
|
|
1313
1317
|
this.filterDef = {
|
|
@@ -1351,7 +1355,7 @@
|
|
|
1351
1355
|
configurable: true
|
|
1352
1356
|
});
|
|
1353
1357
|
RecordTableColumn.prototype.serSortDirections = function (ascend, descend) {
|
|
1354
|
-
this.sortDirections = [
|
|
1358
|
+
this.sortDirections = [];
|
|
1355
1359
|
if (ascend) {
|
|
1356
1360
|
this.sortDirections.unshift('ascend');
|
|
1357
1361
|
}
|
|
@@ -1492,13 +1496,13 @@
|
|
|
1492
1496
|
if (operator === operators.EQ) {
|
|
1493
1497
|
return fieldValue === values[0];
|
|
1494
1498
|
}
|
|
1495
|
-
if (operator === operators.
|
|
1499
|
+
if (operator === operators.NEQ && fieldValue === values[0]) {
|
|
1496
1500
|
return false;
|
|
1497
1501
|
}
|
|
1498
|
-
if (operator === operators.
|
|
1502
|
+
if (operator === operators.HAS && !stringValue.includes(values[0].toString().toUpperCase())) {
|
|
1499
1503
|
return false;
|
|
1500
1504
|
}
|
|
1501
|
-
if (operator === operators.
|
|
1505
|
+
if (operator === operators.NOTHAS && stringValue.includes(values[0].toString().toUpperCase())) {
|
|
1502
1506
|
return false;
|
|
1503
1507
|
}
|
|
1504
1508
|
if (operator === operators.BETWEEN && (fieldValue < values[0] || fieldValue > values[1])) {
|