@sd-angular/core 1.2.35 → 1.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/scss/core/print.scss +15 -0
- package/assets/scss/core/scrollbar.scss +7 -0
- package/assets/scss/sd-core.scss +1 -16
- package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/autocomplete/src/lib/autocomplete.component.d.ts +2 -0
- package/bundles/sd-angular-core-autocomplete.umd.js +2 -1
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-chip.umd.js +3 -2
- package/bundles/sd-angular-core-chip.umd.js.map +1 -1
- package/bundles/sd-angular-core-chip.umd.min.js +1 -1
- package/bundles/sd-angular-core-chip.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-common.umd.js +4 -0
- package/bundles/sd-angular-core-common.umd.js.map +1 -1
- package/bundles/sd-angular-core-common.umd.min.js +1 -1
- package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-month.umd.js +2 -1
- package/bundles/sd-angular-core-date-month.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-month.umd.min.js +1 -1
- package/bundles/sd-angular-core-date-month.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-range.umd.js +3 -2
- package/bundles/sd-angular-core-date-range.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-range.umd.min.js +1 -1
- package/bundles/sd-angular-core-date-range.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.js +2 -1
- package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js +1 -1
- package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-dynamic-report.umd.js +11 -13
- package/bundles/sd-angular-core-dynamic-report.umd.js.map +1 -1
- package/bundles/sd-angular-core-dynamic-report.umd.min.js +1 -1
- package/bundles/sd-angular-core-dynamic-report.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.js +7 -6
- package/bundles/sd-angular-core-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-editor.umd.min.js +2 -2
- package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.js +48 -18
- package/bundles/sd-angular-core-export.umd.js.map +1 -1
- package/bundles/sd-angular-core-export.umd.min.js +1 -1
- package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +131 -129
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.js +2 -1
- package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-currency.umd.min.js +2 -2
- package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.js +2 -9
- package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.js +5 -4
- package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-json-editor.umd.js +3 -2
- package/bundles/sd-angular-core-json-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-json-editor.umd.min.js +2 -2
- package/bundles/sd-angular-core-json-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-radio.umd.js +2 -1
- package/bundles/sd-angular-core-radio.umd.js.map +1 -1
- package/bundles/sd-angular-core-radio.umd.min.js +1 -1
- package/bundles/sd-angular-core-radio.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select-badge.umd.js +9 -8
- package/bundles/sd-angular-core-select-badge.umd.js.map +1 -1
- package/bundles/sd-angular-core-select-badge.umd.min.js +2 -2
- package/bundles/sd-angular-core-select-badge.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.js +3 -2
- package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
- package/bundles/sd-angular-core-select-editor.umd.min.js +1 -1
- package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.js +2 -1
- package/bundles/sd-angular-core-select.umd.js.map +1 -1
- package/bundles/sd-angular-core-select.umd.min.js +2 -2
- package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.js +3 -2
- package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
- package/bundles/sd-angular-core-textarea.umd.min.js +1 -1
- package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-time.umd.js +4 -3
- package/bundles/sd-angular-core-time.umd.js.map +1 -1
- package/bundles/sd-angular-core-time.umd.min.js +2 -2
- package/bundles/sd-angular-core-time.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-upload-file.umd.js +8 -7
- package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
- package/bundles/sd-angular-core-upload-file.umd.min.js +2 -2
- package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
- package/chip/sd-angular-core-chip.metadata.json +1 -1
- package/chip/src/lib/chip.component.d.ts +2 -0
- package/common/src/lib/directives/sd-scroll.directive.d.ts +1 -0
- package/date-month/sd-angular-core-date-month.metadata.json +1 -1
- package/date-month/src/lib/date-month.component.d.ts +2 -0
- package/date-range/sd-angular-core-date-range.metadata.json +1 -1
- package/date-range/src/lib/date-range.component.d.ts +2 -0
- package/date-time/sd-angular-core-date-time.metadata.json +1 -1
- package/date-time/src/lib/date-time.component.d.ts +2 -0
- package/dynamic-report/sd-angular-core-dynamic-report.metadata.json +1 -1
- package/dynamic-report/src/lib/dynamic-report.component.d.ts +4 -3
- package/editor/sd-angular-core-editor.metadata.json +1 -1
- package/editor/src/lib/editor.component.d.ts +2 -0
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +4 -2
- package/esm2015/chip/src/lib/chip.component.js +5 -3
- package/esm2015/common/src/lib/directives/sd-scroll.directive.js +4 -1
- package/esm2015/date-month/src/lib/date-month.component.js +4 -2
- package/esm2015/date-range/src/lib/date-range.component.js +6 -4
- package/esm2015/date-time/src/lib/date-time.component.js +4 -2
- package/esm2015/dynamic-report/src/lib/dynamic-report.component.js +9 -9
- package/esm2015/dynamic-report/src/lib/dynamic-report.module.js +3 -3
- package/esm2015/editor/src/lib/editor.component.js +5 -3
- package/esm2015/export/src/lib/export.service.js +39 -13
- package/esm2015/grid-material/src/lib/components/desktop-command/desktop-command.component.js +2 -2
- package/esm2015/grid-material/src/lib/grid-material.component.js +21 -17
- package/esm2015/input-currency/src/lib/input-currency.component.js +4 -2
- package/esm2015/input-dropdown/src/lib/input.component.js +3 -10
- package/esm2015/input-number/src/lib/input-number.component.js +7 -5
- package/esm2015/json-editor/src/lib/json-editor.component.js +6 -4
- package/esm2015/radio/src/lib/radio.component.js +5 -3
- package/esm2015/select/src/lib/select.component.js +4 -2
- package/esm2015/select-badge/src/lib/select-badge.component.js +5 -3
- package/esm2015/select-editor/src/lib/select-editor.component.js +6 -4
- package/esm2015/textarea/src/lib/textarea.component.js +5 -3
- package/esm2015/time/src/lib/time.component.js +5 -3
- package/esm2015/upload-file/src/lib/upload-file.component.js +6 -4
- package/export/sd-angular-core-export.metadata.json +1 -1
- package/export/src/lib/export.service.d.ts +2 -2
- package/fesm2015/sd-angular-core-autocomplete.js +3 -2
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-chip.js +4 -3
- package/fesm2015/sd-angular-core-chip.js.map +1 -1
- package/fesm2015/sd-angular-core-common.js +3 -0
- package/fesm2015/sd-angular-core-common.js.map +1 -1
- package/fesm2015/sd-angular-core-date-month.js +3 -2
- package/fesm2015/sd-angular-core-date-month.js.map +1 -1
- package/fesm2015/sd-angular-core-date-range.js +5 -4
- package/fesm2015/sd-angular-core-date-range.js.map +1 -1
- package/fesm2015/sd-angular-core-date-time.js +3 -2
- package/fesm2015/sd-angular-core-date-time.js.map +1 -1
- package/fesm2015/sd-angular-core-dynamic-report.js +9 -10
- package/fesm2015/sd-angular-core-dynamic-report.js.map +1 -1
- package/fesm2015/sd-angular-core-editor.js +4 -2
- package/fesm2015/sd-angular-core-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-export.js +38 -12
- package/fesm2015/sd-angular-core-export.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +21 -18
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-input-currency.js +3 -2
- package/fesm2015/sd-angular-core-input-currency.js.map +1 -1
- package/fesm2015/sd-angular-core-input-dropdown.js +2 -9
- package/fesm2015/sd-angular-core-input-dropdown.js.map +1 -1
- package/fesm2015/sd-angular-core-input-number.js +6 -5
- package/fesm2015/sd-angular-core-input-number.js.map +1 -1
- package/fesm2015/sd-angular-core-json-editor.js +5 -4
- package/fesm2015/sd-angular-core-json-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-radio.js +4 -3
- package/fesm2015/sd-angular-core-radio.js.map +1 -1
- package/fesm2015/sd-angular-core-select-badge.js +4 -3
- package/fesm2015/sd-angular-core-select-badge.js.map +1 -1
- package/fesm2015/sd-angular-core-select-editor.js +5 -4
- package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
- package/fesm2015/sd-angular-core-select.js +3 -2
- package/fesm2015/sd-angular-core-select.js.map +1 -1
- package/fesm2015/sd-angular-core-textarea.js +4 -3
- package/fesm2015/sd-angular-core-textarea.js.map +1 -1
- package/fesm2015/sd-angular-core-time.js +4 -3
- package/fesm2015/sd-angular-core-time.js.map +1 -1
- package/fesm2015/sd-angular-core-upload-file.js +5 -3
- package/fesm2015/sd-angular-core-upload-file.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/grid-material.component.d.ts +2 -0
- package/input-currency/sd-angular-core-input-currency.metadata.json +1 -1
- package/input-currency/src/lib/input-currency.component.d.ts +2 -0
- package/input-number/sd-angular-core-input-number.metadata.json +1 -1
- package/input-number/src/lib/input-number.component.d.ts +3 -1
- package/json-editor/sd-angular-core-json-editor.metadata.json +1 -1
- package/json-editor/src/lib/json-editor.component.d.ts +2 -0
- package/package.json +4 -3
- package/radio/sd-angular-core-radio.metadata.json +1 -1
- package/radio/src/lib/radio.component.d.ts +2 -0
- package/{sd-angular-core-1.2.35.tgz → sd-angular-core-1.2.38.tgz} +0 -0
- package/select/sd-angular-core-select.metadata.json +1 -1
- package/select/src/lib/select.component.d.ts +2 -0
- package/select-badge/sd-angular-core-select-badge.metadata.json +1 -1
- package/select-badge/src/lib/select-badge.component.d.ts +2 -0
- package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
- package/select-editor/src/lib/select-editor.component.d.ts +2 -0
- package/textarea/sd-angular-core-textarea.metadata.json +1 -1
- package/textarea/src/lib/textarea.component.d.ts +2 -0
- package/time/sd-angular-core-time.metadata.json +1 -1
- package/time/src/lib/time.component.d.ts +2 -0
- package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
- package/upload-file/src/lib/upload-file.component.d.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SdCommonModule } from '@sd-angular/core/common';
|
|
1
|
+
import { SdScrollDirective, SdCommonModule } from '@sd-angular/core/common';
|
|
2
2
|
import { Directive, TemplateRef, Input, InjectionToken, EventEmitter, Component, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild, Output, Injectable, Inject, Optional, Pipe, QueryList, ContentChild, ContentChildren, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { __awaiter, __classPrivateFieldGet, __rest, __classPrivateFieldSet } from 'tslib';
|
|
4
4
|
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
@@ -1471,14 +1471,16 @@ class SdGridMaterial {
|
|
|
1471
1471
|
__classPrivateFieldGet(this, _updateSelectedItems).call(this);
|
|
1472
1472
|
}));
|
|
1473
1473
|
this.reload = (force = true) => __awaiter(this, void 0, void 0, function* () {
|
|
1474
|
+
var _d;
|
|
1474
1475
|
const data = yield __classPrivateFieldGet(this, _load$1).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force);
|
|
1476
|
+
(_d = this.sdScroll) === null || _d === void 0 ? void 0 : _d.scrollTop();
|
|
1475
1477
|
__classPrivateFieldGet(this, _render).call(this, data);
|
|
1476
1478
|
});
|
|
1477
1479
|
_exportedItems.set(this, (pageNumber = 0, pageSize = 10000) => __awaiter(this, void 0, void 0, function* () {
|
|
1478
|
-
var
|
|
1479
|
-
if ((
|
|
1480
|
+
var _e, _f;
|
|
1481
|
+
if ((_e = this.gridOption.export) === null || _e === void 0 ? void 0 : _e.items) {
|
|
1480
1482
|
// const exportedItems = this.gridOption.export?.items(this.#filterExportInfo(pageNumber, pageSize));
|
|
1481
|
-
let result = (
|
|
1483
|
+
let result = (_f = this.gridOption.export) === null || _f === void 0 ? void 0 : _f.items(__classPrivateFieldGet(this, _filterExportInfo).call(this, pageNumber, pageSize));
|
|
1482
1484
|
if (Array.isArray(result)) {
|
|
1483
1485
|
return result;
|
|
1484
1486
|
}
|
|
@@ -1551,10 +1553,10 @@ class SdGridMaterial {
|
|
|
1551
1553
|
return ((_b = (_a = this.gridOption.export) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.filter(e => { var _a; return !((_a = e.export) === null || _a === void 0 ? void 0 : _a.disabled); })) || [];
|
|
1552
1554
|
});
|
|
1553
1555
|
_onExport.set(this, (args) => __awaiter(this, void 0, void 0, function* () {
|
|
1554
|
-
var
|
|
1556
|
+
var _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1555
1557
|
try {
|
|
1556
1558
|
const { file, columns, isCSV } = args;
|
|
1557
|
-
const pageSize = ((
|
|
1559
|
+
const pageSize = ((_h = (_g = this.gridOption) === null || _g === void 0 ? void 0 : _g.export) === null || _h === void 0 ? void 0 : _h.maxItemsPerRequest) || 1000;
|
|
1558
1560
|
let total = this.total;
|
|
1559
1561
|
let pageNumber = 0;
|
|
1560
1562
|
let exportItems = [];
|
|
@@ -1570,7 +1572,7 @@ class SdGridMaterial {
|
|
|
1570
1572
|
exportItems = res;
|
|
1571
1573
|
// total = exportItems.length;
|
|
1572
1574
|
}
|
|
1573
|
-
if ((
|
|
1575
|
+
if ((_j = this.gridOption.export) === null || _j === void 0 ? void 0 : _j.mapping) {
|
|
1574
1576
|
const results = this.gridOption.export.mapping(exportItems);
|
|
1575
1577
|
if (results instanceof Promise) {
|
|
1576
1578
|
exportItems = yield results;
|
|
@@ -1587,7 +1589,7 @@ class SdGridMaterial {
|
|
|
1587
1589
|
for (const item of exportItems) {
|
|
1588
1590
|
const obj = {};
|
|
1589
1591
|
const handle = (exportColumn) => __awaiter(this, void 0, void 0, function* () {
|
|
1590
|
-
var
|
|
1592
|
+
var _r, _s;
|
|
1591
1593
|
obj[exportColumn.field] = item[exportColumn.field];
|
|
1592
1594
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
1593
1595
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
@@ -1624,10 +1626,10 @@ class SdGridMaterial {
|
|
|
1624
1626
|
else if (column.type === 'bool') {
|
|
1625
1627
|
// Nếu là bool thì gán bằng giá trị trueValue và falseValue (nếu có), mặc định là TRUE/FALSE
|
|
1626
1628
|
if (item[column.field]) {
|
|
1627
|
-
obj[column.field] = ((
|
|
1629
|
+
obj[column.field] = ((_r = column.option) === null || _r === void 0 ? void 0 : _r.displayOnTrue) || 'True';
|
|
1628
1630
|
}
|
|
1629
1631
|
else if (obj[column.field] !== undefined && obj[column.field] !== null) {
|
|
1630
|
-
obj[column.field] = ((
|
|
1632
|
+
obj[column.field] = ((_s = column.option) === null || _s === void 0 ? void 0 : _s.displayOnFalse) || 'False';
|
|
1631
1633
|
}
|
|
1632
1634
|
}
|
|
1633
1635
|
else if (column.type === 'date') {
|
|
@@ -1678,12 +1680,12 @@ class SdGridMaterial {
|
|
|
1678
1680
|
yield this.exportService.exportCSV({
|
|
1679
1681
|
columns,
|
|
1680
1682
|
items,
|
|
1681
|
-
fileName: (
|
|
1683
|
+
fileName: (_l = (_k = this.gridOption) === null || _k === void 0 ? void 0 : _k.export) === null || _l === void 0 ? void 0 : _l.fileName
|
|
1682
1684
|
});
|
|
1683
1685
|
return;
|
|
1684
1686
|
}
|
|
1685
1687
|
const sheets = [];
|
|
1686
|
-
if (Array.isArray((
|
|
1688
|
+
if (Array.isArray((_o = (_m = this.gridOption) === null || _m === void 0 ? void 0 : _m.export) === null || _o === void 0 ? void 0 : _o.sheets)) {
|
|
1687
1689
|
for (const sheet of this.gridOption.export.sheets) {
|
|
1688
1690
|
if (sheet.name && sheet.items && sheet.fields) {
|
|
1689
1691
|
if (Array.isArray(sheet.items)) {
|
|
@@ -1706,7 +1708,7 @@ class SdGridMaterial {
|
|
|
1706
1708
|
yield this.exportService.export({
|
|
1707
1709
|
columns,
|
|
1708
1710
|
items,
|
|
1709
|
-
fileName: (
|
|
1711
|
+
fileName: (_q = (_p = this.gridOption) === null || _p === void 0 ? void 0 : _p.export) === null || _q === void 0 ? void 0 : _q.fileName,
|
|
1710
1712
|
sheets
|
|
1711
1713
|
});
|
|
1712
1714
|
return;
|
|
@@ -1740,8 +1742,8 @@ class SdGridMaterial {
|
|
|
1740
1742
|
this.reload(false);
|
|
1741
1743
|
};
|
|
1742
1744
|
this.onExpand = (rowData) => __awaiter(this, void 0, void 0, function* () {
|
|
1743
|
-
var
|
|
1744
|
-
if ((
|
|
1745
|
+
var _t, _u, _v, _w, _x;
|
|
1746
|
+
if ((_t = this.gridOption.subInformation) === null || _t === void 0 ? void 0 : _t.always) {
|
|
1745
1747
|
return;
|
|
1746
1748
|
}
|
|
1747
1749
|
if (rowData.isExpanding) {
|
|
@@ -1751,8 +1753,8 @@ class SdGridMaterial {
|
|
|
1751
1753
|
rowData.isExpanded = false;
|
|
1752
1754
|
return;
|
|
1753
1755
|
}
|
|
1754
|
-
const data = (
|
|
1755
|
-
if (!((
|
|
1756
|
+
const data = (_w = (_v = (_u = this.gridOption) === null || _u === void 0 ? void 0 : _u.subInformation) === null || _v === void 0 ? void 0 : _v.onExpand) === null || _w === void 0 ? void 0 : _w.call(_v, rowData);
|
|
1757
|
+
if (!((_x = this.gridOption.subInformation) === null || _x === void 0 ? void 0 : _x.multiple)) {
|
|
1756
1758
|
this.items.forEach(item => item.isExpanding = item.isExpanded = false);
|
|
1757
1759
|
}
|
|
1758
1760
|
if (data instanceof Promise) {
|
|
@@ -2113,6 +2115,7 @@ SdGridMaterial.ctorParameters = () => [
|
|
|
2113
2115
|
{ type: SdEditorHandlerColumnPipe }
|
|
2114
2116
|
];
|
|
2115
2117
|
SdGridMaterial.propDecorators = {
|
|
2118
|
+
sdScroll: [{ type: ViewChild, args: [SdScrollDirective,] }],
|
|
2116
2119
|
quickAction: [{ type: ViewChild, args: [SdQuickAction,] }],
|
|
2117
2120
|
_gridFilter: [{ type: ViewChild, args: [SdGridFilter,] }],
|
|
2118
2121
|
option: [{ type: Input }],
|
|
@@ -2451,7 +2454,7 @@ class SdDesktopCommand {
|
|
|
2451
2454
|
SdDesktopCommand.decorators = [
|
|
2452
2455
|
{ type: Component, args: [{
|
|
2453
2456
|
selector: 'sd-desktop-command',
|
|
2454
|
-
template: "<ng-container *ngIf=\"item | commandFilter:commands | async; $implicit as filteredCommands\">\r\n <ng-container *ngFor=\"let command of filteredCommands\">\r\n <ng-container *ngIf=\"command?.click; else elseChildren\">\r\n <button (click)=\"command.click(item)\" [matTooltip]=\"command
|
|
2457
|
+
template: "<ng-container *ngIf=\"item | commandFilter:commands | async; $implicit as filteredCommands\">\r\n <ng-container *ngFor=\"let command of filteredCommands\">\r\n <ng-container *ngIf=\"command?.click; else elseChildren\">\r\n <button (click)=\"command.click(item)\" [matTooltip]=\"command | commandTitle:item\" aria-hidden=\"true\"\r\n [disabled]=\"item | commandDisable:command\" mat-icon-button>\r\n <mat-icon class=\"c-icon\" [fontSet]=\"command.fontSet\">{{command | commandIcon:item}}</mat-icon>\r\n </button>\r\n </ng-container>\r\n <ng-template #elseChildren>\r\n <button [matMenuTriggerFor]=\"menu\" aria-hidden=\"true\" mat-icon-button>\r\n <mat-icon *ngIf=\"command?.icon\" class=\"c-icon\" [fontSet]=\"command.fontSet\">{{command | commandIcon:item}}\r\n </mat-icon>\r\n <mat-icon *ngIf=\"!command?.icon\" class=\"c-icon\">more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <span>\r\n <button *ngFor=\"let childCommand of command.children\" mat-menu-item (click)=\"childCommand.click(item)\"\r\n [disabled]=\"item | commandDisable:childCommand\">\r\n <ng-container *ngIf=\"!childCommand.htmlTemplate\">\r\n <mat-icon [fontSet]=\"command.fontSet\" class=\"c-icon\">{{childCommand | commandIcon:item}}\r\n </mat-icon>\r\n <span> {{childCommand | commandTitle:item}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"childCommand.htmlTemplate\">\r\n <div [innerHTML]=\"childCommand.htmlTemplate(item)\"></div>\r\n </ng-container>\r\n </button>\r\n </span>\r\n </mat-menu>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n",
|
|
2455
2458
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2456
2459
|
styles: [":host{align-items:center;display:flex}mat-icon.c-icon{color:rgba(0,0,0,.54)!important}"]
|
|
2457
2460
|
},] }
|