@sd-angular/core 1.3.181 → 1.3.182
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-table.umd.js +175 -174
- 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/table/src/lib/services/table-configuration.service.js +2 -2
- package/esm2015/table/src/lib/table.component.js +13 -12
- package/fesm2015/sd-angular-core-table.js +13 -12
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.181.tgz → sd-angular-core-1.3.182.tgz} +0 -0
|
@@ -288,7 +288,7 @@ class SdTableConfigurationService {
|
|
|
288
288
|
SELECTION: 'sdSelection',
|
|
289
289
|
GROUP: 'sdGroup',
|
|
290
290
|
});
|
|
291
|
-
_prefix.set(this, '
|
|
291
|
+
_prefix.set(this, 'c9e94836-6ace-4aeb-b148-4f0be63589ee');
|
|
292
292
|
_getSetting.set(this, (gridOption) => {
|
|
293
293
|
if (!(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
|
|
294
294
|
return null;
|
|
@@ -1127,7 +1127,7 @@ class SdTable {
|
|
|
1127
1127
|
for (const item of exportItems) {
|
|
1128
1128
|
const obj = {};
|
|
1129
1129
|
const handle = (exportColumn) => __awaiter(this, void 0, void 0, function* () {
|
|
1130
|
-
var _v, _w, _x, _y;
|
|
1130
|
+
var _v, _w, _x, _y, _z;
|
|
1131
1131
|
obj[exportColumn.field] = item[exportColumn.field];
|
|
1132
1132
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
1133
1133
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
@@ -1188,9 +1188,10 @@ class SdTable {
|
|
|
1188
1188
|
// Nếu là time thì convert theo đúng format
|
|
1189
1189
|
obj[column.field] = Date.toFormat(date, 'HH:mm');
|
|
1190
1190
|
}
|
|
1191
|
-
else if (column.type === 'values') {
|
|
1191
|
+
else if (column.type === 'values' || column.type === 'lazy-values') {
|
|
1192
1192
|
// Nếu là values thì lấy giá trị của value được chọn
|
|
1193
|
-
obj[column.field] =
|
|
1193
|
+
obj[column.field] =
|
|
1194
|
+
((_z = (_y = __classPrivateFieldGet(this, _cacheObjValues)[column.field]) === null || _y === void 0 ? void 0 : _y[item[column.field]]) === null || _z === void 0 ? void 0 : _z[column.option.displayField]) || item[column.field];
|
|
1194
1195
|
}
|
|
1195
1196
|
else {
|
|
1196
1197
|
obj[column.field] = item[column.field];
|
|
@@ -1280,8 +1281,8 @@ class SdTable {
|
|
|
1280
1281
|
});
|
|
1281
1282
|
};
|
|
1282
1283
|
this.onExpand = (rowData) => __awaiter(this, void 0, void 0, function* () {
|
|
1283
|
-
var
|
|
1284
|
-
if ((
|
|
1284
|
+
var _0, _1, _2, _3, _4;
|
|
1285
|
+
if ((_0 = this.tableOption.expand) === null || _0 === void 0 ? void 0 : _0.always) {
|
|
1285
1286
|
return;
|
|
1286
1287
|
}
|
|
1287
1288
|
if (rowData.meta.expand.isExpanding) {
|
|
@@ -1291,8 +1292,8 @@ class SdTable {
|
|
|
1291
1292
|
rowData.meta.expand.isExpanded = false;
|
|
1292
1293
|
return;
|
|
1293
1294
|
}
|
|
1294
|
-
const data = (
|
|
1295
|
-
if (!((
|
|
1295
|
+
const data = (_3 = (_2 = (_1 = this.tableOption) === null || _1 === void 0 ? void 0 : _1.expand) === null || _2 === void 0 ? void 0 : _2.onExpand) === null || _3 === void 0 ? void 0 : _3.call(_2, rowData.data);
|
|
1296
|
+
if (!((_4 = this.tableOption.expand) === null || _4 === void 0 ? void 0 : _4.multiple)) {
|
|
1296
1297
|
this.items.forEach(item => (item.meta.expand.isExpanding = item.meta.expand.isExpanded = false));
|
|
1297
1298
|
}
|
|
1298
1299
|
if (data instanceof Promise) {
|
|
@@ -1408,7 +1409,7 @@ class SdTable {
|
|
|
1408
1409
|
}
|
|
1409
1410
|
}));
|
|
1410
1411
|
_format.set(this, (rawItems, columns) => __awaiter(this, void 0, void 0, function* () {
|
|
1411
|
-
var
|
|
1412
|
+
var _5, _6, _7, _8, _9;
|
|
1412
1413
|
const items = rawItems.map(MapToSdTableItem);
|
|
1413
1414
|
for (const column of columns) {
|
|
1414
1415
|
// Clickable
|
|
@@ -1487,10 +1488,10 @@ class SdTable {
|
|
|
1487
1488
|
}
|
|
1488
1489
|
if (column.type === 'values' || column.type === 'lazy-values') {
|
|
1489
1490
|
if (column.type === 'lazy-values' && typeof column.option.mapValue === 'function') {
|
|
1490
|
-
display.data = ((
|
|
1491
|
+
display.data = ((_6 = (_5 = __classPrivateFieldGet(this, _cacheObjValues)[field]) === null || _5 === void 0 ? void 0 : _5[column.option.mapValue(value, rowData)]) === null || _6 === void 0 ? void 0 : _6[column.option.displayField]) || value;
|
|
1491
1492
|
}
|
|
1492
1493
|
else {
|
|
1493
|
-
display.data = ((
|
|
1494
|
+
display.data = ((_8 = (_7 = __classPrivateFieldGet(this, _cacheObjValues)[field]) === null || _7 === void 0 ? void 0 : _7[value]) === null || _8 === void 0 ? void 0 : _8[column.option.displayField]) || value;
|
|
1494
1495
|
}
|
|
1495
1496
|
}
|
|
1496
1497
|
if (column.type === 'number' && Number.isNumber(value)) {
|
|
@@ -1510,7 +1511,7 @@ class SdTable {
|
|
|
1510
1511
|
display.badge = {
|
|
1511
1512
|
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'icon' : column.badgeType,
|
|
1512
1513
|
color: column.badge(value, rowData),
|
|
1513
|
-
icon: (
|
|
1514
|
+
icon: (_9 = column.badgeIcon) === null || _9 === void 0 ? void 0 : _9.call(column, value, rowData),
|
|
1514
1515
|
};
|
|
1515
1516
|
}
|
|
1516
1517
|
else if (column.type === 'bool') {
|