@sme.up/ketchup 11.0.0-SNAPSHOT-20250918105112 → 11.0.0-SNAPSHOT-20250926074033

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 (284) hide show
  1. package/dist/cjs/{f-cell-f7a99b74.js → f-cell-2c0f4388.js} +4 -4
  2. package/dist/cjs/{f-chip-b0b4b0d9.js → f-chip-11c1763b.js} +1 -1
  3. package/dist/cjs/{f-object-field-db5613ef.js → f-object-field-974b6790.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-2fcf4642.js → f-paginator-utils-1736353d.js} +1 -1
  5. package/dist/cjs/{f-text-field-ee6120c5.js → f-text-field-bdf15a0f.js} +1 -1
  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 +2 -2
  10. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +83 -77
  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 +1 -1
  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-0705294e.js → kup-data-table-helper-c411be01.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-input-panel.cjs.entry.js +7 -7
  27. package/dist/cjs/kup-lazy.cjs.entry.js +12 -12
  28. package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
  29. package/dist/cjs/{kup-manager-0ce9fd30.js → kup-manager-d4cfbd61.js} +2 -2
  30. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  32. package/dist/cjs/kup-object-field.cjs.entry.js +4 -4
  33. package/dist/cjs/kup-pdf.cjs.entry.js +2 -2
  34. package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
  35. package/dist/cjs/kup-planner.cjs.entry.js +3 -3
  36. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  37. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  38. package/dist/cjs/kup-snackbar.cjs.entry.js +2 -2
  39. package/dist/cjs/kup-txt.cjs.entry.js +2 -2
  40. package/dist/cjs/kup-typography-list.cjs.entry.js +2 -2
  41. package/dist/cjs/kup-typography.cjs.entry.js +3 -3
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/collection/components/kup-accordion/kup-accordion.js +1 -1
  44. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
  45. package/dist/collection/components/kup-badge/kup-badge.js +2 -2
  46. package/dist/collection/components/kup-button-list/kup-button-list.js +1 -1
  47. package/dist/collection/components/kup-calendar/kup-calendar.js +2 -2
  48. package/dist/collection/components/kup-cell/kup-cell.js +2 -2
  49. package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
  50. package/dist/collection/components/kup-chip/kup-chip.js +2 -2
  51. package/dist/collection/components/kup-color-picker/kup-color-picker.js +2 -2
  52. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
  53. package/dist/collection/components/kup-dashboard/kup-dashboard.js +1 -1
  54. package/dist/collection/components/kup-data-table/kup-data-table.js +46 -11
  55. package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
  56. package/dist/collection/components/kup-dialog/kup-dialog.js +1 -1
  57. package/dist/collection/components/kup-drawer/kup-drawer.js +2 -2
  58. package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -1
  59. package/dist/collection/components/kup-echart/kup-echart.js +1 -1
  60. package/dist/collection/components/kup-editor/kup-editor.js +1 -1
  61. package/dist/collection/components/kup-family-tree/kup-family-tree.js +2 -2
  62. package/dist/collection/components/kup-file-upload/kup-file-upload.js +2 -2
  63. package/dist/collection/components/kup-form/kup-form.js +2 -2
  64. package/dist/collection/components/kup-htm/kup-htm.js +1 -1
  65. package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
  66. package/dist/collection/components/kup-input-panel/kup-input-panel.js +2 -2
  67. package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
  68. package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
  69. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  70. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
  71. package/dist/collection/components/kup-object-field/kup-object-field.js +1 -1
  72. package/dist/collection/components/kup-pdf/kup-pdf.js +1 -1
  73. package/dist/collection/components/kup-planner/kup-planner.js +1 -1
  74. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
  75. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
  76. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
  77. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
  78. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
  79. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  80. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
  81. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
  82. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  83. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  84. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
  85. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  86. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  87. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  88. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  89. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  90. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  91. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  92. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  93. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  94. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  95. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  96. package/dist/collection/components/kup-txt/kup-txt.js +1 -1
  97. package/dist/collection/components/kup-typography/kup-typography.js +2 -2
  98. package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
  99. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +3 -1
  100. package/dist/components/index.js +1 -1
  101. package/dist/components/kup-accordion.js +3 -3
  102. package/dist/components/kup-activity-timeline.js +2 -2
  103. package/dist/components/kup-autocomplete.js +1 -1
  104. package/dist/components/kup-badge.js +1 -1
  105. package/dist/components/kup-box.js +1 -1
  106. package/dist/components/kup-button-list.js +1 -1
  107. package/dist/components/kup-button.js +1 -1
  108. package/dist/components/kup-calendar.js +4 -4
  109. package/dist/components/kup-card-list.js +3 -3
  110. package/dist/components/kup-card.js +1 -1
  111. package/dist/components/kup-cell.js +4 -4
  112. package/dist/components/kup-chart.js +1 -1
  113. package/dist/components/kup-checkbox.js +1 -1
  114. package/dist/components/kup-chip.js +1 -1
  115. package/dist/components/kup-color-picker.js +1 -1
  116. package/dist/components/kup-combobox.js +1 -1
  117. package/dist/components/kup-custom-task-list-header.js +1 -1
  118. package/dist/components/kup-dashboard.js +3 -3
  119. package/dist/components/kup-data-table.js +1 -1
  120. package/dist/components/kup-date-picker.js +1 -1
  121. package/dist/components/kup-dialog.js +1 -1
  122. package/dist/components/kup-drawer.js +4 -4
  123. package/dist/components/kup-dropdown-button.js +1 -1
  124. package/dist/components/kup-echart.js +1 -1
  125. package/dist/components/kup-editor.js +1 -1
  126. package/dist/components/kup-family-tree.js +5 -5
  127. package/dist/components/kup-file-upload.js +1 -1
  128. package/dist/components/kup-form.js +1 -1
  129. package/dist/components/kup-gantt-calendar.js +1 -1
  130. package/dist/components/kup-gantt.js +1 -1
  131. package/dist/components/kup-gauge.js +1 -1
  132. package/dist/components/kup-grid-renderer.js +1 -1
  133. package/dist/components/kup-grid.js +1 -1
  134. package/dist/components/kup-horizontal-scroll.js +1 -1
  135. package/dist/components/kup-htm.js +3 -3
  136. package/dist/components/kup-iframe.js +2 -2
  137. package/dist/components/kup-image-list.js +1 -1
  138. package/dist/components/kup-image.js +1 -1
  139. package/dist/components/kup-input-panel.js +5 -5
  140. package/dist/components/kup-lazy.js +13 -13
  141. package/dist/components/kup-list.js +1 -1
  142. package/dist/components/kup-magic-box.js +7 -7
  143. package/dist/components/kup-nav-bar.js +3 -3
  144. package/dist/components/kup-numeric-picker.js +3 -3
  145. package/dist/components/kup-object-field.js +3 -3
  146. package/dist/components/kup-pdf.js +3 -3
  147. package/dist/components/kup-planner-renderer.js +1 -1
  148. package/dist/components/kup-planner.js +17 -17
  149. package/dist/components/kup-probe.js +3 -3
  150. package/dist/components/kup-progress-bar.js +1 -1
  151. package/dist/components/kup-qlik.js +3 -3
  152. package/dist/components/kup-radio.js +1 -1
  153. package/dist/components/kup-rating.js +1 -1
  154. package/dist/components/kup-snackbar.js +3 -3
  155. package/dist/components/kup-spinner.js +1 -1
  156. package/dist/components/kup-standard-tooltip.js +1 -1
  157. package/dist/components/kup-switch.js +1 -1
  158. package/dist/components/kup-switcher.js +1 -1
  159. package/dist/components/kup-tab-bar.js +1 -1
  160. package/dist/components/kup-task-gantt.js +1 -1
  161. package/dist/components/kup-task-list-header.js +1 -1
  162. package/dist/components/kup-task-list-table.js +1 -1
  163. package/dist/components/kup-task-list.js +1 -1
  164. package/dist/components/kup-text-field.js +1 -1
  165. package/dist/components/kup-time-picker.js +1 -1
  166. package/dist/components/kup-toolbar.js +1 -1
  167. package/dist/components/kup-tooltip.js +1 -1
  168. package/dist/components/kup-tree.js +1 -1
  169. package/dist/components/kup-txt.js +3 -3
  170. package/dist/components/kup-typography-list.js +3 -3
  171. package/dist/components/kup-typography.js +4 -4
  172. package/dist/components/kup-vertical-scroll.js +1 -1
  173. package/dist/components/{p-a0689c36.js → p-08f7e266.js} +2 -2
  174. package/dist/components/{p-b5ccc0d2.js → p-0ff64854.js} +4 -4
  175. package/dist/components/{p-77d5a7b9.js → p-17337a7c.js} +5 -5
  176. package/dist/components/{p-e04a9d10.js → p-1cfc8a82.js} +2 -2
  177. package/dist/components/{p-e8d83de0.js → p-1d99f2fe.js} +1 -1
  178. package/dist/components/{p-85852162.js → p-28774031.js} +2 -2
  179. package/dist/components/{p-56da9a2f.js → p-30c8e164.js} +1 -1
  180. package/dist/components/{p-0d996df2.js → p-343b2833.js} +3 -3
  181. package/dist/components/{p-74fd0cb8.js → p-54d46233.js} +3 -3
  182. package/dist/components/{p-ea57c8a7.js → p-67276f12.js} +78 -71
  183. package/dist/components/{p-98036b1e.js → p-7c68a61b.js} +7 -7
  184. package/dist/components/{p-aa57deef.js → p-81f061fc.js} +2 -2
  185. package/dist/components/{p-f852dbfa.js → p-a07ff6c6.js} +2 -2
  186. package/dist/components/{p-9fae47de.js → p-a0e72afe.js} +13 -13
  187. package/dist/components/{p-03f1cdd9.js → p-b7db8929.js} +15 -15
  188. package/dist/components/{p-916e6551.js → p-b7fd7e3d.js} +2 -2
  189. package/dist/components/{p-78812491.js → p-da4b46f9.js} +3 -3
  190. package/dist/components/{p-b6f1319e.js → p-da813d4a.js} +2 -2
  191. package/dist/components/{p-f57a4a4e.js → p-e7f68bbe.js} +1 -1
  192. package/dist/components/{p-b33ec213.js → p-f39218a4.js} +1 -1
  193. package/dist/esm/{f-cell-3a3c8d87.js → f-cell-1137210f.js} +4 -4
  194. package/dist/esm/{f-chip-3ed440ef.js → f-chip-19ec7dfe.js} +1 -1
  195. package/dist/esm/{f-object-field-23935da4.js → f-object-field-9dc89cb1.js} +2 -2
  196. package/dist/esm/{f-paginator-utils-a9d5c2d3.js → f-paginator-utils-0cd02efc.js} +1 -1
  197. package/dist/esm/{f-text-field-4934ff74.js → f-text-field-ab9dca9d.js} +1 -1
  198. package/dist/esm/index.js +1 -1
  199. package/dist/esm/ketchup.js +1 -1
  200. package/dist/esm/kup-accordion.entry.js +2 -2
  201. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  202. package/dist/esm/kup-autocomplete_30.entry.js +83 -77
  203. package/dist/esm/kup-box.entry.js +7 -7
  204. package/dist/esm/kup-calendar.entry.js +4 -4
  205. package/dist/esm/kup-card-list.entry.js +1 -1
  206. package/dist/esm/kup-cell.entry.js +7 -7
  207. package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
  208. package/dist/esm/kup-dashboard.entry.js +3 -3
  209. package/dist/esm/{kup-data-table-helper-de9421a0.js → kup-data-table-helper-20a204e9.js} +1 -1
  210. package/dist/esm/kup-drawer.entry.js +3 -3
  211. package/dist/esm/kup-echart.entry.js +2 -2
  212. package/dist/esm/kup-editor.entry.js +2 -2
  213. package/dist/esm/kup-family-tree.entry.js +3 -3
  214. package/dist/esm/kup-gantt_10.entry.js +23 -23
  215. package/dist/esm/kup-grid.entry.js +1 -1
  216. package/dist/esm/kup-htm.entry.js +2 -2
  217. package/dist/esm/kup-iframe.entry.js +1 -1
  218. package/dist/esm/kup-input-panel.entry.js +7 -7
  219. package/dist/esm/kup-lazy.entry.js +12 -12
  220. package/dist/esm/kup-magic-box.entry.js +4 -4
  221. package/dist/esm/{kup-manager-5c23bae7.js → kup-manager-fda30dc6.js} +2 -2
  222. package/dist/esm/kup-nav-bar.entry.js +2 -2
  223. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  224. package/dist/esm/kup-object-field.entry.js +4 -4
  225. package/dist/esm/kup-pdf.entry.js +2 -2
  226. package/dist/esm/kup-planner-renderer.entry.js +2 -2
  227. package/dist/esm/kup-planner.entry.js +3 -3
  228. package/dist/esm/kup-probe.entry.js +2 -2
  229. package/dist/esm/kup-qlik.entry.js +2 -2
  230. package/dist/esm/kup-snackbar.entry.js +2 -2
  231. package/dist/esm/kup-txt.entry.js +2 -2
  232. package/dist/esm/kup-typography-list.entry.js +2 -2
  233. package/dist/esm/kup-typography.entry.js +3 -3
  234. package/dist/esm/loader.js +1 -1
  235. package/dist/ketchup/index.esm.js +1 -1
  236. package/dist/ketchup/ketchup.esm.js +1 -1
  237. package/dist/ketchup/p-0ba187b4.js +1 -0
  238. package/dist/ketchup/{p-fcae71f2.entry.js → p-0dd0cf8d.entry.js} +1 -1
  239. package/dist/ketchup/{p-610e1045.entry.js → p-1036b64a.entry.js} +1 -1
  240. package/dist/ketchup/{p-02e22635.js → p-223b9ff7.js} +1 -1
  241. package/dist/ketchup/{p-5b4733d8.entry.js → p-2777a746.entry.js} +1 -1
  242. package/dist/ketchup/{p-758617e7.entry.js → p-35de99b7.entry.js} +1 -1
  243. package/dist/ketchup/{p-da273b4d.js → p-3a118dba.js} +1 -1
  244. package/dist/ketchup/{p-b509455c.entry.js → p-3e8901fc.entry.js} +1 -1
  245. package/dist/ketchup/{p-180bf54f.entry.js → p-481729c8.entry.js} +1 -1
  246. package/dist/ketchup/{p-1b2bf662.entry.js → p-4af8c55b.entry.js} +2 -2
  247. package/dist/ketchup/{p-6c8ce0a9.entry.js → p-4ca472ec.entry.js} +1 -1
  248. package/dist/ketchup/p-507efcb3.entry.js +1 -0
  249. package/dist/ketchup/p-5c7b6b74.entry.js +16 -0
  250. package/dist/ketchup/{p-59027fa3.entry.js → p-624a867b.entry.js} +1 -1
  251. package/dist/ketchup/{p-ece991ba.entry.js → p-69a3e47a.entry.js} +1 -1
  252. package/dist/ketchup/{p-b780b291.entry.js → p-6c2438ef.entry.js} +1 -1
  253. package/dist/ketchup/{p-0db73b81.entry.js → p-713aec20.entry.js} +1 -1
  254. package/dist/ketchup/{p-a113106a.entry.js → p-73feb2dc.entry.js} +1 -1
  255. package/dist/ketchup/{p-dc425c68.entry.js → p-7aef1158.entry.js} +1 -1
  256. package/dist/ketchup/{p-34f54cc8.entry.js → p-814c5e8a.entry.js} +1 -1
  257. package/dist/ketchup/{p-6d667386.entry.js → p-8c5aa6e4.entry.js} +1 -1
  258. package/dist/ketchup/{p-cc09bd1d.entry.js → p-90145ee3.entry.js} +1 -1
  259. package/dist/ketchup/{p-da5d5eea.js → p-99f280d4.js} +1 -1
  260. package/dist/ketchup/{p-1be8e449.entry.js → p-a61449bb.entry.js} +1 -1
  261. package/dist/ketchup/{p-143617b6.entry.js → p-a6dcbd2a.entry.js} +1 -1
  262. package/dist/ketchup/{p-057f9d22.entry.js → p-b2042e19.entry.js} +1 -1
  263. package/dist/ketchup/{p-a993d05a.entry.js → p-b8adb9c7.entry.js} +1 -1
  264. package/dist/ketchup/{p-8cc6c355.entry.js → p-b97055a6.entry.js} +1 -1
  265. package/dist/ketchup/p-bfd4ab89.entry.js +8 -0
  266. package/dist/ketchup/{p-e45b8338.entry.js → p-c8ca2bdc.entry.js} +1 -1
  267. package/dist/ketchup/p-c9323112.js +1 -0
  268. package/dist/ketchup/{p-97ea417e.entry.js → p-d2605540.entry.js} +2 -2
  269. package/dist/ketchup/p-d629f411.js +21 -0
  270. package/dist/ketchup/{p-7960c9e8.entry.js → p-d6f45de5.entry.js} +1 -1
  271. package/dist/ketchup/{p-eac0e5f0.entry.js → p-d7330a4e.entry.js} +1 -1
  272. package/dist/ketchup/{p-99f6dd77.entry.js → p-ddf37d4e.entry.js} +1 -1
  273. package/dist/ketchup/{p-b7d29946.entry.js → p-df654b52.entry.js} +2 -2
  274. package/dist/ketchup/{p-fcbf4e40.entry.js → p-e38b3b08.entry.js} +1 -1
  275. package/dist/ketchup/{p-87559acf.js → p-f28d4e2e.js} +1 -1
  276. package/dist/types/components/kup-data-table/kup-data-table.d.ts +5 -1
  277. package/dist/types/components.d.ts +18 -2
  278. package/package.json +1 -1
  279. package/dist/ketchup/p-03d049e3.js +0 -21
  280. package/dist/ketchup/p-25ec57f1.entry.js +0 -8
  281. package/dist/ketchup/p-596fb5b6.entry.js +0 -1
  282. package/dist/ketchup/p-5fa425df.entry.js +0 -16
  283. package/dist/ketchup/p-95346c81.js +0 -1
  284. package/dist/ketchup/p-cf5e1d07.js +0 -1
