@sme.up/ketchup 11.0.0-SNAPSHOT-20250411125317 → 11.0.0-SNAPSHOT-20250415141853

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 (92) hide show
  1. package/dist/cjs/ketchup.cjs.js +1 -1
  2. package/dist/cjs/kup-accordion.cjs.entry.js +236 -27
  3. package/dist/cjs/kup-autocomplete_29.cjs.entry.js +38 -26
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/assets/accordion.js +24 -23
  6. package/dist/collection/assets/dashboard.js +3 -9
  7. package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +6 -1
  8. package/dist/collection/components/kup-accordion/kup-accordion.css +10 -2
  9. package/dist/collection/components/kup-accordion/kup-accordion.js +442 -40
  10. package/dist/collection/components/kup-data-table/kup-data-table.js +31 -23
  11. package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +4 -0
  12. package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +4 -4
  13. package/dist/components/index.js +1 -1
  14. package/dist/components/kup-accordion.js +242 -29
  15. package/dist/components/kup-activity-timeline.js +2 -2
  16. package/dist/components/kup-autocomplete.js +1 -1
  17. package/dist/components/kup-badge.js +1 -1
  18. package/dist/components/kup-box.js +1 -1
  19. package/dist/components/kup-button-list.js +1 -1
  20. package/dist/components/kup-button.js +1 -1
  21. package/dist/components/kup-calendar.js +2 -2
  22. package/dist/components/kup-card-list.js +3 -3
  23. package/dist/components/kup-card.js +1 -1
  24. package/dist/components/kup-cell.js +2 -2
  25. package/dist/components/kup-chart.js +1 -1
  26. package/dist/components/kup-checkbox.js +1 -1
  27. package/dist/components/kup-chip.js +1 -1
  28. package/dist/components/kup-color-picker.js +1 -1
  29. package/dist/components/kup-combobox.js +1 -1
  30. package/dist/components/kup-dashboard.js +2 -2
  31. package/dist/components/kup-data-table.js +1 -1
  32. package/dist/components/kup-date-picker.js +1 -1
  33. package/dist/components/kup-dialog.js +1 -1
  34. package/dist/components/kup-drawer.js +2 -2
  35. package/dist/components/kup-dropdown-button.js +1 -1
  36. package/dist/components/kup-echart.js +1 -1
  37. package/dist/components/kup-editor.js +1 -1
  38. package/dist/components/kup-family-tree.js +3 -3
  39. package/dist/components/kup-file-upload.js +1 -1
  40. package/dist/components/kup-form.js +1 -1
  41. package/dist/components/kup-gauge.js +1 -1
  42. package/dist/components/kup-grid.js +1 -1
  43. package/dist/components/kup-htm.js +2 -2
  44. package/dist/components/kup-iframe.js +2 -2
  45. package/dist/components/kup-image-list.js +2 -2
  46. package/dist/components/kup-image.js +1 -1
  47. package/dist/components/kup-input-panel.js +3 -3
  48. package/dist/components/kup-lazy.js +2 -2
  49. package/dist/components/kup-list.js +1 -1
  50. package/dist/components/kup-magic-box.js +4 -4
  51. package/dist/components/kup-nav-bar.js +2 -2
  52. package/dist/components/kup-numeric-picker.js +2 -2
  53. package/dist/components/kup-object-field.js +2 -2
  54. package/dist/components/kup-pdf.js +2 -2
  55. package/dist/components/kup-planner.js +2 -2
  56. package/dist/components/kup-probe.js +2 -2
  57. package/dist/components/kup-progress-bar.js +1 -1
  58. package/dist/components/kup-qlik.js +2 -2
  59. package/dist/components/kup-radio.js +1 -1
  60. package/dist/components/kup-rating.js +1 -1
  61. package/dist/components/kup-snackbar.js +2 -2
  62. package/dist/components/kup-spinner.js +1 -1
  63. package/dist/components/kup-switch.js +1 -1
  64. package/dist/components/kup-tab-bar.js +1 -1
  65. package/dist/components/kup-text-field.js +1 -1
  66. package/dist/components/kup-time-picker.js +1 -1
  67. package/dist/components/kup-toolbar.js +1 -1
  68. package/dist/components/kup-tree.js +1 -1
  69. package/dist/components/kup-txt.js +2 -2
  70. package/dist/components/kup-typography-list.js +2 -2
  71. package/dist/components/kup-typography.js +2 -2
  72. package/dist/components/{p-73922583.js → p-04bdcde6.js} +1 -1
  73. package/dist/components/{p-f4cbdb5d.js → p-7eb8f56e.js} +2 -2
  74. package/dist/components/{p-c50f899f.js → p-889cc2bc.js} +1896 -1879
  75. package/dist/components/{p-76ce24eb.js → p-93971a82.js} +2 -2
  76. package/dist/components/{p-2d17a388.js → p-b1517896.js} +2 -2
  77. package/dist/components/{p-9cadb89a.js → p-b57e2956.js} +2 -2
  78. package/dist/esm/ketchup.js +1 -1
  79. package/dist/esm/kup-accordion.entry.js +237 -28
  80. package/dist/esm/kup-autocomplete_29.entry.js +38 -26
  81. package/dist/esm/loader.js +1 -1
  82. package/dist/ketchup/ketchup.esm.js +1 -1
  83. package/dist/ketchup/p-3ea91f6e.entry.js +9 -0
  84. package/dist/ketchup/p-527998c8.entry.js +1 -0
  85. package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +14 -7
  86. package/dist/types/components/kup-accordion/kup-accordion.d.ts +67 -6
  87. package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +6 -1
  88. package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +1 -1
  89. package/dist/types/components.d.ts +61 -12
  90. package/package.json +1 -1
  91. package/dist/ketchup/p-c832734a.entry.js +0 -1
  92. package/dist/ketchup/p-e9f77e3a.entry.js +0 -9
