@sd-angular/core 1.3.209 → 1.3.211
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-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/bundles/sd-angular-core-upload-file.umd.js +6 -1
- package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-file.umd.min.js +1 -1
- package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
- 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/esm2015/upload-file/src/lib/upload-file.component.js +7 -2
- 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/fesm2015/sd-angular-core-upload-file.js +6 -1
- package/fesm2015/sd-angular-core-upload-file.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.209.tgz → sd-angular-core-1.3.211.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
- package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
- package/upload-file/src/lib/upload-file.component.d.ts +1 -0
|
@@ -636,23 +636,26 @@
|
|
|
636
636
|
GROUP: 'sdGroup',
|
|
637
637
|
});
|
|
638
638
|
_prefix.set(this, 'c9e94836-6ace-4aeb-b148-4f0be63589ee');
|
|
639
|
-
_getSetting.set(this, function (
|
|
640
|
-
|
|
639
|
+
_getSetting.set(this, function (option) {
|
|
640
|
+
// Nếu không có key thì không lấy được setting
|
|
641
|
+
if (!(option === null || option === void 0 ? void 0 : option.key)) {
|
|
641
642
|
return null;
|
|
642
643
|
}
|
|
643
|
-
|
|
644
|
-
|
|
644
|
+
// 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
|
|
645
|
+
return _this.settingService.create({ prefix: __classPrivateFieldGet(_this, _prefix), key: option.key }, {
|
|
646
|
+
default: __classPrivateFieldGet(_this, _default).call(_this, option),
|
|
645
647
|
});
|
|
646
648
|
});
|
|
647
|
-
this.loadConfiguration = function (
|
|
648
|
-
|
|
649
|
-
|
|
649
|
+
this.loadConfiguration = function (option) {
|
|
650
|
+
// Nếu không có key thì trả về thông tin mặc định
|
|
651
|
+
if (!(option === null || option === void 0 ? void 0 : option.key)) {
|
|
652
|
+
return __classPrivateFieldGet(_this, _default).call(_this, option);
|
|
650
653
|
}
|
|
651
|
-
var setting = __classPrivateFieldGet(_this, _getSetting).call(_this,
|
|
654
|
+
var setting = __classPrivateFieldGet(_this, _getSetting).call(_this, option);
|
|
652
655
|
return setting.get();
|
|
653
656
|
};
|
|
654
|
-
this.loadConfigurationResult = function (
|
|
655
|
-
var _a, _b;
|
|
657
|
+
this.loadConfigurationResult = function (option, configuration) {
|
|
658
|
+
var _a, _b, _c;
|
|
656
659
|
var result = {
|
|
657
660
|
column: {},
|
|
658
661
|
fixedColumn: {},
|
|
@@ -664,7 +667,7 @@
|
|
|
664
667
|
displayedFooters: [],
|
|
665
668
|
multipleHeader: false,
|
|
666
669
|
};
|
|
667
|
-
var
|
|
670
|
+
var _d = option || {}, selector = _d.selector, commands = _d.commands, group = _d.group;
|
|
668
671
|
if (selector === null || selector === void 0 ? void 0 : selector.visible) {
|
|
669
672
|
result.firstHeaders.push(__classPrivateFieldGet(_this, _COLUMNS).SELECTION);
|
|
670
673
|
result.displayedColumns.push(__classPrivateFieldGet(_this, _COLUMNS).SELECTION);
|
|
@@ -679,7 +682,9 @@
|
|
|
679
682
|
}
|
|
680
683
|
(_b = configuration === null || configuration === void 0 ? void 0 : configuration.columns) === null || _b === void 0 ? void 0 : _b.filter(function (col) { return !col.invisible; }).forEach(function (col) {
|
|
681
684
|
var _a;
|
|
682
|
-
|
|
685
|
+
// Kiểm tra column trong config có còn được khai báo trong option
|
|
686
|
+
// Nếu không thì ẩn column đó đi
|
|
687
|
+
var column = option === null || option === void 0 ? void 0 : option.columns.find(function (e) { return e.field === col.origin.field; });
|
|
683
688
|
if (column) {
|
|
684
689
|
result.column[col.origin.field] = {
|
|
685
690
|
title: col.title || col.origin.title,
|
|
@@ -703,7 +708,21 @@
|
|
|
703
708
|
}
|
|
704
709
|
}
|
|
705
710
|
});
|
|
706
|
-
|
|
711
|
+
// Nếu có thêm các column mới, chèn các column đó vào cuối
|
|
712
|
+
(_c = option === null || option === void 0 ? void 0 : option.columns) === null || _c === void 0 ? void 0 : _c.filter(function (column) { var _a; return !((_a = configuration === null || configuration === void 0 ? void 0 : configuration.columns) === null || _a === void 0 ? void 0 : _a.some(function (e) { return e.origin.field === column.field; })); }).forEach(function (column) {
|
|
713
|
+
var _a;
|
|
714
|
+
result.firstColumns.push(Object.assign(Object.assign({}, column), { title: column.title, width: column.width }));
|
|
715
|
+
result.firstHeaders.push(column.field);
|
|
716
|
+
result.displayedColumns.push(column.field);
|
|
717
|
+
if (column.type === 'children') {
|
|
718
|
+
(_a = column.children) === null || _a === void 0 ? void 0 : _a.forEach(function (childColumn) {
|
|
719
|
+
result.secondColumns.push(childColumn);
|
|
720
|
+
result.secondHeaders.push(childColumn.field);
|
|
721
|
+
result.displayedColumns.push(childColumn.field);
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
if (option.expand) {
|
|
707
726
|
result.firstHeaders.push(__classPrivateFieldGet(_this, _COLUMNS).SUBINFORMATION);
|
|
708
727
|
result.displayedColumns.push(__classPrivateFieldGet(_this, _COLUMNS).SUBINFORMATION);
|
|
709
728
|
}
|
|
@@ -3285,6 +3304,16 @@
|
|
|
3285
3304
|
symbol: 'event_list',
|
|
3286
3305
|
display: 'Không nằm trong',
|
|
3287
3306
|
},
|
|
3307
|
+
{
|
|
3308
|
+
value: 'NULL',
|
|
3309
|
+
symbol: 'motion_photos_off',
|
|
3310
|
+
display: 'Là rỗng',
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
value: 'NOT_NULL',
|
|
3314
|
+
symbol: 'adjust',
|
|
3315
|
+
display: 'Không rỗng',
|
|
3316
|
+
},
|
|
3288
3317
|
];
|
|
3289
3318
|
|
|
3290
3319
|
var _inlineOperator_1, _valueChanges, _subcription;
|