@sme.up/ketchup 5.2.1-SNAPSHOT → 6.1.0-SNAPSHOT

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 (195) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/{cell-utils-d96b2993.js → cell-utils-a78d6fac.js} +2 -2
  3. package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
  4. package/dist/cjs/{f-button-2b9b99b1.js → f-button-ac179257.js} +1 -1
  5. package/dist/cjs/{f-cell-8351cb84.js → f-cell-69294bca.js} +37 -37
  6. package/dist/cjs/{f-chip-df59e1b0.js → f-chip-b00897d7.js} +4 -3
  7. package/dist/cjs/{f-image-12bab3b5.js → f-image-89f25556.js} +1 -1
  8. package/dist/cjs/f-paginator-utils-8fa501b3.js +1898 -0
  9. package/dist/cjs/{f-text-field-e7c35b5b.js → f-text-field-e1e45ade.js} +1 -1
  10. package/dist/cjs/{f-text-field-mdc-a67f5dfe.js → f-text-field-mdc-85997738.js} +23 -305
  11. package/dist/cjs/ketchup.cjs.js +2 -2
  12. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  13. package/dist/cjs/{kup-autocomplete_27.cjs.entry.js → kup-autocomplete_25.cjs.entry.js} +1493 -5418
  14. package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17101 -14787
  15. package/dist/cjs/kup-calendar.cjs.entry.js +41 -33
  16. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  17. package/dist/cjs/kup-dash-list.cjs.entry.js +3 -3
  18. package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-drawer.cjs.entry.js +11 -4
  20. package/dist/cjs/kup-field.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
  22. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-image-list.cjs.entry.js +228 -0
  24. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  26. package/dist/cjs/kup-manager-7a941909.js +16703 -0
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +4 -4
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -4
  30. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
  33. package/dist/cjs/loader.cjs.js +2 -2
  34. package/dist/cjs/{utils-e99921c1.js → utils-6287d878.js} +1 -1
  35. package/dist/collection/assets/card.js +4 -5
  36. package/dist/collection/assets/data-table.js +0 -79
  37. package/dist/collection/assets/form-editor.js +338 -0
  38. package/dist/collection/assets/image-list.js +624 -0
  39. package/dist/collection/assets/index.js +8 -0
  40. package/dist/collection/assets/kupdata.js +0 -3
  41. package/dist/collection/assets/kuptooltip.js +53 -7
  42. package/dist/collection/assets/tree.js +0 -128
  43. package/dist/collection/collection-manifest.json +7 -6
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  45. package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
  46. package/dist/collection/components/kup-box/kup-box.js +7 -135
  47. package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
  48. package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
  49. package/dist/collection/components/kup-card/kup-card.css +26 -8
  50. package/dist/collection/components/kup-card/kup-card.js +1 -2
  51. package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
  52. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
  53. package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
  54. package/dist/collection/components/kup-data-table/kup-data-table.js +19 -136
  55. package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
  56. package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
  57. package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
  58. package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
  59. package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
  60. package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -0
  61. package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
  62. package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
  63. package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +3 -13
  64. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
  65. package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
  66. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
  67. package/dist/collection/components/kup-time-picker/kup-time-picker.js +2 -2
  68. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
  69. package/dist/collection/components/kup-tree/kup-tree.css +10 -3
  70. package/dist/collection/components/kup-tree/kup-tree.js +65 -140
  71. package/dist/collection/f-components/f-cell/f-cell.js +7 -7
  72. package/dist/collection/f-components/f-chip/f-chip.js +2 -1
  73. package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
  74. package/dist/collection/managers/kup-data/kup-data.js +4 -1
  75. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
  76. package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
  77. package/dist/collection/managers/kup-language/kup-language-declarations.js +2 -0
  78. package/dist/collection/managers/kup-manager/kup-manager.js +21 -2
  79. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +5 -0
  80. package/dist/collection/managers/kup-tooltip/kup-tooltip.js +53 -20
  81. package/dist/collection/types/GenericTypes.js +2 -0
  82. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +7 -11
  83. package/dist/esm/{cell-utils-f4bdbbc8.js → cell-utils-964da6b5.js} +3 -3
  84. package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
  85. package/dist/esm/{f-button-54a49fd8.js → f-button-871a544b.js} +1 -1
  86. package/dist/esm/{f-cell-d5dac50b.js → f-cell-521ef17a.js} +38 -38
  87. package/dist/esm/{f-chip-a3035b4b.js → f-chip-1dda722f.js} +5 -4
  88. package/dist/esm/{f-image-d32465e3.js → f-image-c468d8ae.js} +1 -1
  89. package/dist/esm/f-paginator-utils-7dff8ff0.js +1884 -0
  90. package/dist/esm/{f-text-field-c25cc63f.js → f-text-field-d6c61c73.js} +1 -1
  91. package/dist/esm/{f-text-field-mdc-9fbbefc3.js → f-text-field-mdc-d42d3f9e.js} +2 -284
  92. package/dist/esm/ketchup.js +2 -2
  93. package/dist/esm/kup-accordion.entry.js +5 -5
  94. package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1445 -5368
  95. package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17101 -14788
  96. package/dist/esm/kup-calendar.entry.js +42 -34
  97. package/dist/esm/kup-cell.entry.js +7 -7
  98. package/dist/esm/kup-dash-list.entry.js +3 -3
  99. package/dist/esm/kup-dash_2.entry.js +2 -2
  100. package/dist/esm/kup-drawer.entry.js +11 -4
  101. package/dist/esm/kup-field.entry.js +1 -1
  102. package/dist/esm/kup-form-editor.entry.js +400 -0
  103. package/dist/esm/kup-iframe.entry.js +2 -2
  104. package/dist/esm/kup-image-list.entry.js +224 -0
  105. package/dist/esm/kup-lazy.entry.js +2 -2
  106. package/dist/esm/kup-magic-box.entry.js +3 -3
  107. package/dist/esm/kup-manager-58b075b4.js +16686 -0
  108. package/dist/esm/kup-nav-bar.entry.js +2 -2
  109. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  110. package/dist/esm/kup-photo-frame.entry.js +4 -4
  111. package/dist/esm/kup-probe.entry.js +1 -1
  112. package/dist/esm/kup-qlik.entry.js +1 -1
  113. package/dist/esm/kup-snackbar.entry.js +5 -5
  114. package/dist/esm/loader.js +2 -2
  115. package/dist/esm/polyfills/css-shim.js +1 -1
  116. package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
  117. package/dist/esm/{utils-f24319a0.js → utils-d7e4b3c2.js} +2 -2
  118. package/dist/ketchup/ketchup.esm.js +1 -1
  119. package/dist/ketchup/{p-7a74ad17.js → p-1ae66cc5.js} +1 -1
  120. package/dist/ketchup/{p-e6709c26.entry.js → p-3c11e615.entry.js} +1 -1
  121. package/dist/ketchup/{p-669bde31.js → p-44ec4f03.js} +1 -1
  122. package/dist/ketchup/p-4ffbc3ff.js +1 -0
  123. package/dist/ketchup/p-5264a3e6.entry.js +1 -0
  124. package/dist/ketchup/{p-e8e3c9da.entry.js → p-65974e48.entry.js} +1 -1
  125. package/dist/ketchup/p-65b46587.entry.js +40 -0
  126. package/dist/ketchup/{p-09d708c4.entry.js → p-6dff70f8.entry.js} +1 -1
  127. package/dist/ketchup/{p-34748c91.js → p-7454cb92.js} +1 -1
  128. package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
  129. package/dist/ketchup/p-7eff4eee.js +1 -0
  130. package/dist/ketchup/p-80968627.entry.js +1 -0
  131. package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
  132. package/dist/ketchup/p-8cdf61a4.js +1 -0
  133. package/dist/ketchup/{p-8418e8fa.entry.js → p-954cc340.entry.js} +1 -1
  134. package/dist/ketchup/p-976244f9.entry.js +9 -0
  135. package/dist/ketchup/{p-4173422f.entry.js → p-99e0d768.entry.js} +1 -1
  136. package/dist/ketchup/{p-41741c28.entry.js → p-a0f6e25c.entry.js} +1 -1
  137. package/dist/ketchup/p-a203f78b.js +45 -0
  138. package/dist/ketchup/{p-9a61d8dc.entry.js → p-a615a92b.entry.js} +1 -1
  139. package/dist/ketchup/p-aca0e54b.js +30 -0
  140. package/dist/ketchup/p-b8939a8b.entry.js +1 -0
  141. package/dist/ketchup/p-bfc3bac7.js +1 -0
  142. package/dist/ketchup/p-c5ce8951.entry.js +1 -0
  143. package/dist/ketchup/{p-bb8844bf.entry.js → p-d2ee56dd.entry.js} +1 -1
  144. package/dist/ketchup/p-db71436b.entry.js +27 -0
  145. package/dist/ketchup/{p-40f97429.js → p-e0035c58.js} +1 -1
  146. package/dist/ketchup/p-e1039cf2.entry.js +1 -0
  147. package/dist/ketchup/{p-44192f30.entry.js → p-ea10176c.entry.js} +1 -1
  148. package/dist/ketchup/{p-67842f1e.entry.js → p-f09f2f98.entry.js} +1 -1
  149. package/dist/ketchup/{p-203d6295.entry.js → p-f71a1675.entry.js} +1 -1
  150. package/dist/ketchup/{p-11e72a8c.entry.js → p-fac1a08b.entry.js} +1 -1
  151. package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -5
  152. package/dist/types/components/kup-box/kup-box.d.ts +0 -22
  153. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -4
  154. package/dist/types/components/kup-data-table/kup-data-table.d.ts +1 -19
  155. package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
  156. package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
  157. package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -0
  158. package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
  159. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
  160. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
  161. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -5
  162. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -24
  163. package/dist/types/components.d.ts +121 -231
  164. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
  165. package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
  166. package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
  167. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +2 -0
  168. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +4 -0
  169. package/dist/types/managers/kup-manager/kup-manager.d.ts +12 -0
  170. package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +3 -3
  171. package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +17 -6
  172. package/dist/types/types/GenericTypes.d.ts +2 -0
  173. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
  174. package/package.json +15 -14
  175. package/dist/cjs/kup-manager-5c03da64.js +0 -8795
  176. package/dist/collection/assets/tooltip.js +0 -73
  177. package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
  178. package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
  179. package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
  180. package/dist/collection/utils/helpers.js +0 -38
  181. package/dist/esm/kup-manager-9316a184.js +0 -8778
  182. package/dist/ketchup/p-12773ca8.js +0 -9
  183. package/dist/ketchup/p-44f8da2a.js +0 -1
  184. package/dist/ketchup/p-4f56932b.js +0 -1
  185. package/dist/ketchup/p-7ba8fa4a.entry.js +0 -39
  186. package/dist/ketchup/p-7de0d7e1.js +0 -1
  187. package/dist/ketchup/p-96bf19aa.entry.js +0 -1
  188. package/dist/ketchup/p-b0ddcce9.entry.js +0 -9
  189. package/dist/ketchup/p-b6c21223.entry.js +0 -27
  190. package/dist/ketchup/p-c58a2a81.entry.js +0 -1
  191. package/dist/ketchup/p-ca3d585b.entry.js +0 -1
  192. package/dist/ketchup/p-ecb7069b.js +0 -135
  193. package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
  194. package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
  195. package/dist/types/utils/helpers.d.ts +0 -4