@@ -646,16 +646,9 @@ export class KupDataTable {
646
646
  * @param {KupDataColumn} column - Column to hide.
647
647
  */
648
648
  async hideColumn(column) {
649
- var _a;
650
649
  __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").data.column.hide(this.data, [column.name]);
651
- if ((_a = this.visibleColumns) === null || _a === void 0 ? void 0 : _a.length) {
652
- this.visibleColumns = this.visibleColumns.filter((colName) => colName != column.name);
653
- }
654
- else {
655
- this.visibleColumns = this.data.columns
656
- .filter((col) => col.name != column.name && col.visible)
657
- .map((col) => col.name);
658
- }
650
+ this.visibleColumns = this.getVisibleColumns().map((col) => col.name);
651
+ this.visibleColumns = this.visibleColumns.filter((colName) => colName != column.name);
659
652
  this.kupColumnRemove.emit({
660
653
  comp: this,
661
654
  id: this.rootElement.id,
@@ -742,6 +735,23 @@ export class KupDataTable {
742
735
  */
743
736
  async newColumn(type, options) {
744
737
  const result = __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").data.column.new(this.data, type, options);
738
+ this.visibleColumns = this.getVisibleColumns().map((col) => col.name);
739
+ if (typeof result !== 'string') {
740
+ if (this.visibleColumns.findIndex((c) => c === result.name) < 0) {
741
+ __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'New column [' +
742
+ result.name +
743
+ '] not present in visibleColumns!', KupDebugCategory.WARNING);
744
+ const previousColumnIndex = this.visibleColumns.findIndex((c) => c == options.columns[1]);
745
+ if (previousColumnIndex >= 0) {
746
+ __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").debug.logMessage(this, 'New column [' +
747
+ result.name +
748
+ '] added in visibleColumns at index [' +
749
+ (previousColumnIndex + 1) +
750
+ ']!', KupDebugCategory.WARNING);
751
+ this.visibleColumns.splice(previousColumnIndex + 1, 0, result.name);
752
+ }
753
+ }
754
+ }
745
755
  this.refresh();
746
756
  return result;
747
757
  }
@@ -1455,7 +1465,7 @@ export class KupDataTable {
1455
1465
  __classPrivateFieldSet(this, _KupDataTable_sizedColumns, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getSizedColumns).call(this), "f");
1456
1466
  let rows = null;
1457
1467
  if (__classPrivateFieldGet(this, _KupDataTable_paginatedRowsLength, "f") === 0) {
1458
- rows = (h("tr", { key: 'a109c26f03243692c99a25a1eea25453b1c74e2e', ref: (el) => __classPrivateFieldGet(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { key: 'e6491cf3a87bda2b61ab2e3966fbd45cfd0300a8', colSpan: __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
1468
+ rows = (h("tr", { key: '95eed1b957f7ffb295c775f134fd0f21e785b2c2', ref: (el) => __classPrivateFieldGet(this, _KupDataTable_rowsRefs, "f").push(el) }, h("td", { key: 'de4621dcb62b4fef44efbcd60f24d393d28c17c0', colSpan: __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_calculateColspan).call(this) }, this.emptyDataLabel)));
1459
1469
  }
1460
1470
  else {
1461
1471
  rows = [];
@@ -1520,7 +1530,7 @@ export class KupDataTable {
1520
1530
  for (let i = 0; i < chipsData.length; i++) {
1521
1531
  props.onIconClick.push(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_removeGroup).call(this, i));
1522
1532
  }
1523
- groupChips = h(FChip, Object.assign({ key: '994486aa00508cc9dcc5fa90077ed03a624e5869' }, props));
1533
+ groupChips = h(FChip, Object.assign({ key: '2057846e925b1cb43848ab567b53ea062a3bd393' }, props));
1524
1534
  }
1525
1535
  }
1526
1536
  const tableClass = {
@@ -1552,7 +1562,7 @@ export class KupDataTable {
1552
1562
  if (this.headerIsPersistent &&
1553
1563
  this.tableHeight === undefined &&
1554
1564
  this.tableWidth === undefined) {
1555
- stickyEl = (h("sticky-header", { key: 'dc954425f33cee9ec4e421b296cc682a3a7a50f8', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_stickyTheadRef, el, "f")) }, h("thead-sticky", { key: '92b5290552da8cad020933881448f23a90613398' }, h("tr-sticky", { key: 'dc89f168bacfe6fe8a7fbfb3340d3c778fa814d1' }, stickyHeader))));
1565
+ stickyEl = (h("sticky-header", { key: 'c7e308ac460a20aaf536f06a45cd5a6789d41b4b', class: "hover-scrolling-child", hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_stickyTheadRef, el, "f")) }, h("thead-sticky", { key: '11de7f3d2a0c2a29c12da43c44f507b9820c481a' }, h("tr-sticky", { key: '66b0d997918b27c6fe2967b5089522efc5580185' }, stickyHeader))));
1556
1566
  }
1557
1567
  let belowClass = 'below-wrapper';
1558
1568
  if (!!this.tableHeight || !!this.tableWidth) {
@@ -1598,7 +1608,7 @@ export class KupDataTable {
1598
1608
  const useGlobalFilter = !this.legacyLook &&
1599
1609
  (this.globalFilter ||
1600
1610
  this.getRows().length > __classPrivateFieldGet(this, _KupDataTable_DEFAULT_ROWS_FOR_GLOBAL_FILTER, "f"));
1601
- const compCreated = (h(Host, { key: 'c666846d684579a5add73e5a7ef9d7dde3cadf81', "onKup-drop": (e) => {
1611
+ const compCreated = (h(Host, { key: 'c0d6dc62580a5f75b52a253b14417d84c0da1915', "onKup-drop": (e) => {
1602
1612
  this.kupDataTableDrop.emit(e.detail);
1603
1613
  }, "onKup-cell-input": (e) => {
1604
1614
  autoselectOnAction(e);
@@ -1613,11 +1623,11 @@ export class KupDataTable {
1613
1623
  this.kupDataTableObjectFieldOpenSearchMenu.emit(e.detail);
1614
1624
  }, "onKup-objectfield-selectedmenuitem": (e) => {
1615
1625
  this.kupDataTableObjectFieldSelectedMenuItem.emit(e.detail);
1616
- } }, h("style", { key: 'a1399a34ead8fb8cad66b57c77c7ae7421040bfd' }, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, h("div", { key: '9850db333ad3684835003c25eaf60e806c9f9a5d', id: componentWrapperId, class: wrapClass }, h("div", { key: 'e27fc200f0c1a28e91adf386dc316d1610b353fc', class: "group-wrapper" }, groupChips), h("div", { key: '387a46341b05a7d89feb8cd56809eaed5bde631e', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
1626
+ } }, h("style", { key: '29c51b30d2b4310567d30f1f12b571e305773e4b' }, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), this.updatableData ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_renderUpdateButtons).call(this) : null, h("div", { key: 'a64f8e36a8c4e1605c04292ca6bb7efca758476b', id: componentWrapperId, class: wrapClass }, h("div", { key: '406d2c32793ce6c0e6d9c73ed6714b49ed5fe88b', class: "group-wrapper" }, groupChips), h("div", { key: '747aae1583a41ba9f4a5a7f2cdaabd61a68f60b5', class: "actions-wrapper", style: actionWrapperWidth }, useGlobalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), sizing: KupComponentSizing.EXTRA_SMALL, value: this.globalFilterValue, onInput: (event) => {
1617
1627
  const t = event.target;
1618
1628
  window.clearTimeout(__classPrivateFieldGet(this, _KupDataTable_globalFilterTimeout, "f"));
1619
1629
  __classPrivateFieldSet(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
1620
- } }))) : null, h("div", { key: '05c0fc7fa6d7e8d6e5ccf5b5ef0ab80ef2c14fb0', class: "above-wrapper paginator-top" }, paginatorTop), this.insertMode !== '' &&
1630
+ } }))) : null, h("div", { key: '9966a4c8e86f9a8313c2cd2d8f3e777a2c13e40e', class: "above-wrapper paginator-top" }, paginatorTop), this.insertMode !== '' &&
1621
1631
  this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
1622
1632
  this.kupSave.emit({
1623
1633
  comp: this,
@@ -1667,9 +1677,9 @@ export class KupDataTable {
1667
1677
  this.data.rows.unshift(row);
1668
1678
  await this.refresh(true);
1669
1679
  }
1670
- }, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '21beaa04b56c5f553a604ce725f1873f0fe2264e', class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
1680
+ }, sizing: KupComponentSizing.MEDIUM, styling: FButtonStyling.RAISED, title: "Insert row", wrapperClass: "insert-button" })) : null), h("div", { key: '0ce9fd68ef4ffea7700333f61de3a13005097a55', class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
1671
1681
  ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnRemoveArea).call(this)
1672
- : null), h("div", { key: 'f444f55b6ac34b18f0816503ff3f211e7ccfac62', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
1682
+ : null), h("div", { key: '88ce6e0c234395fd470f7ac2a5f9a0918ba56ef7', style: elStyle, class: belowClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableAreaRef, el, "f")) }, this.showCustomization
1673
1683
  ? [
1674
1684
  h("div", { class: "settings-trigger", onClick: () => {
1675
1685
  __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onCustomSettingsClick).call(this);
@@ -1678,7 +1688,7 @@ export class KupDataTable {
1678
1688
  } }, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, resource: "settings", sizeX: "10px" })),
1679
1689
  this.renderCustomizePanel(),
1680
1690
  ]
1681
- : null, h("table", { key: '56d61544a52854bb46b7b151b038a93ad3c2dcd1', class: tableClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
1691
+ : null, h("table", { key: '057cf233daad29db1969b00ea756e7cbd718bc41', class: tableClass, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_tableRef, el, "f")), onKeyDown: (e) => __classPrivateFieldGet(this, _KupDataTable_onKupKeyDown, "f").call(this, e), onMouseLeave: (ev) => {
1682
1692
  ev.stopPropagation();
1683
1693
  }, onPointerDown: (e) => {
1684
1694
  __classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
@@ -1686,7 +1696,7 @@ export class KupDataTable {
1686
1696
  __classPrivateFieldSet(this, _KupDataTable_lastPointerDetails, __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getEventDetails).call(this, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").getEventPath(e.target, this.rootElement), e), "f");
1687
1697
  }, onContextMenu: (e) => {
1688
1698
  e.preventDefault();
1689
- } }, h("thead", { key: '54d271abddddca052867731081bf3078bfb8960c', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_theadRef, el, "f")) }, h("tr", { key: '061e099d373ad7dc8841b6ca48e4b532b36c5ea0' }, header)), h("tbody", { key: 'e7f1310493d586c53b80cfe9c3296efb1808a724' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
1699
+ } }, h("thead", { key: '1adb805159eee68c69ebffcac19cd86e23d875d4', hidden: !this.showHeader, ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_theadRef, el, "f")) }, h("tr", { key: 'bbde00b6aecb2dd6418d203de9bf31a6c4967c4d' }, header)), h("tbody", { key: 'ae64233d16c02725b80a180eb1742044bd2ba5b4' }, rows), this.showFooter && this.renderFooter()), stickyEl), paginatorBottom)));
1690
1700
  __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").perfMonitoring.measure('componentRender', 'kup-data-table');
