@coolon/angular-ui-powerups 1.17.0 → 1.18.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/assets/table.scss +12 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +77 -6
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  9. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  10. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  11. package/esm2015/lib/components/table/column-model.js +45 -0
  12. package/esm2015/lib/components/table/column-model.js.map +1 -1
  13. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  14. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +1 -1
  15. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  16. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -1
  17. package/esm2015/lib/components/table/table-model.js +19 -2
  18. package/esm2015/lib/components/table/table-model.js.map +1 -1
  19. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  20. package/esm2015/lib/components/table/table.component.js +6 -1
  21. package/esm2015/lib/components/table/table.component.js.map +1 -1
  22. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  23. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js +6 -2
  24. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -1
  25. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.metadata.json +1 -1
  26. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  27. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  28. package/esm5/lib/components/table/column-model.js +45 -0
  29. package/esm5/lib/components/table/column-model.js.map +1 -1
  30. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +1 -1
  31. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
  32. package/esm5/lib/components/table/table-model.js +19 -2
  33. package/esm5/lib/components/table/table-model.js.map +1 -1
  34. package/esm5/lib/components/table/table.component.js +6 -1
  35. package/esm5/lib/components/table/table.component.js.map +1 -1
  36. package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js +6 -2
  37. package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -1
  38. package/fesm2015/coolon-angular-ui-powerups.js +77 -6
  39. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  40. package/fesm5/coolon-angular-ui-powerups.js +77 -6
  41. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  42. package/lib/components/table/column-model.d.ts +15 -0
  43. package/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.d.ts +1 -0
  44. package/lib/components/table/table-model.d.ts +6 -0
  45. package/lib/components/table/table.component.d.ts +5 -4
  46. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.18.1](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.18.0...v1.18.1) (2020-06-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * improved row selection and added opt in and opt out ([42e6419](https://bitbucket.org/coolon/angular-ui-powerups/commit/42e6419a2315bb22e1936b3d05fd80c34d813a72))
11
+
12
+ ## [1.18.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.17.0...v1.18.0) (2020-06-23)
13
+
14
+
15
+ ### Features
16
+
17
+ * added row click support to table-models with selections ([e12ef2f](https://bitbucket.org/coolon/angular-ui-powerups/commit/e12ef2fa5e58f39cee6945931a9a93ad67b24a2b))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * aup-interaction-context-trigger not consuming click events ([86de20c](https://bitbucket.org/coolon/angular-ui-powerups/commit/86de20c50a500cdc803113e01beff38af0a730e9))
23
+
5
24
  ## [1.17.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.16.0...v1.17.0) (2020-06-22)
6
25
 
7
26
 
package/assets/table.scss CHANGED
@@ -1,10 +1,20 @@
1
1
  aup-table {
2
2
  --default-column-gap: var(--column-gap, 24px); // material design table column padding
3
+ --resolved-row-hover-background-color: var(--row-hover-background-color, rgba(0, 0, 0, 0.05));
3
4
 
4
5
  .mat-table {
6
+
5
7
  th.mat-header-cell:first-of-type, td.mat-cell:first-of-type, td.mat-footer-cell:first-of-type {
6
8
  padding-left: 0;
7
9
  }
10
+
11
+ tr.enable-hover:hover {
12
+ background-color: var(--resolved-row-hover-background-color);
13
+ }
14
+
15
+ td.enable-cursor {
16
+ cursor: pointer;
17
+ }
8
18
  }
9
19
 
10
20
  aup-table-cell-renderer, aup-table-header-cell-renderer {
@@ -30,10 +40,11 @@ aup-table {
30
40
  justify-content: stretch;
31
41
  padding-left: 0 !important;
32
42
  }
43
+
33
44
  &.padChild {
34
45
  > *:first-child {
35
46
  padding-left: var(--default-column-gap);
36
- flex:1;
47
+ flex: 1;
37
48
  }
38
49
  }
39
50
  }
@@ -578,7 +578,7 @@
578
578
  core.Component({
579
579
  selector: 'aup-card-container',
580
580
  template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
581
- styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
581
+ styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
582
582
  }),
583
583
  __metadata("design:paramtypes", [])
584
584
  ], CardContainerComponent);
@@ -1548,7 +1548,7 @@
1548
1548
  SelectHeaderCellRendererComponent = __decorate([
1549
1549
  core.Component({
1550
1550
  selector: 'aup-select-header-cell-renderer',
1551
- template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n",
1551
+ template: "<mat-checkbox *ngIf=\"enableHeaderControls\" [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n",
1552
1552
  styles: [""]
1553
1553
  }),
1554
1554
  __metadata("design:paramtypes", [])
@@ -1563,6 +1563,7 @@
1563
1563
  function ColumnModel(columnId, defaults) {
1564
1564
  this.columnId = columnId;
1565
1565
  this.defaults = defaults;
1566
+ this._selectRowOnClick = undefined;
1566
1567
  this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
1567
1568
  component.headerText = column.getHeaderText();
1568
1569
  });
@@ -1619,6 +1620,19 @@
1619
1620
  ColumnModel.prototype.updatePortalContent = function (host) {
1620
1621
  this._cellRendererPortalRef.pushState(host);
1621
1622
  };
1623
+ ColumnModel.prototype.selectRowOnClick = function (selectOnRowClick) {
1624
+ this._selectRowOnClick = selectOnRowClick;
1625
+ return this;
1626
+ };
1627
+ ColumnModel.prototype.isRowSelectionEnabled = function () {
1628
+ return this._selectRowOnClick;
1629
+ };
1630
+ ColumnModel.prototype.isRowSelectionExplicitlyEnabled = function () {
1631
+ return this._selectRowOnClick === true;
1632
+ };
1633
+ ColumnModel.prototype.isRowSelectionExplicitlyDisabled = function () {
1634
+ return this._selectRowOnClick === false;
1635
+ };
1622
1636
  __decorate([
1623
1637
  src.Memoize(),
1624
1638
  __metadata("design:type", Function),
@@ -1670,6 +1684,9 @@
1670
1684
  this._format = formatter;
1671
1685
  return this;
1672
1686
  };
1687
+ PropertyColumnModel.prototype.selectRowOnClick = function (selectOnRowClick) {
1688
+ return _super.prototype.selectRowOnClick.call(this, selectOnRowClick);
1689
+ };
1673
1690
  return PropertyColumnModel;
1674
1691
  }(ColumnModel));
1675
1692
  var ListPropertyColumnModel = /** @class */ (function (_super) {
@@ -1709,6 +1726,9 @@
1709
1726
  this._format = formatter;
1710
1727
  return this;
1711
1728
  };
1729
+ ListPropertyColumnModel.prototype.selectRowOnClick = function (selectOnRowClick) {
1730
+ return _super.prototype.selectRowOnClick.call(this, selectOnRowClick);
1731
+ };
1712
1732
  return ListPropertyColumnModel;
1713
1733
  }(ColumnModel));
1714
1734
  var CustomValueColumnModel = /** @class */ (function (_super) {
@@ -1726,6 +1746,9 @@
1726
1746
  }));
1727
1747
  return this;
1728
1748
  };
1749
+ CustomValueColumnModel.prototype.selectRowOnClick = function (selectOnRowClick) {
1750
+ return _super.prototype.selectRowOnClick.call(this, selectOnRowClick);
1751
+ };
1729
1752
  return CustomValueColumnModel;
1730
1753
  }(ColumnModel));
