@sd-angular/core 1.3.182 → 1.3.184

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 (24) hide show
  1. package/bundles/sd-angular-core-table.umd.js +91 -40
  2. package/bundles/sd-angular-core-table.umd.js.map +1 -1
  3. package/bundles/sd-angular-core-table.umd.min.js +1 -1
  4. package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
  5. package/esm2015/table/sd-angular-core-table.js +2 -2
  6. package/esm2015/table/src/lib/components/popup-configuration/popup-configuration.component.js +5 -5
  7. package/esm2015/table/src/lib/components/popup-filter/popup-filter.component.js +1 -1
  8. package/esm2015/table/src/lib/components/table-filter/table-filter.component.js +1 -1
  9. package/esm2015/table/src/lib/directives/sd-table-filter-def.directive.js +5 -5
  10. package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +1 -1
  11. package/esm2015/table/src/lib/table.component.js +64 -15
  12. package/esm2015/table/src/lib/table.module.js +4 -4
  13. package/fesm2015/sd-angular-core-table.js +73 -24
  14. package/fesm2015/sd-angular-core-table.js.map +1 -1
  15. package/package.json +1 -1
  16. package/{sd-angular-core-1.3.182.tgz → sd-angular-core-1.3.184.tgz} +0 -0
  17. package/table/sd-angular-core-table.d.ts +1 -1
  18. package/table/sd-angular-core-table.metadata.json +1 -1
  19. package/table/src/lib/components/popup-configuration/popup-configuration.component.d.ts +2 -2
  20. package/table/src/lib/components/popup-filter/popup-filter.component.d.ts +2 -2
  21. package/table/src/lib/components/table-filter/table-filter.component.d.ts +2 -2
  22. package/table/src/lib/directives/sd-table-filter-def.directive.d.ts +2 -2
  23. package/table/src/lib/services/table-filter/table-filter.service.d.ts +2 -2
  24. package/table/src/lib/table.component.d.ts +6 -4
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@sd-angular/core/common'), require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/paginator'), require('@angular/material/sort'), require('@angular/animations'), require('uuid'), require('rxjs'), require('@sd-angular/core/notify'), require('rxjs/operators'), require('@sd-angular/core/modal'), require('ngx-device-detector'), require('@sd-angular/core/export'), require('@sd-angular/core/setting'), require('@sd-angular/core/quick-action'), require('object-hash'), require('@angular/cdk/drag-drop'), require('@angular/material/table'), require('@angular/material/progress-spinner'), require('@angular/cdk/table'), require('@angular/material/menu'), require('@angular/material/button'), require('@sd-angular/core/service'), require('@angular/material/tooltip'), require('@angular/material/slide-toggle'), require('@sd-angular/core/form'), require('@angular/material/checkbox'), require('@angular/material/list'), require('@sd-angular/core/group')) :
3
- typeof define === 'function' && define.amd ? define('@sd-angular/core/table', ['exports', '@sd-angular/core/common', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/material/paginator', '@angular/material/sort', '@angular/animations', 'uuid', 'rxjs', '@sd-angular/core/notify', 'rxjs/operators', '@sd-angular/core/modal', 'ngx-device-detector', '@sd-angular/core/export', '@sd-angular/core/setting', '@sd-angular/core/quick-action', 'object-hash', '@angular/cdk/drag-drop', '@angular/material/table', '@angular/material/progress-spinner', '@angular/cdk/table', '@angular/material/menu', '@angular/material/button', '@sd-angular/core/service', '@angular/material/tooltip', '@angular/material/slide-toggle', '@sd-angular/core/form', '@angular/material/checkbox', '@angular/material/list', '@sd-angular/core/group'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.table = {}), global['sd-angular'].core.common, global.ng.core, global.ng.common, global.ng.material.icon, global.ng.material.paginator, global.ng.material.sort, global.ng.animations, global.uuid, global.rxjs, global['sd-angular'].core.notify, global.rxjs.operators, global['sd-angular'].core.modal, global['ngx-device-detector'], global['sd-angular'].core.export, global['sd-angular'].core.setting, global['sd-angular'].core['quick-action'], global['object-hash'], global.ng.cdk.dragDrop, global.ng.material.table, global.ng.material.progressSpinner, global.ng.cdk.table, global.ng.material.menu, global.ng.material.button, global['sd-angular'].core.service, global.ng.material.tooltip, global.ng.material.slideToggle, global['sd-angular'].core.form, global.ng.material.checkbox, global.ng.material.list, global['sd-angular'].core.group));
5
- }(this, (function (exports, common, core, common$1, icon, paginator, sort, animations, uuid, rxjs, notify, operators, modal, ngxDeviceDetector, _export, setting, quickAction, hash, dragDrop, table, progressSpinner, table$1, menu, button, service, tooltip, slideToggle, form, checkbox, list, group) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@sd-angular/core/common'), require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/paginator'), require('@angular/material/sort'), require('@angular/animations'), require('uuid'), require('rxjs'), require('@sd-angular/core/notify'), require('rxjs/operators'), require('@sd-angular/core/modal'), require('ngx-device-detector'), require('@sd-angular/core/export'), require('@sd-angular/core/setting'), require('@sd-angular/core/quick-action'), require('object-hash'), require('@angular/cdk/drag-drop'), require('@sd-angular/core/loading'), require('@angular/material/table'), require('@angular/material/progress-spinner'), require('@angular/cdk/table'), require('@angular/material/menu'), require('@angular/material/button'), require('@sd-angular/core/service'), require('@angular/material/tooltip'), require('@angular/material/slide-toggle'), require('@sd-angular/core/form'), require('@angular/material/checkbox'), require('@angular/material/list'), require('@sd-angular/core/group')) :
3
+ typeof define === 'function' && define.amd ? define('@sd-angular/core/table', ['exports', '@sd-angular/core/common', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/material/paginator', '@angular/material/sort', '@angular/animations', 'uuid', 'rxjs', '@sd-angular/core/notify', 'rxjs/operators', '@sd-angular/core/modal', 'ngx-device-detector', '@sd-angular/core/export', '@sd-angular/core/setting', '@sd-angular/core/quick-action', 'object-hash', '@angular/cdk/drag-drop', '@sd-angular/core/loading', '@angular/material/table', '@angular/material/progress-spinner', '@angular/cdk/table', '@angular/material/menu', '@angular/material/button', '@sd-angular/core/service', '@angular/material/tooltip', '@angular/material/slide-toggle', '@sd-angular/core/form', '@angular/material/checkbox', '@angular/material/list', '@sd-angular/core/group'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.table = {}), global['sd-angular'].core.common, global.ng.core, global.ng.common, global.ng.material.icon, global.ng.material.paginator, global.ng.material.sort, global.ng.animations, global.uuid, global.rxjs, global['sd-angular'].core.notify, global.rxjs.operators, global['sd-angular'].core.modal, global['ngx-device-detector'], global['sd-angular'].core.export, global['sd-angular'].core.setting, global['sd-angular'].core['quick-action'], global['object-hash'], global.ng.cdk.dragDrop, global['sd-angular'].core.loading, global.ng.material.table, global.ng.material.progressSpinner, global.ng.cdk.table, global.ng.material.menu, global.ng.material.button, global['sd-angular'].core.service, global.ng.material.tooltip, global.ng.material.slideToggle, global['sd-angular'].core.form, global.ng.material.checkbox, global.ng.material.list, global['sd-angular'].core.group));
5
+ }(this, (function (exports, common, core, common$1, icon, paginator, sort, animations, uuid, rxjs, notify, operators, modal, ngxDeviceDetector, _export, setting, quickAction, hash, dragDrop, loading, table, progressSpinner, table$1, menu, button, service, tooltip, slideToggle, form, checkbox, list, group) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -564,28 +564,28 @@
564
564
  _filterRegister: [{ type: core.Input, args: ['filterRegister',] }]
565
565
  };
566
566
 
567
- var SdMaterialFilterDefDirective = /** @class */ (function () {
568
- function SdMaterialFilterDefDirective(templateRef) {
567
+ var SdTableFilterDefDirective = /** @class */ (function () {
568
+ function SdTableFilterDefDirective(templateRef) {
569
569
  this.templateRef = templateRef;
570
570
  }
571
- Object.defineProperty(SdMaterialFilterDefDirective.prototype, "showing", {
571
+ Object.defineProperty(SdTableFilterDefDirective.prototype, "showing", {
572
572
  set: function (val) {
573
573
  this.defaultShowing = (val === '') || val;
574
574
  },
575
575
  enumerable: false,
576
576
  configurable: true
577
577
  });
578
- return SdMaterialFilterDefDirective;
578
+ return SdTableFilterDefDirective;
579
579
  }());
580
- SdMaterialFilterDefDirective.decorators = [
580
+ SdTableFilterDefDirective.decorators = [
581
581
  { type: core.Directive, args: [{
582
582
  selector: '[sdTableFilterDef]'
583
583
  },] }
584
584
  ];
585
- SdMaterialFilterDefDirective.ctorParameters = function () { return [
585
+ SdTableFilterDefDirective.ctorParameters = function () { return [
586
586
  { type: core.TemplateRef }
587
587
  ]; };
588
- SdMaterialFilterDefDirective.propDecorators = {
588
+ SdTableFilterDefDirective.propDecorators = {
589
589
  sdTableFilterDef: [{ type: core.Input }],
590
590
  showing: [{ type: core.Input, args: ['defaultShowing',] }]
591
591
  };
@@ -1109,11 +1109,11 @@
1109
1109
 
1110
1110
  var _setting;
1111
1111
  var SdPopupConfiguration = /** @class */ (function () {
1112
- function SdPopupConfiguration(ref, notifyService, gridConfigurationService) {
1112
+ function SdPopupConfiguration(ref, notifyService, tableConfigurationService) {
1113
1113
  var _this = this;
1114
1114
  this.ref = ref;
1115
1115
  this.notifyService = notifyService;
1116
- this.gridConfigurationService = gridConfigurationService;
1116
+ this.tableConfigurationService = tableConfigurationService;
1117
1117
  this.changes = new core.EventEmitter();
1118
1118
  _setting.set(this, void 0);
1119
1119
  this.isCreatingColumn = false;
@@ -1121,7 +1121,7 @@
1121
1121
  this.disabledDrag = true;
1122
1122
  this.open = function () { return __awaiter(_this, void 0, void 0, function () {
1123
1123
  return __generator(this, function (_a) {
1124
- __classPrivateFieldSet(this, _setting, this.gridConfigurationService.init(this.tableOption));
1124
+ __classPrivateFieldSet(this, _setting, this.tableConfigurationService.init(this.tableOption));
1125
1125
  this.configuration = __classPrivateFieldGet(this, _setting).get();
1126
1126
  this.modal.open();
1127
1127
  return [2 /*return*/];
@@ -1164,7 +1164,7 @@
1164
1164
  SdPopupConfiguration.decorators = [
1165
1165
  { type: core.Component, args: [{
1166
1166
  selector: 'sd-popup-configuration',
1167
- template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height: 70vh\">\r\n <table\r\n #table\r\n mat-table\r\n [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown)=\"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{ 'Title' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Width' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Hidden' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\"> </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Freeze' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed']\"\r\n cdkDrag\r\n [cdkDragData]=\"row\"\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragDisabled]=\"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <sd-button class=\"mr-8s\" (action)=\"onReset()\" title=\"M\u1EB7c \u0111\u1ECBnh\" color=\"info\" size=\"sm\"> </sd-button>\r\n <sd-button (action)=\"onSave()\" title=\"L\u01B0u\" type=\"fill\" color=\"info\" size=\"sm\"> </sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
1167
+ template: "<sd-modal width=\"sm\" [title]=\"'Configuration' | sdTranslate\" #modal>\r\n <sd-modal-body *ngIf=\"configuration\">\r\n <div class=\"c-container\">\r\n <div class=\"c-table\" style=\"max-height: 70vh\">\r\n <table\r\n #table\r\n mat-table\r\n [dataSource]=\"configuration.columns\"\r\n cdkDropList\r\n [cdkDropListData]=\"configuration.columns\"\r\n (cdkDropListDropped)=\"dropTable($event)\">\r\n >\r\n <ng-container matColumnDef=\"stt\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\r\n <div class=\"c-handle\" (mousedown)=\"handleMouseDown()\" (mouseup)=\"handleMouseUp()\">\r\n <svg width=\"24px\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path\r\n d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"></path>\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\r\n </svg>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"title\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>{{ 'Title' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.title\" [(model)]=\"item.title\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"width\">\r\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Width' | sdTranslate }}</th>\r\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\r\n <sd-input [placeholder]=\"item?.origin?.width\" [(model)]=\"item.width\" disableErrorMessage></sd-input>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"invisible\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Hidden' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.invisible\" color=\"primary\"> </mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"fixed\">\r\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 80px\">{{ 'Freeze' | sdTranslate }}</th>\r\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item\">\r\n <mat-slide-toggle [(ngModel)]=\"item.fixed\" color=\"primary\"></mat-slide-toggle>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'title', 'width', 'invisible', 'fixed']; sticky: true\"></tr>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: ['stt', 'title', 'width', 'invisible', 'fixed']\"\r\n cdkDrag\r\n [cdkDragData]=\"row\"\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragDisabled]=\"disabledDrag\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n </sd-modal-body>\r\n <sd-modal-footer>\r\n <sd-button class=\"mr-8\" (action)=\"onReset()\" title=\"M\u1EB7c \u0111\u1ECBnh\" color=\"info\" size=\"sm\"> </sd-button>\r\n <sd-button (action)=\"onSave()\" title=\"L\u01B0u\" type=\"fill\" color=\"info\" size=\"sm\"> </sd-button>\r\n </sd-modal-footer>\r\n</sd-modal>\r\n",
1168
1168
  styles: [".c-table{overflow:auto;position:relative}.c-table table{width:100%}.c-table .c-th{color:#000;font-size:14px;font-weight:500;line-height:20px}.c-container{min-height:200px;position:relative}.c-handle{color:#ccc;cursor:move}"]
1169
1169
  },] }
1170
1170
  ];
@@ -1182,9 +1182,10 @@
1182
1182
 
1183
1183
  var _gridId, _optionChanges, _localItems, _paginator, _sort, _subscription$1, _reload, _loadCompleted, _cacheObjValues, _initCellDef, _initFilterDef, _initFooterDef, _filterExportInfo, _initConfiguration$1, _loadFilterRegister, _filterLocal, _getFilter, _load, _render, _exportedItems, _allColumns, _allExportedColumns, _onExport, _getExportColumns, _updateSelectedItems, _loadValues, _format;
1184
1184
  var SdTable = /** @class */ (function () {
1185
- function SdTable(ref, tableConfiguration, tableConfigurationService, exportService, notifyService, gridFilterService) {
1185
+ function SdTable(ref, loadingService, tableConfiguration, tableConfigurationService, exportService, notifyService, gridFilterService) {
1186
1186
  var _this = this;
1187
1187
  this.ref = ref;
1188
+ this.loadingService = loadingService;
1188
1189
  this.tableConfiguration = tableConfiguration;
1189
1190
  this.tableConfigurationService = tableConfigurationService;
1190
1191
  this.exportService = exportService;
@@ -1516,6 +1517,7 @@
1516
1517
  switch (_13.label) {
1517
1518
  case 0:
1518
1519
  this.isLoading = true;
1520
+ this.ref.detectChanges();
1519
1521
  if (!(this.tableOption.type === 'server')) return [3 /*break*/, 3];
1520
1522
  items = this.tableOption.items;
1521
1523
  return [4 /*yield*/, items(filterReq).catch(function (err) {
@@ -1528,9 +1530,11 @@
1528
1530
  })];
1529
1531
  case 1:
1530
1532
  data = _13.sent();
1531
- this.isLoading = false;
1532
1533
  _10 = {};
1533
- return [4 /*yield*/, __classPrivateFieldGet(this, _format).call(this, data === null || data === void 0 ? void 0 : data.items, this.tableOption.columns)];
1534
+ return [4 /*yield*/, __classPrivateFieldGet(this, _format).call(this, data === null || data === void 0 ? void 0 : data.items, this.tableOption.columns).finally(function () {
1535
+ _this.isLoading = false;
1536
+ _this.ref.detectChanges();
1537
+ })];
1534
1538
  case 2: return [2 /*return*/, (_10.items = _13.sent(),
1535
1539
  _10.total = (data === null || data === void 0 ? void 0 : data.total) || 0,
1536
1540
  _10)];
@@ -1564,6 +1568,7 @@
1564
1568
  _13.label = 8;
1565
1569
  case 8:
1566
1570
  this.isLoading = false;
1571
+ this.ref.detectChanges();
1567
1572
  return [2 /*return*/, __classPrivateFieldGet(this, _filterLocal).call(this, __classPrivateFieldGet(this, _localItems), filterReq)];
1568
1573
  }
1569
1574
  });
@@ -1979,8 +1984,39 @@
1979
1984
  }); });
1980
1985
  _getExportColumns.set(this, function () {
1981
1986
  var _a, _b;
1982
- var columns = __spread(_this.tableOption.columns.filter(function (e) { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); }), (((_b = (_a = _this.tableOption.export) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.filter(function (e) { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); })) || []));
1983
- return columns;
1987
+ var gridColumns = [];
1988
+ _this.tableOption.columns
1989
+ .filter(function (e) { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); })
1990
+ .forEach(function (column) {
1991
+ var _a;
1992
+ if (column.type === 'children') {
1993
+ (_a = column.children) === null || _a === void 0 ? void 0 : _a.filter(function (e) { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); }).forEach(function (childColumn) {
1994
+ gridColumns.push(childColumn);
1995
+ });
1996
+ return;
1997
+ }
1998
+ gridColumns.push(column);
1999
+ });
2000
+ if (_this.configuration) {
2001
+ var columns_4 = __spread(gridColumns);
2002
+ var _10 = _this.configuration, firstColumns = _10.firstColumns, secondColumns = _10.secondColumns;
2003
+ var displayColumns = __spread(firstColumns, secondColumns).reduce(function (first, next) {
2004
+ var column = _this.tableOption.columns.find(function (e) { return e.field === next.field; });
2005
+ if (!column) {
2006
+ return first;
2007
+ }
2008
+ if (column.type !== 'children') {
2009
+ return __spread(first, [column]);
2010
+ }
2011
+ var children = column.children;
2012
+ return __spread(first, children);
2013
+ }, []);
2014
+ gridColumns = displayColumns
2015
+ .map(function (e) { return (Object.assign(Object.assign({}, e), { data: columns_4.find(function (e1) { return e1.field === e.field; }) })); })
2016
+ .filter(function (e) { return !!e.data; })
2017
+ .map(function (e) { return e.data; });
2018
+ }
2019
+ return __spread(gridColumns, (((_b = (_a = _this.tableOption.export) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.filter(function (e) { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); })) || []));
1984
2020
  });
1985
2021
  this.exportExcel = function () {
1986
2022
  __classPrivateFieldGet(_this, _onExport).call(_this);
@@ -2085,7 +2121,7 @@
2085
2121
  };
2086
2122
  this.detectChanges = function () { return _this.ref.detectChanges(); };
2087
2123
  _loadValues.set(this, function (columns) { return __awaiter(_this, void 0, void 0, function () {
2088
- var promises, _loop_2, this_1, columns_4, columns_4_1, column, results, _loop_3, this_2, results_3, results_3_1, result;
2124
+ var promises, _loop_2, this_1, columns_5, columns_5_1, column, results, _loop_3, this_2, results_3, results_3_1, result;
2089
2125
  var e_10, _10, e_11, _11;
2090
2126
  return __generator(this, function (_12) {
2091
2127
  switch (_12.label) {
@@ -2126,15 +2162,15 @@
2126
2162
  };
2127
2163
  this_1 = this;
2128
2164
  try {
2129
- for (columns_4 = __values(columns), columns_4_1 = columns_4.next(); !columns_4_1.done; columns_4_1 = columns_4.next()) {
2130
- column = columns_4_1.value;
2165
+ for (columns_5 = __values(columns), columns_5_1 = columns_5.next(); !columns_5_1.done; columns_5_1 = columns_5.next()) {
2166
+ column = columns_5_1.value;
2131
2167
  _loop_2(column);
2132
2168
  }
2133
2169
  }
2134
2170
  catch (e_10_1) { e_10 = { error: e_10_1 }; }
2135
2171
  finally {
2136
2172
  try {
2137
- if (columns_4_1 && !columns_4_1.done && (_10 = columns_4.return)) _10.call(columns_4);
2173
+ if (columns_5_1 && !columns_5_1.done && (_10 = columns_5.return)) _10.call(columns_5);
2138
2174
  }
2139
2175
  finally { if (e_10) throw e_10.error; }
2140
2176
  }
@@ -2172,7 +2208,7 @@
2172
2208
  });
2173
2209
  }); });
2174
2210
  _format.set(this, function (rawItems, columns) { return __awaiter(_this, void 0, void 0, function () {
2175
- var _5, _6, _7, _8, _9, items, _loop_4, this_3, columns_5, columns_5_1, column, e_12_1;
2211
+ var _5, _6, _7, _8, _9, items, _loop_4, this_3, columns_6, columns_6_1, column, e_12_1;
2176
2212
  var e_12, _10;
2177
2213
  var _this = this;
2178
2214
  return __generator(this, function (_11) {
@@ -2344,17 +2380,17 @@
2344
2380
  _11.label = 1;
2345
2381
  case 1:
2346
2382
  _11.trys.push([1, 6, 7, 8]);
2347
- columns_5 = __values(columns), columns_5_1 = columns_5.next();
2383
+ columns_6 = __values(columns), columns_6_1 = columns_6.next();
2348
2384
  _11.label = 2;
2349
2385
  case 2:
2350
- if (!!columns_5_1.done) return [3 /*break*/, 5];
2351
- column = columns_5_1.value;
2386
+ if (!!columns_6_1.done) return [3 /*break*/, 5];
2387
+ column = columns_6_1.value;
2352
2388
  return [5 /*yield**/, _loop_4(column)];
2353
2389
  case 3:
2354
2390
  _11.sent();
2355
2391
  _11.label = 4;
2356
2392
  case 4:
2357
- columns_5_1 = columns_5.next();
2393
+ columns_6_1 = columns_6.next();
2358
2394
  return [3 /*break*/, 2];
2359
2395
  case 5: return [3 /*break*/, 8];
2360
2396
  case 6:
@@ -2363,7 +2399,7 @@
2363
2399
  return [3 /*break*/, 8];
2364
2400
  case 7:
2365
2401
  try {
2366
- if (columns_5_1 && !columns_5_1.done && (_10 = columns_5.return)) _10.call(columns_5);
2402
+ if (columns_6_1 && !columns_6_1.done && (_10 = columns_6.return)) _10.call(columns_6);
2367
2403
  }
2368
2404
  finally { if (e_12) throw e_12.error; }
2369
2405
  return [7 /*endfinally*/];
@@ -2382,14 +2418,21 @@
2382
2418
  option = __classPrivateFieldGet(this, _initConfiguration$1).call(this, option);
2383
2419
  this.tableOption = option;
2384
2420
  __classPrivateFieldSet(this, _loadCompleted, false);
2385
- var setting = this.tableConfigurationService.init(this.tableOption);
2386
- if (setting) {
2387
- __classPrivateFieldGet(this, _subscription$1).add(setting.observer.pipe(operators.startWith(setting.subject.getValue())).subscribe(function (configuration) {
2388
- var configurationResult = _this.tableConfigurationService.loadConfigurationResult(_this.tableOption, configuration);
2421
+ var setting_1 = this.tableConfigurationService.init(this.tableOption);
2422
+ if (setting_1) {
2423
+ __classPrivateFieldGet(this, _subscription$1).add(setting_1.observer.pipe(operators.startWith(setting_1.subject.getValue())).subscribe(function () {
2424
+ var configurationResult = _this.tableConfigurationService.loadConfigurationResult(_this.tableOption, setting_1.get());
2389
2425
  var displayColumns = configurationResult.displayedColumns || [];
2390
- __classPrivateFieldGet(_this, _loadValues).call(_this, _this.tableOption.columns.filter(function (column) { return displayColumns.includes(column.field); })).then(function () {
2426
+ _this.loadingService.start();
2427
+ _this.ref.detectChanges();
2428
+ __classPrivateFieldGet(_this, _loadValues).call(_this, _this.tableOption.columns.filter(function (column) { return displayColumns.includes(column.field); }))
2429
+ .then(function () {
2391
2430
  _this.configuration = configurationResult;
2392
2431
  __classPrivateFieldGet(_this, _optionChanges).next(_this.tableOption);
2432
+ })
2433
+ .finally(function () {
2434
+ _this.loadingService.stop();
2435
+ _this.ref.detectChanges();
2393
2436
  });
2394
2437
  }));
2395
2438
  }
@@ -2397,9 +2440,16 @@
2397
2440
  var configuration = this.tableConfigurationService.loadConfiguration(this.tableOption);
2398
2441
  var configurationResult_1 = this.tableConfigurationService.loadConfigurationResult(this.tableOption, configuration);
2399
2442
  var displayColumns_1 = configurationResult_1.displayedColumns || [];
2400
- __classPrivateFieldGet(this, _loadValues).call(this, this.tableOption.columns.filter(function (column) { return displayColumns_1.includes(column.field); })).then(function () {
2443
+ this.loadingService.start();
2444
+ this.ref.detectChanges();
2445
+ __classPrivateFieldGet(this, _loadValues).call(this, this.tableOption.columns.filter(function (column) { return displayColumns_1.includes(column.field); }))
2446
+ .then(function () {
2401
2447
  _this.configuration = configurationResult_1;
2402
2448
  __classPrivateFieldGet(_this, _optionChanges).next(_this.tableOption);
2449
+ })
2450
+ .finally(function () {
2451
+ _this.loadingService.stop();
2452
+ _this.ref.detectChanges();
2403
2453
  });
2404
2454
  }
2405
2455
  }
@@ -2516,6 +2566,7 @@
2516
2566
  ];
2517
2567
  SdTable.ctorParameters = function () { return [
2518
2568
  { type: core.ChangeDetectorRef },
2569
+ { type: loading.SdLoadingService },
2519
2570
  { type: undefined, decorators: [{ type: core.Inject, args: [TABLE_CONFIG,] }, { type: core.Optional }] },
2520
2571
  { type: SdTableConfigurationService },
2521
2572
  { type: _export.SdExportService },
@@ -2533,7 +2584,7 @@
2533
2584
  sdSubInformation: [{ type: core.ContentChild, args: [SdMaterialSubInformationDefDirective,] }],
2534
2585
  sdCellDefs: [{ type: core.ContentChildren, args: [SdTabelCellDefDirective,] }],
2535
2586
  sdFooterDefs: [{ type: core.ContentChildren, args: [SdMaterialFooterDefDirective,] }],
2536
- sdFilterDefs: [{ type: core.ContentChildren, args: [SdMaterialFilterDefDirective,] }]
2587
+ sdFilterDefs: [{ type: core.ContentChildren, args: [SdTableFilterDefDirective,] }]
2537
2588
  };
2538
2589
 
2539
2590
  var SdCommandFilterPipe = /** @class */ (function () {
@@ -3600,7 +3651,7 @@
3600
3651
  SdTable,
3601
3652
  SdMaterialFooterDefDirective,
3602
3653
  SdTabelCellDefDirective,
3603
- SdMaterialFilterDefDirective,
3654
+ SdTableFilterDefDirective,
3604
3655
  SdMaterialSubInformationDefDirective,
3605
3656
  SdPopupConfiguration,
3606
3657
  SdTableFilter,
@@ -3623,7 +3674,7 @@
3623
3674
  SdTable,
3624
3675
  SdMaterialFooterDefDirective,
3625
3676
  SdTabelCellDefDirective,
3626
- SdMaterialFilterDefDirective,
3677
+ SdTableFilterDefDirective,
3627
3678
  SdMaterialSubInformationDefDirective,
3628
3679
  ],
3629
3680
  providers: [
@@ -3665,7 +3716,7 @@
3665
3716
  exports.ɵl = SdMaterialSubInformationDefDirective;
3666
3717
  exports.ɵm = SdTabelCellDefDirective;
3667
3718
  exports.ɵn = SdMaterialFooterDefDirective;
3668
- exports.ɵo = SdMaterialFilterDefDirective;
3719
+ exports.ɵo = SdTableFilterDefDirective;
3669
3720
  exports.ɵp = SdTableFilterService;
3670
3721
  exports.ɵq = SdCommandFilterPipe;
3671
3722
  exports.ɵr = SdCommandDisablePipe;