@sd-angular/core 1.3.29 → 1.3.31

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 (62) hide show
  1. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  2. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  3. package/bundles/sd-angular-core-export.umd.js +38 -44
  4. package/bundles/sd-angular-core-export.umd.js.map +1 -1
  5. package/bundles/sd-angular-core-export.umd.min.js +1 -1
  6. package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
  7. package/bundles/sd-angular-core-grid.umd.js +50 -187
  8. package/bundles/sd-angular-core-grid.umd.js.map +1 -1
  9. package/bundles/sd-angular-core-grid.umd.min.js +1 -1
  10. package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
  11. package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
  12. package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
  13. package/bundles/sd-angular-core.umd.js +4 -4
  14. package/bundles/sd-angular-core.umd.min.js +1 -1
  15. package/bundles/sd-angular-core.umd.min.js.map +1 -1
  16. package/common/sd-angular-core-common.metadata.json +1 -1
  17. package/common/src/lib/configurations/firebase.configuration.d.ts +1 -0
  18. package/esm2015/common/src/lib/configurations/firebase.configuration.js +1 -1
  19. package/esm2015/export/src/lib/export.model.js +1 -3
  20. package/esm2015/export/src/lib/export.service.js +25 -34
  21. package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.component.js +35 -27
  22. package/esm2015/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.model.js +1 -1
  23. package/esm2015/grid/src/lib/grid.component.js +11 -118
  24. package/esm2015/public-api.js +1 -3
  25. package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -1
  26. package/export/sd-angular-core-export.metadata.json +1 -1
  27. package/export/src/lib/export.model.d.ts +0 -15
  28. package/export/src/lib/export.service.d.ts +6 -4
  29. package/fesm2015/sd-angular-core-common.js.map +1 -1
  30. package/fesm2015/sd-angular-core-export.js +25 -35
  31. package/fesm2015/sd-angular-core-export.js.map +1 -1
  32. package/fesm2015/sd-angular-core-grid.js +43 -142
  33. package/fesm2015/sd-angular-core-grid.js.map +1 -1
  34. package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
  35. package/fesm2015/sd-angular-core.js +0 -1
  36. package/fesm2015/sd-angular-core.js.map +1 -1
  37. package/grid/sd-angular-core-grid.metadata.json +1 -1
  38. package/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.component.d.ts +12 -12
  39. package/grid/src/lib/components/grid-popup-export-excel/grid-popup-export-excel.model.d.ts +1 -2
  40. package/grid/src/lib/grid.component.d.ts +5 -6
  41. package/package.json +1 -1
  42. package/public-api.d.ts +0 -1
  43. package/{sd-angular-core-1.3.29.tgz → sd-angular-core-1.3.31.tgz} +0 -0
  44. package/upload-excel/sd-angular-core-upload-excel.metadata.json +1 -1
  45. package/bundles/sd-angular-core-excel.umd.js +0 -500
  46. package/bundles/sd-angular-core-excel.umd.js.map +0 -1
  47. package/bundles/sd-angular-core-excel.umd.min.js +0 -16
  48. package/bundles/sd-angular-core-excel.umd.min.js.map +0 -1
  49. package/esm2015/excel/index.js +0 -2
  50. package/esm2015/excel/sd-angular-core-excel.js +0 -5
  51. package/esm2015/excel/src/lib/excel.model.js +0 -3
  52. package/esm2015/excel/src/lib/excel.service.js +0 -91
  53. package/esm2015/excel/src/public-api.js +0 -6
  54. package/excel/index.d.ts +0 -1
  55. package/excel/package.json +0 -12
  56. package/excel/sd-angular-core-excel.d.ts +0 -4
  57. package/excel/sd-angular-core-excel.metadata.json +0 -1
  58. package/excel/src/lib/excel.model.d.ts +0 -65
  59. package/excel/src/lib/excel.service.d.ts +0 -26
  60. package/excel/src/public-api.d.ts +0 -2
  61. package/fesm2015/sd-angular-core-excel.js +0 -100
  62. package/fesm2015/sd-angular-core-excel.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/paginator'), require('@angular/material/table'), require('@angular/material/progress-spinner'), require('@angular/material/menu'), require('@angular/material/button'), require('@sd-angular/core/service'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/material/radio'), require('@angular/material/slide-toggle'), require('ngx-device-detector'), require('jquery'), require('@sd-angular/core/api'), require('@sd-angular/core/excel'), require('@sd-angular/core/notify'), require('@sd-angular/core/loading'), require('@sd-angular/core/translate'), require('rxjs'), require('rxjs/operators'), require('@sd-angular/core/setting'), require('object-hash'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@sd-angular/core/utility'), require('@sd-angular/core/upload-excel'), require('@sd-angular/core/form')) :
3
- typeof define === 'function' && define.amd ? define('@sd-angular/core/grid', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/paginator', '@angular/material/table', '@angular/material/progress-spinner', '@angular/material/menu', '@angular/material/button', '@sd-angular/core/service', '@angular/material/tooltip', '@angular/material/chips', '@angular/material/radio', '@angular/material/slide-toggle', 'ngx-device-detector', 'jquery', '@sd-angular/core/api', '@sd-angular/core/excel', '@sd-angular/core/notify', '@sd-angular/core/loading', '@sd-angular/core/translate', 'rxjs', 'rxjs/operators', '@sd-angular/core/setting', 'object-hash', '@angular/material/select', '@angular/material/checkbox', '@sd-angular/core/utility', '@sd-angular/core/upload-excel', '@sd-angular/core/form'], 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.grid = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.paginator, global.ng.material.table, global.ng.material.progressSpinner, global.ng.material.menu, global.ng.material.button, global['sd-angular'].core.service, global.ng.material.tooltip, global.ng.material.chips, global.ng.material.radio, global.ng.material.slideToggle, global['ngx-device-detector'], global.jquery, global['sd-angular'].core.api, global['sd-angular'].core.excel, global['sd-angular'].core.notify, global['sd-angular'].core.loading, global['sd-angular'].core.translate, global.rxjs, global.rxjs.operators, global['sd-angular'].core.setting, global['object-hash'], global.ng.material.select, global.ng.material.checkbox, global['sd-angular'].core.utility, global['sd-angular'].core['upload-excel'], global['sd-angular'].core.form));
5
- }(this, (function (exports, core, common, forms, formField, icon, input, paginator, table, progressSpinner, menu, button, service, tooltip, chips, radio, slideToggle, ngxDeviceDetector, $, api, excel, notify, loading, translate, rxjs, operators, setting, hash, select, checkbox, utility, uploadExcel, form) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/paginator'), require('@angular/material/table'), require('@angular/material/progress-spinner'), require('@angular/material/menu'), require('@angular/material/button'), require('@sd-angular/core/service'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/material/radio'), require('@angular/material/slide-toggle'), require('ngx-device-detector'), require('jquery'), require('@sd-angular/core/api'), require('@sd-angular/core/notify'), require('@sd-angular/core/loading'), require('@sd-angular/core/translate'), require('rxjs'), require('rxjs/operators'), require('@sd-angular/core/export'), require('@sd-angular/core/setting'), require('object-hash'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@sd-angular/core/utility'), require('@sd-angular/core/upload-excel'), require('@sd-angular/core/form')) :
3
+ typeof define === 'function' && define.amd ? define('@sd-angular/core/grid', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/paginator', '@angular/material/table', '@angular/material/progress-spinner', '@angular/material/menu', '@angular/material/button', '@sd-angular/core/service', '@angular/material/tooltip', '@angular/material/chips', '@angular/material/radio', '@angular/material/slide-toggle', 'ngx-device-detector', 'jquery', '@sd-angular/core/api', '@sd-angular/core/notify', '@sd-angular/core/loading', '@sd-angular/core/translate', 'rxjs', 'rxjs/operators', '@sd-angular/core/export', '@sd-angular/core/setting', 'object-hash', '@angular/material/select', '@angular/material/checkbox', '@sd-angular/core/utility', '@sd-angular/core/upload-excel', '@sd-angular/core/form'], 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.grid = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.paginator, global.ng.material.table, global.ng.material.progressSpinner, global.ng.material.menu, global.ng.material.button, global['sd-angular'].core.service, global.ng.material.tooltip, global.ng.material.chips, global.ng.material.radio, global.ng.material.slideToggle, global['ngx-device-detector'], global.jquery, global['sd-angular'].core.api, global['sd-angular'].core.notify, global['sd-angular'].core.loading, global['sd-angular'].core.translate, global.rxjs, global.rxjs.operators, global['sd-angular'].core.export, global['sd-angular'].core.setting, global['object-hash'], global.ng.material.select, global.ng.material.checkbox, global['sd-angular'].core.utility, global['sd-angular'].core['upload-excel'], global['sd-angular'].core.form));
5
+ }(this, (function (exports, core, common, forms, formField, icon, input, paginator, table, progressSpinner, menu, button, service, tooltip, chips, radio, slideToggle, ngxDeviceDetector, $, api, notify, loading, translate, rxjs, operators, _export, setting, hash, select, checkbox, utility, uploadExcel, form) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -871,7 +871,7 @@
871
871
 
872
872
  var _numberOfFooterRows, _paginator, _subscription, _setSelectedItems;
873
873
  var SdGrid = /** @class */ (function () {
874
- function SdGrid(configuration, ref, deviceService, handlerLocal, handlerDotnet, translateService, datePipe, loadingService, apiService, excelService, notifyService, editorVisiblePipe) {
874
+ function SdGrid(configuration, ref, deviceService, handlerLocal, handlerDotnet, translateService, datePipe, loadingService, apiService, exportService, notifyService, editorVisiblePipe) {
875
875
  var _this = this;
876
876
  this.configuration = configuration;
877
877
  this.ref = ref;
@@ -881,7 +881,7 @@
881
881
  this.datePipe = datePipe;
882
882
  this.loadingService = loadingService;
883
883
  this.apiService = apiService;
884
- this.excelService = excelService;
884
+ this.exportService = exportService;
885
885
  this.notifyService = notifyService;
886
886
  this.editorVisiblePipe = editorVisiblePipe;
887
887
  this.isMobileOrTablet = false;
@@ -1714,158 +1714,15 @@
1714
1714
  columns.forEach(handle);
1715
1715
  return obj;
1716
1716
  });
1717
- this.excelService.generateExcelDataByTemplate(params.excelConfig.fullPath, params.excelColumns, items, params.excelConfig.name);
1717
+ this.exportService.exportByTemplate({
1718
+ filePath: params.excelConfig.fullPath,
1719
+ columns: params.excelColumns,
1720
+ items: items
1721
+ });
1718
1722
  return [2 /*return*/];
1719
1723
  }
1720
1724
  });
1721
1725
  }); };
1722
- this.bigExport = function () { return __awaiter(_this, void 0, void 0, function () {
1723
- var _p, _q, _r, _s, pageSize, pageNumber, exportItems, filePath, destination, latestRow, _loop_1, this_1, state_1;
1724
- var _this = this;
1725
- return __generator(this, function (_z) {
1726
- switch (_z.label) {
1727
- case 0:
1728
- pageSize = 1000;
1729
- pageNumber = 1;
1730
- this.loadingService.start();
1731
- _z.label = 1;
1732
- case 1:
1733
- _z.trys.push([1, , 5, 6]);
1734
- exportItems = [];
1735
- filePath = null;
1736
- destination = null;
1737
- latestRow = 0;
1738
- _loop_1 = function () {
1739
- var results, columns, items, result;
1740
- return __generator(this, function (_z) {
1741
- switch (_z.label) {
1742
- case 0:
1743
- if (!((_p = this_1.gridOption.export) === null || _p === void 0 ? void 0 : _p.items)) return [3 /*break*/, 2];
1744
- return [4 /*yield*/, ((_q = this_1.gridOption.export) === null || _q === void 0 ? void 0 : _q.items(this_1.getFilterInfo(pageNumber, pageSize)).finally(this_1.loadingService.stop))];
1745
- case 1:
1746
- exportItems = _z.sent();
1747
- return [3 /*break*/, 4];
1748
- case 2: return [4 /*yield*/, this_1.getExportItems(pageNumber, pageSize).finally(this_1.loadingService.stop)];
1749
- case 3:
1750
- exportItems = _z.sent();
1751
- _z.label = 4;
1752
- case 4:
1753
- if (!((_r = this_1.gridOption.export) === null || _r === void 0 ? void 0 : _r.mapping)) return [3 /*break*/, 7];
1754
- results = this_1.gridOption.export.mapping(exportItems);
1755
- if (!(results instanceof Promise)) return [3 /*break*/, 6];
1756
- return [4 /*yield*/, results];
1757
- case 5:
1758
- exportItems = _z.sent();
1759
- return [3 /*break*/, 7];
1760
- case 6:
1761
- exportItems = results;
1762
- _z.label = 7;
1763
- case 7:
1764
- columns = __spread(this_1.gridOption.columns, (((_s = this_1.gridOption.export) === null || _s === void 0 ? void 0 : _s.columns) || []));
1765
- items = exportItems.map(function (item) {
1766
- var obj = {};
1767
- var handle = function (column) {
1768
- if (column.type === 'children') {
1769
- column.children.forEach(handle);
1770
- }
1771
- else if (column.transform) {
1772
- obj[column.field] = column.transform(item[column.field], item);
1773
- }
1774
- else if (item[column.field] === undefined || item[column.field] === null || item[column.field] === '') {
1775
- obj[column.field] = '';
1776
- }
1777
- else if (column.type === 'string' || column.type === 'number' || column.type === 'color') {
1778
- // Nếu cell là string hoặc number thì gán bằng chính nó
1779
- obj[column.field] = item[column.field];
1780
- }
1781
- else if (column.type === 'bool') {
1782
- // Nếu là bool thì gán bằng giá trị trueValue và falseValue (nếu có), mặc định là TRUE/FALSE
1783
- if (item[column.field]) {
1784
- obj[column.field] = column.trueValue || 'True';
1785
- }
1786
- else {
1787
- obj[column.field] = column.falseValue || 'False';
1788
- }
1789
- }
1790
- else if (column.type === 'date') {
1791
- // Nếu là date thì convert theo đúng format
1792
- var date = new Date(item[column.field]);
1793
- obj[column.field] = _this.datePipe.transform(date, 'dd/MM/yyyy');
1794
- }
1795
- else if (column.type === 'datetime') {
1796
- // Nếu là datetime thì convert theo đúng format
1797
- var date = new Date(item[column.field]);
1798
- obj[column.field] = _this.datePipe.transform(date, 'dd/MM/yyyy HH:mm:ss');
1799
- }
1800
- else if (column.type === 'time') {
1801
- // Nếu là time thì convert theo đúng format
1802
- var date = new Date(item[column.field]);
1803
- obj[column.field] = _this.datePipe.transform(date, 'HH:mm:ss');
1804
- }
1805
- else if (column.type === 'values') {
1806
- // Nếu là values thì lấy giá trị của value được chọn
1807
- var data = column.values.find(function (e) { return e.value === item[column.field]; });
1808
- if (data) {
1809
- obj[column.field] = data.text;
1810
- }
1811
- else {
1812
- obj[column.field] = item[column.field];
1813
- }
1814
- }
1815
- else if (column.type === 'radio') {
1816
- var data = column.values.find(function (e) { return e[column.valueField] === item[column.field]; });
1817
- if (data) {
1818
- obj[column.field] = data[column.displayField];
1819
- }
1820
- else {
1821
- obj[column.field] = item[column.field];
1822
- }
1823
- }
1824
- };
1825
- columns.forEach(handle);
1826
- return obj;
1827
- });
1828
- return [4 /*yield*/, this_1.excelService.bigExport({
1829
- columns: columns,
1830
- items: items,
1831
- latestRow: latestRow,
1832
- filePath: filePath,
1833
- destination: destination
1834
- })];
1835
- case 8:
1836
- result = _z.sent();
1837
- latestRow = result.latestRow;
1838
- filePath = result.filePath;
1839
- destination = result.destination;
1840
- if (!((pageNumber - 1) * pageSize + items.length >= this_1.total)) return [3 /*break*/, 10];
1841
- return [4 /*yield*/, this_1.excelService.download(filePath)];
1842
- case 9:
1843
- _z.sent();
1844
- return [2 /*return*/, "break"];
1845
- case 10:
1846
- pageNumber++;
1847
- return [2 /*return*/];
1848
- }
1849
- });
1850
- };
1851
- this_1 = this;
1852
- _z.label = 2;
1853
- case 2:
1854
- if (!true) return [3 /*break*/, 4];
1855
- return [5 /*yield**/, _loop_1()];
1856
- case 3:
1857
- state_1 = _z.sent();
1858
- if (state_1 === "break")
1859
- return [3 /*break*/, 4];
1860
- return [3 /*break*/, 2];
1861
- case 4: return [3 /*break*/, 6];
1862
- case 5:
1863
- this.loadingService.stop();
1864
- return [7 /*endfinally*/];
1865
- case 6: return [2 /*return*/];
1866
- }
1867
- });
1868
- }); };
1869
1726
  this.onEditorChange = function () {
1870
1727
  _this.ref.detectChanges();
1871
1728
  };
@@ -2302,7 +2159,7 @@
2302
2159
  SdGrid.decorators = [
2303
2160
  { type: core.Component, args: [{
2304
2161
  selector: 'sd-grid',
2305
- template: "<div class=\"clearfix\"></div>\r\n<ng-container *ngIf=\"!isMobileOrTablet && !gridOption?.filter?.disabled\">\r\n <div class=\"row mx-0 mt-5\">\r\n <div\r\n *ngIf=\"gridOption?.key && gridOption?.filter?.multiple !== false && (!gridOption?.filter?.quickFilterVisibility || gridOption?.filter?.quickFilterVisibility === 'inline')\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\" style=\"width: 100%;\">\r\n <mat-label>{{'Quick filters' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedQuickFilter\" (selectionChange)=\"onSelectQuickFilter($event?.value)\" #matSelect>\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let quickFilter of quickFilters\" [value]=\"quickFilter.code\">\r\n <div style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1 c-fa-icon\" (click)=\"onEditQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-pencil\"></mat-icon>\r\n <mat-icon class=\"mr-0 c-fa-icon\" (click)=\"onDeleteQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-trash-o\"></mat-icon>\r\n </div>\r\n </div>\r\n </mat-option>\r\n <mat-option>\r\n <div (click)=\"onCreateQuickFilter($event)\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <sd-grid-desktop-inline-filter class=\"c-display-contents\" [columns]=\"gridOption.columns\" [filter]=\"filter\"\r\n [externalFilter]=\"externalFilter\" (sdChange)=\"updateFilter()\" [inlineExternal]=\"inlineExternal\"\r\n [inlineColumn]=\"inlineColumn\" [filterOption]=\"gridOption.filter\">\r\n </sd-grid-desktop-inline-filter>\r\n </div>\r\n</ng-container>\r\n<div *ngIf=\"!isMobileOrTablet; else elseMobileOrTablet\" class=\"sd-box\"\r\n [ngClass]=\"{'box-shadow-none': gridOption.hideFooter}\">\r\n <ng-container *ngTemplateOutlet=\"gridViewContent\"></ng-container>\r\n <div [ngClass]=\"{'d-none': gridOption.hideFooter}\" class=\"sd-box-footer clearfix\">\r\n <div style=\"display: flex; align-items: center; align-content: space-between;\">\r\n <div style=\"flex: 1;\">\r\n <sd-button *ngIf=\"sdGridPopupFilter\" class=\"mr-6\" [title]=\"'Filter' | sdTranslate\" icon=\"filter_list\" size=\"sm\"\r\n (action)=\"onFilterPopup()\"></sd-button>\r\n <sd-button *ngIf=\"!gridOption?.hideReload\" class=\"mr-6\" [title]=\"'Reload' | sdTranslate\" icon=\"refresh\"\r\n size=\"sm\" (action)=\"reload()\"></sd-button>\r\n <sd-button *ngIf=\"gridOption.onImportExcel\" class=\"mr-6\" [title]=\"'Import' | sdTranslate\" icon=\"publish\"\r\n size=\"sm\" (action)=\"sdGridImportExcel.open()\"></sd-button>\r\n <ng-container *ngIf=\"sdGridPopupExportExcel\">\r\n <sd-button *ngIf=\"!gridOption.key\" class=\"mr-6\" [title]=\"'Export' | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n (action)=\"sdGridPopupExportExcel.exportDefault()\" [disabled]=\"!viewItems?.length\">\r\n </sd-button>\r\n <sd-button *ngIf=\"gridOption.key\" class=\"mr-6\" [title]=\"'Export' | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" [disabled]=\"!viewItems?.length\">\r\n </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"sdGridPopupExportExcel.exportDefault()\" type=\"button\">\r\n <mat-icon>get_app</mat-icon>\r\n <span> {{'Export all columns' | sdTranslate}}</span>\r\n </button>\r\n <button mat-menu-item (click)=\"sdGridPopupExportExcel.open()\" type=\"button\">\r\n <mat-icon>settings</mat-icon>\r\n <span> {{'Configure' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button *ngIf=\"gridOption.export?.bigExport\" class=\"mr-6\" [title]=\"'Big export' | sdTranslate\" icon=\"get_app\"\r\n size=\"sm\" (action)=\"bigExport()\" [disabled]=\"!viewItems?.length\">\r\n </sd-button>\r\n <sd-button *ngIf=\"gridOption.key\" class=\"mr-6\" [title]=\"'Configure' | sdTranslate\" icon=\"settings\" size=\"sm\"\r\n (action)=\"sdGridConfig.open()\"></sd-button>\r\n </div>\r\n <div style=\"flex: 1;\">\r\n <mat-paginator [length]=\"total\" [pageSize]=\"gridOption.paginate?.pageSize\" hidePageSize>\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<ng-template #elseMobileOrTablet>\r\n <div class=\"sd-box c-mobile-box\">\r\n <div *ngIf=\"!gridOption?.mobileOrTablet?.useGridView\" class=\"sd-box-body c-mobile-body\"\r\n [ngClass]=\"{'c-loading': isLoading}\" #gridBody>\r\n <i [ngClass]=\"{'d-none': !isLoading}\" class=\"fa fa-4x fa-spinner fa-pulse c-loading-icon\"></i>\r\n <ng-container *ngFor=\"let item of viewItems\">\r\n <div class=\"c-mobile-item\" [ngClass]=\"{'c-mobile-item-selected':item.isChecked}\">\r\n <sd-grid-mobile-item-view [gridOption]=\"gridOption\" [item]=\"item\" (check)=\"onCheck(item)\">\r\n </sd-grid-mobile-item-view>\r\n <div class=\"p-2\" *ngIf=\"gridOption?.subInformation && item?.subInformation?.isOpened\">\r\n <sd-grid-sub-information [subItems]=\"item?.subInformation?.subItems\" [option]=\"gridOption?.subInformation\">\r\n </sd-grid-sub-information>\r\n </div>\r\n <div class=\"c-mobile-command\">\r\n <div>\r\n <i *ngIf=\"gridOption?.subInformation && item.subInformation?.isLoading\"\r\n class=\"fa fa-spinner fa-spin ml-1 c-mobile-action\" (click)=\"expandOrCollapse(item)\"></i>\r\n <i *ngIf=\"gridOption?.subInformation && !item.subInformation?.isLoading\" class=\"fa ml-1 c-mobile-action\"\r\n [ngClass]=\"{'fa-plus': !item.subInformation?.isOpened, 'fa-minus': item.subInformation?.isOpened}\"\r\n (click)=\"expandOrCollapse(item)\"></i>\r\n </div>\r\n <ng-container *ngIf=\"gridOption.commands | mobileCommandFilter:item | async; $implicit as filteredCommands\">\r\n <div *ngIf=\"filteredCommands.length\">\r\n <button [matMenuTriggerFor]=\"menu\" aria-hidden=\"true\" mat-icon-button type=\"button\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <!-- <i [matMenuTriggerFor]=\"menu\" class=\"fa fa-navicon fa-fw c-mobile-action\"></i> -->\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let command of filteredCommands\" mat-menu-item (click)=\"command.click(item)\"\r\n [disabled]=\"command.disabled | commandDisabled:item\" type=\"button\">\r\n <i *ngIf=\"!command.fontSet\" class=\"{{command.icon | commandIcon:item}}\"></i>\r\n <mat-icon *ngIf=\"command.fontSet\" [fontSet]=\"command.fontSet\">{{command.icon | commandIcon:item}}\r\n </mat-icon>\r\n <span> {{command.title | commandTitle:item}}</span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"gridOption?.mobileOrTablet?.useGridView\">\r\n <ng-container *ngTemplateOutlet=\"gridViewContent\"></ng-container>\r\n </ng-container>\r\n <div [ngClass]=\"{'d-none': gridOption.hideFooter}\" class=\"sd-box-footer clearfix\">\r\n <sd-button icon=\"more_horiz\" size=\"sm\" [matMenuTriggerFor]=\"mobileAction\"></sd-button>\r\n <mat-menu #mobileAction=\"matMenu\">\r\n <button *ngIf=\"sdGridPopupFilter\" mat-menu-item (click)=\"onFilterPopup()\" type=\"button\">\r\n <mat-icon>filter_list</mat-icon>\r\n <span> {{'Filter' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"!gridOption?.hideReload\" mat-menu-item (click)=\"reload()\" type=\"button\">\r\n <mat-icon>refresh</mat-icon>\r\n <span> {{'Reload' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.onImportExcel\" mat-menu-item (click)=\"sdGridImportExcel.open()\" type=\"button\">\r\n <mat-icon>publish</mat-icon>\r\n <span> {{'Import' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"sdGridPopupExportExcel\" mat-menu-item (click)=\"sdGridPopupExportExcel.open()\" type=\"button\"\r\n [disabled]=\"!viewItems?.length\">\r\n <mat-icon>get_app</mat-icon>\r\n <span> {{'Export' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.key\" mat-menu-item (click)=\"sdGridConfig.open()\" type=\"button\">\r\n <mat-icon>settings</mat-icon>\r\n <span> {{'Configure' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n <ng-container *ngIf=\"gridOption?.key && gridOption?.filter?.multiple !== false && !gridOption?.filter?.disabled\">\r\n <sd-button icon=\"filter_list\" size=\"sm\" [matMenuTriggerFor]=\"mobileQuickFilter\"></sd-button>\r\n <mat-menu #mobileQuickFilter=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let quickFilter of quickFilters\" (click)=\"onSelectQuickFilter(quickFilter.code)\"\r\n type=\"button\" style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1\" (click)=\"onEditQuickFilter($event, quickFilter)\">edit</mat-icon>\r\n <mat-icon class=\"mr-0\" (click)=\"onDeleteQuickFilter($event, quickFilter)\">delete</mat-icon>\r\n </div>\r\n </button>\r\n <button mat-menu-item (click)=\"onCreateQuickFilter($event)\" type=\"button\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <div class=\"row mr-0 ml-0 text-right pull-right\">\r\n <mat-paginator [length]=\"total\" [pageSize]=\"gridOption.paginate?.pageSize\" hidePageSize>\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<!-- Modal Configure Grid -->\r\n<sd-grid-config (sdChange)=\"loadConfig($event)\" #sdGridConfig></sd-grid-config>\r\n<sd-grid-popup-editor (save)=\"onSave($event)\" #sdGridPopupEditor></sd-grid-popup-editor>\r\n<!-- Import Excel -->\r\n<sd-grid-import-excel *ngIf=\"gridOption?.onImportExcel\" [key]=\"gridOption?.key\" [columns]=\"gridOption?.columns\"\r\n [accept]=\"gridOption?.onImportExcel\" #sdGridImportExcel></sd-grid-import-excel>\r\n<sd-grid-popup-export-excel *ngIf=\"!gridOption.export?.disabled\" [key]=\"gridOption?.key\" [columns]=\"gridOption?.columns\"\r\n [extendColumns]=\"gridOption?.export?.columns\" [fileName]=\"gridOption?.export?.fileName\"\r\n [exportOption]=\"gridOption?.export\" [validator]=\"gridOption?.export?.validator\"\r\n (exportByTemplate)=\"onExportByTemplate($event)\" #sdGridPopupExportExcel>\r\n</sd-grid-popup-export-excel>\r\n<sd-grid-popup-filter\r\n *ngIf=\"!gridOption?.filter?.disabled && (isMobileOrTablet || gridOption?.filter?.type === 'popup')\"\r\n [key]=\"gridOption?.key\" (accept)=\"updateFilter($event)\" [filterOption]=\"gridOption?.filter\" (clear)=\"onClearFilter()\"\r\n (loadInlineFilter)=\"onFilterConfigurationLoaded($event)\" #sdGridPopupFilter>\r\n</sd-grid-popup-filter>\r\n\r\n<ng-template #gridViewContent>\r\n <div class=\"sd-box-body p-0\">\r\n <div class=\"row mx-0\">\r\n <div [ngClass]=\"{'c-loading': isLoading}\" class=\"table-responsive\" #gridBody style=\"position: relative;\">\r\n <i [ngClass]=\"{'d-none': !isLoading}\" class=\"fa fa-5x fa-spinner fa-pulse c-loading-icon\"></i>\r\n <table *ngIf=\"gridOption\" class=\"table c-table\"\r\n [ngClass]=\"{'c-loading-margin': isLoading, 'c-bordered': configuration?.style?.bordered, 'c-stripped': configuration?.style?.bordered}\"\r\n style=\"border:0!important;\">\r\n <thead class=\"thead-light\">\r\n <tr>\r\n <th class=\"position-sticky c-sticky-all align-middle p-0\" style=\"width:4px; min-width: 4px;\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"configuration?.style?.bordered\" class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\"\r\n #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.subInformation\" class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"gridOption?.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-all align-middle text-center p-0 w-20\" style=\"width:20px;\" #fixedHeader>\r\n <mat-checkbox [color]=\"'primary'\" [(ngModel)]=\"isCheckedAll\"\r\n (change)=\"checkAll(isCheckedAll)\"></mat-checkbox>\r\n </th>\r\n <th *ngIf=\"gridOption?.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle text-center p-0 c-sticky-all c-w-1\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:60px;min-width:60px;max-width:60px;line-height: 1.5\" #fixedHeader>\r\n <div *ngIf=\"gridOption.editor.addable\" class=\"align-middle text-center\">\r\n <button *ngIf=\"!gridOption.editor.limit || (gridOption.editor.limit > items.length)\" type=\"button\"\r\n (click)=\"onCreate()\" aria-label=\"Add\" mat-icon-button type=\"button\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n </th>\r\n <th *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.numberable\" class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:20px;\" #fixedHeader>\r\n #\r\n </th>\r\n <th *ngIf=\"gridOption?.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <ng-container *ngFor=\"let column of fixedColumns\">\r\n <th class=\"position-sticky align-middle cursor-pointer c-cell c-sticky-all\" #fixedHeader\r\n [ngStyle]=\"{'width':column.width ? column.width : '','max-width': column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <span [title]=\"column.title\" class=\"c-header-title\" (click)=\"sort(column)\">\r\n {{column.title}}\r\n <i *ngIf=\"column.type !== 'children' && column.type !== 'image' && gridOption.sortable !== false && column.sortable !== false && orderBy !== column.field\"\r\n class=\"fa fa-sort fa-fw\"></i>\r\n <i *ngIf=\"orderBy === column.field && orderDirection == 'ASC'\" class=\"fa fa-sort-asc fa-fw\"></i>\r\n <i *ngIf=\"orderBy === column.field && orderDirection == 'DESC'\" class=\"fa fa-sort-desc fa-fw\"></i>\r\n </span>\r\n <ng-container\r\n *ngIf=\"!gridOption?.filter?.disabled && gridOption?.filter?.columnInline !== 'outside' && !column?.filter?.disabled && (inlineColumn[column.field] || gridOption?.filter?.type === 'inline')\">\r\n <sd-input size=\"sm\"\r\n *ngIf=\"column.type === 'string' || column.type === 'number' || column.type === 'children'\"\r\n [(model)]=\"filter[column.field]\" (keyupEnter)=\"updateFilter()\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\"\r\n [items]=\"[{value: 1, display: column.trueValue || 'TRUE'}, {value: 0, display: column.falseValue || 'FALSE'}]\"\r\n valueField=\"value\" displayField=\"display\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n [filtered]=\"column?.editor?.autocomplete\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" [valueField]=\"column.valueField\"\r\n [displayField]=\"column.displayField\">\r\n </sd-select>\r\n <sd-date-time size=\"sm\"\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [(model)]=\"filter[column.field]\" (sdChange)=\"updateFilter()\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n </ng-container>\r\n <th *ngFor=\"let column of normalColumns\"\r\n class=\"position-sticky align-middle cursor-pointer border-top-0 border-bottom-0 c-cell c-sticky-top c-normal-column\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '','max-width': column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <span [title]=\"column.title\" class=\"c-header-title\" (click)=\"sort(column)\">\r\n {{column.title}}\r\n <i *ngIf=\"column.type !== 'children' && gridOption.sortable !== false && column.sortable !== false && orderBy !== column.field\"\r\n class=\"fa fa-sort fa-fw\"></i>\r\n <i *ngIf=\"orderBy == column.field && orderDirection == 'ASC'\" class=\"fa fa-sort-asc fa-fw\"></i>\r\n <i *ngIf=\"orderBy == column.field && orderDirection == 'DESC'\" class=\"fa fa-sort-desc fa-fw\"></i>\r\n </span>\r\n <ng-container\r\n *ngIf=\"!gridOption?.filter?.disabled && gridOption?.filter?.columnInline !== 'outside' && !column?.filter?.disabled && (inlineColumn[column.field] || gridOption?.filter?.type === 'inline')\">\r\n <sd-input size=\"sm\"\r\n *ngIf=\"column.type === 'string' || column.type === 'number' || column.type === 'children'\"\r\n [(model)]=\"filter[column.field]\" (keyupEnter)=\"updateFilter()\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\"\r\n [items]=\"[{value: 1, display: column.trueValue || 'TRUE'}, {value: 0, display: column.falseValue || 'FALSE'}]\"\r\n valueField=\"value\" displayField=\"display\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n [filtered]=\"column?.editor?.autocomplete\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" [valueField]=\"column.valueField\"\r\n [displayField]=\"column.displayField\">\r\n </sd-select>\r\n <sd-date-time size=\"sm\"\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [(model)]=\"filter[column.field]\" (sdChange)=\"updateFilter()\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let item of viewItems; index as idx; trackBy: trackById\">\r\n <tr>\r\n <td class=\"position-sticky c-sticky-left p-0\"\r\n [ngClass]=\"{'c-error': ((gridOption.editor?.type === 'inline' || item.editingStatus) && item.editorHandler?.errorMessage), \r\n 'c-selected': !((gridOption.editor?.type === 'inline' || item.editingStatus) && item.editorHandler?.errorMessage) && selectedItem === item}\"\r\n style=\"width:4px;min-width: 4px;left:0\" matTooltipPosition=\"after\"\r\n [matTooltip]=\"item.editingStatus ? item.editorHandler?.errorMessage:''\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.subInformation\" class=\"position-sticky text-center align-middle p-0 c-sticky-left\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedBody>\r\n <button *ngIf=\"!item.editingStatus\" (click)=\"expandOrCollapse(item)\" type=\"button\" class=\"c-btn-icon\">\r\n <i *ngIf=\"item.subInformation?.isLoading\" class=\"fa fa-spinner fa-spin\"></i>\r\n <i *ngIf=\"!item.subInformation?.isLoading\" class=\"fa\"\r\n [ngClass]=\"{'fa-caret-right': !item.subInformation?.isOpened, 'fa-caret-down': item.subInformation?.isOpened}\"></i>\r\n </button>\r\n </td>\r\n <td *ngIf=\"gridOption.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"align-middle text-center w-20\" style=\"width:20px;\">\r\n <mat-checkbox [color]=\"'primary'\" [(ngModel)]=\"item.isChecked\"\r\n (change)=\"onCheck(item, true)\"></mat-checkbox>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle px-2 py-0 c-sticky-left c-w-1\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"d-flex align-middle text-center justify-content-center\">\r\n <ng-container\r\n *ngIf=\"gridOption.commands | commandFilter:item | async; $implicit as filteredCommands\">\r\n <section *ngFor=\"let command of filteredCommands\">\r\n <ng-container *ngIf=\"!command.children?.length; else elseCommandChildren\">\r\n <button *ngIf=\"!command.fontSet\" (click)=\"command.click(item)\" type=\"button\"\r\n class=\"c-btn-icon\" [matTooltip]=\"command.title | commandTitle:item\"\r\n [disabled]=\"command.disabled | commandDisabled:item\">\r\n <i class=\"{{command.icon | commandIcon:item}}\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button *ngIf=\"command.fontSet\" [matTooltip]=\"command.title | commandTitle:item\"\r\n [disabled]=\"command.disabled | commandDisabled:item\" (click)=\"command.click(item)\"\r\n type=\"button\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon [fontSet]=\"command.fontSet\">{{command.icon | commandIcon:item}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #elseCommandChildren>\r\n <button *ngIf=\"command.icon\" [matMenuTriggerFor]=\"menu\" type=\"button\" class=\"c-btn-icon\"\r\n [matTooltip]=\"command.title\" [disabled]=\"command.disabled | commandDisabled:item\">\r\n <i class=\"{{command.icon | commandIcon:item}}\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button *ngIf=\"!command.icon\" mat-icon-button [matMenuTriggerFor]=\"menu\" type=\"button\"\r\n class=\"c-btn-icon-30\" [matTooltip]=\"command.title\"\r\n [disabled]=\"command.disabled | commandDisabled:item\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <ng-container *ngFor=\"let childCommand of command.children\">\r\n <button *ngIf=\"!(item | commandHidden:childCommand | async)\" type=\"button\" mat-menu-item\r\n [disabled]=\"childCommand.disabled | commandDisabled:item\"\r\n (click)=\"childCommand.click(item)\">\r\n <i *ngIf=\"!childCommand.fontSet\" class=\"{{childCommand.icon | commandIcon:item}}\"></i>\r\n <mat-icon *ngIf=\"childCommand.fontSet\" [fontSet]=\"childCommand.fontSet\">\r\n {{childCommand.icon | commandIcon:item}}</mat-icon>\r\n <span> {{childCommand.title | commandTitle:item}}</span>\r\n </button>\r\n </ng-container>\r\n </mat-menu>\r\n </ng-template>\r\n </section>\r\n </ng-container>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div class=\"align-middle text-center\"\r\n style=\"width:60px;min-width:60px;max-width:60px;line-height: 1.5\">\r\n <button\r\n *ngIf=\"!item.editingStatus && gridOption.editor?.type !== 'inline' && gridOption.editor?.editable\"\r\n [disabled]=\"item.editorHandler?.disabled\" (click)=\"onUpdate(item, true)\" aria-label=\"Edit\"\r\n type=\"button\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button *ngIf=\"item.editingStatus && gridOption.editor?.type !== 'inline'\"\r\n [disabled]=\"item.editorHandler?.errorMessage || item.editorHandler?.saving\" (click)=\"onSave(item)\"\r\n type=\"button\" aria-label=\"Save\" mat-icon-button>\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n <button *ngIf=\"item.editingStatus || gridOption.editor?.type === 'inline'\" (click)=\"onCancel(item)\"\r\n aria-label=\"Cancel\" mat-icon-button\r\n [disabled]=\"gridOption.editor?.type === 'inline' && item.editorHandler?.disabled\" type=\"button\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.numberable\" class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"align-middle text-center\" style=\"width:20px;\">\r\n <!-- {{gridOption.paginate?.pageSize * (currentPage - 1) + idx + 1}} -->\r\n {{idx + 1}}\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <ng-template ngFor let-column [ngForOf]=\"fixedColumns\">\r\n <td class=\"position-sticky align-middle c-cell c-sticky-left\"\r\n [ngClass]=\"{'text-center': column.type !== 'string' && column.type !== 'number' && column.type !== 'children', 'text-right': column.type === 'number'}\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\"\r\n (click)=\"rowHandler.click(item)\" #fixedBody>\r\n <ng-container *ngIf=\"column.type !== 'children';else elseColumnChildren\">\r\n <ng-container *ngIf=\"item[column.field] | editorHandler:item:gridOption\">\r\n <div\r\n *ngIf=\"item.editorHandler[column.field].visible && gridOption.editor?.validate && !(item[column.field] | editorValidate:item:gridOption.editor.validate | async)\">\r\n </div>\r\n <ng-container *ngIf=\"item.editorHandler[column.field].visible;else columnView\">\r\n <div style=\"width: 100%\">\r\n <ng-container *ngIf=\"cellEditorDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellEditorDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-edit *ngIf=\"!cellEditorDef[column.field]\" [column]=\"column\"\r\n [item]=\"item\" (sdChange)=\"onEditorChange()\">\r\n </sd-grid-desktop-column-edit>\r\n </div>\r\n </ng-container>\r\n <ng-template #columnView>\r\n <div class=\"align-middle\" (dblclick)=\"rowHandler.dblClick(item)\">\r\n <ng-container *ngIf=\"cellDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-view *ngIf=\"!cellDef[column.field]\" [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-view>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseColumnChildren>\r\n <sd-grid-desktop-column-children-view [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-children-view>\r\n </ng-template>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n </ng-template>\r\n <td *ngFor=\"let column of normalColumns\" class=\"align-middle c-cell c-normal-column\"\r\n (click)=\"rowHandler.click(item)\"\r\n [ngClass]=\"{'text-center': column.type !== 'string' && column.type !== 'number' && column.type !== 'children', 'text-right': column.type === 'number'}\"\r\n (dblclick)=\"rowHandler.dblClick(item)\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '', 'min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <ng-container *ngIf=\"column.type !== 'children';else elseColumnChildren\">\r\n <ng-container *ngIf=\"item[column.field] | editorHandler:item:gridOption\">\r\n <div\r\n *ngIf=\"item.editorHandler[column.field].visible && gridOption.editor?.validate && !(item[column.field] | editorValidate:item:gridOption.editor.validate | async)\">\r\n </div>\r\n <ng-container *ngIf=\"item.editorHandler[column.field].visible;else columnView\">\r\n <div style=\"width: 100%\">\r\n <ng-container *ngIf=\"cellEditorDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellEditorDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-edit *ngIf=\"!cellEditorDef[column.field]\" [column]=\"column\"\r\n [item]=\"item\" (sdChange)=\"onEditorChange()\">\r\n </sd-grid-desktop-column-edit>\r\n </div>\r\n </ng-container>\r\n <ng-template #columnView>\r\n <div class=\"align-middle\" (dblclick)=\"rowHandler.dblClick(item)\">\r\n <ng-container *ngIf=\"cellDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-view *ngIf=\"!cellDef[column.field]\" [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-view>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseColumnChildren>\r\n <sd-grid-desktop-column-children-view [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-children-view>\r\n </ng-template>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"gridOption?.subInformation && item?.subInformation?.isOpened\" class=\"c-no-hover\">\r\n <td class=\"p-10\" colspan=\"100\">\r\n <sd-grid-sub-information [subItems]=\"item?.subInformation?.subItems\"\r\n [option]=\"gridOption?.subInformation\">\r\n </sd-grid-sub-information>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"viewItems?.length\">\r\n <ng-container *ngFor=\"let footerIndex of footerRows\">\r\n <tr>\r\n <td class=\"position-sticky c-sticky-left p-0\" style=\"width:4px;min-width: 4px;left:0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.subInformation\"\r\n class=\"position-sticky text-center align-middle p-0 c-sticky-left\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle px-2 py-0 c-sticky-left c-w-1\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.numberable\" class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <ng-template ngFor let-column [ngForOf]=\"fixedColumns\">\r\n <td class=\"position-sticky align-middle p-0 c-sticky-left\" #fixedBody>\r\n <ng-container *ngIf=\"cellFooterDef[column.field] && cellFooterDef[column.field][footerIndex]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellFooterDef[column.field][footerIndex].templateRef;context:{items: viewItems, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n </ng-template>\r\n <td *ngFor=\"let column of normalColumns\" class=\"align-middle p-0 c-normal-column\">\r\n <ng-container *ngIf=\"cellFooterDef[column.field] && cellFooterDef[column.field][footerIndex]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellFooterDef[column.field][footerIndex].templateRef;context:{items: viewItems, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n <tr *ngIf=\"!viewItems?.length && !isLoading\">\r\n <td class=\"c-empty\" colspan=\"100\">\r\n <mat-icon>cloud_off</mat-icon>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>",
2162
+ template: "<div class=\"clearfix\"></div>\r\n<ng-container *ngIf=\"!isMobileOrTablet && !gridOption?.filter?.disabled\">\r\n <div class=\"row mx-0 mt-5\">\r\n <div\r\n *ngIf=\"gridOption?.key && gridOption?.filter?.multiple !== false && (!gridOption?.filter?.quickFilterVisibility || gridOption?.filter?.quickFilterVisibility === 'inline')\"\r\n class=\"col-lg-2 col-md-3 col-sm-6 px-4\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\" style=\"width: 100%;\">\r\n <mat-label>{{'Quick filters' | sdTranslate}}</mat-label>\r\n <mat-select [(ngModel)]=\"selectedQuickFilter\" (selectionChange)=\"onSelectQuickFilter($event?.value)\" #matSelect>\r\n <mat-option value=\"\">{{'Please select' | sdTranslate}}</mat-option>\r\n <mat-option *ngFor=\"let quickFilter of quickFilters\" [value]=\"quickFilter.code\">\r\n <div style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1 c-fa-icon\" (click)=\"onEditQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-pencil\"></mat-icon>\r\n <mat-icon class=\"mr-0 c-fa-icon\" (click)=\"onDeleteQuickFilter($event, quickFilter)\" fontSet=\"fa\"\r\n fontIcon=\"fa-trash-o\"></mat-icon>\r\n </div>\r\n </div>\r\n </mat-option>\r\n <mat-option>\r\n <div (click)=\"onCreateQuickFilter($event)\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </div>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <sd-grid-desktop-inline-filter class=\"c-display-contents\" [columns]=\"gridOption.columns\" [filter]=\"filter\"\r\n [externalFilter]=\"externalFilter\" (sdChange)=\"updateFilter()\" [inlineExternal]=\"inlineExternal\"\r\n [inlineColumn]=\"inlineColumn\" [filterOption]=\"gridOption.filter\">\r\n </sd-grid-desktop-inline-filter>\r\n </div>\r\n</ng-container>\r\n<div *ngIf=\"!isMobileOrTablet; else elseMobileOrTablet\" class=\"sd-box\"\r\n [ngClass]=\"{'box-shadow-none': gridOption.hideFooter}\">\r\n <ng-container *ngTemplateOutlet=\"gridViewContent\"></ng-container>\r\n <div [ngClass]=\"{'d-none': gridOption.hideFooter}\" class=\"sd-box-footer clearfix\">\r\n <div style=\"display: flex; align-items: center; align-content: space-between;\">\r\n <div style=\"flex: 1;\">\r\n <sd-button *ngIf=\"sdGridPopupFilter\" class=\"mr-6\" [title]=\"'Filter' | sdTranslate\" icon=\"filter_list\" size=\"sm\"\r\n (action)=\"onFilterPopup()\"></sd-button>\r\n <sd-button *ngIf=\"!gridOption?.hideReload\" class=\"mr-6\" [title]=\"'Reload' | sdTranslate\" icon=\"refresh\"\r\n size=\"sm\" (action)=\"reload()\"></sd-button>\r\n <sd-button *ngIf=\"gridOption.onImportExcel\" class=\"mr-6\" [title]=\"'Import' | sdTranslate\" icon=\"publish\"\r\n size=\"sm\" (action)=\"sdGridImportExcel.open()\"></sd-button>\r\n <ng-container *ngIf=\"sdGridPopupExportExcel\">\r\n <sd-button *ngIf=\"!gridOption.key\" class=\"mr-6\" [title]=\"'Export' | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n (action)=\"sdGridPopupExportExcel.exportDefault()\" [disabled]=\"!viewItems?.length\">\r\n </sd-button>\r\n <sd-button *ngIf=\"gridOption.key\" class=\"mr-6\" [title]=\"'Export' | sdTranslate\" icon=\"get_app\" size=\"sm\"\r\n [matMenuTriggerFor]=\"menu\" [disabled]=\"!viewItems?.length\">\r\n </sd-button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"sdGridPopupExportExcel.exportDefault()\" type=\"button\">\r\n <mat-icon>get_app</mat-icon>\r\n <span> {{'Export all columns' | sdTranslate}}</span>\r\n </button>\r\n <button mat-menu-item (click)=\"sdGridPopupExportExcel.open()\" type=\"button\">\r\n <mat-icon>settings</mat-icon>\r\n <span> {{'Configure' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button *ngIf=\"gridOption.key\" class=\"mr-6\" [title]=\"'Configure' | sdTranslate\" icon=\"settings\" size=\"sm\"\r\n (action)=\"sdGridConfig.open()\"></sd-button>\r\n </div>\r\n <div style=\"flex: 1;\">\r\n <mat-paginator [length]=\"total\" [pageSize]=\"gridOption.paginate?.pageSize\" hidePageSize>\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<ng-template #elseMobileOrTablet>\r\n <div class=\"sd-box c-mobile-box\">\r\n <div *ngIf=\"!gridOption?.mobileOrTablet?.useGridView\" class=\"sd-box-body c-mobile-body\"\r\n [ngClass]=\"{'c-loading': isLoading}\" #gridBody>\r\n <i [ngClass]=\"{'d-none': !isLoading}\" class=\"fa fa-4x fa-spinner fa-pulse c-loading-icon\"></i>\r\n <ng-container *ngFor=\"let item of viewItems\">\r\n <div class=\"c-mobile-item\" [ngClass]=\"{'c-mobile-item-selected':item.isChecked}\">\r\n <sd-grid-mobile-item-view [gridOption]=\"gridOption\" [item]=\"item\" (check)=\"onCheck(item)\">\r\n </sd-grid-mobile-item-view>\r\n <div class=\"p-2\" *ngIf=\"gridOption?.subInformation && item?.subInformation?.isOpened\">\r\n <sd-grid-sub-information [subItems]=\"item?.subInformation?.subItems\" [option]=\"gridOption?.subInformation\">\r\n </sd-grid-sub-information>\r\n </div>\r\n <div class=\"c-mobile-command\">\r\n <div>\r\n <i *ngIf=\"gridOption?.subInformation && item.subInformation?.isLoading\"\r\n class=\"fa fa-spinner fa-spin ml-1 c-mobile-action\" (click)=\"expandOrCollapse(item)\"></i>\r\n <i *ngIf=\"gridOption?.subInformation && !item.subInformation?.isLoading\" class=\"fa ml-1 c-mobile-action\"\r\n [ngClass]=\"{'fa-plus': !item.subInformation?.isOpened, 'fa-minus': item.subInformation?.isOpened}\"\r\n (click)=\"expandOrCollapse(item)\"></i>\r\n </div>\r\n <ng-container *ngIf=\"gridOption.commands | mobileCommandFilter:item | async; $implicit as filteredCommands\">\r\n <div *ngIf=\"filteredCommands.length\">\r\n <button [matMenuTriggerFor]=\"menu\" aria-hidden=\"true\" mat-icon-button type=\"button\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <!-- <i [matMenuTriggerFor]=\"menu\" class=\"fa fa-navicon fa-fw c-mobile-action\"></i> -->\r\n <mat-menu #menu=\"matMenu\">\r\n <button *ngFor=\"let command of filteredCommands\" mat-menu-item (click)=\"command.click(item)\"\r\n [disabled]=\"command.disabled | commandDisabled:item\" type=\"button\">\r\n <i *ngIf=\"!command.fontSet\" class=\"{{command.icon | commandIcon:item}}\"></i>\r\n <mat-icon *ngIf=\"command.fontSet\" [fontSet]=\"command.fontSet\">{{command.icon | commandIcon:item}}\r\n </mat-icon>\r\n <span> {{command.title | commandTitle:item}}</span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"gridOption?.mobileOrTablet?.useGridView\">\r\n <ng-container *ngTemplateOutlet=\"gridViewContent\"></ng-container>\r\n </ng-container>\r\n <div [ngClass]=\"{'d-none': gridOption.hideFooter}\" class=\"sd-box-footer clearfix\">\r\n <sd-button icon=\"more_horiz\" size=\"sm\" [matMenuTriggerFor]=\"mobileAction\"></sd-button>\r\n <mat-menu #mobileAction=\"matMenu\">\r\n <button *ngIf=\"sdGridPopupFilter\" mat-menu-item (click)=\"onFilterPopup()\" type=\"button\">\r\n <mat-icon>filter_list</mat-icon>\r\n <span> {{'Filter' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"!gridOption?.hideReload\" mat-menu-item (click)=\"reload()\" type=\"button\">\r\n <mat-icon>refresh</mat-icon>\r\n <span> {{'Reload' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.onImportExcel\" mat-menu-item (click)=\"sdGridImportExcel.open()\" type=\"button\">\r\n <mat-icon>publish</mat-icon>\r\n <span> {{'Import' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"sdGridPopupExportExcel\" mat-menu-item (click)=\"sdGridPopupExportExcel.open()\" type=\"button\"\r\n [disabled]=\"!viewItems?.length\">\r\n <mat-icon>get_app</mat-icon>\r\n <span> {{'Export' | sdTranslate}}</span>\r\n </button>\r\n <button *ngIf=\"gridOption.key\" mat-menu-item (click)=\"sdGridConfig.open()\" type=\"button\">\r\n <mat-icon>settings</mat-icon>\r\n <span> {{'Configure' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n <ng-container *ngIf=\"gridOption?.key && gridOption?.filter?.multiple !== false && !gridOption?.filter?.disabled\">\r\n <sd-button icon=\"filter_list\" size=\"sm\" [matMenuTriggerFor]=\"mobileQuickFilter\"></sd-button>\r\n <mat-menu #mobileQuickFilter=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let quickFilter of quickFilters\" (click)=\"onSelectQuickFilter(quickFilter.code)\"\r\n type=\"button\" style=\"display:flex; justify-content: space-between\">\r\n <span>{{quickFilter.code}}</span>\r\n <div>\r\n <mat-icon class=\"mr-1\" (click)=\"onEditQuickFilter($event, quickFilter)\">edit</mat-icon>\r\n <mat-icon class=\"mr-0\" (click)=\"onDeleteQuickFilter($event, quickFilter)\">delete</mat-icon>\r\n </div>\r\n </button>\r\n <button mat-menu-item (click)=\"onCreateQuickFilter($event)\" type=\"button\">\r\n <mat-icon class=\"mr-1\" fontSet=\"material-icons-outlined\">add</mat-icon>\r\n <span>{{'Create quick filter' | sdTranslate}}</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <div class=\"row mr-0 ml-0 text-right pull-right\">\r\n <mat-paginator [length]=\"total\" [pageSize]=\"gridOption.paginate?.pageSize\" hidePageSize>\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<!-- Modal Configure Grid -->\r\n<sd-grid-config (sdChange)=\"loadConfig($event)\" #sdGridConfig></sd-grid-config>\r\n<sd-grid-popup-editor (save)=\"onSave($event)\" #sdGridPopupEditor></sd-grid-popup-editor>\r\n<!-- Import Excel -->\r\n<sd-grid-import-excel *ngIf=\"gridOption?.onImportExcel\" [key]=\"gridOption?.key\" [columns]=\"gridOption?.columns\"\r\n [accept]=\"gridOption?.onImportExcel\" #sdGridImportExcel></sd-grid-import-excel>\r\n<sd-grid-popup-export-excel *ngIf=\"!gridOption.export?.disabled\" [key]=\"gridOption?.key\" [columns]=\"gridOption?.columns\"\r\n [extendColumns]=\"gridOption?.export?.columns\" [fileName]=\"gridOption?.export?.fileName\"\r\n [exportOption]=\"gridOption?.export\" [validator]=\"gridOption?.export?.validator\"\r\n (exportByTemplate)=\"onExportByTemplate($event)\" #sdGridPopupExportExcel>\r\n</sd-grid-popup-export-excel>\r\n<sd-grid-popup-filter\r\n *ngIf=\"!gridOption?.filter?.disabled && (isMobileOrTablet || gridOption?.filter?.type === 'popup')\"\r\n [key]=\"gridOption?.key\" (accept)=\"updateFilter($event)\" [filterOption]=\"gridOption?.filter\" (clear)=\"onClearFilter()\"\r\n (loadInlineFilter)=\"onFilterConfigurationLoaded($event)\" #sdGridPopupFilter>\r\n</sd-grid-popup-filter>\r\n\r\n<ng-template #gridViewContent>\r\n <div class=\"sd-box-body p-0\">\r\n <div class=\"row mx-0\">\r\n <div [ngClass]=\"{'c-loading': isLoading}\" class=\"table-responsive\" #gridBody style=\"position: relative;\">\r\n <i [ngClass]=\"{'d-none': !isLoading}\" class=\"fa fa-5x fa-spinner fa-pulse c-loading-icon\"></i>\r\n <table *ngIf=\"gridOption\" class=\"table c-table\"\r\n [ngClass]=\"{'c-loading-margin': isLoading, 'c-bordered': configuration?.style?.bordered, 'c-stripped': configuration?.style?.bordered}\"\r\n style=\"border:0!important;\">\r\n <thead class=\"thead-light\">\r\n <tr>\r\n <th class=\"position-sticky c-sticky-all align-middle p-0\" style=\"width:4px; min-width: 4px;\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"configuration?.style?.bordered\" class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\"\r\n #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.subInformation\" class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"gridOption?.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-all align-middle text-center p-0 w-20\" style=\"width:20px;\" #fixedHeader>\r\n <mat-checkbox [color]=\"'primary'\" [(ngModel)]=\"isCheckedAll\"\r\n (change)=\"checkAll(isCheckedAll)\"></mat-checkbox>\r\n </th>\r\n <th *ngIf=\"gridOption?.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle text-center p-0 c-sticky-all c-w-1\" #fixedHeader>\r\n </th>\r\n <th *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:60px;min-width:60px;max-width:60px;line-height: 1.5\" #fixedHeader>\r\n <div *ngIf=\"gridOption.editor.addable\" class=\"align-middle text-center\">\r\n <button *ngIf=\"!gridOption.editor.limit || (gridOption.editor.limit > items.length)\" type=\"button\"\r\n (click)=\"onCreate()\" aria-label=\"Add\" mat-icon-button type=\"button\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n </th>\r\n <th *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <th *ngIf=\"gridOption?.numberable\" class=\"position-sticky c-sticky-all align-middle text-center p-0\"\r\n style=\"width:20px;\" #fixedHeader>\r\n #\r\n </th>\r\n <th *ngIf=\"gridOption?.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n <ng-container *ngFor=\"let column of fixedColumns\">\r\n <th class=\"position-sticky align-middle cursor-pointer c-cell c-sticky-all\" #fixedHeader\r\n [ngStyle]=\"{'width':column.width ? column.width : '','max-width': column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <span [title]=\"column.title\" class=\"c-header-title\" (click)=\"sort(column)\">\r\n {{column.title}}\r\n <i *ngIf=\"column.type !== 'children' && column.type !== 'image' && gridOption.sortable !== false && column.sortable !== false && orderBy !== column.field\"\r\n class=\"fa fa-sort fa-fw\"></i>\r\n <i *ngIf=\"orderBy === column.field && orderDirection == 'ASC'\" class=\"fa fa-sort-asc fa-fw\"></i>\r\n <i *ngIf=\"orderBy === column.field && orderDirection == 'DESC'\" class=\"fa fa-sort-desc fa-fw\"></i>\r\n </span>\r\n <ng-container\r\n *ngIf=\"!gridOption?.filter?.disabled && gridOption?.filter?.columnInline !== 'outside' && !column?.filter?.disabled && (inlineColumn[column.field] || gridOption?.filter?.type === 'inline')\">\r\n <sd-input size=\"sm\"\r\n *ngIf=\"column.type === 'string' || column.type === 'number' || column.type === 'children'\"\r\n [(model)]=\"filter[column.field]\" (keyupEnter)=\"updateFilter()\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\"\r\n [items]=\"[{value: 1, display: column.trueValue || 'TRUE'}, {value: 0, display: column.falseValue || 'FALSE'}]\"\r\n valueField=\"value\" displayField=\"display\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n [filtered]=\"column?.editor?.autocomplete\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" [valueField]=\"column.valueField\"\r\n [displayField]=\"column.displayField\">\r\n </sd-select>\r\n <sd-date-time size=\"sm\"\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [(model)]=\"filter[column.field]\" (sdChange)=\"updateFilter()\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </th>\r\n <th *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-all\" #fixedHeader></th>\r\n </ng-container>\r\n <th *ngFor=\"let column of normalColumns\"\r\n class=\"position-sticky align-middle cursor-pointer border-top-0 border-bottom-0 c-cell c-sticky-top c-normal-column\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '','max-width': column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <span [title]=\"column.title\" class=\"c-header-title\" (click)=\"sort(column)\">\r\n {{column.title}}\r\n <i *ngIf=\"column.type !== 'children' && gridOption.sortable !== false && column.sortable !== false && orderBy !== column.field\"\r\n class=\"fa fa-sort fa-fw\"></i>\r\n <i *ngIf=\"orderBy == column.field && orderDirection == 'ASC'\" class=\"fa fa-sort-asc fa-fw\"></i>\r\n <i *ngIf=\"orderBy == column.field && orderDirection == 'DESC'\" class=\"fa fa-sort-desc fa-fw\"></i>\r\n </span>\r\n <ng-container\r\n *ngIf=\"!gridOption?.filter?.disabled && gridOption?.filter?.columnInline !== 'outside' && !column?.filter?.disabled && (inlineColumn[column.field] || gridOption?.filter?.type === 'inline')\">\r\n <sd-input size=\"sm\"\r\n *ngIf=\"column.type === 'string' || column.type === 'number' || column.type === 'children'\"\r\n [(model)]=\"filter[column.field]\" (keyupEnter)=\"updateFilter()\">\r\n </sd-input>\r\n <sd-select *ngIf=\"column.type === 'bool'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\"\r\n [items]=\"[{value: 1, display: column.trueValue || 'TRUE'}, {value: 0, display: column.falseValue || 'FALSE'}]\"\r\n valueField=\"value\" displayField=\"display\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'values'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" valueField=\"value\" displayField=\"text\"\r\n [filtered]=\"column?.editor?.autocomplete\">\r\n </sd-select>\r\n <sd-select *ngIf=\"column.type === 'radio'\" size=\"sm\" [(model)]=\"filter[column.field]\"\r\n (sdChange)=\"updateFilter()\" [items]=\"column.values\" [valueField]=\"column.valueField\"\r\n [displayField]=\"column.displayField\">\r\n </sd-select>\r\n <sd-date-time size=\"sm\"\r\n *ngIf=\"column.type === 'date' || column.type === 'datetime' || column.type === 'time'\"\r\n [(model)]=\"filter[column.field]\" (sdChange)=\"updateFilter()\" type=\"date\">\r\n </sd-date-time>\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let item of viewItems; index as idx; trackBy: trackById\">\r\n <tr>\r\n <td class=\"position-sticky c-sticky-left p-0\"\r\n [ngClass]=\"{'c-error': ((gridOption.editor?.type === 'inline' || item.editingStatus) && item.editorHandler?.errorMessage), \r\n 'c-selected': !((gridOption.editor?.type === 'inline' || item.editingStatus) && item.editorHandler?.errorMessage) && selectedItem === item}\"\r\n style=\"width:4px;min-width: 4px;left:0\" matTooltipPosition=\"after\"\r\n [matTooltip]=\"item.editingStatus ? item.editorHandler?.errorMessage:''\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.subInformation\" class=\"position-sticky text-center align-middle p-0 c-sticky-left\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedBody>\r\n <button *ngIf=\"!item.editingStatus\" (click)=\"expandOrCollapse(item)\" type=\"button\" class=\"c-btn-icon\">\r\n <i *ngIf=\"item.subInformation?.isLoading\" class=\"fa fa-spinner fa-spin\"></i>\r\n <i *ngIf=\"!item.subInformation?.isLoading\" class=\"fa\"\r\n [ngClass]=\"{'fa-caret-right': !item.subInformation?.isOpened, 'fa-caret-down': item.subInformation?.isOpened}\"></i>\r\n </button>\r\n </td>\r\n <td *ngIf=\"gridOption.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"align-middle text-center w-20\" style=\"width:20px;\">\r\n <mat-checkbox [color]=\"'primary'\" [(ngModel)]=\"item.isChecked\"\r\n (change)=\"onCheck(item, true)\"></mat-checkbox>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle px-2 py-0 c-sticky-left c-w-1\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"d-flex align-middle text-center justify-content-center\">\r\n <ng-container\r\n *ngIf=\"gridOption.commands | commandFilter:item | async; $implicit as filteredCommands\">\r\n <section *ngFor=\"let command of filteredCommands\">\r\n <ng-container *ngIf=\"!command.children?.length; else elseCommandChildren\">\r\n <button *ngIf=\"!command.fontSet\" (click)=\"command.click(item)\" type=\"button\"\r\n class=\"c-btn-icon\" [matTooltip]=\"command.title | commandTitle:item\"\r\n [disabled]=\"command.disabled | commandDisabled:item\">\r\n <i class=\"{{command.icon | commandIcon:item}}\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button *ngIf=\"command.fontSet\" [matTooltip]=\"command.title | commandTitle:item\"\r\n [disabled]=\"command.disabled | commandDisabled:item\" (click)=\"command.click(item)\"\r\n type=\"button\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon [fontSet]=\"command.fontSet\">{{command.icon | commandIcon:item}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #elseCommandChildren>\r\n <button *ngIf=\"command.icon\" [matMenuTriggerFor]=\"menu\" type=\"button\" class=\"c-btn-icon\"\r\n [matTooltip]=\"command.title\" [disabled]=\"command.disabled | commandDisabled:item\">\r\n <i class=\"{{command.icon | commandIcon:item}}\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button *ngIf=\"!command.icon\" mat-icon-button [matMenuTriggerFor]=\"menu\" type=\"button\"\r\n class=\"c-btn-icon-30\" [matTooltip]=\"command.title\"\r\n [disabled]=\"command.disabled | commandDisabled:item\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <ng-container *ngFor=\"let childCommand of command.children\">\r\n <button *ngIf=\"!(item | commandHidden:childCommand | async)\" type=\"button\" mat-menu-item\r\n [disabled]=\"childCommand.disabled | commandDisabled:item\"\r\n (click)=\"childCommand.click(item)\">\r\n <i *ngIf=\"!childCommand.fontSet\" class=\"{{childCommand.icon | commandIcon:item}}\"></i>\r\n <mat-icon *ngIf=\"childCommand.fontSet\" [fontSet]=\"childCommand.fontSet\">\r\n {{childCommand.icon | commandIcon:item}}</mat-icon>\r\n <span> {{childCommand.title | commandTitle:item}}</span>\r\n </button>\r\n </ng-container>\r\n </mat-menu>\r\n </ng-template>\r\n </section>\r\n </ng-container>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div class=\"align-middle text-center\"\r\n style=\"width:60px;min-width:60px;max-width:60px;line-height: 1.5\">\r\n <button\r\n *ngIf=\"!item.editingStatus && gridOption.editor?.type !== 'inline' && gridOption.editor?.editable\"\r\n [disabled]=\"item.editorHandler?.disabled\" (click)=\"onUpdate(item, true)\" aria-label=\"Edit\"\r\n type=\"button\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button *ngIf=\"item.editingStatus && gridOption.editor?.type !== 'inline'\"\r\n [disabled]=\"item.editorHandler?.errorMessage || item.editorHandler?.saving\" (click)=\"onSave(item)\"\r\n type=\"button\" aria-label=\"Save\" mat-icon-button>\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n <button *ngIf=\"item.editingStatus || gridOption.editor?.type === 'inline'\" (click)=\"onCancel(item)\"\r\n aria-label=\"Cancel\" mat-icon-button\r\n [disabled]=\"gridOption.editor?.type === 'inline' && item.editorHandler?.disabled\" type=\"button\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.numberable\" class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n <div *ngIf=\"!item.editingStatus\" class=\"align-middle text-center\" style=\"width:20px;\">\r\n <!-- {{gridOption.paginate?.pageSize * (currentPage - 1) + idx + 1}} -->\r\n {{idx + 1}}\r\n </div>\r\n </td>\r\n <td *ngIf=\"gridOption.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <ng-template ngFor let-column [ngForOf]=\"fixedColumns\">\r\n <td class=\"position-sticky align-middle c-cell c-sticky-left\"\r\n [ngClass]=\"{'text-center': column.type !== 'string' && column.type !== 'number' && column.type !== 'children', 'text-right': column.type === 'number'}\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '','min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\"\r\n (click)=\"rowHandler.click(item)\" #fixedBody>\r\n <ng-container *ngIf=\"column.type !== 'children';else elseColumnChildren\">\r\n <ng-container *ngIf=\"item[column.field] | editorHandler:item:gridOption\">\r\n <div\r\n *ngIf=\"item.editorHandler[column.field].visible && gridOption.editor?.validate && !(item[column.field] | editorValidate:item:gridOption.editor.validate | async)\">\r\n </div>\r\n <ng-container *ngIf=\"item.editorHandler[column.field].visible;else columnView\">\r\n <div style=\"width: 100%\">\r\n <ng-container *ngIf=\"cellEditorDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellEditorDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-edit *ngIf=\"!cellEditorDef[column.field]\" [column]=\"column\"\r\n [item]=\"item\" (sdChange)=\"onEditorChange()\">\r\n </sd-grid-desktop-column-edit>\r\n </div>\r\n </ng-container>\r\n <ng-template #columnView>\r\n <div class=\"align-middle\" (dblclick)=\"rowHandler.dblClick(item)\">\r\n <ng-container *ngIf=\"cellDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-view *ngIf=\"!cellDef[column.field]\" [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-view>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseColumnChildren>\r\n <sd-grid-desktop-column-children-view [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-children-view>\r\n </ng-template>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n </ng-template>\r\n <td *ngFor=\"let column of normalColumns\" class=\"align-middle c-cell c-normal-column\"\r\n (click)=\"rowHandler.click(item)\"\r\n [ngClass]=\"{'text-center': column.type !== 'string' && column.type !== 'number' && column.type !== 'children', 'text-right': column.type === 'number'}\"\r\n (dblclick)=\"rowHandler.dblClick(item)\"\r\n [ngStyle]=\"{'width':column.width ? column.width : '', 'min-width': !column.width || column.width === 'auto' ? '200px' : column.width}\">\r\n <ng-container *ngIf=\"column.type !== 'children';else elseColumnChildren\">\r\n <ng-container *ngIf=\"item[column.field] | editorHandler:item:gridOption\">\r\n <div\r\n *ngIf=\"item.editorHandler[column.field].visible && gridOption.editor?.validate && !(item[column.field] | editorValidate:item:gridOption.editor.validate | async)\">\r\n </div>\r\n <ng-container *ngIf=\"item.editorHandler[column.field].visible;else columnView\">\r\n <div style=\"width: 100%\">\r\n <ng-container *ngIf=\"cellEditorDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellEditorDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-edit *ngIf=\"!cellEditorDef[column.field]\" [column]=\"column\"\r\n [item]=\"item\" (sdChange)=\"onEditorChange()\">\r\n </sd-grid-desktop-column-edit>\r\n </div>\r\n </ng-container>\r\n <ng-template #columnView>\r\n <div class=\"align-middle\" (dblclick)=\"rowHandler.dblClick(item)\">\r\n <ng-container *ngIf=\"cellDef[column.field]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellDef[column.field].templateRef;context:{item: item, idx: idx, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n <sd-grid-desktop-column-view *ngIf=\"!cellDef[column.field]\" [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-view>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseColumnChildren>\r\n <sd-grid-desktop-column-children-view [column]=\"column\" [item]=\"item\">\r\n </sd-grid-desktop-column-children-view>\r\n </ng-template>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"gridOption?.subInformation && item?.subInformation?.isOpened\" class=\"c-no-hover\">\r\n <td class=\"p-10\" colspan=\"100\">\r\n <sd-grid-sub-information [subItems]=\"item?.subInformation?.subItems\"\r\n [option]=\"gridOption?.subInformation\">\r\n </sd-grid-sub-information>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n <ng-container *ngIf=\"viewItems?.length\">\r\n <ng-container *ngFor=\"let footerIndex of footerRows\">\r\n <tr>\r\n <td class=\"position-sticky c-sticky-left p-0\" style=\"width:4px;min-width: 4px;left:0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.subInformation\"\r\n class=\"position-sticky text-center align-middle p-0 c-sticky-left\"\r\n style=\"width:30px;min-width: 30px;line-height: 3rem\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.subInformation && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.checkable && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length\"\r\n class=\"position-sticky align-middle px-2 py-0 c-sticky-left c-w-1\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.commands?.length && viewItems?.length && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.editor?.addable || gridOption.editor?.editable\"\r\n class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.editor && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <td *ngIf=\"gridOption.numberable\" class=\"position-sticky c-sticky-left align-middle p-0\" #fixedBody>\r\n </td>\r\n <td *ngIf=\"gridOption.numberable && configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n <ng-template ngFor let-column [ngForOf]=\"fixedColumns\">\r\n <td class=\"position-sticky align-middle p-0 c-sticky-left\" #fixedBody>\r\n <ng-container *ngIf=\"cellFooterDef[column.field] && cellFooterDef[column.field][footerIndex]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellFooterDef[column.field][footerIndex].templateRef;context:{items: viewItems, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n <td *ngIf=\"configuration?.style?.bordered\"\r\n class=\"position-sticky h-100 p-0 c-sticky-spliter c-sticky-left\" #fixedBody></td>\r\n </ng-template>\r\n <td *ngFor=\"let column of normalColumns\" class=\"align-middle p-0 c-normal-column\">\r\n <ng-container *ngIf=\"cellFooterDef[column.field] && cellFooterDef[column.field][footerIndex]\">\r\n <ng-container\r\n *ngTemplateOutlet=\"cellFooterDef[column.field][footerIndex].templateRef;context:{items: viewItems, column:column}\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n <tr *ngIf=\"!viewItems?.length && !isLoading\">\r\n <td class=\"c-empty\" colspan=\"100\">\r\n <mat-icon>cloud_off</mat-icon>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>",
2306
2163
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2307
2164
  styles: [".text-black400{color:#757575}.c-table.table{margin-bottom:5px}.c-table.table td.c-empty,.c-table.table th.c-empty{background-color:#fff;border:none!important;text-align:center}.c-table.table td.c-empty mat-icon,.c-table.table th.c-empty mat-icon{font-size:150px;height:auto;margin-bottom:30px;margin-top:30px;opacity:.2;width:auto}.c-table.table.c-bordered,.c-table.table.c-bordered td,.c-table.table.c-bordered th{border:1px solid #dee2e6!important}.c-table.table.c-bordered td.c-empty,.c-table.table.c-bordered th.c-empty{background-color:#fff;border:none!important;text-align:center}.c-table.table.c-bordered td.c-empty mat-icon,.c-table.table.c-bordered th.c-empty mat-icon{font-size:150px;height:auto;margin-bottom:30px;margin-top:30px;opacity:.2;width:auto}.c-table.table.c-bordered td.c-normal-column,.c-table.table.c-bordered th.c-normal-column{border-left:none!important}.c-table.table.c-bordered td.c-sticky-spliter,.c-table.table.c-bordered th.c-sticky-spliter{background-color:#dee2e6!important;border:none!important;display:table-cell;max-width:1px!important;min-width:1px!important;width:1px!important}.c-table.table.c-bordered td.c-sticky-left,.c-table.table.c-bordered th.c-sticky-left{border-left:0!important;border-right:0!important}.c-table.table.c-bordered td.c-sticky-all,.c-table.table.c-bordered th.c-sticky-all{border:0!important}.c-table.table thead.thead-light th{background-color:#eceff1;border-top:none!important;color:#2f3136;font-size:14px!important;height:40px;min-width:0}.c-table.table thead.thead-light th.c-cell{padding:3px 5px!important}.c-table.table thead.thead-light th .mat-checkbox label{margin-bottom:0}.c-table.table tbody tr:not(.c-no-hover):hover,.c-table.table tbody tr:not(.c-no-hover):hover td.c-sticky-left{background-color:#e3f2fd!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(odd){background-color:#fafafa}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(odd) .c-sticky-left{background-color:#fafafa!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(odd) .c-sticky-left.c-sticky-spliter{background-color:#dee2e6!important;border:none!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(odd) .c-sticky-left.c-selected{background-color:#2962ff!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(odd) .c-sticky-left.c-error{background-color:#f82c13!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(2n){background-color:#fff}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(2n) .c-sticky-left{background-color:#fff!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(2n) .c-sticky-left.c-sticky-spliter{background-color:#dee2e6!important;border:none!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(2n) .c-sticky-left.c-selected{background-color:#2962ff!important}.c-table.table tbody tr:not(.c-no-hover):nth-of-type(2n) .c-sticky-left.c-error{background-color:#f82c13!important}.c-table.table tbody td{font-size:13px!important;min-height:25px;min-width:0}.c-table.table tbody td.c-cell{padding:3px 5px!important}.grid-header{overflow-x:hidden;overflow-y:hidden}.c-cell-padding{padding:3px 5px!important}.c-header-title{font-weight:500;text-transform:capitalize}span.c-header-title{display:block;overflow:hidden!important;padding:0 .3rem;text-overflow:ellipsis;white-space:nowrap}.status{border-radius:1.5rem;display:inline-block;font-weight:500;padding:4px 8px;text-align:center;text-transform:uppercase}.status.c-desktop-status{width:100%}.status.c-align-left{text-align:left!important}.status-success{color:#43a047}.status-danger{color:#f44336}.page-item{cursor:pointer}.sumarize{background-color:#00bcd4;border-radius:10rem;color:#fff;display:inline-block;font-size:12px;font-weight:500;line-height:1;padding:8px 12px;text-align:center;text-transform:uppercase;white-space:normal}.cursor-pointer{cursor:pointer}.c-overflow-x-hidden{overflow-x:hidden}.c-grid-header,.c-overflow-y-hidden{overflow-y:hidden}.c-grid-header{overflow-x:hidden}.c-input-xs{font-size:13px!important;height:28px!important;line-height:1.5!important;padding:3px!important}.c-sticky-top{top:0!important;z-index:20}.c-sticky-left{left:0;z-index:20}.c-sticky-all{left:0;top:0!important;z-index:30}.c-sticky-spliter{background-color:#dee2e6!important;border:none!important;z-index:40!important}.c-badge:not(.c-children){border-radius:10rem;display:block!important;font-size:12px;font-weight:500;margin:0 auto;max-width:80%;padding:.3rem!important}.c-badge.c-children{font-size:14px;font-weight:500;padding:5px!important}.blinker{-webkit-animation:blinker .5s linear infinite;animation:blinker .5s linear infinite;color:#1c87c9;font-weight:500}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.c-loading{opacity:.4}.c-loading-icon{left:calc(50% - 2.5rem);position:-webkit-sticky;position:sticky;top:calc(50% - 2.5rem)}.c-loading-margin{margin-top:-5rem}fieldset.c-fieldset-mobile{border:1px solid #e0e0e0;border-radius:5px;padding:3px 5px}legend.c-legend-mobile{border-bottom:none;font-size:16px;font-weight:500;margin:0 10px;padding:0 5px;width:auto}.c-mobile-box{border-top:none!important;box-shadow:0 0 3px 0 rgba(0,0,0,.3)}.c-mobile-body{margin-bottom:5px;margin-top:5px;overflow-x:auto}.c-mobile-item{border:1px solid #fff;border-radius:5px;box-shadow:0 0 3px 0 rgba(0,0,0,.3);margin:8px 0;padding:5px}.c-mobile-item.c-mobile-item-selected{border:2px solid #2962ff!important}.c-mobile-item:nth-of-type(odd){background-color:#fafafa}.c-mobile-item:nth-of-type(2n){background-color:#fff}.c-mobile-row{margin-bottom:3px;margin-top:0}.c-desktop-title{font-size:13px;line-height:1.7}.c-desktop-title,.c-mobile-title{color:#212529;font-weight:700;margin-right:3px}.c-mobile-title{font-size:14px}.c-children,.c-mobile-value{color:#212529;font-size:14px;overflow-wrap:break-word}.c-mobile-badge{font-size:14px;font-weight:500;padding:5px!important}.c-mobile-command{align-items:center;border-top:1px solid #f4f4f4;display:flex;justify-content:space-between;padding:5px 3px 0}.c-mobile-action{font-size:18px!important}.c-mobile-checkable{margin:5px 0 5px -5px!important}.c-m-3{margin:3px!important}.c-m-5{margin:5px!important}.c-w-1{min-width:1px;width:1px}.c-display-contents{display:contents}.w-20{width:20px!important}.c-btn-icon-30{height:30px;line-height:30px;width:30px}.c-btn-icon{background:none!important;border:none;display:inline-flex;height:16px;opacity:.8;padding:0 3px}.c-btn-icon:hover{cursor:pointer;opacity:1}.c-btn-icon:disabled{background:none!important;border:none;cursor:not-allowed;opacity:.3}:host td .mat-icon-button,:host th .mat-icon-button{height:24px;line-height:24px;width:24px}:host td .mat-icon-button .material-icons,:host th .mat-icon-button .material-icons{font-size:20px}:host ::ng-deep .mat-paginator-container{height:32px;min-height:32px}:host ::ng-deep .mat-paginator-container .mat-icon-button{height:28px;line-height:28px;width:28px}:host ::ng-deep .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-checkbox label{margin-bottom:0}"]
2308
2165
  },] }
@@ -2317,7 +2174,7 @@
2317
2174
  { type: common.DatePipe },
2318
2175
  { type: loading.SdLoadingService },
2319
2176
  { type: api.SdApiService },
2320
- { type: excel.SdExcelService },
2177
+ { type: _export.SdExportService },
2321
2178
  { type: notify.SdNotifyService },
2322
2179
  { type: EditorHandlerPipe }
2323
2180
  ]; };