1691
1701
  return compCreated;
1692
1702
  }
@@ -6431,10 +6441,8 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
6431
6441
  this.visibleColumns.splice(rIdx, 0, sortedName);
6432
6442
  }
6433
6443
  else {
6434
- // // Adds the sorted column to visibleColumns to preserve the current column order.
6435
- this.visibleColumns = this.data.columns
6436
- .filter((col) => col.visible)
6437
- .map((col) => col.name);
6444
+ // Adds the sorted column to visibleColumns to preserve the current column order.
6445
+ this.visibleColumns = this.getVisibleColumns().map((c) => c.name);
6438
6446
  }
6439
6447
  }, _KupDataTable_moveSortedColumns = function _KupDataTable_moveSortedColumns(columns, receivingColumnIndex, sortedColumnIndex) {
6440
6448
  const remove = columns.splice(sortedColumnIndex, 1);
@@ -6,9 +6,13 @@ export var KupTabBarProps;
6
6
  (function (KupTabBarProps) {
7
7
  KupTabBarProps["customStyle"] = "Custom style of the component.";
8
8
  KupTabBarProps["data"] = "List of elements.";
9
+ KupTabBarProps["dense"] = "When true, the component will be more compact.";
10
+ KupTabBarProps["infoIcon"] = "Icon to be shown in the info button";
9
11
  KupTabBarProps["ripple"] = "When enabled displays Material's ripple effect on item headers.";
10
12
  KupTabBarProps["toolbar"] = "when true, it will show the toolbar activation icon";
11
13
  KupTabBarProps["variant"] = "Variant of the component. It is either flat or contained";
14
+ KupTabBarProps["toolbarCallback"] = "Callback to be called when the toolbar icon is clicked";
15
+ KupTabBarProps["infoCallback"] = "Callback to be called when the info icon is clicked";
12
16
  })(KupTabBarProps || (KupTabBarProps = {}));
13
17
  /**
14
18
  * Styling options for the f-button component.
@@ -99,7 +99,7 @@ export class KupTabBar {
99
99
  });
100
100
  }
101
101
  onKupToolbarItemClick(e) {
102
- this.kupItemClick.emit({
102
+ this.kupToolbarItemClick.emit({
103
103
  comp: this,
104
104
  id: this.rootElement.id,
105
105
  value: this.value,
@@ -313,7 +313,7 @@ export class KupTabBar {
313
313
  'kup-dense': this.dense,
314
314
  'kup-danger': node.danger,
315
315
  };
316
- const tabEl = (h("f-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) }, h("span", { class: "tab__content" }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, wrapperClass: "tab__icon" })) : null, node.value ? (h("span", { class: "tab__text-label" }, this.data[i].value)) : null), this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
316
+ const tabEl = (h("f-button", { class: tabClass, role: "tab", "aria-selected": node.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) }, h("span", { class: "tab__content" }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, wrapperClass: "tab__icon" })) : null, node.value ? (h("span", { class: "tab__text-label" }, node.value)) : null), this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
317
317
  event.stopPropagation();
318
318
  const el = event.currentTarget;
319
319
  const data = await this.infoCallback();
@@ -693,8 +693,8 @@ export class KupTabBar {
693
693
  }
694
694
  }
695
695
  }, {
696
- "method": "kupItemClick",
697
- "name": "kup-tabbar-itemclick",
696
+ "method": "kupToolbarItemClick",
697
+ "name": "kup-tabbar-toolbaritemclick",
698
698
  "bubbles": true,
699
699
  "cancelable": false,
700
700
  "composed": true,
@@ -1,5 +1,5 @@
1
1
  export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-ef8cbd35.js';
2
- import { K as KupManager } from './p-73922583.js';
2
+ import { K as KupManager } from './p-04bdcde6.js';
3
3
 
4
4
  /** used for obtain a KupManager instance without a dom document (for UT) */
5
5
  function newKupManager(init) {
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
2
- import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeColorValues, c as KupThemeIconValues } from './p-73922583.js';
3
- import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u } from './p-c50f899f.js';
2
+ import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeIconValues, c as KupThemeColorValues, d as KupDynamicPositionPlacement } from './p-04bdcde6.js';
3
+ import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u } from './p-889cc2bc.js';
4
4
 
