@firestitch/list 12.1.4 → 12.2.1
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/app/classes/data-controller.d.ts +1 -0
- package/app/components/body/row/row.component.d.ts +3 -0
- package/app/directives/column/column.directive.d.ts +5 -3
- package/app/directives/group-footer/group-footer.directive.d.ts +6 -0
- package/app/directives/group-header/group-header.directive.d.ts +6 -0
- package/app/enums/row-type.enum.d.ts +2 -1
- package/app/fs-list.module.d.ts +26 -25
- package/app/interfaces/column-config.interface.d.ts +1 -1
- package/app/interfaces/listconfig.interface.d.ts +1 -0
- package/app/models/column.model.d.ts +6 -3
- package/app/models/row/group-footer-row.d.ts +10 -0
- package/app/models/row/group-row.d.ts +2 -1
- package/app/models/row.d.ts +3 -1
- package/bundles/firestitch-list.umd.js +159 -32
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/columns-controller.js +3 -2
- package/esm2015/app/classes/data-controller.js +18 -2
- package/esm2015/app/components/body/row/cell/cell.component.js +9 -4
- package/esm2015/app/components/body/row/row.component.js +11 -2
- package/esm2015/app/directives/column/column.directive.js +14 -7
- package/esm2015/app/directives/group-footer/group-footer.directive.js +14 -0
- package/esm2015/app/directives/group-header/group-header.directive.js +14 -0
- package/esm2015/app/enums/row-type.enum.js +3 -2
- package/esm2015/app/fs-list.module.js +11 -6
- package/esm2015/app/interfaces/column-config.interface.js +1 -1
- package/esm2015/app/interfaces/listconfig.interface.js +1 -1
- package/esm2015/app/models/column.model.js +15 -8
- package/esm2015/app/models/row/group-footer-row.js +21 -0
- package/esm2015/app/models/row/group-row.js +1 -1
- package/esm2015/app/models/row.js +5 -1
- package/esm2015/public_api.js +3 -2
- package/fesm2015/firestitch-list.js +110 -29
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -1
- package/app/directives/group-cell/group-cell.directive.d.ts +0 -6
- package/esm2015/app/directives/group-cell/group-cell.directive.js +0 -14
|
@@ -462,11 +462,13 @@
|
|
|
462
462
|
function Column(colConfig, colDefaults) {
|
|
463
463
|
if (colDefaults === void 0) { colDefaults = false; }
|
|
464
464
|
this.headerConfigs = new StyleConfig();
|
|
465
|
-
this.
|
|
465
|
+
this.groupHeaderConfigs = new StyleConfig();
|
|
466
|
+
this.groupFooterConfigs = new StyleConfig();
|
|
466
467
|
this.cellConfigs = new StyleConfig();
|
|
467
468
|
this.footerConfigs = new StyleConfig();
|
|
468
469
|
this.headerColspanned = false;
|
|
469
|
-
this.
|
|
470
|
+
this.groupHeaderColspanned = false;
|
|
471
|
+
this.groupFooterColspanned = false;
|
|
470
472
|
this.cellColspanned = false;
|
|
471
473
|
this.footerColspanned = false;
|
|
472
474
|
this._ordered = false;
|
|
@@ -611,7 +613,8 @@
|
|
|
611
613
|
case 'class':
|
|
612
614
|
{
|
|
613
615
|
_this.headerConfigs.mergeClassByPriority(_this.colStyles, defaults.header);
|
|
614
|
-
_this.
|
|
616
|
+
_this.groupHeaderConfigs.mergeClassByPriority(_this.colStyles, defaults.cell);
|
|
617
|
+
_this.groupFooterConfigs.mergeClassByPriority(_this.colStyles, defaults.cell);
|
|
615
618
|
_this.cellConfigs.mergeClassByPriority(_this.colStyles, defaults.cell);
|
|
616
619
|
_this.footerConfigs.mergeClassByPriority(_this.colStyles, defaults.footer);
|
|
617
620
|
}
|
|
@@ -619,7 +622,8 @@
|
|
|
619
622
|
case 'align':
|
|
620
623
|
{
|
|
621
624
|
_this.headerConfigs.mergeAlignByPriority(_this.colStyles, defaults.header);
|
|
622
|
-
_this.
|
|
625
|
+
_this.groupHeaderConfigs.mergeAlignByPriority(_this.colStyles, defaults.cell);
|
|
626
|
+
_this.groupFooterConfigs.mergeAlignByPriority(_this.colStyles, defaults.cell);
|
|
623
627
|
_this.cellConfigs.mergeAlignByPriority(_this.colStyles, defaults.cell);
|
|
624
628
|
_this.footerConfigs.mergeAlignByPriority(_this.colStyles, defaults.footer);
|
|
625
629
|
}
|
|
@@ -627,7 +631,8 @@
|
|
|
627
631
|
}
|
|
628
632
|
});
|
|
629
633
|
this.headerConfigs.updateClasesArray();
|
|
630
|
-
this.
|
|
634
|
+
this.groupHeaderConfigs.updateClasesArray();
|
|
635
|
+
this.groupFooterConfigs.updateClasesArray();
|
|
631
636
|
this.cellConfigs.updateClasesArray();
|
|
632
637
|
this.footerConfigs.updateClasesArray();
|
|
633
638
|
};
|
|
@@ -648,11 +653,13 @@
|
|
|
648
653
|
Column.prototype._parseConfig = function (config) {
|
|
649
654
|
this._attributes = config.attributes;
|
|
650
655
|
this.headerTemplate = config.headerTemplate;
|
|
651
|
-
this.
|
|
656
|
+
this.groupHeaderTemplate = config.groupHeaderTemplate;
|
|
657
|
+
this.groupFooterTemplate = config.groupFooterTemplate;
|
|
652
658
|
this.cellTemplate = config.cellTemplate;
|
|
653
659
|
this.footerTemplate = config.footerTemplate;
|
|
654
660
|
this.headerConfigs = new StyleConfig(config.headerConfigs);
|
|
655
|
-
this.
|
|
661
|
+
this.groupHeaderConfigs = new StyleConfig(config.groupHeaderConfigs);
|
|
662
|
+
this.groupFooterConfigs = new StyleConfig(config.groupFooterConfigs);
|
|
656
663
|
this.cellConfigs = new StyleConfig(config.cellConfigs);
|
|
657
664
|
this.footerConfigs = new StyleConfig(config.footerConfigs);
|
|
658
665
|
this.expandTrigger = config.expandTrigger;
|
|
@@ -998,7 +1005,8 @@
|
|
|
998
1005
|
});
|
|
999
1006
|
this._theadClass = this.hasHeader ? 'has-header' : '';
|
|
1000
1007
|
this._updateColspans('headerConfigs', 'headerColspanned');
|
|
1001
|
-
this._updateColspans('
|
|
1008
|
+
this._updateColspans('groupHeaderConfigs', 'groupHeaderColspanned');
|
|
1009
|
+
this._updateColspans('groupFooterConfigs', 'groupFooterColspanned');
|
|
1002
1010
|
this._updateColspans('cellConfigs', 'cellColspanned');
|
|
1003
1011
|
this._updateColspans('footerConfigs', 'footerColspanned');
|
|
1004
1012
|
this.updateVisibleColumns();
|
|
@@ -1167,7 +1175,8 @@
|
|
|
1167
1175
|
(function (RowType) {
|
|
1168
1176
|
RowType[RowType["Simple"] = 0] = "Simple";
|
|
1169
1177
|
RowType[RowType["Group"] = 1] = "Group";
|
|
1170
|
-
RowType[RowType["
|
|
1178
|
+
RowType[RowType["GroupFooter"] = 2] = "GroupFooter";
|
|
1179
|
+
RowType[RowType["Child"] = 3] = "Child";
|
|
1171
1180
|
})(exports.RowType || (exports.RowType = {}));
|
|
1172
1181
|
|
|
1173
1182
|
var BaseRow = /** @class */ (function () {
|
|
@@ -1309,6 +1318,38 @@
|
|
|
1309
1318
|
return SimpleRow;
|
|
1310
1319
|
}(BaseRow));
|
|
1311
1320
|
|
|
1321
|
+
var GroupFooterRow = /** @class */ (function (_super) {
|
|
1322
|
+
__extends(GroupFooterRow, _super);
|
|
1323
|
+
function GroupFooterRow(data, parent) {
|
|
1324
|
+
if (data === void 0) { data = {}; }
|
|
1325
|
+
if (parent === void 0) { parent = null; }
|
|
1326
|
+
var _this = _super.call(this, data, exports.RowType.GroupFooter) || this;
|
|
1327
|
+
_this.visible = true;
|
|
1328
|
+
_this._parent = parent;
|
|
1329
|
+
if (_this.parent) {
|
|
1330
|
+
_this.visible = _this._parent.expanded;
|
|
1331
|
+
_this.index = _this.parent.children.length;
|
|
1332
|
+
}
|
|
1333
|
+
return _this;
|
|
1334
|
+
}
|
|
1335
|
+
Object.defineProperty(GroupFooterRow.prototype, "parent", {
|
|
1336
|
+
get: function () {
|
|
1337
|
+
return this._parent;
|
|
1338
|
+
},
|
|
1339
|
+
enumerable: false,
|
|
1340
|
+
configurable: true
|
|
1341
|
+
});
|
|
1342
|
+
Object.defineProperty(GroupFooterRow.prototype, "isFooter", {
|
|
1343
|
+
get: function () {
|
|
1344
|
+
return true;
|
|
1345
|
+
},
|
|
1346
|
+
enumerable: false,
|
|
1347
|
+
configurable: true
|
|
1348
|
+
});
|
|
1349
|
+
GroupFooterRow.prototype.destroy = function () { };
|
|
1350
|
+
return GroupFooterRow;
|
|
1351
|
+
}(BaseRow));
|
|
1352
|
+
|
|
1312
1353
|
var Row = /** @class */ (function () {
|
|
1313
1354
|
function Row(data, rowType, _a) {
|
|
1314
1355
|
if (data === void 0) { data = {}; }
|
|
@@ -1387,6 +1428,13 @@
|
|
|
1387
1428
|
enumerable: false,
|
|
1388
1429
|
configurable: true
|
|
1389
1430
|
});
|
|
1431
|
+
Object.defineProperty(Row.prototype, "isFooter", {
|
|
1432
|
+
get: function () {
|
|
1433
|
+
return this._row instanceof GroupFooterRow;
|
|
1434
|
+
},
|
|
1435
|
+
enumerable: false,
|
|
1436
|
+
configurable: true
|
|
1437
|
+
});
|
|
1390
1438
|
Object.defineProperty(Row.prototype, "parent", {
|
|
1391
1439
|
get: function () {
|
|
1392
1440
|
return this._row.parent;
|
|
@@ -1539,6 +1587,7 @@
|
|
|
1539
1587
|
if (group) {
|
|
1540
1588
|
this._groupByFn = group.groupBy;
|
|
1541
1589
|
this._compareByFn = group.compareBy;
|
|
1590
|
+
this._footerRowFn = group.footer || (function () { return false; });
|
|
1542
1591
|
this._initialExpand = (_a = group.initialExpand) !== null && _a !== void 0 ? _a : true;
|
|
1543
1592
|
// group mode enabled by default
|
|
1544
1593
|
this._groupEnabled = (group.enabled !== void 0)
|
|
@@ -1684,6 +1733,7 @@
|
|
|
1684
1733
|
var row = this.visibleRows.find(function (visibleRow) { return visibleRow.data === rowData; });
|
|
1685
1734
|
row.toggleRowExpandStatus();
|
|
1686
1735
|
this._updateVisibleRows();
|
|
1736
|
+
console.log(this._rowsStack);
|
|
1687
1737
|
};
|
|
1688
1738
|
DataController.prototype._updateRowsStack = function (rows) {
|
|
1689
1739
|
var _this = this;
|
|
@@ -1717,7 +1767,7 @@
|
|
|
1717
1767
|
DataController.prototype._updateVisibleRows = function () {
|
|
1718
1768
|
this.visibleRows = this._rowsStack
|
|
1719
1769
|
.filter(function (row) {
|
|
1720
|
-
return !row.isChild || row.visible;
|
|
1770
|
+
return (!row.isChild && !row.isFooter) || row.visible;
|
|
1721
1771
|
});
|
|
1722
1772
|
};
|
|
1723
1773
|
DataController.prototype.updateRow = function (targetRow, trackBy) {
|
|
@@ -1758,14 +1808,21 @@
|
|
|
1758
1808
|
* Split existing rows by groups and store them for future use
|
|
1759
1809
|
*/
|
|
1760
1810
|
DataController.prototype.groupRowsBy = function (rows) {
|
|
1811
|
+
var e_1, _b;
|
|
1761
1812
|
var _this = this;
|
|
1762
1813
|
if (!this._groupByFn || !this._compareByFn) {
|
|
1763
1814
|
return rows;
|
|
1764
1815
|
}
|
|
1765
1816
|
var numberOfGroups = 0;
|
|
1817
|
+
var footerRows = new Map();
|
|
1766
1818
|
rows.forEach(function (row) {
|
|
1767
1819
|
var mainGroup = _this._groupByFn(row);
|
|
1820
|
+
var isFooterRow = _this._footerRowFn(row);
|
|
1768
1821
|
var mainGroupKey = _this._compareByFn(mainGroup);
|
|
1822
|
+
if (isFooterRow) {
|
|
1823
|
+
footerRows.set(mainGroupKey, row);
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1769
1826
|
if (!_this._store.has(mainGroupKey)) {
|
|
1770
1827
|
var group = new GroupRow(mainGroup, _this._initialExpand);
|
|
1771
1828
|
group.index = numberOfGroups;
|
|
@@ -1780,6 +1837,23 @@
|
|
|
1780
1837
|
group.children.push(childRow);
|
|
1781
1838
|
}
|
|
1782
1839
|
});
|
|
1840
|
+
try {
|
|
1841
|
+
for (var footerRows_1 = __values(footerRows), footerRows_1_1 = footerRows_1.next(); !footerRows_1_1.done; footerRows_1_1 = footerRows_1.next()) {
|
|
1842
|
+
var _c = __read(footerRows_1_1.value, 2), key = _c[0], value = _c[1];
|
|
1843
|
+
var group = this._store.get(key);
|
|
1844
|
+
if (group) {
|
|
1845
|
+
var footerRow = new GroupFooterRow(value, group);
|
|
1846
|
+
group.children.push(footerRow);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1851
|
+
finally {
|
|
1852
|
+
try {
|
|
1853
|
+
if (footerRows_1_1 && !footerRows_1_1.done && (_b = footerRows_1.return)) _b.call(footerRows_1);
|
|
1854
|
+
}
|
|
1855
|
+
finally { if (e_1) throw e_1.error; }
|
|
1856
|
+
}
|
|
1783
1857
|
return Array.from(this._store.values())
|
|
1784
1858
|
.reduce(function (acc, item) {
|
|
1785
1859
|
if (item.isGroup) {
|
|
@@ -4430,19 +4504,35 @@
|
|
|
4430
4504
|
args: ['class']
|
|
4431
4505
|
}] } });
|
|
4432
4506
|
|
|
4433
|
-
var
|
|
4434
|
-
__extends(
|
|
4435
|
-
function
|
|
4507
|
+
var FsListGroupHeaderDirective = /** @class */ (function (_super) {
|
|
4508
|
+
__extends(FsListGroupHeaderDirective, _super);
|
|
4509
|
+
function FsListGroupHeaderDirective() {
|
|
4436
4510
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
4437
4511
|
}
|
|
4438
|
-
return
|
|
4512
|
+
return FsListGroupHeaderDirective;
|
|
4439
4513
|
}(FsListCellDirective));
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
4514
|
+
FsListGroupHeaderDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListGroupHeaderDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
4515
|
+
FsListGroupHeaderDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsListGroupHeaderDirective, selector: "[fs-list-group-cell],[fs-list-group-header]", usesInheritance: true, ngImport: i0__namespace });
|
|
4516
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListGroupHeaderDirective, decorators: [{
|
|
4443
4517
|
type: i0.Directive,
|
|
4444
4518
|
args: [{
|
|
4445
|
-
selector: '[fs-list-group-cell]'
|
|
4519
|
+
selector: '[fs-list-group-cell],[fs-list-group-header]'
|
|
4520
|
+
}]
|
|
4521
|
+
}] });
|
|
4522
|
+
|
|
4523
|
+
var FsListGroupFooterDirective = /** @class */ (function (_super) {
|
|
4524
|
+
__extends(FsListGroupFooterDirective, _super);
|
|
4525
|
+
function FsListGroupFooterDirective() {
|
|
4526
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4527
|
+
}
|
|
4528
|
+
return FsListGroupFooterDirective;
|
|
4529
|
+
}(FsListCellDirective));
|
|
4530
|
+
FsListGroupFooterDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListGroupFooterDirective, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
4531
|
+
FsListGroupFooterDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsListGroupFooterDirective, selector: "[fs-list-group-footer]", usesInheritance: true, ngImport: i0__namespace });
|
|
4532
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListGroupFooterDirective, decorators: [{
|
|
4533
|
+
type: i0.Directive,
|
|
4534
|
+
args: [{
|
|
4535
|
+
selector: '[fs-list-group-footer]'
|
|
4446
4536
|
}]
|
|
4447
4537
|
}] });
|
|
4448
4538
|
|
|
@@ -4580,7 +4670,7 @@
|
|
|
4580
4670
|
return FsListColumnDirective;
|
|
4581
4671
|
}());
|
|
4582
4672
|
FsListColumnDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListColumnDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
4583
|
-
FsListColumnDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsListColumnDirective, selector: "fs-list-column", inputs: { visible: ["show", "visible"], title: "title", name: "name", customize: "customize", sortable: "sortable", sortableDefault: "sortableDefault", direction: "direction", align: "align", width: "width", className: ["class", "className"] }, queries: [{ propertyName: "headerTemplate", first: true, predicate: FsListHeaderDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headerConfigs", first: true, predicate: FsListHeaderDirective, descendants: true, static: true }, { propertyName: "
|
|
4673
|
+
FsListColumnDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsListColumnDirective, selector: "fs-list-column", inputs: { visible: ["show", "visible"], title: "title", name: "name", customize: "customize", sortable: "sortable", sortableDefault: "sortableDefault", direction: "direction", align: "align", width: "width", className: ["class", "className"] }, queries: [{ propertyName: "headerTemplate", first: true, predicate: FsListHeaderDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headerConfigs", first: true, predicate: FsListHeaderDirective, descendants: true, static: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: FsListGroupHeaderDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "groupHeaderConfigs", first: true, predicate: FsListGroupHeaderDirective, descendants: true, static: true }, { propertyName: "groupFooterTemplate", first: true, predicate: FsListGroupFooterDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "groupFooterConfigs", first: true, predicate: FsListGroupFooterDirective, descendants: true, static: true }, { propertyName: "cellTemplate", first: true, predicate: FsListCellDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "cellConfigs", first: true, predicate: FsListCellDirective, descendants: true, static: true }, { propertyName: "footerTemplate", first: true, predicate: FsListFooterDirective, descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "footerConfigs", first: true, predicate: FsListFooterDirective, descendants: true, static: true }, { propertyName: "expandTrigger", predicate: FsListGroupExpandTriggerDirective, descendants: true }], ngImport: i0__namespace });
|
|
4584
4674
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsListColumnDirective, decorators: [{
|
|
4585
4675
|
type: i0.Directive,
|
|
4586
4676
|
args: [{
|
|
@@ -4592,12 +4682,18 @@
|
|
|
4592
4682
|
}], headerConfigs: [{
|
|
4593
4683
|
type: i0.ContentChild,
|
|
4594
4684
|
args: [FsListHeaderDirective, { static: true }]
|
|
4595
|
-
}],
|
|
4685
|
+
}], groupHeaderTemplate: [{
|
|
4596
4686
|
type: i0.ContentChild,
|
|
4597
|
-
args: [
|
|
4598
|
-
}],
|
|
4687
|
+
args: [FsListGroupHeaderDirective, { read: i0.TemplateRef, static: true }]
|
|
4688
|
+
}], groupHeaderConfigs: [{
|
|
4599
4689
|
type: i0.ContentChild,
|
|
4600
|
-
args: [
|
|
4690
|
+
args: [FsListGroupHeaderDirective, { static: true }]
|
|
4691
|
+
}], groupFooterTemplate: [{
|
|
4692
|
+
type: i0.ContentChild,
|
|
4693
|
+
args: [FsListGroupFooterDirective, { read: i0.TemplateRef, static: true }]
|
|
4694
|
+
}], groupFooterConfigs: [{
|
|
4695
|
+
type: i0.ContentChild,
|
|
4696
|
+
args: [FsListGroupFooterDirective, { static: true }]
|
|
4601
4697
|
}], expandTrigger: [{
|
|
4602
4698
|
type: i0.ContentChildren,
|
|
4603
4699
|
args: [FsListGroupExpandTriggerDirective, { descendants: true }]
|
|
@@ -4859,8 +4955,9 @@
|
|
|
4859
4955
|
if (this.row.isGroup) {
|
|
4860
4956
|
this.cellContext.groupIndex = this.row.index;
|
|
4861
4957
|
}
|
|
4862
|
-
else if (this.row.isChild) {
|
|
4958
|
+
else if (this.row.isChild || this.row.isFooter) {
|
|
4863
4959
|
this.cellContext.groupChildIndex = this.row.index;
|
|
4960
|
+
this.cellContext.groupRow = this.row.parent.data;
|
|
4864
4961
|
}
|
|
4865
4962
|
}
|
|
4866
4963
|
this.cellContext.column = this.column;
|
|
@@ -4872,8 +4969,12 @@
|
|
|
4872
4969
|
}
|
|
4873
4970
|
};
|
|
4874
4971
|
FsCellComponent.prototype._initCellTemplate = function () {
|
|
4875
|
-
|
|
4876
|
-
|
|
4972
|
+
var _a, _b;
|
|
4973
|
+
if ((_a = this.row) === null || _a === void 0 ? void 0 : _a.isGroup) {
|
|
4974
|
+
this.cellTemplate = this.column.groupHeaderTemplate || this.column.cellTemplate;
|
|
4975
|
+
}
|
|
4976
|
+
else if ((_b = this.row) === null || _b === void 0 ? void 0 : _b.isFooter) {
|
|
4977
|
+
this.cellTemplate = this.column.groupFooterTemplate || this.column.cellTemplate;
|
|
4877
4978
|
}
|
|
4878
4979
|
else {
|
|
4879
4980
|
this.cellTemplate = this.column.cellTemplate;
|
|
@@ -5473,6 +5574,27 @@
|
|
|
5473
5574
|
this._destroy$ = new rxjs.Subject();
|
|
5474
5575
|
this._rowDiffer = _differs.find({}).create();
|
|
5475
5576
|
}
|
|
5577
|
+
Object.defineProperty(FsRowComponent.prototype, "isGroupRow", {
|
|
5578
|
+
get: function () {
|
|
5579
|
+
return this.row.isGroup;
|
|
5580
|
+
},
|
|
5581
|
+
enumerable: false,
|
|
5582
|
+
configurable: true
|
|
5583
|
+
});
|
|
5584
|
+
Object.defineProperty(FsRowComponent.prototype, "isChildRow", {
|
|
5585
|
+
get: function () {
|
|
5586
|
+
return this.row.isChild;
|
|
5587
|
+
},
|
|
5588
|
+
enumerable: false,
|
|
5589
|
+
configurable: true
|
|
5590
|
+
});
|
|
5591
|
+
Object.defineProperty(FsRowComponent.prototype, "isGroupFooterRow", {
|
|
5592
|
+
get: function () {
|
|
5593
|
+
return this.row.isFooter;
|
|
5594
|
+
},
|
|
5595
|
+
enumerable: false,
|
|
5596
|
+
configurable: true
|
|
5597
|
+
});
|
|
5476
5598
|
Object.defineProperty(FsRowComponent.prototype, "rowCssClass", {
|
|
5477
5599
|
get: function () {
|
|
5478
5600
|
var e_1, _b;
|
|
@@ -5664,7 +5786,7 @@
|
|
|
5664
5786
|
return FsRowComponent;
|
|
5665
5787
|
}());
|
|
5666
5788
|
FsRowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsRowComponent, deps: [{ token: i0__namespace.ElementRef }, { token: ReorderController }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.KeyValueDiffers }, { token: i0__namespace.Renderer2 }, { token: FsListDraggableListDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5667
|
-
FsRowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsRowComponent, selector: "[fs-list-row]", inputs: { row: "row", rowActionsRaw: "rowActionsRaw", groupActionsRaw: "groupActionsRaw", hasRowActions: "hasRowActions", rowEvents: "rowEvents", rowClass: "rowClass", restoreMode: "restoreMode", rowIndex: "rowIndex", columns: "columns", selection: "selection", rowRemoved: "rowRemoved" }, host: { properties: { "attr.role": "this.role", "class": "this.rowCssClass" } }, viewQueries: [{ propertyName: "cellRefs", predicate: ["td"], descendants: true }], ngImport: i0__namespace, template: "<!-- Drag -->\n<ng-container *ngIf=\"reorderController.leftReorderActivated$ | async\">\n <ng-container *ngTemplateOutlet=\"dragCell\"></ng-container>\n</ng-container>\n\n<!-- Selection -->\n<ng-container *ngIf=\"selection\">\n <td class=\"fs-list-col fs-list-col-selection\">\n <mat-checkbox (change)=\"selectRow($event)\"\n
|
|
5789
|
+
FsRowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsRowComponent, selector: "[fs-list-row]", inputs: { row: "row", rowActionsRaw: "rowActionsRaw", groupActionsRaw: "groupActionsRaw", hasRowActions: "hasRowActions", rowEvents: "rowEvents", rowClass: "rowClass", restoreMode: "restoreMode", rowIndex: "rowIndex", columns: "columns", selection: "selection", rowRemoved: "rowRemoved" }, host: { properties: { "attr.role": "this.role", "class": "this.rowCssClass" } }, viewQueries: [{ propertyName: "cellRefs", predicate: ["td"], descendants: true }], ngImport: i0__namespace, template: "<!-- Drag -->\n<ng-container *ngIf=\"reorderController.leftReorderActivated$ | async\">\n <ng-container *ngTemplateOutlet=\"dragCell\"></ng-container>\n</ng-container>\n\n<!-- Selection -->\n<ng-container *ngIf=\"selection\">\n <td class=\"fs-list-col fs-list-col-selection\">\n <ng-container *ngIf=\"!row.isFooter\">\n <mat-checkbox (change)=\"selectRow($event)\"\n [checked]=\"selected\"\n [indeterminate]=\"indeterminateSelected\">\n </mat-checkbox>\n </ng-container>\n </td>\n</ng-container>\n\n<!-- Content -->\n<ng-container *ngFor=\"let column of columns; trackBy: trackByFn; let isFirst = first\">\n <td fs-cell\n *ngIf=\"(isGroupRow && !column.groupHeaderColspanned)\n || (isGroupFooterRow && !column.groupFooterColspanned)\n || (!isGroupRow && !isGroupFooterRow && !column.cellColspanned)\"\n [column]=\"column\"\n [row]=\"row\"\n [rowIndex]=\"rowIndex\"\n [class]=\"(isGroupRow && column.groupHeaderConfigs.classesString)\n || (isGroupFooterRow && column.groupFooterConfigs.classesString)\n || (!isGroupFooterRow && column.cellConfigs.classesString)\"\n [ngClass]=\"{ 'primary-col': isFirst }\"\n [attr.colspan]=\"(isGroupRow && column.groupHeaderConfigs.colspan)\n || (isGroupFooterRow && column.groupFooterConfigs.colspan)\n || column.cellConfigs.colspan\"\n [attr.width]=\"column.width\"\n >\n </td>\n</ng-container>\n\n<!-- Drag -->\n<ng-container *ngIf=\"reorderController.rightReorderActivated$ | async\">\n <ng-container *ngTemplateOutlet=\"dragCell\"></ng-container>\n</ng-container>\n\n<!-- Row Actions -->\n<td *ngIf=\"hasRowActions && !(reorderController.manualReorderActivated$ | async)\" class=\"fs-list-col row-actions\">\n <ng-container *ngIf=\"!isGroupFooterRow\">\n <fs-list-row-actions [row]=\"row\"\n [index]=\"rowIndex\"\n [rowActions]=\"rowActions\"\n [menuRowActions]=\"menuRowActions\"\n [inlineRowActions]=\"inlineRowActions\"\n [restoreAction]=\"restoreAction\"\n [restoreMode]=\"restoreMode\"\n [rowRemoved]=\"rowRemoved\"\n ></fs-list-row-actions>\n </ng-container>\n</td>\n\n<ng-template #dragCell>\n <ng-container *ngIf=\"dragCellVisible && !isGroupFooterRow; else emptyCell\">\n <td class=\"fs-list-col drag-col\"\n (mousedown)=\"dragStart($event)\"\n (touchstart)=\"dragStart($event)\"\n >\n <mat-icon>drag_handle</mat-icon>\n </td>\n </ng-container>\n <ng-template #emptyCell>\n <td class=\"fs-list-col drag-col\"></td>\n </ng-template>\n</ng-template>\n", components: [{ type: i2__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: FsCellComponent, selector: "[fs-cell]", inputs: ["column", "row", "rowIndex"] }, { type: FsRowActionsComponent, selector: "fs-list-row-actions", inputs: ["row", "index", "restoreMode", "rowActions", "rowRemoved", "menuRowActions", "inlineRowActions", "restoreAction"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }], pipes: { "async": i3__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
5668
5790
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsRowComponent, decorators: [{
|
|
5669
5791
|
type: i0.Component,
|
|
5670
5792
|
args: [{
|
|
@@ -6493,7 +6615,8 @@
|
|
|
6493
6615
|
FsListCellDirective,
|
|
6494
6616
|
FsListHeaderDirective,
|
|
6495
6617
|
FsListFooterDirective,
|
|
6496
|
-
|
|
6618
|
+
FsListGroupHeaderDirective,
|
|
6619
|
+
FsListGroupFooterDirective,
|
|
6497
6620
|
FsListGroupExpandTriggerDirective,
|
|
6498
6621
|
FsListDraggableListDirective,
|
|
6499
6622
|
FsListDraggableRowDirective,
|
|
@@ -6525,7 +6648,8 @@
|
|
|
6525
6648
|
FsListCellDirective,
|
|
6526
6649
|
FsListHeaderDirective,
|
|
6527
6650
|
FsListFooterDirective,
|
|
6528
|
-
|
|
6651
|
+
FsListGroupHeaderDirective,
|
|
6652
|
+
FsListGroupFooterDirective,
|
|
6529
6653
|
FsListGroupExpandTriggerDirective,
|
|
6530
6654
|
FsListEmptyStateDirective,
|
|
6531
6655
|
FsListContentDirective] });
|
|
@@ -6593,7 +6717,8 @@
|
|
|
6593
6717
|
FsListCellDirective,
|
|
6594
6718
|
FsListHeaderDirective,
|
|
6595
6719
|
FsListFooterDirective,
|
|
6596
|
-
|
|
6720
|
+
FsListGroupHeaderDirective,
|
|
6721
|
+
FsListGroupFooterDirective,
|
|
6597
6722
|
FsListGroupExpandTriggerDirective,
|
|
6598
6723
|
FsListDraggableListDirective,
|
|
6599
6724
|
FsListDraggableRowDirective,
|
|
@@ -6613,7 +6738,8 @@
|
|
|
6613
6738
|
FsListCellDirective,
|
|
6614
6739
|
FsListHeaderDirective,
|
|
6615
6740
|
FsListFooterDirective,
|
|
6616
|
-
|
|
6741
|
+
FsListGroupHeaderDirective,
|
|
6742
|
+
FsListGroupFooterDirective,
|
|
6617
6743
|
FsListGroupExpandTriggerDirective,
|
|
6618
6744
|
FsListEmptyStateDirective,
|
|
6619
6745
|
FsListContentDirective,
|
|
@@ -6648,8 +6774,9 @@
|
|
|
6648
6774
|
exports.FsListContentDirective = FsListContentDirective;
|
|
6649
6775
|
exports.FsListEmptyStateDirective = FsListEmptyStateDirective;
|
|
6650
6776
|
exports.FsListFooterDirective = FsListFooterDirective;
|
|
6651
|
-
exports.FsListGroupCellDirective = FsListGroupCellDirective;
|
|
6652
6777
|
exports.FsListGroupExpandTriggerDirective = FsListGroupExpandTriggerDirective;
|
|
6778
|
+
exports.FsListGroupFooterDirective = FsListGroupFooterDirective;
|
|
6779
|
+
exports.FsListGroupHeaderDirective = FsListGroupHeaderDirective;
|
|
6653
6780
|
exports.FsListHeaderDirective = FsListHeaderDirective;
|
|
6654
6781
|
exports.FsListLoaderComponent = FsListLoaderComponent;
|
|
6655
6782
|
exports.FsListModule = FsListModule;
|