@@ -1 +1 @@
1
- import{h as t,r as i,d as s}from"./p-710d0a7d.js";import{c as e,a as h,g as a,m as l,b as n,d as o,e as d}from"./p-5f645f29.js";import{e as r,f as c}from"./p-cd3a7d53.js";import{a as u}from"./p-cabebabc.js";import{g as v}from"./p-53af4c87.js";const D=()=>()=>t("div",null),p=class{constructor(t){i(this,t),this.locale="it-IT",this.props=void 0,this.timeUnit=void 0,this.currentTasks=[],this.currentDetails=[],this.scrollX=-1,this.mainGanttDoubleView=!1,this.displayedDates={displayedStartDate:new Date,displayedEndDate:new Date},this.viewDate=void 0,this.projection=void 0,this.tasks=[],this.details=[]}mainGanttChangeHandler(){var t;this.currentTasks=this.props.mainGantt.items,this.currentDetails=null===(t=this.props.secondaryGantt)||void 0===t?void 0:t.items,this.projection=void 0,this.updateTasks()}updateDisplayedDates(){const t=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,this.props.preStepsCount);if(!this.viewDate){const i=new Date;this.viewDate=t.displayedStartDate<=i&&t.displayedEndDate>=i?i:t.displayedStartDate}}updateTasks(){var t,i;const s=new u;this.tasks=[];for(let i=0;i<(null===(t=this.currentTasks)||void 0===t?void 0:t.length);i++)this.tasks.push(...h(this.currentTasks[i],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)));this.details=[];for(let t=0;t<(null===(i=this.currentDetails)||void 0===i?void 0:i.length);t++)this.details.push(...h(this.currentDetails[t],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)))}componentWillLoad(){var t,i,s,h,a,l,n,o,d,r,c;this.timeUnit=null===(t=this.props)||void 0===t?void 0:t.viewMode,this.currentTasks=(null===(i=this.props)||void 0===i?void 0:i.mainGantt.items)||[],this.currentDetails=null===(h=null===(s=this.props)||void 0===s?void 0:s.secondaryGantt)||void 0===h?void 0:h.items,this.scrollX=null!==(n=null===(l=null===(a=this.props)||void 0===a?void 0:a.mainGantt)||void 0===l?void 0:l.initialScrollX)&&void 0!==n?n:-1,this.mainGanttDoubleView=null!==(r=null===(d=null===(o=this.props)||void 0===o?void 0:o.mainGantt)||void 0===d?void 0:d.showSecondaryDates)&&void 0!==r&&r,this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(c=this.props)||void 0===c?void 0:c.preStepsCount),this.viewDate=void 0,this.projection=void 0,this.updateTasks()}async refresh(){var t;this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(t=this.props)||void 0===t?void 0:t.preStepsCount)}handleClick(t,i){if(t){if("task"===t.type&&this.props.secondaryGantt){const i=t;this.projection={start:new Date(i.startDate),end:new Date(i.endDate),color:i.color||"#ED7D31"}}else this.projection=void 0;null==i||i(t)}}handleDblClick(t,i){t&&(null==i||i(t))}handleContextMenu(t,i,s){if(i){if("task"===i.type&&this.props.secondaryGantt){const t=i;this.projection={start:new Date(t.startDate),end:new Date(t.endDate),color:t.color||"#ED7D31"}}else this.projection=void 0;null==s||s(t,i)}}handleSetDoubleView(t){var i,s;this.mainGanttDoubleView=t,null===(s=null===(i=this.props)||void 0===i?void 0:i.onSetDoubleView)||void 0===s||s.call(i,t)}handleDateChange(t,i,s){var e;const h=null==t?void 0:t.id;if(!h)return;let d=n(h,i);if(d||(d=a(h,i)),d)if("timeline"!==d.type){if("project"===d.type){const s=l(i,t);d=n(d.id,s),this.viewDate=t.start,this.currentTasks=s}else if("task"===d.type){const s=i.find((t=>{var i;return null===(i=t.phases)||void 0===i?void 0:i.some((t=>(null==t?void 0:t.id)===h))}));if(s){const h=o(s.phases,t),l=i.map((t=>t.id===s.id?Object.assign(Object.assign({},t),{phases:h}):t));d=a(d.id,l),this.props.secondaryGantt&&d&&(this.projection={start:new Date(d.startDate),end:new Date(d.endDate),color:null!==(e=d.color)&&void 0!==e?e:"#ED7D31"}),this.viewDate=t.start,this.currentTasks=l}}null==s||s(d),setTimeout(this.getScrollX,500)}else console.log("onDateChange for timeline not managed yet",h,d.type)}handlePhaseDrop(t,i,s,e){let h;const l=this.currentTasks,n=l.find((t=>{var s;return null===(s=t.phases)||void 0===s?void 0:s.some((t=>(null==t?void 0:t.id)===i.id))}));if(n){const t=o(n.phases,i),s=l.map((i=>i.id===n.id?Object.assign(Object.assign({},i),{phases:t}):i));h=a(i.id,s)}null==h||delete h.taskRow,null==e||e({originalPhaseData:t,finalPhaseData:h,destinationData:s}),this.currentTasks=JSON.parse(JSON.stringify(this.currentTasks)),setTimeout(this.getScrollX,500)}getScrollX(){var t,i,s;if(this.rootElement){const e=null===(t=this.rootElement.querySelector('[data-scrollx="true"]'))||void 0===t?void 0:t.scrollLeft;void 0!==e&&(null===(s=(i=this.props).onScrollX)||void 0===s||s.call(i,e))}}render(){var i,s,e;return t("div",{key:"480764bfd698923993335489a0b7b584eed54909",class:"planner-render"},t("kup-switcher",{key:"f88a44637e3c2626ff3b74878bc9b00ae960ae1a",timeUnitChange:t=>{var i,s;null===(s=(i=this.props).onSetViewMode)||void 0===s||s.call(i,t),this.timeUnit=t,this.viewDate=void 0,this.scrollX=-1}}),this.props&&t("div",{key:"5ea807f596c11da4256cdd5c71f0555fb624a893",style:{display:"flex",flexDirection:"column"}},t("kup-gantt",Object.assign({ref:t=>this.mainGantt=t,ganttId:r,key:r,filter:this.props.mainGantt.filter,hideLabel:this.props.mainGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.mainGantt.hideDependencies,ganttHeight:this.props.mainGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.tasks,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.mainGantt.stylingOptions,{TaskListHeader:this.props.mainGantt.taskListHeaderProject,TaskListTable:this.props.mainGantt.taskListTableProject,TooltipContent:null!==(i=this.props.mainGantt.tooltipContent)&&void 0!==i?i:D(),barClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleClick(i,this.props.mainGantt.onClick)},barDblClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleDblClick(i,this.props.mainGantt.onDblClick)},barContextMenu:(t,i)=>{let s=n(i.id,this.currentTasks);s||(s=a(i.id,this.currentTasks)),s&&this.handleContextMenu(t,s,this.props.mainGantt.onContextMenu)},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.mainGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.mainGantt.initialScrollY,readOnly:this.props.mainGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.mainGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.mainGantt.onClick,ganttOnDblClick:this.props.mainGantt.onDblClick,ganttonOnContextMenu:this.props.mainGantt.onContextMenu,label:this.props.mainGantt.title,doubleView:null!==(s=this.mainGanttDoubleView)&&void 0!==s&&s,setDoubleView:this.handleSetDoubleView.bind(this),scrollableTaskList:this.props.scrollableTaskList,phaseDrop:(t,i,s,e)=>{const h=a(t.id,this.currentTasks);n(i.id,this.currentTasks),a(s.id,this.currentTasks);const l=n(e.id,this.currentTasks);this.handlePhaseDrop(h,s,l,this.props.mainGantt.onPhaseDrop)}})),this.props.secondaryGantt&&t("kup-gantt",Object.assign({ref:t=>this.secondaryGantt=t,ganttId:c,key:c,filter:this.props.secondaryGantt.filter,hideLabel:this.props.secondaryGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.secondaryGantt.hideDependencies,ganttHeight:this.props.secondaryGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.details,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.secondaryGantt.stylingOptions,{TaskListHeader:this.props.secondaryGantt.taskListHeaderProject,TaskListTable:this.props.secondaryGantt.taskListTableProject,TooltipContent:null!==(e=this.props.secondaryGantt.tooltipContent)&&void 0!==e?e:D(),projection:this.projection,barClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleClick(i,this.props.secondaryGantt.onClick)}},barDblClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleDblClick(i,this.props.secondaryGantt.onDblClick)}},barContextMenu:(t,i)=>{if(this.props.secondaryGantt){let s=n(i.id,this.currentDetails);s&&this.handleContextMenu(t,s,this.props.secondaryGantt.onContextMenu)}},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.secondaryGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.secondaryGantt.initialScrollY,readOnly:this.props.secondaryGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.secondaryGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.secondaryGantt.onClick,ganttOnDblClick:this.props.secondaryGantt.onDblClick,ganttonOnContextMenu:this.props.secondaryGantt.onContextMenu,label:this.props.secondaryGantt.title,scrollableTaskList:this.props.scrollableTaskList}))))}get rootElement(){return s(this)}static get watchers(){return{props:["mainGanttChangeHandler"],timeUnit:["updateDisplayedDates"],mainGanttDoubleView:["updateDisplayedDates"],"props.preStepsCount":["updateDisplayedDates"],viewDate:["updateDisplayedDates"],currentTasks:["updateTasks"],currentDetails:["updateTasks"]}}};export{p as kup_planner_renderer}
1
+ import{h as t,r as i,d as s}from"./p-710d0a7d.js";import{c as e,a as h,g as a,m as l,b as n,d as o,e as d}from"./p-5f645f29.js";import{e as r,f as c}from"./p-cd3a7d53.js";import{a as u}from"./p-cabebabc.js";import{g as v}from"./p-53af4c87.js";const D=()=>()=>t("div",null),p=class{constructor(t){i(this,t),this.locale="it-IT",this.props=void 0,this.timeUnit=void 0,this.currentTasks=[],this.currentDetails=[],this.scrollX=-1,this.mainGanttDoubleView=!1,this.displayedDates={displayedStartDate:new Date,displayedEndDate:new Date},this.viewDate=void 0,this.projection=void 0,this.tasks=[],this.details=[]}mainGanttChangeHandler(){var t;this.currentTasks=this.props.mainGantt.items,this.currentDetails=null===(t=this.props.secondaryGantt)||void 0===t?void 0:t.items,this.projection=void 0,this.updateTasks()}updateDisplayedDates(){const t=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,this.props.preStepsCount);if(!this.viewDate){const i=new Date;this.viewDate=t.displayedStartDate<=i&&t.displayedEndDate>=i?i:t.displayedStartDate}}updateTasks(){var t,i;const s=new u;this.tasks=[];for(let i=0;i<(null===(t=this.currentTasks)||void 0===t?void 0:t.length);i++)this.tasks.push(...h(this.currentTasks[i],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)));this.details=[];for(let t=0;t<(null===(i=this.currentDetails)||void 0===i?void 0:i.length);t++)this.details.push(...h(this.currentDetails[t],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)))}componentWillLoad(){var t,i,s,h,a,l,n,o,d,r,c;this.timeUnit=null===(t=this.props)||void 0===t?void 0:t.viewMode,this.currentTasks=(null===(i=this.props)||void 0===i?void 0:i.mainGantt.items)||[],this.currentDetails=null===(h=null===(s=this.props)||void 0===s?void 0:s.secondaryGantt)||void 0===h?void 0:h.items,this.scrollX=null!==(n=null===(l=null===(a=this.props)||void 0===a?void 0:a.mainGantt)||void 0===l?void 0:l.initialScrollX)&&void 0!==n?n:-1,this.mainGanttDoubleView=null!==(r=null===(d=null===(o=this.props)||void 0===o?void 0:o.mainGantt)||void 0===d?void 0:d.showSecondaryDates)&&void 0!==r&&r,this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(c=this.props)||void 0===c?void 0:c.preStepsCount),this.viewDate=void 0,this.projection=void 0,this.updateTasks()}async refresh(){var t;this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(t=this.props)||void 0===t?void 0:t.preStepsCount)}handleClick(t,i){if(t){if("task"===t.type&&this.props.secondaryGantt){const i=t;this.projection={start:new Date(i.startDate),end:new Date(i.endDate),color:i.color||"#ED7D31"}}else this.projection=void 0;null==i||i(t)}}handleDblClick(t,i){t&&(null==i||i(t))}handleContextMenu(t,i,s){if(i){if("task"===i.type&&this.props.secondaryGantt){const t=i;this.projection={start:new Date(t.startDate),end:new Date(t.endDate),color:t.color||"#ED7D31"}}else this.projection=void 0;null==s||s(t,i)}}handleSetDoubleView(t){var i,s;this.mainGanttDoubleView=t,null===(s=null===(i=this.props)||void 0===i?void 0:i.onSetDoubleView)||void 0===s||s.call(i,t)}handleDateChange(t,i,s){var e;const h=null==t?void 0:t.id;if(!h)return;let d=n(h,i);if(d||(d=a(h,i)),d)if("timeline"!==d.type){if("project"===d.type){const s=l(i,t);d=n(d.id,s),this.viewDate=t.start,this.currentTasks=s}else if("task"===d.type){const s=i.find((t=>{var i;return null===(i=t.phases)||void 0===i?void 0:i.some((t=>(null==t?void 0:t.id)===h))}));if(s){const h=o(s.phases,t),l=i.map((t=>t.id===s.id?Object.assign(Object.assign({},t),{phases:h}):t));d=a(d.id,l),this.props.secondaryGantt&&d&&(this.projection={start:new Date(d.startDate),end:new Date(d.endDate),color:null!==(e=d.color)&&void 0!==e?e:"#ED7D31"}),this.viewDate=t.start,this.currentTasks=l}}null==s||s(d),setTimeout(this.getScrollX,500)}else console.log("onDateChange for timeline not managed yet",h,d.type)}handlePhaseDrop(t,i,s,e){let h;const l=this.currentTasks,n=l.find((t=>{var s;return null===(s=t.phases)||void 0===s?void 0:s.some((t=>(null==t?void 0:t.id)===i.id))}));if(n){const t=o(n.phases,i),s=l.map((i=>i.id===n.id?Object.assign(Object.assign({},i),{phases:t}):i));h=a(i.id,s)}null==h||delete h.taskRow,null==e||e({originalPhaseData:t,finalPhaseData:h,destinationData:s}),this.currentTasks=JSON.parse(JSON.stringify(this.currentTasks)),setTimeout(this.getScrollX,500)}getScrollX(){var t,i,s;if(this.rootElement){const e=null===(t=this.rootElement.querySelector('[data-scrollx="true"]'))||void 0===t?void 0:t.scrollLeft;void 0!==e&&(null===(s=(i=this.props).onScrollX)||void 0===s||s.call(i,e))}}render(){var i,s,e;return t("div",{key:"4adfab49f4c2bca86e0ccbcfead3c77c066b6373",class:"planner-render"},t("kup-switcher",{key:"3158e7704632527e3ece4af578ee4b112fbfba54",timeUnitChange:t=>{var i,s;null===(s=(i=this.props).onSetViewMode)||void 0===s||s.call(i,t),this.timeUnit=t,this.viewDate=void 0,this.scrollX=-1}}),this.props&&t("div",{key:"158a9bc23b1a40debf98d4a59b35dd2657688245",style:{display:"flex",flexDirection:"column"}},t("kup-gantt",Object.assign({ref:t=>this.mainGantt=t,ganttId:r,key:r,filter:this.props.mainGantt.filter,hideLabel:this.props.mainGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.mainGantt.hideDependencies,ganttHeight:this.props.mainGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.tasks,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.mainGantt.stylingOptions,{TaskListHeader:this.props.mainGantt.taskListHeaderProject,TaskListTable:this.props.mainGantt.taskListTableProject,TooltipContent:null!==(i=this.props.mainGantt.tooltipContent)&&void 0!==i?i:D(),barClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleClick(i,this.props.mainGantt.onClick)},barDblClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleDblClick(i,this.props.mainGantt.onDblClick)},barContextMenu:(t,i)=>{let s=n(i.id,this.currentTasks);s||(s=a(i.id,this.currentTasks)),s&&this.handleContextMenu(t,s,this.props.mainGantt.onContextMenu)},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.mainGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.mainGantt.initialScrollY,readOnly:this.props.mainGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.mainGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.mainGantt.onClick,ganttOnDblClick:this.props.mainGantt.onDblClick,ganttonOnContextMenu:this.props.mainGantt.onContextMenu,label:this.props.mainGantt.title,doubleView:null!==(s=this.mainGanttDoubleView)&&void 0!==s&&s,setDoubleView:this.handleSetDoubleView.bind(this),scrollableTaskList:this.props.scrollableTaskList,phaseDrop:(t,i,s,e)=>{const h=a(t.id,this.currentTasks);n(i.id,this.currentTasks),a(s.id,this.currentTasks);const l=n(e.id,this.currentTasks);this.handlePhaseDrop(h,s,l,this.props.mainGantt.onPhaseDrop)}})),this.props.secondaryGantt&&t("kup-gantt",Object.assign({ref:t=>this.secondaryGantt=t,ganttId:c,key:c,filter:this.props.secondaryGantt.filter,hideLabel:this.props.secondaryGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.secondaryGantt.hideDependencies,ganttHeight:this.props.secondaryGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.details,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.secondaryGantt.stylingOptions,{TaskListHeader:this.props.secondaryGantt.taskListHeaderProject,TaskListTable:this.props.secondaryGantt.taskListTableProject,TooltipContent:null!==(e=this.props.secondaryGantt.tooltipContent)&&void 0!==e?e:D(),projection:this.projection,barClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleClick(i,this.props.secondaryGantt.onClick)}},barDblClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleDblClick(i,this.props.secondaryGantt.onDblClick)}},barContextMenu:(t,i)=>{if(this.props.secondaryGantt){let s=n(i.id,this.currentDetails);s&&this.handleContextMenu(t,s,this.props.secondaryGantt.onContextMenu)}},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.secondaryGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.secondaryGantt.initialScrollY,readOnly:this.props.secondaryGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.secondaryGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.secondaryGantt.onClick,ganttOnDblClick:this.props.secondaryGantt.onDblClick,ganttonOnContextMenu:this.props.secondaryGantt.onContextMenu,label:this.props.secondaryGantt.title,scrollableTaskList:this.props.scrollableTaskList}))))}get rootElement(){return s(this)}static get watchers(){return{props:["mainGanttChangeHandler"],timeUnit:["updateDisplayedDates"],mainGanttDoubleView:["updateDisplayedDates"],"props.preStepsCount":["updateDisplayedDates"],viewDate:["updateDisplayedDates"],currentTasks:["updateTasks"],currentDetails:["updateTasks"]}}};export{p as kup_planner_renderer}
@@ -0,0 +1 @@
1
+ import{r as t,f as i,h as e,H as a,d as o}from"./p-710d0a7d.js";import{k as s,g as n,s as l,b as p,h as c,aE as h,W as r,aF as f,_ as u,f as d}from"./p-d629f411.js";import{a as b}from"./p-e3062c19.js";import{F as g}from"./p-cc9db65d.js";import{c as m}from"./p-635bb4b3.js";import"./p-cabebabc.js";var k,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(k||(k={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=s(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return n(this,k,t)}async refresh(){i(this)}async setProps(t){l(this,k,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(p.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],a={};if(this.display===x.JSON)a.initialValue=this.data?JSON.stringify(this.data,null,2):"",a.textArea=!0,i.push(e("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:a.data=this.data,i.push(e("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data,i.push(e("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data,i.push(e("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data,a.series=[],a.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==a.axis?a.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):a.axis=i.name}0===a.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",c.WARNING),a.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",c.WARNING),i.push(e(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},a)));break;case x.DATATABLE:a.data=this.data,a.autoFillMissingCells=!0,i.push(e("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data,i.push(e("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",c.ERROR)}else i.push(e("div",{class:"empty"},e(g,{sizeY:"100px",resource:"move_to_inbox"}),e("div",{class:"empty-text"},this.kupManager.language.translate(p.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),e=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(e&&e.name?i.columns?this.data.columns.find((t=>t.name===e.name))||i.columns.push(e):i.columns=[e]:this.kupManager.debug.logMessage(this,"Invalid column received.",c.WARNING),a&&(i.rows?i.rows.push(a):i.rows=[a]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${r}],[${f}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{key:"96bc321a64aa0a9e6417b00d4bd7cf71ee36c25e"},e("style",{key:"780a3af31a76675bfb07828a091d71cf56e8a509"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"d0183168806b3ca3f7ea8bd0bb0d1db30b5fc555",id:m},e("div",{key:"994608cae130b6677fe0e6b99e6c99efae978ae7",class:"magic-box-wrapper"},e("div",{key:"2376551f8ebdae9a66cbbd5cfe96a0d0e7210c7e",class:"actions",id:"drag-handle"},e("kup-combobox",Object.assign({key:"4f47e24e91bfbba12127bbf0a841d07bca70e7c8"},this.comboboxProps())),e("kup-button",{key:"bc4bf26823b9d7dd79e7e22317be992553f8ce58",styling:b.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),e("kup-button",{key:"3b792c14754c92c1b8c78d83d9f91f3dacf2b978",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),e("div",{key:"821ce2b50c3c7d3f66d7d7088760f9ec05388bcb",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
@@ -0,0 +1,16 @@
1
+ import{r as t,h as i,F as e}from"./p-710d0a7d.js";import{a as s,c as o}from"./p-cabebabc.js";import{d as n,i as a,g as r,h as l}from"./p-008bdcdc.js";import{d as h,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:"05fe55f4c82048fb05af97503d62002b148959b8",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"cf9b43eba6135bc3ca160cb5f2a242c56d8f9d26",class:"title"},i("span",{key:"c153259b75a22b1f9696bb33501a5846c4462705"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"4ff3c8a080db82d55b055143ea2aa04889784b3c",class:"toggler"},i("label",{key:"9a80e920593b91e76952492fd729c36695a879cb",htmlFor:"ch2",class:"switch"},i("input",{key:"0c2e763afe9aa771d08f1e105fb8d4a3bcb4acda",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"6d9476b473c7f99747bd7babffc5594a2668b3d5",class:"slider"})),i("span",{key:"7910f25dc048046ec7d62191729ad6279509c45e",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:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.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(){var t;const o=new s,a={};this.scrollableTaskList&&(a.width=this.rowWidth);const r=this.tasks&&this.tasks.length>0&&(null===(t=this.tasks.reduce(((t,i)=>{var e,s;return(null===(e=t.valuesToShow)||void 0===e?void 0:e.length)>(null===(s=i.valuesToShow)||void 0===s?void 0:s.length)?t:i})).valuesToShow)||void 0===t?void 0:t.length)+1||1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:a},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((t=>{var s,a,l,h;return i(e,null,"project"===t.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${t.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(t.id),this.onclickTaskList(t.id)},onDblClick:()=>{this.setSelectedTask(t.id),this.ondblclickTaskList(t.id)},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},null===(s=t.valuesToShow)||void 0===s?void 0:s.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`task_${t.id}_valuesToShow_${s}`},"#START#"===e?o.formatToLocaleSimple(t.start):"#END#"===e?o.formatToLocaleSimple(t.end):e))),this.scrollableTaskList&&r>t.valuesToShow.length&&n(r-t.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===t.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${t.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(t.id),this.onclickTaskList(t.id)},onDblClick:()=>{this.setSelectedTask(t.id),this.ondblclickTaskList(t.id)},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${t.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(a=t.styles)||void 0===a?void 0:a.backgroundColor}})):i("span",{key:`phase_${t.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(l=t.styles)||void 0===l?void 0:l.backgroundColor}}),null===(h=t.valuesToShow)||void 0===h?void 0:h.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`phase_${t.id}_valuesToShow_${s}`},"#START#"===e?o.formatToLocaleSimple(t.start):"#END#"===e?o.formatToLocaleSimple(t.end):e))),this.scrollableTaskList&&r>t.valuesToShow.length&&n(r-t.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var e;let s="";for(let i=0;i<t.valuesToShow.length;i++)s+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":s},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},null===(e=t.valuesToShow)||void 0===e?void 0:e.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`detail_${t.id}_valuesToShow_${s}`},e))))})())}))))}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:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.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:var(--kup-heading-compact-01-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:var(--kup-label-01-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:var(--kup-heading-compact-01-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):h.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):h.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):h.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):h.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):h.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 l="";0!==a&&r.getMonth()===n[a-1].getMonth()||(l=this.formatMonthAndYear(r));const h=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},h)),l&&(a!==n.length-1&&t.push({key:l,value:l,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:"c765e49e692a71ec43818ce63524efdee34266cd",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"3871d055cac5ed5f5221ed46d5ba68969a01122e",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"58c137843542dff4c59e1e644e97a0e1750c2798",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:"aa79deb0c3c3c527fef28d58b393974cb49478b5",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:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,k,m,b,w,z={exports:{}};y=z.exports,k=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}(),m=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new k(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,l=void 0===r?0:r,h=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],k=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-k*y,v)}var m=this.loss(o);m<p&&(h=o.slice(0),p=m)}return{values:h,loss:p,called:l}},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
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
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 k(Number(s),Number(o),Number(n))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var l=new m(a,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},i));return w[t]=Object.assign({},l.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}=l(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:h}=this.ganttEvent;if(!(h&&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}=l(p.x,a,h,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(h,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,l,h,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(h,l),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(h,l),class:"barBackground"}),i("rect",{key:"progress bar",x:n,width:a,y:e+g,height:g,ry:r,rx:r,fill:this.getProcessColor(h,l)}))}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(h,l),class:"barBackground"}),i("rect",{x:n,width:a,y:e,height:o,ry:r,rx:r,fill:this.getProcessColor(h,l)}))}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:"cd331e38a3bfe521708720b7d7698fad444188d5",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:"f6b276b494adb6667c7aa6e5c02e2b552947a62d",class:"grid"},i("g",{key:"702509648c233de1729e311a2eb983d8a58f3be2",class:"rows"},e),i("g",{key:"bb64f4ae4e0133c71bbdfbbcbad57377f9ca687f",class:"rowLines"},s),i("g",{key:"ee59f171d392b13f2cc85eac8f04c0a9b948da42",class:"ticks"},n)),i("g",{key:"c37241f61e150e792283cb5cd756a0c8fb34ee49",class:"content"},this.currentDateIndicator&&i("rect",{key:"d0bb9113fbfb1ae90ad92f2ecfbfa7bf26e40fad",fill:this.currentDateIndicator.color,x:this.currentDateIndicator.x+1.5,y:"0",width:"2",height:"100%"}),this.projection&&i("rect",{key:"85eed3a983dcc5c8893e3116382723bbc245355b",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:"2b68ce06a6ef6fb0adef3108ddfa7982b04ce750",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:"6ea58639de19ee18facaafd0a4d1e1b4bc2f0078",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:"a9510bcb7a4c0f27363141bad35976b91a876d9a",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:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.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{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-710d0a7d.js";import{k as o,h as s,g as h,s as l}from"./p-03d049e3.js";import{a as r,F as f}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import"./p-cabebabc.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=r.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){l(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(f,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:"36e226b6216bcf060f775362b80ca2db7a848f18"},e("style",{key:"403a533b3ee961802706c9c804dacf6991b0a80f"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"20d58d63664a938c0791c43ddee20a7703272837",id:c},e("div",{key:"28456e42adbbd778d1448b3d7991318fe226792c",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: var(--kup-label-01-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: var(--kup-heading-compact-01-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: var(--kup-heading-01-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-710d0a7d.js";import{k as o,h as s,g as h,s as l}from"./p-d629f411.js";import{a as f,F as r}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import"./p-cabebabc.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=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(){i(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 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:"29dea3875209182f44b8f5a17663d1aec0dcc536"},e("style",{key:"ac2271a5b915e8045a93f7ad5007fdd5f1742982"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"402702c59a7a6c3365a713a4f6f52bcbcf1bb669",id:c},e("div",{key:"3faff006b6d1497a62bbc3c3df3148a76197c449",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: var(--kup-label-01-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: var(--kup-heading-compact-01-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: var(--kup-heading-01-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 +1 @@
1
- import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-710d0a7d.js";import{k as s,g as l,s as p,h as m,ai as c}from"./p-03d049e3.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-cc9db65d.js";import{s as d}from"./p-da273b4d.js";import"./p-cabebabc.js";var u,g;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sort="Order for sorting"}(u||(u={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(g||(g={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,s()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,u,t)}async refresh(){e(this)}async setProps(t){p(this,u,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.cells.map((t=>n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,t.value))))))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t;if(!e)return k(this,v,"f").debug.logMessage(this,"Empty rows",m.ERROR),[];const n=i.find((t=>k(this,v,"f").objects.isDate(t.obj)&&t.name===this.dateColumn)),a=i.find((t=>k(this,v,"f").objects.isTime(t.obj)&&t.name===this.timeColumn));if(!n&&!a)return k(this,v,"f").debug.logMessage(this,'At least one of "dateColumn" or "timeColumn" must be set and exist in the dataset',m.ERROR),[];const o=this.sort.filter((({column:t})=>i.some((i=>i.name===t)))),r=d(e,o).reduce(((t,e)=>(t[`${n?c(n,e.cells[n.name]):""} ${a?c(a,e.cells[a.name]):""}`.trim()].push({cells:i.filter((t=>t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t)),new Proxy({},{get:(t,i)=>{var e;return null!==(e=t[i])&&void 0!==e?e:t[i]=[]}}));return Object.entries(r).map((([t,i])=>({date:t,activities:i})))},w.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';export{w as kup_activity_timeline}
1
+ import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-710d0a7d.js";import{k as s,g as l,s as p,h as m,ai as c}from"./p-d629f411.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-cc9db65d.js";import{s as d}from"./p-3a118dba.js";import"./p-cabebabc.js";var u,g;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sort="Order for sorting"}(u||(u={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(g||(g={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,s()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,u,t)}async refresh(){e(this)}async setProps(t){p(this,u,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:g.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.cells.map((t=>n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,t.value))))))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t;if(!e)return k(this,v,"f").debug.logMessage(this,"Empty rows",m.ERROR),[];const n=i.find((t=>k(this,v,"f").objects.isDate(t.obj)&&t.name===this.dateColumn)),a=i.find((t=>k(this,v,"f").objects.isTime(t.obj)&&t.name===this.timeColumn));if(!n&&!a)return k(this,v,"f").debug.logMessage(this,'At least one of "dateColumn" or "timeColumn" must be set and exist in the dataset',m.ERROR),[];const o=this.sort.filter((({column:t})=>i.some((i=>i.name===t)))),r=d(e,o).reduce(((t,e)=>(t[`${n?c(n,e.cells[n.name]):""} ${a?c(a,e.cells[a.name]):""}`.trim()].push({cells:i.filter((t=>t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t)),new Proxy({},{get:(t,i)=>{var e;return null!==(e=t[i])&&void 0!==e?e:t[i]=[]}}));return Object.entries(r).map((([t,i])=>({date:t,activities:i})))},w.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';export{w as kup_activity_timeline}
@@ -1 +1 @@
1
- import{r as t,c as i,f as e,h as o,H as n,d as s}from"./p-710d0a7d.js";import{F as a}from"./p-ff735e62.js";import{F as h}from"./p-ef3112d4.js";import{F as l}from"./p-da5d5eea.js";import{F as r}from"./p-7db300e0.js";import{k as c,g as p,s as d,aD as f,b as m,Y as u,h as g}from"./p-03d049e3.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-cc9db65d.js";import"./p-c56195a0.js";import"./p-cabebabc.js";var y;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(y||(y={}));const b=class{constructor(e){t(this,e),this.kupSave=i(this,"kup-dashboard-save",6),this.kupManager=c(),this.internalData=null,this.internalDataBackup=null,this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return p(this,y,t)}async refresh(){e(this)}async setProps(t){d(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(f.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(f.SAVE),onClick:()=>this.onKupSave()};return o("div",{class:"header"},this.enableDesign?o(a,Object.assign({},t)):void 0,this.enableDesign?o(a,Object.assign({},i)):void 0)}buildForm(t,i){return t?o("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:e=>{e&&(e.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):o("div",null,this.kupManager.language.translate(m.EMPTY_DATA))}buildSectionHeader(t,i){const e={value:t.dim,label:this.kupManager.language.translate(f.DIMENSION),onChange:i=>{const{target:e}=i;t.dim=e.value,this.refresh()}},n={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},s={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const e=i.sections.indexOf(t);i.sections.splice(e,1),this.resetData(this.internalData)}},r={checked:t.loaded,label:this.kupManager.language.translate(f.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},c={checked:"column"==t.layout,label:this.kupManager.language.translate(f.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return o("div",{class:"section-header"},o("div",null,t.id," - ",t.layout),o("div",null,o("div",{class:"section-header-actions"},o(l,Object.assign({},e)),o(h,Object.assign({},r)),o(h,Object.assign({},c)),o(a,Object.assign({},n)),o(a,Object.assign({},s)))))}buildSection(t,i){const e={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return o("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:e=>{e&&(e.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,o("div",{class:e,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:o("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}calcSectionPosition(t,i,e,o,n){let s=o;for(let o=0;o<n.length;o++){const a=n[o].getBoundingClientRect();if(e&&t<a.y){s=o;break}if(!e&&i<a.x){s=o;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,u.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder(),this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,e){if(e.kupData.form){const o=this.calcSectionPosition(t,i,"column"==e.kupData.form.layout,e.kupData.form.sections.length,e.children);this.setSectionPlaceHolder(e,o)}else if(e.kupData.section){const o=this.calcSectionPosition(t,i,"column"==e.kupData.section.layout,e.kupData.section.sections.length,e.lastElementChild.children);this.setSectionPlaceHolder(e.lastElementChild,o)}}dropped(t,i,e){const o=e.kupData.parent.sections.indexOf(e.kupData.section);if(e.kupData.parent.sections.splice(o,1),i.kupData.form){i.kupData.form.sections||(i.kupData.form.sections=[]);const o=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.form.layout,i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(o,0,e.kupData.section),e.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||0==i.kupData.section.sections.length){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null,e.kupData.section.dim=null,i.kupData.section.id=this.buildGuid(),i.kupData.section.sections=[],i.kupData.section.sections.push(t)}const o=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.section.layout,i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(o,0,e.kupData.section),e.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let e="";t.sections.forEach((t=>{e+=this.enableDesign||!t.dim?" 1fr":t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim})),"column"==t.layout&&(i.gridTemplateRows=e),"row"==t.layout&&(i.gridTemplateColumns=e)}return i}setSectionPlaceHolder(t,i){const e=document.createElement("div");e.className="section-placeholder",t.insertBefore(e,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");t&&t.parentElement.removeChild(t)}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{r(t)}))}this.didRenderInteractables()}render(){return o(n,{key:"4eeedc0ad554daddc9ea694235fd2447c632bc7d"},o("style",{key:"6b23b56624367d6d9b0ddde03b052b3a4417dac6"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"fca3b317ae2101b41ad6a30eb124e012add64504",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};b.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{b as kup_dashboard}
1
+ import{r as t,c as i,f as e,h as o,H as n,d as s}from"./p-710d0a7d.js";import{F as a}from"./p-ff735e62.js";import{F as h}from"./p-ef3112d4.js";import{F as l}from"./p-99f280d4.js";import{F as r}from"./p-7db300e0.js";import{k as c,g as p,s as d,aD as f,b as m,Y as u,h as g}from"./p-d629f411.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-cc9db65d.js";import"./p-c56195a0.js";import"./p-cabebabc.js";var y;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(y||(y={}));const b=class{constructor(e){t(this,e),this.kupSave=i(this,"kup-dashboard-save",6),this.kupManager=c(),this.internalData=null,this.internalDataBackup=null,this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return p(this,y,t)}async refresh(){e(this)}async setProps(t){d(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(f.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(f.SAVE),onClick:()=>this.onKupSave()};return o("div",{class:"header"},this.enableDesign?o(a,Object.assign({},t)):void 0,this.enableDesign?o(a,Object.assign({},i)):void 0)}buildForm(t,i){return t?o("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:e=>{e&&(e.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):o("div",null,this.kupManager.language.translate(m.EMPTY_DATA))}buildSectionHeader(t,i){const e={value:t.dim,label:this.kupManager.language.translate(f.DIMENSION),onChange:i=>{const{target:e}=i;t.dim=e.value,this.refresh()}},n={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},s={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const e=i.sections.indexOf(t);i.sections.splice(e,1),this.resetData(this.internalData)}},r={checked:t.loaded,label:this.kupManager.language.translate(f.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},c={checked:"column"==t.layout,label:this.kupManager.language.translate(f.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return o("div",{class:"section-header"},o("div",null,t.id," - ",t.layout),o("div",null,o("div",{class:"section-header-actions"},o(l,Object.assign({},e)),o(h,Object.assign({},r)),o(h,Object.assign({},c)),o(a,Object.assign({},n)),o(a,Object.assign({},s)))))}buildSection(t,i){const e={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return o("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:e=>{e&&(e.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,o("div",{class:e,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:o("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}calcSectionPosition(t,i,e,o,n){let s=o;for(let o=0;o<n.length;o++){const a=n[o].getBoundingClientRect();if(e&&t<a.y){s=o;break}if(!e&&i<a.x){s=o;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,u.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder(),this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,e){if(e.kupData.form){const o=this.calcSectionPosition(t,i,"column"==e.kupData.form.layout,e.kupData.form.sections.length,e.children);this.setSectionPlaceHolder(e,o)}else if(e.kupData.section){const o=this.calcSectionPosition(t,i,"column"==e.kupData.section.layout,e.kupData.section.sections.length,e.lastElementChild.children);this.setSectionPlaceHolder(e.lastElementChild,o)}}dropped(t,i,e){const o=e.kupData.parent.sections.indexOf(e.kupData.section);if(e.kupData.parent.sections.splice(o,1),i.kupData.form){i.kupData.form.sections||(i.kupData.form.sections=[]);const o=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.form.layout,i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(o,0,e.kupData.section),e.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||0==i.kupData.section.sections.length){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null,e.kupData.section.dim=null,i.kupData.section.id=this.buildGuid(),i.kupData.section.sections=[],i.kupData.section.sections.push(t)}const o=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.section.layout,i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(o,0,e.kupData.section),e.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let e="";t.sections.forEach((t=>{e+=this.enableDesign||!t.dim?" 1fr":t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim})),"column"==t.layout&&(i.gridTemplateRows=e),"row"==t.layout&&(i.gridTemplateColumns=e)}return i}setSectionPlaceHolder(t,i){const e=document.createElement("div");e.className="section-placeholder",t.insertBefore(e,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");t&&t.parentElement.removeChild(t)}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{r(t)}))}this.didRenderInteractables()}render(){return o(n,{key:"2a5f7d91b832041e5c68460409f8723bcae04c25"},o("style",{key:"00165eccb43eb45e9519e50ae383b6f237b6d293"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"66a90a4032f46aec89e48e2e8c3c95d948dee416",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};b.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{b as kup_dashboard}
@@ -1 +1 @@
1
- import{r as t,f as s,h as i,H as e,d as h}from"./p-710d0a7d.js";import{k as o}from"./p-03d049e3.js";import{c as l}from"./p-635bb4b3.js";import"./p-cabebabc.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(e,{key:"134329eea6b6b3ab8103291c442eaebd750007f2"},t?i("style",null,t):null,i("div",{key:"e960f26058b67e1d2e28ce2950ed85a04b790dad",id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};export{n as kup_probe}
1
+ import{r as t,f as s,h as i,H as e,d as h}from"./p-710d0a7d.js";import{k as o}from"./p-d629f411.js";import{c as l}from"./p-635bb4b3.js";import"./p-cabebabc.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(e,{key:"846f522d02162f03df0f6cfa3a8337e2e57bd8aa"},t?i("style",null,t):null,i("div",{key:"7e19f10c1459753b0898e047abe073e31dfdb7e7",id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};export{n as kup_probe}