@sd-angular/core 1.3.208 → 1.3.210
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-chip.umd.js +1 -1
- package/bundles/sd-angular-core-chip.umd.js.map +1 -1
- package/bundles/sd-angular-core-chip.umd.min.js +2 -2
- package/bundles/sd-angular-core-chip.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.js +1 -1
- package/bundles/sd-angular-core-export.umd.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.min.js +1 -1
- package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +10 -0
- 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 +42 -13
- 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/chip/sd-angular-core-chip.metadata.json +1 -1
- package/esm2015/chip/src/lib/chip.component.js +2 -2
- package/esm2015/export/src/lib/export.service.js +2 -2
- package/esm2015/grid-material/src/lib/models/grid-column.model.js +11 -1
- package/esm2015/table/src/lib/models/table-column.model.js +11 -1
- package/esm2015/table/src/lib/services/table-configuration.service.js +33 -14
- package/fesm2015/sd-angular-core-chip.js +1 -1
- package/fesm2015/sd-angular-core-chip.js.map +1 -1
- package/fesm2015/sd-angular-core-export.js +1 -1
- package/fesm2015/sd-angular-core-export.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +10 -0
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-table.js +42 -13
- package/fesm2015/sd-angular-core-table.js.map +1 -1
- package/grid-material/src/lib/models/grid-column.model.d.ts +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.3.208.tgz → sd-angular-core-1.3.210.tgz} +0 -0
- package/table/src/lib/models/table-column.model.d.ts +1 -1
- package/table/src/lib/services/table-configuration.service.d.ts +2 -2
|
@@ -290,23 +290,26 @@ class SdTableConfigurationService {
|
|
|
290
290
|
GROUP: 'sdGroup',
|
|
291
291
|
});
|
|
292
292
|
_prefix.set(this, 'c9e94836-6ace-4aeb-b148-4f0be63589ee');
|
|
293
|
-
_getSetting.set(this, (
|
|
294
|
-
|
|
293
|
+
_getSetting.set(this, (option) => {
|
|
294
|
+
// Nếu không có key thì không lấy được setting
|
|
295
|
+
if (!(option === null || option === void 0 ? void 0 : option.key)) {
|
|
295
296
|
return null;
|
|
296
297
|
}
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
// Key của setting là tổ hợp từ key truyền vào và prefix để tránh chung key với các tính năng khác cũng dùng key trong core table
|
|
299
|
+
return this.settingService.create({ prefix: __classPrivateFieldGet(this, _prefix), key: option.key }, {
|
|
300
|
+
default: __classPrivateFieldGet(this, _default).call(this, option),
|
|
299
301
|
});
|
|
300
302
|
});
|
|
301
|
-
this.loadConfiguration = (
|
|
302
|
-
|
|
303
|
-
|
|
303
|
+
this.loadConfiguration = (option) => {
|
|
304
|
+
// Nếu không có key thì trả về thông tin mặc định
|
|
305
|
+
if (!(option === null || option === void 0 ? void 0 : option.key)) {
|
|
306
|
+
return __classPrivateFieldGet(this, _default).call(this, option);
|
|
304
307
|
}
|
|
305
|
-
const setting = __classPrivateFieldGet(this, _getSetting).call(this,
|
|
308
|
+
const setting = __classPrivateFieldGet(this, _getSetting).call(this, option);
|
|
306
309
|
return setting.get();
|
|
307
310
|
};
|
|
308
|
-
this.loadConfigurationResult = (
|
|
309
|
-
var _a, _b;
|
|
311
|
+
this.loadConfigurationResult = (option, configuration) => {
|
|
312
|
+
var _a, _b, _c;
|
|
310
313
|
const result = {
|
|
311
314
|
column: {},
|
|
312
315
|
fixedColumn: {},
|
|
@@ -318,7 +321,7 @@ class SdTableConfigurationService {
|
|
|
318
321
|
displayedFooters: [],
|
|
319
322
|
multipleHeader: false,
|
|
320
323
|
};
|
|
321
|
-
const { selector, commands, group } =
|
|
324
|
+
const { selector, commands, group } = option || {};
|
|
322
325
|
if (selector === null || selector === void 0 ? void 0 : selector.visible) {
|
|
323
326
|
result.firstHeaders.push(__classPrivateFieldGet(this, _COLUMNS).SELECTION);
|
|
324
327
|
result.displayedColumns.push(__classPrivateFieldGet(this, _COLUMNS).SELECTION);
|
|
@@ -333,7 +336,9 @@ class SdTableConfigurationService {
|
|
|
333
336
|
}
|
|
334
337
|
(_b = configuration === null || configuration === void 0 ? void 0 : configuration.columns) === null || _b === void 0 ? void 0 : _b.filter(col => !col.invisible).forEach(col => {
|
|
335
338
|
var _a;
|
|
336
|
-
|
|
339
|
+
// Kiểm tra column trong config có còn được khai báo trong option
|
|
340
|
+
// Nếu không thì ẩn column đó đi
|
|
341
|
+
const column = option === null || option === void 0 ? void 0 : option.columns.find(e => e.field === col.origin.field);
|
|
337
342
|
if (column) {
|
|
338
343
|
result.column[col.origin.field] = {
|
|
339
344
|
title: col.title || col.origin.title,
|
|
@@ -357,7 +362,21 @@ class SdTableConfigurationService {
|
|
|
357
362
|
}
|
|
358
363
|
}
|
|
359
364
|
});
|
|
360
|
-
|
|
365
|
+
// Nếu có thêm các column mới, chèn các column đó vào cuối
|
|
366
|
+
(_c = option === null || option === void 0 ? void 0 : option.columns) === null || _c === void 0 ? void 0 : _c.filter(column => { var _a; return !((_a = configuration === null || configuration === void 0 ? void 0 : configuration.columns) === null || _a === void 0 ? void 0 : _a.some(e => e.origin.field === column.field)); }).forEach(column => {
|
|
367
|
+
var _a;
|
|
368
|
+
result.firstColumns.push(Object.assign(Object.assign({}, column), { title: column.title, width: column.width }));
|
|
369
|
+
result.firstHeaders.push(column.field);
|
|
370
|
+
result.displayedColumns.push(column.field);
|
|
371
|
+
if (column.type === 'children') {
|
|
372
|
+
(_a = column.children) === null || _a === void 0 ? void 0 : _a.forEach(childColumn => {
|
|
373
|
+
result.secondColumns.push(childColumn);
|
|
374
|
+
result.secondHeaders.push(childColumn.field);
|
|
375
|
+
result.displayedColumns.push(childColumn.field);
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
if (option.expand) {
|
|
361
380
|
result.firstHeaders.push(__classPrivateFieldGet(this, _COLUMNS).SUBINFORMATION);
|
|
362
381
|
result.displayedColumns.push(__classPrivateFieldGet(this, _COLUMNS).SUBINFORMATION);
|
|
363
382
|
}
|
|
@@ -2197,6 +2216,16 @@ const SdFilterOperators = [
|
|
|
2197
2216
|
symbol: 'event_list',
|
|
2198
2217
|
display: 'Không nằm trong',
|
|
2199
2218
|
},
|
|
2219
|
+
{
|
|
2220
|
+
value: 'NULL',
|
|
2221
|
+
symbol: 'motion_photos_off',
|
|
2222
|
+
display: 'Là rỗng',
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
value: 'NOT_NULL',
|
|
2226
|
+
symbol: 'adjust',
|
|
2227
|
+
display: 'Không rỗng',
|
|
2228
|
+
},
|
|
2200
2229
|
];
|
|
2201
2230
|
|
|
2202
2231
|
var _inlineOperator_1, _valueChanges, _subcription;
|