5
5
  /**
6
6
  * Props of the kup-accordion component.
@@ -9,35 +9,116 @@ import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustom
9
9
  var KupAccordionProps;
10
10
  (function (KupAccordionProps) {
11
11
  KupAccordionProps["customStyle"] = "Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";
12
- KupAccordionProps["data"] = "Data of the accordion.";
12
+ KupAccordionProps["data"] = "List of elements.";
13
+ KupAccordionProps["infoIcon"] = "When true, it will show the info activation icon";
13
14
  KupAccordionProps["ripple"] = "When enabled displays Material's ripple effect on item headers.";
15
+ KupAccordionProps["toolbar"] = "When true, it will show the toolbar activation icon";
16
+ KupAccordionProps["sizing"] = "Sets the type of the component sizing.";
17
+ KupAccordionProps["toolbarCallback"] = "Callback to be called when the toolbar icon is clicked";
18
+ KupAccordionProps["infoCallback"] = "Callback to be called when the info icon is clicked";
14
19
  })(KupAccordionProps || (KupAccordionProps = {}));
15
20
 
16
- const kupAccordionCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";
21
+ const kupAccordionCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px;gap:var(--kup-space-03)}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header .f-image{margin:0}.accordion-item__header .accordion-rigtbuttons{margin-left:auto;margin-right:0;display:flex;gap:var(--kup-space-03)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";
17
22
  const KupAccordionStyle0 = kupAccordionCss;
18
23
 
24
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
25
+ if (kind === "m")
26
+ throw new TypeError("Private method is not writable");
27
+ if (kind === "a" && !f)
28
+ throw new TypeError("Private accessor was defined without a setter");
29
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
30
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
31
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
32
+ };
33
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
34
+ if (kind === "a" && !f)
35
+ throw new TypeError("Private accessor was defined without a getter");
36
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
37
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
38
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
39
+ };
40
+ var _KupAccordion_clickCbDropCard, _KupAccordion_dropDownActionCardAnchor;
19
41
  const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion extends H {
20
42
  constructor() {
21
43
  super();
22
44
  this.__registerHost();
23
45
  this.__attachShadow();
24
- this.kupAccordionItemSelected = createEvent(this, "kup-accordion-itemselected", 6);
46
+ this.kupBlur = createEvent(this, "kup-accordion-blur", 6);
47
+ this.kupClick = createEvent(this, "kup-accordion-click", 6);
48
+ this.kupIconClick = createEvent(this, "kup-accordion-iconclick", 6);
49
+ this.kupInfoIconClick = createEvent(this, "kup-accordion-infoiconclick", 6);
50
+ this.kupFocus = createEvent(this, "kup-accordion-focus", 6);
51
+ this.kupToolbarItemClick = createEvent(this, "kup-accordion-toolbaritemclick", 6);
25
52
  /*-------------------------------------------------*/
