@melodicdev/components 1.0.17 → 1.0.19

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.
@@ -11734,6 +11734,7 @@ function tableTemplate(c) {
11734
11734
  [`ml-table--${c.size}`]: true,
11735
11735
  "ml-table--striped": c.striped,
11736
11736
  "ml-table--hoverable": c.hoverable,
11737
+ "ml-table--row-clickable": c._rowClickable,
11737
11738
  "ml-table--sticky-header": c.stickyHeader,
11738
11739
  "ml-table--virtual": c.virtual
11739
11740
  })}>
@@ -11975,6 +11976,9 @@ const tableStyles = () => css`
11975
11976
 
11976
11977
  .ml-table--hoverable .ml-table__row:hover {
11977
11978
  background-color: var(--ml-color-surface-sunken);
11979
+ }
11980
+
11981
+ .ml-table--row-clickable .ml-table__row {
11978
11982
  cursor: pointer;
11979
11983
  }
11980
11984
 
@@ -12086,6 +12090,7 @@ const tableStyles = () => css`
12086
12090
  `;
12087
12091
  var TableComponent = class TableComponent$1 {
12088
12092
  constructor() {
12093
+ this._rowClickable = false;
12089
12094
  this.hasFooter = false;
12090
12095
  this.hasHeaderActions = false;
12091
12096
  this.selectable = false;
@@ -12154,6 +12159,13 @@ var TableComponent = class TableComponent$1 {
12154
12159
  onPropertyChange(name, _oldVal, _newVal) {
12155
12160
  if (name === "rows" || name === "columns") this._scroller.invalidate();
12156
12161
  }
12162
+ onInit() {
12163
+ const original = this.elementRef.addEventListener.bind(this.elementRef);
12164
+ this.elementRef.addEventListener = (type, listener, options) => {
12165
+ if (type === "ml:row-click") this._rowClickable = true;
12166
+ return original(type, listener, options);
12167
+ };
12168
+ }
12157
12169
  onCreate() {
12158
12170
  const shadow = this.elementRef.shadowRoot;
12159
12171
  if (!shadow) return;