@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.
Files changed (36) hide show
  1. package/bundles/sd-angular-core-export.umd.js +1 -1
  2. package/bundles/sd-angular-core-export.umd.js.map +1 -1
  3. package/bundles/sd-angular-core-export.umd.min.js +1 -1
  4. package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
  5. package/bundles/sd-angular-core-grid-material.umd.js +10 -0
  6. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  7. package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
  8. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  9. package/bundles/sd-angular-core-table.umd.js +42 -13
  10. package/bundles/sd-angular-core-table.umd.js.map +1 -1
  11. package/bundles/sd-angular-core-table.umd.min.js +1 -1
  12. package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
  13. package/bundles/sd-angular-core-upload-file.umd.js +6 -1
  14. package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
  15. package/bundles/sd-angular-core-upload-file.umd.min.js +1 -1
  16. package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
  17. package/esm2015/export/src/lib/export.service.js +2 -2
  18. package/esm2015/grid-material/src/lib/models/grid-column.model.js +11 -1
  19. package/esm2015/table/src/lib/models/table-column.model.js +11 -1
  20. package/esm2015/table/src/lib/services/table-configuration.service.js +33 -14
  21. package/esm2015/upload-file/src/lib/upload-file.component.js +7 -2
  22. package/fesm2015/sd-angular-core-export.js +1 -1
  23. package/fesm2015/sd-angular-core-export.js.map +1 -1
  24. package/fesm2015/sd-angular-core-grid-material.js +10 -0
  25. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  26. package/fesm2015/sd-angular-core-table.js +42 -13
  27. package/fesm2015/sd-angular-core-table.js.map +1 -1
  28. package/fesm2015/sd-angular-core-upload-file.js +6 -1
  29. package/fesm2015/sd-angular-core-upload-file.js.map +1 -1
  30. package/grid-material/src/lib/models/grid-column.model.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/{sd-angular-core-1.3.209.tgz → sd-angular-core-1.3.211.tgz} +0 -0
  33. package/table/src/lib/models/table-column.model.d.ts +1 -1
  34. package/table/src/lib/services/table-configuration.service.d.ts +2 -2
  35. package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
  36. 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 (gridOption) {
640
- if (!(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
639
+ _getSetting.set(this, function (option) {
640
+ // Nếu không 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
- return _this.settingService.create({ prefix: __classPrivateFieldGet(_this, _prefix), key: gridOption.key }, {
644
- default: __classPrivateFieldGet(_this, _default).call(_this, gridOption),
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 (gridOption) {
648
- if (!(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
649
- return __classPrivateFieldGet(_this, _default).call(_this, gridOption);
649
+ this.loadConfiguration = function (option) {
650
+ // Nếu không 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, gridOption);
654
+ var setting = __classPrivateFieldGet(_this, _getSetting).call(_this, option);
652
655
  return setting.get();
653
656
  };
654
- this.loadConfigurationResult = function (gridOption, configuration) {
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 _c = gridOption || {}, selector = _c.selector, commands = _c.commands, group = _c.group;
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
- var column = gridOption === null || gridOption === void 0 ? void 0 : gridOption.columns.find(function (e) { return e.field === col.origin.field; });
685
+ // Kiểm tra column trong config 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
- if (gridOption.expand) {
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;