@sme.up/ketchup 11.0.0-SNAPSHOT-20251125104152 → 11.0.0-SNAPSHOT-20251201090245

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 (222) hide show
  1. package/dist/cjs/{f-cell-15f0e3d8.js → f-cell-06f41e1b.js} +10 -10
  2. package/dist/cjs/{f-chip-1f1a9829.js → f-chip-8d18d91d.js} +9 -9
  3. package/dist/cjs/{f-object-field-7264b902.js → f-object-field-a7aad942.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-0b88eb98.js → f-paginator-utils-f3034c12.js} +5 -5
  5. package/dist/cjs/{f-text-field-2f9c646d.js → f-text-field-9a401ac4.js} +4 -2
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/cjs/ketchup.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  10. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +53 -67
  11. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  12. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  13. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  16. package/dist/cjs/{kup-data-table-helper-292af776.js → kup-data-table-helper-8a30bc54.js} +1 -1
  17. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-htm.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-input-panel.cjs.entry.js +10 -10
  25. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  27. package/dist/cjs/{kup-manager-af4de85d.js → kup-manager-51844a7d.js} +5 -5
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  30. package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
  31. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  34. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  35. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-txt.cjs.entry.js +1 -1
  37. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  38. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/assets/card.js +2 -2
  41. package/dist/collection/assets/data-table.js +3 -3
  42. package/dist/collection/assets/form.js +2 -2
  43. package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -1
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +11 -11
  45. package/dist/collection/components/kup-chip/kup-chip-declarations.js +1 -1
  46. package/dist/collection/components/kup-chip/kup-chip.js +6 -6
  47. package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +2 -1
  48. package/dist/collection/components/kup-combobox/kup-combobox.js +11 -11
  49. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +1 -1
  50. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +5 -5
  51. package/dist/collection/components/kup-input-panel/kup-input-panel.js +5 -5
  52. package/dist/collection/components/kup-list/kup-list-helper.js +5 -5
  53. package/dist/collection/components/kup-list/kup-list.js +5 -5
  54. package/dist/collection/components/kup-tree/kup-tree.js +18 -34
  55. package/dist/collection/f-components/f-cell/f-cell.js +4 -4
  56. package/dist/collection/f-components/f-chip/f-chip.js +3 -3
  57. package/dist/collection/f-components/f-paginator/f-paginator.js +3 -3
  58. package/dist/collection/f-components/f-text-field/f-text-field.js +3 -1
  59. package/dist/collection/utils/cell-utils.js +5 -5
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/kup-accordion.js +2 -2
  62. package/dist/components/kup-activity-timeline.js +2 -2
  63. package/dist/components/kup-autocomplete.js +1 -1
  64. package/dist/components/kup-badge.js +1 -1
  65. package/dist/components/kup-box.js +1 -1
  66. package/dist/components/kup-button-list.js +1 -1
  67. package/dist/components/kup-button.js +1 -1
  68. package/dist/components/kup-calendar.js +2 -2
  69. package/dist/components/kup-card-list.js +3 -3
  70. package/dist/components/kup-card.js +1 -1
  71. package/dist/components/kup-cell.js +2 -2
  72. package/dist/components/kup-chart.js +1 -1
  73. package/dist/components/kup-checkbox.js +1 -1
  74. package/dist/components/kup-chip.js +1 -1
  75. package/dist/components/kup-color-picker.js +1 -1
  76. package/dist/components/kup-combobox.js +1 -1
  77. package/dist/components/kup-dashboard.js +2 -2
  78. package/dist/components/kup-data-table.js +1 -1
  79. package/dist/components/kup-date-picker.js +1 -1
  80. package/dist/components/kup-dialog.js +1 -1
  81. package/dist/components/kup-drawer.js +2 -2
  82. package/dist/components/kup-dropdown-button.js +1 -1
  83. package/dist/components/kup-echart.js +1 -1
  84. package/dist/components/kup-editor.js +1 -1
  85. package/dist/components/kup-family-tree.js +3 -3
  86. package/dist/components/kup-file-upload.js +1 -1
  87. package/dist/components/kup-form.js +1 -1
  88. package/dist/components/kup-gauge.js +1 -1
  89. package/dist/components/kup-grid.js +1 -1
  90. package/dist/components/kup-htm.js +2 -2
  91. package/dist/components/kup-iframe.js +2 -2
  92. package/dist/components/kup-image-list.js +1 -1
  93. package/dist/components/kup-image.js +1 -1
  94. package/dist/components/kup-input-panel.js +8 -8
  95. package/dist/components/kup-lazy.js +2 -2
  96. package/dist/components/kup-list.js +1 -1
  97. package/dist/components/kup-magic-box.js +4 -4
  98. package/dist/components/kup-nav-bar.js +2 -2
  99. package/dist/components/kup-numeric-picker.js +2 -2
  100. package/dist/components/kup-object-field.js +2 -2
  101. package/dist/components/kup-pdf.js +2 -2
  102. package/dist/components/kup-planner.js +2 -2
  103. package/dist/components/kup-probe.js +2 -2
  104. package/dist/components/kup-progress-bar.js +1 -1
  105. package/dist/components/kup-qlik.js +2 -2
  106. package/dist/components/kup-radio.js +1 -1
  107. package/dist/components/kup-rating.js +1 -1
  108. package/dist/components/kup-snackbar.js +2 -2
  109. package/dist/components/kup-spinner.js +1 -1
  110. package/dist/components/kup-switch.js +1 -1
  111. package/dist/components/kup-tab-bar.js +1 -1
  112. package/dist/components/kup-text-field.js +1 -1
  113. package/dist/components/kup-time-picker.js +1 -1
  114. package/dist/components/kup-toolbar.js +1 -1
  115. package/dist/components/kup-tree.js +1 -1
  116. package/dist/components/kup-txt.js +2 -2
  117. package/dist/components/kup-typography-list.js +2 -2
  118. package/dist/components/kup-typography.js +2 -2
  119. package/dist/components/{p-849d8012.js → p-4db73c8a.js} +2 -2
  120. package/dist/components/{p-c1e159c2.js → p-55bb63e7.js} +2 -2
  121. package/dist/components/{p-0497ebe5.js → p-5a3d0bf2.js} +5 -5
  122. package/dist/components/{p-fe2a2d3e.js → p-6a5184f4.js} +2 -2
  123. package/dist/components/{p-107d75ba.js → p-f4d62101.js} +76 -88
  124. package/dist/components/{p-1470a155.js → p-fa6a4926.js} +2 -2
  125. package/dist/esm/{f-cell-1b003ccd.js → f-cell-b2681485.js} +10 -10
  126. package/dist/esm/{f-chip-2b1b3544.js → f-chip-ccc3f97c.js} +9 -9
  127. package/dist/esm/{f-object-field-a234558f.js → f-object-field-96b40820.js} +2 -2
  128. package/dist/esm/{f-paginator-utils-7f69eaa3.js → f-paginator-utils-e99efbfb.js} +5 -5
  129. package/dist/esm/{f-text-field-4ef83a74.js → f-text-field-2898964c.js} +4 -2
  130. package/dist/esm/index.js +1 -1
  131. package/dist/esm/ketchup.js +1 -1
  132. package/dist/esm/kup-accordion.entry.js +1 -1
  133. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  134. package/dist/esm/kup-autocomplete_30.entry.js +53 -67
  135. package/dist/esm/kup-box.entry.js +7 -7
  136. package/dist/esm/kup-calendar.entry.js +2 -2
  137. package/dist/esm/kup-card-list.entry.js +1 -1
  138. package/dist/esm/kup-cell.entry.js +5 -5
  139. package/dist/esm/kup-dashboard.entry.js +2 -2
  140. package/dist/esm/{kup-data-table-helper-3832776d.js → kup-data-table-helper-54809d36.js} +1 -1
  141. package/dist/esm/kup-drawer.entry.js +1 -1
  142. package/dist/esm/kup-echart.entry.js +1 -1
  143. package/dist/esm/kup-editor.entry.js +1 -1
  144. package/dist/esm/kup-family-tree.entry.js +1 -1
  145. package/dist/esm/kup-grid.entry.js +1 -1
  146. package/dist/esm/kup-htm.entry.js +1 -1
  147. package/dist/esm/kup-iframe.entry.js +1 -1
  148. package/dist/esm/kup-input-panel.entry.js +10 -10
  149. package/dist/esm/kup-lazy.entry.js +1 -1
  150. package/dist/esm/kup-magic-box.entry.js +1 -1
  151. package/dist/esm/{kup-manager-53906723.js → kup-manager-cafa84f3.js} +5 -5
  152. package/dist/esm/kup-nav-bar.entry.js +1 -1
  153. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  154. package/dist/esm/kup-object-field.entry.js +3 -3
  155. package/dist/esm/kup-pdf.entry.js +1 -1
  156. package/dist/esm/kup-planner.entry.js +2 -2
  157. package/dist/esm/kup-probe.entry.js +1 -1
  158. package/dist/esm/kup-qlik.entry.js +1 -1
  159. package/dist/esm/kup-snackbar.entry.js +1 -1
  160. package/dist/esm/kup-txt.entry.js +1 -1
  161. package/dist/esm/kup-typography-list.entry.js +1 -1
  162. package/dist/esm/kup-typography.entry.js +1 -1
  163. package/dist/esm/loader.js +1 -1
  164. package/dist/ketchup/index.esm.js +1 -1
  165. package/dist/ketchup/ketchup.esm.js +1 -1
  166. package/dist/ketchup/{p-339d7438.entry.js → p-02378652.entry.js} +1 -1
  167. package/dist/ketchup/{p-ae382c78.entry.js → p-08761e63.entry.js} +1 -1
  168. package/dist/ketchup/p-0ef5545c.entry.js +1 -0
  169. package/dist/ketchup/{p-d6bf9d14.js → p-131d02e5.js} +1 -1
  170. package/dist/ketchup/{p-7f6a52f1.entry.js → p-1508f846.entry.js} +1 -1
  171. package/dist/ketchup/{p-10367f2b.entry.js → p-152ed137.entry.js} +1 -1
  172. package/dist/ketchup/{p-bdfc5fcf.entry.js → p-1fded783.entry.js} +1 -1
  173. package/dist/ketchup/{p-ceda8fa4.entry.js → p-308028ef.entry.js} +1 -1
  174. package/dist/ketchup/{p-9f2abfd6.entry.js → p-3fcb121a.entry.js} +1 -1
  175. package/dist/ketchup/{p-8b5ab195.js → p-49dfe632.js} +1 -1
  176. package/dist/ketchup/{p-ba6b283e.entry.js → p-4b8e41b8.entry.js} +1 -1
  177. package/dist/ketchup/{p-a9994a05.entry.js → p-53d3b004.entry.js} +1 -1
  178. package/dist/ketchup/p-5434838f.js +1 -0
  179. package/dist/ketchup/{p-b6519054.entry.js → p-5f03e966.entry.js} +1 -1
  180. package/dist/ketchup/p-64c95c83.js +1 -0
  181. package/dist/ketchup/{p-77fc5eaf.entry.js → p-6a4a0d38.entry.js} +1 -1
  182. package/dist/ketchup/p-6ecb98ae.entry.js +8 -0
  183. package/dist/ketchup/{p-ae4fd0eb.entry.js → p-76cf473a.entry.js} +1 -1
  184. package/dist/ketchup/{p-6f0eaff3.entry.js → p-8974efec.entry.js} +1 -1
  185. package/dist/ketchup/{p-b1256195.entry.js → p-89dabd6e.entry.js} +1 -1
  186. package/dist/ketchup/{p-21dc5934.entry.js → p-8ed38785.entry.js} +1 -1
  187. package/dist/ketchup/p-9600ce9a.js +1 -0
  188. package/dist/ketchup/{p-3e905afa.entry.js → p-98496351.entry.js} +1 -1
  189. package/dist/ketchup/{p-feba5a53.entry.js → p-9c686dd5.entry.js} +1 -1
  190. package/dist/ketchup/{p-bf0510af.entry.js → p-9f9605c9.entry.js} +1 -1
  191. package/dist/ketchup/{p-774c3c21.entry.js → p-a91a64dd.entry.js} +1 -1
  192. package/dist/ketchup/{p-09337603.entry.js → p-abef591a.entry.js} +1 -1
  193. package/dist/ketchup/{p-8e2c19a6.entry.js → p-b97a2fae.entry.js} +1 -1
  194. package/dist/ketchup/{p-5a82356a.entry.js → p-b9d044dd.entry.js} +1 -1
  195. package/dist/ketchup/{p-0967bb61.entry.js → p-bda08688.entry.js} +1 -1
  196. package/dist/ketchup/{p-b961eebf.entry.js → p-d218199c.entry.js} +1 -1
  197. package/dist/ketchup/{p-af914cdf.js → p-d66832f6.js} +1 -1
  198. package/dist/ketchup/p-e59fd0c5.js +1 -0
  199. package/dist/ketchup/{p-84cfb459.entry.js → p-e9f5949f.entry.js} +1 -1
  200. package/dist/ketchup/{p-17fe09b5.entry.js → p-f890d822.entry.js} +1 -1
  201. package/dist/ketchup/{p-01d7a61a.entry.js → p-fda8a7b9.entry.js} +1 -1
  202. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -1
  203. package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +2 -2
  204. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +1 -1
  205. package/dist/types/components/kup-chip/kup-chip.d.ts +1 -1
  206. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +2 -1
  207. package/dist/types/components/kup-combobox/kup-combobox.d.ts +2 -2
  208. package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +1 -1
  209. package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
  210. package/dist/types/components/kup-list/kup-list-helper.d.ts +2 -2
  211. package/dist/types/components/kup-list/kup-list.d.ts +1 -1
  212. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -1
  213. package/dist/types/components.d.ts +66 -66
  214. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +1 -1
  215. package/dist/types/utils/cell-utils.d.ts +1 -1
  216. package/package.json +1 -1
  217. package/dist/ketchup/p-22e5d270.js +0 -1
  218. package/dist/ketchup/p-65240069.js +0 -1
  219. package/dist/ketchup/p-7537f52f.entry.js +0 -1
  220. package/dist/ketchup/p-7e2316a5.js +0 -1
  221. package/dist/ketchup/p-7e2d6bff.entry.js +0 -8
  222. package/dist/ketchup/p-ec727684.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-d66832f6.js";import{F as i}from"./p-cc9db65d.js";const n=document.documentElement;let o=null;const d=(l,t)=>{var i,n;const o={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},d=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,d))||void 0===n||n;return e("div",Object.assign({class:o},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[a(l),s?d:null,e("label",null,l.label)]):[a(l),s?d:null],t)};function a(o){var d,a,u,m,p,f,v;const x=o.textArea||o.outlined;let g,k,h,b;if(!o.label||o.leadingLabel||o.trailingLabel||o.legacyLook||(g=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},o.label,o.labelHelper&&e("span",{onPointerMove:e=>r(e,o.labelHelper),onPointerDown:e=>r(e,o.labelHelper),onPointerOut:()=>c()},e(i,{resource:"info_outline",wrapperClass:"helper-icon"}))),o.maxLength&&o.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},o.value.length," / ",o.maxLength):void 0)),o.icon){let i,n="";if(Object.values(t).indexOf(o.icon)>-1)n=o.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${o.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}k=e("span",{style:i,onClick:o.onIconClick,onMouseDown:e=>{e.preventDefault()},class:`mdc-text-field__icon kup-icon action ${n}`})}if(o.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};h=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),b=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const w={color:o.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:o.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},_={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":o.disabled},y={"is-clearable":o.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":o.disabled,"mdc-text-field--read-only":o.readOnly,"mdc-text-field--read-only-is-select":o.isSelect,"mdc-text-field--filled":!o.fullWidth&&!x,"mdc-text-field--no-label":!o.label,"mdc-text-field--fullwidth":o.fullWidth,"mdc-text-field--lightmode":o.lightMode,"mdc-text-field--outlined":x,"mdc-text-field--textarea":o.textArea,"mdc-text-field--with-leading-icon":o.icon&&!o.trailingIcon,"mdc-text-field--with-trailing-icon":o.icon&&o.trailingIcon,"mdc-text-field--with-quantity-buttons":o.quantityButtons,"mdc-text-field--error":Boolean(o.error),"mdc-text-field--alert":Boolean(o.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":o.legacyLook,[`mdc-text-field--${o.sizing||"small"}`]:!o.textArea&&!o.legacyLook,[`mdc-text-field--textarea--${o.sizing||"small"}`]:o.textArea,"top-right-indicator":o.showMarker};let C=o.value,$=o.quantityButtons?"number":null!==(d=o.inputType)&&void 0!==d?d:"text",F=!1;if("number"===o.inputType&&($="text",o.inputMode="numeric",F=!0),"number"===o.inputType){const e={allowNegative:null===(a=o.allowNegative)||void 0===a||a,decimal:o.decimals,group:null===(u=o.group)||void 0===u||u,integer:(null!==(m=o.integers)&&void 0!==m?m:0)-(null!==(p=o.decimals)&&void 0!==p?p:0)};C=s(C,e,!1)}return e("div",{class:_},o.fullWidth?void 0:g,e("div",{class:y},o.trailingIcon?void 0:k,o.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:o.disabled,maxlength:o.maxLength,value:C,autoComplete:null!==(f=o.autocomplete)&&void 0!==f?f:"off",onBlur:o.onBlur,onClick:o.onClick,onChange:o.onChange,onFocus:o.onFocus,onInput:o.onInput,onKeyDown:o.onKeyDown})):e("input",{type:$,inputmode:o.inputMode?o.inputMode:void 0,step:o.step,min:o.min,max:o.max,name:o.name,class:"mdc-text-field__input",disabled:o.disabled,placeholder:o.placeholder,maxlength:o.maxLength,size:o.size,value:C,readOnly:o.isSelect,autoComplete:null!==(v=o.autocomplete)&&void 0!==v?v:"off",onBlur:e=>{var l,t,i,n;if(F){const d={allowNegative:null===(l=o.allowNegative)||void 0===l||l,decimal:o.decimals,group:null===(t=o.group)||void 0===t||t,integer:(null!==(i=o.integers)&&void 0!==i?i:0)-(null!==(n=o.decimals)&&void 0!==n?n:0)};e.target.value=s(e.target.value,d,!0)}o.onBlur&&o.onBlur(e)},onChange:e=>{var l,t,i,n;if(F){const d={allowNegative:null===(l=o.allowNegative)||void 0===l||l,decimal:o.decimals,group:null===(t=o.group)||void 0===t||t,integer:(null!==(i=o.integers)&&void 0!==i?i:0)-(null!==(n=o.decimals)&&void 0!==n?n:0)};e.target.value=null!=o.min&&o.min>parseFloat(e.target.value)?s(o.min.toString(),d,!0):null!=o.max&&o.max<parseFloat(e.target.value)?s(o.max.toString(),d,!0):s(e.target.value,d,!0)}else null!=o.min&&o.min>parseFloat(e.target.value)?e.target.value=o.min.toString():null!=o.max&&o.max<parseFloat(e.target.value)&&(e.target.value=o.max.toString());o.onChange&&o.onChange(e)},onClick:o.onClick,onFocus:o.onFocus,onInput:o.onInput,onKeyDown:o.onKeyDown,onKeyPress:e=>{var l,t,i,d,a;if(!F)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,o=n.ketchup.math.decimalSeparator();return t.value.includes(o)||(t.value=t.value.slice(0,i)+o+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=o.allowNegative)||void 0===t||t,decimal:o.decimals,group:null===(i=o.group)||void 0===i||i,integer:(null!==(d=o.integers)&&void 0!==d?d:0)-(null!==(a=o.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),o.trailingIcon?k:void 0,o.helperIcon&&o.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},w))):o.helperIcon&&o.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},w))):void 0,o.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:o.onMinusClick},h),e("button",{onClick:o.onPlusClick},b)),o.isClearable&&o.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:o.onClearIconClick}):void 0))}const s=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i},c=()=>{o&&(o.remove(),o=null)},r=(e,l)=>{l&&0!==l.length&&(o?(o.innerText=l,u(o,e)):(o=document.createElement("div"),o.className="kup-helper-tooltip",o.innerText=l,document.body.appendChild(o),u(o,e)))},u=(e,l)=>{const t=10,i=window.innerWidth,n=window.innerHeight,o=e.getBoundingClientRect(),d=o.width,a=o.height;let s=l.clientX+t,c=l.clientY+t;s+d>i&&(s=l.clientX-d-t,s<0&&(s=i-d-t)),c+a>n&&(c=l.clientY-a-t,c<0&&(c=n-a-t)),s=Math.max(t,Math.min(s,i-d-t)),c=Math.max(t,Math.min(c,n-a-t)),e.style.left=`${s}px`,e.style.top=`${c}px`};export{d as F}