@@ -44,15 +44,15 @@ export class KupTabBar {
44
44
  */
45
45
  this.scrollArea = null;
46
46
  }
47
- onKupBlur(i, e) {
47
+ onKupBlur(i, node) {
48
48
  this.kupBlur.emit({
49
49
  comp: this,
50
50
  id: this.rootElement.id,
51
51
  index: i,
52
- el: e.target,
52
+ node: node,
53
53
  });
54
54
  }
55
- onKupClick(i, e) {
55
+ onKupClick(i, node) {
56
56
  for (let i = 0; i < this.data.length; i++) {
57
57
  this.data[i].active = false;
58
58
  }
@@ -62,16 +62,15 @@ export class KupTabBar {
62
62
  comp: this,
63
63
  id: this.rootElement.id,
64
64
  index: i,
65
- el: e.target,
66
- value: this.data[i].value,
65
+ node: node,
67
66
  });
68
67
  }
69
- onKupFocus(i, e) {
68
+ onKupFocus(i, node) {
70
69
  this.kupFocus.emit({
71
70
  comp: this,
72
71
  id: this.rootElement.id,
73
72
  index: i,
74
- el: e.target,
73
+ node: node,
75
74
  });
76
75
  }
77
76
  /*-------------------------------------------------*/
@@ -166,17 +165,17 @@ export class KupTabBar {
166
165
  }
167
166
  const tabBar = [];
168
167
  for (let i = 0; i < this.data.length; i++) {
169
- const data = this.data[i];
168
+ const node = this.data[i];
170
169
  const tabClass = {
171
170
  tab: true,
172
- 'tab--active': data.active ? true : false,
171
+ 'tab--active': node.active ? true : false,
173
172
  'mdc-ripple-surface': this.ripple ? true : false,
174
173
  };
175
- const tabEl = (h("button", { class: tabClass, role: "tab", "aria-selected": this.data[i].active ? true : false, tabIndex: i, title: data.title ? data.title : null, onBlur: (e) => this.onKupBlur(i, e), onClick: (e) => this.onKupClick(i, e), onFocus: (e) => this.onKupFocus(i, e) },
174
+ const tabEl = (h("button", { class: tabClass, role: "tab", "aria-selected": this.data[i].active ? true : false, tabIndex: i, title: node.title ? node.title : null, onBlur: () => this.onKupBlur(i, node), onClick: () => this.onKupClick(i, node), onFocus: () => this.onKupFocus(i, node) },
176
175
  h("span", { class: "tab__content" },
177
- data.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: data.icon, sizeX: "24px", sizeY: "24px", wrapperClass: "tab__icon" })) : null,
178
- h("span", { class: "tab__text-label" }, this.data[i].text)),
179
- h("span", { class: `tab-indicator ${data.active ? ' tab-indicator--active' : ''}` },
176
+ node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, sizeX: "24px", sizeY: "24px", wrapperClass: "tab__icon" })) : null,
177
+ node.value ? (h("span", { class: "tab__text-label" }, this.data[i].value)) : null),
178
+ h("span", { class: `tab-indicator ${node.active ? ' tab-indicator--active' : ''}` },
180
179
  h("span", { class: "tab-indicator__content tab-indicator__content--underline" }))));
