@sme.up/ketchup 8.3.3 → 9.1.0

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 (227) hide show
  1. package/dist/cjs/{component-24811409.js → component-cb3b32f5.js} +7 -2
  2. package/dist/cjs/{f-button-7687085a.js → f-button-733664a5.js} +2 -2
  3. package/dist/cjs/{f-cell-37ef6f00.js → f-cell-f37757a6.js} +201 -22
  4. package/dist/cjs/{f-checkbox-758d1d34.js → f-checkbox-556771e8.js} +1 -1
  5. package/dist/cjs/{f-chip-cf59bdb3.js → f-chip-3349d130.js} +3 -3
  6. package/dist/cjs/{f-image-1245b0cf.js → f-image-b7a5816b.js} +2 -2
  7. package/dist/cjs/{f-paginator-utils-b1af2a8f.js → f-paginator-utils-1fe1df76.js} +49 -50
  8. package/dist/cjs/{f-text-field-9c745112.js → f-text-field-8557fc3f.js} +38 -4
  9. package/dist/cjs/{f-text-field-mdc-b1fa6fd6.js → f-text-field-mdc-4fda9705.js} +1 -1
  10. package/dist/cjs/{index-eac07680.js → index-4b3a5567.js} +134 -26
  11. package/dist/cjs/ketchup.cjs.js +3 -3
  12. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  13. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +295 -338
  14. package/dist/cjs/kup-box.cjs.entry.js +25 -17
  15. package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
  16. package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
  17. package/dist/cjs/kup-cell.cjs.entry.js +9 -7
  18. package/dist/cjs/kup-dashboard.cjs.entry.js +8 -8
  19. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-echart.cjs.entry.js +4579 -4431
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
  22. package/dist/cjs/kup-grid.cjs.entry.js +109 -0
  23. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-image-list.cjs.entry.js +9 -9
  25. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  27. package/dist/cjs/{kup-manager-38caaef3.js → kup-manager-cb73c128.js} +64 -14
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
  30. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-planner.cjs.entry.js +5 -5
  32. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  34. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/assets/card-list.js +709 -0
  37. package/dist/collection/assets/data-table-performance.js +6 -0
  38. package/dist/collection/assets/data-table.js +44 -0
  39. package/dist/collection/assets/image-list.js +2 -12
  40. package/dist/collection/assets/index.js +8 -4
  41. package/dist/collection/assets/progress-bar.js +0 -0
  42. package/dist/collection/assets/radio.js +30 -0
  43. package/dist/collection/collection-manifest.json +3 -4
  44. package/dist/collection/components/kup-box/kup-box.js +14 -6
  45. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -1
  46. package/dist/collection/components/kup-card/kup-card.css +34 -7
  47. package/dist/collection/components/kup-card/kup-card.js +25 -22
  48. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +45 -54
  49. package/dist/collection/components/kup-card/standard/kup-card-standard.js +10 -5
  50. package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +13 -0
  51. package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
  52. package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
  53. package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
  54. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  55. package/dist/collection/components/kup-data-table/kup-data-table.js +36 -22
  56. package/dist/collection/components/kup-echart/kup-echart.js +0 -2
  57. package/dist/collection/components/kup-grid/kup-grid.css +10 -0
  58. package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -242
  59. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +37 -84
  60. package/dist/collection/components/kup-radio/kup-radio.css +0 -161
  61. package/dist/collection/components/kup-radio/kup-radio.js +31 -26
  62. package/dist/collection/components/kup-rating/kup-rating.css +0 -8
  63. package/dist/collection/components/kup-rating/kup-rating.js +27 -52
  64. package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
  65. package/dist/collection/f-components/f-cell/f-cell.js +38 -17
  66. package/dist/collection/f-components/f-progress-bar/f-progress-bar-declarations.js +1 -0
  67. package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +88 -0
  68. package/dist/collection/f-components/f-radio/f-radio-declarations.js +1 -0
  69. package/dist/collection/f-components/f-radio/f-radio.js +28 -0
  70. package/dist/collection/f-components/f-rating/f-rating-declarations.js +1 -0
  71. package/dist/collection/f-components/f-rating/f-rating.js +26 -0
  72. package/dist/collection/f-components/f-text-field/f-text-field.js +36 -2
  73. package/dist/collection/managers/kup-data/kup-data.js +2 -0
  74. package/dist/collection/managers/kup-math/kup-math.js +1 -1
  75. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +33 -0
  76. package/dist/collection/managers/kup-theme/kup-theme.js +13 -1
  77. package/dist/collection/types/GenericTypes.js +1 -2
  78. package/dist/collection/utils/cell-utils.js +6 -7
  79. package/dist/components/index.d.ts +6 -0
  80. package/dist/components/index.js +1 -1
  81. package/dist/components/kup-accordion.js +2 -0
  82. package/dist/components/kup-autocomplete2.js +1555 -1387
  83. package/dist/components/kup-box2.js +24 -6
  84. package/dist/components/kup-calendar.js +4 -1
  85. package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
  86. package/dist/components/kup-card-list.js +408 -0
  87. package/dist/components/kup-cell.js +1 -1
  88. package/dist/components/kup-chart.js +1 -1
  89. package/dist/components/kup-checkbox.js +1 -1
  90. package/dist/components/kup-chip.js +1 -1
  91. package/dist/components/kup-color-picker.js +1 -1
  92. package/dist/components/kup-combobox.js +1 -1
  93. package/dist/components/kup-dashboard.js +3 -1
  94. package/dist/components/kup-data-table.js +1 -1
  95. package/dist/components/kup-date-picker.js +1 -1
  96. package/dist/components/kup-dialog.js +1 -1
  97. package/dist/components/kup-dropdown-button.js +1 -1
  98. package/dist/components/kup-echart2.js +4578 -4430
  99. package/dist/components/kup-family-tree.js +1 -1
  100. package/dist/components/kup-form.js +1 -1
  101. package/dist/components/kup-gauge.js +1 -1
  102. package/dist/components/kup-grid2.js +1 -1
  103. package/dist/components/kup-image-list.js +3 -1
  104. package/dist/components/kup-image.js +1 -1
  105. package/dist/components/kup-list.js +1 -1
  106. package/dist/components/kup-magic-box.js +1 -1
  107. package/dist/components/kup-numeric-picker.js +1 -1
  108. package/dist/components/kup-planner.js +3 -1
  109. package/dist/esm/{component-cc25b031.js → component-879e99bf.js} +7 -2
  110. package/dist/esm/{f-button-e54ce8d5.js → f-button-f247ce10.js} +2 -2
  111. package/dist/esm/{f-cell-4149a05d.js → f-cell-ba94f1b3.js} +199 -23
  112. package/dist/esm/{f-checkbox-7b113dd8.js → f-checkbox-cbf7b3de.js} +1 -1
  113. package/dist/esm/{f-chip-c3c86f7b.js → f-chip-104c4a64.js} +3 -3
  114. package/dist/esm/{f-image-adceee49.js → f-image-d2a9603c.js} +2 -2
  115. package/dist/esm/{f-paginator-utils-e559dac8.js → f-paginator-utils-743522fa.js} +49 -50
  116. package/dist/esm/{f-text-field-aa4497a8.js → f-text-field-4d91ccfc.js} +38 -4
  117. package/dist/esm/{f-text-field-mdc-32a1ffd9.js → f-text-field-mdc-1143cf21.js} +1 -1
  118. package/dist/esm/{index-d413187a.js → index-c161a33e.js} +134 -26
  119. package/dist/esm/ketchup.js +4 -4
  120. package/dist/esm/kup-accordion.entry.js +4 -4
  121. package/dist/esm/kup-autocomplete_27.entry.js +295 -338
  122. package/dist/esm/kup-box.entry.js +25 -17
  123. package/dist/esm/kup-calendar.entry.js +6 -6
  124. package/dist/esm/kup-card-list.entry.js +240 -0
  125. package/dist/esm/kup-cell.entry.js +9 -7
  126. package/dist/esm/kup-dashboard.entry.js +8 -8
  127. package/dist/esm/kup-drawer.entry.js +2 -2
  128. package/dist/esm/kup-echart.entry.js +4579 -4431
  129. package/dist/esm/kup-family-tree.entry.js +4 -4
  130. package/dist/esm/kup-grid.entry.js +105 -0
  131. package/dist/esm/kup-iframe.entry.js +2 -2
  132. package/dist/esm/kup-image-list.entry.js +9 -9
  133. package/dist/esm/kup-lazy.entry.js +2 -2
  134. package/dist/esm/kup-magic-box.entry.js +3 -3
  135. package/dist/esm/{kup-manager-a4153fb2.js → kup-manager-94b3d177.js} +64 -14
  136. package/dist/esm/kup-nav-bar.entry.js +2 -2
  137. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  138. package/dist/esm/kup-photo-frame.entry.js +2 -2
  139. package/dist/esm/kup-planner.entry.js +5 -5
  140. package/dist/esm/kup-probe.entry.js +2 -2
  141. package/dist/esm/kup-qlik.entry.js +2 -2
  142. package/dist/esm/kup-snackbar.entry.js +4 -4
  143. package/dist/esm/loader.js +3 -3
  144. package/dist/ketchup/ketchup.esm.js +1 -1
  145. package/dist/ketchup/p-12e47371.js +1 -0
  146. package/dist/ketchup/{p-3c44e838.entry.js → p-15548f51.entry.js} +1 -1
  147. package/dist/ketchup/p-20e8ab84.js +2 -0
  148. package/dist/ketchup/{p-2739b7ac.entry.js → p-21f1b22a.entry.js} +1 -1
  149. package/dist/ketchup/{p-e76b646c.js → p-2c47b88f.js} +3 -3
  150. package/dist/ketchup/{p-23d54fb2.entry.js → p-304f296e.entry.js} +1 -1
  151. package/dist/ketchup/p-48f8b0d5.entry.js +9 -0
  152. package/dist/ketchup/p-4ca502ce.entry.js +1 -0
  153. package/dist/ketchup/{p-698442ed.js → p-4d7c02f4.js} +1 -1
  154. package/dist/ketchup/{p-3d671241.entry.js → p-5abbf31b.entry.js} +1 -1
  155. package/dist/ketchup/{p-44b5c573.entry.js → p-5c9b10a5.entry.js} +1 -1
  156. package/dist/ketchup/{p-b415fe84.entry.js → p-5cb2dbf3.entry.js} +1 -1
  157. package/dist/ketchup/p-679ccbf8.js +1 -0
  158. package/dist/ketchup/p-6a0ac578.entry.js +1 -0
  159. package/dist/ketchup/{p-f3c8c1da.entry.js → p-87e13738.entry.js} +1 -1
  160. package/dist/ketchup/p-8e5db599.entry.js +1 -0
  161. package/dist/ketchup/{p-c0878519.entry.js → p-a14ede8c.entry.js} +1 -1
  162. package/dist/ketchup/{p-2f0798d3.js → p-a2007880.js} +1 -1
  163. package/dist/ketchup/p-a2b75445.entry.js +39 -0
  164. package/dist/ketchup/{p-47752f3b.js → p-b0678a34.js} +1 -1
  165. package/dist/ketchup/{p-7360a410.js → p-ba003975.js} +1 -1
  166. package/dist/ketchup/{p-d817be2a.js → p-bb80719e.js} +1 -1
  167. package/dist/ketchup/{p-c39ddeae.entry.js → p-bf41d71f.entry.js} +1 -1
  168. package/dist/ketchup/p-c32e8755.entry.js +1 -0
  169. package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
  170. package/dist/ketchup/p-c6b58be6.entry.js +1 -0
  171. package/dist/ketchup/{p-6d9ffb32.js → p-cd2af1a6.js} +1 -1
  172. package/dist/ketchup/{p-124f3f42.js → p-d4a879fc.js} +1 -1
  173. package/dist/ketchup/{p-b623c774.entry.js → p-d56763cf.entry.js} +1 -1
  174. package/dist/ketchup/{p-3081ed82.entry.js → p-e7f57bee.entry.js} +1 -1
  175. package/dist/ketchup/{p-eec864dd.entry.js → p-eb12225c.entry.js} +1 -1
  176. package/dist/ketchup/{p-3bbcae45.entry.js → p-f22abf4e.entry.js} +1 -1
  177. package/dist/ketchup/{p-e917200c.entry.js → p-f82db512.entry.js} +1 -1
  178. package/dist/types/components/kup-box/kup-box.d.ts +1 -0
  179. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -1
  180. package/dist/types/components/kup-calendar/kup-calendar.d.ts +1 -1
  181. package/dist/types/components/kup-card/kup-card.d.ts +3 -3
  182. package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
  183. package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
  184. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  185. package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +0 -1
  186. package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +1 -9
  187. package/dist/types/components/kup-radio/kup-radio.d.ts +3 -2
  188. package/dist/types/components/kup-rating/kup-rating.d.ts +2 -7
  189. package/dist/types/components.d.ts +103 -96
  190. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -0
  191. package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +16 -0
  192. package/dist/types/f-components/f-progress-bar/f-progress-bar.d.ts +3 -0
  193. package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +22 -0
  194. package/dist/types/f-components/f-radio/f-radio.d.ts +3 -0
  195. package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +10 -0
  196. package/dist/types/f-components/f-rating/f-rating.d.ts +3 -0
  197. package/dist/types/managers/kup-math/kup-math.d.ts +1 -1
  198. package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
  199. package/dist/types/stencil-public-runtime.d.ts +16 -4
  200. package/dist/types/types/GenericTypes.d.ts +1 -2
  201. package/package.json +6 -3
  202. package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
  203. package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
  204. package/dist/collection/assets/dash-list.js +0 -474
  205. package/dist/collection/components/kup-dash/kup-dash.css +0 -136
  206. package/dist/collection/components/kup-dash/kup-dash.js +0 -171
  207. package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
  208. package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -331
  209. package/dist/components/kup-dash-list.js +0 -288
  210. package/dist/components/kup-dash.d.ts +0 -11
  211. package/dist/components/kup-dash.js +0 -6
  212. package/dist/components/kup-dash2.js +0 -228
  213. package/dist/esm/kup-dash-list.entry.js +0 -112
  214. package/dist/esm/kup-dash_2.entry.js +0 -174
  215. package/dist/ketchup/p-0848391f.entry.js +0 -1
  216. package/dist/ketchup/p-25d45dc9.entry.js +0 -1
  217. package/dist/ketchup/p-283ca113.entry.js +0 -1
  218. package/dist/ketchup/p-384137d7.entry.js +0 -39
  219. package/dist/ketchup/p-3972b97c.entry.js +0 -1
  220. package/dist/ketchup/p-5ce0e645.entry.js +0 -1
  221. package/dist/ketchup/p-b8fcbcc9.entry.js +0 -1
  222. package/dist/ketchup/p-be864593.entry.js +0 -9
  223. package/dist/ketchup/p-d680bdde.js +0 -1
  224. package/dist/ketchup/p-f79d544a.js +0 -1
  225. package/dist/ketchup/p-fd75d5bf.js +0 -2
  226. package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
  227. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
