@sme.up/ketchup 5.1.0 → 5.1.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.
@@ -3196,7 +3196,7 @@ const KupAutocomplete = class {
3196
3196
  });
3197
3197
  }
3198
3198
  onKupItemClick(e) {
3199
- this.onKupChange(e.detail.selected.value);
3199
+ this.onKupChange(e.detail.selected.id);
3200
3200
  this.closeList();
3201
3201
  if (this.textfieldEl) {
3202
3202
  this.textfieldEl.focus();
@@ -7856,7 +7856,7 @@ function prepTimeArea(component) {
7856
7856
  function onKupClockItemClick(e, component, value) {
7857
7857
  if (e != null) {
7858
7858
  if (value == null) {
7859
- value = e.detail.selected.value;
7859
+ value = e.detail.selected.id;
7860
7860
  }
7861
7861
  }
7862
7862
  setClockValueSelected(component, value);
@@ -12884,7 +12884,7 @@ const KupCombobox = class {
12884
12884
  });
12885
12885
  }
12886
12886
  onKupItemClick(e) {
12887
- this.onKupChange(e.detail.selected.value);
12887
+ this.onKupChange(e.detail.selected.id);
12888
12888
  __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
12889
12889
  if (__classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f")) {
12890
12890
  __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").focus();
@@ -14148,6 +14148,7 @@ const KupDataTable = class {
14148
14148
  this.openedTotalMenu = null;
14149
14149
  this.openedCustomSettings = false;
14150
14150
  this.fontsize = 'medium';
14151
+ this.initialized = false;
14151
14152
  this.rowsLength = 0;
14152
14153
  this.paginatedRowsLength = 0;
14153
14154
  /**
@@ -14447,7 +14448,9 @@ const KupDataTable = class {
14447
14448
  }
14448
14449
  }
14449
14450
  recalculateData() {
14450
- this.calculateData();
14451
+ if (this.initialized) {
14452
+ this.calculateData();
14453
+ }
14451
14454
  }
14452
14455
  /**
14453
14456
  * Closes any opened column menu.
@@ -15280,6 +15283,7 @@ const KupDataTable = class {
15280
15283
  CSS.supports('position', '-webkit-sticky') ||
15281
15284
  !!(window && window.safari);
15282
15285
  this.calculateData();
15286
+ this.initialized = true;
15283
15287
  }
15284
15288
  componentWillRender() {
15285
15289
  this.kupManager.debug.logRender(this, false);
@@ -16443,7 +16447,7 @@ const KupDataTable = class {
16443
16447
  // must do this
16444
16448
  // otherwise does not fire the watcher
16445
16449
  const totalsCopy = Object.assign({}, this.totals);
16446
- const value = event.detail.selected.value;
16450
+ const value = event.detail.selected.id;
16447
16451
  if (value === kupManager.TotalLabel.CANC) {
16448
16452
  if (this.totals && this.totals[column.name]) {
16449
16453
  delete totalsCopy[column.name];
@@ -21636,7 +21640,7 @@ const KupTimePicker = class {
21636
21640
  onKupTimePickerItemClick(e, value) {
21637
21641
  if (e != null) {
21638
21642
  if (value == null) {
21639
- value = e.detail.selected.value;
21643
+ value = e.detail.selected.id;
21640
21644
  }
21641
21645
  }
21642
21646
  this.setPickerValueSelected(value);
@@ -21924,7 +21928,7 @@ const KupTimePicker = class {
21924
21928
  } }));
21925
21929
  }
21926
21930
  else {
21927
- return (index.h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list' }));
21931
+ return (index.h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.id), id: this.rootElement.id + '_list' }));
21928
21932
  }
21929
21933
  }
21930
21934
  createTimeListData(value) {
@@ -23359,8 +23363,48 @@ const KupTree = class {
23359
23363
  this.closeTotalMenu();
23360
23364
  this.openTotalMenu(column);
23361
23365
  }
23362
- getEventDetails(el) {
23363
- const isHeader = !!el.closest('thead'), isBody = !!el.closest('tbody'), isFooter = !!el.closest('tfoot'), td = el.closest('td'), th = el.closest('th'), tr = el.closest('tr'), filterRemove = el.closest('th .filter-remove');
23366
+ getEventDetails(path) {
23367
+ let isHeader, isBody, isFooter, td, th, tr, filterRemove;
23368
+ if (path) {
23369
+ for (let i = path.length - 1; i >= 0; i--) {
23370
+ let p = path[i];
23371
+ if (!p.tagName) {
23372
+ continue;
23373
+ }
23374
+ switch (p.tagName.toUpperCase()) {
23375
+ case 'THEAD': {
23376
+ isHeader = true;
23377
+ break;
23378
+ }
23379
+ case 'TBODY': {
23380
+ isBody = true;
23381
+ break;
23382
+ }
23383
+ case 'TFOOT': {
23384
+ isFooter = true;
23385
+ break;
23386
+ }
23387
+ case 'TD': {
23388
+ td = p;
23389
+ break;
23390
+ }
23391
+ case 'TH': {
23392
+ th = p;
23393
+ break;
23394
+ }
23395
+ case 'TR': {
23396
+ tr = p;
23397
+ break;
23398
+ }
23399
+ default: {
23400
+ if (p.classList.contains(kupManager.KupThemeIconValues.FILTER_REMOVE.replace('--', ''))) {
23401
+ filterRemove = p;
23402
+ }
23403
+ break;
23404
+ }
23405
+ }
23406
+ }
23407
+ }
23364
23408
  let cell = null, column = null, row = null;
23365
23409
  if (isBody) {
23366
23410
  if (td) {
@@ -23399,7 +23443,7 @@ const KupTree = class {
23399
23443
  }
23400
23444
  contextMenuHandler(e) {
23401
23445
  e.preventDefault();
23402
- const details = this.getEventDetails(e.target);
23446
+ const details = this.getEventDetails(this.getEventPath(e.target));
23403
23447
  if (details.area === 'header') {
23404
23448
  if (details.th && details.column) {
23405
23449
  this.openColumnMenu(details.column.name);
@@ -23423,7 +23467,7 @@ const KupTree = class {
23423
23467
  (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
23424
23468
  !treeNodeData.expandable)) {
23425
23469
  const td = e
23426
- ? this.getEventPath(e).find((el) => {
23470
+ ? this.getEventPath(e.target).find((el) => {
23427
23471
  if (el.tagName === 'TD')
23428
23472
  return el;
23429
23473
  })
@@ -23537,9 +23581,8 @@ const KupTree = class {
23537
23581
  }
23538
23582
  }
23539
23583
  }
23540
- getEventPath(e) {
23541
- let path = [];
23542
- let currentEl = e.target;
23584
+ getEventPath(currentEl) {
23585
+ const path = [];
23543
23586
  while (currentEl &&
23544
23587
  currentEl !== this.rootElement &&
23545
23588
  currentEl !== document.body) {
@@ -23842,6 +23885,7 @@ const KupTree = class {
23842
23885
  // When a tree node is displayed as a table
23843
23886
  let treeNodeCells = null;
23844
23887
  let visibleCols = this.getVisibleColumns();
23888
+ const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
23845
23889
  if (this.showColumns && visibleCols && visibleCols.length) {
23846
23890
  treeNodeCells = [];
23847
23891
  // Renders all the cells
@@ -23861,14 +23905,13 @@ const KupTree = class {
23861
23905
  row: treeNodeData,
23862
23906
  setSizes: true,
23863
23907
  };
23864
- treeNodeCells.push(index.h("td", { class: `grid-cell`, "data-column": column.name }, index.h(fCell.FCell, Object.assign({}, cellProps))));
23908
+ treeNodeCells.push(index.h("td", Object.assign({ class: `grid-cell`, "data-column": column.name, "data-cell": cell }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), index.h(fCell.FCell, Object.assign({}, cellProps))));
23865
23909
  }
23866
23910
  else {
23867
23911
  treeNodeCells.push(index.h("td", { class: `grid-cell` }));
23868
23912
  }
23869
23913
  }
23870
23914
  }
23871
- const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
23872
23915
  let title = undefined;
23873
23916
  if (_hasTooltip && this.kupManager.debug.isDebug()) {
23874
23917
  title =
@@ -23900,7 +23943,7 @@ const KupTree = class {
23900
23943
  'is-obj': !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj),
23901
23944
  }, style: treeNodeData.style || null, title: title, onDblClick: () => {
23902
23945
  this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
23903
- } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), this.asAccordion && !treeNodeDepth
23946
+ } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip), { "data-row": treeNodeData }), this.asAccordion && !treeNodeDepth
23904
23947
  ? [
23905
23948
  treeNodeIcon,
23906
23949
  content,
@@ -23915,7 +23958,7 @@ const KupTree = class {
23915
23958
  'kup-tree__node--first': treeNodeDepth ? false : true,
23916
23959
  'kup-tree__node--selected': !treeNodeData.disabled &&
23917
23960
  treeNodePath === this.selectedNodeString,
23918
- }, "data-tree-path": treeNodePath }, treeNodeOptions), treeNodeCell, treeNodeCells));
23961
+ }, "data-tree-path": treeNodePath }, treeNodeOptions, { "data-row": treeNodeData }), treeNodeCell, treeNodeCells));
23919
23962
  }
23920
23963
  closeTotalMenu() {
23921
23964
  this.openedTotalMenu = null;
@@ -23931,7 +23974,7 @@ const KupTree = class {
23931
23974
  // must do this
23932
23975
  // otherwise does not fire the watcher
23933
23976
  const totalsCopy = Object.assign({}, this.totals);
23934
- const value = event.detail.selected.value;
23977
+ const value = event.detail.selected.id;
23935
23978
  if (value === kupManager.TotalLabel.CANC) {
23936
23979
  if (this.totals && this.totals[column.name]) {
23937
23980
  delete totalsCopy[column.name];
@@ -158,7 +158,7 @@ export class KupAutocomplete {
158
158
  });
159
159
  }
160
160
  onKupItemClick(e) {
161
- this.onKupChange(e.detail.selected.value);
161
+ this.onKupChange(e.detail.selected.id);
162
162
  this.closeList();
163
163
  if (this.textfieldEl) {
164
164
  this.textfieldEl.focus();
@@ -83,7 +83,7 @@ function prepTimeArea(component) {
83
83
  function onKupClockItemClick(e, component, value) {
84
84
  if (e != null) {
85
85
  if (value == null) {
86
- value = e.detail.selected.value;
86
+ value = e.detail.selected.id;
87
87
  }
88
88
  }
89
89
  setClockValueSelected(component, value);
@@ -146,7 +146,7 @@ export class KupCombobox {
146
146
  });
147
147
  }
148
148
  onKupItemClick(e) {
149
- this.onKupChange(e.detail.selected.value);
149
+ this.onKupChange(e.detail.selected.id);
150
150
  __classPrivateFieldGet(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
151
151
  if (__classPrivateFieldGet(this, _KupCombobox_textfieldEl, "f")) {
152
152
  __classPrivateFieldGet(this, _KupCombobox_textfieldEl, "f").focus();
@@ -265,6 +265,7 @@ export class KupDataTable {
265
265
  this.openedTotalMenu = null;
266
266
  this.openedCustomSettings = false;
267
267
  this.fontsize = 'medium';
268
+ this.initialized = false;
268
269
  this.rowsLength = 0;
269
270
  this.paginatedRowsLength = 0;
270
271
  /**
@@ -564,7 +565,9 @@ export class KupDataTable {
564
565
  }
565
566
  }
566
567
  recalculateData() {
567
- this.calculateData();
568
+ if (this.initialized) {
569
+ this.calculateData();
570
+ }
568
571
  }
569
572
  /**
570
573
  * Closes any opened column menu.
@@ -1397,6 +1400,7 @@ export class KupDataTable {
1397
1400
  CSS.supports('position', '-webkit-sticky') ||
1398
1401
  !!(window && window.safari);
1399
1402
  this.calculateData();
1403
+ this.initialized = true;
1400
1404
  }
1401
1405
  componentWillRender() {
1402
1406
  this.kupManager.debug.logRender(this, false);
@@ -2573,7 +2577,7 @@ export class KupDataTable {
2573
2577
  // must do this
2574
2578
  // otherwise does not fire the watcher
2575
2579
  const totalsCopy = Object.assign({}, this.totals);
2576
- const value = event.detail.selected.value;
2580
+ const value = event.detail.selected.id;
2577
2581
  if (value === TotalLabel.CANC) {
2578
2582
  if (this.totals && this.totals[column.name]) {
2579
2583
  delete totalsCopy[column.name];
@@ -78,7 +78,7 @@ export class KupTimePicker {
78
78
  onKupTimePickerItemClick(e, value) {
79
79
  if (e != null) {
80
80
  if (value == null) {
81
- value = e.detail.selected.value;
81
+ value = e.detail.selected.id;
82
82
  }
83
83
  }
84
84
  this.setPickerValueSelected(value);
@@ -366,7 +366,7 @@ export class KupTimePicker {
366
366
  } }));
367
367
  }
368
368
  else {
369
- return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list' }));
369
+ return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.id), id: this.rootElement.id + '_list' }));
370
370
  }
371
371
  }
372
372
  createTimeListData(value) {
@@ -557,8 +557,48 @@ export class KupTree {
557
557
  this.closeTotalMenu();
558
558
  this.openTotalMenu(column);
559
559
  }
560
- getEventDetails(el) {
561
- const isHeader = !!el.closest('thead'), isBody = !!el.closest('tbody'), isFooter = !!el.closest('tfoot'), td = el.closest('td'), th = el.closest('th'), tr = el.closest('tr'), filterRemove = el.closest('th .filter-remove');
560
+ getEventDetails(path) {
561
+ let isHeader, isBody, isFooter, td, th, tr, filterRemove;
562
+ if (path) {
563
+ for (let i = path.length - 1; i >= 0; i--) {
564
+ let p = path[i];
565
+ if (!p.tagName) {
566
+ continue;
567
+ }
568
+ switch (p.tagName.toUpperCase()) {
569
+ case 'THEAD': {
570
+ isHeader = true;
571
+ break;
572
+ }
573
+ case 'TBODY': {
574
+ isBody = true;
575
+ break;
576
+ }
577
+ case 'TFOOT': {
578
+ isFooter = true;
579
+ break;
580
+ }
581
+ case 'TD': {
582
+ td = p;
583
+ break;
584
+ }
585
+ case 'TH': {
586
+ th = p;
587
+ break;
588
+ }
589
+ case 'TR': {
590
+ tr = p;
591
+ break;
592
+ }
593
+ default: {
594
+ if (p.classList.contains(KupThemeIconValues.FILTER_REMOVE.replace('--', ''))) {
595
+ filterRemove = p;
596
+ }
597
+ break;
598
+ }
599
+ }
600
+ }
601
+ }
562
602
  let cell = null, column = null, row = null;
563
603
  if (isBody) {
564
604
  if (td) {
@@ -597,7 +637,7 @@ export class KupTree {
597
637
  }
598
638
  contextMenuHandler(e) {
599
639
  e.preventDefault();
600
- const details = this.getEventDetails(e.target);
640
+ const details = this.getEventDetails(this.getEventPath(e.target));
601
641
  if (details.area === 'header') {
602
642
  if (details.th && details.column) {
603
643
  this.openColumnMenu(details.column.name);
@@ -621,7 +661,7 @@ export class KupTree {
621
661
  (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
622
662
  !treeNodeData.expandable)) {
623
663
  const td = e
624
- ? this.getEventPath(e).find((el) => {
664
+ ? this.getEventPath(e.target).find((el) => {
625
665
  if (el.tagName === 'TD')
626
666
  return el;
627
667
  })
@@ -735,9 +775,8 @@ export class KupTree {
735
775
  }
736
776
  }
737
777
  }
738
- getEventPath(e) {
739
- let path = [];
740
- let currentEl = e.target;
778
+ getEventPath(currentEl) {
779
+ const path = [];
741
780
  while (currentEl &&
742
781
  currentEl !== this.rootElement &&
743
782
  currentEl !== document.body) {
@@ -1043,6 +1082,7 @@ export class KupTree {
1043
1082
  // When a tree node is displayed as a table
1044
1083
  let treeNodeCells = null;
1045
1084
  let visibleCols = this.getVisibleColumns();
1085
+ const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
1046
1086
  if (this.showColumns && visibleCols && visibleCols.length) {
1047
1087
  treeNodeCells = [];
1048
1088
  // Renders all the cells
@@ -1062,7 +1102,7 @@ export class KupTree {
1062
1102
  row: treeNodeData,
1063
1103
  setSizes: true,
1064
1104
  };
1065
- treeNodeCells.push(h("td", { class: `grid-cell`, "data-column": column.name },
1105
+ treeNodeCells.push(h("td", Object.assign({ class: `grid-cell`, "data-column": column.name, "data-cell": cell }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)),
1066
1106
  h(FCell, Object.assign({}, cellProps))));
1067
1107
  }
1068
1108
  else {
@@ -1070,7 +1110,6 @@ export class KupTree {
1070
1110
  }
1071
1111
  }
1072
1112
  }
1073
- const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
1074
1113
  let title = undefined;
1075
1114
  if (_hasTooltip && this.kupManager.debug.isDebug()) {
1076
1115
  title =
@@ -1102,7 +1141,7 @@ export class KupTree {
1102
1141
  'is-obj': !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj),
1103
1142
  }, style: treeNodeData.style || null, title: title, onDblClick: () => {
1104
1143
  this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
1105
- } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), this.asAccordion && !treeNodeDepth
1144
+ } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip), { "data-row": treeNodeData }), this.asAccordion && !treeNodeDepth
1106
1145
  ? [
1107
1146
  treeNodeIcon,
1108
1147
  content,
@@ -1117,7 +1156,7 @@ export class KupTree {
1117
1156
  'kup-tree__node--first': treeNodeDepth ? false : true,
1118
1157
  'kup-tree__node--selected': !treeNodeData.disabled &&
1119
1158
  treeNodePath === this.selectedNodeString,
1120
- }, "data-tree-path": treeNodePath }, treeNodeOptions),
1159
+ }, "data-tree-path": treeNodePath }, treeNodeOptions, { "data-row": treeNodeData }),
1121
1160
  treeNodeCell,
1122
1161
  treeNodeCells));
1123
1162
  }
@@ -1135,7 +1174,7 @@ export class KupTree {
1135
1174
  // must do this
1136
1175
  // otherwise does not fire the watcher
1137
1176
  const totalsCopy = Object.assign({}, this.totals);
1138
- const value = event.detail.selected.value;
1177
+ const value = event.detail.selected.id;
1139
1178
  if (value === TotalLabel.CANC) {
1140
1179
  if (this.totals && this.totals[column.name]) {
1141
1180
  delete totalsCopy[column.name];
@@ -3192,7 +3192,7 @@ const KupAutocomplete = class {
3192
3192
  });
3193
3193
  }
3194
3194
  onKupItemClick(e) {
3195
- this.onKupChange(e.detail.selected.value);
3195
+ this.onKupChange(e.detail.selected.id);
3196
3196
  this.closeList();
3197
3197
  if (this.textfieldEl) {
3198
3198
  this.textfieldEl.focus();
@@ -7852,7 +7852,7 @@ function prepTimeArea(component) {
7852
7852
  function onKupClockItemClick(e, component, value) {
7853
7853
  if (e != null) {
7854
7854
  if (value == null) {
7855
- value = e.detail.selected.value;
7855
+ value = e.detail.selected.id;
7856
7856
  }
7857
7857
  }
7858
7858
  setClockValueSelected(component, value);
@@ -12880,7 +12880,7 @@ const KupCombobox = class {
12880
12880
  });
12881
12881
  }
12882
12882
  onKupItemClick(e) {
12883
- this.onKupChange(e.detail.selected.value);
12883
+ this.onKupChange(e.detail.selected.id);
12884
12884
  __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
12885
12885
  if (__classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f")) {
12886
12886
  __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").focus();
@@ -14144,6 +14144,7 @@ const KupDataTable = class {
14144
14144
  this.openedTotalMenu = null;
14145
14145
  this.openedCustomSettings = false;
14146
14146
  this.fontsize = 'medium';
14147
+ this.initialized = false;
14147
14148
  this.rowsLength = 0;
14148
14149
  this.paginatedRowsLength = 0;
14149
14150
  /**
@@ -14443,7 +14444,9 @@ const KupDataTable = class {
14443
14444
  }
14444
14445
  }
14445
14446
  recalculateData() {
14446
- this.calculateData();
14447
+ if (this.initialized) {
14448
+ this.calculateData();
14449
+ }
14447
14450
  }
14448
14451
  /**
14449
14452
  * Closes any opened column menu.
@@ -15276,6 +15279,7 @@ const KupDataTable = class {
15276
15279
  CSS.supports('position', '-webkit-sticky') ||
15277
15280
  !!(window && window.safari);
15278
15281
  this.calculateData();
15282
+ this.initialized = true;
15279
15283
  }
15280
15284
  componentWillRender() {
15281
15285
  this.kupManager.debug.logRender(this, false);
@@ -16439,7 +16443,7 @@ const KupDataTable = class {
16439
16443
  // must do this
16440
16444
  // otherwise does not fire the watcher
16441
16445
  const totalsCopy = Object.assign({}, this.totals);
16442
- const value = event.detail.selected.value;
16446
+ const value = event.detail.selected.id;
16443
16447
  if (value === TotalLabel.CANC) {
16444
16448
  if (this.totals && this.totals[column.name]) {
16445
16449
  delete totalsCopy[column.name];
@@ -21632,7 +21636,7 @@ const KupTimePicker = class {
21632
21636
  onKupTimePickerItemClick(e, value) {
21633
21637
  if (e != null) {
21634
21638
  if (value == null) {
21635
- value = e.detail.selected.value;
21639
+ value = e.detail.selected.id;
21636
21640
  }
21637
21641
  }
21638
21642
  this.setPickerValueSelected(value);
@@ -21920,7 +21924,7 @@ const KupTimePicker = class {
21920
21924
  } }));
21921
21925
  }
21922
21926
  else {
21923
- return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list' }));
21927
+ return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.id), id: this.rootElement.id + '_list' }));
21924
21928
  }
21925
21929
  }
21926
21930
  createTimeListData(value) {
@@ -23355,8 +23359,48 @@ const KupTree = class {
23355
23359
  this.closeTotalMenu();
23356
23360
  this.openTotalMenu(column);
23357
23361
  }
23358
- getEventDetails(el) {
23359
- const isHeader = !!el.closest('thead'), isBody = !!el.closest('tbody'), isFooter = !!el.closest('tfoot'), td = el.closest('td'), th = el.closest('th'), tr = el.closest('tr'), filterRemove = el.closest('th .filter-remove');
23362
+ getEventDetails(path) {
23363
+ let isHeader, isBody, isFooter, td, th, tr, filterRemove;
23364
+ if (path) {
23365
+ for (let i = path.length - 1; i >= 0; i--) {
23366
+ let p = path[i];
23367
+ if (!p.tagName) {
23368
+ continue;
23369
+ }
23370
+ switch (p.tagName.toUpperCase()) {
23371
+ case 'THEAD': {
23372
+ isHeader = true;
23373
+ break;
23374
+ }
23375
+ case 'TBODY': {
23376
+ isBody = true;
23377
+ break;
23378
+ }
23379
+ case 'TFOOT': {
23380
+ isFooter = true;
23381
+ break;
23382
+ }
23383
+ case 'TD': {
23384
+ td = p;
23385
+ break;
23386
+ }
23387
+ case 'TH': {
23388
+ th = p;
23389
+ break;
23390
+ }
23391
+ case 'TR': {
23392
+ tr = p;
23393
+ break;
23394
+ }
23395
+ default: {
23396
+ if (p.classList.contains(KupThemeIconValues.FILTER_REMOVE.replace('--', ''))) {
23397
+ filterRemove = p;
23398
+ }
23399
+ break;
23400
+ }
23401
+ }
23402
+ }
23403
+ }
23360
23404
  let cell = null, column = null, row = null;
23361
23405
  if (isBody) {
23362
23406
  if (td) {
@@ -23395,7 +23439,7 @@ const KupTree = class {
23395
23439
  }
23396
23440
  contextMenuHandler(e) {
23397
23441
  e.preventDefault();
23398
- const details = this.getEventDetails(e.target);
23442
+ const details = this.getEventDetails(this.getEventPath(e.target));
23399
23443
  if (details.area === 'header') {
23400
23444
  if (details.th && details.column) {
23401
23445
  this.openColumnMenu(details.column.name);
@@ -23419,7 +23463,7 @@ const KupTree = class {
23419
23463
  (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
23420
23464
  !treeNodeData.expandable)) {
23421
23465
  const td = e
23422
- ? this.getEventPath(e).find((el) => {
23466
+ ? this.getEventPath(e.target).find((el) => {
23423
23467
  if (el.tagName === 'TD')
23424
23468
  return el;
23425
23469
  })
@@ -23533,9 +23577,8 @@ const KupTree = class {
23533
23577
  }
23534
23578
  }
23535
23579
  }
23536
- getEventPath(e) {
23537
- let path = [];
23538
- let currentEl = e.target;
23580
+ getEventPath(currentEl) {
23581
+ const path = [];
23539
23582
  while (currentEl &&
23540
23583
  currentEl !== this.rootElement &&
23541
23584
  currentEl !== document.body) {
@@ -23838,6 +23881,7 @@ const KupTree = class {
23838
23881
  // When a tree node is displayed as a table
23839
23882
  let treeNodeCells = null;
23840
23883
  let visibleCols = this.getVisibleColumns();
23884
+ const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
23841
23885
  if (this.showColumns && visibleCols && visibleCols.length) {
23842
23886
  treeNodeCells = [];
23843
23887
  // Renders all the cells
@@ -23857,14 +23901,13 @@ const KupTree = class {
23857
23901
  row: treeNodeData,
23858
23902
  setSizes: true,
23859
23903
  };
23860
- treeNodeCells.push(h("td", { class: `grid-cell`, "data-column": column.name }, h(FCell, Object.assign({}, cellProps))));
23904
+ treeNodeCells.push(h("td", Object.assign({ class: `grid-cell`, "data-column": column.name, "data-cell": cell }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), h(FCell, Object.assign({}, cellProps))));
23861
23905
  }
23862
23906
  else {
23863
23907
  treeNodeCells.push(h("td", { class: `grid-cell` }));
23864
23908
  }
23865
23909
  }
23866
23910
  }
23867
- const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
23868
23911
  let title = undefined;
23869
23912
  if (_hasTooltip && this.kupManager.debug.isDebug()) {
23870
23913
  title =
@@ -23896,7 +23939,7 @@ const KupTree = class {
23896
23939
  'is-obj': !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj),
23897
23940
  }, style: treeNodeData.style || null, title: title, onDblClick: () => {
23898
23941
  this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
23899
- } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), this.asAccordion && !treeNodeDepth
23942
+ } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip), { "data-row": treeNodeData }), this.asAccordion && !treeNodeDepth
23900
23943
  ? [
23901
23944
  treeNodeIcon,
23902
23945
  content,
@@ -23911,7 +23954,7 @@ const KupTree = class {
23911
23954
  'kup-tree__node--first': treeNodeDepth ? false : true,
23912
23955
  'kup-tree__node--selected': !treeNodeData.disabled &&
23913
23956
  treeNodePath === this.selectedNodeString,
23914
- }, "data-tree-path": treeNodePath }, treeNodeOptions), treeNodeCell, treeNodeCells));
23957
+ }, "data-tree-path": treeNodePath }, treeNodeOptions, { "data-row": treeNodeData }), treeNodeCell, treeNodeCells));
23915
23958
  }
23916
23959
  closeTotalMenu() {
23917
23960
  this.openedTotalMenu = null;
@@ -23927,7 +23970,7 @@ const KupTree = class {
23927
23970
  // must do this
23928
23971
  // otherwise does not fire the watcher
23929
23972
  const totalsCopy = Object.assign({}, this.totals);
23930
- const value = event.detail.selected.value;
23973
+ const value = event.detail.selected.id;
23931
23974
  if (value === TotalLabel.CANC) {
23932
23975
  if (this.totals && this.totals[column.name]) {
23933
23976
  delete totalsCopy[column.name];