@@ -2763,11 +2620,11 @@
2763
2620
  };
2764
2621
 
2765
2622
  var SdGridPopupExportExcel = /** @class */ (function () {
2766
- function SdGridPopupExportExcel(ref, loadingService, excelService, notifyService, translateService) {
2623
+ function SdGridPopupExportExcel(ref, loadingService, exportService, notifyService, translateService) {
2767
2624
  var _this = this;
2768
2625
  this.ref = ref;
2769
2626
  this.loadingService = loadingService;
2770
- this.excelService = excelService;
2627
+ this.exportService = exportService;
2771
2628
  this.notifyService = notifyService;
2772
2629
  this.translateService = translateService;
2773
2630
  this.prefix = 'Popup Export Excel';
@@ -2878,7 +2735,7 @@
2878
2735
  }
2879
2736
  finally { if (e_3) throw e_3.error; }
2880
2737
  return [7 /*endfinally*/];
2881
- case 9: return [4 /*yield*/, this.excelService.generateExcelTemplate({
2738
+ case 9: return [4 /*yield*/, this.exportService.generateTemplate({
2882
2739
  fileName: fileName || this.fileName,
2883
2740
  columns: this.generateExcelColumns(columns),
2884
2741
  sheets: sheets
@@ -2900,17 +2757,13 @@
2900
2757
  });
2901
2758
  }); };
2902
2759
  this.generateTemplate = function () { return __awaiter(_this, void 0, void 0, function () {
2903
- var result;
2904
2760
  return __generator(this, function (_c) {
2905
2761
  switch (_c.label) {
2906
2762
  case 0:
2907
2763
  this.loadingService.start();
2908
2764
  return [4 /*yield*/, this.initDefaultTemplate().finally(this.loadingService.stop)];
2909
2765
  case 1:
2910
- result = _c.sent();
2911
- if (result === null || result === void 0 ? void 0 : result.filePath) {
2912
- this.excelService.downloadTemplate(result.filePath, this.fileName + ".xlsx");
2913
- }
2766
+ _c.sent();
2914
2767
  return [2 /*return*/];
2915
2768
  }
2916
2769
  });
@@ -2964,10 +2817,13 @@
2964
2817
  }
2965
2818
  finally { if (e_4) throw e_4.error; }
2966
2819
  return [7 /*endfinally*/];
2967
- case 9: return [4 /*yield*/, this.excelService.generateAndUploadExcelTemplate(this.fullKey, {
2968
- fileName: fileName || this.fileName,
2969
- columns: this.generateExcelColumns(columns),
2970
- sheets: sheets
2820
+ case 9: return [4 /*yield*/, this.exportService.generateUploadTemplate({
2821
+ key: this.fullKey,
2822
+ template: {
2823
+ fileName: fileName || this.fileName,
2824
+ columns: this.generateExcelColumns(columns),
2825
+ sheets: sheets
2826
+ }
2971
2827
  })];
2972
2828
  case 10: return [2 /*return*/, _j.sent()];
2973
2829
  }
@@ -2986,12 +2842,15 @@
2986
2842
  var excelConfig;
2987
2843
  return __generator(this, function (_c) {
2988
2844
  switch (_c.label) {
2989
- case 0: return [4 /*yield*/, this.excelService.uploadTemplate(this.fullKey, this.validator)];
2845
+ case 0: return [4 /*yield*/, this.exportService.uploadTemplate({
2846
+ key: this.fullKey,
2847
+ validator: this.validator
2848
+ })];
2990
2849
  case 1:
2991
2850
  excelConfig = _c.sent();
2992
2851
  this.excelConfigs.push({
2993
- name: excelConfig.name,
2994
- fullPath: excelConfig.fullPath,
2852
+ name: excelConfig.fileName,
2853
+ fullPath: excelConfig.filePath,
2995
2854
  removable: true
2996
2855
  });
2997
2856
  this.ref.detectChanges();
@@ -3000,7 +2859,7 @@
3000
2859
  });
3001
2860
  }); };
3002
2861
  this.downloadTemplate = function (excelConfig) {
3003
- _this.excelService.downloadTemplate(excelConfig.fullPath, excelConfig.name);
2862
+ _this.exportService.download(excelConfig.fullPath, excelConfig.name);
3004
2863
  };
3005
2864
  this.removeTemplate = function (excelConfig) {
3006
2865
  _this.notifyService.confirm(_this.translateService.translate('Remove template')).then(function () { return __awaiter(_this, void 0, void 0, function () {
@@ -3009,7 +2868,7 @@
3009
2868
  switch (_c.label) {
3010
2869
  case 0:
3011
2870
  this.loadingService.start();
3012
- return [4 /*yield*/, this.excelService.remove(this.fullKey, excelConfig.name).finally(this.loadingService.stop)];
2871
+ return [4 /*yield*/, this.exportService.removeFile({ key: this.fullKey, fileName: excelConfig.name }).finally(this.loadingService.stop)];
3013
2872
  case 1:
3014
2873
  _c.sent();
3015
2874
  idx = this.excelConfigs.indexOf(excelConfig);
@@ -3073,13 +2932,13 @@
3073
2932
  }
3074
2933
  finally { if (e_5) throw e_5.error; }
3075
2934
  }
3076
- this.exportByTemplate.emit({
3077
- excelConfig: {
3078
- fullPath: result.filePath,
3079
- name: "[" + this.fullKey + "] Default.xlsx"
3080
- },
3081
- excelColumns: excelColumns
3082
- });
2935
+ // this.exportByTemplate.emit({
2936
+ // excelConfig: {
2937
+ // fullPath: result.filePath,
2938
+ // name: `[${this.fullKey}] Default.xlsx`
2939
+ // },
2940
+ // excelColumns
2941
+ // });
3083
2942
  this.ref.detectChanges();
3084
2943
  return [2 /*return*/];
3085
2944
  }
@@ -3194,15 +3053,19 @@
3194
3053
  };
3195
3054
  SdGridPopupExportExcel.prototype.loadConfiguration = function () {
3196
3055
  return __awaiter(this, void 0, void 0, function () {
3197
- var _c;
3198
- return __generator(this, function (_d) {
3199
- switch (_d.label) {
3056
+ var files;
3057
+ return __generator(this, function (_c) {
3058
+ switch (_c.label) {
3200
3059
  case 0:
3201
3060
  this.excelConfigs = [];
3202
- _c = this;
3203
- return [4 /*yield*/, this.excelService.getFiles(this.fullKey)];
3061
+ return [4 /*yield*/, this.exportService.filesInFolder({ key: this.fullKey })];
3204
3062
  case 1:
3205
- _c.excelConfigs = _d.sent();
3063
+ files = _c.sent();
3064
+ this.excelConfigs = files.map(function (e) { return ({
3065
+ fullPath: e.filePath,
3066
+ name: e.fileName,
3067
+ removable: true
3068
+ }); });
3206
3069
  return [2 /*return*/];
3207
3070
  }
3208
3071
  });
@@ -3220,7 +3083,7 @@
3220
3083
  SdGridPopupExportExcel.ctorParameters = function () { return [
3221
3084
  { type: core.ChangeDetectorRef },
3222
3085
  { type: loading.SdLoadingService },
3223
- { type: excel.SdExcelService },
3086
+ { type: _export.SdExportService },
3224
3087
  { type: notify.SdNotifyService },
3225
3088
  { type: translate.SdTranslateService }
3226
3089
  ]; };