@sme.up/ketchup 11.0.0-SNAPSHOT-20241217083229 → 11.0.0-SNAPSHOT-20241217103126

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 (293) hide show
  1. package/dist/cjs/{f-cell-39c40bdf.js → f-cell-752a5bc4.js} +4 -4
  2. package/dist/cjs/{f-chip-d89bcb57.js → f-chip-0342fdc1.js} +1 -1
  3. package/dist/cjs/{f-object-field-4a77d419.js → f-object-field-74179ab4.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-0743ddec.js → f-paginator-utils-db5e6e08.js} +1 -1
  5. package/dist/cjs/{f-text-field-02f710d5.js → f-text-field-ed89e4d2.js} +3 -2
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/cjs/ketchup.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-activity-timeline.cjs.entry.js +3 -3
  10. package/dist/cjs/kup-autocomplete_28.cjs.entry.js +116 -86
  11. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  12. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  13. package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
  14. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  15. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +7 -7
  16. package/dist/cjs/kup-dashboard.cjs.entry.js +3 -3
  17. package/dist/cjs/{kup-data-table-helper-43cfaea5.js → kup-data-table-helper-d6d793fc.js} +1 -1
  18. package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
  19. package/dist/cjs/kup-echart.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-editor.cjs.entry.js +2 -2
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  22. package/dist/cjs/kup-gantt_10.cjs.entry.js +23 -23
  23. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-htm.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
  27. package/dist/cjs/kup-input-panel.cjs.entry.js +6 -6
  28. package/dist/cjs/kup-lazy.cjs.entry.js +12 -12
  29. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  30. package/dist/cjs/{kup-manager-1145102b.js → kup-manager-4e75f704.js} +1 -1
  31. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  33. package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
  34. package/dist/cjs/kup-pdf.cjs.entry.js +2 -2
  35. package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
  36. package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
  37. package/dist/cjs/kup-planner.cjs.entry.js +3 -3
  38. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  39. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  40. package/dist/cjs/kup-snackbar.cjs.entry.js +2 -2
  41. package/dist/cjs/kup-txt.cjs.entry.js +2 -2
  42. package/dist/cjs/kup-typography-list.cjs.entry.js +2 -2
  43. package/dist/cjs/kup-typography.cjs.entry.js +2 -2
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/collection/components/kup-accordion/kup-accordion.js +1 -1
  46. package/dist/collection/components/kup-activity-timeline/kup-activity-timeline.js +1 -1
  47. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  48. package/dist/collection/components/kup-badge/kup-badge.js +2 -2
  49. package/dist/collection/components/kup-button-list/kup-button-list.js +1 -1
  50. package/dist/collection/components/kup-calendar/kup-calendar.js +2 -2
  51. package/dist/collection/components/kup-card-list/kup-card-list.css +1 -1
  52. package/dist/collection/components/kup-cell/kup-cell.js +2 -2
  53. package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
  54. package/dist/collection/components/kup-chip/kup-chip.js +2 -2
  55. package/dist/collection/components/kup-color-picker/kup-color-picker.js +2 -2
  56. package/dist/collection/components/kup-combobox/kup-combobox.js +29 -15
  57. package/dist/collection/components/kup-dashboard/kup-dashboard.js +1 -1
  58. package/dist/collection/components/kup-data-table/kup-data-table.js +9 -9
  59. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  60. package/dist/collection/components/kup-dialog/kup-dialog.js +1 -1
  61. package/dist/collection/components/kup-drawer/kup-drawer.js +2 -2
  62. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -1
  63. package/dist/collection/components/kup-echart/kup-echart.js +1 -1
  64. package/dist/collection/components/kup-editor/kup-editor.js +1 -1
  65. package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
  66. package/dist/collection/components/kup-form/kup-form.js +2 -2
  67. package/dist/collection/components/kup-htm/kup-htm.js +1 -1
  68. package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
  69. package/dist/collection/components/kup-input-panel/kup-input-panel.js +1 -1
  70. package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
  71. package/dist/collection/components/kup-list/kup-list.css +5 -1
  72. package/dist/collection/components/kup-list/kup-list.js +43 -4
  73. package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
  74. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  75. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
  76. package/dist/collection/components/kup-object-field/kup-object-field.js +1 -1
  77. package/dist/collection/components/kup-pdf/kup-pdf.js +1 -1
  78. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
  79. package/dist/collection/components/kup-planner/kup-planner.js +1 -1
  80. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
  81. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
  82. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
  83. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
  84. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
  85. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  86. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
  87. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
  88. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  89. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  90. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
  91. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  92. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  93. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  94. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  95. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  96. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  97. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  98. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  99. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  100. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  101. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  102. package/dist/collection/components/kup-txt/kup-txt.js +1 -1
  103. package/dist/collection/components/kup-typography/kup-typography.js +1 -1
  104. package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
  105. package/dist/collection/f-components/f-text-field/f-text-field.js +2 -1
  106. package/dist/components/index.js +1 -1
  107. package/dist/components/kup-accordion.js +3 -3
  108. package/dist/components/kup-activity-timeline.js +3 -3
  109. package/dist/components/kup-autocomplete.js +1 -1
  110. package/dist/components/kup-badge.js +1 -1
  111. package/dist/components/kup-box.js +1 -1
  112. package/dist/components/kup-button-list.js +1 -1
  113. package/dist/components/kup-button.js +1 -1
  114. package/dist/components/kup-calendar.js +4 -4
  115. package/dist/components/kup-card-list.js +4 -4
  116. package/dist/components/kup-card.js +1 -1
  117. package/dist/components/kup-cell.js +4 -4
  118. package/dist/components/kup-chart.js +1 -1
  119. package/dist/components/kup-checkbox.js +1 -1
  120. package/dist/components/kup-chip.js +1 -1
  121. package/dist/components/kup-color-picker.js +1 -1
  122. package/dist/components/kup-combobox.js +1 -1
  123. package/dist/components/kup-custom-task-list-header.js +1 -1
  124. package/dist/components/kup-dashboard.js +3 -3
  125. package/dist/components/kup-data-table.js +1 -1
  126. package/dist/components/kup-date-picker.js +1 -1
  127. package/dist/components/kup-dialog.js +1 -1
  128. package/dist/components/kup-drawer.js +4 -4
  129. package/dist/components/kup-dropdown-button.js +1 -1
  130. package/dist/components/kup-echart.js +1 -1
  131. package/dist/components/kup-editor.js +1 -1
  132. package/dist/components/kup-family-tree.js +5 -5
  133. package/dist/components/kup-form.js +1 -1
  134. package/dist/components/kup-gantt-calendar.js +1 -1
  135. package/dist/components/kup-gantt.js +1 -1
  136. package/dist/components/kup-gauge.js +1 -1
  137. package/dist/components/kup-grid-renderer.js +1 -1
  138. package/dist/components/kup-grid.js +1 -1
  139. package/dist/components/kup-horizontal-scroll.js +1 -1
  140. package/dist/components/kup-htm.js +3 -3
  141. package/dist/components/kup-iframe.js +2 -2
  142. package/dist/components/kup-image-list.js +5 -5
  143. package/dist/components/kup-image.js +1 -1
  144. package/dist/components/kup-input-panel.js +4 -4
  145. package/dist/components/kup-lazy.js +13 -13
  146. package/dist/components/kup-list.js +1 -1
  147. package/dist/components/kup-magic-box.js +7 -7
  148. package/dist/components/kup-nav-bar.js +3 -3
  149. package/dist/components/kup-numeric-picker.js +3 -3
  150. package/dist/components/kup-object-field.js +3 -3
  151. package/dist/components/kup-pdf.js +3 -3
  152. package/dist/components/kup-photo-frame.js +4 -4
  153. package/dist/components/kup-planner-renderer.js +1 -1
  154. package/dist/components/kup-planner.js +17 -17
  155. package/dist/components/kup-probe.js +3 -3
  156. package/dist/components/kup-progress-bar.js +1 -1
  157. package/dist/components/kup-qlik.js +3 -3
  158. package/dist/components/kup-radio.js +1 -1
  159. package/dist/components/kup-rating.js +1 -1
  160. package/dist/components/kup-snackbar.js +3 -3
  161. package/dist/components/kup-spinner.js +1 -1
  162. package/dist/components/kup-standard-tooltip.js +1 -1
  163. package/dist/components/kup-switch.js +1 -1
  164. package/dist/components/kup-switcher.js +1 -1
  165. package/dist/components/kup-tab-bar.js +1 -1
  166. package/dist/components/kup-task-gantt.js +1 -1
  167. package/dist/components/kup-task-list-header.js +1 -1
  168. package/dist/components/kup-task-list-table.js +1 -1
  169. package/dist/components/kup-task-list.js +1 -1
  170. package/dist/components/kup-text-field.js +1 -1
  171. package/dist/components/kup-time-picker.js +1 -1
  172. package/dist/components/kup-toolbar.js +1 -1
  173. package/dist/components/kup-tooltip.js +1 -1
  174. package/dist/components/kup-tree.js +1 -1
  175. package/dist/components/kup-txt.js +3 -3
  176. package/dist/components/kup-typography-list.js +3 -3
  177. package/dist/components/kup-typography.js +3 -3
  178. package/dist/components/kup-vertical-scroll.js +1 -1
  179. package/dist/components/{p-d80bbcb0.js → p-14aad914.js} +1 -1
  180. package/dist/components/{p-f95300f6.js → p-22b40453.js} +2 -2
  181. package/dist/components/{p-cfc8a8fb.js → p-3466bd5a.js} +1 -1
  182. package/dist/components/{p-2d57f1db.js → p-3bc624c9.js} +1 -1
  183. package/dist/components/{p-f81a6df1.js → p-3bed44d4.js} +2 -2
  184. package/dist/components/{p-911cd91d.js → p-776a38a0.js} +15 -15
  185. package/dist/components/{p-73449cb1.js → p-79c12fc7.js} +2 -2
  186. package/dist/components/{p-56c8142a.js → p-822c3930.js} +1 -1
  187. package/dist/components/{p-f3a59611.js → p-83a86ca8.js} +3 -3
  188. package/dist/components/{p-0d856495.js → p-ae5af2ad.js} +13 -13
  189. package/dist/components/{p-d0735e25.js → p-af3fcbd9.js} +3 -3
  190. package/dist/components/{p-5a065bf1.js → p-b96e265d.js} +2 -2
  191. package/dist/components/{p-61b8d8fd.js → p-babf447c.js} +2 -2
  192. package/dist/components/{p-dc697572.js → p-be17920c.js} +2 -2
  193. package/dist/components/{p-e275fc9f.js → p-c97810e2.js} +1 -1
  194. package/dist/components/{p-ff1894fe.js → p-d8b0f5eb.js} +5 -5
  195. package/dist/components/{p-3e08d788.js → p-e2f1b5d3.js} +3 -3
  196. package/dist/components/{p-4bab013a.js → p-f22fb696.js} +113 -81
  197. package/dist/components/{p-a2ed336a.js → p-f7c2ca1d.js} +4 -4
  198. package/dist/components/{p-1f1d9b1f.js → p-ff8bdafd.js} +7 -7
  199. package/dist/esm/{f-cell-31585bb7.js → f-cell-07fa16b7.js} +4 -4
  200. package/dist/esm/{f-chip-e31d0dfb.js → f-chip-70a06610.js} +1 -1
  201. package/dist/esm/{f-object-field-fa795c94.js → f-object-field-4f6d8bb7.js} +2 -2
  202. package/dist/esm/{f-paginator-utils-d34dca74.js → f-paginator-utils-17f01722.js} +1 -1
  203. package/dist/esm/{f-text-field-e73d7967.js → f-text-field-3521b89f.js} +3 -2
  204. package/dist/esm/index.js +1 -1
  205. package/dist/esm/ketchup.js +1 -1
  206. package/dist/esm/kup-accordion.entry.js +2 -2
  207. package/dist/esm/kup-activity-timeline.entry.js +3 -3
  208. package/dist/esm/kup-autocomplete_28.entry.js +116 -86
  209. package/dist/esm/kup-box.entry.js +7 -7
  210. package/dist/esm/kup-calendar.entry.js +4 -4
  211. package/dist/esm/kup-card-list.entry.js +2 -2
  212. package/dist/esm/kup-cell.entry.js +7 -7
  213. package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
  214. package/dist/esm/kup-dashboard.entry.js +3 -3
  215. package/dist/esm/{kup-data-table-helper-771bc5c8.js → kup-data-table-helper-d85d607a.js} +1 -1
  216. package/dist/esm/kup-drawer.entry.js +3 -3
  217. package/dist/esm/kup-echart.entry.js +2 -2
  218. package/dist/esm/kup-editor.entry.js +2 -2
  219. package/dist/esm/kup-family-tree.entry.js +3 -3
  220. package/dist/esm/kup-gantt_10.entry.js +23 -23
  221. package/dist/esm/kup-grid.entry.js +1 -1
  222. package/dist/esm/kup-htm.entry.js +2 -2
  223. package/dist/esm/kup-iframe.entry.js +1 -1
  224. package/dist/esm/kup-image-list.entry.js +8 -8
  225. package/dist/esm/kup-input-panel.entry.js +6 -6
  226. package/dist/esm/kup-lazy.entry.js +12 -12
  227. package/dist/esm/kup-magic-box.entry.js +4 -4
  228. package/dist/esm/{kup-manager-828bdc1c.js → kup-manager-02418eff.js} +1 -1
  229. package/dist/esm/kup-nav-bar.entry.js +2 -2
  230. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  231. package/dist/esm/kup-object-field.entry.js +4 -4
  232. package/dist/esm/kup-pdf.entry.js +2 -2
  233. package/dist/esm/kup-photo-frame.entry.js +3 -3
  234. package/dist/esm/kup-planner-renderer.entry.js +2 -2
  235. package/dist/esm/kup-planner.entry.js +3 -3
  236. package/dist/esm/kup-probe.entry.js +2 -2
  237. package/dist/esm/kup-qlik.entry.js +2 -2
  238. package/dist/esm/kup-snackbar.entry.js +2 -2
  239. package/dist/esm/kup-txt.entry.js +2 -2
  240. package/dist/esm/kup-typography-list.entry.js +2 -2
  241. package/dist/esm/kup-typography.entry.js +2 -2
  242. package/dist/esm/loader.js +1 -1
  243. package/dist/ketchup/index.esm.js +1 -1
  244. package/dist/ketchup/ketchup.esm.js +1 -1
  245. package/dist/ketchup/{p-b53e417a.entry.js → p-00969f5a.entry.js} +1 -1
  246. package/dist/ketchup/{p-9474bc4f.entry.js → p-026a5635.entry.js} +1 -1
  247. package/dist/ketchup/{p-14706a7c.entry.js → p-06670b74.entry.js} +2 -2
  248. package/dist/ketchup/{p-6ee26164.js → p-08608891.js} +1 -1
  249. package/dist/ketchup/{p-43783080.js → p-0c8cb88e.js} +1 -1
  250. package/dist/ketchup/{p-883c6a82.entry.js → p-100b68f9.entry.js} +1 -1
  251. package/dist/ketchup/{p-cffd22c7.entry.js → p-1339b77a.entry.js} +1 -1
  252. package/dist/ketchup/{p-cd75fa31.entry.js → p-200fee46.entry.js} +1 -1
  253. package/dist/ketchup/{p-c1950e47.entry.js → p-24e66646.entry.js} +1 -1
  254. package/dist/ketchup/{p-be59b96c.entry.js → p-2e8b266e.entry.js} +2 -2
  255. package/dist/ketchup/{p-19afdc14.entry.js → p-383f0f64.entry.js} +1 -1
  256. package/dist/ketchup/{p-5a24ec5b.entry.js → p-4b13c5f5.entry.js} +1 -1
  257. package/dist/ketchup/{p-7d639720.entry.js → p-51f2ffb9.entry.js} +1 -1
  258. package/dist/ketchup/p-60a761cb.entry.js +9 -0
  259. package/dist/ketchup/p-67eacdd7.entry.js +1 -0
  260. package/dist/ketchup/{p-13b22d3c.js → p-72ed5abb.js} +1 -1
  261. package/dist/ketchup/{p-e369dacb.entry.js → p-87c116ed.entry.js} +1 -1
  262. package/dist/ketchup/{p-d20fbba2.entry.js → p-8876e673.entry.js} +1 -1
  263. package/dist/ketchup/{p-ed017acb.entry.js → p-8cfb1c3c.entry.js} +1 -1
  264. package/dist/ketchup/{p-e1048932.entry.js → p-8f6b99d1.entry.js} +1 -1
  265. package/dist/ketchup/{p-018021f3.entry.js → p-92daefa6.entry.js} +2 -2
  266. package/dist/ketchup/{p-d15d479c.js → p-93dff1f9.js} +1 -1
  267. package/dist/ketchup/{p-6a552af4.entry.js → p-9e8bd55a.entry.js} +1 -1
  268. package/dist/ketchup/{p-dd2c41ac.entry.js → p-9f7826b8.entry.js} +1 -1
  269. package/dist/ketchup/{p-73827465.entry.js → p-a34e3c9a.entry.js} +1 -1
  270. package/dist/ketchup/{p-23b38d86.entry.js → p-b4bf8262.entry.js} +1 -1
  271. package/dist/ketchup/{p-54906238.js → p-b640b0d3.js} +1 -1
  272. package/dist/ketchup/{p-bdf8da46.entry.js → p-b6fa890b.entry.js} +1 -1
  273. package/dist/ketchup/p-bd8c59be.js +1 -0
  274. package/dist/ketchup/{p-b1012dc7.entry.js → p-c4617db5.entry.js} +1 -1
  275. package/dist/ketchup/{p-e472b1ac.entry.js → p-c51aca8b.entry.js} +1 -1
  276. package/dist/ketchup/{p-05ab6230.entry.js → p-c9961dde.entry.js} +1 -1
  277. package/dist/ketchup/{p-c7464ad2.entry.js → p-ccb446a9.entry.js} +1 -1
  278. package/dist/ketchup/{p-8315558f.entry.js → p-d2732f45.entry.js} +1 -1
  279. package/dist/ketchup/{p-739564c1.entry.js → p-df467d12.entry.js} +2 -2
  280. package/dist/ketchup/{p-31c2ce09.entry.js → p-edcb4ac6.entry.js} +1 -1
  281. package/dist/ketchup/{p-5d4bfad2.js → p-f11b1064.js} +1 -1
  282. package/dist/ketchup/{p-c01717af.entry.js → p-f63e26e4.entry.js} +1 -1
  283. package/dist/ketchup/{p-ebf37ad3.entry.js → p-f81e7e01.entry.js} +1 -1
  284. package/dist/ketchup/{p-9d94d189.entry.js → p-fc32246e.entry.js} +1 -1
  285. package/dist/ketchup/{p-8e89db49.entry.js → p-fcdeb4b6.entry.js} +1 -1
  286. package/dist/types/components/kup-combobox/kup-combobox.d.ts +1 -1
  287. package/dist/types/components/kup-list/kup-list.d.ts +8 -0
  288. package/dist/types/components.d.ts +12 -2
  289. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  290. package/package.json +1 -1
  291. package/dist/ketchup/p-54d790eb.entry.js +0 -1
  292. package/dist/ketchup/p-5d26e46f.js +0 -1
  293. package/dist/ketchup/p-f87e97e4.entry.js +0 -9