1731
1754
  var EditorControlColumnModel = /** @class */ (function (_super) {
@@ -1759,15 +1782,22 @@
1759
1782
  CustomTemplateColumnModel.prototype.setTemplate = function (templateRef, viewContainer, fillCell, padChild) {
1760
1783
  this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
1761
1784
  };
1785
+ CustomTemplateColumnModel.prototype.selectRowOnClick = function (selectOnRowClick) {
1786
+ return _super.prototype.selectRowOnClick.call(this, selectOnRowClick);
1787
+ };
1762
1788
  return CustomTemplateColumnModel;
1763
1789
  }(ColumnModel));
1764
1790
  var SelectionColumnModel = /** @class */ (function (_super) {
1765
1791
  __extends(SelectionColumnModel, _super);
1766
1792
  function SelectionColumnModel(columnId, defaults, selectionModel) {
1767
1793
  var _this = _super.call(this, columnId, defaults) || this;
1794
+ _this.selectionModel = selectionModel;
1795
+ _this._enableHeaderControls = true;
1796
+ _this.selectOnRowClick(false);
1768
1797
  if (selectionModel instanceof pectin.MultipleSelectionModel) {
1769
1798
  _this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
1770
1799
  component.selectionModel = selectionModel;
1800
+ component.enableHeaderControls = _this._enableHeaderControls;
1771
1801
  });
1772
1802
  }
1773
1803
  _this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, function (component, rowData) {
@@ -1779,6 +1809,21 @@
1779
1809
  SelectionColumnModel.prototype.getDefaultHeaderText = function () {
1780
1810
  return '';
1781
1811
  };
1812
+ SelectionColumnModel.prototype.isRowSelectionEnabledByDefault = function () {
1813
+ return this.isRowSelectionExplicitlyEnabled();
1814
+ };
1815
+ SelectionColumnModel.prototype.selectOnRowClick = function (selectOnRowClick) {
1816
+ // note we're using different method name as the selection column treats this
1817
+ // state as the default for all columns.
1818
+ return _super.prototype.selectRowOnClick.call(this, selectOnRowClick);
1819
+ };
1820
+ SelectionColumnModel.prototype.enableHeaderControls = function (enable) {
1821
+ this._enableHeaderControls = enable;
1822
+ return this;
1823
+ };
1824
+ SelectionColumnModel.prototype.selectRow = function (row) {
1825
+ this.selectionModel.selectCommand.execute(row);
1826
+ };
1782
1827
  return SelectionColumnModel;
1783
1828
  }(ColumnModel));