26
53
  /* I n t e r n a l V a r i a b l e s */
27
54
  /*-------------------------------------------------*/
55
+ this.toolbarState = [];
56
+ this.infoState = [];
28
57
  /**
29
58
  * Instance of the KupManager class.
30
59
  */
31
60
  this.kupManager = kupManagerInstance();
61
+ _KupAccordion_clickCbDropCard.set(this, null);
32
62
  /**
33
63
  * Instance of the KupManager class.
34
64
  */
35
65
  this.slotsNames = [];
66
+ _KupAccordion_dropDownActionCardAnchor.set(this, null);
36
67
  this.selectedItems = [];
37
68
  this.customStyle = '';
38
69
  this.data = null;
70
+ this.infoIcon = false;
39
71
  this.ripple = false;
72
+ this.toolbar = false;
40
73
  this.sizing = KupComponentSizing.SMALL;
74
+ this.toolbarCallback = undefined;
75
+ this.infoCallback = undefined;
76
+ }
77
+ onKupBlur(node) {
78
+ this.kupBlur.emit({
79
+ comp: this,
80
+ id: this.rootElement.id,
81
+ node: node,
82
+ });
83
+ }
84
+ onKupClick(i, node) {
85
+ this.data[i].contentVisible = !this.data[i].contentVisible;
86
+ this.updateSelectedItems();
87
+ this.kupClick.emit({
88
+ comp: this,
89
+ id: this.rootElement.id,
90
+ node: node,
91
+ });
92
+ }
93
+ onKupIconClick(el) {
94
+ if (!el) {
95
+ this.kupManager.debug.logMessage(this, 'onKupIconClick: Element is null');
96
+ return;
97
+ }
98
+ __classPrivateFieldSet(this, _KupAccordion_dropDownActionCardAnchor, el, "f");
99
+ this.createDropDownToolbarList();
100
+ }
101
+ onKupInfoIconClick(el) {
102
+ if (!el) {
103
+ this.kupManager.debug.logMessage(this, 'onKupIconClick: Element is null');
104
+ return;
105
+ }
106
+ __classPrivateFieldSet(this, _KupAccordion_dropDownActionCardAnchor, el, "f");
107
+ this.createDropDownInfoList();
108
+ }
109
+ onKupFocus(node) {
110
+ this.kupFocus.emit({
111
+ comp: this,
112
+ id: this.rootElement.id,
113
+ node: node,
114
+ });
115
+ }
116
+ onKupToolbarItemClick(e) {
117
+ this.kupToolbarItemClick.emit({
118
+ comp: this,
119
+ id: this.rootElement.id,
120
+ node: e.detail.selected,
121
+ });
41
122
  }