@@ -1,4 +1,4 @@
1
- import{r as t,h as i,F as e}from"./p-b0368f88.js";import{a as s,c as o}from"./p-1ee561ba.js";import{d as n,i as a,g as r,h}from"./p-008bdcdc.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-cd3a7d53.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"8077b94ee9c7f98f55eb61c060ead9089c5bfa14",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"3bfbff19a64a176b9ca4e00574f4887308e8f501",class:"title"},i("span",{key:"80d39e9c94eb08892aecbef58af1e8fc333dae1b"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"1a91f7a7e8ecc5e91e7182169e1192953a111306",class:"toggler"},i("label",{key:"bf7a51a2e069892f1621cbaaad7fdba359321c59",htmlFor:"ch2",class:"switch"},i("input",{key:"840e7dee95911fc2db92e535f5c9f17c9852b2d6",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"8d5c8bd70141b42915c6e4213aedcadf64496a38",class:"slider"})),i("span",{key:"42b514f4ef2919cd25bf653b2bf52c6f80441e84",class:"label"},"Previsioni")))}};g.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){const t=new s,o={};this.scrollableTaskList&&(o.width=this.rowWidth);const a=this.tasks.reduce(((t,i)=>t.valuesToShow.length>i.valuesToShow.length?t:i)).valuesToShow.length+1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:o},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((s=>{var o,r,h,l;return i(e,null,"project"===s.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(o=s.valuesToShow)||void 0===o?void 0:o.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`task_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===s.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(r=s.styles)||void 0===r?void 0:r.backgroundColor}})):i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=s.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=s.valuesToShow)||void 0===l?void 0:l.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`phase_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var t;let e="";for(let t=0;t<s.valuesToShow.length;t++)e+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":e},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(t=s.valuesToShow)||void 0===t?void 0:t.map(((t,e)=>i("span",{class:0===e?"main":void 0,title:t.length>10?t:void 0,key:`detail_${s.id}_valuesToShow_${e}`},t))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"c354de3621725a9c806c6f9d199af66ab821a4ef",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"a7b04d87979a2fc845ea52c82be79738578c8977",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"4d5bae93fd9a3de2ab12fa3a00f971e4f9a7b53a",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"05c00faf553bf634cfd0fa5e635c3e6b386a8a64",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,m,k,b,w,z={exports:{}};y=z.exports,m=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),k=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new m(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],m=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-m*y,v)}var k=this.loss(o);k<p&&(l=o.slice(0),p=k)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
1
+ import{r as t,h as i,F as e}from"./p-b0368f88.js";import{a as s,c as o}from"./p-1ee561ba.js";import{d as n,i as a,g as r,h}from"./p-008bdcdc.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-cd3a7d53.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"0dda65a73efcc5b8217019bf8d1d5d4a66277df6",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"07bfcbb99f759ae7968cb76af97e04666cdfb84f",class:"title"},i("span",{key:"59b6656d24f1b381455888534075a704eadf3757"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"7d6f5eca5945d49fd784089cc97906400f9279fe",class:"toggler"},i("label",{key:"6badb37501bdc190948b6fd101a04695b556fa87",htmlFor:"ch2",class:"switch"},i("input",{key:"07f2f293bec60e83caf3ff8590277c05a8cad26a",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"a6cb9c1484bf2fbec6a1e9cdb6b2fac06a35c03f",class:"slider"})),i("span",{key:"4def4a9d08f8eb2fecf7058ad24d44d0cf626dec",class:"label"},"Previsioni")))}};g.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){const t=new s,o={};this.scrollableTaskList&&(o.width=this.rowWidth);const a=this.tasks.reduce(((t,i)=>t.valuesToShow.length>i.valuesToShow.length?t:i)).valuesToShow.length+1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:o},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((s=>{var o,r,h,l;return i(e,null,"project"===s.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(o=s.valuesToShow)||void 0===o?void 0:o.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`task_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===s.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${s.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(s.id),this.onclickTaskList(s.id)},onDblClick:()=>{this.setSelectedTask(s.id),this.ondblclickTaskList(s.id)},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(r=s.styles)||void 0===r?void 0:r.backgroundColor}})):i("span",{key:`phase_${s.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=s.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=s.valuesToShow)||void 0===l?void 0:l.map(((e,o)=>i("span",{class:0===o?"main":void 0,title:e.length>10?e:void 0,key:`phase_${s.id}_valuesToShow_${o}`},"#START#"===e?t.formatToLocaleSimple(s.start):"#END#"===e?t.formatToLocaleSimple(s.end):e))),this.scrollableTaskList&&a>s.valuesToShow.length&&n(a-s.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var t;let e="";for(let t=0;t<s.valuesToShow.length;t++)e+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":e},onContextMenu:t=>{t.preventDefault(),this.setSelectedTask(s.id),this.oncontextmenuTaskList(t,s.id)}},null===(t=s.valuesToShow)||void 0===t?void 0:t.map(((t,e)=>i("span",{class:0===e?"main":void 0,title:t.length>10?t:void 0,key:`detail_${s.id}_valuesToShow_${e}`},t))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"cb25f41952a9df647dde916bdec8777008f8fef3",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"1b2a22e86f120867dc36588d13d4529e85406b99",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"6fcae9075fdd1228f4d8975390abbe55acd3f659",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"049fd3ba1ebcef54ae8fe3e78ead566e21c5f76b",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,m,k,b,w,z={exports:{}};y=z.exports,m=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),k=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new m(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],m=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-m*y,v)}var k=this.loss(o);k<p&&(l=o.slice(0),p=k)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,4 +13,4 @@ import{r as t,h as i,F as e}from"./p-b0368f88.js";import{a as s,c as o}from"./p-
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,o,n=e.call(t),a=[];try{for(;(void 0===i||i-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(t){o={error:t}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return a}((r=t,4===r.length?[parseInt("0x"+r[1]+r[1]),parseInt("0x"+r[2]+r[2]),parseInt("0x"+r[3]+r[3])]:7===r.length?[parseInt("0x"+r[1]+r[2]),parseInt("0x"+r[3]+r[4]),parseInt("0x"+r[5]+r[6])]:[]),3))[1],n=e[2],!b(s=e[0])||!b(o)||!b(n))throw new Error("hextToRgb returned an invalid value for '"+t+"'");a=new m(Number(s),Number(o),Number(n))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var h=new k(a,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},i));return w[t]=Object.assign({},h.solve(),{hex:t,rgb:[s,o,n],cache:!1})},Object.defineProperty(y,"__esModule",{value:!0});const T=class{constructor(i){t(this,i),this.tasks=void 0,this.dates=void 0,this.ganttEvent=void 0,this.selectedTask=void 0,this.rowHeight=0,this.columnWidth=0,this.timeStep=0,this.taskHeight=0,this.arrowColor="",this.arrowIndent=0,this.fontFamily="",this.fontSize="",this.rtl=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.currentDateIndicator=void 0,this.projection=void 0,this.readOnly=!1,this.gridProps=void 0,this.dateChange=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.barClick=void 0,this.barDblClick=void 0,this.barContextMenu=void 0,this.delete=void 0,this.setFailedTask=void 0,this.setSelectedTask=void 0,this.eventStart=void 0,this.eMouseDown=void 0,this.phaseDrop=void 0,this.setGanttEvent=void 0,this.phaseDragScroll=void 0,this.xStep=0,this.initEventX1Delta=0,this.initEventXClick=0,this.isMoving=!1,this.point=void 0,this.svg=void 0,this.currentTarget=void 0,this.dragScrollInterval=void 0,this.dropZoneTask=void 0}componentDidLoad(){this.point=this.createSVGPoint(),this.updateXStep()}createSVGPoint(){if(this.svg)return this.svg.createSVGPoint()}updateXStep(){const t=this.dates[1].getTime()-this.dates[0].getTime()-60*this.dates[1].getTimezoneOffset()*1e3+60*this.dates[0].getTimezoneOffset()*1e3;this.xStep=this.timeStep*this.columnWidth/t}updateSvgMove(){const t=async t=>{var i,e;if(!this.ganttEvent.changedTask||!this.point||!this.svg)return;t.preventDefault(),this.point.x=t.clientX,this.point.y=t.clientY;const s=this.point.matrixTransform(null===(e=null===(i=this.svg)||void 0===i?void 0:i.getScreenCTM())||void 0===e?void 0:e.inverse()),{isChanged:o,changedTask:n}=h(s.x,this.ganttEvent.action,this.ganttEvent.changedTask,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,s.y);this.currentTarget&&(this.addGhostPreview(t),this.handleAutoScrollForPhaseDrag(t),this.addDropzoneVisualization()),o&&this.setGanttEvent(Object.assign(Object.assign({},this.ganttEvent),{action:this.ganttEvent.action,changedTask:n}))},i=async e=>{var s,o,n;clearInterval(this.dragScrollInterval),this.resetDropzoneVisualization();const{action:a,originalSelectedTask:r,changedTask:l}=this.ganttEvent;if(!(l&&this.point&&this.svg&&r))return;e.preventDefault(),this.point.x=e.clientX;const p=this.point.matrixTransform(null===(o=null===(s=this.svg)||void 0===s?void 0:s.getScreenCTM())||void 0===o?void 0:o.inverse());this.currentTarget=null;const{changedTask:f}=h(p.x,a,l,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,p.y),c=r.start!==f.start||r.end!==f.end||r.progress!==f.progress||r.y!==f.y;this.svg.removeEventListener("mousemove",t),this.svg.removeEventListener("mouseup",i),null===(n=this.svg.querySelector(".ghost-preview"))||void 0===n||n.remove(),this.setGanttEvent({action:""}),this.isMoving=!1;let d,u,g=!0;if("move"===a&&c&&"task"===f.type&&(d=this.tasks.find((t=>this.isPhaseWithinTaskArea(l,t)&&"project"===t.type)),u=this.tasks.find((t=>t.id==r.id.split("_").shift()))),(null==d?void 0:d.id)&&(null==u?void 0:u.id)!==(null==d?void 0:d.id))this.phaseDrop(r,u,f,d);else if(("move"===a||"end"===a||"start"===a)&&this.dateChange&&c)try{const t=await this.dateChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}else if(this.progressChange&&c)try{const t=this.progressChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}g||this.setFailedTask(r)};this.isMoving||"move"!==this.ganttEvent.action&&"end"!==this.ganttEvent.action&&"start"!==this.ganttEvent.action&&"progress"!==this.ganttEvent.action||!this.svg||(this.svg.addEventListener("mousemove",t),this.svg.addEventListener("mouseup",i),this.isMoving=!0)}hasMovedHorizontally(t){return!this.readOnly&&this.initEventXClick!==t.clientX}addGhostPreview(t){var i;null===(i=this.svg.querySelector(".ghost-preview"))||void 0===i||i.remove();const e=Object.assign(Object.assign({},t),{dataTransfer:new DataTransfer}),s=this.currentTarget;s.classList.add("ghost-preview"),this.svg.appendChild(s.cloneNode(!0));const o=s.getBoundingClientRect();e.dataTransfer.setDragImage(s,e.clientX-o.left,e.clientY-o.top)}handleAutoScrollForPhaseDrag(t){var i,e;const s=null===(e=null===(i=this.svg)||void 0===i?void 0:i.parentElement)||void 0===e?void 0:e.parentElement;if(s)if(clearInterval(this.dragScrollInterval),s.clientHeight<s.scrollHeight){const i=s.getBoundingClientRect(),e=t.clientY-i.top,o=5;e-20<o?this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop-=o)}),1):e+20>i.height-o&&(this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop+=o)}),1))}else{const i=20,e=window.innerHeight,s=t.clientY;s<i?window.scrollBy(0,-i):s>e-i&&window.scrollBy(0,i)}}isPhaseWithinTaskArea(t,i){return t.y+t.height>=i.ySecondary&&t.y<=i.ySecondary+i.height&&t.x2>=i.x1&&t.x1<=i.x2}addDropzoneVisualization(){var t;this.resetDropzoneVisualization();const i=this.tasks.filter((t=>{var i,e,s;return"project"==t.type&&(null===(s=null===(e=null===(i=this.ganttEvent.originalSelectedTask)||void 0===i?void 0:i.id)||void 0===e?void 0:e.split("_"))||void 0===s?void 0:s.shift())!=t.id})),e=this.ganttEvent.changedTask;this.dropZoneTask=i.find((t=>this.isPhaseWithinTaskArea(e,t))),(null===(t=this.dropZoneTask)||void 0===t?void 0:t.ySecondary)&&this.getBarRectsForDropzoneVisualization().forEach((t=>{t.setAttribute("fill",u.barDropZoneColor)}))}resetDropzoneVisualization(){if(!this.dropZoneTask)return;const t=this.getBarRectsForDropzoneVisualization(),i=!!this.selectedTask&&this.dropZoneTask.id===this.selectedTask.id;t.forEach((t=>{t.setAttribute("fill",this.getBarColor(i,this.dropZoneTask.styles))}))}getBarRectsForDropzoneVisualization(){let t;if(this.showSecondaryDates){const i=this.svg.querySelector(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`),e=[i];let s=i.nextElementSibling;for(;null!==s;)e.push(s),s=s.nextElementSibling;let o=i.previousElementSibling;for(;null!==o;)e.unshift(o),o=o.previousElementSibling;t=e}else t=this.svg.querySelectorAll(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);return t}handleBarEventStart(t,i,e){var s;if(e)if(a(e)){if("delete"===t&&this.delete)try{const e=this.delete(i);void 0!==e&&e&&this.setGanttEvent({action:t,changedTask:i})}catch(t){console.error("Error on Delete. "+t)}}else if("mouseenter"===t)this.ganttEvent.action||this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else if("mouseleave"===t)"mouseenter"===this.ganttEvent.action&&this.setGanttEvent({action:""});else if("dblclick"===t)this.doubleClick&&this.doubleClick(i);else if("click"===t)!this.hasMovedHorizontally(e)&&this.barClick&&this.barClick(i);else if("contextmenu"===t)e.preventDefault(),this.barContextMenu&&this.barContextMenu(e,i);else if("move"===t){if(!this.svg||!this.point)return;this.point.x=e.clientX;const o=this.point.matrixTransform(null===(s=this.svg.getScreenCTM())||void 0===s?void 0:s.inverse());this.currentTarget="task"===i.type?e.currentTarget.cloneNode(!0):null,this.initEventX1Delta=o.x-i.x1,this.point.y=e.clientY,this.initEventXClick=e.clientX,this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i})}else this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else"select"===t&&this.setSelectedTask(i.id)}getTaskIcon(t){const e=z.exports.hexToCSSFilter(t.color);return i("image",{href:t.url,filter:e.filter.replace(";",""),x:t.x,y:t.y,width:t.width,height:t.height})}renderKupBar(t,e,s,o){var n,a,r;return i("g",{class:"barWrapper","tab-index":0,"data-type":t.type},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,!this.readOnly&&!!this.dateChange&&!t.isDisabled,t,t.x1secondary,(null!==(n=t.x2secondary)&&void 0!==n?n:0)-(null!==(a=t.x1secondary)&&void 0!==a?a:0),t.ySecondary),i("g",{class:"handleGroup"},s&&i("g",null,this.renderKupBarDateHandle(t.x1+1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"start"),this.renderKupBarDateHandle(t.x2-t.handleWidth-1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"end")),o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(r=t.icon.color)&&void 0!==r?r:"#000000",url:t.icon.url,width:t.height/2+"px",height:t.height/2+"px",x:t.x1+(t.x2-t.x1)-t.height/2/2,y:t.y-t.height/2/2/2+(this.showSecondaryDates?t.height/2:0)}))}renderKupBarDisplay(t,e,s,o,n,a,r,h,l,p,f,c,d,u){if(this.showSecondaryDates&&void 0!==c){const g=o/2;return i("g",{onMouseDown:t=>p&&this.handleBarEventStart("move",f,t)},i("rect",{key:"top semi-transparent bar",x:c,width:d,y:null!=u?u:e,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),opacity:.5,class:"barBackground"}),i("rect",{key:"main bar",x:t,width:s,y:e+g,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{key:"progress bar",x:n,width:a,y:e+g,height:g,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}return i("g",{onMouseDown:t=>{p&&this.handleBarEventStart("move",f,t)}},i("rect",{x:t,width:s,y:e,height:o,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{x:n,width:a,y:e,height:o,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}renderKupBarDateHandle(t,e,s,o,n,a,r){return i("rect",{x:t,y:e,width:s,height:o,class:"barHandle",ry:n,rx:n,onMouseDown:t=>this.handleBarEventStart(r,a,t)})}renderKupBarSmall(t,e,s,o){return i("g",{class:"barWrapper","tab-index":0},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,s,t),i("g",{class:"handleGroup"},o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t,"small"),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})))}renderKupBarTimeLine(t,s){return i("g",{"tab-index":0},i("rect",{fill:s,x:"0",width:"100%",y:t.y,height:t.height,rx:0,ry:0}),t.barChildren.map((t=>{var s;return i(e,null,i("rect",{style:{cursor:"pointer"},key:t.id,fill:t.styles.backgroundColor,x:t.x1,width:t.x2-t.x1,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius}),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(s=t.icon.color)&&void 0!==s?s:"#000000",url:t.icon.url,width:t.height+"px",height:t.height+"px",x:t.x1+(t.x2-t.x1)-t.height/2,y:t.y-t.height/2/2}))})))}renderKupArrow(t,e){const[s,o]=this.rtl?this.drownPathAndTriangleRTL(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent):this.drownPathAndTriangle(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent);return i("g",{class:"arrow"},i("path",{"stroke-width":"1.5",d:s,fill:"none"}),i("polygon",{points:o}))}drownPathAndTriangle(t,i,e,s,o){const n=i.y+s/2,a=t.x2+2*o;return[`M ${t.x2} ${t.y+s/2}\n h ${o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a<i.x1?"":"H "+(i.x1-o)}\n V ${n}\n h ${a>i.x1?o:i.x1-t.x2-o}`,`${i.x1},${n}\n ${i.x1-5},${n-5}\n ${i.x1-5},${n+5}`]}drownPathAndTriangleRTL(t,i,e,s,o){const n=i.y+s/2,a=t.x1-2*o;return[`M ${t.x1} ${t.y+s/2}\n h ${-o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a>i.x2?"":`H ${i.x2+o}`}\n V ${n}\n h ${a<i.x2?-o:i.x2-t.x1+o}`,`${i.x2},${n}\n ${i.x2+5},${n+5}\n ${i.x2+5},${n-5}`]}getBarColor(t,i){return t?i.backgroundSelectedColor:i.backgroundColor}getProcessColor(t,i){return t?i.progressSelectedColor:i.progressColor}calculateProgressPoint(t,i="bar"){return r("bar"==i?+!this.rtl*t.progressWidth+t.progressX:t.progressWidth+t.x1,t.y,t.height)}render(){let t=0;const e=[],s=[i("line",{key:"RowLineFirst",x1:0,y1:0,x2:this.gridProps.svgWidth,y2:0,class:"gridRowLine"})];for(const o of this.tasks)e.push(i("rect",{key:"Row"+o.id,x:0,y:t,width:this.gridProps.svgWidth,height:this.rowHeight,class:"gridRow"})),s.push(i("line",{key:"RowLine"+o.id,x1:0,y1:t+this.rowHeight,x2:this.gridProps.svgWidth,y2:t+this.rowHeight,class:"gridRowLine"})),t+=this.rowHeight;let o=0;const n=[];for(let e=0;e<this.dates.length;e++)n.push(i("line",{key:this.dates[e].getTime(),x1:o,y1:0,x2:o,y2:t,class:"gridTick"})),o+=this.columnWidth;return i("svg",{key:"1a6968bfedd80af155d8c44e9d4bf74144c05fdc",xmlns:"http://www.w3.org/2000/svg",width:this.gridProps.svgWidth,height:this.rowHeight*this.tasks.length+"px","font-family":this.fontFamily,ref:t=>this.svg=t},i("g",{key:"fcc3242448c44543b488b08112bfd0913f18453b",class:"grid"},i("g",{key:"cd01285362dbc58575a87426d67cf3344162d0c7",class:"rows"},e),i("g",{key:"f0b36331280f0f7b89f57732103f2b261c833e99",class:"rowLines"},s),i("g",{key:"0bfdbba6b18a5a6751226177530025c0eb153c0c",class:"ticks"},n)),i("g",{key:"2a8a613c07cc15a161b6ac1f9a2914562c4880fd",class:"content"},this.currentDateIndicator&&i("rect",{key:"3bbb51c639c3a10254d55c6c463d684ecc073142",fill:this.currentDateIndicator.color,x:this.currentDateIndicator.x+1.5,y:"0",width:"2",height:"100%"}),this.projection&&i("rect",{key:"d1f0fac7dcee2cb6d019d6379b6b75c02d81069f",fill:this.projection.color,x:this.projection.x0,y:"0",width:this.projection.xf-this.projection.x0,height:"100%","fill-opacity":"0.35"}),i("g",{key:"dd074d7f495fa5eadd6619360999cc30261356a1",class:"arrows",fill:this.arrowColor,stroke:this.arrowColor},this.tasks.map((t=>t.barChildren.map((i=>{"timeline"!==t.type&&this.renderKupArrow(t,i)}))))),i("g",{key:"bdc6502a998196bb9aa9a5236d1784880c268f23",class:"bar","font-family":this.fontFamily,"font-size":this.fontSize},this.tasks.map((t=>{const e="project"===t.type;return i("g",{onKeyDown:i=>{"Delete"===i.key&&(t.isDisabled||this.handleBarEventStart("delete",t,i)),i.stopPropagation()},onMouseEnter:i=>{this.handleBarEventStart("mouseenter",t,i)},onMouseLeave:i=>{this.handleBarEventStart("mouseleave",t,i)},onDblClick:()=>{this.barDblClick(t)},onClick:i=>{this.handleBarEventStart("click",t,i)},onContextMenu:i=>{this.handleBarEventStart("contextmenu",t,i)},onFocus:()=>{this.handleBarEventStart("select",t)},class:"task-wrapper"},(()=>{const i={task:t,arrowIndent:this.arrowIndent,isDelete:!t.isDisabled,taskHeight:this.taskHeight,isSelected:!!this.selectedTask&&t.id===this.selectedTask.id,rtl:this.rtl,hideLabel:this.hideLabel},s=t.styles,o=i.isSelected?s.backgroundSelectedColor:s.backgroundColor,n=!(this.readOnly||!this.dateChange||t.isDisabled||e),a=!this.readOnly&&!!this.progressChange&&!t.isDisabled,r=!this.readOnly&&!!this.dateChange&&!t.isDisabled;switch(t.typeInternal){case"project":default:return this.renderKupBar(t,i.isSelected,n,a);case"smalltask":return this.renderKupBarSmall(t,i.isSelected,r,a);case"timeline":return this.renderKupBarTimeLine(t,o)}})())})),this.currentTarget&&this.ganttEvent.changedTask&&i("g",{key:"4f71c4dd10d4c93ed805192d7b9b082c3f5c80b2",class:"task-wrapper"},this.renderKupBar(this.ganttEvent.changedTask,!1,!1,!1)))))}static get watchers(){return{columnWidth:["updateXStep"],dates:["updateXStep"],timeStep:["updateXStep","updateSvgMove"],ganttEvent:["updateSvgMove"],xStep:["updateSvgMove"],svg:["updateSvgMove"],initEventX1Delta:["updateSvgMove"],point:["updateSvgMove"],rtl:["updateSvgMove"],onProgressChange:["updateSvgMove"],onDateChange:["updateSvgMove"]}}};T.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.gridRow{fill:var(--kup-layer-1)}.gridRowLine{stroke:transparent}.gridTick{stroke:var(--kup-border-subtle)}.barHandle{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}.barBackground{user-select:none;stroke-width:0}.barWrapper{cursor:pointer;outline:none}.task-wrapper{outline:none !important}.barWrapper:hover .barHandle{visibility:visible;opacity:1}.barLabel{fill:var(--kup-layer-0);text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.barLabelOutside{fill:var(--kup-text-secondary);text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ghost-preview{opacity:0.5}";export{g as kup_custom_task_list_header,v as kup_custom_task_list_table,x as kup_gantt_calendar,T as kup_grid_renderer}
16
+ function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,o,n=e.call(t),a=[];try{for(;(void 0===i||i-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(t){o={error:t}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return a}((r=t,4===r.length?[parseInt("0x"+r[1]+r[1]),parseInt("0x"+r[2]+r[2]),parseInt("0x"+r[3]+r[3])]:7===r.length?[parseInt("0x"+r[1]+r[2]),parseInt("0x"+r[3]+r[4]),parseInt("0x"+r[5]+r[6])]:[]),3))[1],n=e[2],!b(s=e[0])||!b(o)||!b(n))throw new Error("hextToRgb returned an invalid value for '"+t+"'");a=new m(Number(s),Number(o),Number(n))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var h=new k(a,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},i));return w[t]=Object.assign({},h.solve(),{hex:t,rgb:[s,o,n],cache:!1})},Object.defineProperty(y,"__esModule",{value:!0});const T=class{constructor(i){t(this,i),this.tasks=void 0,this.dates=void 0,this.ganttEvent=void 0,this.selectedTask=void 0,this.rowHeight=0,this.columnWidth=0,this.timeStep=0,this.taskHeight=0,this.arrowColor="",this.arrowIndent=0,this.fontFamily="",this.fontSize="",this.rtl=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.currentDateIndicator=void 0,this.projection=void 0,this.readOnly=!1,this.gridProps=void 0,this.dateChange=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.barClick=void 0,this.barDblClick=void 0,this.barContextMenu=void 0,this.delete=void 0,this.setFailedTask=void 0,this.setSelectedTask=void 0,this.eventStart=void 0,this.eMouseDown=void 0,this.phaseDrop=void 0,this.setGanttEvent=void 0,this.phaseDragScroll=void 0,this.xStep=0,this.initEventX1Delta=0,this.initEventXClick=0,this.isMoving=!1,this.point=void 0,this.svg=void 0,this.currentTarget=void 0,this.dragScrollInterval=void 0,this.dropZoneTask=void 0}componentDidLoad(){this.point=this.createSVGPoint(),this.updateXStep()}createSVGPoint(){if(this.svg)return this.svg.createSVGPoint()}updateXStep(){const t=this.dates[1].getTime()-this.dates[0].getTime()-60*this.dates[1].getTimezoneOffset()*1e3+60*this.dates[0].getTimezoneOffset()*1e3;this.xStep=this.timeStep*this.columnWidth/t}updateSvgMove(){const t=async t=>{var i,e;if(!this.ganttEvent.changedTask||!this.point||!this.svg)return;t.preventDefault(),this.point.x=t.clientX,this.point.y=t.clientY;const s=this.point.matrixTransform(null===(e=null===(i=this.svg)||void 0===i?void 0:i.getScreenCTM())||void 0===e?void 0:e.inverse()),{isChanged:o,changedTask:n}=h(s.x,this.ganttEvent.action,this.ganttEvent.changedTask,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,s.y);this.currentTarget&&(this.addGhostPreview(t),this.handleAutoScrollForPhaseDrag(t),this.addDropzoneVisualization()),o&&this.setGanttEvent(Object.assign(Object.assign({},this.ganttEvent),{action:this.ganttEvent.action,changedTask:n}))},i=async e=>{var s,o,n;clearInterval(this.dragScrollInterval),this.resetDropzoneVisualization();const{action:a,originalSelectedTask:r,changedTask:l}=this.ganttEvent;if(!(l&&this.point&&this.svg&&r))return;e.preventDefault(),this.point.x=e.clientX;const p=this.point.matrixTransform(null===(o=null===(s=this.svg)||void 0===s?void 0:s.getScreenCTM())||void 0===o?void 0:o.inverse());this.currentTarget=null;const{changedTask:f}=h(p.x,a,l,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,p.y),c=r.start!==f.start||r.end!==f.end||r.progress!==f.progress||r.y!==f.y;this.svg.removeEventListener("mousemove",t),this.svg.removeEventListener("mouseup",i),null===(n=this.svg.querySelector(".ghost-preview"))||void 0===n||n.remove(),this.setGanttEvent({action:""}),this.isMoving=!1;let d,u,g=!0;if("move"===a&&c&&"task"===f.type&&(d=this.tasks.find((t=>this.isPhaseWithinTaskArea(l,t)&&"project"===t.type)),u=this.tasks.find((t=>t.id==r.id.split("_").shift()))),(null==d?void 0:d.id)&&(null==u?void 0:u.id)!==(null==d?void 0:d.id))this.phaseDrop(r,u,f,d);else if(("move"===a||"end"===a||"start"===a)&&this.dateChange&&c)try{const t=await this.dateChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}else if(this.progressChange&&c)try{const t=this.progressChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}g||this.setFailedTask(r)};this.isMoving||"move"!==this.ganttEvent.action&&"end"!==this.ganttEvent.action&&"start"!==this.ganttEvent.action&&"progress"!==this.ganttEvent.action||!this.svg||(this.svg.addEventListener("mousemove",t),this.svg.addEventListener("mouseup",i),this.isMoving=!0)}hasMovedHorizontally(t){return!this.readOnly&&this.initEventXClick!==t.clientX}addGhostPreview(t){var i;null===(i=this.svg.querySelector(".ghost-preview"))||void 0===i||i.remove();const e=Object.assign(Object.assign({},t),{dataTransfer:new DataTransfer}),s=this.currentTarget;s.classList.add("ghost-preview"),this.svg.appendChild(s.cloneNode(!0));const o=s.getBoundingClientRect();e.dataTransfer.setDragImage(s,e.clientX-o.left,e.clientY-o.top)}handleAutoScrollForPhaseDrag(t){var i,e;const s=null===(e=null===(i=this.svg)||void 0===i?void 0:i.parentElement)||void 0===e?void 0:e.parentElement;if(s)if(clearInterval(this.dragScrollInterval),s.clientHeight<s.scrollHeight){const i=s.getBoundingClientRect(),e=t.clientY-i.top,o=5;e-20<o?this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop-=o)}),1):e+20>i.height-o&&(this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop+=o)}),1))}else{const i=20,e=window.innerHeight,s=t.clientY;s<i?window.scrollBy(0,-i):s>e-i&&window.scrollBy(0,i)}}isPhaseWithinTaskArea(t,i){return t.y+t.height>=i.ySecondary&&t.y<=i.ySecondary+i.height&&t.x2>=i.x1&&t.x1<=i.x2}addDropzoneVisualization(){var t;this.resetDropzoneVisualization();const i=this.tasks.filter((t=>{var i,e,s;return"project"==t.type&&(null===(s=null===(e=null===(i=this.ganttEvent.originalSelectedTask)||void 0===i?void 0:i.id)||void 0===e?void 0:e.split("_"))||void 0===s?void 0:s.shift())!=t.id})),e=this.ganttEvent.changedTask;this.dropZoneTask=i.find((t=>this.isPhaseWithinTaskArea(e,t))),(null===(t=this.dropZoneTask)||void 0===t?void 0:t.ySecondary)&&this.getBarRectsForDropzoneVisualization().forEach((t=>{t.setAttribute("fill",u.barDropZoneColor)}))}resetDropzoneVisualization(){if(!this.dropZoneTask)return;const t=this.getBarRectsForDropzoneVisualization(),i=!!this.selectedTask&&this.dropZoneTask.id===this.selectedTask.id;t.forEach((t=>{t.setAttribute("fill",this.getBarColor(i,this.dropZoneTask.styles))}))}getBarRectsForDropzoneVisualization(){let t;if(this.showSecondaryDates){const i=this.svg.querySelector(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`),e=[i];let s=i.nextElementSibling;for(;null!==s;)e.push(s),s=s.nextElementSibling;let o=i.previousElementSibling;for(;null!==o;)e.unshift(o),o=o.previousElementSibling;t=e}else t=this.svg.querySelectorAll(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);return t}handleBarEventStart(t,i,e){var s;if(e)if(a(e)){if("delete"===t&&this.delete)try{const e=this.delete(i);void 0!==e&&e&&this.setGanttEvent({action:t,changedTask:i})}catch(t){console.error("Error on Delete. "+t)}}else if("mouseenter"===t)this.ganttEvent.action||this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else if("mouseleave"===t)"mouseenter"===this.ganttEvent.action&&this.setGanttEvent({action:""});else if("dblclick"===t)this.doubleClick&&this.doubleClick(i);else if("click"===t)!this.hasMovedHorizontally(e)&&this.barClick&&this.barClick(i);else if("contextmenu"===t)e.preventDefault(),this.barContextMenu&&this.barContextMenu(e,i);else if("move"===t){if(!this.svg||!this.point)return;this.point.x=e.clientX;const o=this.point.matrixTransform(null===(s=this.svg.getScreenCTM())||void 0===s?void 0:s.inverse());this.currentTarget="task"===i.type?e.currentTarget.cloneNode(!0):null,this.initEventX1Delta=o.x-i.x1,this.point.y=e.clientY,this.initEventXClick=e.clientX,this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i})}else this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else"select"===t&&this.setSelectedTask(i.id)}getTaskIcon(t){const e=z.exports.hexToCSSFilter(t.color);return i("image",{href:t.url,filter:e.filter.replace(";",""),x:t.x,y:t.y,width:t.width,height:t.height})}renderKupBar(t,e,s,o){var n,a,r;return i("g",{class:"barWrapper","tab-index":0,"data-type":t.type},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,!this.readOnly&&!!this.dateChange&&!t.isDisabled,t,t.x1secondary,(null!==(n=t.x2secondary)&&void 0!==n?n:0)-(null!==(a=t.x1secondary)&&void 0!==a?a:0),t.ySecondary),i("g",{class:"handleGroup"},s&&i("g",null,this.renderKupBarDateHandle(t.x1+1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"start"),this.renderKupBarDateHandle(t.x2-t.handleWidth-1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"end")),o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(r=t.icon.color)&&void 0!==r?r:"#000000",url:t.icon.url,width:t.height/2+"px",height:t.height/2+"px",x:t.x1+(t.x2-t.x1)-t.height/2/2,y:t.y-t.height/2/2/2+(this.showSecondaryDates?t.height/2:0)}))}renderKupBarDisplay(t,e,s,o,n,a,r,h,l,p,f,c,d,u){if(this.showSecondaryDates&&void 0!==c){const g=o/2;return i("g",{onMouseDown:t=>p&&this.handleBarEventStart("move",f,t)},i("rect",{key:"top semi-transparent bar",x:c,width:d,y:null!=u?u:e,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),opacity:.5,class:"barBackground"}),i("rect",{key:"main bar",x:t,width:s,y:e+g,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{key:"progress bar",x:n,width:a,y:e+g,height:g,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}return i("g",{onMouseDown:t=>{p&&this.handleBarEventStart("move",f,t)}},i("rect",{x:t,width:s,y:e,height:o,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{x:n,width:a,y:e,height:o,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}renderKupBarDateHandle(t,e,s,o,n,a,r){return i("rect",{x:t,y:e,width:s,height:o,class:"barHandle",ry:n,rx:n,onMouseDown:t=>this.handleBarEventStart(r,a,t)})}renderKupBarSmall(t,e,s,o){return i("g",{class:"barWrapper","tab-index":0},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,s,t),i("g",{class:"handleGroup"},o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t,"small"),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})))}renderKupBarTimeLine(t,s){return i("g",{"tab-index":0},i("rect",{fill:s,x:"0",width:"100%",y:t.y,height:t.height,rx:0,ry:0}),t.barChildren.map((t=>{var s;return i(e,null,i("rect",{style:{cursor:"pointer"},key:t.id,fill:t.styles.backgroundColor,x:t.x1,width:t.x2-t.x1,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius}),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(s=t.icon.color)&&void 0!==s?s:"#000000",url:t.icon.url,width:t.height+"px",height:t.height+"px",x:t.x1+(t.x2-t.x1)-t.height/2,y:t.y-t.height/2/2}))})))}renderKupArrow(t,e){const[s,o]=this.rtl?this.drownPathAndTriangleRTL(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent):this.drownPathAndTriangle(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent);return i("g",{class:"arrow"},i("path",{"stroke-width":"1.5",d:s,fill:"none"}),i("polygon",{points:o}))}drownPathAndTriangle(t,i,e,s,o){const n=i.y+s/2,a=t.x2+2*o;return[`M ${t.x2} ${t.y+s/2}\n h ${o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a<i.x1?"":"H "+(i.x1-o)}\n V ${n}\n h ${a>i.x1?o:i.x1-t.x2-o}`,`${i.x1},${n}\n ${i.x1-5},${n-5}\n ${i.x1-5},${n+5}`]}drownPathAndTriangleRTL(t,i,e,s,o){const n=i.y+s/2,a=t.x1-2*o;return[`M ${t.x1} ${t.y+s/2}\n h ${-o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a>i.x2?"":`H ${i.x2+o}`}\n V ${n}\n h ${a<i.x2?-o:i.x2-t.x1+o}`,`${i.x2},${n}\n ${i.x2+5},${n+5}\n ${i.x2+5},${n-5}`]}getBarColor(t,i){return t?i.backgroundSelectedColor:i.backgroundColor}getProcessColor(t,i){return t?i.progressSelectedColor:i.progressColor}calculateProgressPoint(t,i="bar"){return r("bar"==i?+!this.rtl*t.progressWidth+t.progressX:t.progressWidth+t.x1,t.y,t.height)}render(){let t=0;const e=[],s=[i("line",{key:"RowLineFirst",x1:0,y1:0,x2:this.gridProps.svgWidth,y2:0,class:"gridRowLine"})];for(const o of this.tasks)e.push(i("rect",{key:"Row"+o.id,x:0,y:t,width:this.gridProps.svgWidth,height:this.rowHeight,class:"gridRow"})),s.push(i("line",{key:"RowLine"+o.id,x1:0,y1:t+this.rowHeight,x2:this.gridProps.svgWidth,y2:t+this.rowHeight,class:"gridRowLine"})),t+=this.rowHeight;let o=0;const n=[];for(let e=0;e<this.dates.length;e++)n.push(i("line",{key:this.dates[e].getTime(),x1:o,y1:0,x2:o,y2:t,class:"gridTick"})),o+=this.columnWidth;return i("svg",{key:"1768bf87d7d08070ce0d27dbb6981999e9839919",xmlns:"http://www.w3.org/2000/svg",width:this.gridProps.svgWidth,height:this.rowHeight*this.tasks.length+"px","font-family":this.fontFamily,ref:t=>this.svg=t},i("g",{key:"57d2d52600d5c9a3187a1a1779b409ea716ce527",class:"grid"},i("g",{key:"cf522a94564a34298d2cc91efc46af3ed4e053f0",class:"rows"},e),i("g",{key:"738d6d128ecd5398ba8aa5c333742854e082fbd7",class:"rowLines"},s),i("g",{key:"5e36d94d36900a7decf630abf4a614067b14735e",class:"ticks"},n)),i("g",{key:"132f69c4f73953bbf998bf2acd30693d25b93d67",class:"content"},this.currentDateIndicator&&i("rect",{key:"de9e545038e482212e621ca4c2f1222339fd203d",fill:this.currentDateIndicator.color,x:this.currentDateIndicator.x+1.5,y:"0",width:"2",height:"100%"}),this.projection&&i("rect",{key:"7e077d951e8c2b125a4e25698542515a20d9ac86",fill:this.projection.color,x:this.projection.x0,y:"0",width:this.projection.xf-this.projection.x0,height:"100%","fill-opacity":"0.35"}),i("g",{key:"ab75796381aaadbda8285965a66e91602185366f",class:"arrows",fill:this.arrowColor,stroke:this.arrowColor},this.tasks.map((t=>t.barChildren.map((i=>{"timeline"!==t.type&&this.renderKupArrow(t,i)}))))),i("g",{key:"18b7c7ff265294ba6d4aa93717d5a375264c421b",class:"bar","font-family":this.fontFamily,"font-size":this.fontSize},this.tasks.map((t=>{const e="project"===t.type;return i("g",{onKeyDown:i=>{"Delete"===i.key&&(t.isDisabled||this.handleBarEventStart("delete",t,i)),i.stopPropagation()},onMouseEnter:i=>{this.handleBarEventStart("mouseenter",t,i)},onMouseLeave:i=>{this.handleBarEventStart("mouseleave",t,i)},onDblClick:()=>{this.barDblClick(t)},onClick:i=>{this.handleBarEventStart("click",t,i)},onContextMenu:i=>{this.handleBarEventStart("contextmenu",t,i)},onFocus:()=>{this.handleBarEventStart("select",t)},class:"task-wrapper"},(()=>{const i={task:t,arrowIndent:this.arrowIndent,isDelete:!t.isDisabled,taskHeight:this.taskHeight,isSelected:!!this.selectedTask&&t.id===this.selectedTask.id,rtl:this.rtl,hideLabel:this.hideLabel},s=t.styles,o=i.isSelected?s.backgroundSelectedColor:s.backgroundColor,n=!(this.readOnly||!this.dateChange||t.isDisabled||e),a=!this.readOnly&&!!this.progressChange&&!t.isDisabled,r=!this.readOnly&&!!this.dateChange&&!t.isDisabled;switch(t.typeInternal){case"project":default:return this.renderKupBar(t,i.isSelected,n,a);case"smalltask":return this.renderKupBarSmall(t,i.isSelected,r,a);case"timeline":return this.renderKupBarTimeLine(t,o)}})())})),this.currentTarget&&this.ganttEvent.changedTask&&i("g",{key:"71036ce8e3180a6e31ef329e11ad35f7622a5889",class:"task-wrapper"},this.renderKupBar(this.ganttEvent.changedTask,!1,!1,!1)))))}static get watchers(){return{columnWidth:["updateXStep"],dates:["updateXStep"],timeStep:["updateXStep","updateSvgMove"],ganttEvent:["updateSvgMove"],xStep:["updateSvgMove"],svg:["updateSvgMove"],initEventX1Delta:["updateSvgMove"],point:["updateSvgMove"],rtl:["updateSvgMove"],onProgressChange:["updateSvgMove"],onDateChange:["updateSvgMove"]}}};T.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.gridRow{fill:var(--kup-layer-1)}.gridRowLine{stroke:transparent}.gridTick{stroke:var(--kup-border-subtle)}.barHandle{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}.barBackground{user-select:none;stroke-width:0}.barWrapper{cursor:pointer;outline:none}.task-wrapper{outline:none !important}.barWrapper:hover .barHandle{visibility:visible;opacity:1}.barLabel{fill:var(--kup-layer-0);text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.barLabelOutside{fill:var(--kup-text-secondary);text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ghost-preview{opacity:0.5}";export{g as kup_custom_task_list_header,v as kup_custom_task_list_table,x as kup_gantt_calendar,T as kup_grid_renderer}
@@ -1 +1 @@
1
- import{C as e,H as t,D as l,B as n,ag as r,v as i,x as s,ak as o,al as a,M as u,e as c,F as f,ac as h,ab as d,am as b,an as p,ao as m,a2 as v}from"./p-54906238.js";import{K as F}from"./p-1ee561ba.js";class x extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),s=this.getIntervalTextFieldFilterValues(e,r),o=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=s[t.FROM]&&(u+=a+"(>= "+l(s[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=s[t.TO]&&(u+=a+"(<= "+l(s[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return o.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var w;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(w||(w={}));const T="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,y=k.ketchup?k.ketchup.objects:new s,j=k.ketchup?k.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,s=[],o){if(n){let t=!0;if(s&&null!=s&&s.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<s.length;i++){if(0==s[i].visible)continue;const o=e[s[i].name];if(null==o)continue;t=this.isFilterCompliantForValue(o.value,l);let a=r(s[i],o);if(a!=o.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==o&&(o=new x),!this.hasFilters(t,s,o))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=o.getTextFilterValue(t,n),c=o.getIntervalTextFieldFilterValues(t,i(s,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(y.isNumber(r.obj)||y.isDate(r.obj)||y.isTime(r.obj)||y.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=o.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let p=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}}}if(!p)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new x);for(let r=0;r<n.length;r++){let s=n[r],o=null;if(o=s===T?{name:T,title:""}:i(t,s),l.hasFiltersForColumn(e,o))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const s=!(!l||!n);if(this.hasFilters(t,n,r)||s)for(let o=0;o<e.length;o++){let a=e[o];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let s=new Array;null==i&&(i=new x);let o=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==o||i.isFilterCompliantForSimpleValue(r,n.obj,o,a))&&s.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),s;let c=Object.assign({},t.filters);c[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)s.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:v.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=I(e,n,t[l]);if(0!==r)return r}return 0}return I(e,n,t[0])}))}function I(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function M(e=[],t={},l="",n=[],r,i){return null==i&&(i=new O),i.filterRows(e,t,l,n,r)}function B(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const s={},o=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return s[l]=n,!0;return!1}));if(0===o.length)return t;const a=[];let c={};return t.forEach((t=>{const l=o[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let p=null;for(let e of a)if(e.group.label===d){p=e;break}null===p&&(p={group:{id:b,parent:null,column:l,columnLabel:s[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(p));for(let l=1;l<o.length;l++){const n=o[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),o=a.value;let u=null;for(let e=0;e<p.group.children.length;e++){const t=p.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:o,parent:p,column:n.column,columnLabel:s[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),p.group.children.push(u)),p=u}}p.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=V.ketchup.objects.isNumber(i.obj),s=t[r];switch(s){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let o=e.group.parent;for(;null!=o;){let e=o.group.totals[r]||0;o.group.totals[r]=++e,o=o.group.parent}break;case u.DISTINCT:let a;if(a=l?V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=V.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&V.ketchup.objects.isDate(i.obj)&&V.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(V.ketchup.dates.toDayjs(t)),e.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else e.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(V.ketchup.dates.toDayjs(e)),l.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else l.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&V.ketchup.objects.isDate(i.obj)&&V.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(V.ketchup.dates.toDayjs(t)),e.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else e.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(V.ketchup.dates.toDayjs(e)),l.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else l.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);l=l.group.parent}}break;default:0!=s.indexOf(u.MATH)&&console.warn(`invalid total mode: ${s}`)}}}))}(p,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),N(a,u.AVERAGE,n),N(a,u.MATH,n),a}function N(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function S(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=V.ketchup.objects.isNumber(a.obj)?V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+V.ketchup.math.numberify(r)}}else if(V.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),V.ketchup.dates.isValidFormattedStringDate(a.value))){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value)),r=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else n[l]=V.ketchup.dates.format(e,F.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}}s===o.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=V.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=V.ketchup.dates.format(n[i]):V.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let s=[];return L(e,s,r,Number(l),0),s}function L(e,t,l,n,r){let i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=$(e[s]);if(null!=o.group&&null!=o.group.children&&o.group.children.length>0){a.group.children=[];let e=L(o.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function $(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:q(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=$(e[l]);return t}function q(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function z(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],s=e.rows.find((e=>e.id===r.id)),o=s?s.cells[n]:null;(!o&&i.value||o&&i.value!==o.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function K(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const s={[f.AUTOCOMPLETE]:()=>h(r,"",i),[f.COMBOBOX]:()=>h(r,"",i),[f.RADIO]:()=>d(r,i),[f.CHECKBOX]:()=>b(r,""),[f.CHIP]:()=>p(r),[f.SWITCH]:()=>m(r,"")}[n.shape];s?n.data=s():n.shape&&V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,c.WARNING)}))}))}export{x as F,g as K,O as a,B as b,S as c,K as d,w as e,M as f,z as g,D as n,E as p,C as s,T as t}
1
+ import{C as e,H as t,D as l,B as n,ag as r,v as i,x as s,ak as o,al as a,M as u,e as c,F as f,ac as h,ab as d,am as b,an as p,ao as m,a2 as v}from"./p-b640b0d3.js";import{K as F}from"./p-1ee561ba.js";class x extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),s=this.getIntervalTextFieldFilterValues(e,r),o=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=s[t.FROM]&&(u+=a+"(>= "+l(s[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=s[t.TO]&&(u+=a+"(<= "+l(s[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return o.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var w;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(w||(w={}));const T="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,y=k.ketchup?k.ketchup.objects:new s,j=k.ketchup?k.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,s=[],o){if(n){let t=!0;if(s&&null!=s&&s.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<s.length;i++){if(0==s[i].visible)continue;const o=e[s[i].name];if(null==o)continue;t=this.isFilterCompliantForValue(o.value,l);let a=r(s[i],o);if(a!=o.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==o&&(o=new x),!this.hasFilters(t,s,o))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=o.getTextFilterValue(t,n),c=o.getIntervalTextFieldFilterValues(t,i(s,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(y.isNumber(r.obj)||y.isDate(r.obj)||y.isTime(r.obj)||y.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=o.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let p=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}}}if(!p)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new x);for(let r=0;r<n.length;r++){let s=n[r],o=null;if(o=s===T?{name:T,title:""}:i(t,s),l.hasFiltersForColumn(e,o))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const s=!(!l||!n);if(this.hasFilters(t,n,r)||s)for(let o=0;o<e.length;o++){let a=e[o];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let s=new Array;null==i&&(i=new x);let o=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==o||i.isFilterCompliantForSimpleValue(r,n.obj,o,a))&&s.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),s;let c=Object.assign({},t.filters);c[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)s.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:v.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=I(e,n,t[l]);if(0!==r)return r}return 0}return I(e,n,t[0])}))}function I(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function M(e=[],t={},l="",n=[],r,i){return null==i&&(i=new O),i.filterRows(e,t,l,n,r)}function B(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const s={},o=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return s[l]=n,!0;return!1}));if(0===o.length)return t;const a=[];let c={};return t.forEach((t=>{const l=o[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let p=null;for(let e of a)if(e.group.label===d){p=e;break}null===p&&(p={group:{id:b,parent:null,column:l,columnLabel:s[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(p));for(let l=1;l<o.length;l++){const n=o[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),o=a.value;let u=null;for(let e=0;e<p.group.children.length;e++){const t=p.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:o,parent:p,column:n.column,columnLabel:s[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),p.group.children.push(u)),p=u}}p.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=V.ketchup.objects.isNumber(i.obj),s=t[r];switch(s){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let o=e.group.parent;for(;null!=o;){let e=o.group.totals[r]||0;o.group.totals[r]=++e,o=o.group.parent}break;case u.DISTINCT:let a;if(a=l?V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=V.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&V.ketchup.objects.isDate(i.obj)&&V.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(V.ketchup.dates.toDayjs(t)),e.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else e.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(V.ketchup.dates.toDayjs(e)),l.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else l.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&V.ketchup.objects.isDate(i.obj)&&V.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(V.ketchup.dates.toDayjs(t)),e.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else e.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(V.ketchup.dates.toDayjs(e)),l.group.totals[r]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else l.group.totals[r]=V.ketchup.dates.format(a,F.ISO_DATE);l=l.group.parent}}break;default:0!=s.indexOf(u.MATH)&&console.warn(`invalid total mode: ${s}`)}}}))}(p,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),N(a,u.AVERAGE,n),N(a,u.MATH,n),a}function N(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function S(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=V.ketchup.objects.isNumber(a.obj)?V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+V.ketchup.math.numberify(r)}}else if(V.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),V.ketchup.dates.isValidFormattedStringDate(a.value))){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value)),r=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else n[l]=V.ketchup.dates.format(e,F.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}}s===o.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=V.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=V.ketchup.dates.format(n[i]):V.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let s=[];return L(e,s,r,Number(l),0),s}function L(e,t,l,n,r){let i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=$(e[s]);if(null!=o.group&&null!=o.group.children&&o.group.children.length>0){a.group.children=[];let e=L(o.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function $(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:q(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=$(e[l]);return t}function q(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function z(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],s=e.rows.find((e=>e.id===r.id)),o=s?s.cells[n]:null;(!o&&i.value||o&&i.value!==o.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function K(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const s={[f.AUTOCOMPLETE]:()=>h(r,"",i),[f.COMBOBOX]:()=>h(r,"",i),[f.RADIO]:()=>d(r,i),[f.CHECKBOX]:()=>b(r,""),[f.CHIP]:()=>p(r),[f.SWITCH]:()=>m(r,"")}[n.shape];s?n.data=s():n.shape&&V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,c.WARNING)}))}))}export{x as F,g as K,O as a,B as b,S as c,K as d,w as e,M as f,z as g,D as n,E as p,C as s,T as t}
@@ -1 +1 @@
1
- import{a8 as e,a9 as a,aa as s,d as t,I as c,ab as n,ac as i,ad as l,F as o,ae as r,af as u,ag as d,ah as p,ai as b,aj as f,e as k}from"./p-54906238.js";import{h as v,g as h,F as m}from"./p-b0368f88.js";import{F as g}from"./p-3913eb45.js";import{F as w}from"./p-5d26e46f.js";import{F as j}from"./p-d1c818ae.js";import{F as y,c as O}from"./p-d15d479c.js";import{F as $}from"./p-1bdc7796.js";import{F as x}from"./p-5d4bfad2.js";var _,C,I,z;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(_||(_={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(C||(C={})),function(e){e.CODE="CodeOnly",e.DESCRIPTION="DescOnly",e.DESCRIPTION_AND_CODE="Both"}(I||(I={})),function(e){e.SMALL="small",e.MEDIUM="medium"}(z||(z={}));const F=e=>{e.sizing||(e.sizing=z.MEDIUM),e.sizing.toLowerCase();const a={switch:!0,"switch--checked":e.checked,"switch--disabled":e.disabled,[`switch--${e.sizing}`]:!!e.sizing};return v("div",Object.assign({class:`f-switch ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),v("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},v("div",{class:a},v("div",{class:"switch__track"}),v("div",{class:"switch__thumb-underlay"},v("div",{class:"switch__thumb"},v("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),v("label",{onClick:e.onChange},e.label)))},N=e=>{e.centeredLabel||0==!e.centeredLabel||(e.centeredLabel=!0);let a,s=`f-progress-bar ${e.danger?"kup-danger":""} ${e.animated?"kup-animated":""} ${e.padded?"kup-padded":""} ${e.info?"kup-info":""} ${e.slim?"kup-slim":""} ${e.striped?"kup-striped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,t="pie";s+=e.isRadial?" pie-wrapper is-radial":" progress-bar";const c={width:`${e.value}%`};e.centeredLabel?e.value>49&&(s+=" text-color-on-primary"):(a=c,e.value>2&&(s+=" text-color-on-primary"));let n=null;return e.icon?n=function(e){if(e.icon){if(e.icon.indexOf(".")>-1||e.icon.indexOf("/")>-1||e.icon.indexOf("\\")>-1)return v("span",{class:"label kup-icon is-image"},v("img",{src:e.icon}));{let a=`url('${h(`./assets/svg/${e.icon}.svg`)}') no-repeat center`;return v("span",{style:{mask:a,webkitMask:a},class:"label kup-icon"})}}}(e):e.hideLabel||(n=e.isRadial?e.label?v("span",{class:"label"},e.label):v("span",{class:"label"},e.value,v("span",{class:"smaller"},"%")):e.label?e.label:e.value+"%"),e.value>0&&(t+=" has-value",t+=e.value>50?" is-more-than-half":" is-less-than-half"),e.isRadial?v("div",{class:s},n,v("div",{class:t},v("div",{style:undefined,class:"left-side half-circle"}),v("div",{class:"right-side half-circle"})),v("div",{class:"shadow"})):v("div",{class:s},v("div",{class:"progress-bar-percentage",style:c},v("span",{style:a},n)))};var D;!function(e){e.RADIO="radio",e.CHEVRON="chevron"}(D||(D={}));const M=e=>{var a;const s=!!e.columns,t=[],c=e.type||D.RADIO;for(let s=0;s<(null===(a=e.data)||void 0===a?void 0:a.length);s++){const a=e.data[s];t.push(v("div",{class:`form-field \n ${e.leadingLabel?" form-field--align-end":""} ${e.disabled?"radio--disabled":""}`},v("div",{class:{radio:!0,"radio--checked":!!a.checked,"radio--disabled":!!e.disabled,[`radio--${e.type}`]:!!e.type}},c===D.RADIO?v("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:a.value,checked:a.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange?e.onChange.bind(e.onChange,s):null,onFocus:e.onFocus}):v(m,null,v(j,a.checked?{resource:"check",sizeX:"14px",sizeY:"14px"}:{sizeX:"14px",sizeY:"14px",onClick:e.onChange?e.onChange.bind(e.onChange,s):null})),c===D.RADIO&&v("div",{class:"radio__background"},v("div",{class:"radio__outer-circle"}),v("div",{class:"radio__inner-circle"}))),v("label",{htmlFor:"radio-element",onClick:e.onChange?e.onChange.bind(e.onChange,s):null},a.label?a.label:"")))}return v("div",{class:`f-radio radio-wrapper\n ${s?"radio-wrapper-grid":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""} ${e.horizontal?"kup-horizontal":""}`,style:{"--kup_radio_columns":s?`repeat(${e.columns}, 1fr)`:""}},t)},V=e=>(e.maxValue||(e.maxValue=5),v("div",{class:`f-rating ${e.disabled?"disabled":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},function(e){const a=[];for(let s=1;s<=e.maxValue;s++)a.push(v("span",{class:"rating",onClick:e.onClick?e.onClick.bind(e.onClick,s):null},s<=e.value?"★":"☆"));return a}(e))),H=document.documentElement,S=(n,i)=>{var r,u,k,h;const m=n.cell,_=n.column,C=n.row,z=n.shape?n.shape:m.shape?m.shape:_.shape?_.shape:null,D=!H.ketchup.objects.isEmptyKupObj(m.obj);let S=!1;m.hasOwnProperty("isEditable")?S=m.isEditable:_.hasOwnProperty("isEditable")&&(S=_.isEditable),S=S&&n.editable,m.options&&(m.data=null!==(r=T(m,_))&&void 0!==r?r:m.data);const X=n.previousValue!==m.value?m.value:"",E=H.ketchup.data.cell.getType(m,z),R=Object.assign({},m.data);let Y=m.cssClass?m.cssClass:(null==_?void 0:_.cssClass)?null==_?void 0:_.cssClass:"";const A={"f-cell":!0,[s.OBJ]:!!D,[E+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||E===c.BAR),[Y]:!!Y,"c-input-uppercase":b(m),"c-input-lowercase":f(m),"monospace c-pre":null===(u=m.data)||void 0===u?void 0:u.legacyLook};let B=X;m.data||function(e,a){function s(e){return e.toUpperCase().startsWith("SHAPE;BAR")}function t(e){return e.toUpperCase().startsWith("SHAPE;")}function n(e){return e.toUpperCase().startsWith("BCOLOR;")}function i(e){return e.toUpperCase().startsWith("HEIGHT;")}function l(e){return e.toUpperCase().startsWith("SEP;")||e.toUpperCase().startsWith("DIV;")||e.toUpperCase().startsWith("ARW;")||e.toUpperCase().startsWith("GRID;")}function o(e){const a={},c=e.split("\\\\"),o=[];for(const e of c){if(e){if(l(e))return null;if(t(e)){if(!s(e))return null;{const s=e.split(";");if(3===s.length){const e=s[2].replace(",",".");isNaN(parseFloat(e))||(a.width=`${e}%`)}}}else if(n(e));else if(i(e)){const s=e.substring(7).replace(",",".");isNaN(parseFloat(s))||(a.height=`${s}%`)}else o.push(r(e,a))}return o.length?o:null}function r(e,a){const s=Object.assign({},a),t=e.split(";");if(t.length>=1){const e=/R(\d+)G(\d+)B(\d+)/.exec(t[0]);if(e){const[,a,t,c]=e;isNaN(parseInt(a,10))||isNaN(parseInt(t,10))||isNaN(parseInt(c,10))||(s.color=`rgb(${parseInt(a)},${parseInt(t)},${parseInt(c)})`)}if(t.length>=2){const e=t[1].replace(",",".");isNaN(parseFloat(e))||(s.width=`${e}%`)}}return s}}a.data={};switch(e){case c.CHECKBOX:case c.SWITCH:a.data.checked="1"===a.value;break;case c.BAR:t(a.value)?(a.data.isCanvas=!0,a.data.resource=a.value):a.data.data=function(e){if(!e)return null;const a=e.split("\\\\AND\\"),s=[];for(const e of a){const a=o(e);if(!a)return null;s.push(...a)}return s}(a.value);break;case c.BUTTON:a.data.label=a.value;break;case c.CHART:Object.assign(a.data,{sizeX:"100px",sizeY:"100px",offlineMode:{value:a.value,shape:"pie"}});break;case c.BUTTON_LIST:case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.RADIO:(()=>{var e;const s=null===(e=a.value)||void 0===e?void 0:e.split(";");if(""===(null==s?void 0:s[s.length-1].trim())&&s.pop(),s&&s.length){a.data.data=[];for(let e of s)a.data.data.push({id:e,value:e})}})();break;case c.COLOR_PICKER:a.data.initialValue=a.value;break;case c.GAUGE:case c.KNOB:case c.PROGRESS_BAR:case c.RATING:a.data.value=parseInt(a.value);break;case c.ICON:case c.IMAGE:a.data.resource=a.value}}(E,m),S&&e.includes(E)?(m.data.showMarker=null!==(k=m.tooltip)&&void 0!==k&&k,B=function(e,a,t,n,i){var l,r,u,d;switch(e){case c.AUTOCOMPLETE:return v("kup-autocomplete",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-autocomplete-change":a=>q(a,i,e,p.UPDATE),"onkup-autocomplete-input":a=>q(a,i,e,p.INPUT),"onkup-autocomplete-iconclick":a=>q(a,i,e,p.ICON_CLICK)}));case c.CHECKBOX:return J(i)&&(a[s.C_CENTERED]=!0),t.shape===o.INPUT_CHECKBOX?v("input",{checked:"on"===t.value||"1"===t.value,class:"input-checkbox",onChange:a=>q(a,i,e,p.UPDATE),type:"checkbox"}):v(g,Object.assign({},t.data,{onChange:a=>q(a,i,e,p.UPDATE)}));case c.CHIP:return v("kup-chip",Object.assign({},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":a=>q(a,i,e,p.UPDATE)}),v("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},t.slotData,{error:t.data.error})));case c.COLOR_PICKER:return v("kup-color-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":a=>q(a,i,e,p.UPDATE)}));case c.COMBOBOX:return v("kup-combobox",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-combobox-change":a=>q(a,i,e,p.UPDATE),"onkup-combobox-input":a=>q(a,i,e,p.INPUT),"onkup-combobox-iconclick":a=>q(a,i,e,p.ICON_CLICK)}));case c.DATE:return v("kup-date-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-datepicker-change":a=>q(a,i,e,p.UPDATE),"onkup-datepicker-input":a=>q(a,i,e,p.INPUT)}));case c.MULTI_AUTOCOMPLETE:return v("kup-chip",Object.assign({displayId:!0},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":a=>q(a,i,e,p.UPDATE)}),v("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:I.DESCRIPTION_AND_CODE,selectMode:I.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":a=>q(a,i,e,p.INPUT),"onkup-autocomplete-iconclick":a=>q(a,i,e,p.ICON_CLICK),showDropDownIcon:!1},t.slotData,{error:t.data.error,showMarker:null!==(l=t.tooltip)&&void 0!==l&&l})));case c.MULTI_COMBOBOX:return v("kup-chip",Object.assign({displayId:!0},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":a=>q(a,i,e,p.UPDATE)}),v("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:I.DESCRIPTION_AND_CODE,selectMode:I.DESCRIPTION_AND_CODE,"onkup-combobox-input":a=>q(a,i,e,p.INPUT),"onkup-combobox-iconclick":a=>q(a,i,e,p.ICON_CLICK)},t.slotData,{error:t.data.error,showMarker:null!==(r=t.tooltip)&&void 0!==r&&r})));case c.RADIO:return v(M,Object.assign({},t.data,{disabled:!1,onChange:(a,s)=>{const c=t.data.data;for(let e=0;e<c.length;e++){c[e].checked=e===a}q(s,i,e,p.UPDATE)}}));case c.RATING:return v("kup-rating",Object.assign({key:n.name+i.row.id},t.data,{disabled:!1,"onkup-rating-click":a=>q(a,i,e,p.UPDATE)}));case c.SWITCH:return v(F,Object.assign({},t.data,{disabled:!1,onChange:a=>q(a,i,e,p.UPDATE)}));case c.TIME:return v("kup-time-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-timepicker-change":a=>q(a,i,e,p.UPDATE),"onkup-timepicker-input":a=>q(a,i,e,p.INPUT)}));case c.OBJECT:return v(x,{cell:t,inputValue:t.value});case c.NUMBER:a[s.C_RIGHT_ALIGNED]=!0;case c.LINK:case c.MEMO:case c.STRING:const b=a=>q(a,i,e,p.UPDATE),f=a=>{var s,c;null===(c=null===(s=t.data)||void 0===s?void 0:s.onInput)||void 0===c||c.call(s,a),q(a,i,e,p.INPUT),q(a,i,e,p.UPDATE)},k=e===c.NUMBER?"number":null,h=e===c.NUMBER&&t.value?H.ketchup.math.numberifySafe(t.value).toString():t.value;return t.shape===o.INPUT_FIELD?v("input",{class:"input-field",onChange:b,onInput:f,type:k,value:h,maxLength:null!==(d=null===(u=n.cellData)||void 0===u?void 0:u.maxLength)&&void 0!==d?d:-1}):v(w,Object.assign({textArea:!!t.shape&&t.shape===o.MEMO||!!e&&e===c.MEMO,inputType:k,fullWidth:!!Q(i)},t.data,{icon:t.data&&t.data.icon?t.data.icon:t.icon?t.icon:n.icon?n.icon:null,decimals:i.column.decimals,integers:i.column.integers,value:h,onChange:b,onInput:f,onIconClick:a=>q(a,i,e,p.ICON_CLICK)}))}}(E,A,m,_,n)):m.data&&a.includes(E)?(n.setSizes&&function(e,a,s){switch(e){case c.BAR:a.sizeY||(a.sizeY="26px");break;case c.BUTTON:let e="";a.label&&(e="36px"),s.style?s.style.height||(s.style.minHeight=e):s.style={minHeight:e};break;case c.CHART:a.sizeX||(a.sizeX="100%"),a.sizeY||(a.sizeY="100%");break;case c.CHIP:case c.RADIO:s.style?s.style.height||(s.style.minHeight="40px"):s.style={minHeight:"40px"}}}(E,R,m),B=n.renderKup?function(e,a,t,n,i,l,o){switch(e){case c.BAR:return t.data?v("div",{style:{height:t.sizeY,width:"100%"}},v(j,Object.assign({},t))):v("kup-image",Object.assign({key:l.name+o.row.id,sizeX:"250px"},t));case c.BUTTON:return J(o)&&(a[s.C_CENTERED]=!0),v($,Object.assign({},t,{onClick:a=>q(a,o,e,p.CLICK)}));case c.BUTTON_LIST:return J(o)&&(a[s.C_CENTERED]=!0),t["data-storage"]={cell:n,row:i,column:l},v("kup-button-list",Object.assign({key:l.name+o.row.id},t));case c.CHART:return J(o)&&(a[s.C_CENTERED]=!0),v("kup-chart",Object.assign({key:l.name+o.row.id},t));case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.CHIP:return v(O,Object.assign({},t));case c.COLOR_PICKER:return v("kup-color-picker",Object.assign({key:l.name+o.row.id},t,{class:Q(o)?"kup-full-width":"",disabled:!0}));case c.GAUGE:return v("kup-gauge",Object.assign({key:l.name+o.row.id,value:H.ketchup.math.numberifySafe(n.value),"width-component":"280px"},t));case c.KNOB:case c.PROGRESS_BAR:return t.customStyle?v("kup-progress-bar",Object.assign({key:l.name+o.row.id},t)):v(N,Object.assign({},t));case c.RADIO:return J(o)&&(a[s.C_CENTERED]=!0),t.disabled=i.readOnly,v(M,Object.assign({},t));case c.RATING:return v(V,Object.assign({},t,{disabled:!0}));case c.OBJECT:return v(w,Object.assign({icon:"table"},t,{disabled:!0}))}}(E,A,R,m,C,_,n):v("span",{class:"cell-"+E+" placeholder"})):(n.setSizes&&function(e,a,s,t){var n;switch(e){case c.CHECKBOX:case c.ICON:a.sizeX||(a.sizeX="18px"),a.sizeY||(a.sizeY="18px"),s.style?s.style.height||(s.style.minHeight=a.sizeY):s.style={minHeight:a.sizeY};break;case c.IMAGE:const e=(null===(n=t.cell)||void 0===n?void 0:n.value)||"",i=e.indexOf(".")>-1||e.indexOf("/")>-1||e.indexOf("\\")>-1;t.component.rootElement.tagName!==l.DATA_TABLE||i||(a.sizeX||a.sizeY?(a.sizeX||(a.sizeX="100%",a.wrapperClass="noWidth"),a.sizeY||(a.sizeY="auto")):(a.sizeX="100%",a.sizeY="64px",a.wrapperClass="noWidth")),t.component.rootElement.tagName===l.BOX?(a.sizeY||(a.sizeY="auto"),void 0===a.fit&&(a.fit=!0)):a.sizeX||(a.sizeX="auto"),a.sizeY||(a.sizeY="64px")}}(E,R,m,n),A[s.INDICATOR_TOPRIGHT]=null!==(h=m.tooltip)&&void 0!==h&&h,B=function(e,a,t,n,i,l,o){switch(e){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:if(t&&""!=t){const e=d(l,i);return v("div",{class:"f-cell__text"},e)}return t;case c.CHECKBOX:return J(o)&&(n[s.C_CENTERED]=!0),v(j,{resource:a.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case c.EDITOR:return v("div",{innerHTML:i.value});case c.ICON:case c.IMAGE:return J(o)&&(n[s.C_CENTERED]=!0),a.badgeData&&(n[s.C_PADDED]=!0),v(j,Object.assign({},a));case c.LINK:return v("a",{href:t,target:"_blank"},i.value);case c.NUMBER:if(t&&""!=t){const e=H.ketchup.math.numberifySafe(i.value),a=d(l,i);return e<0&&(n[s.TEXT_DANGER]=!0),J(o)&&(n[s.C_RIGHT_ALIGNED]=!0),v("div",{class:"f-cell__text"},a)}return v("div",{class:"f-cell__text"},t);case c.SWITCH:return J(o)&&(n[s.C_CENTERED]=!0),a.disabled=!0,v(F,Object.assign({},a));default:return v("div",{class:"f-cell__text"},t)}}(E,R,B,A,m,_,n));let K=null;!S&&(_.icon||m.icon)&&B&&(K=v(j,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:m.icon?m.icon:_.icon,placeholderResource:m.placeholderIcon?m.placeholderIcon:_.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let W=null;H.ketchup.debug.isDebug()&&D?W=m.obj.t+"; "+m.obj.p+"; "+m.obj.k+";":null!=m.title&&""!=m.title.trim()&&(W=m.title);let G=null;if(m.info){const e=Object.assign({},m.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),G=v(j,Object.assign({},{color:e.color,resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return v("div",{onKeyUp:e=>q(e,n,E,p.KEYUP),class:A,"kup-get-cell-props":()=>n,ref:e=>m.element=e,style:m.style},v("div",{class:"f-cell__content",style:m.styleContent,title:W},n.cellActionIcon&&v(j,{resource:"more_vert",sizeX:"16px",sizeY:"16px",wrapperClass:"f-cell__iconfunction "+(E===c.NUMBER?"left":"right"),onClick:n.cellActionIcon.onClick,tabIndex:0}),i&&i.length>0?i:[n.indents,G,K,B]))},T=(e,a)=>{if(!e)return null;const s=e.options,t=a.title,n=e.value,i=H.ketchup.data.cell.getType(e,e.shape),l=new Map([[c.BUTTON_LIST,Y.bind(void 0)],[c.STRING,A.bind(void 0)],[c.RADIO,B.bind(void 0)],[c.AUTOCOMPLETE,K.bind(void 0)],[c.COMBOBOX,K.bind(void 0)],[c.CHECKBOX,R.bind(void 0)],[c.OBJECT,E.bind(void 0)],[c.CHIP,X.bind(void 0)]]).get(i);return l?l(s,t,n,e):null},X=(e,a,s,t)=>{const c={data:(null==e?void 0:e.length)?null==e?void 0:e.map((e=>({id:e.id,value:e.id}))):[]};t.data=Object.assign(Object.assign({},t.data),c)},E=(e,a,s)=>({data:{initialValue:s||"",label:a||"",value:s||""}}),R=(e,a,s,t)=>Object.assign(Object.assign({},t.data),{checked:"on"===s||"1"===s,label:a}),Y=(e,a,s,t)=>({data:[Object.assign(Object.assign({},t.data),{icon:t.icon,value:s})]}),A=(e,a,s,t)=>Object.assign(Object.assign({},t.data),{label:a}),B=(e,a,s,t)=>{const c=n(s,e);t.data=Object.assign(Object.assign({},t.data),c)},K=(e,a,s,t)=>{var c;if(!(null===(c=t.data)||void 0===c?void 0:c.data)&&e){const t=i(s,a,[]);return t.data["kup-list"].data=W(e,s),t}},W=(e,a)=>{const s=U.get(e.type);return s?s(e,a):e.map((e=>({value:e.label,id:e.id,selected:a===e.id})))},G=(e,a)=>e.children.map((e=>{var s;return{id:e.content.codice,value:e.content.testo,selected:a===e.content.codice,children:(null===(s=e.children)||void 0===s?void 0:s.length)?G(e,a):[]}})),L=(e,a)=>e.children.map((e=>{var s;return{id:e.obj.k,value:e.value,selected:a===e.obj.k,children:(null===(s=e.children)||void 0===s?void 0:s.length)?L(e,a):[]}})),P=(e,a)=>e.rows.map((e=>{var s;const t=e.fields||e.cells,[c,n]=Object.keys(t);return{id:t[c].value,value:(null===(s=t[n])||void 0===s?void 0:s.value)||t[c].value,selected:a===t[c].value}})),U=new Map([["SmeupTreeNode",G.bind(void 0)],["SmeupDataTree",L.bind(void 0)],["SmeupTable",P.bind(void 0)],["SmeupDataTable",P.bind(void 0)]]);function q(e,a,s,t){var n,i;const l=a.cell,o=a.column,r=a.component,u=a.row;if(t===p.UPDATE){let a=function(e,a){var s;let t=e.target.value;return a===c.CHECKBOX&&(t=e.target.checked?"off":"on"),a===c.DATE&&(t=null===(s=e.detail)||void 0===s?void 0:s.value),a===c.NUMBER&&(t=H.ketchup.math.formattedStringToNumberString(t,"")),t}(e,s);switch(b(l)?a=null==a?void 0:a.toUpperCase():f(l)&&(a=null==a?void 0:a.toLowerCase()),s){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.TIME:l.data&&(l.data.initialValue=a);break;case c.CHECKBOX:case c.SWITCH:a="on"===a?"0":"1",l.data&&(l.data.checked="0"!==a);break;case c.RADIO:if(l.data.data){const e=l.data.data.find((e=>e.checked));e&&(a=e.value)}break;case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:a=e.detail.stringifiedValues,l.data&&(l.data.data=e.detail.comp.data)}l.obj&&(l.obj.k=null==a?void 0:a.toString()),l.value=null==a?void 0:a.toString(),l.displayedValue=null,l.displayedValue=d(o,l)}if(r&&r.rootElement){const a=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:r,id:r.rootElement.id,cell:l,column:o,event:e,row:u,type:s,inputValue:(null===(i=null===(n=l.element)||void 0===n?void 0:n.querySelector("input"))||void 0===i?void 0:i.value)||null}});if(r.rootElement.dispatchEvent(a),t===p.UPDATE)try{r.refresh()}catch(e){H.ketchup.debug.logMessage(r,e,k.ERROR)}}}function J(e){var a;return u.includes(null===(a=e.component)||void 0===a?void 0:a.rootElement.tagName)}function Q(e){var a;return r.includes(null===(a=e.component)||void 0===a?void 0:a.rootElement.tagName)}export{S as F,I,C as K,_ as a,N as b,M as c,V as d,z as e,F as f}
1
+ import{a8 as e,a9 as s,aa as a,d as t,I as c,ab as n,ac as i,ad as l,F as o,ae as r,af as u,ag as d,ah as p,ai as b,aj as f,e as k}from"./p-b640b0d3.js";import{h as v,g as h,F as m}from"./p-b0368f88.js";import{F as g}from"./p-3913eb45.js";import{F as w}from"./p-bd8c59be.js";import{F as j}from"./p-d1c818ae.js";import{F as y,c as O}from"./p-93dff1f9.js";import{F as $}from"./p-1bdc7796.js";import{F as x}from"./p-f11b1064.js";var _,C,I,z;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(_||(_={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(C||(C={})),function(e){e.CODE="CodeOnly",e.DESCRIPTION="DescOnly",e.DESCRIPTION_AND_CODE="Both"}(I||(I={})),function(e){e.SMALL="small",e.MEDIUM="medium"}(z||(z={}));const F=e=>{e.sizing||(e.sizing=z.MEDIUM),e.sizing.toLowerCase();const s={switch:!0,"switch--checked":e.checked,"switch--disabled":e.disabled,[`switch--${e.sizing}`]:!!e.sizing};return v("div",Object.assign({class:`f-switch ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),v("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},v("div",{class:s},v("div",{class:"switch__track"}),v("div",{class:"switch__thumb-underlay"},v("div",{class:"switch__thumb"},v("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),v("label",{onClick:e.onChange},e.label)))},N=e=>{e.centeredLabel||0==!e.centeredLabel||(e.centeredLabel=!0);let s,a=`f-progress-bar ${e.danger?"kup-danger":""} ${e.animated?"kup-animated":""} ${e.padded?"kup-padded":""} ${e.info?"kup-info":""} ${e.slim?"kup-slim":""} ${e.striped?"kup-striped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,t="pie";a+=e.isRadial?" pie-wrapper is-radial":" progress-bar";const c={width:`${e.value}%`};e.centeredLabel?e.value>49&&(a+=" text-color-on-primary"):(s=c,e.value>2&&(a+=" text-color-on-primary"));let n=null;return e.icon?n=function(e){if(e.icon){if(e.icon.indexOf(".")>-1||e.icon.indexOf("/")>-1||e.icon.indexOf("\\")>-1)return v("span",{class:"label kup-icon is-image"},v("img",{src:e.icon}));{let s=`url('${h(`./assets/svg/${e.icon}.svg`)}') no-repeat center`;return v("span",{style:{mask:s,webkitMask:s},class:"label kup-icon"})}}}(e):e.hideLabel||(n=e.isRadial?e.label?v("span",{class:"label"},e.label):v("span",{class:"label"},e.value,v("span",{class:"smaller"},"%")):e.label?e.label:e.value+"%"),e.value>0&&(t+=" has-value",t+=e.value>50?" is-more-than-half":" is-less-than-half"),e.isRadial?v("div",{class:a},n,v("div",{class:t},v("div",{style:undefined,class:"left-side half-circle"}),v("div",{class:"right-side half-circle"})),v("div",{class:"shadow"})):v("div",{class:a},v("div",{class:"progress-bar-percentage",style:c},v("span",{style:s},n)))};var D;!function(e){e.RADIO="radio",e.CHEVRON="chevron"}(D||(D={}));const M=e=>{var s;const a=!!e.columns,t=[],c=e.type||D.RADIO;for(let a=0;a<(null===(s=e.data)||void 0===s?void 0:s.length);a++){const s=e.data[a];t.push(v("div",{class:`form-field \n ${e.leadingLabel?" form-field--align-end":""} ${e.disabled?"radio--disabled":""}`},v("div",{class:{radio:!0,"radio--checked":!!s.checked,"radio--disabled":!!e.disabled,[`radio--${e.type}`]:!!e.type}},c===D.RADIO?v("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:s.value,checked:s.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange?e.onChange.bind(e.onChange,a):null,onFocus:e.onFocus}):v(m,null,v(j,s.checked?{resource:"check",sizeX:"14px",sizeY:"14px"}:{sizeX:"14px",sizeY:"14px",onClick:e.onChange?e.onChange.bind(e.onChange,a):null})),c===D.RADIO&&v("div",{class:"radio__background"},v("div",{class:"radio__outer-circle"}),v("div",{class:"radio__inner-circle"}))),v("label",{htmlFor:"radio-element",onClick:e.onChange?e.onChange.bind(e.onChange,a):null},s.label?s.label:"")))}return v("div",{class:`f-radio radio-wrapper\n ${a?"radio-wrapper-grid":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""} ${e.horizontal?"kup-horizontal":""}`,style:{"--kup_radio_columns":a?`repeat(${e.columns}, 1fr)`:""}},t)},V=e=>(e.maxValue||(e.maxValue=5),v("div",{class:`f-rating ${e.disabled?"disabled":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},function(e){const s=[];for(let a=1;a<=e.maxValue;a++)s.push(v("span",{class:"rating",onClick:e.onClick?e.onClick.bind(e.onClick,a):null},a<=e.value?"★":"☆"));return s}(e))),H=document.documentElement,S=(n,i)=>{var r,u,k,h;const m=n.cell,_=n.column,C=n.row,z=n.shape?n.shape:m.shape?m.shape:_.shape?_.shape:null,D=!H.ketchup.objects.isEmptyKupObj(m.obj);let S=!1;m.hasOwnProperty("isEditable")?S=m.isEditable:_.hasOwnProperty("isEditable")&&(S=_.isEditable),S=S&&n.editable,m.options&&(m.data=null!==(r=T(m,_))&&void 0!==r?r:m.data);const X=n.previousValue!==m.value?m.value:"",E=H.ketchup.data.cell.getType(m,z),R=Object.assign({},m.data);let Y=m.cssClass?m.cssClass:(null==_?void 0:_.cssClass)?null==_?void 0:_.cssClass:"";const A={"f-cell":!0,[a.OBJ]:!!D,[E+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||E===c.BAR),[Y]:!!Y,"c-input-uppercase":b(m),"c-input-lowercase":f(m),"monospace c-pre":null===(u=m.data)||void 0===u?void 0:u.legacyLook};let B=X;m.data||function(e,s){function a(e){return e.toUpperCase().startsWith("SHAPE;BAR")}function t(e){return e.toUpperCase().startsWith("SHAPE;")}function n(e){return e.toUpperCase().startsWith("BCOLOR;")}function i(e){return e.toUpperCase().startsWith("HEIGHT;")}function l(e){return e.toUpperCase().startsWith("SEP;")||e.toUpperCase().startsWith("DIV;")||e.toUpperCase().startsWith("ARW;")||e.toUpperCase().startsWith("GRID;")}function o(e){const s={},c=e.split("\\\\"),o=[];for(const e of c){if(e){if(l(e))return null;if(t(e)){if(!a(e))return null;{const a=e.split(";");if(3===a.length){const e=a[2].replace(",",".");isNaN(parseFloat(e))||(s.width=`${e}%`)}}}else if(n(e));else if(i(e)){const a=e.substring(7).replace(",",".");isNaN(parseFloat(a))||(s.height=`${a}%`)}else o.push(r(e,s))}return o.length?o:null}function r(e,s){const a=Object.assign({},s),t=e.split(";");if(t.length>=1){const e=/R(\d+)G(\d+)B(\d+)/.exec(t[0]);if(e){const[,s,t,c]=e;isNaN(parseInt(s,10))||isNaN(parseInt(t,10))||isNaN(parseInt(c,10))||(a.color=`rgb(${parseInt(s)},${parseInt(t)},${parseInt(c)})`)}if(t.length>=2){const e=t[1].replace(",",".");isNaN(parseFloat(e))||(a.width=`${e}%`)}}return a}}s.data={};switch(e){case c.CHECKBOX:case c.SWITCH:s.data.checked="1"===s.value;break;case c.BAR:t(s.value)?(s.data.isCanvas=!0,s.data.resource=s.value):s.data.data=function(e){if(!e)return null;const s=e.split("\\\\AND\\"),a=[];for(const e of s){const s=o(e);if(!s)return null;a.push(...s)}return a}(s.value);break;case c.BUTTON:s.data.label=s.value;break;case c.CHART:Object.assign(s.data,{sizeX:"100px",sizeY:"100px",offlineMode:{value:s.value,shape:"pie"}});break;case c.BUTTON_LIST:case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.RADIO:(()=>{var e;const a=null===(e=s.value)||void 0===e?void 0:e.split(";");if(""===(null==a?void 0:a[a.length-1].trim())&&a.pop(),a&&a.length){s.data.data=[];for(let e of a)s.data.data.push({id:e,value:e})}})();break;case c.COLOR_PICKER:s.data.initialValue=s.value;break;case c.GAUGE:case c.KNOB:case c.PROGRESS_BAR:case c.RATING:s.data.value=parseInt(s.value);break;case c.ICON:case c.IMAGE:s.data.resource=s.value}}(E,m),S&&e.includes(E)?(m.data.showMarker=null!==(k=m.tooltip)&&void 0!==k&&k,B=function(e,s,t,n,i){var l,r,u,d;switch(e){case c.AUTOCOMPLETE:return v("kup-autocomplete",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-autocomplete-change":s=>q(s,i,e,p.UPDATE),"onkup-autocomplete-input":s=>q(s,i,e,p.INPUT),"onkup-autocomplete-iconclick":s=>q(s,i,e,p.ICON_CLICK)}));case c.CHECKBOX:return J(i)&&(s[a.C_CENTERED]=!0),t.shape===o.INPUT_CHECKBOX?v("input",{checked:"on"===t.value||"1"===t.value,class:"input-checkbox",onChange:s=>q(s,i,e,p.UPDATE),type:"checkbox"}):v(g,Object.assign({},t.data,{onChange:s=>q(s,i,e,p.UPDATE)}));case c.CHIP:return v("kup-chip",Object.assign({},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":s=>q(s,i,e,p.UPDATE)}),v("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},t.slotData,{error:t.data.error})));case c.COLOR_PICKER:return v("kup-color-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":s=>q(s,i,e,p.UPDATE)}));case c.COMBOBOX:return v("kup-combobox",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-combobox-change":s=>q(s,i,e,p.UPDATE),"onkup-combobox-input":s=>q(s,i,e,p.INPUT),"onkup-combobox-iconclick":s=>q(s,i,e,p.ICON_CLICK)}));case c.DATE:return v("kup-date-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-datepicker-change":s=>q(s,i,e,p.UPDATE),"onkup-datepicker-input":s=>q(s,i,e,p.INPUT)}));case c.MULTI_AUTOCOMPLETE:return v("kup-chip",Object.assign({displayId:!0},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":s=>q(s,i,e,p.UPDATE)}),v("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:I.DESCRIPTION_AND_CODE,selectMode:I.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":s=>q(s,i,e,p.INPUT),"onkup-autocomplete-iconclick":s=>q(s,i,e,p.ICON_CLICK),showDropDownIcon:!1},t.slotData,{error:t.data.error,showMarker:null!==(l=t.tooltip)&&void 0!==l&&l})));case c.MULTI_COMBOBOX:return v("kup-chip",Object.assign({displayId:!0},t.data,{type:y.INPUT,enableInput:!0,"onKup-chip-change":s=>q(s,i,e,p.UPDATE)}),v("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:I.DESCRIPTION_AND_CODE,selectMode:I.DESCRIPTION_AND_CODE,"onkup-combobox-input":s=>q(s,i,e,p.INPUT),"onkup-combobox-iconclick":s=>q(s,i,e,p.ICON_CLICK)},t.slotData,{error:t.data.error,showMarker:null!==(r=t.tooltip)&&void 0!==r&&r})));case c.RADIO:return v(M,Object.assign({},t.data,{disabled:!1,onChange:(s,a)=>{const c=t.data.data;for(let e=0;e<c.length;e++){c[e].checked=e===s}q(a,i,e,p.UPDATE)}}));case c.RATING:return v("kup-rating",Object.assign({key:n.name+i.row.id},t.data,{disabled:!1,"onkup-rating-click":s=>q(s,i,e,p.UPDATE)}));case c.SWITCH:return v(F,Object.assign({},t.data,{disabled:!1,onChange:s=>q(s,i,e,p.UPDATE)}));case c.TIME:return v("kup-time-picker",Object.assign({key:n.name+i.row.id,initialValue:t.value},t.data,{class:Q(i)?"kup-full-width":"","onkup-timepicker-change":s=>q(s,i,e,p.UPDATE),"onkup-timepicker-input":s=>q(s,i,e,p.INPUT)}));case c.OBJECT:return v(x,{cell:t,inputValue:t.value});case c.NUMBER:s[a.C_RIGHT_ALIGNED]=!0;case c.LINK:case c.MEMO:case c.STRING:const b=s=>q(s,i,e,p.UPDATE),f=s=>{var a,c;null===(c=null===(a=t.data)||void 0===a?void 0:a.onInput)||void 0===c||c.call(a,s),q(s,i,e,p.INPUT),q(s,i,e,p.UPDATE)},k=e===c.NUMBER?"number":null,h=e===c.NUMBER&&t.value?H.ketchup.math.numberifySafe(t.value).toString():t.value;return t.shape===o.INPUT_FIELD?v("input",{class:"input-field",onChange:b,onInput:f,type:k,value:h,maxLength:null!==(d=null===(u=n.cellData)||void 0===u?void 0:u.maxLength)&&void 0!==d?d:-1}):v(w,Object.assign({textArea:!!t.shape&&t.shape===o.MEMO||!!e&&e===c.MEMO,inputType:k,fullWidth:!!Q(i)},t.data,{icon:t.data&&t.data.icon?t.data.icon:t.icon?t.icon:n.icon?n.icon:null,decimals:i.column.decimals,integers:i.column.integers,value:h,onChange:b,onInput:f,onIconClick:s=>q(s,i,e,p.ICON_CLICK)}))}}(E,A,m,_,n)):m.data&&s.includes(E)?(n.setSizes&&function(e,s,a){switch(e){case c.BAR:s.sizeY||(s.sizeY="26px");break;case c.BUTTON:let e="";s.label&&(e="36px"),a.style?a.style.height||(a.style.minHeight=e):a.style={minHeight:e};break;case c.CHART:s.sizeX||(s.sizeX="100%"),s.sizeY||(s.sizeY="100%");break;case c.CHIP:case c.RADIO:a.style?a.style.height||(a.style.minHeight="40px"):a.style={minHeight:"40px"}}}(E,R,m),B=n.renderKup?function(e,s,t,n,i,l,o){switch(e){case c.BAR:return t.data?v("div",{style:{height:t.sizeY,width:"100%"}},v(j,Object.assign({},t))):v("kup-image",Object.assign({key:l.name+o.row.id,sizeX:"250px"},t));case c.BUTTON:return J(o)&&(s[a.C_CENTERED]=!0),v($,Object.assign({},t,{onClick:s=>q(s,o,e,p.CLICK)}));case c.BUTTON_LIST:return J(o)&&(s[a.C_CENTERED]=!0),t["data-storage"]={cell:n,row:i,column:l},v("kup-button-list",Object.assign({key:l.name+o.row.id},t));case c.CHART:return J(o)&&(s[a.C_CENTERED]=!0),v("kup-chart",Object.assign({key:l.name+o.row.id},t));case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.CHIP:return v(O,Object.assign({},t));case c.COLOR_PICKER:return v("kup-color-picker",Object.assign({key:l.name+o.row.id},t,{class:Q(o)?"kup-full-width":"",disabled:!0}));case c.GAUGE:return v("kup-gauge",Object.assign({key:l.name+o.row.id,value:H.ketchup.math.numberifySafe(n.value),"width-component":"280px"},t));case c.KNOB:case c.PROGRESS_BAR:return t.customStyle?v("kup-progress-bar",Object.assign({key:l.name+o.row.id},t)):v(N,Object.assign({},t));case c.RADIO:return J(o)&&(s[a.C_CENTERED]=!0),t.disabled=i.readOnly,v(M,Object.assign({},t));case c.RATING:return v(V,Object.assign({},t,{disabled:!0}));case c.OBJECT:return v(w,Object.assign({icon:"table"},t,{disabled:!0}))}}(E,A,R,m,C,_,n):v("span",{class:"cell-"+E+" placeholder"})):(n.setSizes&&function(e,s,a,t){var n;switch(e){case c.CHECKBOX:case c.ICON:s.sizeX||(s.sizeX="18px"),s.sizeY||(s.sizeY="18px"),a.style?a.style.height||(a.style.minHeight=s.sizeY):a.style={minHeight:s.sizeY};break;case c.IMAGE:const e=(null===(n=t.cell)||void 0===n?void 0:n.value)||"",i=e.indexOf(".")>-1||e.indexOf("/")>-1||e.indexOf("\\")>-1;t.component.rootElement.tagName!==l.DATA_TABLE||i||(s.sizeX||s.sizeY?(s.sizeX||(s.sizeX="100%",s.wrapperClass="noWidth"),s.sizeY||(s.sizeY="auto")):(s.sizeX="100%",s.sizeY="64px",s.wrapperClass="noWidth")),t.component.rootElement.tagName===l.BOX?(s.sizeY||(s.sizeY="auto"),void 0===s.fit&&(s.fit=!0)):s.sizeX||(s.sizeX="auto"),s.sizeY||(s.sizeY="64px")}}(E,R,m,n),A[a.INDICATOR_TOPRIGHT]=null!==(h=m.tooltip)&&void 0!==h&&h,B=function(e,s,t,n,i,l,o){switch(e){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:if(t&&""!=t){const e=d(l,i);return v("div",{class:"f-cell__text"},e)}return t;case c.CHECKBOX:return J(o)&&(n[a.C_CENTERED]=!0),v(j,{resource:s.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case c.EDITOR:return v("div",{innerHTML:i.value});case c.ICON:case c.IMAGE:return J(o)&&(n[a.C_CENTERED]=!0),s.badgeData&&(n[a.C_PADDED]=!0),v(j,Object.assign({},s));case c.LINK:return v("a",{href:t,target:"_blank"},i.value);case c.NUMBER:if(t&&""!=t){const e=H.ketchup.math.numberifySafe(i.value),s=d(l,i);return e<0&&(n[a.TEXT_DANGER]=!0),J(o)&&(n[a.C_RIGHT_ALIGNED]=!0),v("div",{class:"f-cell__text"},s)}return v("div",{class:"f-cell__text"},t);case c.SWITCH:return J(o)&&(n[a.C_CENTERED]=!0),s.disabled=!0,v(F,Object.assign({},s));default:return v("div",{class:"f-cell__text"},t)}}(E,R,B,A,m,_,n));let K=null;!S&&(_.icon||m.icon)&&B&&(K=v(j,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:m.icon?m.icon:_.icon,placeholderResource:m.placeholderIcon?m.placeholderIcon:_.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let W=null;H.ketchup.debug.isDebug()&&D?W=m.obj.t+"; "+m.obj.p+"; "+m.obj.k+";":null!=m.title&&""!=m.title.trim()&&(W=m.title);let G=null;if(m.info){const e=Object.assign({},m.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),G=v(j,Object.assign({},{color:e.color,resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return v("div",{onKeyUp:e=>q(e,n,E,p.KEYUP),class:A,"kup-get-cell-props":()=>n,ref:e=>m.element=e,style:m.style},v("div",{class:"f-cell__content",style:m.styleContent,title:W},n.cellActionIcon&&v(j,{resource:"more_vert",sizeX:"16px",sizeY:"16px",wrapperClass:"f-cell__iconfunction "+(E===c.NUMBER?"left":"right"),onClick:n.cellActionIcon.onClick,tabIndex:0}),i&&i.length>0?i:[n.indents,G,K,B]))},T=(e,s)=>{if(!e)return null;const a=e.options,t=s.title,n=e.value,i=H.ketchup.data.cell.getType(e,e.shape),l=new Map([[c.BUTTON_LIST,Y.bind(void 0)],[c.STRING,A.bind(void 0)],[c.RADIO,B.bind(void 0)],[c.AUTOCOMPLETE,K.bind(void 0)],[c.COMBOBOX,K.bind(void 0)],[c.CHECKBOX,R.bind(void 0)],[c.OBJECT,E.bind(void 0)],[c.CHIP,X.bind(void 0)]]).get(i);return l?l(a,t,n,e):null},X=(e,s,a,t)=>{const c={data:(null==e?void 0:e.length)?null==e?void 0:e.map((e=>({id:e.id,value:e.id}))):[]};t.data=Object.assign(Object.assign({},t.data),c)},E=(e,s,a)=>({data:{initialValue:a||"",label:s||"",value:a||""}}),R=(e,s,a,t)=>Object.assign(Object.assign({},t.data),{checked:"on"===a||"1"===a,label:s}),Y=(e,s,a,t)=>({data:[Object.assign(Object.assign({},t.data),{icon:t.icon,value:a})]}),A=(e,s,a,t)=>Object.assign(Object.assign({},t.data),{label:s}),B=(e,s,a,t)=>{const c=n(a,e);t.data=Object.assign(Object.assign({},t.data),c)},K=(e,s,a,t)=>{var c;if(!(null===(c=t.data)||void 0===c?void 0:c.data)&&e){const t=i(a,s,[]);return t.data["kup-list"].data=W(e,a),t}},W=(e,s)=>{const a=U.get(e.type);return a?a(e,s):e.map((e=>({value:e.label,id:e.id,selected:s===e.id})))},G=(e,s)=>e.children.map((e=>{var a;return{id:e.content.codice,value:e.content.testo,selected:s===e.content.codice,children:(null===(a=e.children)||void 0===a?void 0:a.length)?G(e,s):[]}})),L=(e,s)=>e.children.map((e=>{var a;return{id:e.obj.k,value:e.value,selected:s===e.obj.k,children:(null===(a=e.children)||void 0===a?void 0:a.length)?L(e,s):[]}})),P=(e,s)=>e.rows.map((e=>{var a;const t=e.fields||e.cells,[c,n]=Object.keys(t);return{id:t[c].value,value:(null===(a=t[n])||void 0===a?void 0:a.value)||t[c].value,selected:s===t[c].value}})),U=new Map([["SmeupTreeNode",G.bind(void 0)],["SmeupDataTree",L.bind(void 0)],["SmeupTable",P.bind(void 0)],["SmeupDataTable",P.bind(void 0)]]);function q(e,s,a,t){var n,i;const l=s.cell,o=s.column,r=s.component,u=s.row;if(t===p.UPDATE){let s=function(e,s){var a;let t=e.target.value;return s===c.CHECKBOX&&(t=e.target.checked?"off":"on"),s===c.DATE&&(t=null===(a=e.detail)||void 0===a?void 0:a.value),s===c.NUMBER&&(t=H.ketchup.math.formattedStringToNumberString(t,"")),t}(e,a);switch(b(l)?s=null==s?void 0:s.toUpperCase():f(l)&&(s=null==s?void 0:s.toLowerCase()),a){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.TIME:l.data&&(l.data.initialValue=s);break;case c.CHECKBOX:case c.SWITCH:s="on"===s?"0":"1",l.data&&(l.data.checked="0"!==s);break;case c.RADIO:if(l.data.data){const e=l.data.data.find((e=>e.checked));e&&(s=e.value)}break;case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:s=e.detail.stringifiedValues,l.data&&(l.data.data=e.detail.comp.data)}l.obj&&(l.obj.k=null==s?void 0:s.toString()),l.value=null==s?void 0:s.toString(),l.displayedValue=null,l.displayedValue=d(o,l)}if(r&&r.rootElement){const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:r,id:r.rootElement.id,cell:l,column:o,event:e,row:u,type:a,inputValue:(null===(i=null===(n=l.element)||void 0===n?void 0:n.querySelector("input"))||void 0===i?void 0:i.value)||null}});if(r.rootElement.dispatchEvent(s),t===p.UPDATE)try{r.refresh()}catch(e){H.ketchup.debug.logMessage(r,e,k.ERROR)}}}function J(e){var s;return u.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}function Q(e){var s;return r.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}export{S as F,I,C as K,_ as a,N as b,M as c,V as d,z as e,F as f}
@@ -1 +1 @@
1
- import{r as t,c as n,f as e,h as i,H as a,d as p}from"./p-b0368f88.js";import{k as o,e as s,g as h,s as l}from"./p-54906238.js";import{a as f,F as r}from"./p-60cfddce.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.data="prop of the sub compoennt",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(u||(u={}));const g=class{constructor(e){t(this,e),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=f.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){e(this)}async setProps(t){l(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const e=this.prepareDataFromTreeNode(t,n);return e.value?i(r,Object.assign({},{value:e.value,type:e.type,toolbar:e.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const e=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(e.customStyle=this.customStyle),null==e.value&&(e.value=t.value),e.wrapperClass||(e.wrapperClass=""),null!=this.type&&(e.type=this.type),null!=this.toolbar&&(e.toolbar=this.toolbar),e.id=n.toString(),e}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let e=null;e=this.renderTypography(this.data[n],n),e&&t.push(e)}return t}getObjForEvent(t,n){let e=Number(t),i=-1;null!=n&&""!=n.trim()&&(i=Number(n));let a=this.data[e];return-1!=i?a.children[i].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),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 t=this.renderTypographys();return i(a,{key:"7cefcf3d2b633a30ecb96d3ff57d3b3f87cbe4d0"},i("style",{key:"8ada91e5d574896f59efd42b5ac677c07cb39f15"},this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{key:"2b33b1457e20fca4cf707ee1762b1a02f90e1cb4",id:c},i("div",{key:"a0348c411bd565eeb0777ed5204b02b24978e1a2",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}
1
+ import{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-b0368f88.js";import{k as o,e as s,g as h,s as f}from"./p-b640b0d3.js";import{a as l,F as r}from"./p-60cfddce.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.data="prop of the sub compoennt",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(u||(u={}));const g=class{constructor(i){t(this,i),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=l.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const i=this.prepareDataFromTreeNode(t,n);return i.value?e(r,Object.assign({},{value:i.value,type:i.type,toolbar:i.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const i=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(i.customStyle=this.customStyle),null==i.value&&(i.value=t.value),i.wrapperClass||(i.wrapperClass=""),null!=this.type&&(i.type=this.type),null!=this.toolbar&&(i.toolbar=this.toolbar),i.id=n.toString(),i}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let i=null;i=this.renderTypography(this.data[n],n),i&&t.push(i)}return t}getObjForEvent(t,n){let i=Number(t),e=-1;null!=n&&""!=n.trim()&&(e=Number(n));let a=this.data[i];return-1!=e?a.children[e].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),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 t=this.renderTypographys();return e(a,{key:"3805175638dc6f6a011f74d709b8039becce3f35"},e("style",{key:"d7df404a5c9d6f060af4f2cf668879a59e56f40d"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"ec8e41f3f5ef083f213cb742df53ed130b025b83",id:c},e("div",{key:"03554ddfe756cab8c854aecf3e7002d8a86d1af7",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}