@@ -1 +1 @@
1
- import{r as t,c as i,f as e,h as o,H as s,d as r}from"./p-710d0a7d.js";import{k as n,A as a,g as h,s as l,a8 as c,x as p,b as d,d as b,h as u,V as f,Y as x,aG as g,_ as k,u as m}from"./p-af914cdf.js";import{f as w,p as v,s as y}from"./p-8b5ab195.js";import{F as _}from"./p-cc9db65d.js";import{d as j}from"./p-22e5d270.js";import{c as z}from"./p-635bb4b3.js";import{F as C}from"./p-ec727684.js";import{p as P,r as M,F as A}from"./p-7e2316a5.js";import{F as R}from"./p-7db300e0.js";import"./p-36edcc02.js";import"./p-ff735e62.js";import"./p-e3062c19.js";import"./p-ef3112d4.js";import"./p-d6bf9d14.js";import"./p-65240069.js";import"./p-c56195a0.js";var I,S;!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={})),function(t){t.CONSTANT="constant",t.CONSTANT_INCREMENT="constant_increment",t.PROGRESSIVE_THRESHOLD="progressive_threshold"}(S||(S={}));class E{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1,this.loadMoreLimit=1e3,this.showLoadMore=!1}toDebugString(){return"box state"}}var O,W,D,B,T,$,L,F,H,N,G,V=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)},K=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const q=class{constructor(e){t(this,e),this.kupBoxClick=i(this,"kup-box-click",6),this.kupBoxSelected=i(this,"kup-box-selected",6),this.kupAutoBoxSelect=i(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=i(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=i(this,"kup-box-rowactionclick",6),this.kupDidLoad=i(this,"kup-box-didload",6),this.kupDidUnload=i(this,"kup-box-didunload",6),this.kupBoxContextMenu=i(this,"kup-box-contextmenu",6),this.kupLoadMoreClick=i(this,"kup-box-loadmoreclick",6),this.kupBoxCellClick=i(this,"kup-box-cell-click",6),O.add(this),this.state=new E,D.set(this,n()),this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),T.set(this,[]),$.set(this,0),L.set(this,0),F.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.loadMoreLimit=1e3,this.loadMoreMode=S.PROGRESSIVE_THRESHOLD,this.loadMoreStep=60,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showLoadMore=!1,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1,this.visibleColumns=void 0}initWithPersistedState(){if(this.store&&this.stateId){this.state.load=!0;const t=this.store.getState(this.stateId);null!=t&&(V(this,D,"f").debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=t.sortBy,this.globalFilterValue=t.globalFilterValue,this.selectedRowsState=t.selectedRowsState,this.pageSelected=t.pageSelected,this.rowsPerPage=t.rowsPerPage,this.loadMoreLimit=t.loadMoreLimit,this.showLoadMore=t.showLoadMore)}}persistState(){if(this.store&&this.stateId){let t=V(this,O,"m",W).call(this);if(!this.state.load)return void(this.state.load=!0);t&&(V(this,D,"f").debug.logMessage(this,"Persisting stateId "+this.stateId),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,I,t)}async loadRowActions(t,i){t.actions=i,this.rowActionMenuOpened=t}async refresh(){e(this)}async setProps(t){l(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}getVisibleColumns(){let t=this.getColumns().filter((t=>{const i=!V(this,D,"f").data.column.isCodVer(t);return this.visibleColumns?i&&this.visibleColumns.includes(t.name):i&&(!("visible"in t)||t.visible)}));return this.visibleColumns&&(t=t.sort(((t,i)=>this.visibleColumns.indexOf(t.name)-this.visibleColumns.indexOf(i.name)))),t}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.getColumns(),void 0,void 0,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let i=t;return this.sortBy&&(i=y(i,this.toSortObjectList())),i}toSortObjectList(){return this.sortBy.split("|").map((t=>{const i=t.split(",");return{column:i[0],sortMode:i.length>1?c[i[1]]:c.A}}))}checkScrollOnHover(){this.boxContainer&&(V(this,D,"f").scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||V(this,D,"f").scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&V(this,D,"f").scrollOnHover.register(this.boxContainer))}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},i=this.getVisibleColumns();let e=i.length,o=[],s=0;for(;e-- >0;)o.push({column:i[s++].name});t.content=o,this.boxLayout={sections:[t]}}onSortChange(t){let i=p(this.getVisibleColumns(),t.detail.value);this.sortBy=i.name}onGlobalFilterChange({detail:t}){let i="";t&&t.value&&(i=t.value),this.globalFilterValue=i}isSectionExpanded(t,i){return!(!t.id||!i.id)&&this.collapsedSection[i.id]&&this.collapsedSection[i.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,i){let e=null,o=null,s=null,r=null;if(t)for(let i=t.length-1;i>=0;i--){let o=t[i];o.tagName&&(o.tagName.toUpperCase(),o.classList.contains("box-object")&&(e=o),!s&&o["data-row"]&&(s=o["data-row"]))}if(e)if(e.classList.contains("f-cell")){const t=e["kup-get-cell-props"]();o=t.cell,r=t.column,s=t.row}else o=e["data-cell"],s=e["data-row"],r=p(this.getVisibleColumns(),e.dataset.column);return{boxObject:e||null,column:r||null,cell:o||null,originalEvent:i,row:s||null}}clickHandler(t){const i=this.getEventDetails(V(this,D,"f").getEventPath(t.target,this.rootElement),t);return i.row&&(this.multiSelection?this.onSelectionCheckChange(i.row):this.selectedRows=[i.row]),i}contextMenuHandler(t){return this.getEventDetails(V(this,D,"f").getEventPath(t.target,this.rootElement),t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onSelectionCheckChange(t){var i=-1;for(let e=0;e<this.selectedRows.length;e++)if(this.selectedRows[e].id===t.id){i=e;break}i>=0?(this.selectedRows.splice(i,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,i){if(i.id)if(t.id){if(this.collapsedSection[i.id]){const e=this.collapsedSection[i.id];e[t.id]=!e[t.id]||!e[t.id]}else this.collapsedSection[i.id]={},this.collapsedSection[i.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,i,e){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:i,index:e})}clickFunction(t){try{const i=t.composedPath();for(let t of i)if(this.checkIfElementIsActionMenuIcon(t))return}catch(i){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const i=P(t,this.filteredRows.length,this.currentRowsPerPage);i&&(this.currentPage=i)}handleRowsPerPageChange(t){const i=M(t,this.filteredRows.length);i&&(this.currentRowsPerPage=i,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let i=!1;const e={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]},s=this.getVisibleColumns();for(let i=0;i<s.length;i++){const o=s[i];!1!==o.visible&&(e.cell.push(t.cells[o.name]),e.columns.push(o))}for(const i in t.cells)if(t.cells.hasOwnProperty(i)){const o=t.cells[i];if(void 0!==o.cardID&&o.obj)switch(o.obj.p){case"BTN":do{e.button.push({})}while(e.button.length<o.cardID);e.button[o.cardID]={label:o.value};break;case"IMG":do{e.image.push({})}while(e.image.length<o.cardID);e.image[o.cardID]={resource:o.value};break;case"PGB":do{e.progressbar.push({})}while(e.progressbar.length<o.cardID);e.progressbar[o.cardID]={value:o.value};break;default:do{e.text.push("")}while(e.text.length<o.cardID);e.text[o.cardID]=o.value}}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(void 0===s.cardID&&s.obj)switch(i=!1,s.obj.p){case"BTN":for(let t=0;t<e.button.length;t++)if(!Object.keys(e.button[t]).length){e.button[t]={label:s.value},i=!0;break}i||e.button.push({label:s.value});break;case"IMG":for(let t=0;t<e.image.length;t++)if(!Object.keys(e.image[t]).length){e.image[t]={resource:s.value},i=!0;break}i||e.image.push({resource:s.value});break;case"PGB":for(let t=0;t<e.progressbar.length;t++)if(!Object.keys(e.progressbar[t]).length){e.progressbar[t]={value:s.value},i=!0;break}i||e.progressbar.push({value:s.value});break;default:for(let t=0;t<e.text.length;t++)if(""===e.text[t]){e.text[t]=s.value,i=!0;break}i||e.text.push(s.value)}}return o("kup-card",Object.assign({data:e},this.cardData))}renderRow(t){const i=[...this.getVisibleColumns()];let e=null,s=t.layout;s||(s=this.boxLayout);let r=!1;if(s){s.horizontal&&(r=!0);const o=s.sections;let n=o.length,a=0;n>0&&(e=[]);const h={horizontal:r};if(null!=this.cardData&&"object"==typeof this.cardData)e.push(this.renderSectionAsCard(t));else for(;n-- >0;)e.push(this.renderSection(o[a++],h,t,i))}var n=!1;for(let i of this.selectedRows)i.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:n})));let h=null;if(this.enableRowActions&&!this.swipeDisabled){const i={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let e=null;if(t.actions){const i=t.actions.map(((i,e)=>o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,i,e)},o("div",{class:`icon ${i.icon}`}),o("div",{class:"text"},i.text))));e=o("ul",null,i)}h=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:i},e)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),o("div",{class:"box-wrapper",style:t.style||{},ref:t=>{t&&V(this,T,"f").push(t)}},o("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},"data-row":t,ref:t=>this.rowsRefs.push(t)},a,e,l),h)}renderSection(t,i,e,s){let r=null;if(t.sections&&t.sections.length>0){const i=t.sections;let o=i.length,n=0;for(o>0&&(r=[]);o-- >0;)r.push(this.renderSection(i[n++],t,e,s))}else if(t.content){const i=t.content;let o=i.length,n=0;for(o>0&&(r=[]);o-- >0;)r.push(this.renderBoxObject({boxObject:i[n++],row:e,visibleColumns:s},!0))}else s.length>0&&(r=this.renderBoxObject({boxObject:{column:s[0].name},row:e,visibleColumns:s}));const n=this.isSectionExpanded(e,t),a=!!t.columns,h={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},l=t.style||{};t.dim&&i&&(l.overflow="hidden",i.horizontal&&(l.flex=`0 0 ${t.dim}`,l.maxWidth=t.dim)),a&&(l["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const i={content:!0};let s="";s=t.title?t.title:n?V(this,D,"f").language.translate(d.COLLAPSE):V(this,D,"f").language.translate(d.EXPAND),c=o("div",{class:h,style:l},o("div",{class:i},r),o("div",{class:"header",role:"button",onClick:i=>{i.stopPropagation(),this.toggleSectionExpand(e,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const i=t.title?o("h3",null,t.title):null;c=o("div",{class:h,style:l},i,r)}return c}renderBoxObject({boxObject:t,row:i,visibleColumns:e},s){const r={"box-object":!0};let n=null,a=-1;for(let i=0;i<e.length;i++)if(e[i].name===t.column){a=i;break}a>=0?(n=e[a],e.splice(a,1)):s&&(n=this.data.columns.find((i=>i.name===t.column)));const h=i.cells[t.column];let l;return h&&!V(this,D,"f").objects.isEmptyKupObj(h.obj)&&(r["is-obj"]=!0,V(this,D,"f").debug.isDebug()&&(l=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"),h.isEditable||(h.cssClass=V(this,D,"f").data.cell.getObjectRelatedStyleClasses(h.obj,h.cssClass))),o("div",{"data-cell":h,"data-row":i,"data-column":t.column,class:r,style:{},title:l},h&&n?o(C,Object.assign({},{cell:h,column:n,component:this,editable:this.editableData,renderKup:!0,row:i,setSizes:!0,shape:t.shape})):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return V(this,D,"f").debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),V(this,D,"f").language.translate(d.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let i=0;i<this.kanban.labels.length;i++)t.push({labels:this.kanban.labels[i],nodes:[]});for(let i=0;i<this.rows.length;i++){let e=[];for(let t=0;t<this.kanban.columns.length;t++)try{e.push(this.rows[i].cells[this.kanban.columns[t]].value)}catch(t){V(this,D,"f").debug.logMessage(this,t,u.WARNING)}const o={found:!1,index:null};for(let i=0;i<t.length;i++){let s=t[i].labels,r=!0;for(let t=0;t<s.length;t++)if(e[t]!==s[t]){r=!1;break}if(r){o.found=!0,o.index=i;break}}o.found?t[o.index].nodes.push(this.renderRow(this.rows[i])):t.push({labels:e,nodes:[this.renderRow(this.rows[i])]})}const i=[];for(let e=0;e<t.length;e++){const s=t[e].labels,r={data:[]};for(let t=0;t<s.length;t++)r.data.push({value:s[t],id:s[t]});i.push(o("div",{class:"kanban-section"},o(j,Object.assign({},r)),t[e].nodes))}return{jsx:i,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),V(this,D,"f").interact.on(this.boxContainer,f.TAP,(t=>{var i;if(this.hold)this.hold=!1;else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];const o=this.clickHandler(e);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:null===(i=o.column)||void 0===i?void 0:i.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),V(this,D,"f").interact.on(this.boxContainer,f.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const i=this.rowsRefs[t],e=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.getVisibleColumns(),t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};i&&!this.interactableDrag.includes(i)&&(this.interactableDrag.push(i),V(this,D,"f").interact.draggable(i,{allowFrom:".box-object",cursorChecker:()=>null},{callback:e},x.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t)return void V(this,D,"f").debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",u.WARNING);const i=V(this,D,"f").getEventPath(t,this.rootElement),e=this.getEventDetails(i);return{cell:e.cell,column:e.column,id:this.rootElement.id,row:e.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),V(this,D,"f").interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:k.BOX}));for(let i=0;i<this.rowsRefs.length;i++){const e=this.rowsRefs[i];e&&!this.interactableDrop.includes(e)&&(this.interactableDrop.push(e),V(this,D,"f").interact.dropzone(e,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:k.BOX}))}}}componentWillLoad(){V(this,D,"f").debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),V(this,D,"f").language.register(this),V(this,D,"f").theme.register(this),this.initWithPersistedState(),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?K(this,$,document.querySelector(".header").clientHeight,"f"):K(this,$,0,"f"),document.querySelector(".topbar")&&K(this,$,V(this,$,"f")+document.querySelector(".topbar").clientHeight,"f"),V(this,O,"m",N).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((i=>t.indexOf(i.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),V(this,D,"f").debug.logLoad(this,!0)}componentWillRender(){V(this,D,"f").debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++)R(i[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),V(this,O,"m",H).call(this),V(this,D,"f").debug.logRender(this,!0)}render(){K(this,T,[],"f");const t=!("object"!=typeof this.kanban||null===this.kanban);let i=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.getVisibleColumns().map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let e={label:V(this,D,"f").language.translate(d.SORT_BY),trailingIcon:!0};i=o("div",{id:"sort-panel"},o("kup-combobox",{data:{"kup-text-field":e,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let e=null;this.globalFilter&&(e=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:!0,label:V(this,D,"f").language.translate(m.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let r=null;(this.showLoadMore||!this.lazyLoadRows&&this.pagination)&&(r=o(A,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,maxRowsPerPage:Number.MAX_VALUE,onLoadMore:this.showLoadMore?()=>{V(this,O,"m",G).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 n=null,a={};if(0===this.rows.length)n=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},V(this,D,"f").language.translate(d.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();n=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let i=t.length,e=0;for(n=[];i-- >0;)n.push(this.renderRow(t[e++]))}return o(s,{"onKup-cell-click":t=>{this.kupBoxCellClick.emit(t.detail)}},o("style",null,V(this,D,"f").theme.setKupStyle(this.rootElement)),o("div",{id:z},o("div",{class:"box-component",ref:t=>this.sectionRef=t},i,e,r,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){V(this,D,"f").interact.unregister(this.interactableDrag.concat(this.interactableDrop)),V(this,D,"f").language.unregister(this),V(this,D,"f").theme.unregister(this),this.scrollOnHover&&V(this,D,"f").scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return r(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};D=new WeakMap,B=new WeakMap,T=new WeakMap,$=new WeakMap,L=new WeakMap,F=new WeakMap,O=new WeakSet,W=function(){let t=!1;V(this,D,"f").objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),V(this,D,"f").objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),V(this,D,"f").objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),V(this,D,"f").objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const i=this.selectedRows.reduce(((t,i,e)=>t+(e>0?";":"")+i.id),"");return V(this,D,"f").objects.deepEqual(this.state.selectedRowsState,i)||(this.state.selectedRowsState=i,t=!0),V(this,D,"f").objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)||(this.state.loadMoreLimit=this.loadMoreLimit,t=!0),V(this,D,"f").objects.deepEqual(this.state.showLoadMore,this.showLoadMore)||(this.state.showLoadMore=this.showLoadMore,t=!0),t},H=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&V(this,B,"f").observe(V(this,T,"f")[V(this,T,"f").length-1])},N=function(){const t={threshold:0,rootMargin:"-"+V(this,$,"f")+"px 0px 0px 0px"};K(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){V(this,D,"f").debug.logMessage(this,"Last row entering the viewport, loading more elements.");const i=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=i<this.loadMoreStep?i:this.loadMoreStep,t.target.classList.remove("last-row"),V(this,B,"f").unobserve(t.target)}}))}),t),"f")},G=function(){var t;let i=0;switch(this.loadMoreMode){case S.CONSTANT:i=this.loadMoreStep;break;case S.CONSTANT_INCREMENT:i=this.loadMoreStep*(V(this,L,"f")+1);break;case S.PROGRESSIVE_THRESHOLD:i=Math.max(V(this,F,"f"),this.loadMoreStep)*Math.min(V(this,L,"f")+1,2)}i>this.loadMoreLimit&&(i=this.loadMoreLimit),this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i}),K(this,F,i,"f"),K(this,L,(t=V(this,L,"f"),++t),"f")},q.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-layer-1)\n );--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(\n --kup-box-border-color-drag,\n var(--kup-border-interactive)\n );display:block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05));--kup_box_border_radius:var(--kup-box-border-radius, var(--kup-radius-00));--kup_box_border_color:var(\n --kup-box-border-color,\n var(--kup-primary-color-60)\n );--kup_box_border_width:var(--kup-box-border-width, 0);--kup_box_border_style:var(--kup-box-border-style, none)}.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_box_border_radius);border-color:var(--kup_box_border_color);border-width:var(--kup_box_border_width);border-style:var(--kup_box_border_style)}#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)}";export{q as kup_box}
1
+ import{r as t,c as i,f as e,h as o,H as s,d as r}from"./p-710d0a7d.js";import{k as n,A as a,g as h,s as l,a8 as c,x as p,b as d,d as b,h as u,V as f,Y as x,aG as g,_ as k,u as m}from"./p-d66832f6.js";import{f as w,p as v,s as y}from"./p-49dfe632.js";import{F as _}from"./p-cc9db65d.js";import{d as j}from"./p-5434838f.js";import{c as z}from"./p-635bb4b3.js";import{F as C}from"./p-9600ce9a.js";import{p as P,r as M,F as A}from"./p-64c95c83.js";import{F as R}from"./p-7db300e0.js";import"./p-36edcc02.js";import"./p-ff735e62.js";import"./p-e3062c19.js";import"./p-ef3112d4.js";import"./p-131d02e5.js";import"./p-e59fd0c5.js";import"./p-c56195a0.js";var I,S;!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={})),function(t){t.CONSTANT="constant",t.CONSTANT_INCREMENT="constant_increment",t.PROGRESSIVE_THRESHOLD="progressive_threshold"}(S||(S={}));class E{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1,this.loadMoreLimit=1e3,this.showLoadMore=!1}toDebugString(){return"box state"}}var O,W,D,B,T,$,L,F,H,N,G,V=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)},K=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const q=class{constructor(e){t(this,e),this.kupBoxClick=i(this,"kup-box-click",6),this.kupBoxSelected=i(this,"kup-box-selected",6),this.kupAutoBoxSelect=i(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=i(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=i(this,"kup-box-rowactionclick",6),this.kupDidLoad=i(this,"kup-box-didload",6),this.kupDidUnload=i(this,"kup-box-didunload",6),this.kupBoxContextMenu=i(this,"kup-box-contextmenu",6),this.kupLoadMoreClick=i(this,"kup-box-loadmoreclick",6),this.kupBoxCellClick=i(this,"kup-box-cell-click",6),O.add(this),this.state=new E,D.set(this,n()),this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),T.set(this,[]),$.set(this,0),L.set(this,0),F.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.loadMoreLimit=1e3,this.loadMoreMode=S.PROGRESSIVE_THRESHOLD,this.loadMoreStep=60,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showLoadMore=!1,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1,this.visibleColumns=void 0}initWithPersistedState(){if(this.store&&this.stateId){this.state.load=!0;const t=this.store.getState(this.stateId);null!=t&&(V(this,D,"f").debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=t.sortBy,this.globalFilterValue=t.globalFilterValue,this.selectedRowsState=t.selectedRowsState,this.pageSelected=t.pageSelected,this.rowsPerPage=t.rowsPerPage,this.loadMoreLimit=t.loadMoreLimit,this.showLoadMore=t.showLoadMore)}}persistState(){if(this.store&&this.stateId){let t=V(this,O,"m",W).call(this);if(!this.state.load)return void(this.state.load=!0);t&&(V(this,D,"f").debug.logMessage(this,"Persisting stateId "+this.stateId),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,I,t)}async loadRowActions(t,i){t.actions=i,this.rowActionMenuOpened=t}async refresh(){e(this)}async setProps(t){l(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}getVisibleColumns(){let t=this.getColumns().filter((t=>{const i=!V(this,D,"f").data.column.isCodVer(t);return this.visibleColumns?i&&this.visibleColumns.includes(t.name):i&&(!("visible"in t)||t.visible)}));return this.visibleColumns&&(t=t.sort(((t,i)=>this.visibleColumns.indexOf(t.name)-this.visibleColumns.indexOf(i.name)))),t}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.getColumns(),void 0,void 0,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let i=t;return this.sortBy&&(i=y(i,this.toSortObjectList())),i}toSortObjectList(){return this.sortBy.split("|").map((t=>{const i=t.split(",");return{column:i[0],sortMode:i.length>1?c[i[1]]:c.A}}))}checkScrollOnHover(){this.boxContainer&&(V(this,D,"f").scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||V(this,D,"f").scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&V(this,D,"f").scrollOnHover.register(this.boxContainer))}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},i=this.getVisibleColumns();let e=i.length,o=[],s=0;for(;e-- >0;)o.push({column:i[s++].name});t.content=o,this.boxLayout={sections:[t]}}onSortChange(t){let i=p(this.getVisibleColumns(),t.detail.value);this.sortBy=i.name}onGlobalFilterChange({detail:t}){let i="";t&&t.value&&(i=t.value),this.globalFilterValue=i}isSectionExpanded(t,i){return!(!t.id||!i.id)&&this.collapsedSection[i.id]&&this.collapsedSection[i.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,i){let e=null,o=null,s=null,r=null;if(t)for(let i=t.length-1;i>=0;i--){let o=t[i];o.tagName&&(o.tagName.toUpperCase(),o.classList.contains("box-object")&&(e=o),!s&&o["data-row"]&&(s=o["data-row"]))}if(e)if(e.classList.contains("f-cell")){const t=e["kup-get-cell-props"]();o=t.cell,r=t.column,s=t.row}else o=e["data-cell"],s=e["data-row"],r=p(this.getVisibleColumns(),e.dataset.column);return{boxObject:e||null,column:r||null,cell:o||null,originalEvent:i,row:s||null}}clickHandler(t){const i=this.getEventDetails(V(this,D,"f").getEventPath(t.target,this.rootElement),t);return i.row&&(this.multiSelection?this.onSelectionCheckChange(i.row):this.selectedRows=[i.row]),i}contextMenuHandler(t){return this.getEventDetails(V(this,D,"f").getEventPath(t.target,this.rootElement),t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onSelectionCheckChange(t){var i=-1;for(let e=0;e<this.selectedRows.length;e++)if(this.selectedRows[e].id===t.id){i=e;break}i>=0?(this.selectedRows.splice(i,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,i){if(i.id)if(t.id){if(this.collapsedSection[i.id]){const e=this.collapsedSection[i.id];e[t.id]=!e[t.id]||!e[t.id]}else this.collapsedSection[i.id]={},this.collapsedSection[i.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,i,e){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:i,index:e})}clickFunction(t){try{const i=t.composedPath();for(let t of i)if(this.checkIfElementIsActionMenuIcon(t))return}catch(i){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const i=P(t,this.filteredRows.length,this.currentRowsPerPage);i&&(this.currentPage=i)}handleRowsPerPageChange(t){const i=M(t,this.filteredRows.length);i&&(this.currentRowsPerPage=i,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let i=!1;const e={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]},s=this.getVisibleColumns();for(let i=0;i<s.length;i++){const o=s[i];!1!==o.visible&&(e.cell.push(t.cells[o.name]),e.columns.push(o))}for(const i in t.cells)if(t.cells.hasOwnProperty(i)){const o=t.cells[i];if(void 0!==o.cardID&&o.obj)switch(o.obj.p){case"BTN":do{e.button.push({})}while(e.button.length<o.cardID);e.button[o.cardID]={label:o.value};break;case"IMG":do{e.image.push({})}while(e.image.length<o.cardID);e.image[o.cardID]={resource:o.value};break;case"PGB":do{e.progressbar.push({})}while(e.progressbar.length<o.cardID);e.progressbar[o.cardID]={value:o.value};break;default:do{e.text.push("")}while(e.text.length<o.cardID);e.text[o.cardID]=o.value}}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(void 0===s.cardID&&s.obj)switch(i=!1,s.obj.p){case"BTN":for(let t=0;t<e.button.length;t++)if(!Object.keys(e.button[t]).length){e.button[t]={label:s.value},i=!0;break}i||e.button.push({label:s.value});break;case"IMG":for(let t=0;t<e.image.length;t++)if(!Object.keys(e.image[t]).length){e.image[t]={resource:s.value},i=!0;break}i||e.image.push({resource:s.value});break;case"PGB":for(let t=0;t<e.progressbar.length;t++)if(!Object.keys(e.progressbar[t]).length){e.progressbar[t]={value:s.value},i=!0;break}i||e.progressbar.push({value:s.value});break;default:for(let t=0;t<e.text.length;t++)if(""===e.text[t]){e.text[t]=s.value,i=!0;break}i||e.text.push(s.value)}}return o("kup-card",Object.assign({data:e},this.cardData))}renderRow(t){const i=[...this.getVisibleColumns()];let e=null,s=t.layout;s||(s=this.boxLayout);let r=!1;if(s){s.horizontal&&(r=!0);const o=s.sections;let n=o.length,a=0;n>0&&(e=[]);const h={horizontal:r};if(null!=this.cardData&&"object"==typeof this.cardData)e.push(this.renderSectionAsCard(t));else for(;n-- >0;)e.push(this.renderSection(o[a++],h,t,i))}var n=!1;for(let i of this.selectedRows)i.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:n})));let h=null;if(this.enableRowActions&&!this.swipeDisabled){const i={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let e=null;if(t.actions){const i=t.actions.map(((i,e)=>o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,i,e)},o("div",{class:`icon ${i.icon}`}),o("div",{class:"text"},i.text))));e=o("ul",null,i)}h=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:i},e)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),o("div",{class:"box-wrapper",style:t.style||{},ref:t=>{t&&V(this,T,"f").push(t)}},o("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},"data-row":t,ref:t=>this.rowsRefs.push(t)},a,e,l),h)}renderSection(t,i,e,s){let r=null;if(t.sections&&t.sections.length>0){const i=t.sections;let o=i.length,n=0;for(o>0&&(r=[]);o-- >0;)r.push(this.renderSection(i[n++],t,e,s))}else if(t.content){const i=t.content;let o=i.length,n=0;for(o>0&&(r=[]);o-- >0;)r.push(this.renderBoxObject({boxObject:i[n++],row:e,visibleColumns:s},!0))}else s.length>0&&(r=this.renderBoxObject({boxObject:{column:s[0].name},row:e,visibleColumns:s}));const n=this.isSectionExpanded(e,t),a=!!t.columns,h={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},l=t.style||{};t.dim&&i&&(l.overflow="hidden",i.horizontal&&(l.flex=`0 0 ${t.dim}`,l.maxWidth=t.dim)),a&&(l["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const i={content:!0};let s="";s=t.title?t.title:n?V(this,D,"f").language.translate(d.COLLAPSE):V(this,D,"f").language.translate(d.EXPAND),c=o("div",{class:h,style:l},o("div",{class:i},r),o("div",{class:"header",role:"button",onClick:i=>{i.stopPropagation(),this.toggleSectionExpand(e,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const i=t.title?o("h3",null,t.title):null;c=o("div",{class:h,style:l},i,r)}return c}renderBoxObject({boxObject:t,row:i,visibleColumns:e},s){const r={"box-object":!0};let n=null,a=-1;for(let i=0;i<e.length;i++)if(e[i].name===t.column){a=i;break}a>=0?(n=e[a],e.splice(a,1)):s&&(n=this.data.columns.find((i=>i.name===t.column)));const h=i.cells[t.column];let l;return h&&!V(this,D,"f").objects.isEmptyKupObj(h.obj)&&(r["is-obj"]=!0,V(this,D,"f").debug.isDebug()&&(l=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"),h.isEditable||(h.cssClass=V(this,D,"f").data.cell.getObjectRelatedStyleClasses(h.obj,h.cssClass))),o("div",{"data-cell":h,"data-row":i,"data-column":t.column,class:r,style:{},title:l},h&&n?o(C,Object.assign({},{cell:h,column:n,component:this,editable:this.editableData,renderKup:!0,row:i,setSizes:!0,shape:t.shape})):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return V(this,D,"f").debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),V(this,D,"f").language.translate(d.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let i=0;i<this.kanban.labels.length;i++)t.push({labels:this.kanban.labels[i],nodes:[]});for(let i=0;i<this.rows.length;i++){let e=[];for(let t=0;t<this.kanban.columns.length;t++)try{e.push(this.rows[i].cells[this.kanban.columns[t]].value)}catch(t){V(this,D,"f").debug.logMessage(this,t,u.WARNING)}const o={found:!1,index:null};for(let i=0;i<t.length;i++){let s=t[i].labels,r=!0;for(let t=0;t<s.length;t++)if(e[t]!==s[t]){r=!1;break}if(r){o.found=!0,o.index=i;break}}o.found?t[o.index].nodes.push(this.renderRow(this.rows[i])):t.push({labels:e,nodes:[this.renderRow(this.rows[i])]})}const i=[];for(let e=0;e<t.length;e++){const s=t[e].labels,r={data:[]};for(let t=0;t<s.length;t++)r.data.push({value:s[t],id:s[t]});i.push(o("div",{class:"kanban-section"},o(j,Object.assign({},r)),t[e].nodes))}return{jsx:i,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),V(this,D,"f").interact.on(this.boxContainer,f.TAP,(t=>{var i;if(this.hold)this.hold=!1;else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];const o=this.clickHandler(e);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:null===(i=o.column)||void 0===i?void 0:i.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),V(this,D,"f").interact.on(this.boxContainer,f.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const i=this.rowsRefs[t],e=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.getVisibleColumns(),t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};i&&!this.interactableDrag.includes(i)&&(this.interactableDrag.push(i),V(this,D,"f").interact.draggable(i,{allowFrom:".box-object",cursorChecker:()=>null},{callback:e},x.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t)return void V(this,D,"f").debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",u.WARNING);const i=V(this,D,"f").getEventPath(t,this.rootElement),e=this.getEventDetails(i);return{cell:e.cell,column:e.column,id:this.rootElement.id,row:e.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),V(this,D,"f").interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:k.BOX}));for(let i=0;i<this.rowsRefs.length;i++){const e=this.rowsRefs[i];e&&!this.interactableDrop.includes(e)&&(this.interactableDrop.push(e),V(this,D,"f").interact.dropzone(e,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:k.BOX}))}}}componentWillLoad(){V(this,D,"f").debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),V(this,D,"f").language.register(this),V(this,D,"f").theme.register(this),this.initWithPersistedState(),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?K(this,$,document.querySelector(".header").clientHeight,"f"):K(this,$,0,"f"),document.querySelector(".topbar")&&K(this,$,V(this,$,"f")+document.querySelector(".topbar").clientHeight,"f"),V(this,O,"m",N).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((i=>t.indexOf(i.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),V(this,D,"f").debug.logLoad(this,!0)}componentWillRender(){V(this,D,"f").debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++)R(i[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),V(this,O,"m",H).call(this),V(this,D,"f").debug.logRender(this,!0)}render(){K(this,T,[],"f");const t=!("object"!=typeof this.kanban||null===this.kanban);let i=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.getVisibleColumns().map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let e={label:V(this,D,"f").language.translate(d.SORT_BY),trailingIcon:!0};i=o("div",{id:"sort-panel"},o("kup-combobox",{data:{"kup-text-field":e,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let e=null;this.globalFilter&&(e=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:!0,label:V(this,D,"f").language.translate(m.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let r=null;(this.showLoadMore||!this.lazyLoadRows&&this.pagination)&&(r=o(A,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,maxRowsPerPage:Number.MAX_VALUE,onLoadMore:this.showLoadMore?()=>{V(this,O,"m",G).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 n=null,a={};if(0===this.rows.length)n=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},V(this,D,"f").language.translate(d.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();n=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let i=t.length,e=0;for(n=[];i-- >0;)n.push(this.renderRow(t[e++]))}return o(s,{"onKup-cell-click":t=>{this.kupBoxCellClick.emit(t.detail)}},o("style",null,V(this,D,"f").theme.setKupStyle(this.rootElement)),o("div",{id:z},o("div",{class:"box-component",ref:t=>this.sectionRef=t},i,e,r,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){V(this,D,"f").interact.unregister(this.interactableDrag.concat(this.interactableDrop)),V(this,D,"f").language.unregister(this),V(this,D,"f").theme.unregister(this),this.scrollOnHover&&V(this,D,"f").scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return r(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};D=new WeakMap,B=new WeakMap,T=new WeakMap,$=new WeakMap,L=new WeakMap,F=new WeakMap,O=new WeakSet,W=function(){let t=!1;V(this,D,"f").objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),V(this,D,"f").objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),V(this,D,"f").objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),V(this,D,"f").objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const i=this.selectedRows.reduce(((t,i,e)=>t+(e>0?";":"")+i.id),"");return V(this,D,"f").objects.deepEqual(this.state.selectedRowsState,i)||(this.state.selectedRowsState=i,t=!0),V(this,D,"f").objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)||(this.state.loadMoreLimit=this.loadMoreLimit,t=!0),V(this,D,"f").objects.deepEqual(this.state.showLoadMore,this.showLoadMore)||(this.state.showLoadMore=this.showLoadMore,t=!0),t},H=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&V(this,B,"f").observe(V(this,T,"f")[V(this,T,"f").length-1])},N=function(){const t={threshold:0,rootMargin:"-"+V(this,$,"f")+"px 0px 0px 0px"};K(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){V(this,D,"f").debug.logMessage(this,"Last row entering the viewport, loading more elements.");const i=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=i<this.loadMoreStep?i:this.loadMoreStep,t.target.classList.remove("last-row"),V(this,B,"f").unobserve(t.target)}}))}),t),"f")},G=function(){var t;let i=0;switch(this.loadMoreMode){case S.CONSTANT:i=this.loadMoreStep;break;case S.CONSTANT_INCREMENT:i=this.loadMoreStep*(V(this,L,"f")+1);break;case S.PROGRESSIVE_THRESHOLD:i=Math.max(V(this,F,"f"),this.loadMoreStep)*Math.min(V(this,L,"f")+1,2)}i>this.loadMoreLimit&&(i=this.loadMoreLimit),this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i}),K(this,F,i,"f"),K(this,L,(t=V(this,L,"f"),++t),"f")},q.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-layer-1)\n );--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(\n --kup-box-border-color-drag,\n var(--kup-border-interactive)\n );display:block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05));--kup_box_border_radius:var(--kup-box-border-radius, var(--kup-radius-00));--kup_box_border_color:var(\n --kup-box-border-color,\n var(--kup-primary-color-60)\n );--kup_box_border_width:var(--kup-box-border-width, 0);--kup_box_border_style:var(--kup-box-border-style, none)}.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_box_border_radius);border-color:var(--kup_box_border_color);border-width:var(--kup_box_border_width);border-style:var(--kup_box_border_style)}#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)}";export{q as kup_box}
@@ -1 +1 @@
1
- import{r as i,f as n,h as t,H as e,d as a}from"./p-710d0a7d.js";import{k as l,g as o,s as p,h as r}from"./p-af914cdf.js";import{c as s}from"./p-635bb4b3.js";import"./p-36edcc02.js";var d;!function(i){i.columns="The number of columns displayed by the grid, the default behavior is 12.",i.customStyle="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization",i.singleLine="When set to true, forces the content on a single line."}(d||(d={}));const g=class{constructor(n){i(this,n),this.kupManager=l(),this.columns=12,this.customStyle="",this.singleLine=!1}async getProps(i){return o(this,d,i)}async refresh(){n(this)}async setProps(i){p(this,d,i)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const i=this.rootElement.children;if(!i||0===i.length)return void this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",r.WARNING);const n=[];for(let e=0;e<i.length;e++){let a=null;if(this.singleLine)a=t("slot",{name:`${e}`});else{const n=i[e].span||i[e].getAttribute("span")||1;a=t("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},t("slot",{name:`${e}`}))}n.push(a)}const a={};return this.columns&&12!==this.columns&&(a["--kup_grid_columns"]=this.columns),t(e,{style:a},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:s},t("div",{class:this.singleLine?"flex-layout":"layout-grid"},t("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};g.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);display:block;font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}:host(.kup-full-width.scalable-cards) .flex-layout__inner{width:100%}:host(.kup-full-width.scalable-cards) .flex-layout__inner *{margin:0;height:100%;width:100%}";export{g as kup_grid}
1
+ import{r as i,f as n,h as t,H as e,d as a}from"./p-710d0a7d.js";import{k as l,g as o,s as p,h as r}from"./p-d66832f6.js";import{c as s}from"./p-635bb4b3.js";import"./p-36edcc02.js";var d;!function(i){i.columns="The number of columns displayed by the grid, the default behavior is 12.",i.customStyle="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization",i.singleLine="When set to true, forces the content on a single line."}(d||(d={}));const g=class{constructor(n){i(this,n),this.kupManager=l(),this.columns=12,this.customStyle="",this.singleLine=!1}async getProps(i){return o(this,d,i)}async refresh(){n(this)}async setProps(i){p(this,d,i)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const i=this.rootElement.children;if(!i||0===i.length)return void this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",r.WARNING);const n=[];for(let e=0;e<i.length;e++){let a=null;if(this.singleLine)a=t("slot",{name:`${e}`});else{const n=i[e].span||i[e].getAttribute("span")||1;a=t("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},t("slot",{name:`${e}`}))}n.push(a)}const a={};return this.columns&&12!==this.columns&&(a["--kup_grid_columns"]=this.columns),t(e,{style:a},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:s},t("div",{class:this.singleLine?"flex-layout":"layout-grid"},t("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};g.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);display:block;font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}:host(.kup-full-width.scalable-cards) .flex-layout__inner{width:100%}:host(.kup-full-width.scalable-cards) .flex-layout__inner *{margin:0;height:100%;width:100%}";export{g as kup_grid}
@@ -1 +1 @@
1
- import{r as o,c as i,f as t,h as e,H as r,d as n}from"./p-710d0a7d.js";import{k as a,a as c,g as s,s as p,d as l,f as h,e as d}from"./p-af914cdf.js";import{F as u}from"./p-cc9db65d.js";import{c as f}from"./p-635bb4b3.js";import{M as m}from"./p-c56195a0.js";import"./p-36edcc02.js";var k;!function(o){o.customStyle="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization",o.data="List of elements.",o.infoIcon="When true, it will show the info activation icon",o.ripple="When enabled displays Material's ripple effect on item headers.",o.toolbar="When true, it will show the toolbar activation icon",o.sizing="Sets the type of the component sizing.",o.toolbarCallback="Callback to be called when the toolbar icon is clicked",o.infoCallback="Callback to be called when the info icon is clicked"}(k||(k={}));var _,g,v=function(o,i,t,e,r){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?o!==i||!r:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?r.call(o,t):r?r.value=t:i.set(o,t),t},b=function(o,i,t,e){if("a"===t&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?o!==i||!e:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?e:"a"===t?e.call(o):e?e.value:i.get(o)};const y=class{constructor(t){o(this,t),this.kupBlur=i(this,"kup-accordion-blur",6),this.kupClick=i(this,"kup-accordion-click",6),this.kupIconClick=i(this,"kup-accordion-iconclick",6),this.kupFocus=i(this,"kup-accordion-focus",6),this.kupToolbarItemClick=i(this,"kup-accordion-toolbaritemclick",6),this.toolbarState=[],this.infoState=[],this.kupManager=a(),_.set(this,null),this.slotsNames=[],g.set(this,null),this.selectedItems=[],this.customStyle="",this.data=null,this.infoIcon=!1,this.ripple=!1,this.sizing=c.SMALL,this.toolbarCallback=void 0,this.infoCallback=void 0}onKupBlur(o){this.kupBlur.emit({comp:this,id:this.rootElement.id,node:o})}onKupIconClick(o){o?(v(this,g,o,"f"),this.createDropDownToolbarList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupInfoIconClick(o){o?(v(this,g,o,"f"),this.createDropDownInfoList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupFocus(o){this.kupFocus.emit({comp:this,id:this.rootElement.id,node:o})}onKupToolbarItemClick(o){this.kupToolbarItemClick.emit({comp:this,id:this.rootElement.id,node:o.detail.selected})}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++)m.attachTo(i[o])}}updateSelectedItems(){var o;const i=[];if(null===(o=this.data)||void 0===o?void 0:o.length)for(let o=0;o<this.data.length;o++){const t=this.data[o];void 0===t.contentVisible&&(t.contentVisible=!0),t.contentVisible&&i.push(t.id)}this.selectedItems=i}async collapseAll(){const o=[];for(let i=0;i<this.data.length;i++){const t=this.data[i];!this.isItemExpandible(t)&&this.isItemSelected(t)&&o.push(t.id)}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.length;i++){const t=this.data[i];this.isItemExpandible(t)&&o.push(t.id)}this.selectedItems=o}async getProps(o){return s(this,k,o)}async refresh(){t(this)}async setProps(o){p(this,k,o)}async toggleItem(o){this.isItemExpandible(o)&&(void 0===o.contentVisible&&(o.contentVisible=!0),o.contentVisible=!o.contentVisible,this.updateSelectedItems(),this.kupClick.emit({comp:this,id:this.rootElement.id,node:o}))}isItemExpandible(o){return o.expandable||this.slotsNames.includes(o.id)}isItemSelected(o){return this.selectedItems.includes(o.id)}renderItems(){var o,i,t;const r=[],n=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<n.length;o++)this.slotsNames.push(n[o].slot);for(let n=0;n<this.data.length;n++){const a=this.data[n],c=this.isItemSelected(a),s=this.isItemExpandible(a),p={"accordion-item__header":!0,"accordion-item__header--selected":!(s||!c),"accordion-item__header--expanded":!(!s||!c),"mdc-ripple-surface":!!this.ripple,[`accordion-item--${this.sizing}`]:!!this.sizing},d={"accordion-item__content":!0,"accordion-item__content--selected":!!c},f=e("div",{class:"accordion-rigtbuttons"},this.infoIcon&&this.infoCallback&&e(u,{resource:"info_outline",sizeX:"16px",sizeY:"16px",onClick:async o=>{o.stopPropagation();const i=o.currentTarget;this.infoState=await this.infoCallback(),this.infoState.length>0?this.onKupInfoIconClick(i):this.kupManager.debug.logMessage(this,"InfoIcon data is empty, not opening dropdown.")},wrapperClass:"tab__iconToolbar iconInfo"}),(null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.toolbar)&&this.toolbarCallback&&e(u,{resource:"more_vert",sizeX:"16px",sizeY:"16px",onClick:async o=>{var i;o.stopPropagation();const t=o.currentTarget;this.toolbarState=await this.toolbarCallback(),(null===(i=this.toolbarState)||void 0===i?void 0:i.length)>0?this.onKupIconClick(t):this.kupManager.debug.logMessage(this,"Toolbar data is empty, not opening dropdown.")},wrapperClass:"tab__iconToolbar iconToolbar"}),s?e("div",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null);r.push(e("div",{class:"accordion-item"},e("div",{tabindex:n,title:null!==(i=a.title)&&void 0!==i?i:null,class:p,onClick:o=>{o.stopPropagation(),this.toggleItem(a)},onBlur:()=>this.onKupBlur(a),onFocus:()=>this.onKupFocus(a)},a.icon?e(u,{color:`var(${h.PRIMARY})`,resource:a.icon,placeholderResource:a.placeholderIcon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,a.value?e("span",{class:"accordion-item__text"},null!==(t=a.value)&&void 0!==t?t:""):null,f),e("div",{class:d},e("slot",{name:a.id}))))}return r}closeRowToolbarList(){this.toolbarList&&(this.kupManager.dynamicPosition.stop(this.toolbarList),this.kupManager.removeClickCallback(b(this,_,"f")),this.toolbarList.remove(),this.kupManager.dynamicPosition.unregister([this.toolbarList]),this.toolbarList=null)}createDropDownToolbarList(){if(!b(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.toolbarList&&this.closeRowToolbarList(),0===this.toolbarState.length)return void this.kupManager.debug.logMessage(this,"No toolbar state available.");const o=document.createElement("kup-toolbar");o.data=this.toolbarState,o.addEventListener("kup-toolbar-click",(o=>{this.onKupToolbarItemClick(o),setTimeout((()=>{this.closeRowToolbarList()}),0)})),this.toolbarList=o,v(this,_,{cb:()=>{this.closeRowToolbarList()},el:this.toolbarList},"f"),this.kupManager.addClickCallback(b(this,_,"f"),!0),this.rootElement.shadowRoot.appendChild(this.toolbarList),requestAnimationFrame((()=>{b(this,g,"f")?(this.kupManager.dynamicPosition.register(this.toolbarList,b(this,g,"f"),0,d.AUTO,!0),this.kupManager.dynamicPosition.start(this.toolbarList)):this.kupManager.debug.logMessage(this,"DropDown anchor is still null after delay!")}))}createDropDownInfoList(){if(!b(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.infoList&&this.closeInfoDataList(),0===this.infoState.length)return void this.kupManager.debug.logMessage(this,"No toolbar state available.");const o=document.createElement("kup-list");o.data=this.infoState,this.infoList=o,v(this,_,{cb:()=>{this.closeInfoDataList()},el:this.infoList},"f"),this.kupManager.addClickCallback(b(this,_,"f"),!0),this.rootElement.shadowRoot.appendChild(this.infoList),requestAnimationFrame((()=>{this.kupManager.dynamicPosition.register(this.infoList,b(this,g,"f"),0,d.AUTO,!0),this.kupManager.dynamicPosition.start(this.infoList)}))}closeInfoDataList(){this.infoList&&(this.kupManager.dynamicPosition.stop(this.infoList),this.kupManager.removeClickCallback(b(this,_,"f")),this.infoList.remove(),this.kupManager.dynamicPosition.unregister([this.infoList]),this.infoList=null)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.updateSelectedItems(),this.applyRipple(),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}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++)m.attachTo(i[o])}this.kupManager.debug.logRender(this,!0)}render(){const o=this.data&&this.data.length?this.renderItems():null;return e(r,{key:"f56fb81ab3b07c01ab9908efc6bbe9b374e12290"},e("style",{key:"be8a853e06166ca0819c2d058425e543ae3bca8f"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"5e89aa8ecb22e2dbffbcbf9a74c7c53a36ec0245",id:f},e("div",{key:"7a2837209e930360f6a71daedcf9a0f933979633",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{ripple:["applyRipple"],data:["updateSelectedItems"]}}};_=new WeakMap,g=new WeakMap,y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px;gap:var(--kup-space-03)}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header .f-image{margin:0}.accordion-item__header .accordion-rigtbuttons{margin-left:auto;margin-right:0;display:flex;gap:var(--kup-space-03)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";export{y as kup_accordion}
1
+ import{r as o,c as i,f as t,h as e,H as r,d as n}from"./p-710d0a7d.js";import{k as a,a as c,g as s,s as p,d as l,f as h,e as d}from"./p-d66832f6.js";import{F as u}from"./p-cc9db65d.js";import{c as f}from"./p-635bb4b3.js";import{M as m}from"./p-c56195a0.js";import"./p-36edcc02.js";var k;!function(o){o.customStyle="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization",o.data="List of elements.",o.infoIcon="When true, it will show the info activation icon",o.ripple="When enabled displays Material's ripple effect on item headers.",o.toolbar="When true, it will show the toolbar activation icon",o.sizing="Sets the type of the component sizing.",o.toolbarCallback="Callback to be called when the toolbar icon is clicked",o.infoCallback="Callback to be called when the info icon is clicked"}(k||(k={}));var _,g,v=function(o,i,t,e,r){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?o!==i||!r:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?r.call(o,t):r?r.value=t:i.set(o,t),t},b=function(o,i,t,e){if("a"===t&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?o!==i||!e:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?e:"a"===t?e.call(o):e?e.value:i.get(o)};const y=class{constructor(t){o(this,t),this.kupBlur=i(this,"kup-accordion-blur",6),this.kupClick=i(this,"kup-accordion-click",6),this.kupIconClick=i(this,"kup-accordion-iconclick",6),this.kupFocus=i(this,"kup-accordion-focus",6),this.kupToolbarItemClick=i(this,"kup-accordion-toolbaritemclick",6),this.toolbarState=[],this.infoState=[],this.kupManager=a(),_.set(this,null),this.slotsNames=[],g.set(this,null),this.selectedItems=[],this.customStyle="",this.data=null,this.infoIcon=!1,this.ripple=!1,this.sizing=c.SMALL,this.toolbarCallback=void 0,this.infoCallback=void 0}onKupBlur(o){this.kupBlur.emit({comp:this,id:this.rootElement.id,node:o})}onKupIconClick(o){o?(v(this,g,o,"f"),this.createDropDownToolbarList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupInfoIconClick(o){o?(v(this,g,o,"f"),this.createDropDownInfoList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupFocus(o){this.kupFocus.emit({comp:this,id:this.rootElement.id,node:o})}onKupToolbarItemClick(o){this.kupToolbarItemClick.emit({comp:this,id:this.rootElement.id,node:o.detail.selected})}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++)m.attachTo(i[o])}}updateSelectedItems(){var o;const i=[];if(null===(o=this.data)||void 0===o?void 0:o.length)for(let o=0;o<this.data.length;o++){const t=this.data[o];void 0===t.contentVisible&&(t.contentVisible=!0),t.contentVisible&&i.push(t.id)}this.selectedItems=i}async collapseAll(){const o=[];for(let i=0;i<this.data.length;i++){const t=this.data[i];!this.isItemExpandible(t)&&this.isItemSelected(t)&&o.push(t.id)}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.length;i++){const t=this.data[i];this.isItemExpandible(t)&&o.push(t.id)}this.selectedItems=o}async getProps(o){return s(this,k,o)}async refresh(){t(this)}async setProps(o){p(this,k,o)}async toggleItem(o){this.isItemExpandible(o)&&(void 0===o.contentVisible&&(o.contentVisible=!0),o.contentVisible=!o.contentVisible,this.updateSelectedItems(),this.kupClick.emit({comp:this,id:this.rootElement.id,node:o}))}isItemExpandible(o){return o.expandable||this.slotsNames.includes(o.id)}isItemSelected(o){return this.selectedItems.includes(o.id)}renderItems(){var o,i,t;const r=[],n=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<n.length;o++)this.slotsNames.push(n[o].slot);for(let n=0;n<this.data.length;n++){const a=this.data[n],c=this.isItemSelected(a),s=this.isItemExpandible(a),p={"accordion-item__header":!0,"accordion-item__header--selected":!(s||!c),"accordion-item__header--expanded":!(!s||!c),"mdc-ripple-surface":!!this.ripple,[`accordion-item--${this.sizing}`]:!!this.sizing},d={"accordion-item__content":!0,"accordion-item__content--selected":!!c},f=e("div",{class:"accordion-rigtbuttons"},this.infoIcon&&this.infoCallback&&e(u,{resource:"info_outline",sizeX:"16px",sizeY:"16px",onClick:async o=>{o.stopPropagation();const i=o.currentTarget;this.infoState=await this.infoCallback(),this.infoState.length>0?this.onKupInfoIconClick(i):this.kupManager.debug.logMessage(this,"InfoIcon data is empty, not opening dropdown.")},wrapperClass:"tab__iconToolbar iconInfo"}),(null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.toolbar)&&this.toolbarCallback&&e(u,{resource:"more_vert",sizeX:"16px",sizeY:"16px",onClick:async o=>{var i;o.stopPropagation();const t=o.currentTarget;this.toolbarState=await this.toolbarCallback(),(null===(i=this.toolbarState)||void 0===i?void 0:i.length)>0?this.onKupIconClick(t):this.kupManager.debug.logMessage(this,"Toolbar data is empty, not opening dropdown.")},wrapperClass:"tab__iconToolbar iconToolbar"}),s?e("div",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null);r.push(e("div",{class:"accordion-item"},e("div",{tabindex:n,title:null!==(i=a.title)&&void 0!==i?i:null,class:p,onClick:o=>{o.stopPropagation(),this.toggleItem(a)},onBlur:()=>this.onKupBlur(a),onFocus:()=>this.onKupFocus(a)},a.icon?e(u,{color:`var(${h.PRIMARY})`,resource:a.icon,placeholderResource:a.placeholderIcon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,a.value?e("span",{class:"accordion-item__text"},null!==(t=a.value)&&void 0!==t?t:""):null,f),e("div",{class:d},e("slot",{name:a.id}))))}return r}closeRowToolbarList(){this.toolbarList&&(this.kupManager.dynamicPosition.stop(this.toolbarList),this.kupManager.removeClickCallback(b(this,_,"f")),this.toolbarList.remove(),this.kupManager.dynamicPosition.unregister([this.toolbarList]),this.toolbarList=null)}createDropDownToolbarList(){if(!b(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.toolbarList&&this.closeRowToolbarList(),0===this.toolbarState.length)return void this.kupManager.debug.logMessage(this,"No toolbar state available.");const o=document.createElement("kup-toolbar");o.data=this.toolbarState,o.addEventListener("kup-toolbar-click",(o=>{this.onKupToolbarItemClick(o),setTimeout((()=>{this.closeRowToolbarList()}),0)})),this.toolbarList=o,v(this,_,{cb:()=>{this.closeRowToolbarList()},el:this.toolbarList},"f"),this.kupManager.addClickCallback(b(this,_,"f"),!0),this.rootElement.shadowRoot.appendChild(this.toolbarList),requestAnimationFrame((()=>{b(this,g,"f")?(this.kupManager.dynamicPosition.register(this.toolbarList,b(this,g,"f"),0,d.AUTO,!0),this.kupManager.dynamicPosition.start(this.toolbarList)):this.kupManager.debug.logMessage(this,"DropDown anchor is still null after delay!")}))}createDropDownInfoList(){if(!b(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.infoList&&this.closeInfoDataList(),0===this.infoState.length)return void this.kupManager.debug.logMessage(this,"No toolbar state available.");const o=document.createElement("kup-list");o.data=this.infoState,this.infoList=o,v(this,_,{cb:()=>{this.closeInfoDataList()},el:this.infoList},"f"),this.kupManager.addClickCallback(b(this,_,"f"),!0),this.rootElement.shadowRoot.appendChild(this.infoList),requestAnimationFrame((()=>{this.kupManager.dynamicPosition.register(this.infoList,b(this,g,"f"),0,d.AUTO,!0),this.kupManager.dynamicPosition.start(this.infoList)}))}closeInfoDataList(){this.infoList&&(this.kupManager.dynamicPosition.stop(this.infoList),this.kupManager.removeClickCallback(b(this,_,"f")),this.infoList.remove(),this.kupManager.dynamicPosition.unregister([this.infoList]),this.infoList=null)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.updateSelectedItems(),this.applyRipple(),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}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++)m.attachTo(i[o])}this.kupManager.debug.logRender(this,!0)}render(){const o=this.data&&this.data.length?this.renderItems():null;return e(r,{key:"f56fb81ab3b07c01ab9908efc6bbe9b374e12290"},e("style",{key:"be8a853e06166ca0819c2d058425e543ae3bca8f"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"5e89aa8ecb22e2dbffbcbf9a74c7c53a36ec0245",id:f},e("div",{key:"7a2837209e930360f6a71daedcf9a0f933979633",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{ripple:["applyRipple"],data:["updateSelectedItems"]}}};_=new WeakMap,g=new WeakMap,y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px;gap:var(--kup-space-03)}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header .f-image{margin:0}.accordion-item__header .accordion-rigtbuttons{margin-left:auto;margin-right:0;display:flex;gap:var(--kup-space-03)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";export{y as kup_accordion}
@@ -9,7 +9,8 @@ export declare enum KupAutocompleteProps {
9
9
  customStyle = "Custom style of the component.",
10
10
  data = "Props of the sub-components.",
11
11
  disabled = "Defaults at false. When set to true, the component is disabled.",
12
- displayMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
12
+ DescrMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
13
+ ListDescrMode = "Sets how to show the list items of the component. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
13
14
  initialValue = "Sets the initial value of the component.",
14
15
  initialValueDecode = "Sets the initial value decode of the component",
15
16
  inputDelay = "Input event emission delay in milliseconds.",
@@ -40,11 +40,11 @@ export declare class KupAutocomplete {
40
40
  * Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
41
41
  * @default ItemsDisplayMode.DESCRIPTION
42
42
  */
43
- displayMode: ItemsDisplayMode;
43
+ DescrMode: ItemsDisplayMode;
44
44
  /**
45
45
  * Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
46
46
  */
47
- listDisplayMode: ItemsDisplayMode;
47
+ ListDescrMode: ItemsDisplayMode;
48
48
  /**
49
49
  * Set error message
50
50
  * @default '''
@@ -8,7 +8,7 @@ export declare enum KupChipProps {
8
8
  customStyle = "Custom style of the component.",
9
9
  data = "List of elements.",
10
10
  disabled = "When true, the chip cannot be edited, nor removed.",
11
- displayMode = "When enabled, the chip will display both the id and description of the data.",
11
+ DescrMode = "When enabled, the chip will display both the id and description of the data.",
12
12
  enableInput = "When enabled, it's possible to add items to the chip's dataset through an input slot (kup-autocomplete, kup-combobox, kup-text-field).",
13
13
  label = "When set, will be shown a label on the chips.",
14
14
  sizing = "The size of the chip. Available sizes: small, medium.",
@@ -30,7 +30,7 @@ export declare class KupChip {
30
30
  * When enabled, the chip's text will display both the id and description.
31
31
  * @default ItemsDisplayMode.DESCRIPTION
32
32
  */
33
- displayMode: ItemsDisplayMode;
33
+ DescrMode: ItemsDisplayMode;
34
34
  /**
35
35
  * When enabled, it's possible to add items to the chip's dataset through an input slot (kup-autocomplete, kup-combobox, kup-text-field).
36
36
  * @default false
@@ -8,7 +8,8 @@ export declare enum KupComboboxProps {
8
8
  customStyle = "Custom style of the component.",
9
9
  data = "Props of the sub-components (date input text field).",
10
10
  disabled = "Defaults at false. When set to true, the component is disabled.",
11
- displayMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\".",
11
+ DescrMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\".",
12
+ ListDescrMode = "Sets how to show the list items of the component. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
12
13
  initialValue = "Sets the initial value of the component",
13
14
  initialValueDecode = "Sets the initial value decode of the component",
14
15
  isClearable = "Enables a clear trailing icon.",
@@ -29,11 +29,11 @@ export declare class KupCombobox {
29
29
  /**
30
30
  * Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
31
31
  */
32
- displayMode: ItemsDisplayMode;
32
+ DescrMode: ItemsDisplayMode;
33
33
  /**
34
34
  * Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
35
35
  */
36
- listDisplayMode: ItemsDisplayMode;
36
+ ListDescrMode: ItemsDisplayMode;
37
37
  /**
38
38
  * Set error message
39
39
  * @default '''
@@ -8,7 +8,7 @@ export declare enum KupDropdownButtonProps {
8
8
  customStyle = "Custom style of the component.",
9
9
  data = "Props of the sub-components.",
10
10
  disabled = "Defaults at false. When set to true, the component is disabled.",
11
- displayMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
11
+ DescrMode = "Sets how to show the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
12
12
  icon = "Defaults at null. When set, the button will show this icon.",
13
13
  initialValue = "Sets the initial value of the component.",
14
14
  label = "Defaults at null. When set, the button will show this text.",
@@ -29,7 +29,7 @@ export declare class KupDropdownButton {
29
29
  * Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
30
30
  * @default ItemsDisplayMode.DESCRIPTION
31
31
  */
32
- displayMode: ItemsDisplayMode;
32
+ DescrMode: ItemsDisplayMode;
33
33
  /**
34
34
  * Default value is false. When set to true, the arrow dropdown button is the only button displayed.
35
35
  * @default false
@@ -1,6 +1,6 @@
1
1
  import { ItemsDisplayMode, KupListNode, ValueDisplayedValue } from './kup-list-declarations';
2
2
  export declare function getIdOfItemByDisplayMode(item: KupListNode, mode: ItemsDisplayMode, separator: string): string;
3
- export declare function consistencyCheck(idIn: string, listData: Object, listEl: any, selectMode: ItemsDisplayMode, displayMode: ItemsDisplayMode, e?: CustomEvent): ValueDisplayedValue;
3
+ export declare function consistencyCheck(idIn: string, listData: Object, listEl: any, selectMode: ItemsDisplayMode, DescrMode: ItemsDisplayMode, e?: CustomEvent): ValueDisplayedValue;
4
4
  export declare function getFirstItemSelected(listData: Object): KupListNode;
5
5
  export declare function getItemById(listData: Object, id: string, setSelected: boolean): KupListNode;
6
- export declare function getItemByDisplayMode(listData: Object, id: string, displayMode: ItemsDisplayMode, setSelected: boolean): KupListNode;
6
+ export declare function getItemByDisplayMode(listData: Object, id: string, DescrMode: ItemsDisplayMode, setSelected: boolean): KupListNode;
@@ -33,7 +33,7 @@ export declare class KupList {
33
33
  * Selects how the items must display their label and how they can be filtered for.
34
34
  * @default ItemsDisplayMode.DESCRIPTION
35
35
  */
36
- displayMode: ItemsDisplayMode;
36
+ DescrMode: ItemsDisplayMode;
37
37
  /**
38
38
  * Show filter for filter elements in list
39
39
  * @default false
@@ -159,7 +159,7 @@ export declare class KupTree {
159
159
  * Defines the current totals options.
160
160
  */
161
161
  totals: TotalsMap;
162
- displayMode: ItemsDisplayMode;
162
+ DescrMode: ItemsDisplayMode;
163
163
  /**
164
164
  * Reference to the column menu card.
165
165
  */