181
180
  tabBar.push(tabEl);
182
181
  }
@@ -230,10 +229,10 @@ export class KupTabBar {
230
229
  "type": "unknown",
231
230
  "mutable": false,
232
231
  "complexType": {
233
- "original": "KupTabBarData[]",
234
- "resolved": "KupTabBarData[]",
232
+ "original": "KupTabBarNode[]",
233
+ "resolved": "KupTabBarNode[]",
235
234
  "references": {
236
- "KupTabBarData": {
235
+ "KupTabBarNode": {
237
236
  "location": "import",
238
237
  "path": "./kup-tab-bar-declarations"
239
238
  }
@@ -306,10 +305,10 @@ export class KupTabBar {
306
305
  "text": "Triggered when the tab is clicked."
307
306
  },
308
307
  "complexType": {
309
- "original": "KupTabBarClickEventPayload",
310
- "resolved": "KupTabBarClickEventPayload",
308
+ "original": "KupTabBarEventPayload",
309
+ "resolved": "KupTabBarEventPayload",
311
310
  "references": {
312
- "KupTabBarClickEventPayload": {
311
+ "KupTabBarEventPayload": {
313
312
  "location": "import",
314
313
  "path": "./kup-tab-bar-declarations"
315
314
  }
@@ -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) {
@@ -30,10 +30,6 @@ export var KupTreeProps;
30
30
  KupTreeProps["showIcons"] = "Shows the icons of the nodes.";
31
31
  KupTreeProps["stateId"] = "";
32
32
  KupTreeProps["store"] = "";
33
- KupTreeProps["showTooltipOnRightClick"] = "If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.";
34
- KupTreeProps["tooltipDetailTimeout"] = "Defines the timeout for tooltip detail";
35
- KupTreeProps["tooltipEnabled"] = "Enable show tooltip";
36
- KupTreeProps["tooltipLoadTimeout"] = "Defines the timeout for tooltip load";
37
33
  KupTreeProps["totals"] = "Defines the current totals options.";
38
34
  KupTreeProps["useDynamicExpansion"] = "When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server.";
39
35
  })(KupTreeProps || (KupTreeProps = {}));
@@ -2,6 +2,7 @@
2
2
  * @prop --kup-tree-border: Sets border of the component.
3
3
  * @prop --kup-tree-color: Sets text color of the component.
4
4
  * @prop --kup-tree-color-rgb: Sets text color RGB values of the component (used for shaders).
5
+ * @prop --kup-tree-filter-background-color: Sets the background color of the global filter.
5
6
  * @prop --kup-tree-font-family: Sets font family of the component.
6
7
  * @prop --kup-tree-font-family-monospace: Sets monospace font family of the component (for number cells).
7
8
  * @prop --kup-tree-font-size: Sets font size of the component.
@@ -17,6 +18,7 @@
17
18
  --kup_tree_color: var(--kup-tree-color, var(--kup-text-color));
18
19
  --kup_tree_color_rgb: var(--kup-tree-color-rgb, var(--kup-text-color-rgb));
19
20
  --kup_tree_font_family: var(--kup-tree-font-family, var(--kup-font-family));
21
+ --kup_tree_filter_background_color: var(--kup-tree-filter-background-color, var(--kup-background-color));
20
22
  --kup_tree_font_family_monospace: var(
21
23
  --kup-tree-font-family-monospace,
22
24
  var(--kup-font-family-monospace)
@@ -79,9 +81,6 @@
79
81
  .wrapper {
80
82
  overflow-x: auto;
81
83
  }
82
- .wrapper #global-filter {
83
- margin-bottom: 1em;
84
- }
85
84
  .wrapper .kup-tree {
86
85
  border-collapse: collapse;
87
86
  width: max-content;
@@ -185,6 +184,14 @@
185
184
  border-bottom: solid 1px var(--kup-border-color);
186
185
  }
187
186
 
187
+ #global-filter {
188
+ background: var(--kup_tree_filter_background_color);
189
+ margin-bottom: 1em;
190
+ position: sticky;
191
+ top: 0;
192
+ z-index: 1;
193
+ }
194
+
188
195
  .first-node .cell-content {
189
196
  font-weight: bold;
190
197
  }
@@ -5,7 +5,6 @@ import { MDCRipple } from '@material/ripple';
5
5
  import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
6
6
  import { calcTotals, normalizeRows, } from '../kup-data-table/kup-data-table-helper';
7
7
  import { KupTreeState } from './kup-tree-state';
8
- import { setTooltip, unsetTooltip } from '../../utils/helpers';
9
8
  import { getColumnByName } from '../../utils/cell-utils';
10
9
  import { getProps, numberToFormattedStringNumber, setProps, } from '../../utils/utils';
11
10
  import { KupColumnMenu } from '../../utils/kup-column-menu/kup-column-menu';
@@ -163,14 +162,6 @@ export class KupTree {
163
162
  * @see dynamicExpansionCallback
164
163
  */
165
164
  this.useDynamicExpansion = false;
166
- /**
167
- * If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver.
168
- */
169
- this.showTooltipOnRightClick = true;
170
- /**
171
- * Enable show tooltip
172
- */
173
- this.tooltipEnabled = true;
174
165
  /*-------------------------------------------------*/
175
166
  /* I n t e r n a l V a r i a b l e s */
176
167
  /*-------------------------------------------------*/
@@ -390,7 +381,7 @@ export class KupTree {
390
381
  }
391
382
  this.columnMenuCard.setAttribute('data-column', column);
392
383
  this.columnMenuCard.data = this.columnMenuInstance.prepData(this, getColumnByName(this.getVisibleColumns(), column));
393
- this.columnMenuInstance.open(this, column, this.tooltip);
384
+ this.columnMenuInstance.open(this, column);
394
385
  this.columnMenuInstance.reposition(this, this.columnMenuCard);
395
386
  this.kupTreeColumnMenu.emit({
396
387
  comp: this,
@@ -550,16 +541,52 @@ export class KupTree {
550
541
  openTotalMenu(column) {
551
542
  this.openedTotalMenu = column.name;
552
543
  }
553
- closeMenuAndTooltip() {
554
- unsetTooltip(this.tooltip);
555
- }
556
544
  onTotalMenuOpen(column) {
557
- this.closeMenuAndTooltip();
558
545
  this.closeTotalMenu();
559
546
  this.openTotalMenu(column);
560
547
  }
561
- getEventDetails(el) {
562
- 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');
548
+ getEventDetails(path) {
549
+ let isHeader, isBody, isFooter, td, th, tr, filterRemove;
550
+ if (path) {
551
+ for (let i = path.length - 1; i >= 0; i--) {
552
+ let p = path[i];
553
+ if (!p.tagName) {
554
+ continue;
555
+ }
556
+ switch (p.tagName.toUpperCase()) {
557
+ case 'THEAD': {
558
+ isHeader = true;
559
+ break;
560
+ }
561
+ case 'TBODY': {
562
+ isBody = true;
563
+ break;
564
+ }
565
+ case 'TFOOT': {
566
+ isFooter = true;
567
+ break;
568
+ }
569
+ case 'TD': {
570
+ td = p;
571
+ break;
572
+ }
573
+ case 'TH': {
574
+ th = p;
575
+ break;
576
+ }
577
+ case 'TR': {
578
+ tr = p;
579
+ break;
580
+ }
581
+ default: {
582
+ if (p.classList.contains(KupThemeIconValues.FILTER_REMOVE.replace('--', ''))) {
583
+ filterRemove = p;
584
+ }
585
+ break;
586
+ }
587
+ }
588
+ }
589
+ }
563
590
  let cell = null, column = null, row = null;
564
591
  if (isBody) {
565
592
  if (td) {
@@ -598,7 +625,7 @@ export class KupTree {
598
625
  }
599
626
  contextMenuHandler(e) {
600
627
  e.preventDefault();
601
- const details = this.getEventDetails(e.target);
628
+ const details = this.getEventDetails(this.getEventPath(e.target));
602
629
  if (details.area === 'header') {
603
630
  if (details.th && details.column) {
604
631
  this.openColumnMenu(details.column.name);
@@ -614,9 +641,20 @@ export class KupTree {
614
641
  }
615
642
  return details;
616
643
  }
644
+ getEventPath(currentEl) {
645
+ const path = [];
646
+ while (currentEl &&
647
+ currentEl !== this.rootElement &&
648
+ currentEl !== document.body) {
649
+ path.push(currentEl);
650
+ currentEl = currentEl.parentNode
651
+ ? currentEl.parentNode
652
+ : currentEl.host;
653
+ }
654
+ return path;
655
+ }
617
656
  // When a TreeNode can be selected
618
657
  hdlTreeNodeClick(e, treeNodeData, treeNodePath, auto) {
619
- unsetTooltip(this.tooltip);
620
658
  if (this.expansionMode.toLowerCase() ===
621
659
  KupTreeExpansionMode.DROPDOWN ||
622
660
  (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
@@ -647,7 +685,6 @@ export class KupTree {
647
685
  }
648
686
  // When a TreeNode must be expanded or closed.
649
687
  hdlTreeNodeExpanderClick(treeNodeData, treeNodePath, ctrlKey) {
650
- unsetTooltip(this.tooltip);
651
688
  // If the node is expandable
652
689
  if (treeNodeData.expandable) {
653
690
  // Always composes the tree node path as an array
@@ -828,34 +865,6 @@ export class KupTree {
828
865
  return h("span", { style: iconStyle, class: CSSClass });
829
866
  }
830
867
  }
831
- /**
832
- * Controls if current cell needs a tooltip and eventually adds it.
833
- * @todo When the option forceOneLine is active, there is a problem with the current implementation of the tooltip. See documentation in the mauer wiki for better understanding.
834
- */
835
- getToolTipEventHandlers(treeNodeData, cell, hasTooltip) {
836
- let eventHandlers = undefined;
837
- if (hasTooltip) {
838
- if (this.showTooltipOnRightClick) {
839
- eventHandlers = {
840
- onContextMenu: (ev) => {
841
- ev.preventDefault();
842
- setTooltip(ev, treeNodeData.id, null, cell, this.tooltip);
843
- },
844
- };
845
- }
846
- else {
847
- eventHandlers = {
848
- onMouseEnter: (ev) => {
849
- setTooltip(ev, treeNodeData.id, null, cell, this.tooltip);
850
- },
851
- onMouseLeave: () => {
852
- unsetTooltip(this.tooltip);
853
- },
854
- };
855
- }
856
- }
857
- return eventHandlers;
858
- }
859
868
  getCellStyle(colName, cellStyle) {
860
869
  // Controls if there are columns with a specified width
861
870
  if (this.sizedColumns) {
@@ -881,14 +890,6 @@ export class KupTree {
881
890
  }
882
891
  return cellStyle;
883
892
  }
884
- renderTooltip() {
885
- if (this.tooltipEnabled == false) {
886
- return null;
887
- }
888
- return (h("kup-tooltip", { class: "tree-tooltip", owner: this.rootElement.tagName, loadTimeout: this.showTooltipOnRightClick == true
889
- ? 0
890
- : this.tooltipLoadTimeout, detailTimeout: this.tooltipDetailTimeout, ref: (el) => (this.tooltip = el) }));
891
- }
892
893
  /**
893
894
  * Renders the header of the tree when it must be displayed as a table.
894
895
  * @returns An array of table header cells.
@@ -1039,7 +1040,7 @@ export class KupTree {
1039
1040
  row: treeNodeData,
1040
1041
  setSizes: true,
1041
1042
  };
1042
- treeNodeCells.push(h("td", { class: `grid-cell` },
1043
+ treeNodeCells.push(h("td", { class: `grid-cell`, "data-cell": cell, "data-column": column.name },
1043
1044
  h(FCell, Object.assign({}, cellProps))));
1044
1045
  }
1045
1046
  else {
@@ -1047,9 +1048,9 @@ export class KupTree {
1047
1048
  }
1048
1049
  }
1049
1050
  }
1050
- const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
1051
1051
  let title = undefined;
1052
- if (_hasTooltip && this.kupManager.debug.isDebug()) {
1052
+ if (!this.kupManager.objects.isEmptyKupObj(treeNodeData.obj) &&
1053
+ this.kupManager.debug.isDebug()) {
1053
1054
  title =
1054
1055
  treeNodeData.obj.t +
1055
1056
  '; ' +
@@ -1058,10 +1059,6 @@ export class KupTree {
1058
1059
  treeNodeData.obj.k +
1059
1060
  ';';
1060
1061
  }
1061
- const cell = {
1062
- obj: treeNodeData.obj,
1063
- value: treeNodeData.value,
1064
- };
1065
1062
  let treeNodeCell = null;
1066
1063
  if (this.isTreeColumnVisible()) {
1067
1064
  let content = '';
@@ -1071,7 +1068,7 @@ export class KupTree {
1071
1068
  else {
1072
1069
  content = (h("span", { ref: (el) => this.contentRefs.push(el), class: "cell-content", title: this.preventXScroll ? treeNodeData.value : null }, treeNodeData.value));
1073
1070
  }
1074
- treeNodeCell = (h("td", Object.assign({ class: {
1071
+ treeNodeCell = (h("td", { class: {
1075
1072
  'first-node': treeNodeDepth === 0 ? true : false,
1076
1073
  'mdc-ripple-surface': this.ripple &&
1077
1074
  !this.showColumns &&
@@ -1079,7 +1076,7 @@ export class KupTree {
1079
1076
  'is-obj': !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj),
1080
1077
  }, style: treeNodeData.style || null, title: title, onDblClick: () => {
1081
1078
  this.onKupTreeNodeDblClick(treeNodeData, treeNodePath);
1082
- } }, this.getToolTipEventHandlers(treeNodeData, cell, _hasTooltip)), this.asAccordion && !treeNodeDepth
1079
+ } }, this.asAccordion && !treeNodeDepth
1083
1080
  ? [
1084
1081
  treeNodeIcon,
1085
1082
  content,
@@ -1094,7 +1091,7 @@ export class KupTree {
1094
1091
  'kup-tree__node--first': treeNodeDepth ? false : true,
1095
1092
  'kup-tree__node--selected': !treeNodeData.disabled &&
1096
1093
  treeNodePath === this.selectedNodeString,
1097
- }, "data-tree-path": treeNodePath }, treeNodeOptions),
1094
+ }, "data-row": treeNodeData, "data-tree-path": treeNodePath }, treeNodeOptions),
1098
1095
  treeNodeCell,
1099
1096
  treeNodeCells));
1100
1097
  }
@@ -1112,7 +1109,7 @@ export class KupTree {
1112
1109
  // must do this
1113
1110
  // otherwise does not fire the watcher
1114
1111
  const totalsCopy = Object.assign({}, this.totals);
1115
- const value = event.detail.selected.value;
1112
+ const value = event.detail.selected.id;
1116
1113
  if (value === TotalLabel.CANC) {
1117
1114
  if (this.totals && this.totals[column.name]) {
1118
1115
  delete totalsCopy[column.name];
@@ -1390,7 +1387,6 @@ export class KupTree {
1390
1387
  }
1391
1388
  render() {
1392
1389
  this.contentRefs = [];
1393
- const tooltip = this.renderTooltip();
1394
1390
  this.sizedColumns = this.getSizedColumns();
1395
1391
  let wrapperClass = 'density-medium';
1396
1392
  switch (this.density) {
@@ -1429,9 +1425,9 @@ export class KupTree {
1429
1425
  return (h(Host, null,
1430
1426
  h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
1431
1427
  h("div", { id: componentWrapperId, class: wrapperClass },
1428
+ filterField,
1432
1429
  h("div", { class: "wrapper", ref: (el) => (this.treeWrapperRef =
1433
1430
  el) },
1434
- filterField,
1435
1431
  h("table", { class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
1436
1432
  e.preventDefault();
1437
1433
  } },
@@ -1443,8 +1439,7 @@ export class KupTree {
1443
1439
  (this.showFooter || this.hasTotals()) &&
1444
1440
  this.columns
1445
1441
  ? this.renderFooter()
1446
- : null)),
1447
- tooltip)));
1442
+ : null)))));
1448
1443
  }
1449
1444
  disconnectedCallback() {
1450
1445
  this.kupManager.language.register(this);
@@ -2043,76 +2038,6 @@ export class KupTree {
2043
2038
  "reflect": false,
2044
2039
  "defaultValue": "false"
2045
2040
  },
2046
- "showTooltipOnRightClick": {
2047
- "type": "boolean",
2048
- "mutable": false,
2049
- "complexType": {
2050
- "original": "boolean",
2051
- "resolved": "boolean",
2052
- "references": {}
2053
- },
2054
- "required": false,
2055
- "optional": false,
2056
- "docs": {
2057
- "tags": [],
2058
- "text": "If set to true, displays tooltip on right click; if set to false, displays tooltip on mouseOver."
2059
- },
2060
- "attribute": "show-tooltip-on-right-click",
2061
- "reflect": false,
2062
- "defaultValue": "true"
2063
- },
2064
- "tooltipDetailTimeout": {
2065
- "type": "number",
2066
- "mutable": false,
2067
- "complexType": {
2068
- "original": "number",
2069
- "resolved": "number",
2070
- "references": {}
2071
- },
2072
- "required": false,
2073
- "optional": false,
2074
- "docs": {
2075
- "tags": [],
2076
- "text": "Defines the timeout for tooltip detail"
2077
- },
2078
- "attribute": "tooltip-detail-timeout",
2079
- "reflect": false
2080
- },
2081
- "tooltipEnabled": {
2082
- "type": "boolean",
2083
- "mutable": false,
2084
- "complexType": {
2085
- "original": "boolean",
2086
- "resolved": "boolean",
2087
- "references": {}
2088
- },
2089
- "required": false,
2090
- "optional": false,
2091
- "docs": {
2092
- "tags": [],
2093
- "text": "Enable show tooltip"
2094
- },
2095
- "attribute": "tooltip-enabled",
2096
- "reflect": false,
2097
- "defaultValue": "true"
2098
- },
2099
- "tooltipLoadTimeout": {
2100
- "type": "number",
2101
- "mutable": false,
2102
- "complexType": {
2103
- "original": "number",
2104
- "resolved": "number",
2105
- "references": {}
2106
- },
2107
- "required": false,
2108
- "optional": false,
2109
- "docs": {
2110
- "tags": [],
2111
- "text": "Defines the timeout for tooltip load"
2112
- },
2113
- "attribute": "tooltip-load-timeout",
2114
- "reflect": false
2115
- },
2116
2041
  "totals": {
2117
2042
  "type": "unknown",
2118
2043
  "mutable": true,
@@ -12,7 +12,7 @@ const dom = document.documentElement;
12
12
  /*-------------------------------------------------*/
13
13
  /* C o m p o n e n t */
14
14
  /*-------------------------------------------------*/
15
- export const FCell = (props) => {
15
+ export const FCell = (props, children) => {
16
16
  const cell = props.cell;
17
17
  const column = props.column;
18
18
  const row = props.row;
@@ -100,12 +100,12 @@ export const FCell = (props) => {
100
100
  };
101
101
  infoEl = h(FImage, Object.assign({}, fProps));
102
102
  }
103
- return (h("div", { class: classObj, style: cell.style },
104
- h("div", { class: "f-cell__content", style: cell.styleContent, title: cellTitle },
105
- props.indents,
106
- infoEl,
107
- icon,
108
- content)));
103
+ return (h("div", { class: classObj, "kup-get-cell-props": () => {
104
+ return props;
105
+ }, style: cell.style },
106
+ h("div", { class: "f-cell__content", style: cell.styleContent, title: cellTitle }, children && children.length > 0
107
+ ? children
108
+ : [props.indents, infoEl, icon, content])));
109
109
  };
110
110
  function setCellSize(cellType, subcomponentProps, cell, props) {
111
111
  switch (cellType) {
@@ -59,7 +59,8 @@ function createChipList(props, isChoice, isFilter, isInput) {
59
59
  }
60
60
  }
61
61
  function createChip(chip) {
62
- let componentClass = `chip `;
62
+ const onlyIcon = !!(chip.icon && !chip.value);
63
+ let componentClass = `chip ${onlyIcon ? 'chip--only-icon' : ''}`;
63
64
  let iconEl = [];
64
65
  let iconClass = 'chip__icon chip__icon--leading';
65
66
  if (isFilter || isChoice) {
@@ -70,3 +70,27 @@ export function toStreamNode(nodes) {
70
70
  }
71
71
  return streamlined;
72
72
  }
73
+ /**
74
+ * Returns the parent of the given node.
75
+ * @param {KupDataNode[]} nodes - Input array of nodes.
76
+ * @param {KupDataNode} child - Child node.
77
+ * @returns {KupDataNode} Parent node.
78
+ */
79
+ export function getParentNode(nodes, child) {
80
+ let parent = null;
81
+ for (let index = 0; index < nodes.length; index++) {
82
+ const node = nodes[index];
83
+ recursive(node);
84
+ function recursive(node) {
85
+ const hasChildren = !!node.children;
86
+ if (hasChildren && node.children.includes(child)) {
87
+ parent = node;
88
+ return;
89
+ }
90
+ for (let index = 0; !parent && hasChildren && index < node.children.length; index++) {
91
+ recursive(node.children[index]);
92
+ }
93
+ }
94
+ }
95
+ return parent;
96
+ }
@@ -2,7 +2,7 @@ import { KupDataNewColumnTypes, } from './kup-data-declarations';
2
2
  import { findCell, getCellValue, replaceCell } from './kup-data-cell-helper';
3
3
  import { findColumns, hideColumns, newColumn } from './kup-data-column-helper';
4
4
  import { findRow, toNode } from './kup-data-row-helper';
5
- import { removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
5
+ import { getParentNode, removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
6
6
  import { fieldColumn } from '../../components/kup-data-table/kup-data-table-declarations';
7
7
  import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
8
8
  const dom = document.documentElement;
@@ -35,6 +35,9 @@ export class KupData {
35
35
  },
36
36
  };
37
37
  this.node = {
38
+ getParent(nodes, child) {
39
+ return getParentNode(nodes, child);
40
+ },
38
41
  remove(nodes, node2remove) {
39
42
  return removeNode(nodes, node2remove);
40
43
  },
@@ -188,7 +188,8 @@ export class KupDynamicPosition {
188
188
  el.style.top = `${bottom + el.kupDynamicPosition.margin}px`;
189
189
  }
190
190
  else {
191
- if (window.innerHeight - rect.bottom < offsetH) {
191
+ if (offsetH < rect.top &&
192
+ window.innerHeight - rect.bottom < offsetH) {
192
193
  el.style.bottom = `${window.innerHeight - top + el.kupDynamicPosition.margin}px`;
193
194
  }
194
195
  else {
@@ -217,7 +218,8 @@ export class KupDynamicPosition {
217
218
  el.style.right = `${window.innerWidth - scrollbarWidth - right}px`;
218
219
  }
219
220
  else {
220
- if (window.innerWidth - rect.left < offsetW) {
221
+ if (offsetW < rect.right &&
222
+ window.innerWidth - rect.left < offsetW) {
221
223
  let scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
222
224
  if (scrollbarWidth > 30) {
223
225
  scrollbarWidth = 0;
@@ -106,7 +106,6 @@ export class KupInteract {
106
106
  break;
107
107
  case KupDragEffect.CLONE:
108
108
  ghostImage = draggable.cloneNode(true);
109
- setComputedStyle(draggable, ghostImage);
110
109
  ghostImage.style.cursor = 'grabbing';
111
110
  ghostImage.style.height = draggable.clientHeight + 'px';
112
111
  ghostImage.style.left =
@@ -120,7 +119,7 @@ export class KupInteract {
120
119
  ghostImage.style.width = draggable.clientWidth + 'px';
121
120
  ghostImage.style.zIndex =
122
121
  'calc(var(--kup-navbar-zindex) + 1)';
123
- dom.ketchup.interact.container.appendChild(ghostImage);
122
+ draggable.parentElement.appendChild(ghostImage);
124
123
  draggable.kupDragDrop.ghostImage = ghostImage;
125
124
  break;
126
125
  }
@@ -145,26 +144,6 @@ export class KupInteract {
145
144
  };
146
145
  interact(el).draggable(options);
147
146
  this.managedElements.add(el);
148
- function setComputedStyle(draggable, ghostImage) {
149
- recursive(draggable, ghostImage);
150
- function recursive(source, target) {
151
- const styles = getComputedStyle(source);
152
- for (const key in styles) {
153
- if (Object.prototype.hasOwnProperty.call(styles, key)) {
154
- const s = styles[key];
155
- try {
156
- target.style[s] = styles[s];
157
- }
158
- catch (error) { }
159
- }
160
- }
161
- for (let index = 0; index < source.children.length; index++) {
162
- const sourceChild = source.children[index];
163
- const targetChild = target.children[index];
164
- recursive(sourceChild, targetChild);
165
- }
166
- }
167
- }
168
147
  }
169
148
  /**
170
149
  * Sets up a new dropzone.
@@ -82,6 +82,7 @@ export var KupLanguageGeneric;
82
82
  (function (KupLanguageGeneric) {
83
83
  KupLanguageGeneric["ADD_NEW"] = "genericAddNew";
84
84
  KupLanguageGeneric["APPLY"] = "genericApply";
85
+ KupLanguageGeneric["BACK"] = "genericBack";
85
86
  KupLanguageGeneric["COLLAPSE"] = "genericCollapse";
86
87
  KupLanguageGeneric["DAY"] = "genericDay";
87
88
  KupLanguageGeneric["DRAG_AND_DROP"] = "genericDragAndDrop";
@@ -116,6 +117,7 @@ export var KupLanguageGeneric;
116
117
  KupLanguageGeneric["SWAP"] = "genericSwap";
117
118
  KupLanguageGeneric["TOGGLE"] = "genericToggle";
118
119
  KupLanguageGeneric["TODAY"] = "genericToday";
120
+ KupLanguageGeneric["TOP"] = "genericTop";
119
121
  KupLanguageGeneric["TOTALS_TABLE"] = "genericTotalsTable";
120
122
  KupLanguageGeneric["TRANSPOSE_DATA"] = "genericTransposeData";
121
123
  KupLanguageGeneric["VIEW_AS"] = "genericViewAs";