@@ -0,0 +1 @@
1
+ import{r as t,c as o,f as i,h as e,H as s,g as r}from"./p-20e8ab84.js";import{k as n,A as a,g as l,s as h,v as c,m as p,K as b,c as d,Q as u,V as x,W as f,X as g,I as w,a2 as m}from"./p-2c47b88f.js";import{f as k,p as v,s as y,d as _,r as j,h as C,b as P}from"./p-a2007880.js";import{F as A}from"./p-bb80719e.js";import{a as R}from"./p-4d7c02f4.js";import{c as z}from"./p-635bb4b3.js";import{F as I}from"./p-12e47371.js";import{F as E}from"./p-cd2af1a6.js";import"./p-b0678a34.js";import"./p-b00f3575.js";import"./p-ba003975.js";import"./p-679ccbf8.js";import"./p-d4a879fc.js";var M;!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.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.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."}(M||(M={}));class O{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1}toDebugString(){return"box state"}}var S,B,D,W,$,L,T=function(t,o,i,e){if("a"===i&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof o?t!==o||!e:!o.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?e:"a"===i?e.call(t):e?e.value:o.get(t)},F=function(t,o,i,e,s){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof o?t!==o||!s:!o.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?s.call(t,i):s?s.value=i:o.set(t,i),i};const H=class{constructor(i){t(this,i),this.kupBoxClick=o(this,"kup-box-click",6),this.kupBoxSelected=o(this,"kup-box-selected",6),this.kupAutoBoxSelect=o(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=o(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=o(this,"kup-box-rowactionclick",6),this.kupDidLoad=o(this,"kup-box-didload",6),this.kupDidUnload=o(this,"kup-box-didunload",6),this.kupBoxContextMenu=o(this,"kup-box-contextmenu",6),S.add(this),this.state=new O,this.kupManager=n(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),D.set(this,[]),W.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.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const o=this.selectedRows.reduce(((t,o,i)=>t+(i>0?";":"")+o.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,o)||(this.state.selectedRowsState=o,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,M,t)}async loadRowActions(t,o){t.actions=o,this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,M,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=k(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let o=t;return this.sortBy&&(o=y(o,this.toSortObjectList())),o}toSortObjectList(){return this.sortBy.split("|").map((t=>{const o=t.split(",");return{column:o[0],sortMode:o.length>1?m[o[1]]:m.A}}))}checkScrollOnHover(){this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer)}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let i=o.length,e=[],s=0;for(;i-- >0;)e.push({column:o[s++].name});t.content=e,this.boxLayout={sections:[t]}}onSortChange(t){let o=c(this.visibleColumns,t.detail.value);this.sortBy=o.name}onGlobalFilterChange({detail:t}){let o="";t&&t.value&&(o=t.value),this.globalFilterValue=o}isSectionExpanded(t,o){return!(!t.id||!o.id)&&this.collapsedSection[o.id]&&this.collapsedSection[o.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,o){let i=null,e=null,s=null,r=null;if(t&&(i=t.closest(".box-object")||t.querySelector(".box-object")||t.closest(".f-cell")),i)if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();e=t.cell,r=t.column,s=t.row}else e=i["data-cell"],s=i["data-row"],r=c(this.visibleColumns,i.dataset.column);return{boxObject:i||null,column:r||null,cell:e||null,originalEvent:o,row:s||null}}contextMenuHandler(t){return this.getEventDetails(t.target,t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onBoxClick({target:t},o){if(!(t instanceof HTMLElement))return;let i=t,e=i.classList;for(;!e.contains("box-object")&&!e.contains("box-section")&&!e.contains("box")&&(i=i.parentElement,null!==i);)e=i.classList;let s=null;e.contains("box-object")&&(s=i.dataset.column),this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o,column:s}),this.multiSelection?this.onSelectionCheckChange(o):this.selectedRows=[o]}onSelectionCheckChange(t){var o=-1;for(let i=0;i<this.selectedRows.length;i++)if(this.selectedRows[i].id===t.id){o=i;break}o>=0?(this.selectedRows.splice(o,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,o){if(o.id)if(t.id){if(this.collapsedSection[o.id]){const i=this.collapsedSection[o.id];i[t.id]=!i[t.id]||!i[t.id]}else this.collapsedSection[o.id]={},this.collapsedSection[o.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,o,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:o,index:i})}clickFunction(t){try{const o=t.composedPath();for(let t of o)if(this.checkIfElementIsActionMenuIcon(t))return}catch(o){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const o=_(t,this.filteredRows.length,this.currentRowsPerPage);o&&(this.currentPage=o)}handleRowsPerPageChange(t){const o=j(t,this.filteredRows.length);o&&(this.currentRowsPerPage=o,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let o=!1;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let o=0;o<this.data.columns.length;o++){const e=this.data.columns[o];!1!==e.visible&&(i.cell.push(t.cells[e.name]),i.columns.push(e))}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const e=t.cells[o];if(void 0!==e.cardID&&e.obj)switch(e.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<e.cardID);i.button[e.cardID]={label:e.value};break;case"IMG":do{i.image.push({})}while(i.image.length<e.cardID);i.image[e.cardID]={resource:e.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<e.cardID);i.progressbar[e.cardID]={value:e.value};break;default:do{i.text.push("")}while(i.text.length<e.cardID);i.text[e.cardID]=e.value}}for(const e in t.cells)if(t.cells.hasOwnProperty(e)){const s=t.cells[e];if(void 0===s.cardID&&s.obj)switch(o=!1,s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++)if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value},o=!0;break}o||i.button.push({label:s.value});break;case"IMG":for(let t=0;t<i.image.length;t++)if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value},o=!0;break}o||i.image.push({resource:s.value});break;case"PGB":for(let t=0;t<i.progressbar.length;t++)if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value},o=!0;break}o||i.progressbar.push({value:s.value});break;default:for(let t=0;t<i.text.length;t++)if(""===i.text[t]){i.text[t]=s.value,o=!0;break}o||i.text.push(s.value)}}return e("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const o=[...this.visibleColumns];let i=null,s=t.layout;s||(s=this.boxLayout);let r=!1;if(s){s.horizontal&&(r=!0);const e=s.sections;let n=e.length,a=0;n>0&&(i=[]);const l={horizontal:r};for(;n-- >0;)i.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(e[a++],l,t,o))}var n=!1;for(let o of this.selectedRows)o.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=e("div",{class:"box-selection"},e("kup-checkbox",{checked:n})));let l=null;if(this.enableRowActions&&!this.swipeDisabled){const o={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const o=t.actions.map(((o,i)=>e("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,o,i)},e("div",{class:`icon ${o.icon}`}),e("div",{class:"text"},o.text))));i=e("ul",null,o)}l=e("div",{class:"row-actions-wrapper"},e("div",{class:"row-actions-toggler"},e("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},e("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"})),e("div",{class:o},i)))}let h=null;return t.badgeData&&t.badgeData.length>0&&(h=t.badgeData.map((t=>e("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),e("div",{class:"box-wrapper",style:t.style||{},ref:t=>T(this,D,"f").push(t)},e("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},onClick:o=>this.onBoxClick(o,t),ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,o,i,s){let r=null;if(t.sections&&t.sections.length>0){const o=t.sections;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderSection(o[n++],t,i,s))}else if(t.content){const o=t.content;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderBoxObject({boxObject:o[n++],row:i,visibleColumns:s},!0))}else s.length>0&&(r=this.renderBoxObject({boxObject:{column:s[0].name},row:i,visibleColumns:s}));const n=this.isSectionExpanded(i,t),a=!!t.columns,l={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},h=t.style||{};t.dim&&o&&(h.flex=`0 0 ${t.dim}`,h.overflow="hidden",o.horizontal?h.maxWidth=t.dim:h.maxHeight=t.dim),a&&(h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){l["collapse-section"]=!0;const o={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(n?p.COLLAPSE:p.EXPAND),c=e("div",{class:l,style:h},e("div",{class:o},r),e("div",{class:"header",role:"button",onClick:o=>{o.stopPropagation(),this.toggleSectionExpand(i,t)}},e("div",{class:"header-content"},e("span",null,s),e(A,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const o=t.title?e("h3",null,t.title):null;c=e("div",{class:l,style:h},o,r)}return c}renderBoxObject({boxObject:t,row:o,visibleColumns:i},s){const r={"box-object":!0};let n=null,a=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){a=o;break}a>=0?(n=i[a],i.splice(a,1)):s&&(n=this.data.columns.find((o=>o.name===t.column)));const l=o.cells[t.column];let h;return l&&!this.kupManager.objects.isEmptyKupObj(l.obj)&&(r["is-obj"]=!0,this.kupManager.debug.isDebug()&&(h=l.obj.t+"; "+l.obj.p+"; "+l.obj.k+";")),e("div",{"data-cell":l,"data-row":o,"data-column":t.column,class:r,style:{},title:h},l&&n?e(I,Object.assign({},{cell:l,column:n,component:this,editable:this.editableData,renderKup:!0,row:o,setSizes:!0,shape:t.shape})):e("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",d.ERROR),{jsx:e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(p.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let o=0;o<this.kanban.labels.length;o++)t.push({labels:this.kanban.labels[o],nodes:[]});for(let o=0;o<this.rows.length;o++){let i=[];for(let t=0;t<this.kanban.columns.length;t++)try{i.push(this.rows[o].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,d.WARNING)}const e={found:!1,index:null};for(let o=0;o<t.length;o++){let s=t[o].labels,r=!0;for(let t=0;t<s.length;t++)if(i[t]!==s[t]){r=!1;break}if(r){e.found=!0,e.index=o;break}}e.found?t[e.index].nodes.push(this.renderRow(this.rows[o])):t.push({labels:i,nodes:[this.renderRow(this.rows[o])]})}const o=[];for(let i=0;i<t.length;i++){const s=t[i].labels,r={data:[]};for(let t=0;t<s.length;t++)r.data.push({value:s[t],id:s[t]});o.push(e("div",{class:"kanban-section"},e(R,Object.assign({},r)),t[i].nodes))}return{jsx:o,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),this.kupManager.interact.on(this.boxContainer,u.TAP,(t=>{this.hold?this.hold=!1:2===t.button&&this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})})),this.kupManager.interact.on(this.boxContainer,u.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 o=this.rowsRefs[t],i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:c(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};o&&!this.interactableDrag.includes(o)&&(this.interactableDrag.push(o),this.kupManager.interact.draggable(o,{allowFrom:".box-object",cursorChecker:()=>null},{callback:i},x.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.getEventDetails(this.rootElement.shadowRoot.querySelector(".box:hover"));return{cell:t.cell,column:t.column,id:this.rootElement.id,row:t.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${f}]`},{dispatcher:this.rootElement,type:g.BOX}));for(let o=0;o<this.rowsRefs.length;o++){const i=this.rowsRefs[o];i&&!this.interactableDrop.includes(i)&&(this.interactableDrop.push(i),this.kupManager.interact.dropzone(i,{accept:`[${f}]`},{callback:t,dispatcher:this.rootElement,type:g.BOX}))}}}componentWillLoad(){this.kupManager.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),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?F(this,W,document.querySelector(".header").clientHeight,"f"):F(this,W,0,"f"),document.querySelector(".topbar")&&F(this,W,T(this,W,"f")+document.querySelector(".topbar").clientHeight,"f"),T(this,S,"m",L).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((o=>t.indexOf(o.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)E(o[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),T(this,S,"m",$).call(this),this.kupManager.debug.logRender(this,!0)}render(){const t=!("object"!=typeof this.kanban||null===this.kanban);let o=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let i={label:this.kupManager.language.translate(p.SORT_BY),trailingIcon:!0};o=e("div",{id:"sort-panel"},e("kup-combobox",{data:{"kup-text-field":i,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;this.globalFilter&&(i=e("div",{id:"global-filter"},e("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(w.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.lazyLoadRows&&this.pagination&&(r=e(P,{id:top?"top-paginator":"bottom-paginator",currentPage:this.currentPage,max:this.filteredRows.length,mode:C.SIMPLE,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let n=null,a={};if(0===this.rows.length)n=e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(p.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 o=t.length,i=0;for(n=[];o-- >0;)n.push(this.renderRow(t[i++]))}return e(s,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:z},e("div",{class:"box-component",ref:t=>this.sectionRef=t},o,i,r,e("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return 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"]}}};B=new WeakMap,D=new WeakMap,W=new WeakMap,S=new WeakSet,$=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&T(this,B,"f").observe(T(this,D,"f")[T(this,D,"f").length-1])},L=function(){const t={threshold:0,rootMargin:"-"+T(this,W,"f")+"px 0px 0px 0px"};F(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const o=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=o<10?o:10,t.target.classList.remove("last-row"),T(this,B,"f").unobserve(t.target)}}))}),t),"f")},H.style=":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_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 *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;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:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);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-color);color:rgba(var(--kup-text-color-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-color);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 500ms 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-color);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-color)}#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(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}: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{padding:3px}: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{margin: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{H as kup_box}
@@ -0,0 +1 @@
1
+ import{r as i,f as n,h as l,H as a,g as t}from"./p-20e8ab84.js";import{k as e,g as r,s,c as o}from"./p-2c47b88f.js";import{c as d}from"./p-635bb4b3.js";var p;!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://ketchup.smeup.com/ketchup-showcase/#/customization",i.singleLine="When set to true, forces the content on a single line."}(p||(p={}));const u=class{constructor(n){i(this,n),this.kupManager=e(),this.columns=12,this.customStyle="",this.singleLine=!1}async getProps(i){return r(this,p,i)}async refresh(){n(this)}async setProps(i){s(this,p,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!",o.WARNING);const n=[];for(let a=0;a<i.length;a++){let t=null;if(this.singleLine)t=l("slot",{name:`${a}`});else{const n=i[a].span||i[a].getAttribute("span")||1;t=l("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},l("slot",{name:`${a}`}))}n.push(t)}const t={};return this.columns&&12!==this.columns&&(t["--kup_grid_columns"]=this.columns),l(a,{style:t},l("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),l("div",{id:d},l("div",{class:this.singleLine?"flex-layout":"layout-grid"},l("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return t(this)}};u.style=":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{u as kup_grid}
@@ -1,4 +1,4 @@
1
- import{_ as t,a as n,b as i,c as e,e as r,d as u,f as s,M as c,m as o,g as f}from"./p-124f3f42.js";
1
+ import{_ as t,a as n,b as i,c as e,e as r,d as u,f as s,M as c,m as o,g as f}from"./p-d4a879fc.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -1,4 +1,4 @@
1
- var t=function(n,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},t(n,i)};function n(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++)for(var e in n=arguments[i])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t},i.apply(this,arguments)};function r(t){var n="function"==typeof Symbol&&Symbol.iterator,i=n&&t[n],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}
1
+ var t=function(n,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},t(n,i)};function n(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++)for(var e in n=arguments[i])Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t},i.apply(this,arguments)};function r(t){var n="function"==typeof Symbol&&Symbol.iterator,i=n&&t[n],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2016 Google Inc.
@@ -1 +1 @@
1
- import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-fd75d5bf.js";import{F as r}from"./p-47752f3b.js";import{F as h}from"./p-7360a410.js";import{F as a}from"./p-d680bdde.js";import{F as l}from"./p-6d9ffb32.js";import{k as c,g as d,s as u,al as m,m as p,V as f,c as g}from"./p-e76b646c.js";import{c as b}from"./p-635bb4b3.js";import"./p-b00f3575.js";import"./p-d817be2a.js";import"./p-124f3f42.js";var x;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(x||(x={}));const y=class{constructor(s){t(this,s),this.kupSave=i(this,"kup-dashboard-save",6),this.kupManager=c(),this.internalData=null,this.internalDataBackup=null,this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return d(this,x,t)}async refresh(){s(this)}async setProps(t){u(this,x,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(m.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(m.SAVE),onClick:()=>this.onKupSave()};return e("div",{class:"header"},this.enableDesign?e(r,Object.assign({},t)):void 0,this.enableDesign?e(r,Object.assign({},i)):void 0)}buildForm(t,i){return t?e("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:s=>{s&&(s.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):e("div",null,this.kupManager.language.translate(p.EMPTY_DATA))}buildSectionHeader(t,i){const s={value:t.dim,label:this.kupManager.language.translate(m.DIMENSION),onChange:i=>{const{target:s}=i;t.dim=s.value,this.refresh()}},o={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},n={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const s=i.sections.indexOf(t);i.sections.splice(s,1),this.resetData(this.internalData)}},l={checked:t.loaded,label:this.kupManager.language.translate(m.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},c={checked:"column"==t.layout,label:this.kupManager.language.translate(m.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return e("div",{class:"section-header"},e("div",null,t.id," - ",t.layout),e("div",null,e("div",{class:"section-header-actions"},e(a,Object.assign({},s)),e(h,Object.assign({},l)),e(h,Object.assign({},c)),e(r,Object.assign({},o)),e(r,Object.assign({},n)))))}buildSection(t,i){const s={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return e("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:s=>{s&&(s.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,e("div",{class:s,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:e("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}calcSectionPosition(t,i,s,e,o){let n=e;for(let e=0;e<o.length;e++){const r=o[e].getBoundingClientRect();if(s&&t<r.y){n=e;break}if(!s&&i<r.x){n=e;break}}return n}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,f.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder(),this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,s){if(s.kupData.form){const e=this.calcSectionPosition(t,i,"column"==s.kupData.form.layout,s.kupData.form.sections.length,s.children);this.setSectionPlaceHolder(s,e)}else if(s.kupData.section){const e=this.calcSectionPosition(t,i,"column"==s.kupData.section.layout,s.kupData.section.sections.length,s.lastElementChild.children);this.setSectionPlaceHolder(s.lastElementChild,e)}}dropped(t,i,s){const e=s.kupData.parent.sections.indexOf(s.kupData.section);if(s.kupData.parent.sections.splice(e,1),i.kupData.form){i.kupData.form.sections||(i.kupData.form.sections=[]);const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.form.layout,i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||0==i.kupData.section.sections.length){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null,s.kupData.section.dim=null,i.kupData.section.id=this.buildGuid(),i.kupData.section.sections=[],i.kupData.section.sections.push(t)}const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.section.layout,i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let s="";t.sections.forEach((t=>{s+=this.enableDesign||!t.dim?" 1fr":t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim})),"column"==t.layout&&(i.gridTemplateRows=s),"row"==t.layout&&(i.gridTemplateColumns=s)}return i}setSectionPlaceHolder(t,i){const s=document.createElement("div");s.className="section-placeholder",t.insertBefore(s,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");t&&t.parentElement.removeChild(t)}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{l(t)}))}this.didRenderInteractables()}render(){return e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:b},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};y.style=":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{y as kup_dashboard}
1
+ import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-20e8ab84.js";import{F as r}from"./p-b0678a34.js";import{F as a}from"./p-ba003975.js";import{F as h}from"./p-679ccbf8.js";import{F as c}from"./p-cd2af1a6.js";import{k as l,g as d,s as u,al as m,m as p,V as f,c as g}from"./p-2c47b88f.js";import{c as b}from"./p-635bb4b3.js";import"./p-b00f3575.js";import"./p-bb80719e.js";import"./p-d4a879fc.js";var x;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(x||(x={}));const y=class{constructor(s){t(this,s),this.kupSave=i(this,"kup-dashboard-save",6),this.kupManager=l(),this.internalData=null,this.internalDataBackup=null,this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return d(this,x,t)}async refresh(){s(this)}async setProps(t){u(this,x,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(m.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(m.SAVE),onClick:()=>this.onKupSave()};return e("div",{class:"header"},this.enableDesign?e(r,Object.assign({},t)):void 0,this.enableDesign?e(r,Object.assign({},i)):void 0)}buildForm(t,i){return t?e("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:s=>{s&&(s.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):e("div",null,this.kupManager.language.translate(p.EMPTY_DATA))}buildSectionHeader(t,i){const s={value:t.dim,label:this.kupManager.language.translate(m.DIMENSION),onChange:i=>{const{target:s}=i;t.dim=s.value,this.refresh()}},o={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},n={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const s=i.sections.indexOf(t);i.sections.splice(s,1),this.resetData(this.internalData)}},c={checked:t.loaded,label:this.kupManager.language.translate(m.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},l={checked:"column"==t.layout,label:this.kupManager.language.translate(m.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return e("div",{class:"section-header"},e("div",null,t.id," - ",t.layout),e("div",null,e("div",{class:"section-header-actions"},e(h,Object.assign({},s)),e(a,Object.assign({},c)),e(a,Object.assign({},l)),e(r,Object.assign({},o)),e(r,Object.assign({},n)))))}buildSection(t,i){const s={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return e("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:s=>{s&&(s.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,e("div",{class:s,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:e("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}calcSectionPosition(t,i,s,e,o){let n=e;for(let e=0;e<o.length;e++){const r=o[e].getBoundingClientRect();if(s&&t<r.y){n=e;break}if(!s&&i<r.x){n=e;break}}return n}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,f.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder(),this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,s){if(s.kupData.form){const e=this.calcSectionPosition(t,i,"column"==s.kupData.form.layout,s.kupData.form.sections.length,s.children);this.setSectionPlaceHolder(s,e)}else if(s.kupData.section){const e=this.calcSectionPosition(t,i,"column"==s.kupData.section.layout,s.kupData.section.sections.length,s.lastElementChild.children);this.setSectionPlaceHolder(s.lastElementChild,e)}}dropped(t,i,s){const e=s.kupData.parent.sections.indexOf(s.kupData.section);if(s.kupData.parent.sections.splice(e,1),i.kupData.form){i.kupData.form.sections||(i.kupData.form.sections=[]);const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.form.layout,i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||0==i.kupData.section.sections.length){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null,s.kupData.section.dim=null,i.kupData.section.id=this.buildGuid(),i.kupData.section.sections=[],i.kupData.section.sections.push(t)}const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.section.layout,i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let s="";t.sections.forEach((t=>{s+=this.enableDesign||!t.dim?" 1fr":t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim})),"column"==t.layout&&(i.gridTemplateRows=s),"row"==t.layout&&(i.gridTemplateColumns=s)}return i}setSectionPlaceHolder(t,i){const s=document.createElement("div");s.className="section-placeholder",t.insertBefore(s,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");t&&t.parentElement.removeChild(t)}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{c(t)}))}this.didRenderInteractables()}render(){return e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:b},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};y.style=":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{y as kup_dashboard}
@@ -1 +1 @@
1
- import{r as t,f as s,h as i,H as h,g as e}from"./p-fd75d5bf.js";import{k as o}from"./p-e76b646c.js";import{c as l}from"./p-635bb4b3.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(h,null,t?i("style",null,t):null,i("div",{id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return e(this)}};export{n as kup_probe}
1
+ import{r as t,f as s,h as i,H as h,g as e}from"./p-20e8ab84.js";import{k as o}from"./p-2c47b88f.js";import{c as l}from"./p-635bb4b3.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(h,null,t?i("style",null,t):null,i("div",{id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return e(this)}};export{n as kup_probe}
@@ -1 +1 @@
1
- import{r as t,c as i,f as s,h as e,H as h,g as o}from"./p-fd75d5bf.js";import{k as r,a as l,t as n}from"./p-e76b646c.js";import{c as u}from"./p-635bb4b3.js";import{F as c}from"./p-d680bdde.js";import{F as a}from"./p-6d9ffb32.js";import"./p-124f3f42.js";var p;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(p||(p={}));const m=class{constructor(s){t(this,s),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=r(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){let i={};if(t)i=p;else for(const t in p)Object.prototype.hasOwnProperty.call(p,t)&&(i[t]=this[t]);return i}async refresh(){s(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,s){let e=this.kupManager.math.numberify(t,!0);if(e){let t=e.toString();const h=t.indexOf(".");let o=h>-1?t.substring(0,h):t,r=h>-1?t.substring(h+1):"";for(this.maxIntegers&&o.length>this.maxIntegers&&(o=o.substring(o.length-this.maxIntegers)),this.maxDecimals&&r.length>this.maxDecimals&&(r=r.substring(0,this.maxDecimals));this.maxLength&&o.length+r.length>this.maxLength;)r.length>1?r=r.substring(0,r.length-1):o.length>1&&(o=o.substring(1));t=h>-1?`${o}.${r}`:o,1!=s&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),s=Object.assign({},this.data["kup-text-field"]);return s.icon||(s.icon="calculator"),s.icon&&(s.trailingIcon=!0),e(c,Object.assign({},s,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return e("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:n.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),a(i))}this.kupManager.debug.logRender(this,!0)}render(){return e(h,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return o(this)}};m.style=":host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
1
+ import{r as t,c as i,f as s,h as e,H as h,g as o}from"./p-20e8ab84.js";import{k as r,a as l,t as n}from"./p-2c47b88f.js";import{c as u}from"./p-635bb4b3.js";import{F as c}from"./p-679ccbf8.js";import{F as a}from"./p-cd2af1a6.js";import"./p-d4a879fc.js";var p;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(p||(p={}));const m=class{constructor(s){t(this,s),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=r(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){let i={};if(t)i=p;else for(const t in p)Object.prototype.hasOwnProperty.call(p,t)&&(i[t]=this[t]);return i}async refresh(){s(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,s){let e=this.kupManager.math.numberify(t,!0);if(e){let t=e.toString();const h=t.indexOf(".");let o=h>-1?t.substring(0,h):t,r=h>-1?t.substring(h+1):"";for(this.maxIntegers&&o.length>this.maxIntegers&&(o=o.substring(o.length-this.maxIntegers)),this.maxDecimals&&r.length>this.maxDecimals&&(r=r.substring(0,this.maxDecimals));this.maxLength&&o.length+r.length>this.maxLength;)r.length>1?r=r.substring(0,r.length-1):o.length>1&&(o=o.substring(1));t=h>-1?`${o}.${r}`:o,1!=s&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),s=Object.assign({},this.data["kup-text-field"]);return s.icon||(s.icon="calculator"),s.icon&&(s.trailingIcon=!0),e(c,Object.assign({},s,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return e("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:n.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),a(i))}this.kupManager.debug.logRender(this,!0)}render(){return e(h,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return o(this)}};m.style=":host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
@@ -1 +1 @@
1
- import{r as t,c as s,f as i,h as o,H as n,g as a}from"./p-fd75d5bf.js";import{k as e,g as r,s as c}from"./p-e76b646c.js";import{c as l}from"./p-635bb4b3.js";import{F as p}from"./p-47752f3b.js";import"./p-b00f3575.js";import"./p-d817be2a.js";const h="snackbar";var b;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(b||(b={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.kupTimeoutComplete=s(this,"kup-snackbar-timeoutcomplete",6),this.kupManager=e(),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}onKupTimeoutComplete(){this.kupTimeoutComplete.emit({comp:this,id:this.rootElement.id})}async getProps(t){return r(this,b,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,b,t)}async show(){this.visible=!0}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.timeout&&this.visible&&setTimeout((()=>{this.hide(),this.onKupTimeoutComplete()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return o(n,{"kup-visible":this.visible},o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:l},o("div",{class:h},o("div",{class:`${h}__text`},this.text),this.actionButton||this.closeButton?o("div",{class:`${h}__buttons`},this.actionButton?o("div",{class:`${h}__action`},o(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?o("div",{class:`${h}__close`},o(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{box-sizing:border-box;display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:space-between;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;word-break:break-word}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:max-content}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
1
+ import{r as t,c as s,f as i,h as o,H as n,g as a}from"./p-20e8ab84.js";import{k as e,g as r,s as c}from"./p-2c47b88f.js";import{c as l}from"./p-635bb4b3.js";import{F as p}from"./p-b0678a34.js";import"./p-b00f3575.js";import"./p-bb80719e.js";const h="snackbar";var b;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(b||(b={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.kupTimeoutComplete=s(this,"kup-snackbar-timeoutcomplete",6),this.kupManager=e(),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}onKupTimeoutComplete(){this.kupTimeoutComplete.emit({comp:this,id:this.rootElement.id})}async getProps(t){return r(this,b,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,b,t)}async show(){this.visible=!0}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.timeout&&this.visible&&setTimeout((()=>{this.hide(),this.onKupTimeoutComplete()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return o(n,{"kup-visible":this.visible},o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:l},o("div",{class:h},o("div",{class:`${h}__text`},this.text),this.actionButton||this.closeButton?o("div",{class:`${h}__buttons`},this.actionButton?o("div",{class:`${h}__action`},o(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?o("div",{class:`${h}__close`},o(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{box-sizing:border-box;display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:space-between;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;word-break:break-word}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:max-content}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
@@ -1,4 +1,4 @@
1
- import{r as n,c as e,f as t,h as r,H as i,g as u,a as o}from"./p-fd75d5bf.js";import{ao as a,ap as l,k as s,h as c,af as f,g as h,s as d,K as v,I as y}from"./p-e76b646c.js";import{c as m}from"./p-635bb4b3.js";import{F as p}from"./p-d680bdde.js";import{F as w}from"./p-6d9ffb32.js";import"./p-124f3f42.js";var b,g,k;!function(n){n.customStyle="Custom style of the component.",n.data="Dataset containg the tasks list",n.detailData="Dataset containg the details list",n.detailColorCol="Column containing the detail color, in hex format",n.detailColumns="Columns containing informations displayed in the left box, near the gantt of details",n.detailDates="Columns containing detail duration, from (firstDate) to (secondDate)",n.detailFilter="Sets the detail's filter.",n.detailHeight="Height for detail gantt",n.detailIdCol="Column containing unique detail identifier",n.detailNameCol="Column containing detail name displayed",n.detailPrevDates="Columns containing forecast detail duration, from (firstDate) to (secondDate)",n.detailInitialScrollX="Sets the initial scroll X for the detail.",n.detailInitialScrollY="Sets the initial scroll Y for the detail.",n.listCellWidth="Total size of the cells inside to the left box, near the gantt",n.maxWidth="Max width for component",n.phaseColorCol="Column containing the phase color in hex format",n.phaseColumns="Columns containing informations displayed in the left box ,near the gantt of phases",n.phaseColParDep="Column containing the name of the parent phases",n.phaseDates="Columns containing phase duration, from (firstDate) to (secondDate)",n.phaseIdCol="Column containing unique phase identifier",n.phaseNameCol="Column containing phase name displayed",n.phasePrevDates="Columns containing forecast phase duration, from (firstDate) to (secondDate)",n.readOnly="When true, the two gantts are not interactable.",n.showSecondaryDates="Enable/disable display of secondary dates",n.taskColumns="Columns containing informations displayed in the left box, near the gantt",n.taskDates="Columns containing task duration, from (firstDate) to (secondDate)",n.taskFilter="Sets the task's filter.",n.taskHeight="Height for main gantt",n.taskIdCol="Column containing unique task identifier",n.taskNameCol="Column containing task name displayed",n.taskPrevDates="Columns containing forecast task duration, from (firstDate) to (secondDate)",n.taskInitialScrollX="Sets the initial scroll X for the task.",n.taskInitialScrollY="Sets the initial scroll Y for the task.",n.titleMess="Message displayed on top"}(b||(b={})),function(n){n.onTaskOpening="onTaskOpening",n.onTaskClosing="onTaskClosing",n.onClick="onClick",n.onResize="onResize",n.onRightClick="onRightClick"}(g||(g={})),function(n){n.TASK="task",n.PHASE="phase",n.DETAIL="detail"}(k||(k={}));class x{constructor(n,e=100){this.dateTime=new Date,this.event=n,this.threshold=e}isEquivalent(n){const e=(new Date).valueOf()-this.dateTime.valueOf();return JSON.stringify(this.event)===JSON.stringify(n)&&e<this.threshold}resetDateTime(){this.dateTime=new Date}}const S={listCellWidth:"300px",rowHeight:40,barFill:90,projectProgressColor:"#CBCBCB",projectProgressSelectedColor:"#CBCBCB",projectBackgroundColor:"#CBCBCB",projectBackgroundSelectedColor:"#CBCBCB",barProgressColor:"#A2A415",barProgressSelectedColor:"#A2A415",barBackgroundColor:"#A2A415",barBackgroundSelectedColor:"#A2A415"};
1
+ import{r as n,c as e,f as t,h as r,H as i,g as u,a as o}from"./p-20e8ab84.js";import{ao as a,ap as l,k as s,h as c,af as f,g as h,s as d,K as v,I as y}from"./p-2c47b88f.js";import{c as m}from"./p-635bb4b3.js";import{F as p}from"./p-679ccbf8.js";import{F as w}from"./p-cd2af1a6.js";import"./p-d4a879fc.js";var b,g,k;!function(n){n.customStyle="Custom style of the component.",n.data="Dataset containg the tasks list",n.detailData="Dataset containg the details list",n.detailColorCol="Column containing the detail color, in hex format",n.detailColumns="Columns containing informations displayed in the left box, near the gantt of details",n.detailDates="Columns containing detail duration, from (firstDate) to (secondDate)",n.detailFilter="Sets the detail's filter.",n.detailHeight="Height for detail gantt",n.detailIdCol="Column containing unique detail identifier",n.detailNameCol="Column containing detail name displayed",n.detailPrevDates="Columns containing forecast detail duration, from (firstDate) to (secondDate)",n.detailInitialScrollX="Sets the initial scroll X for the detail.",n.detailInitialScrollY="Sets the initial scroll Y for the detail.",n.listCellWidth="Total size of the cells inside to the left box, near the gantt",n.maxWidth="Max width for component",n.phaseColorCol="Column containing the phase color in hex format",n.phaseColumns="Columns containing informations displayed in the left box ,near the gantt of phases",n.phaseColParDep="Column containing the name of the parent phases",n.phaseDates="Columns containing phase duration, from (firstDate) to (secondDate)",n.phaseIdCol="Column containing unique phase identifier",n.phaseNameCol="Column containing phase name displayed",n.phasePrevDates="Columns containing forecast phase duration, from (firstDate) to (secondDate)",n.readOnly="When true, the two gantts are not interactable.",n.showSecondaryDates="Enable/disable display of secondary dates",n.taskColumns="Columns containing informations displayed in the left box, near the gantt",n.taskDates="Columns containing task duration, from (firstDate) to (secondDate)",n.taskFilter="Sets the task's filter.",n.taskHeight="Height for main gantt",n.taskIdCol="Column containing unique task identifier",n.taskNameCol="Column containing task name displayed",n.taskPrevDates="Columns containing forecast task duration, from (firstDate) to (secondDate)",n.taskInitialScrollX="Sets the initial scroll X for the task.",n.taskInitialScrollY="Sets the initial scroll Y for the task.",n.titleMess="Message displayed on top"}(b||(b={})),function(n){n.onTaskOpening="onTaskOpening",n.onTaskClosing="onTaskClosing",n.onClick="onClick",n.onResize="onResize",n.onRightClick="onRightClick"}(g||(g={})),function(n){n.TASK="task",n.PHASE="phase",n.DETAIL="detail"}(k||(k={}));class x{constructor(n,e=100){this.dateTime=new Date,this.event=n,this.threshold=e}isEquivalent(n){const e=(new Date).valueOf()-this.dateTime.valueOf();return JSON.stringify(this.event)===JSON.stringify(n)&&e<this.threshold}resetDateTime(){this.dateTime=new Date}}const S={listCellWidth:"300px",rowHeight:40,barFill:90,projectProgressColor:"#CBCBCB",projectProgressSelectedColor:"#CBCBCB",projectBackgroundColor:"#CBCBCB",projectBackgroundSelectedColor:"#CBCBCB",barProgressColor:"#A2A415",barProgressSelectedColor:"#A2A415",barBackgroundColor:"#A2A415",barBackgroundSelectedColor:"#A2A415"};
2
2
  /**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -220,6 +220,7 @@ export declare class KupBox {
220
220
  private getRows;
221
221
  private initRows;
222
222
  private sortRows;
223
+ private toSortObjectList;
223
224
  private checkScrollOnHover;
224
225
  private checkLayout;
225
226
  private onSortChange;
@@ -22,7 +22,7 @@ export declare enum KupCalendarViewTypes {
22
22
  WEEK = "timeGridWeek"
23
23
  }
24
24
  /**
25
- * Available view types.
25
+ * Available column options.
26
26
  */
27
27
  export declare enum KupCalendarOptions {
28
28
  DATE = "date",
@@ -3,7 +3,7 @@ import { GenericObject } from '../../types/GenericTypes';
3
3
  import { KupCalendarData, KupCalendarDateClickEventPayload, KupCalendarEventClickEventPayload, KupCalendarEventDropEventPayload, KupCalendarViewChangeEventPayload, KupCalendarViewTypes } from './kup-calendar-declarations';
4
4
  export declare class KupCalendar {
5
5
  /**
6
- * References the root HTML element of the component (<kup-button>).
6
+ * References the root HTML element of the component (<kup-calendar>).
7
7
  */
8
8
  rootElement: HTMLElement;
9
9
  /**
@@ -144,12 +144,12 @@ export declare class KupCard {
144
144
  registerListeners(): void;
145
145
  /**
146
146
  * This method is invoked by the layout manager when the layout family is scalable.
147
- * The content of the card (.scalable-element) will be resized to fit the wrapper (.scalable-card).
148
- * The scaling is performed by using a CSS variable (--kup_card_multiplier) which will impact the card's font-size.
147
+ * The content of the card (.scalable-element) will be resized to fit the wrapper (kup-card).
148
+ * The scaling is performed by using a CSS variable (--kup_card_scalable_multiplier) which will impact the card's font-size.
149
149
  * When there is empty space, the multiplier will be increased, as will the content.
150
150
  * Viceversa, when the content exceeds the boundaries, the multiplier will be decreased.
151
151
  */
152
- scalable(): void;
152
+ scalable(): Promise<void>;
153
153
  componentWillLoad(): void;
154
154
  componentDidLoad(): void;
155
155
  componentWillRender(): void;
@@ -0,0 +1,35 @@
1
+ import { KupEventPayload } from '../../components';
2
+ import { KupDataColumn, KupDataRow } from '../../managers/kup-data/kup-data-declarations';
3
+ /**
4
+ * Props of the kup-card-list component.
5
+ * Used to export every prop in an object.
6
+ */
7
+ export declare enum KupCardListProps {
8
+ columnsNumber = "Sets the number of columns.",
9
+ customStyle = "Custom style of the component.",
10
+ data = "Actual data of the component.",
11
+ fullWidth = "Sets whether the component occupies all available width.",
12
+ horizontal = "Sets whether the cards are placed horizontally or not.",
13
+ isClickable = "Sets whether a single card is clickable or not."
14
+ }
15
+ /**
16
+ * Available column options.
17
+ */
18
+ export type KupCardListOptions = 'descr' | 'icon' | 'value' | 'measure' | 'intvalue' | 'decvalue' | 'textcolor' | 'valuecolor' | 'iconcolor' | 'layout';
19
+ /**
20
+ * Card list column.
21
+ */
22
+ export interface KupCardListColumn extends KupDataColumn {
23
+ cardListOption?: KupCardListOptions;
24
+ }
25
+ /**
26
+ * Dataset of the card list.
27
+ */
28
+ export interface KupCardListData {
29
+ columns: KupCardListColumn[];
30
+ rows: KupDataRow[];
31
+ }
32
+ export interface KupCardListClickEventPayload extends KupEventPayload {
33
+ index: number;
34
+ row: KupDataRow;
35
+ }
@@ -0,0 +1,62 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { KupCardListData, KupCardListClickEventPayload } from './kup-card-list-declarations';
3
+ import { GenericObject } from '../../types/GenericTypes';
4
+ export declare class KupCardList {
5
+ #private;
6
+ /**
7
+ * References the root HTML element of the component (<kup-card-list>).
8
+ */
9
+ rootElement: HTMLElement;
10
+ /**
11
+ * Sets the number of columns.
12
+ * @default 1
13
+ */
14
+ columnsNumber: number;
15
+ /**
16
+ * Custom style of the component.
17
+ * @default ""
18
+ * @see https://ketchup.smeup.com/ketchup-showcase/#/customization
19
+ */
20
+ customStyle: string;
21
+ /**
22
+ * Actual data of the component.
23
+ * @default null
24
+ */
25
+ data: KupCardListData;
26
+ /**
27
+ * Sets whether the component occupies all available width.
28
+ * @default true
29
+ */
30
+ fullWidth: boolean;
31
+ /**
32
+ * Sets whether the cards are placed horizontally or not.
33
+ * @default false
34
+ */
35
+ horizontal: boolean;
36
+ /**
37
+ * Sets whether a single card is clickable or not.
38
+ * @default false
39
+ */
40
+ isClickable: boolean;
41
+ kupCardListClickEvent: EventEmitter<KupCardListClickEventPayload>;
42
+ /**
43
+ * Used to retrieve component's props values.
44
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
45
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
46
+ */
47
+ getProps(descriptions?: boolean): Promise<GenericObject>;
48
+ /**
49
+ * This method is used to trigger a new render of the component.
50
+ */
51
+ refresh(): Promise<void>;
52
+ /**
53
+ * Sets the props to the component.
54
+ * @param {GenericObject} props - Object containing props that will be set to the component.
55
+ */
56
+ setProps(props: GenericObject): Promise<void>;
57
+ componentWillLoad(): void;
58
+ componentDidLoad(): void;
59
+ componentDidRender(): void;
60
+ render(): any;
61
+ disconnectedCallback(): void;
62
+ }
@@ -6,8 +6,8 @@ export declare class KupDataTableState implements KupState {
6
6
  expandGroups: boolean;
7
7
  groupLabelDisplay: GroupLabelDisplayMode;
8
8
  density: string;
9
- enableSortableColumns: boolean;
10
9
  enableExtraColumns: boolean;
10
+ enableSortableColumns: boolean;
11
11
  forceOneLine: boolean;
12
12
  globalFilter: boolean;
13
13
  globalFilterValue: string;
@@ -59,7 +59,6 @@ export declare class KupProgressBar {
59
59
  * @param {GenericObject} props - Object containing props that will be set to the component.
60
60
  */
61
61
  setProps(props: GenericObject): Promise<void>;
62
- private createIconElement;
63
62
  componentWillLoad(): void;
64
63
  componentDidLoad(): void;
65
64
  componentWillRender(): void;
@@ -1,4 +1,4 @@
1
- import { KupEventPayload } from "../../types/GenericTypes";
1
+ import { KupEventPayload } from '../../types/GenericTypes';
2
2
  /**
3
3
  * Props of the kup-radio component.
4
4
  * Used to export every prop in an object.
@@ -10,14 +10,6 @@ export declare enum KupRadioProps {
10
10
  disabled = "Defaults at false. When set to true, the component is disabled.",
11
11
  leadingLabel = "Defaults at false. When set to true, the label will be on the left of the component."
12
12
  }
13
- /**
14
- * The object of a single radio.
15
- */
16
- export interface KupRadioData {
17
- value: string;
18
- label: string;
19
- checked: boolean;
20
- }
21
13
  export interface KupRadioChangeEventPayload extends KupEventPayload {
22
14
  value: string;
23
15
  }
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import type { GenericObject, KupEventPayload } from '../../types/GenericTypes';
3
- import { KupRadioChangeEventPayload, KupRadioData } from './kup-radio-declarations';
3
+ import { KupRadioChangeEventPayload } from './kup-radio-declarations';
4
+ import { FRadioData } from '../../f-components/f-radio/f-radio-declarations';
4
5
  export declare class KupRadio {
5
6
  /**
6
7
  * References the root HTML element of the component (<kup-radio>).
@@ -26,7 +27,7 @@ export declare class KupRadio {
26
27
  * List of elements.
27
28
  * @default null
28
29
  */
29
- data: KupRadioData[];
30
+ data: FRadioData[];
30
31
  /**
31
32
  * Defaults at false. When set to true, the component is disabled.
32
33
  * @default false
@@ -6,7 +6,6 @@ export declare class KupRating {
6
6
  * References the root HTML element of the component (<kup-rating>).
7
7
  */
8
8
  rootElement: HTMLElement;
9
- stars: Array<object>;
10
9
  /**
11
10
  * Custom style of the component.
12
11
  * @default ""
@@ -32,9 +31,8 @@ export declare class KupRating {
32
31
  * Instance of the KupManager class.
33
32
  */
34
33
  private kupManager;
35
- kupRatingClick: EventEmitter<KupRatingClickEventPayload>;
36
- onStarClick(newValue: number): void;
37
- private onValueChanged;
34
+ kupClick: EventEmitter<KupRatingClickEventPayload>;
35
+ onKupClick(newValue: number): void;
38
36
  /**
39
37
  * Used to retrieve component's props values.
40
38
  * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
@@ -50,9 +48,6 @@ export declare class KupRating {
50
48
  * @param {GenericObject} props - Object containing props that will be set to the component.
51
49
  */
52
50
  setProps(props: GenericObject): Promise<void>;
53
- onMouseOver(newValue: number): void;
54
- onMouseOut(): void;
55
- buildStars(numberOfStars: number): void;
56
51
  componentWillLoad(): void;
57
52
  componentDidLoad(): void;
58
53
  componentWillRender(): void;