@sme.up/ketchup 11.0.0-SNAPSHOT-20241107091530 → 11.0.0-SNAPSHOT-20241107165833

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 (184) hide show
  1. package/dist/cjs/{f-cell-32c25f65.js → f-cell-6c56dc27.js} +4 -4
  2. package/dist/cjs/{f-cell-32c25f65.js.map → f-cell-6c56dc27.js.map} +1 -1
  3. package/dist/cjs/{f-chip-3118b9ba.js → f-chip-ba07ec67.js} +2 -2
  4. package/dist/cjs/{f-chip-3118b9ba.js.map → f-chip-ba07ec67.js.map} +1 -1
  5. package/dist/cjs/{f-paginator-utils-3099b4b3.js → f-paginator-utils-34835b29.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-3099b4b3.js.map → f-paginator-utils-34835b29.js.map} +1 -1
  7. package/dist/cjs/{f-text-field-1ced2cfa.js → f-text-field-e1540ae4.js} +2 -2
  8. package/dist/cjs/{f-text-field-1ced2cfa.js.map → f-text-field-e1540ae4.js.map} +1 -1
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/ketchup.cjs.js +1 -1
  11. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  12. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  13. package/dist/cjs/kup-autocomplete_28.cjs.entry.js +6 -6
  14. package/dist/cjs/kup-box.cjs.entry.js +6 -6
  15. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-cell.cjs.entry.js +4 -4
  18. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  19. package/dist/cjs/{kup-data-table-helper-457ee6aa.js → kup-data-table-helper-ca99429e.js} +2 -2
  20. package/dist/cjs/{kup-data-table-helper-457ee6aa.js.map → kup-data-table-helper-ca99429e.js.map} +1 -1
  21. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-htm.cjs.entry.js +1 -1
  27. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
  29. package/dist/cjs/kup-input-panel.cjs.entry.js +23 -12
  30. package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
  31. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  33. package/dist/cjs/{kup-manager-65839aad.js → kup-manager-458527e9.js} +2 -2
  34. package/dist/cjs/kup-manager-458527e9.js.map +1 -0
  35. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  37. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  38. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  39. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  40. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  41. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  42. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  43. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  44. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  45. package/dist/cjs/loader.cjs.js +1 -1
  46. package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js.map +1 -1
  47. package/dist/collection/components/kup-input-panel/kup-input-panel.css +4 -0
  48. package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +68 -20
  49. package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js.map +1 -1
  50. package/dist/collection/components/kup-input-panel/kup-input-panel.js +19 -7
  51. package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
  52. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
  53. package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js.map +1 -1
  54. package/dist/components/kup-input-panel.js +20 -8
  55. package/dist/components/kup-input-panel.js.map +1 -1
  56. package/dist/components/kup-manager.js +1 -1
  57. package/dist/components/kup-manager.js.map +1 -1
  58. package/dist/esm/{f-cell-678a99c3.js → f-cell-dc6e3d13.js} +4 -4
  59. package/dist/esm/{f-cell-678a99c3.js.map → f-cell-dc6e3d13.js.map} +1 -1
  60. package/dist/esm/{f-chip-b0b7b121.js → f-chip-ba5e40f4.js} +2 -2
  61. package/dist/esm/{f-chip-b0b7b121.js.map → f-chip-ba5e40f4.js.map} +1 -1
  62. package/dist/esm/{f-paginator-utils-56f66406.js → f-paginator-utils-6283a294.js} +2 -2
  63. package/dist/esm/{f-paginator-utils-56f66406.js.map → f-paginator-utils-6283a294.js.map} +1 -1
  64. package/dist/esm/{f-text-field-73c20614.js → f-text-field-7ceb0591.js} +2 -2
  65. package/dist/esm/{f-text-field-73c20614.js.map → f-text-field-7ceb0591.js.map} +1 -1
  66. package/dist/esm/index.js +1 -1
  67. package/dist/esm/ketchup.js +1 -1
  68. package/dist/esm/kup-accordion.entry.js +1 -1
  69. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  70. package/dist/esm/kup-autocomplete_28.entry.js +6 -6
  71. package/dist/esm/kup-box.entry.js +6 -6
  72. package/dist/esm/kup-calendar.entry.js +2 -2
  73. package/dist/esm/kup-card-list.entry.js +1 -1
  74. package/dist/esm/kup-cell.entry.js +4 -4
  75. package/dist/esm/kup-dashboard.entry.js +2 -2
  76. package/dist/esm/{kup-data-table-helper-1333a2f8.js → kup-data-table-helper-353a9675.js} +2 -2
  77. package/dist/esm/{kup-data-table-helper-1333a2f8.js.map → kup-data-table-helper-353a9675.js.map} +1 -1
  78. package/dist/esm/kup-drawer.entry.js +1 -1
  79. package/dist/esm/kup-echart.entry.js +1 -1
  80. package/dist/esm/kup-editor.entry.js +1 -1
  81. package/dist/esm/kup-family-tree.entry.js +1 -1
  82. package/dist/esm/kup-grid.entry.js +1 -1
  83. package/dist/esm/kup-htm.entry.js +1 -1
  84. package/dist/esm/kup-iframe.entry.js +1 -1
  85. package/dist/esm/kup-image-list.entry.js +4 -4
  86. package/dist/esm/kup-input-panel.entry.js +23 -12
  87. package/dist/esm/kup-input-panel.entry.js.map +1 -1
  88. package/dist/esm/kup-lazy.entry.js +1 -1
  89. package/dist/esm/kup-magic-box.entry.js +1 -1
  90. package/dist/esm/{kup-manager-c6f89439.js → kup-manager-f28f3f94.js} +2 -2
  91. package/dist/esm/{kup-manager-c6f89439.js.map → kup-manager-f28f3f94.js.map} +1 -1
  92. package/dist/esm/kup-nav-bar.entry.js +1 -1
  93. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  94. package/dist/esm/kup-pdf.entry.js +1 -1
  95. package/dist/esm/kup-photo-frame.entry.js +1 -1
  96. package/dist/esm/kup-planner.entry.js +2 -2
  97. package/dist/esm/kup-probe.entry.js +1 -1
  98. package/dist/esm/kup-qlik.entry.js +1 -1
  99. package/dist/esm/kup-snackbar.entry.js +1 -1
  100. package/dist/esm/kup-typography-list.entry.js +1 -1
  101. package/dist/esm/kup-typography.entry.js +1 -1
  102. package/dist/esm/loader.js +1 -1
  103. package/dist/ketchup/index.esm.js +1 -1
  104. package/dist/ketchup/ketchup.esm.js +1 -1
  105. package/dist/ketchup/ketchup.esm.js.map +1 -1
  106. package/dist/ketchup/p-04c25532.entry.js +2 -0
  107. package/dist/ketchup/{p-197aa6ed.entry.js.map → p-04c25532.entry.js.map} +1 -1
  108. package/dist/ketchup/{p-f8fe5435.entry.js → p-057f17e6.entry.js} +2 -2
  109. package/dist/ketchup/{p-634b3510.entry.js → p-0b1e37b8.entry.js} +2 -2
  110. package/dist/ketchup/{p-d336255f.js → p-1362560b.js} +2 -2
  111. package/dist/ketchup/{p-9b0551b5.js → p-170d2abd.js} +2 -2
  112. package/dist/ketchup/{p-a496ba6a.entry.js → p-2a6bb010.entry.js} +2 -2
  113. package/dist/ketchup/{p-65780ddc.entry.js → p-2d68ffb5.entry.js} +2 -2
  114. package/dist/ketchup/{p-7f762e33.entry.js → p-3338a656.entry.js} +2 -2
  115. package/dist/ketchup/{p-42ea84f3.entry.js → p-37d71bc6.entry.js} +2 -2
  116. package/dist/ketchup/{p-dd816cfe.entry.js → p-3a2a4de6.entry.js} +2 -2
  117. package/dist/ketchup/{p-a3b1896e.entry.js → p-43b236fe.entry.js} +2 -2
  118. package/dist/ketchup/{p-f073ce49.entry.js → p-4a39ec70.entry.js} +2 -2
  119. package/dist/ketchup/{p-256ca361.entry.js → p-5655beb9.entry.js} +2 -2
  120. package/dist/ketchup/{p-6e4b8f6d.entry.js → p-5da3d8ef.entry.js} +2 -2
  121. package/dist/ketchup/{p-e545ca7b.entry.js → p-64ae9a7d.entry.js} +2 -2
  122. package/dist/ketchup/{p-ebdf1442.entry.js → p-75e96ca0.entry.js} +2 -2
  123. package/dist/ketchup/p-81285484.js +29 -0
  124. package/dist/{cjs/kup-manager-65839aad.js.map → ketchup/p-81285484.js.map} +1 -1
  125. package/dist/ketchup/{p-2b14f215.js → p-854b53fb.js} +2 -2
  126. package/dist/ketchup/{p-0efc24e7.entry.js → p-8e04c2fd.entry.js} +2 -2
  127. package/dist/ketchup/{p-b05c0af5.entry.js → p-92fcbf1a.entry.js} +2 -2
  128. package/dist/ketchup/{p-07e7fade.entry.js → p-947559c9.entry.js} +2 -2
  129. package/dist/ketchup/{p-3e9957c1.entry.js → p-98e9e968.entry.js} +2 -2
  130. package/dist/ketchup/{p-69ada7f9.entry.js → p-99813847.entry.js} +2 -2
  131. package/dist/ketchup/{p-d1fc3c35.entry.js → p-aab21af5.entry.js} +2 -2
  132. package/dist/ketchup/p-b412ff9f.entry.js +2 -0
  133. package/dist/ketchup/p-b412ff9f.entry.js.map +1 -0
  134. package/dist/ketchup/{p-5184497b.entry.js → p-b9f36550.entry.js} +2 -2
  135. package/dist/ketchup/p-ba1eb179.js +2 -0
  136. package/dist/ketchup/{p-00286291.entry.js → p-baaf5cdc.entry.js} +2 -2
  137. package/dist/ketchup/{p-ddc78c64.entry.js → p-c4d94b5d.entry.js} +2 -2
  138. package/dist/ketchup/{p-b947f411.entry.js → p-d1a9c9a1.entry.js} +2 -2
  139. package/dist/ketchup/{p-31d98241.entry.js → p-d3e76f80.entry.js} +2 -2
  140. package/dist/ketchup/{p-784120c9.entry.js → p-ddee8c53.entry.js} +2 -2
  141. package/dist/ketchup/{p-dfaaabb5.entry.js → p-de9c014f.entry.js} +2 -2
  142. package/dist/ketchup/{p-e34f8755.entry.js → p-fbd5c6f3.entry.js} +2 -2
  143. package/dist/ketchup/{p-49485bbf.js → p-fcfc07e1.js} +2 -2
  144. package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +9 -0
  145. package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +5 -0
  146. package/package.json +1 -1
  147. package/dist/ketchup/p-197aa6ed.entry.js +0 -2
  148. package/dist/ketchup/p-4d6644f0.entry.js +0 -2
  149. package/dist/ketchup/p-4d6644f0.entry.js.map +0 -1
  150. package/dist/ketchup/p-e9985f62.js +0 -2
  151. package/dist/ketchup/p-f98dc5f6.js +0 -29
  152. package/dist/ketchup/p-f98dc5f6.js.map +0 -1
  153. /package/dist/ketchup/{p-f8fe5435.entry.js.map → p-057f17e6.entry.js.map} +0 -0
  154. /package/dist/ketchup/{p-634b3510.entry.js.map → p-0b1e37b8.entry.js.map} +0 -0
  155. /package/dist/ketchup/{p-d336255f.js.map → p-1362560b.js.map} +0 -0
  156. /package/dist/ketchup/{p-9b0551b5.js.map → p-170d2abd.js.map} +0 -0
  157. /package/dist/ketchup/{p-a496ba6a.entry.js.map → p-2a6bb010.entry.js.map} +0 -0
  158. /package/dist/ketchup/{p-65780ddc.entry.js.map → p-2d68ffb5.entry.js.map} +0 -0
  159. /package/dist/ketchup/{p-7f762e33.entry.js.map → p-3338a656.entry.js.map} +0 -0
  160. /package/dist/ketchup/{p-42ea84f3.entry.js.map → p-37d71bc6.entry.js.map} +0 -0
  161. /package/dist/ketchup/{p-dd816cfe.entry.js.map → p-3a2a4de6.entry.js.map} +0 -0
  162. /package/dist/ketchup/{p-a3b1896e.entry.js.map → p-43b236fe.entry.js.map} +0 -0
  163. /package/dist/ketchup/{p-f073ce49.entry.js.map → p-4a39ec70.entry.js.map} +0 -0
  164. /package/dist/ketchup/{p-256ca361.entry.js.map → p-5655beb9.entry.js.map} +0 -0
  165. /package/dist/ketchup/{p-6e4b8f6d.entry.js.map → p-5da3d8ef.entry.js.map} +0 -0
  166. /package/dist/ketchup/{p-e545ca7b.entry.js.map → p-64ae9a7d.entry.js.map} +0 -0
  167. /package/dist/ketchup/{p-ebdf1442.entry.js.map → p-75e96ca0.entry.js.map} +0 -0
  168. /package/dist/ketchup/{p-2b14f215.js.map → p-854b53fb.js.map} +0 -0
  169. /package/dist/ketchup/{p-0efc24e7.entry.js.map → p-8e04c2fd.entry.js.map} +0 -0
  170. /package/dist/ketchup/{p-b05c0af5.entry.js.map → p-92fcbf1a.entry.js.map} +0 -0
  171. /package/dist/ketchup/{p-07e7fade.entry.js.map → p-947559c9.entry.js.map} +0 -0
  172. /package/dist/ketchup/{p-3e9957c1.entry.js.map → p-98e9e968.entry.js.map} +0 -0
  173. /package/dist/ketchup/{p-69ada7f9.entry.js.map → p-99813847.entry.js.map} +0 -0
  174. /package/dist/ketchup/{p-d1fc3c35.entry.js.map → p-aab21af5.entry.js.map} +0 -0
  175. /package/dist/ketchup/{p-5184497b.entry.js.map → p-b9f36550.entry.js.map} +0 -0
  176. /package/dist/ketchup/{p-e9985f62.js.map → p-ba1eb179.js.map} +0 -0
  177. /package/dist/ketchup/{p-00286291.entry.js.map → p-baaf5cdc.entry.js.map} +0 -0
  178. /package/dist/ketchup/{p-ddc78c64.entry.js.map → p-c4d94b5d.entry.js.map} +0 -0
  179. /package/dist/ketchup/{p-b947f411.entry.js.map → p-d1a9c9a1.entry.js.map} +0 -0
  180. /package/dist/ketchup/{p-31d98241.entry.js.map → p-d3e76f80.entry.js.map} +0 -0
  181. /package/dist/ketchup/{p-784120c9.entry.js.map → p-ddee8c53.entry.js.map} +0 -0
  182. /package/dist/ketchup/{p-dfaaabb5.entry.js.map → p-de9c014f.entry.js.map} +0 -0
  183. /package/dist/ketchup/{p-e34f8755.entry.js.map → p-fbd5c6f3.entry.js.map} +0 -0
  184. /package/dist/ketchup/{p-49485bbf.js.map → p-fcfc07e1.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-f98dc5f6.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
2
- //# sourceMappingURL=p-b05c0af5.entry.js.map
1
+ import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-81285484.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
2
+ //# sourceMappingURL=p-92fcbf1a.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,f as i,h as a,H as h,d as n}from"./p-d7c15b0e.js";import{k as o,g as s,s as p}from"./p-f98dc5f6.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var f;(function(e){e["componentName"]="Sets the tag name of the component to be lazy loaded.";e["customStyle"]="Custom style of the component.";e["data"]="Sets the data of the component to be lazy loaded.";e["showPlaceholder"]="Displays an animated SVG placeholder until the component is loaded."})(f||(f={}));var c;(function(e){e["VIEWPORT"]="viewport";e["PROPS"]="props";e["BOTH"]="both"})(c||(c={}));const d=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";const r=d;const g=class{constructor(i){e(this,i);this.kupLazyLoaded=t(this,"kup-lazy-loaded",6);this.intObserver=null;this.kupManager=o();this.lazyComponent=null;this.lazyComponentLoaded=false;this.isInViewport=false;this.componentName=null;this.customStyle="";this.data=null;this.renderMode=c.BOTH;this.showPlaceholder=true}async getProps(e){return s(this,f,e)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(e){p(this,f,e)}setObserver(){let e=e=>{e.forEach((e=>{if(e.isIntersecting){this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+".");this.isInViewport=true;this.intObserver.unobserve(this.rootElement)}}))};let t={threshold:.25};this.intObserver=new IntersectionObserver(e,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this);this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement);this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){if(this.lazyComponent&&!this.lazyComponentLoaded){this.lazyComponentLoaded=true;this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})}this.kupManager.debug.logRender(this,true)}render(){let e;let t;let i=this.componentName;switch(this.componentName){case"kup-button":t=a("svg",{key:"220fa65d9836c520dfed8e3dae2700c6b2b0cb9a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"1d1e33f3ed89c32e6ee9ad2b1996fb65037cc3f2",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":t=a("svg",{key:"d799cc013987de74e23c34201ecd2186c57b13f1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"de98ef94a3f714e45e56a02877d4a139a8804424",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":t=a("svg",{key:"26ad78503d5c00f5b902b2bddb782a14f1a13b73",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"03ae544d551c47e0dce8f8fbaa92b1a2a1024c55",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":t=a("svg",{key:"cc70b61653552ff28e1b6eda65ca7bec5bbbe7d2",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"f63b011d43b7c6649e1392de9426b325259e9f38",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":t=a("svg",{key:"3c6218a9e78c22aa2cfdd787a77fd7575409b926",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"28aaf9eb0e27fd2ad901866bd1f93ff181eba283",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":t=a("svg",{key:"695002a63b98d0c090f350df167e2dec9b85c8f6",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"160f2450a206b3da182ef9514e41d0e9cfebd7dd",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":t=a("svg",{key:"e7f09d307522f61e8448975f881fb435f0c585bd",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"2ad28af4bed1da877edb16db6acdc392bfbfb47b",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":t=a("svg",{key:"c60a5e10b12c2945bdc8d0558d1fb9c46cb4ca90",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f016960b177263ba06c3b63c4761fef4a06a4fd3",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:t=a("svg",{key:"f221046bcd689deebeb597f557d547292518a34a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"8cd9ec1705efd526543348dcfe793c0705399482",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break}if(this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport){let t=this.componentName;e=a(t,Object.assign({key:"b856e5475a8fc048cf96c0ee534f17fa2ad261fe"},this.data,{ref:e=>this.lazyComponent=e}));i+=" kup-loaded"}else if(this.showPlaceholder){e=t;i+=" kup-to-be-loaded"}return a(h,{key:"de01035df24b5d3811ca54bb3840bf232287103d",class:i},a("style",{key:"db6f4fe85ed90c8a17b598a4805eff35fbfc11af"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"00c41dbaa1579061edf0b9472b19e6c5c8f24eb9",id:l},e))}disconnectedCallback(){var e;this.kupManager.theme.unregister(this);(e=this.intObserver)===null||e===void 0?void 0:e.unobserve(this.rootElement)}get rootElement(){return n(this)}};g.style=r;export{g as kup_lazy};
2
- //# sourceMappingURL=p-07e7fade.entry.js.map
1
+ import{r as e,c as t,f as i,h as a,H as h,d as n}from"./p-d7c15b0e.js";import{k as o,g as s,s as p}from"./p-81285484.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var f;(function(e){e["componentName"]="Sets the tag name of the component to be lazy loaded.";e["customStyle"]="Custom style of the component.";e["data"]="Sets the data of the component to be lazy loaded.";e["showPlaceholder"]="Displays an animated SVG placeholder until the component is loaded."})(f||(f={}));var c;(function(e){e["VIEWPORT"]="viewport";e["PROPS"]="props";e["BOTH"]="both"})(c||(c={}));const d=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";const r=d;const g=class{constructor(i){e(this,i);this.kupLazyLoaded=t(this,"kup-lazy-loaded",6);this.intObserver=null;this.kupManager=o();this.lazyComponent=null;this.lazyComponentLoaded=false;this.isInViewport=false;this.componentName=null;this.customStyle="";this.data=null;this.renderMode=c.BOTH;this.showPlaceholder=true}async getProps(e){return s(this,f,e)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(e){p(this,f,e)}setObserver(){let e=e=>{e.forEach((e=>{if(e.isIntersecting){this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+".");this.isInViewport=true;this.intObserver.unobserve(this.rootElement)}}))};let t={threshold:.25};this.intObserver=new IntersectionObserver(e,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this);this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement);this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){if(this.lazyComponent&&!this.lazyComponentLoaded){this.lazyComponentLoaded=true;this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})}this.kupManager.debug.logRender(this,true)}render(){let e;let t;let i=this.componentName;switch(this.componentName){case"kup-button":t=a("svg",{key:"220fa65d9836c520dfed8e3dae2700c6b2b0cb9a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"1d1e33f3ed89c32e6ee9ad2b1996fb65037cc3f2",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":t=a("svg",{key:"d799cc013987de74e23c34201ecd2186c57b13f1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"de98ef94a3f714e45e56a02877d4a139a8804424",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":t=a("svg",{key:"26ad78503d5c00f5b902b2bddb782a14f1a13b73",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"03ae544d551c47e0dce8f8fbaa92b1a2a1024c55",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":t=a("svg",{key:"cc70b61653552ff28e1b6eda65ca7bec5bbbe7d2",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"f63b011d43b7c6649e1392de9426b325259e9f38",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":t=a("svg",{key:"3c6218a9e78c22aa2cfdd787a77fd7575409b926",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"28aaf9eb0e27fd2ad901866bd1f93ff181eba283",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":t=a("svg",{key:"695002a63b98d0c090f350df167e2dec9b85c8f6",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"160f2450a206b3da182ef9514e41d0e9cfebd7dd",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":t=a("svg",{key:"e7f09d307522f61e8448975f881fb435f0c585bd",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"2ad28af4bed1da877edb16db6acdc392bfbfb47b",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":t=a("svg",{key:"c60a5e10b12c2945bdc8d0558d1fb9c46cb4ca90",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f016960b177263ba06c3b63c4761fef4a06a4fd3",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:t=a("svg",{key:"f221046bcd689deebeb597f557d547292518a34a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"8cd9ec1705efd526543348dcfe793c0705399482",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break}if(this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport){let t=this.componentName;e=a(t,Object.assign({key:"b856e5475a8fc048cf96c0ee534f17fa2ad261fe"},this.data,{ref:e=>this.lazyComponent=e}));i+=" kup-loaded"}else if(this.showPlaceholder){e=t;i+=" kup-to-be-loaded"}return a(h,{key:"de01035df24b5d3811ca54bb3840bf232287103d",class:i},a("style",{key:"db6f4fe85ed90c8a17b598a4805eff35fbfc11af"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"00c41dbaa1579061edf0b9472b19e6c5c8f24eb9",id:l},e))}disconnectedCallback(){var e;this.kupManager.theme.unregister(this);(e=this.intObserver)===null||e===void 0?void 0:e.unobserve(this.rootElement)}get rootElement(){return n(this)}};g.style=r;export{g as kup_lazy};
2
+ //# sourceMappingURL=p-947559c9.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as n,f as i,h as e,H as s,d as o}from"./p-d7c15b0e.js";import{k as a,e as p,g as h,s as f}from"./p-f98dc5f6.js";import{F as l,a as r}from"./p-6568b295.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["data"]="prop of the sub compoennt";t["Style"]="it is the style of the text";t["Border"]="when true it will appear a border";t["BorderWidth"]="it is the width of the border";t["Align"]="text alignment";t["FontBold"]="when true it will display the bold font";t["FontItalic"]="when true it will display the italic ( cursive )";t["FontName"]="it is the name of the font";t["FontSize"]="it is the size of the font of the text";t["FontULine"]="when true it will show the underline";t["FontColor"]="it is the color of the font of the text";t["BackColor"]="it is the background color of the text";t["Type"]="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"})(u||(u={}));const g=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";const y=g;const d=class{constructor(i){t(this,i);this.kupIconClick=n(this,"kup-typographylist-icon-click",6);this.KupClick=n(this,"kup-typographylist-click",6);this.kupManager=a();this.customStyle="";this.data=[];this.type=l.BODY_COMPACT;this.toolbar=false}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){if(!t){t=[]}if(t.columns){this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING);const t=this.data;this.data=this.kupManager.data.row.toNode(t)}}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(t===null){this.kupManager.debug.logMessage(this,"Empty data text.",p.WARNING);return null}const i=this.prepareDataFromTreeNode(t,n);if(!i.value){this.kupManager.debug.logMessage(this,"Empty text.",p.WARNING);return null}const s={value:i.value,type:i.type,toolbar:i.toolbar};return e(r,Object.assign({},s))}prepareDataFromTreeNode(t,n){const i=t.data!=null?Object.assign({},t.data):{};if(this.customStyle!=null&&this.customStyle.trim()!=""){i.customStyle=this.customStyle}if(i.value==null){i.value=t.value}if(!i.wrapperClass){i.wrapperClass=""}if(this.type!=null){i.type=this.type}if(this.toolbar!=null){i.toolbar=this.toolbar}i.id=n.toString();return i}renderTypographys(){if(this.data==null||this.data.length<1){return null}const t=[];for(let n=0;n<this.data.length;n++){const i=this.data[n];let e=null;e=this.renderTypography(i,n);if(e){t.push(e)}}return t}getObjForEvent(t,n){let i=Number(t);let e=-1;if(n!=null&&n.trim()!=""){e=Number(n)}let s=this.data[i];if(e!=-1){return s.children[e].obj}return s.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.checkDataset(this.data);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){const t=this.renderTypographys();return e(s,{key:"46981c304431326dba88e74c82728878901d4798"},e("style",{key:"cc88981276ad23313705f5b88f0c183c550ddf9d"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"ac72ac801c7ebb49144f464fc66f49e2c955a46b",id:c},e("div",{key:"c2ad610309c33f5f0471f04b08864b57349800f5",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["checkDataset"]}}};d.style=y;export{d as kup_typography_list};
2
- //# sourceMappingURL=p-3e9957c1.entry.js.map
1
+ import{r as t,c as n,f as i,h as e,H as s,d as o}from"./p-d7c15b0e.js";import{k as a,e as p,g as h,s as f}from"./p-81285484.js";import{F as l,a as r}from"./p-6568b295.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["data"]="prop of the sub compoennt";t["Style"]="it is the style of the text";t["Border"]="when true it will appear a border";t["BorderWidth"]="it is the width of the border";t["Align"]="text alignment";t["FontBold"]="when true it will display the bold font";t["FontItalic"]="when true it will display the italic ( cursive )";t["FontName"]="it is the name of the font";t["FontSize"]="it is the size of the font of the text";t["FontULine"]="when true it will show the underline";t["FontColor"]="it is the color of the font of the text";t["BackColor"]="it is the background color of the text";t["Type"]="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"})(u||(u={}));const g=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";const y=g;const m=class{constructor(i){t(this,i);this.kupIconClick=n(this,"kup-typographylist-icon-click",6);this.KupClick=n(this,"kup-typographylist-click",6);this.kupManager=a();this.customStyle="";this.data=[];this.type=l.BODY_COMPACT;this.toolbar=false}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){if(!t){t=[]}if(t.columns){this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING);const t=this.data;this.data=this.kupManager.data.row.toNode(t)}}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(t===null){this.kupManager.debug.logMessage(this,"Empty data text.",p.WARNING);return null}const i=this.prepareDataFromTreeNode(t,n);if(!i.value){this.kupManager.debug.logMessage(this,"Empty text.",p.WARNING);return null}const s={value:i.value,type:i.type,toolbar:i.toolbar};return e(r,Object.assign({},s))}prepareDataFromTreeNode(t,n){const i=t.data!=null?Object.assign({},t.data):{};if(this.customStyle!=null&&this.customStyle.trim()!=""){i.customStyle=this.customStyle}if(i.value==null){i.value=t.value}if(!i.wrapperClass){i.wrapperClass=""}if(this.type!=null){i.type=this.type}if(this.toolbar!=null){i.toolbar=this.toolbar}i.id=n.toString();return i}renderTypographys(){if(this.data==null||this.data.length<1){return null}const t=[];for(let n=0;n<this.data.length;n++){const i=this.data[n];let e=null;e=this.renderTypography(i,n);if(e){t.push(e)}}return t}getObjForEvent(t,n){let i=Number(t);let e=-1;if(n!=null&&n.trim()!=""){e=Number(n)}let s=this.data[i];if(e!=-1){return s.children[e].obj}return s.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.checkDataset(this.data);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){const t=this.renderTypographys();return e(s,{key:"46981c304431326dba88e74c82728878901d4798"},e("style",{key:"cc88981276ad23313705f5b88f0c183c550ddf9d"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"ac72ac801c7ebb49144f464fc66f49e2c955a46b",id:c},e("div",{key:"c2ad610309c33f5f0471f04b08864b57349800f5",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["checkDataset"]}}};m.style=y;export{m as kup_typography_list};
2
+ //# sourceMappingURL=p-98e9e968.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,f as i,h as o,H as s,d as n}from"./p-d7c15b0e.js";import{k as r,y as a,g as l,s as h,a1 as c,v as p,h as u,b as d,e as f,N as b,R as x,au as g,V as m,E as k}from"./p-f98dc5f6.js";import{f as w,p as v,s as y}from"./p-d336255f.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-2b14f215.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-49485bbf.js";import{p as P,r as M,F as R}from"./p-e9985f62.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-9b0551b5.js";import"./p-cc32b7a2.js";import"./p-e3062c19.js";import"./p-d4a879fc.js";var I;(function(t){t["cardData"]="Data of the card linked to the box when the latter's layout must be a premade template.";t["columns"]="Number of columns.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the box.";t["dragEnabled"]="Enable dragging.";t["dropEnabled"]="Enable dropping.";t["dropOnSection"]="Drop can be done in section.";t["enableRowActions"]="If enabled, a button to load / display the row actions will be displayed on the right of every box.";t["globalFilter"]="When set to true it activates the global filter.";t["globalFilterValue"]="The value of the global filter.";t["kanban"]="Displays the boxlist as a Kanban.";t["layout"]="How the field will be displayed. If not present, a default one will be created.";t["lazyLoadRows"]="When set to true, extra rows will be automatically loaded once the last row enters the viewport.";t["loadMoreLimit"]="Sets a maximum limit of new records which can be required by the load more functionality.";t["loadMoreMode"]="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";t["loadMoreStep"]="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";t["multiSelection"]="Enable multi selection.";t["pageSelected"]="Current page number.";t["pagination"]="Enables pagination.";t["rowsPerPage"]="Number of current rows per page.";t["scrollOnHover"]="Activates the scroll on hover function.";t["selectBox"]="Automatically selects the box at the specified index.";t["selectedRowsState"]="Multiple selection.";t["showLoadMore"]="If set to true, displays the button to load more records.";t["showSelection"]="If enabled, highlights the selected box/boxes.";t["sortBy"]="If sorting is enabled, specifies which column to sort.";t["sortEnabled"]="Enable sorting.";t["stateId"]="";t["store"]="";t["swipeDisabled"]="Disable swipe."})(I||(I={}));var E;(function(t){t["CONSTANT"]="constant";t["CONSTANT_INCREMENT"]="constant_increment";t["PROGRESSIVE_THRESHOLD"]="progressive_threshold"})(E||(E={}));class S{constructor(){this.globalFilterValue="";this.sortBy="";this.selectedRowsState="";this.pageSelected=1;this.rowsPerPage=0;this.load=false;this.loadMoreLimit=1e3;this.showLoadMore=false}toDebugString(){return"box state"}}const O=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";const D=O;var W=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var B=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var T,$,L,F,H,N,G,V,q;const K=class{constructor(i){t(this,i);this.kupBoxClick=e(this,"kup-box-click",6);this.kupBoxSelected=e(this,"kup-box-selected",6);this.kupAutoBoxSelect=e(this,"kup-box-autoselect",6);this.kupRowActionMenuClick=e(this,"kup-box-rowactionmenuclick",6);this.kupRowActionClick=e(this,"kup-box-rowactionclick",6);this.kupDidLoad=e(this,"kup-box-didload",6);this.kupDidUnload=e(this,"kup-box-didunload",6);this.kupBoxContextMenu=e(this,"kup-box-contextmenu",6);this.kupLoadMoreClick=e(this,"kup-box-loadmoreclick",6);T.add(this);this.state=new S;this.kupManager=r();this.visibleColumns=[];this.rows=[];this.filteredRows=[];this.sectionRef=null;this.rowsRefs=[];this.hold=false;this.interactableDrag=[];this.interactableDrop=[];this.interactableTouch=[];$.set(this,undefined);L.set(this,[]);F.set(this,0);H.set(this,0);N.set(this,0);this.collapsedSection={};this.selectedRows=[];this.rowActionMenuOpened=undefined;this.currentPage=1;this.currentRowsPerPage=10;this.cardData=null;this.columns=1;this.customStyle="";this.data=null;this.dragEnabled=false;this.dropEnabled=false;this.dropOnSection=false;this.editableData=false;this.enableRowActions=false;this.globalFilter=false;this.globalFilterValue="";this.kanban=null;this.layout=undefined;this.lazyLoadRows=false;this.loadMoreLimit=1e3;this.loadMoreMode=E.PROGRESSIVE_THRESHOLD;this.loadMoreStep=60;this.multiSelection=false;this.pageSelected=1;this.pagination=false;this.rowsPerPage=undefined;this.scrollOnHover=false;this.selectBox=undefined;this.selectedRowsState=undefined;this.showLoadMore=false;this.showSelection=true;this.sortBy=undefined;this.sortEnabled=false;this.stateId="";this.store=undefined;this.swipeDisabled=false}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t);this.sortBy=this.state.sortBy;this.globalFilterValue=this.state.globalFilterValue;this.selectedRowsState=this.state.selectedRowsState;this.pageSelected=this.state.pageSelected;this.rowsPerPage=this.state.rowsPerPage;this.loadMoreLimit=t.loadMoreLimit;this.showLoadMore=t.showLoadMore}}}persistState(){if(this.store&&this.stateId){let t=false;if(!this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)){this.state.sortBy=this.sortBy;t=true}if(!this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)){this.state.globalFilterValue=this.globalFilterValue;t=true}if(!this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)){this.state.pageSelected=this.currentPage;t=true}if(!this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)){this.state.rowsPerPage=this.currentRowsPerPage;t=true}const e=this.selectedRows.reduce(((t,e,i)=>{const o=i>0?";":"";return t+o+e.id}),"");if(!this.kupManager.objects.deepEqual(this.state.selectedRowsState,e)){this.state.selectedRowsState=e;t=true}if(!this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)){this.state.loadMoreLimit=this.loadMoreLimit;t=true}if(!this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)){this.state.showLoadMore=this.showLoadMore;t=true}if(!this.state.load){this.state.load=true;return}if(t){this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state);this.store.persistState(this.stateId,this.state)}}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows());this.initVisibleColumns();this.initRows();this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,I,t)}async loadRowActions(t,e){t.actions=e;this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:undefined}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>{if(t.hasOwnProperty("visible")){return t.visible}return true}))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows();if(this.globalFilter&&this.globalFilterValue){this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)}this.rows=this.sortRows(this.filteredRows);if(this.pagination){this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,false)}}sortRows(t){let e=t;if(this.sortBy){e=y(e,this.toSortObjectList())}return e}toSortObjectList(){const t=this.sortBy.split("|").map((t=>{const e=t.split(",");const i={column:e[0],sortMode:e.length>1?c[e[1]]:c.A};return i}));return t}checkScrollOnHover(){if(this.boxContainer){if(!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)){if(this.scrollOnHover){this.kupManager.scrollOnHover.register(this.boxContainer)}}else{if(!this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}}}}checkLayout(){if(this.layout){this.boxLayout=this.layout;return}const t={horizontal:false,sections:[]};const e=this.visibleColumns;let i=e.length;let o=[];let s=0;while(i-- >0){o.push({column:e[s++].name})}t.content=o;this.boxLayout={sections:[t]}}onSortChange(t){let e=p(this.visibleColumns,t.detail.value);this.sortBy=e.name}onGlobalFilterChange({detail:t}){let e="";if(t&&t.value){e=t.value}this.globalFilterValue=e}isSectionExpanded(t,e){if(!t.id||!e.id){return false}return this.collapsedSection[e.id]&&this.collapsedSection[e.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows){if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,e){let i=null;let o=null;let s=null;let n=null;if(t){for(let e=t.length-1;e>=0;e--){let o=t[e];if(!o.tagName){continue}switch(o.tagName.toUpperCase()){default:{if(o.classList.contains("box-object")){i=o}if(!s&&o["data-row"]){s=o["data-row"]}break}}}}if(i){if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();o=t.cell;n=t.column;s=t.row}else{o=i["data-cell"];s=i["data-row"];n=p(this.visibleColumns,i.dataset.column)}}return{boxObject:i?i:null,column:n?n:null,cell:o?o:null,originalEvent:e,row:s?s:null}}clickHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);if(e.row){if(this.multiSelection){this.onSelectionCheckChange(e.row)}else{this.selectedRows=[e.row]}}return e}contextMenuHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return e}checkIfElementIsActionMenuIcon(t){if(t.tagName&&t.parentElement){return t.tagName==="svg"&&t.parentElement.classList.contains("row-actions-toggler")}return false}onSelectionCheckChange(t){var e=-1;for(let i=0;i<this.selectedRows.length;i++){const o=this.selectedRows[i];if(o.id===t.id){e=i;break}}if(e>=0){this.selectedRows.splice(e,1);this.selectedRows=[...this.selectedRows]}else{this.selectedRows=[...this.selectedRows,t]}this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,e){if(!e.id){console.error("cannot expand / collapse a section withoun an ID");return}if(!t.id){console.error("cannot expand / collapse a section of a row without ad id");return}if(!this.collapsedSection[e.id]){this.collapsedSection[e.id]={};this.collapsedSection[e.id][t.id]=true}else{const i=this.collapsedSection[e.id];if(!i[t.id]){i[t.id]=true}else{i[t.id]=!i[t.id]}}this.collapsedSection=Object.assign({},this.collapsedSection)}onRowAction(t){if(!t){return}if(t===this.rowActionMenuOpened){this.rowActionMenuOpened=null;return}if(t.actions){this.rowActionMenuOpened=t}else{this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t})}}onRowActionClick(t,e,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:e,index:i})}clickFunction(t){try{const e=t.composedPath();for(let t of e){if(this.checkIfElementIsActionMenuIcon(t)){return}}}catch(e){if(this.checkIfElementIsActionMenuIcon(t.target)){return}}this.rowActionMenuOpened=null}handlePageChange(t){const e=P(t,this.filteredRows.length,this.currentRowsPerPage);if(e){this.currentPage=e}}handleRowsPerPageChange(t){const e=M(t,this.filteredRows.length);if(e){this.currentRowsPerPage=e;this.adjustPaginator()}}adjustPaginator(){const t=this.rows.length;const e=Math.ceil(t/this.currentRowsPerPage);if(this.currentPage>e){this.currentPage=1}}renderSectionAsCard(t){let e=false;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let e=0;e<this.data.columns.length;e++){const o=this.data.columns[e];if(o.visible!==false){i.cell.push(t.cells[o.name]);i.columns.push(o)}}for(const e in t.cells){if(t.cells.hasOwnProperty(e)){const o=t.cells[e];if(o.cardID!==undefined&&o.obj){switch(o.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<o.cardID);i.button[o.cardID]={label:o.value};break;case"IMG":do{i.image.push({})}while(i.image.length<o.cardID);i.image[o.cardID]={resource:o.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<o.cardID);i.progressbar[o.cardID]={value:o.value};break;default:do{i.text.push("")}while(i.text.length<o.cardID);i.text[o.cardID]=o.value;break}}}}for(const o in t.cells){if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(s.cardID===undefined&&s.obj){e=false;switch(s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++){if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value};e=true;break}}if(!e){i.button.push({label:s.value})}break;case"IMG":for(let t=0;t<i.image.length;t++){if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value};e=true;break}}if(!e){i.image.push({resource:s.value})}break;case"PGB":for(let t=0;t<i.progressbar.length;t++){if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value};e=true;break}}if(!e){i.progressbar.push({value:s.value})}break;default:for(let t=0;t<i.text.length;t++){if(i.text[t]===""){i.text[t]=s.value;e=true;break}}if(!e){i.text.push(s.value)}break}}}}return o("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const e=[...this.visibleColumns];let i=null;let s=t.layout;if(!s){s=this.boxLayout}let n=false;if(s){if(s.horizontal){n=true}const o=s.sections;let r=o.length;let a=0;if(r>0){i=[]}const l={horizontal:n};while(r-- >0){if(this.cardData!==null&&this.cardData!==undefined&&typeof this.cardData==="object"){i.push(this.renderSectionAsCard(t))}else{i.push(this.renderSection(o[a++],l,t,e))}}}var r=false;for(let e of this.selectedRows){if(e.id===t.id){r=true}}let a=null;if(this.multiSelection){a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r}))}let l=null;if(this.enableRowActions&&!this.swipeDisabled){const e={"row-action-menu":true,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const e=t.actions.map(((e,i)=>{const s=`icon ${e.icon}`;return o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,e,i)},o("div",{class:s}),o("div",{class:"text"},e.text))}));i=o("ul",null,e)}l=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:e},i)))}let h=null;if(t.badgeData&&t.badgeData.length>0){h=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t["className"]?`centered ${t["className"]}`:"centered",imageData:t.imageData})))}const c={box:true,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n};const p=t.style||{};return o("div",{class:"box-wrapper",style:p,ref:t=>{if(t){W(this,L,"f").push(t)}}},o("div",{class:c,"data-row":t,ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,e,i,s){let n=null;if(t.sections&&t.sections.length>0){const e=t.sections;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderSection(e[r++],t,i,s))}}else if(t.content){const e=t.content;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderBoxObject({boxObject:e[r++],row:i,visibleColumns:s},true))}}else if(s.length>0){const t=s[0];n=this.renderBoxObject({boxObject:{column:t.name},row:i,visibleColumns:s})}const r=this.isSectionExpanded(i,t);const a=!!t.columns;const l={"box-section":true,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||t.sections.length===0};const h=t.style||{};if(t.dim&&e){h.flex=`0 0 ${t.dim}`;h.overflow="hidden";if(e.horizontal){h.maxWidth=t.dim}else{h.maxHeight=t.dim}}if(a){h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`}let c=null;if(t.collapsible){l["collapse-section"]=true;const e={content:true};let s="";if(t.title){s=t.title}else if(r){s=this.kupManager.language.translate(u.COLLAPSE)}else{s=this.kupManager.language.translate(u.EXPAND)}c=o("div",{class:l,style:h},o("div",{class:e},n),o("div",{class:"header",role:"button",onClick:e=>{e.stopPropagation();this.toggleSectionExpand(i,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${d.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const e=t.title?o("h3",null,t.title):null;c=o("div",{class:l,style:h},e,n)}return c}renderBoxObject({boxObject:t,row:e,visibleColumns:i},s){const n={"box-object":true};const r={};let a=null;let l=-1;for(let e=0;e<i.length;e++){const o=i[e];if(o.name===t.column){l=e;break}}if(l>=0){a=i[l];i.splice(l,1)}else if(s){a=this.data.columns.find((e=>e.name===t.column))}const h=e.cells[t.column];let c=undefined;if(h&&!this.kupManager.objects.isEmptyKupObj(h.obj)){n["is-obj"]=true;if(this.kupManager.debug.isDebug()){c=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"}}const p={cell:h,column:a,component:this,editable:this.editableData,renderKup:true,row:e,setSizes:true,shape:t.shape};return o("div",{"data-cell":h,"data-row":e,"data-column":t.column,class:n,style:r,title:c},h&&a?o(z,Object.assign({},p)):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||this.kanban.columns.length===0){this.kupManager.debug.logMessage(this,"No columns to group by detected.",f.ERROR);return{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(u.EMPTY_DATA)),style:{"grid-template-columns":`repeat(1, 1fr)`}}}const t=[];if(this.kanban.labels){for(let e=0;e<this.kanban.labels.length;e++){const i=this.kanban.labels[e];t.push({labels:i,nodes:[]})}}for(let e=0;e<this.rows.length;e++){let i=[];for(let t=0;t<this.kanban.columns.length;t++){try{i.push(this.rows[e].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,f.WARNING)}}const o={found:false,index:null};for(let e=0;e<t.length;e++){let s=t[e].labels;let n=true;for(let t=0;t<s.length;t++){if(i[t]!==s[t]){n=false;break}}if(n){o.found=true;o.index=e;break}}if(o.found){t[o.index].nodes.push(this.renderRow(this.rows[e]))}else{t.push({labels:i,nodes:[this.renderRow(this.rows[e])]})}}const e=[];for(let i=0;i<t.length;i++){const s=t[i].labels;const n={data:[]};for(let t=0;t<s.length;t++){n.data.push({value:s[t],id:s[t]})}e.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[i].nodes))}return{jsx:e,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer);const t=t=>{var e;if(this.hold){this.hold=false;return}switch(t.button){case 0:const i={};for(const e in t){i[e]=t[e]}const o=this.clickHandler(i);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:(e=o.column)===null||e===void 0?void 0:e.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)});break}};const e=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){this.hold=true;this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}};this.kupManager.interact.on(this.boxContainer,b.TAP,t);this.kupManager.interact.on(this.boxContainer,b.HOLD,e)}didRenderInteractables(){if(this.dragEnabled){for(let t=0;t<this.rowsRefs.length;t++){const e=this.rowsRefs[t];const i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};if(e&&!this.interactableDrag.includes(e)){this.interactableDrag.push(e);this.kupManager.interact.draggable(e,{allowFrom:".box-object",cursorChecker(){return null}},{callback:i},x.BADGE)}}}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t){this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",f.WARNING);return}const e=this.kupManager.getEventPath(t,this.rootElement);const i=this.getEventDetails(e);return{cell:i.cell,column:i.column,id:this.rootElement.id,row:i.row}};if(!this.interactableDrop.includes(this.sectionRef)){this.interactableDrop.push(this.sectionRef);this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX})}for(let e=0;e<this.rowsRefs.length;e++){const i=this.rowsRefs[e];if(i&&!this.interactableDrop.includes(i)){this.interactableDrop.push(i);this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX})}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);if(this.rowsPerPage){this.currentRowsPerPage=this.rowsPerPage}if(this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length){this.currentRowsPerPage=this.data.rows.length}this.kupManager.language.register(this);this.kupManager.theme.register(this);this.onDataChanged();this.adjustPaginator();if(document.querySelector(".header")){B(this,F,document.querySelector(".header").clientHeight,"f")}else{B(this,F,0,"f")}if(document.querySelector(".topbar")){B(this,F,W(this,F,"f")+document.querySelector(".topbar").clientHeight,"f")}W(this,T,"m",V).call(this)}componentDidLoad(){this.handleAutomaticBoxSelection();document.addEventListener("click",this.clickFunction.bind(this));this.currentPage=this.pageSelected;if(this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((e=>t.indexOf(e.id)>=0))}this.didLoadInteractables();this.kupDidLoad.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){A(e[t])}}this.checkScrollOnHover();this.persistState();this.didRenderInteractables();W(this,T,"m",G).call(this);this.kupManager.debug.logRender(this,true)}render(){B(this,L,[],"f");const t=!!(typeof this.kanban==="object"&&this.kanban!==null);let e=null;if(this.sortEnabled){const t=this.visibleColumns.map((t=>{const e={value:t.title,id:t.name,selected:t.name===this.sortBy};return e}));const i=[{value:"",id:""},...t];let s={label:this.kupManager.language.translate(u.SORT_BY),trailingIcon:true};let n={data:i,selectable:true};let r={"kup-text-field":s,"kup-list":n};e=o("div",{id:"sort-panel"},o("kup-combobox",{data:r,initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;if(this.globalFilter){i=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:true,label:this.kupManager.language.translate(k.SEARCH),icon:d.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout);this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}}))}let n=null;if(this.showLoadMore||!this.lazyLoadRows&&this.pagination){n=o(R,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{W(this,T,"m",q).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)})}let r=null;let a={};if(this.rows.length===0){r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(u.EMPTY_DATA)));a={"grid-template-columns":`repeat(1, 1fr)`}}else if(t){const t=this.kanbanMode();r=t.jsx;a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let e=t.length;let i=0;r=[];while(e-- >0){r.push(this.renderRow(t[i++]))}}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},e,i,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this);if(this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}document.removeEventListener("click",this.clickFunction.bind(this));this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};$=new WeakMap,L=new WeakMap,F=new WeakMap,H=new WeakMap,N=new WeakMap,T=new WeakSet,G=function t(){if(this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length){W(this,$,"f").observe(W(this,L,"f")[W(this,L,"f").length-1])}},V=function t(){const e=t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const e=this.data.rows.length-this.currentRowsPerPage;if(e<this.loadMoreStep){this.currentRowsPerPage+=e}else{this.currentRowsPerPage+=this.loadMoreStep}t.target.classList.remove("last-row");W(this,$,"f").unobserve(t.target)}}))};const i={threshold:0,rootMargin:"-"+W(this,F,"f")+"px 0px 0px 0px"};B(this,$,new IntersectionObserver(e,i),"f")},q=function t(){var e;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(W(this,H,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(W(this,N,"f"),this.loadMoreStep)*Math.min(W(this,H,"f")+1,2);break}if(i>this.loadMoreLimit){i=this.loadMoreLimit}this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i});B(this,N,i,"f");B(this,H,(e=W(this,H,"f"),e++,e),"f")};K.style=D;export{K as kup_box};
2
- //# sourceMappingURL=p-69ada7f9.entry.js.map
1
+ import{r as t,c as e,f as i,h as o,H as s,d as n}from"./p-d7c15b0e.js";import{k as r,y as a,g as l,s as h,a1 as c,v as p,h as u,b as d,e as f,N as b,R as x,au as g,V as m,E as k}from"./p-81285484.js";import{f as w,p as v,s as y}from"./p-1362560b.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-854b53fb.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-fcfc07e1.js";import{p as P,r as M,F as R}from"./p-ba1eb179.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-170d2abd.js";import"./p-cc32b7a2.js";import"./p-e3062c19.js";import"./p-d4a879fc.js";var I;(function(t){t["cardData"]="Data of the card linked to the box when the latter's layout must be a premade template.";t["columns"]="Number of columns.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the box.";t["dragEnabled"]="Enable dragging.";t["dropEnabled"]="Enable dropping.";t["dropOnSection"]="Drop can be done in section.";t["enableRowActions"]="If enabled, a button to load / display the row actions will be displayed on the right of every box.";t["globalFilter"]="When set to true it activates the global filter.";t["globalFilterValue"]="The value of the global filter.";t["kanban"]="Displays the boxlist as a Kanban.";t["layout"]="How the field will be displayed. If not present, a default one will be created.";t["lazyLoadRows"]="When set to true, extra rows will be automatically loaded once the last row enters the viewport.";t["loadMoreLimit"]="Sets a maximum limit of new records which can be required by the load more functionality.";t["loadMoreMode"]="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";t["loadMoreStep"]="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";t["multiSelection"]="Enable multi selection.";t["pageSelected"]="Current page number.";t["pagination"]="Enables pagination.";t["rowsPerPage"]="Number of current rows per page.";t["scrollOnHover"]="Activates the scroll on hover function.";t["selectBox"]="Automatically selects the box at the specified index.";t["selectedRowsState"]="Multiple selection.";t["showLoadMore"]="If set to true, displays the button to load more records.";t["showSelection"]="If enabled, highlights the selected box/boxes.";t["sortBy"]="If sorting is enabled, specifies which column to sort.";t["sortEnabled"]="Enable sorting.";t["stateId"]="";t["store"]="";t["swipeDisabled"]="Disable swipe."})(I||(I={}));var E;(function(t){t["CONSTANT"]="constant";t["CONSTANT_INCREMENT"]="constant_increment";t["PROGRESSIVE_THRESHOLD"]="progressive_threshold"})(E||(E={}));class S{constructor(){this.globalFilterValue="";this.sortBy="";this.selectedRowsState="";this.pageSelected=1;this.rowsPerPage=0;this.load=false;this.loadMoreLimit=1e3;this.showLoadMore=false}toDebugString(){return"box state"}}const O=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";const D=O;var W=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var B=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var T,$,L,F,H,N,G,V,q;const K=class{constructor(i){t(this,i);this.kupBoxClick=e(this,"kup-box-click",6);this.kupBoxSelected=e(this,"kup-box-selected",6);this.kupAutoBoxSelect=e(this,"kup-box-autoselect",6);this.kupRowActionMenuClick=e(this,"kup-box-rowactionmenuclick",6);this.kupRowActionClick=e(this,"kup-box-rowactionclick",6);this.kupDidLoad=e(this,"kup-box-didload",6);this.kupDidUnload=e(this,"kup-box-didunload",6);this.kupBoxContextMenu=e(this,"kup-box-contextmenu",6);this.kupLoadMoreClick=e(this,"kup-box-loadmoreclick",6);T.add(this);this.state=new S;this.kupManager=r();this.visibleColumns=[];this.rows=[];this.filteredRows=[];this.sectionRef=null;this.rowsRefs=[];this.hold=false;this.interactableDrag=[];this.interactableDrop=[];this.interactableTouch=[];$.set(this,undefined);L.set(this,[]);F.set(this,0);H.set(this,0);N.set(this,0);this.collapsedSection={};this.selectedRows=[];this.rowActionMenuOpened=undefined;this.currentPage=1;this.currentRowsPerPage=10;this.cardData=null;this.columns=1;this.customStyle="";this.data=null;this.dragEnabled=false;this.dropEnabled=false;this.dropOnSection=false;this.editableData=false;this.enableRowActions=false;this.globalFilter=false;this.globalFilterValue="";this.kanban=null;this.layout=undefined;this.lazyLoadRows=false;this.loadMoreLimit=1e3;this.loadMoreMode=E.PROGRESSIVE_THRESHOLD;this.loadMoreStep=60;this.multiSelection=false;this.pageSelected=1;this.pagination=false;this.rowsPerPage=undefined;this.scrollOnHover=false;this.selectBox=undefined;this.selectedRowsState=undefined;this.showLoadMore=false;this.showSelection=true;this.sortBy=undefined;this.sortEnabled=false;this.stateId="";this.store=undefined;this.swipeDisabled=false}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t);this.sortBy=this.state.sortBy;this.globalFilterValue=this.state.globalFilterValue;this.selectedRowsState=this.state.selectedRowsState;this.pageSelected=this.state.pageSelected;this.rowsPerPage=this.state.rowsPerPage;this.loadMoreLimit=t.loadMoreLimit;this.showLoadMore=t.showLoadMore}}}persistState(){if(this.store&&this.stateId){let t=false;if(!this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)){this.state.sortBy=this.sortBy;t=true}if(!this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)){this.state.globalFilterValue=this.globalFilterValue;t=true}if(!this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)){this.state.pageSelected=this.currentPage;t=true}if(!this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)){this.state.rowsPerPage=this.currentRowsPerPage;t=true}const e=this.selectedRows.reduce(((t,e,i)=>{const o=i>0?";":"";return t+o+e.id}),"");if(!this.kupManager.objects.deepEqual(this.state.selectedRowsState,e)){this.state.selectedRowsState=e;t=true}if(!this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)){this.state.loadMoreLimit=this.loadMoreLimit;t=true}if(!this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)){this.state.showLoadMore=this.showLoadMore;t=true}if(!this.state.load){this.state.load=true;return}if(t){this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state);this.store.persistState(this.stateId,this.state)}}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows());this.initVisibleColumns();this.initRows();this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,I,t)}async loadRowActions(t,e){t.actions=e;this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:undefined}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>{if(t.hasOwnProperty("visible")){return t.visible}return true}))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows();if(this.globalFilter&&this.globalFilterValue){this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)}this.rows=this.sortRows(this.filteredRows);if(this.pagination){this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,false)}}sortRows(t){let e=t;if(this.sortBy){e=y(e,this.toSortObjectList())}return e}toSortObjectList(){const t=this.sortBy.split("|").map((t=>{const e=t.split(",");const i={column:e[0],sortMode:e.length>1?c[e[1]]:c.A};return i}));return t}checkScrollOnHover(){if(this.boxContainer){if(!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)){if(this.scrollOnHover){this.kupManager.scrollOnHover.register(this.boxContainer)}}else{if(!this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}}}}checkLayout(){if(this.layout){this.boxLayout=this.layout;return}const t={horizontal:false,sections:[]};const e=this.visibleColumns;let i=e.length;let o=[];let s=0;while(i-- >0){o.push({column:e[s++].name})}t.content=o;this.boxLayout={sections:[t]}}onSortChange(t){let e=p(this.visibleColumns,t.detail.value);this.sortBy=e.name}onGlobalFilterChange({detail:t}){let e="";if(t&&t.value){e=t.value}this.globalFilterValue=e}isSectionExpanded(t,e){if(!t.id||!e.id){return false}return this.collapsedSection[e.id]&&this.collapsedSection[e.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows){if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,e){let i=null;let o=null;let s=null;let n=null;if(t){for(let e=t.length-1;e>=0;e--){let o=t[e];if(!o.tagName){continue}switch(o.tagName.toUpperCase()){default:{if(o.classList.contains("box-object")){i=o}if(!s&&o["data-row"]){s=o["data-row"]}break}}}}if(i){if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();o=t.cell;n=t.column;s=t.row}else{o=i["data-cell"];s=i["data-row"];n=p(this.visibleColumns,i.dataset.column)}}return{boxObject:i?i:null,column:n?n:null,cell:o?o:null,originalEvent:e,row:s?s:null}}clickHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);if(e.row){if(this.multiSelection){this.onSelectionCheckChange(e.row)}else{this.selectedRows=[e.row]}}return e}contextMenuHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return e}checkIfElementIsActionMenuIcon(t){if(t.tagName&&t.parentElement){return t.tagName==="svg"&&t.parentElement.classList.contains("row-actions-toggler")}return false}onSelectionCheckChange(t){var e=-1;for(let i=0;i<this.selectedRows.length;i++){const o=this.selectedRows[i];if(o.id===t.id){e=i;break}}if(e>=0){this.selectedRows.splice(e,1);this.selectedRows=[...this.selectedRows]}else{this.selectedRows=[...this.selectedRows,t]}this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,e){if(!e.id){console.error("cannot expand / collapse a section withoun an ID");return}if(!t.id){console.error("cannot expand / collapse a section of a row without ad id");return}if(!this.collapsedSection[e.id]){this.collapsedSection[e.id]={};this.collapsedSection[e.id][t.id]=true}else{const i=this.collapsedSection[e.id];if(!i[t.id]){i[t.id]=true}else{i[t.id]=!i[t.id]}}this.collapsedSection=Object.assign({},this.collapsedSection)}onRowAction(t){if(!t){return}if(t===this.rowActionMenuOpened){this.rowActionMenuOpened=null;return}if(t.actions){this.rowActionMenuOpened=t}else{this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t})}}onRowActionClick(t,e,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:e,index:i})}clickFunction(t){try{const e=t.composedPath();for(let t of e){if(this.checkIfElementIsActionMenuIcon(t)){return}}}catch(e){if(this.checkIfElementIsActionMenuIcon(t.target)){return}}this.rowActionMenuOpened=null}handlePageChange(t){const e=P(t,this.filteredRows.length,this.currentRowsPerPage);if(e){this.currentPage=e}}handleRowsPerPageChange(t){const e=M(t,this.filteredRows.length);if(e){this.currentRowsPerPage=e;this.adjustPaginator()}}adjustPaginator(){const t=this.rows.length;const e=Math.ceil(t/this.currentRowsPerPage);if(this.currentPage>e){this.currentPage=1}}renderSectionAsCard(t){let e=false;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let e=0;e<this.data.columns.length;e++){const o=this.data.columns[e];if(o.visible!==false){i.cell.push(t.cells[o.name]);i.columns.push(o)}}for(const e in t.cells){if(t.cells.hasOwnProperty(e)){const o=t.cells[e];if(o.cardID!==undefined&&o.obj){switch(o.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<o.cardID);i.button[o.cardID]={label:o.value};break;case"IMG":do{i.image.push({})}while(i.image.length<o.cardID);i.image[o.cardID]={resource:o.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<o.cardID);i.progressbar[o.cardID]={value:o.value};break;default:do{i.text.push("")}while(i.text.length<o.cardID);i.text[o.cardID]=o.value;break}}}}for(const o in t.cells){if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(s.cardID===undefined&&s.obj){e=false;switch(s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++){if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value};e=true;break}}if(!e){i.button.push({label:s.value})}break;case"IMG":for(let t=0;t<i.image.length;t++){if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value};e=true;break}}if(!e){i.image.push({resource:s.value})}break;case"PGB":for(let t=0;t<i.progressbar.length;t++){if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value};e=true;break}}if(!e){i.progressbar.push({value:s.value})}break;default:for(let t=0;t<i.text.length;t++){if(i.text[t]===""){i.text[t]=s.value;e=true;break}}if(!e){i.text.push(s.value)}break}}}}return o("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const e=[...this.visibleColumns];let i=null;let s=t.layout;if(!s){s=this.boxLayout}let n=false;if(s){if(s.horizontal){n=true}const o=s.sections;let r=o.length;let a=0;if(r>0){i=[]}const l={horizontal:n};while(r-- >0){if(this.cardData!==null&&this.cardData!==undefined&&typeof this.cardData==="object"){i.push(this.renderSectionAsCard(t))}else{i.push(this.renderSection(o[a++],l,t,e))}}}var r=false;for(let e of this.selectedRows){if(e.id===t.id){r=true}}let a=null;if(this.multiSelection){a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r}))}let l=null;if(this.enableRowActions&&!this.swipeDisabled){const e={"row-action-menu":true,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const e=t.actions.map(((e,i)=>{const s=`icon ${e.icon}`;return o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,e,i)},o("div",{class:s}),o("div",{class:"text"},e.text))}));i=o("ul",null,e)}l=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:e},i)))}let h=null;if(t.badgeData&&t.badgeData.length>0){h=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t["className"]?`centered ${t["className"]}`:"centered",imageData:t.imageData})))}const c={box:true,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n};const p=t.style||{};return o("div",{class:"box-wrapper",style:p,ref:t=>{if(t){W(this,L,"f").push(t)}}},o("div",{class:c,"data-row":t,ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,e,i,s){let n=null;if(t.sections&&t.sections.length>0){const e=t.sections;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderSection(e[r++],t,i,s))}}else if(t.content){const e=t.content;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderBoxObject({boxObject:e[r++],row:i,visibleColumns:s},true))}}else if(s.length>0){const t=s[0];n=this.renderBoxObject({boxObject:{column:t.name},row:i,visibleColumns:s})}const r=this.isSectionExpanded(i,t);const a=!!t.columns;const l={"box-section":true,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||t.sections.length===0};const h=t.style||{};if(t.dim&&e){h.flex=`0 0 ${t.dim}`;h.overflow="hidden";if(e.horizontal){h.maxWidth=t.dim}else{h.maxHeight=t.dim}}if(a){h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`}let c=null;if(t.collapsible){l["collapse-section"]=true;const e={content:true};let s="";if(t.title){s=t.title}else if(r){s=this.kupManager.language.translate(u.COLLAPSE)}else{s=this.kupManager.language.translate(u.EXPAND)}c=o("div",{class:l,style:h},o("div",{class:e},n),o("div",{class:"header",role:"button",onClick:e=>{e.stopPropagation();this.toggleSectionExpand(i,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${d.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const e=t.title?o("h3",null,t.title):null;c=o("div",{class:l,style:h},e,n)}return c}renderBoxObject({boxObject:t,row:e,visibleColumns:i},s){const n={"box-object":true};const r={};let a=null;let l=-1;for(let e=0;e<i.length;e++){const o=i[e];if(o.name===t.column){l=e;break}}if(l>=0){a=i[l];i.splice(l,1)}else if(s){a=this.data.columns.find((e=>e.name===t.column))}const h=e.cells[t.column];let c=undefined;if(h&&!this.kupManager.objects.isEmptyKupObj(h.obj)){n["is-obj"]=true;if(this.kupManager.debug.isDebug()){c=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"}}const p={cell:h,column:a,component:this,editable:this.editableData,renderKup:true,row:e,setSizes:true,shape:t.shape};return o("div",{"data-cell":h,"data-row":e,"data-column":t.column,class:n,style:r,title:c},h&&a?o(z,Object.assign({},p)):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||this.kanban.columns.length===0){this.kupManager.debug.logMessage(this,"No columns to group by detected.",f.ERROR);return{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(u.EMPTY_DATA)),style:{"grid-template-columns":`repeat(1, 1fr)`}}}const t=[];if(this.kanban.labels){for(let e=0;e<this.kanban.labels.length;e++){const i=this.kanban.labels[e];t.push({labels:i,nodes:[]})}}for(let e=0;e<this.rows.length;e++){let i=[];for(let t=0;t<this.kanban.columns.length;t++){try{i.push(this.rows[e].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,f.WARNING)}}const o={found:false,index:null};for(let e=0;e<t.length;e++){let s=t[e].labels;let n=true;for(let t=0;t<s.length;t++){if(i[t]!==s[t]){n=false;break}}if(n){o.found=true;o.index=e;break}}if(o.found){t[o.index].nodes.push(this.renderRow(this.rows[e]))}else{t.push({labels:i,nodes:[this.renderRow(this.rows[e])]})}}const e=[];for(let i=0;i<t.length;i++){const s=t[i].labels;const n={data:[]};for(let t=0;t<s.length;t++){n.data.push({value:s[t],id:s[t]})}e.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[i].nodes))}return{jsx:e,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer);const t=t=>{var e;if(this.hold){this.hold=false;return}switch(t.button){case 0:const i={};for(const e in t){i[e]=t[e]}const o=this.clickHandler(i);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:(e=o.column)===null||e===void 0?void 0:e.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)});break}};const e=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){this.hold=true;this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}};this.kupManager.interact.on(this.boxContainer,b.TAP,t);this.kupManager.interact.on(this.boxContainer,b.HOLD,e)}didRenderInteractables(){if(this.dragEnabled){for(let t=0;t<this.rowsRefs.length;t++){const e=this.rowsRefs[t];const i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};if(e&&!this.interactableDrag.includes(e)){this.interactableDrag.push(e);this.kupManager.interact.draggable(e,{allowFrom:".box-object",cursorChecker(){return null}},{callback:i},x.BADGE)}}}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t){this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",f.WARNING);return}const e=this.kupManager.getEventPath(t,this.rootElement);const i=this.getEventDetails(e);return{cell:i.cell,column:i.column,id:this.rootElement.id,row:i.row}};if(!this.interactableDrop.includes(this.sectionRef)){this.interactableDrop.push(this.sectionRef);this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX})}for(let e=0;e<this.rowsRefs.length;e++){const i=this.rowsRefs[e];if(i&&!this.interactableDrop.includes(i)){this.interactableDrop.push(i);this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX})}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);if(this.rowsPerPage){this.currentRowsPerPage=this.rowsPerPage}if(this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length){this.currentRowsPerPage=this.data.rows.length}this.kupManager.language.register(this);this.kupManager.theme.register(this);this.onDataChanged();this.adjustPaginator();if(document.querySelector(".header")){B(this,F,document.querySelector(".header").clientHeight,"f")}else{B(this,F,0,"f")}if(document.querySelector(".topbar")){B(this,F,W(this,F,"f")+document.querySelector(".topbar").clientHeight,"f")}W(this,T,"m",V).call(this)}componentDidLoad(){this.handleAutomaticBoxSelection();document.addEventListener("click",this.clickFunction.bind(this));this.currentPage=this.pageSelected;if(this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((e=>t.indexOf(e.id)>=0))}this.didLoadInteractables();this.kupDidLoad.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){A(e[t])}}this.checkScrollOnHover();this.persistState();this.didRenderInteractables();W(this,T,"m",G).call(this);this.kupManager.debug.logRender(this,true)}render(){B(this,L,[],"f");const t=!!(typeof this.kanban==="object"&&this.kanban!==null);let e=null;if(this.sortEnabled){const t=this.visibleColumns.map((t=>{const e={value:t.title,id:t.name,selected:t.name===this.sortBy};return e}));const i=[{value:"",id:""},...t];let s={label:this.kupManager.language.translate(u.SORT_BY),trailingIcon:true};let n={data:i,selectable:true};let r={"kup-text-field":s,"kup-list":n};e=o("div",{id:"sort-panel"},o("kup-combobox",{data:r,initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;if(this.globalFilter){i=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:true,label:this.kupManager.language.translate(k.SEARCH),icon:d.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout);this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}}))}let n=null;if(this.showLoadMore||!this.lazyLoadRows&&this.pagination){n=o(R,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{W(this,T,"m",q).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)})}let r=null;let a={};if(this.rows.length===0){r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(u.EMPTY_DATA)));a={"grid-template-columns":`repeat(1, 1fr)`}}else if(t){const t=this.kanbanMode();r=t.jsx;a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let e=t.length;let i=0;r=[];while(e-- >0){r.push(this.renderRow(t[i++]))}}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},e,i,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this);if(this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}document.removeEventListener("click",this.clickFunction.bind(this));this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};$=new WeakMap,L=new WeakMap,F=new WeakMap,H=new WeakMap,N=new WeakMap,T=new WeakSet,G=function t(){if(this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length){W(this,$,"f").observe(W(this,L,"f")[W(this,L,"f").length-1])}},V=function t(){const e=t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const e=this.data.rows.length-this.currentRowsPerPage;if(e<this.loadMoreStep){this.currentRowsPerPage+=e}else{this.currentRowsPerPage+=this.loadMoreStep}t.target.classList.remove("last-row");W(this,$,"f").unobserve(t.target)}}))};const i={threshold:0,rootMargin:"-"+W(this,F,"f")+"px 0px 0px 0px"};B(this,$,new IntersectionObserver(e,i),"f")},q=function t(){var e;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(W(this,H,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(W(this,N,"f"),this.loadMoreStep)*Math.min(W(this,H,"f")+1,2);break}if(i>this.loadMoreLimit){i=this.loadMoreLimit}this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i});B(this,N,i,"f");B(this,H,(e=W(this,H,"f"),e++,e),"f")};K.style=D;export{K as kup_box};
2
+ //# sourceMappingURL=p-99813847.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as f,s as p,e as h}from"./p-f98dc5f6.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(r||(r={}));const l=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return f(this,r,t)}async refresh(){e(this)}async setProps(t){p(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
2
- //# sourceMappingURL=p-d1fc3c35.entry.js.map
1
+ import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as p,s as f,e as h}from"./p-81285484.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(r||(r={}));const l=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,r,t)}async refresh(){e(this)}async setProps(t){f(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
2
+ //# sourceMappingURL=p-aab21af5.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,f as n,h as e,H as s,d as l}from"./p-d7c15b0e.js";import{F as o}from"./p-cc32b7a2.js";import{F as r}from"./p-fcfc07e1.js";import{k as a,a5 as u,F as c,g as h,s as f,h as p,al as d,ab as m,aa as v,am as b,e as k,ak as g}from"./p-81285484.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-170d2abd.js";import"./p-854b53fb.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var j;(function(t){t["TAB"]="tab"})(j||(j={}));var x;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(x||(x={}));const w=12;const O=22;const $=t=>{if(t==0){return w/2}if(!t){return null}if(t===1){return 1.5*w}return t*w};const z=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*w};const T=".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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel__commands{display:flex;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:40ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,i,n,e){if(n==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?e:n==="a"?e.call(t):e?e.value:i.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,i,n,e,s){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?s.call(t,n):s?s.value=n:i.set(t,n),n};var E=undefined&&undefined.__rest||function(t,i){var n={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0)n[e]=t[e];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,e=Object.getOwnPropertySymbols(t);s<e.length;s++){if(i.indexOf(e[s])<0&&Object.prototype.propertyIsEnumerable.call(t,e[s]))n[e[s]]=t[e[s]]}return n};var F,B,I,P,R,N,V,G,J,A,L,H,K,X,Y,q,Q,U,Z,tt,it,nt,et,st,lt,ot,rt,at,ut,ct,ht,ft,pt,dt,mt,vt,bt,kt,gt,yt,_t,jt,xt,wt,Ot,$t,zt,St,Mt,Tt,Wt,Dt,Ct,Et,Ft,Bt,It,Pt,Rt;const Nt=document.documentElement;const Vt=class{constructor(n){t(this,n);this.kupReady=i(this,"kup-input-panel-ready",6);F.add(this);B.set(this,a());I.set(this,new Map([["SmeupTreeNode",D(this,F,"m",Dt).bind(this)],["SmeupDataTree",D(this,F,"m",Ct).bind(this)],["SmeupTable",D(this,F,"m",Et).bind(this)],["SmeupDataTable",D(this,F,"m",Et).bind(this)]]));P.set(this,null);R.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));N.set(this,new Map([[c.AUTOCOMPLETE,"kup-autocomplete-blur"],[c.CHIP,"kup-textfield-blur"],[c.COMBOBOX,"kup-combobox-blur"],[c.DATE,"kup-datepicker-blur"],[c.MULTI_AUTOCOMPLETE,"kup-autocomplete-blur"],[c.MULTI_COMBOBOX,"kup-combobox-blur"],[c.TIME,"kup-timepicker-blur"]]));V.set(this,[]);G.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));J.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",Y).bind(this)],[c.EDITOR,D(this,F,"m",q).bind(this)],[c.LABEL,D(this,F,"m",U).bind(this)],[c.TABLE,D(this,F,"m",Q).bind(this)]]));A.set(this,new Map([[j.TAB,D(this,F,"m",lt).bind(this)]]));L.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.checkValidObjCallback=null;this.checkValidValueCallback=null;this.inputPanelCells=[];this.inputPanelCommands=[];this.tabSelected=null}onDataChanged(){C(this,P,structuredClone(this.data),"f");if(D(this,V,"f").length){D(this,V,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)}));C(this,V,[],"f")}if(D(this,L,"f").length){D(this,L,"f").map((t=>{D(this,B,"f").keysBinding.unregister(t)}));C(this,L,[],"f")}D(this,F,"m",ut).call(this,this.data)}async getProps(t){return h(this,x,t)}async refresh(){n(this)}async setProps(t){f(this,x,t)}componentWillLoad(){D(this,B,"f").debug.logLoad(this,false);D(this,B,"f").language.register(this);D(this,B,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,B,"f").debug.logLoad(this,true)}componentWillRender(){D(this,B,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++){y(i[t])}}D(this,B,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const i=t?[e("p",null,D(this,B,"f").language.translate(p.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",K).call(this,t)));return e(s,{key:"f97b13e882a24cfeeecf5206309f4eda367f4038"},e("style",{key:"4b50cb265db5f1f2127b6f40f648196aa694ac25"},D(this,B,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"75ec785d4135bbce697e78c9221bac1c946e63b3",id:_},i))}disconnectedCallback(){D(this,B,"f").language.unregister(this);D(this,B,"f").theme.unregister(this)}get rootElement(){return l(this)}static get watchers(){return{data:["onDataChanged"]}}};B=new WeakMap,I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,V=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,F=new WeakSet,H=function t(i){return this.inputPanelCells.reduce(((t,{cells:n})=>{if(!t){return n.find((({column:t})=>t.name===i)).cell}return t}),null)},K=function t(i){var n;const s=i.row.layout;const l=(s===null||s===void 0?void 0:s.horizontal)||false;const r={};let a;if(!((n=s===null||s===void 0?void 0:s.sections)===null||n===void 0?void 0:n.length)){a=i.cells.map((t=>D(this,F,"m",X).call(this,t.cell,i.row,t.column)))}else{if(s.absolute){a=D(this,F,"m",it).call(this,i,s)}else{if(!s.sectionsType){const t=s.sections.some((t=>t.dim));r.display="grid";if(s.horizontal){r.gridTemplateColumns=t?s.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${s.sections.length}, 1fr)`}else{r.gridTemplateRows=t?s.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${s.sections.length}, 1fr)`}}a=D(this,F,"m",tt).call(this,i,s)}}const u={"input-panel":true,"input-panel--column":!l,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return e("form",{name:this.rootElement.id,id:this.rootElement.id,class:{"input-panel-form":true},onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,P,"f")),after:D(this,F,"m",ft).call(this)}})}},e("div",{class:u,style:r},a),e("div",{class:"input-panel__commands"},!this.hiddenSubmitButton?e(o,{buttonType:"submit",label:D(this,B,"f").language.translate(p.CONFIRM),wrapperClass:"form__submit"}):null,this.inputPanelCommands))},X=function t(i,n,s){if(!i){return}const l=D(this,J,"f").get(i.shape);if(l!==undefined){return l(i,s.name)}const o={cell:i,column:s,row:n,component:this,editable:true,renderKup:true,setSizes:true};const a=D(this,F,"m",Z).call(this,i,s.title);if(a){return e("div",{class:{"input-panel__label_container":true}},a,e(r,Object.assign({},o)))}return e(r,Object.assign({},o))},Y=function t(i,n){return e(o,Object.assign({icon:i.icon,id:n},i.data,{wrapperClass:"form__submit"}))},q=function t(i,n){const s="kup-editor-save";const l=t=>{const i=this.inputPanelCells.reduce(((t,{cells:i})=>{if(!t){return i.find((({column:t})=>t.name===n)).cell}return t}),null);i.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,l);D(this,V,"f").push({event:s,handler:l});return e("kup-editor",Object.assign({},i.data,{id:n,isReadOnly:!i.isEditable,showToolbar:true}))},Q=function t(i,n){return e("kup-data-table",Object.assign({id:n,editableData:true,showGroups:true,showFilters:true,showFooter:true},i.data))},U=function t(i,n){return e("span",{class:"input-panel-label",id:n},i.value)},Z=function t(i,n){if(!n){return null}const s=Nt.ketchup.data.cell.getType(i,i.shape);if(s===u.RADIO){return e("span",null,n)}return null},tt=function t(i,n){const e=D(this,A,"f").get(n.sectionsType);return e?e(i,n.sections):n.sections.map((t=>D(this,F,"m",nt).call(this,i,t)))},it=function t(i,n){return n.sections.map((t=>D(this,F,"m",et).call(this,i,t)))},nt=function t(i,n,s=false,l={}){var o,r;const a={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal};l.gap=+n.gap>0?`${n.gap}rem`:"1rem";let u=[];if((o=n.sections)===null||o===void 0?void 0:o.length){u=n.sections.map((n=>D(this,F,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));if(!n.gridCols&&n.horizontal){l.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`}if(!n.gridRows&&!n.horizontal){l.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`}}else if((r=n.content)===null||r===void 0?void 0:r.length){u=n.content.map((t=>D(this,F,"m",ot).call(this,i,t)));l.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"";l.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""}const c=e("div",{class:a,style:l},u);return n.title&&!s?e("div",{class:{"input-panel__section_label_container":true}},e("h3",null,n.title),c):c},et=function t(i,n){var s,l;let o=[];if((s=n.sections)===null||s===void 0?void 0:s.length){o=n.sections.map((n=>D(this,F,"m",t).call(this,i,n)))}else if((l=n.content)===null||l===void 0?void 0:l.length){o=n.content.map((t=>D(this,F,"m",rt).call(this,i,t)))}const r=`${$(n.absoluteWidth)}px`;const a=`${z(n.absoluteHeight)}px`;const u=`${S(n.absoluteRow)}px`;const c=`${M(n.absoluteColumn)}px`;const h={position:"absolute",width:r,"min-width":r,"max-width":r,height:a,"min-height":a,"max-height":a,top:u,left:c,overflow:"auto"};return e("div",{style:h},o)},st=function t(i){var n,e;let s=[];if((n=i.content)===null||n===void 0?void 0:n.length){i.content.forEach((t=>{if(t.id){s.push(t.id)}}))}if((e=i.sections)===null||e===void 0?void 0:e.length){i.sections.forEach((i=>{s=s.concat(D(this,F,"m",t).call(this,i))}))}return s},lt=function t(i,n){if(!this.tabSelected){this.tabSelected=n[0].id||"0"}const s=n.map(((t,n)=>{const e=D(this,F,"m",st).call(this,t);const s=i.cells.some((t=>{var i;const n=t.cell;const s=t.column;return e.includes(s.name)&&!!((i=n.data)===null||i===void 0?void 0:i.error)}));return{active:(t.id||`${n}`)===this.tabSelected,value:t.title,icon:s?"error":t.icon,id:t.id||`${n}`,danger:s}}));const l=n.map(((t,n)=>{const e=t.id||`${n}`;return D(this,F,"m",nt).call(this,i,t,true,{display:this.tabSelected!==e?"none":"grid"})}));const o=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,V,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const i=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,i);D(this,V,"f").push({event:t,handler:i})}return e("div",{class:{"input-panel__tabs_container":true}},e("kup-tab-bar",{data:s,customStyle:o}),l)},ot=function t(i,n){const s=i.cells.find((t=>t.column.name===n.id));const l=+n.colSpan>0?n.colSpan:!(+n.colSpan>0)&&!(+n.colStart>0)?1:null;const o=l?`span ${l}`:`${n.colStart}`;const r=+n.colEnd>0?`${n.colEnd}`:"";const a=+n.rowSpan>0?n.rowSpan:!(+n.rowSpan>0)&&!(+n.rowStart>0)?1:null;const u=a?`span ${a}`:`${n.rowStart}`;const c=+n.rowEnd>0?`${n.rowEnd}`:"";const h={"grid-column-start":o,"grid-column-end":r,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return e("div",{style:h},D(this,F,"m",X).call(this,s.cell,i.row,s.column))},rt=function t(i,n){const s=i.cells.find((t=>t.column.name===n.id));if(!s||!s.cell){return}let l;if(s.cell.shape==c.DATE){l=n.absoluteLength>8?n.absoluteLength:8}else{l=n.absoluteLength}const o=`${$(l)}px`;const r=`${z(1)}px`;const a=`${S(n.absoluteRow)}px`;const u=`${M(n.absoluteColumn)}px`;const h={position:"absolute",width:o,"min-width":o,"max-width":o,height:r,"min-height":r,"max-height":r,top:a,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return e("div",{style:h},D(this,F,"m",X).call(this,s.cell,i.row,s.column))},at=function t(){this.inputPanelCommands=this.data.setup.commands.map((t=>Object.entries(t===null||t===void 0?void 0:t.cells).map((([t,i])=>{const n=Object.assign(Object.assign({},i),{data:D(this,F,"m",bt).call(this,null,null,i.value,i,t)});return D(this,F,"m",Y).call(this,n,t)})))).flat()},ut=function t(i){var n,e,s,l;if((e=(n=i.setup)===null||n===void 0?void 0:n.commands)===null||e===void 0?void 0:e.length){D(this,F,"m",at).call(this)}const o=(s=i===null||i===void 0?void 0:i.rows[0])===null||s===void 0?void 0:s.layout;const r=((l=i===null||i===void 0?void 0:i.rows)===null||l===void 0?void 0:l.length)?i.rows.reduce(((t,n)=>{const e=i.columns.filter((t=>t.visible)).map((t=>{const i=structuredClone(n.cells[t.name]);const e=i?Object.assign(Object.assign({},i),{data:D(this,F,"m",ct).call(this,i,t,o),slotData:D(this,F,"m",dt).call(this,i,t),isEditable:true}):null;return{column:t,cell:e}}));return[...t,{cells:e,row:n}]}),[]):[];r.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Nt.ketchup.data.cell.getType(t,t.shape);const e=D(this,G,"f").get(n);if(!e){return}const s=this.rootElement.shadowRoot.querySelector(`${e}[id=${i.name.replace(/\//g,"\\$1")}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=r},ct=function t(i,n,e){const s=Object.assign(Object.assign({},D(this,F,"m",pt).call(this,i,n,e)),{disabled:!i.editable,id:n.name});const l=Nt.ketchup.data.cell.getType(i,i.shape);const o=i.data||{},r=E(o,["data"]);return l!==u.MULTI_AUTOCOMPLETE&&l!==u.MULTI_COMBOBOX?D(this,F,"m",ht).call(this,s,Object.assign({},i.data)):Object.assign(Object.assign({},s),r)},ht=function t(i,n){for(const e in n){if(n[e]instanceof Object&&!Array.isArray(n[e])&&e in i){i[e]=D(this,F,"m",t).call(this,i[e],n[e])}else{i[e]=n[e]}}return i},ft=function t(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const s=(e=i.cells.find((t=>t.column.name===n)))===null||e===void 0?void 0:e.cell;let l=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){l=JSON.stringify(D(this,F,"m",Tt).call(this,s.data.data,n))}return Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:l,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},pt=function t(i,n,e){if(!i){return null}const s=i.options;let l;if(e===null||e===void 0?void 0:e.absolute){l=null}else{l=n.title}const o=i.value;const r=Nt.ketchup.data.cell.getType(i,i.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",kt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",bt).bind(this)],[u.CHART,D(this,F,"m",vt).bind(this)],[u.CHIP,D(this,F,"m",mt).bind(this)],[u.CHECKBOX,D(this,F,"m",gt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",yt).bind(this)],[u.COMBOBOX,D(this,F,"m",kt).bind(this)],[u.EDITOR,D(this,F,"m",_t).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",mt).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",mt).bind(this)],[u.NUMBER,D(this,F,"m",St).bind(this)],[u.DATE,D(this,F,"m",Ot).bind(this)],[u.OBJECT,D(this,F,"m",$t).bind(this)],[u.RADIO,D(this,F,"m",xt).bind(this)],[u.STRING,D(this,F,"m",jt).bind(this)],[u.SWITCH,D(this,F,"m",wt).bind(this)],[u.TABLE,D(this,F,"m",Mt).bind(this)],[u.TIME,D(this,F,"m",zt).bind(this)]]);const c=a.get(r);return c?c(s,l,o,i,n.name):null},dt=function t(i,n){const e=Nt.ketchup.data.cell.getType(i,i.shape);if(!i.editable){return null}if(e===u.CHIP){return{trailingIcon:true,label:n.title,disabled:!i.editable,id:n.name,fullWidth:false}}if(e===u.MULTI_AUTOCOMPLETE||e===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",kt).call(this,i.options,n.title,null,i,n.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!i.editable,id:n.name})}return null},mt=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){D(this,F,"m",It).call(this,s,l)}return d(e)},vt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},bt=function t(i,n,e,s,l){var o,r,a,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:l,currentState:D(this,F,"m",ft).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,P,"f")),after:D(this,F,"m",ft).call(this)},cell:l})};if(((o=s.data)===null||o===void 0?void 0:o.keyShortcut)&&!((r=s.data)===null||r===void 0?void 0:r.disabled)){D(this,L,"f").push((a=s.data)===null||a===void 0?void 0:a.keyShortcut);D(this,B,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},kt=function t(i,n,e,s,l){var o,r;const a=m(e,n,[]);if(s.fun){const t=Nt.ketchup.data.cell.getType(s,s.shape);const i=D(this,R,"f").get(t);if(!i){return}i.map((t=>{const i=t=>{D(this,F,"m",Ft).call(this,t.detail,s.fun,a,l,e)};this.rootElement.addEventListener(t,i);D(this,V,"f").push({event:t,handler:i})}))}else if(i){a.data["kup-list"].data=D(this,F,"m",Wt).call(this,i,e)}if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){D(this,F,"m",It).call(this,s,l)}return a},gt=function t(i,n,e,s,l){var o,r;let a=g(e,n);if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return Object.assign(Object.assign({},a),{onBlur:()=>{D(this,F,"m",Bt).call(this,s,l)}})}return a},yt=function t(i,n,e){return{data:{"kup-text-field":{label:n}}}},_t=function t(i,n,e){return{initialValue:e}},jt=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{label:n,onBlur:()=>{D(this,F,"m",Bt).call(this,s,l)}}}return{label:n}},xt=function t(i,n,e,s,l){var o,r;let a=v(e,i);if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return Object.assign(Object.assign({},a),{onBlur:()=>{D(this,F,"m",Bt).call(this,s,l)}})}return a},wt=function t(i,n,e){return b(e,n)},Ot=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){D(this,F,"m",It).call(this,s,l)}return{data:{"kup-text-field":{label:n}},initialValue:e}},$t=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{initialValue:e||"",label:n||" ",value:e||"",onBlur:()=>{D(this,F,"m",Bt).call(this,s,l)}}}return{initialValue:e||"",label:n||" ",value:e||""}},zt=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){D(this,F,"m",It).call(this,s,l)}return{data:{"kup-text-field":{label:n}}}},St=function t(i,n,e,s,l){var o,r;if(((o=s.inputSettings)===null||o===void 0?void 0:o.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{label:n,onBlur:()=>{D(this,F,"m",Bt).call(this,s,l)}}}return{label:n}},Mt=function t(i,n,e,s,l){try{let t=JSON.parse(s.value);if(!t){D(this,B,"f").debug.logMessage(this,`Empty value for ${l} cell.`,k.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,B,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,k.ERROR);return null}return{data:{columns:t.columns.map((i=>Object.assign(Object.assign({},i),{obj:t.rows[0].cells[i.name].obj}))),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const s=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},D(this,F,"m",pt).call(this,i.cells[e],s)),{disabled:i.cells[e].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,B,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,k.ERROR);return null}},Tt=function t(i,n){const e=Object.assign(Object.assign({},i),{rows:i.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=i.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return e}try{const t=JSON.parse(D(this,P,"f").rows[0].cells[n].value);e.rows=i.rows.map(((i,n)=>s.reduce(((e,s)=>{const l=t.rows[n].cells[s]&&i.cells[s].value!==t.rows[n].cells[s].value;if(l){return Object.assign(Object.assign({},t.rows[n]),{cells:Object.assign(Object.assign({},e.cells),{[s]:Object.assign(Object.assign({},t.rows[n].cells[s]),{value:i.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[n]),{cells:e.cells})}),Object.assign(Object.assign({},t.rows[n]),{cells:{}}))));return e}catch(t){return e}},Wt=function t(i,n){const e=D(this,I,"f").get(i.type);if(e){return e(i,n)}else{return i.map((t=>({value:t.label,id:t.id,selected:n===t.id})))}},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:((e=i.children)===null||e===void 0?void 0:e.length)?D(this,F,"m",t).call(this,i,n):[]}}))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:((e=i.children)===null||e===void 0?void 0:e.length)?D(this,F,"m",t).call(this,i,n):[]}}))},Et=function t(i,n){return i.rows.map((t=>{var i;const e=t.fields||t.cells;const[s,l]=Object.keys(e);return{id:e[s].value,value:((i=e[l])===null||i===void 0?void 0:i.value)||e[s].value,selected:n===e[s].value}}))},Ft=function t(i,n,e,s,l){if(i.id!==s||i.open===false){return}this.optionsHandler(n,i.inputValue,D(this,F,"m",ft).call(this),i.id).then((t=>{var n;e.data["kup-list"].data=(n=D(this,F,"m",Wt).call(this,t,l))!==null&&n!==void 0?n:[];i.comp.refresh()}))},Bt=async function t(i,n){var e,s;const l=D(this,F,"m",H).call(this,n);if(i.mandatory){D(this,F,"m",Pt).call(this,n,l.value?null:D(this,B,"f").language.translate(p.REQUIRED_VALUE));if(!l.value){return}}else{D(this,F,"m",Pt).call(this,n,null)}if(((e=i.inputSettings)===null||e===void 0?void 0:e.checkObject)&&l.value){const{valid:t}=await this.checkValidObjCallback({obj:i.obj,currentState:D(this,F,"m",ft).call(this),fun:i.fun});if(t){D(this,F,"m",Pt).call(this,n,null)}else{D(this,F,"m",Pt).call(this,n,D(this,B,"f").language.translate(p.INVALID_VALUE));return}}if(((s=i.inputSettings)===null||s===void 0?void 0:s.checkValueOnExit)&&D(this,F,"m",Rt).call(this)){this.checkValidValueCallback({before:Object.assign({},D(this,P,"f")),after:D(this,F,"m",ft).call(this)})}},It=function t(i,n){const e=D(this,N,"f").get(i.shape);if(!e){return}const s=async t=>{var e,s;const l=D(this,F,"m",H).call(this,n);if(t.detail.id!==n){return}if(i.mandatory){D(this,F,"m",Pt).call(this,n,l.value?null:D(this,B,"f").language.translate(p.REQUIRED_VALUE));if(!t.detail.value){return}}else{D(this,F,"m",Pt).call(this,n,null)}if(((e=i.inputSettings)===null||e===void 0?void 0:e.checkObject)&&t.detail.value){const{valid:t}=await this.checkValidObjCallback({obj:i.obj,currentState:D(this,F,"m",ft).call(this),fun:i.fun});D(this,F,"m",Pt).call(this,n,t?null:D(this,B,"f").language.translate(p.INVALID_VALUE));if(!t){return}}if(((s=i.inputSettings)===null||s===void 0?void 0:s.checkValueOnExit)&&D(this,F,"m",Rt).call(this)){this.checkValidValueCallback({before:Object.assign({},D(this,P,"f")),after:D(this,F,"m",ft).call(this)})}};this.rootElement.addEventListener(e,s);D(this,V,"f").push({event:e,handler:s})},Pt=function t(i,n){this.inputPanelCells=this.inputPanelCells.map((t=>Object.assign(Object.assign({},t),{cells:t.cells.map((({cell:t,column:e})=>{const s=e.name===i?Object.assign(Object.assign({},t.data),{error:n}):t.data;return{column:e,cell:Object.assign(Object.assign({},t),{data:s})}}))})))},Rt=function t(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))};Vt.style=W;export{Vt as kup_input_panel};
2
+ //# sourceMappingURL=p-b412ff9f.entry.js.map