42
123
  /*-------------------------------------------------*/
43
124
  /* W a t c h e r s */
@@ -61,9 +142,9 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
61
142
  */
62
143
  async collapseAll() {
63
144
  const ids = [];
64
- for (let i = 0; i < this.data.columns.length; i++) {
65
- const column = this.data.columns[i];
66
- const itemName = column.name;
145
+ for (let i = 0; i < this.data.length; i++) {
146
+ const node = this.data[i];
147
+ const itemName = node.id;
67
148
  if (!this.isItemExpandible(itemName) &&
68
149
  this.isItemSelected(itemName)) {
69
150
  ids.push(itemName);
@@ -76,9 +157,9 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
76
157
  */
77
158
  async expandAll() {
78
159
  const ids = [];
79
- for (let i = 0; i < this.data.columns.length; i++) {
80
- const column = this.data.columns[i];
81
- const itemName = column.name;
160
+ for (let i = 0; i < this.data.length; i++) {
161
+ const node = this.data[i];
162
+ const itemName = node.id;
82
163
  if (this.isItemExpandible(itemName)) {
83
164
  ids.push(itemName);
84
165
  }
@@ -110,27 +191,34 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
110
191
  * This method activates or deactivates an item
111
192
  * @param {string} itemName - Name of the item.
112
193
  */
113
- async toggleItem(itemName) {
114
- const isItemExpandible = this.isItemExpandible(itemName);
194
+ async toggleItem(node) {
115
195
  const ids = [...this.selectedItems];
116
- if (ids.includes(itemName)) {
117
- ids.splice(ids.indexOf(itemName), 1);
196
+ if (ids.includes(node.id)) {
197
+ ids.splice(ids.indexOf(node.id), 1);
118
198
  }
119
199
  else {
120
- ids.push(itemName);
200
+ ids.push(node.id);
121
201
  }
122
202
  this.selectedItems = ids;
123
- if (!isItemExpandible) {
124
- this.kupAccordionItemSelected.emit({
125
- comp: this,
126
- id: this.rootElement.id,
127
- itemName: itemName,
128
- });
129
- }
203
+ this.kupClick.emit({
204
+ comp: this,
205
+ id: this.rootElement.id,
206
+ node: node,
207
+ });
130
208
  }
131
209
  /*-------------------------------------------------*/
132
210
  /* P r i v a t e M e t h o d s */
133
211
  /*-------------------------------------------------*/
212
+ updateSelectedItems() {
213
+ const ids = [];
214
+ for (let i = 0; i < this.data.length; i++) {
215
+ const node = this.data[i];
216
+ if (node.contentVisible) {
217
+ ids.push(node.id);
218
+ }
219
+ }
220
+ this.selectedItems = ids;
221
+ }
134
222
  isItemExpandible(itemName) {
135
223
  return this.slotsNames.includes(itemName);
136
224
  }
@@ -138,6 +226,7 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
138
226
  return this.selectedItems.includes(itemName);
139
227
  }
140
228
  renderItems() {
229
+ var _a, _b;
141
230
  const items = [];
142
231
  const slots = Array.prototype.slice.call(this.rootElement.children, 0);
143
232
  this.slotsNames = [];
@@ -145,9 +234,9 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
145
234
  const slot = slots[index];
146
235
  this.slotsNames.push(slot.slot);
147
236
  }
148
- for (let i = 0; i < this.data.columns.length; i++) {
149
- const column = this.data.columns[i];
150
- const itemName = column.name;
237
+ for (let i = 0; i < this.data.length; i++) {
238
+ const node = this.data[i];
239
+ const itemName = node.id;
151
240
  const isItemSelected = this.isItemSelected(itemName);
152
241
  const isItemExpandible = this.isItemExpandible(itemName);
153
242
  const itemHeaderClass = {
@@ -163,10 +252,128 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
163
252
  ? true
164
253
  : false,
165
254
  };
166
- items.push(h("div", { class: "accordion-item" }, h("div", { tabindex: "1", title: column.title, class: itemHeaderClass, onClick: () => this.toggleItem(itemName) }, column.icon ? (h(FImage, { color: `var(${KupThemeColorValues.ICON})`, resource: column.icon, sizeX: "1.5em", sizeY: "1.5em", wrapperClass: "accordion-item__icon" })) : null, h("span", { class: "accordion-item__text" }, column.title), isItemExpandible ? (h("span", { class: `accordion-item__dropdown kup-icon ${KupThemeIconValues.DROPDOWN.replace('--', '')}` })) : null), h("div", { class: itemContentClass }, h("slot", { name: column.name }))));
255
+ const wrapper = (h("div", { class: "accordion-rigtbuttons" }, this.infoIcon && (h(FImage, { resource: "info_outline", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
256
+ event.stopPropagation();
257
+ const el = event.currentTarget;
258
+ const data = await this.infoCallback();
259
+ this.infoState = data;
260
+ if (this.infoState.length > 0) {
261
+ this.onKupInfoIconClick(el);
262
+ }
263
+ else {
264
+ this.kupManager.debug.logMessage(this, 'InfoIcon data is empty, not opening dropdown.');
265
+ }
266
+ }, wrapperClass: "tab__iconToolbar iconInfo" })), this.toolbar && (h(FImage, { resource: "more_vert", sizeX: "16px", sizeY: "16px", onClick: async (event) => {
267
+ event.stopPropagation();
268
+ const el = event.currentTarget;
269
+ const data = await this.toolbarCallback();
270
+ this.toolbarState = data;
271
+ if (this.toolbarState.length > 0) {
272
+ this.onKupIconClick(el);
273
+ }
274
+ else {
275
+ this.kupManager.debug.logMessage(this, 'Toolbar data is empty, not opening dropdown.');
276
+ }
277
+ }, wrapperClass: "tab__iconToolbar iconToolbar" })), isItemExpandible ? (h("div", { class: `accordion-item__dropdown kup-icon ${KupThemeIconValues.DROPDOWN.replace('--', '')}` })) : null));
278
+ items.push(h("div", { class: "accordion-item" }, h("div", { tabindex: i, title: (_a = node.title) !== null && _a !== void 0 ? _a : null, class: itemHeaderClass, onClick: () => this.toggleItem(node), onBlur: () => this.onKupBlur(node),
279
+ // onClick={() => this.onKupClick(i, node)}
280
+ onFocus: () => this.onKupFocus(node) }, node.icon ? (h(FImage, { color: `var(${KupThemeColorValues.PRIMARY})`, resource: node.icon, placeholderResource: node.placeholderIcon, sizeX: "1.5em", sizeY: "1.5em", wrapperClass: "accordion-item__icon" })) : null, node.value ? (h("span", { class: "accordion-item__text" }, (_b = node.value) !== null && _b !== void 0 ? _b : '')) : null, wrapper), h("div", { class: itemContentClass }, h("slot", { name: node.id }))));
167
281
  }
168
282
  return items;
169
283
  }
284
+ closeRowToolbarList() {
285
+ if (this.toolbarList) {
286
+ this.kupManager.dynamicPosition.stop(this.toolbarList);
287
+ this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"));
288
+ this.toolbarList.remove();
289
+ this.kupManager.dynamicPosition.unregister([this.toolbarList]);
290
+ this.toolbarList = null;
291
+ }
292
+ }
293
+ /**
294
+ * Create dropdown list for toolbar
295
+ */
296
+ createDropDownToolbarList() {
297
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
298
+ this.kupManager.debug.logMessage(this, 'createDropDownToolbarList: Anchor is null!');
299
+ return;
300
+ }
301
+ if (this.toolbarList) {
302
+ this.closeRowToolbarList();
303
+ }
304
+ if (this.toolbarState.length === 0) {
305
+ this.kupManager.debug.logMessage(this, 'No toolbar state available.');
306
+ return;
307
+ }
308
+ const listEl = document.createElement('kup-toolbar');
309
+ listEl.data = this.toolbarState;
310
+ listEl.addEventListener('kup-toolbar-click', (e) => {
311
+ this.onKupToolbarItemClick(e);
312
+ setTimeout(() => {
313
+ this.closeRowToolbarList();
314
+ }, 0);
315
+ });
316
+ this.toolbarList = listEl;
317
+ __classPrivateFieldSet(this, _KupAccordion_clickCbDropCard, {
318
+ cb: () => {
319
+ this.closeRowToolbarList();
320
+ },
321
+ el: this.toolbarList,
322
+ }, "f");
323
+ this.kupManager.addClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"), true);
324
+ this.rootElement.shadowRoot.appendChild(this.toolbarList);
325
+ requestAnimationFrame(() => {
326
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
327
+ this.kupManager.debug.logMessage(this, 'DropDown anchor is still null after delay!');
328
+ return;
329
+ }
330
+ this.kupManager.dynamicPosition.register(this.toolbarList, __classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
331
+ this.kupManager.dynamicPosition.start(this.toolbarList);
332
+ });
333
+ }
334
+ /**
335
+ * Create dropdown list for tab info icon
336
+ */
337
+ createDropDownInfoList() {
338
+ if (!__classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f")) {
339
+ this.kupManager.debug.logMessage(this, 'createDropDownToolbarList: Anchor is null!');
340
+ return;
341
+ }
342
+ if (this.infoList) {
343
+ this.closeInfoDataList();
344
+ }
345
+ if (this.infoState.length === 0) {
346
+ this.kupManager.debug.logMessage(this, 'No toolbar state available.');
347
+ return;
348
+ }
349
+ const listEl = document.createElement('kup-list');
350
+ listEl.data = this.infoState;
351
+ this.infoList = listEl;
352
+ __classPrivateFieldSet(this, _KupAccordion_clickCbDropCard, {
353
+ cb: () => {
354
+ this.closeInfoDataList();
355
+ },
356
+ el: this.infoList,
357
+ }, "f");
358
+ this.kupManager.addClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"), true);
359
+ this.rootElement.shadowRoot.appendChild(this.infoList);
360
+ requestAnimationFrame(() => {
361
+ this.kupManager.dynamicPosition.register(this.infoList, __classPrivateFieldGet(this, _KupAccordion_dropDownActionCardAnchor, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
362
+ this.kupManager.dynamicPosition.start(this.infoList);
363
+ });
364
+ }
365
+ /**
366
+ * Destroy dropdown list for tab info icon
367
+ */
368
+ closeInfoDataList() {
369
+ if (this.infoList) {
370
+ this.kupManager.dynamicPosition.stop(this.infoList);
371
+ this.kupManager.removeClickCallback(__classPrivateFieldGet(this, _KupAccordion_clickCbDropCard, "f"));
372
+ this.infoList.remove();
373
+ this.kupManager.dynamicPosition.unregister([this.infoList]);
374
+ this.infoList = null;
375
+ }
376
+ }
170
377
  /*-------------------------------------------------*/
171
378
  /* L i f e c y c l e H o o k s */
172
379
  /*-------------------------------------------------*/
@@ -175,6 +382,7 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
175
382
  this.kupManager.theme.register(this);
176
383
  }
177
384
  componentDidLoad() {
385
+ this.updateSelectedItems();
178
386
  this.applyRipple();
179
387
  this.kupManager.debug.logLoad(this, true);
180
388
  }
@@ -194,8 +402,8 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
194
402
  this.kupManager.debug.logRender(this, true);
195
403
  }
196
404
  render() {
197
- const content = this.data && this.data.columns ? this.renderItems() : null;
198
- return (h(Host, { key: 'e833d2f12eaadc0a52bbfa292e29c92e3a7d737c' }, h("style", { key: '93b4315cd2a0f9834ec9f4cf70c0c2cf6baf91cb' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: 'a9cbd70c8e08f1b00cdee843c8b34540e49a7541', id: componentWrapperId }, h("div", { key: '9ddf2bd8d16f97c3004948e31dcd2bb17ee155b6', class: "accordion" }, content))));
405
+ const content = this.data && this.data.length ? this.renderItems() : null;
406
+ return (h(Host, { key: '1eab0235eab32cfa1132d4f918b56e2788f10e3e' }, h("style", { key: '5562ce0c27752221054bfe75c5bc0fa73483c551' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: '8023ab06eb1040fd72788e4e94f8cf520da31a12', id: componentWrapperId }, h("div", { key: '8cfc0ba359969c76ff2dab13ed3c80f3e03e5828', class: "accordion" }, content))));
199
407
  }
200
408
  disconnectedCallback() {
201
409
  this.kupManager.theme.unregister(this);
@@ -208,8 +416,12 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
208
416
  }, [1, "kup-accordion", {
209
417
  "customStyle": [1, "custom-style"],
210
418
  "data": [16],
419
+ "infoIcon": [4, "info-icon"],
211
420
  "ripple": [4],
421
+ "toolbar": [4],
212
422
  "sizing": [1],
423
+ "toolbarCallback": [16],
424
+ "infoCallback": [16],
213
425
  "selectedItems": [32],
214
426
  "collapseAll": [64],
215
427
  "expandAll": [64],
@@ -220,6 +432,7 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
220
432
  }, undefined, {
221
433
  "ripple": ["applyRipple"]
222
434
  }]);
435
+ _KupAccordion_clickCbDropCard = new WeakMap(), _KupAccordion_dropDownActionCardAnchor = new WeakMap();
223
436
  function defineCustomElement$1() {
224
437
  if (typeof customElements === "undefined") {
225
438
  return;
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, F as Fragment, d as Host } from './p-ef8cbd35.js';
2
- import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-73922583.js';
3
- import { c as componentWrapperId, E as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, F as FImage } from './p-c50f899f.js';
2
+ import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-04bdcde6.js';
3
+ import { c as componentWrapperId, E as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, F as FImage } from './p-889cc2bc.js';
4
4
 
5
5
  var KupActivityTimelineProps;
6
6
  (function (KupActivityTimelineProps) {
@@ -1,4 +1,4 @@
1
- import { K as KupAutocomplete$1, D as defineCustomElement$1 } from './p-c50f899f.js';
1
+ import { K as KupAutocomplete$1, D as defineCustomElement$1 } from './p-889cc2bc.js';
2
2
 
3
3
  const KupAutocomplete = KupAutocomplete$1;
4
4
  const defineCustomElement = defineCustomElement$1;