@sd-angular/core 1.3.89 → 1.3.90
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 +134 -132
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/grid-material.component.js +12 -11
- package/fesm2015/sd-angular-core-grid-material.js +11 -10
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.89.tgz → sd-angular-core-1.3.90.tgz} +0 -0
|
@@ -1691,7 +1691,7 @@ class SdGridMaterial {
|
|
|
1691
1691
|
for (const item of exportItems) {
|
|
1692
1692
|
const obj = {};
|
|
1693
1693
|
const handle = (exportColumn) => __awaiter(this, void 0, void 0, function* () {
|
|
1694
|
-
var _t, _u;
|
|
1694
|
+
var _t, _u, _v;
|
|
1695
1695
|
obj[exportColumn.field] = item[exportColumn.field];
|
|
1696
1696
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
1697
1697
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
@@ -1719,6 +1719,7 @@ class SdGridMaterial {
|
|
|
1719
1719
|
else {
|
|
1720
1720
|
obj[column.field] = transform;
|
|
1721
1721
|
}
|
|
1722
|
+
obj[column.field] = (_t = obj[column.field]) !== null && _t !== void 0 ? _t : '';
|
|
1722
1723
|
}
|
|
1723
1724
|
else if (item[column.field] === undefined || item[column.field] === null || item[column.field] === '') {
|
|
1724
1725
|
obj[column.field] = '';
|
|
@@ -1730,10 +1731,10 @@ class SdGridMaterial {
|
|
|
1730
1731
|
else if (column.type === 'bool') {
|
|
1731
1732
|
// Nếu là bool thì gán bằng giá trị trueValue và falseValue (nếu có), mặc định là TRUE/FALSE
|
|
1732
1733
|
if (item[column.field]) {
|
|
1733
|
-
obj[column.field] = ((
|
|
1734
|
+
obj[column.field] = ((_u = column.option) === null || _u === void 0 ? void 0 : _u.displayOnTrue) || 'True';
|
|
1734
1735
|
}
|
|
1735
1736
|
else if (obj[column.field] !== undefined && obj[column.field] !== null) {
|
|
1736
|
-
obj[column.field] = ((
|
|
1737
|
+
obj[column.field] = ((_v = column.option) === null || _v === void 0 ? void 0 : _v.displayOnFalse) || 'False';
|
|
1737
1738
|
}
|
|
1738
1739
|
}
|
|
1739
1740
|
else if (column.type === 'date') {
|
|
@@ -1848,8 +1849,8 @@ class SdGridMaterial {
|
|
|
1848
1849
|
this.reload(false);
|
|
1849
1850
|
};
|
|
1850
1851
|
this.onExpand = (rowData) => __awaiter(this, void 0, void 0, function* () {
|
|
1851
|
-
var
|
|
1852
|
-
if ((
|
|
1852
|
+
var _w, _x, _y, _z, _0;
|
|
1853
|
+
if ((_w = this.gridOption.subInformation) === null || _w === void 0 ? void 0 : _w.always) {
|
|
1853
1854
|
return;
|
|
1854
1855
|
}
|
|
1855
1856
|
if (rowData.isExpanding) {
|
|
@@ -1859,8 +1860,8 @@ class SdGridMaterial {
|
|
|
1859
1860
|
rowData.isExpanded = false;
|
|
1860
1861
|
return;
|
|
1861
1862
|
}
|
|
1862
|
-
const data = (
|
|
1863
|
-
if (!((
|
|
1863
|
+
const data = (_z = (_y = (_x = this.gridOption) === null || _x === void 0 ? void 0 : _x.subInformation) === null || _y === void 0 ? void 0 : _y.onExpand) === null || _z === void 0 ? void 0 : _z.call(_y, rowData);
|
|
1864
|
+
if (!((_0 = this.gridOption.subInformation) === null || _0 === void 0 ? void 0 : _0.multiple)) {
|
|
1864
1865
|
this.items.forEach(item => item.isExpanding = item.isExpanded = false);
|
|
1865
1866
|
}
|
|
1866
1867
|
if (data instanceof Promise) {
|
|
@@ -2075,7 +2076,7 @@ class SdGridMaterial {
|
|
|
2075
2076
|
this.ref.detectChanges();
|
|
2076
2077
|
};
|
|
2077
2078
|
this.onRemove = (item) => __awaiter(this, void 0, void 0, function* () {
|
|
2078
|
-
var
|
|
2079
|
+
var _1, _2;
|
|
2079
2080
|
const { editor } = this.gridOption;
|
|
2080
2081
|
if (editor === null || editor === void 0 ? void 0 : editor.beforeRemove) {
|
|
2081
2082
|
const beforeRemove = editor === null || editor === void 0 ? void 0 : editor.beforeRemove(item);
|
|
@@ -2101,10 +2102,10 @@ class SdGridMaterial {
|
|
|
2101
2102
|
this.items.splice(idx1, 1);
|
|
2102
2103
|
this.items = [...this.items];
|
|
2103
2104
|
if (this.gridOption.type === 'local') {
|
|
2104
|
-
(
|
|
2105
|
+
(_1 = editor === null || editor === void 0 ? void 0 : editor.onRemove) === null || _1 === void 0 ? void 0 : _1.call(editor, item, __classPrivateFieldGet(this, _localItems));
|
|
2105
2106
|
}
|
|
2106
2107
|
else {
|
|
2107
|
-
(
|
|
2108
|
+
(_2 = editor === null || editor === void 0 ? void 0 : editor.onRemove) === null || _2 === void 0 ? void 0 : _2.call(editor, item, this.items);
|
|
2108
2109
|
}
|
|
2109
2110
|
this.ref.detectChanges();
|
|
2110
2111
|
return;
|