1784
1829
 
@@ -1871,6 +1916,7 @@
1871
1916
  this.editing = chain(this._editorSessions).count().isGreaterThan(0);
1872
1917
  this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
1873
1918
  this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
1919
+ this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
1874
1920
  }
1875
1921
  TableModel_1 = TableModel;
1876
1922
  TableModel.fromList = function (sourceOfTruth, builder) {
@@ -1905,7 +1951,9 @@
1905
1951
  return this.addColumn(new ListPropertyColumnModel(property, this));
1906
1952
  };
1907
1953
  TableModel.prototype.addSelectionColumn = function (selectionModel) {
1908
- return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
1954
+ pectin.assert.isNil(this.selectionColumnModel);
1955
+ this.selectionColumnModel = new SelectionColumnModel('selection', this, selectionModel);
1956
+ return this.addColumn(this.selectionColumnModel);
1909
1957
  };
1910
1958
  TableModel.prototype.addEditControls = function (saveCommand) {
1911
1959
  this.saveCommand = saveCommand;
@@ -1968,6 +2016,20 @@
1968
2016
  });
1969
2017
  });
1970
2018
  };
2019
+ TableModel.prototype.isRowSelectionEnabledFor = function (column) {
2020
+ var _a;
2021
+ return this.selectionColumnModel && ((_a = column.isRowSelectionEnabled()) !== null && _a !== void 0 ? _a : this.isRowSelectionEnabledByDefault());
2022
+ };
2023
+ TableModel.prototype.isRowSelectionEnabledByDefault = function () {
2024
+ return this.selectionColumnModel.isRowSelectionEnabledByDefault();
2025
+ };
2026
+ TableModel.prototype.isRowSelectionEnabled = function () {
2027
+ return this.hasColumnsWithRowSelectionExplicitlyEnabled.value || this.isRowSelectionEnabledByDefault();
2028
+ };
2029
+ TableModel.prototype.selectRow = function (row) {
2030
+ var _a;
2031
+ (_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectRow(row);
2032
+ };
1971
2033
  var TableModel_1;
1972
2034
  TableModel.ctorParameters = function () { return [
1973
2035
  { type: pectin.ListModel }
@@ -2026,6 +2088,11 @@
2026
2088
  column.setTemplate(templateRef, viewContainer, fillCell, padChild);
2027
2089
  }
2028
2090
  };
2091
+ TableComponent.prototype.onCellClicked = function (columnModel, row) {
2092
+ if (this.tableModel.isRowSelectionEnabledFor(columnModel)) {
2093
+ this.tableModel.selectRow(row);
2094
+ }
2095
+ };
2029
2096
  __decorate([
2030
2097
  core.Input(),
2031
2098
  pectin.TrackExternal(),
@@ -2034,7 +2101,7 @@
2034
2101
  TableComponent = __decorate([
2035
2102
  core.Component({
2036
2103
  selector: 'aup-table',
2037
- template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value;\"></tr>\n\n</table>\n",
2104
+ template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value;\" [class.enable-hover]=\"tableModel.isRowSelectionEnabled()\"></tr>\n\n</table>\n",
2038
2105
  styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
2039
2106
  }),
2040
2107
  __metadata("design:paramtypes", [])
@@ -3517,6 +3584,8 @@
3517
3584
  return _this;
3518
3585
  }
3519
3586
  InteractionContextTriggerFor.prototype.onEnter = function (event) {
3587
+ event.preventDefault();
3588
+ event.stopPropagation();
3520
3589
  if (!this.aupInteractionContextTriggerFor.isActive()) {
3521
3590
  this.startActivity();
3522
3591
  }
@@ -3525,6 +3594,8 @@
3525
3594
  }
3526
3595
  };
3527
3596
  InteractionContextTriggerFor.prototype.onClick = function (event) {
3597
+ event.preventDefault();
3598
+ event.stopPropagation();
3528
3599
  if (!this.aupInteractionContextTriggerFor.isActive()) {
3529
3600
  this.startActivity();
3530
3601
  }
@@ -3573,13 +3644,13 @@
3573
3644
  __metadata("design:type", Object)
3574
3645
  ], InteractionContextTriggerFor.prototype, "activityCancelled", void 0);
3575
3646
  __decorate([
3576
- core.HostListener('keyup.enter'),
3647
+ core.HostListener('keyup.enter', ['$event']),
3577
3648
  __metadata("design:type", Function),
3578
3649
  __metadata("design:paramtypes", [KeyboardEvent]),
3579
3650
  __metadata("design:returntype", void 0)
3580
3651
  ], InteractionContextTriggerFor.prototype, "onEnter", null);
3581
3652
  __decorate([
3582
- core.HostListener('click'),
3653
+ core.HostListener('click', ['$event']),
3583
3654
  __metadata("design:type", Function),
3584
3655
  __metadata("design:paramtypes", [MouseEvent]),
3585
3656
  __metadata("design:returntype", void 0)