@sd-angular/core 1.3.204 → 1.3.206
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/sd-angular-core-grid-material.umd.js +8 -1
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.js +91 -75
- package/bundles/sd-angular-core-table.umd.js.map +1 -1
- package/bundles/sd-angular-core-table.umd.min.js +1 -1
- package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/components/column-inline-filter/column-inline-filter.component.js +4 -1
- package/esm2015/grid-material/src/lib/grid-material.component.js +6 -2
- package/esm2015/grid-material/src/lib/services/grid-filter/grid-filter.model.js +1 -1
- package/esm2015/table/src/lib/table.component.js +17 -6
- package/fesm2015/sd-angular-core-grid-material.js +8 -1
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +16 -5
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/components/column-inline-filter/column-inline-filter.component.d.ts +2 -1
- package/grid-material/src/lib/grid-material.component.d.ts +2 -1
- package/grid-material/src/lib/services/grid-filter/grid-filter.model.d.ts +2 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.204.tgz → sd-angular-core-1.3.206.tgz} +0 -0
|
@@ -842,7 +842,7 @@ class SdTable {
|
|
|
842
842
|
const { columns } = this.tableOption;
|
|
843
843
|
const { rawColumnFilter, orderBy, orderDirection, pageSize, pageNumber } = filterInfo;
|
|
844
844
|
const items = localItems.filter(tableItem => {
|
|
845
|
-
var _a, _b, _c, _d;
|
|
845
|
+
var _a, _b, _c, _d, _e, _f;
|
|
846
846
|
const item = tableItem.data;
|
|
847
847
|
for (const column of columns) {
|
|
848
848
|
const { field, type } = column;
|
|
@@ -858,8 +858,19 @@ class SdTable {
|
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
else if (type === 'values' || type === 'lazy-values') {
|
|
861
|
-
|
|
862
|
-
|
|
861
|
+
const columnType = column;
|
|
862
|
+
const isMultiple = ['MULTIPLE'].includes(columnType.option.selection);
|
|
863
|
+
if (isMultiple) {
|
|
864
|
+
const columnValues = (_a = item[field].map(i => { var _a; return ((_a = i[columnType.option.valueField]) !== null && _a !== void 0 ? _a : '').toString().trim().toLowerCase(); })) !== null && _a !== void 0 ? _a : [];
|
|
865
|
+
const filterValues = (_b = rawColumnFilter[field]) === null || _b === void 0 ? void 0 : _b.map(v => (v !== null && v !== void 0 ? v : '').toString().trim().toLowerCase());
|
|
866
|
+
if ((filterValues === null || filterValues === void 0 ? void 0 : filterValues.length) && filterValues.some(fv => !columnValues.includes(fv))) {
|
|
867
|
+
return false;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
else {
|
|
871
|
+
if (columnValue !== filterValue) {
|
|
872
|
+
return false;
|
|
873
|
+
}
|
|
863
874
|
}
|
|
864
875
|
}
|
|
865
876
|
else if (type === 'number') {
|
|
@@ -895,8 +906,8 @@ class SdTable {
|
|
|
895
906
|
}
|
|
896
907
|
}
|
|
897
908
|
else if (type === 'datetime' || type === 'date' || type === 'time') {
|
|
898
|
-
const from = (
|
|
899
|
-
const to = (
|
|
909
|
+
const from = (_d = (_c = rawColumnFilter[field]) === null || _c === void 0 ? void 0 : _c.from) !== null && _d !== void 0 ? _d : rawColumnFilter[field];
|
|
910
|
+
const to = (_f = (_e = rawColumnFilter[field]) === null || _e === void 0 ? void 0 : _e.to) !== null && _f !== void 0 ? _f : rawColumnFilter[field];
|
|
900
911
|
const fromDate = Date.begin(from);
|
|
901
912
|
const toDate = Date.end(to);
|
|
902
913
|
if (fromDate || toDate) {
|