@sme.up/ketchup 11.0.0-SNAPSHOT-20241021152842 → 11.0.0-SNAPSHOT-20241022141548

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 (178) hide show
  1. package/dist/cjs/{f-cell-5272e2de.js → f-cell-f4161c96.js} +8 -4
  2. package/dist/cjs/f-cell-f4161c96.js.map +1 -0
  3. package/dist/cjs/{f-chip-ff8a106d.js → f-chip-cb102c29.js} +2 -2
  4. package/dist/cjs/{f-chip-ff8a106d.js.map → f-chip-cb102c29.js.map} +1 -1
  5. package/dist/cjs/{f-paginator-utils-bed2036b.js → f-paginator-utils-da6cd873.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-bed2036b.js.map → f-paginator-utils-da6cd873.js.map} +1 -1
  7. package/dist/cjs/{f-text-field-efb2710c.js → f-text-field-a8db3416.js} +2 -2
  8. package/dist/cjs/{f-text-field-efb2710c.js.map → f-text-field-a8db3416.js.map} +1 -1
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  12. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +6 -6
  13. package/dist/cjs/kup-box.cjs.entry.js +6 -6
  14. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  15. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  16. package/dist/cjs/kup-cell.cjs.entry.js +4 -4
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  18. package/dist/cjs/{kup-data-table-helper-7195d292.js → kup-data-table-helper-ecda1d0f.js} +2 -2
  19. package/dist/cjs/{kup-data-table-helper-7195d292.js.map → kup-data-table-helper-ecda1d0f.js.map} +1 -1
  20. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
  27. package/dist/cjs/kup-input-panel.cjs.entry.js +13 -6
  28. package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
  29. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  30. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  31. package/dist/cjs/{kup-manager-17968474.js → kup-manager-3e7452e3.js} +7 -1
  32. package/dist/cjs/kup-manager-3e7452e3.js.map +1 -0
  33. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  34. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  35. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  37. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  38. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  39. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  40. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  41. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  42. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  43. package/dist/collection/components/kup-input-panel/kup-input-panel.js +9 -2
  44. package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
  45. package/dist/collection/f-components/f-cell/f-cell-declarations.js +4 -0
  46. package/dist/collection/f-components/f-cell/f-cell-declarations.js.map +1 -1
  47. package/dist/collection/f-components/f-cell/f-cell.js +4 -0
  48. package/dist/collection/f-components/f-cell/f-cell.js.map +1 -1
  49. package/dist/collection/managers/kup-data/kup-data.js +2 -0
  50. package/dist/collection/managers/kup-data/kup-data.js.map +1 -1
  51. package/dist/components/kup-autocomplete2.js +4 -0
  52. package/dist/components/kup-autocomplete2.js.map +1 -1
  53. package/dist/components/kup-input-panel.js +9 -2
  54. package/dist/components/kup-input-panel.js.map +1 -1
  55. package/dist/components/kup-manager.js +6 -0
  56. package/dist/components/kup-manager.js.map +1 -1
  57. package/dist/esm/{f-cell-3cb0880d.js → f-cell-f16081a9.js} +8 -4
  58. package/dist/esm/{f-cell-3cb0880d.js.map → f-cell-f16081a9.js.map} +1 -1
  59. package/dist/esm/{f-chip-430788ed.js → f-chip-d387922c.js} +2 -2
  60. package/dist/esm/{f-chip-430788ed.js.map → f-chip-d387922c.js.map} +1 -1
  61. package/dist/esm/{f-paginator-utils-af689207.js → f-paginator-utils-6293bfa7.js} +2 -2
  62. package/dist/esm/{f-paginator-utils-af689207.js.map → f-paginator-utils-6293bfa7.js.map} +1 -1
  63. package/dist/esm/{f-text-field-b294c1bd.js → f-text-field-7025d96d.js} +2 -2
  64. package/dist/esm/{f-text-field-b294c1bd.js.map → f-text-field-7025d96d.js.map} +1 -1
  65. package/dist/esm/index.js +1 -1
  66. package/dist/esm/kup-accordion.entry.js +1 -1
  67. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  68. package/dist/esm/kup-autocomplete_27.entry.js +6 -6
  69. package/dist/esm/kup-box.entry.js +6 -6
  70. package/dist/esm/kup-calendar.entry.js +2 -2
  71. package/dist/esm/kup-card-list.entry.js +1 -1
  72. package/dist/esm/kup-cell.entry.js +4 -4
  73. package/dist/esm/kup-dashboard.entry.js +2 -2
  74. package/dist/esm/{kup-data-table-helper-62971b64.js → kup-data-table-helper-db8e4ccb.js} +2 -2
  75. package/dist/esm/{kup-data-table-helper-62971b64.js.map → kup-data-table-helper-db8e4ccb.js.map} +1 -1
  76. package/dist/esm/kup-drawer.entry.js +1 -1
  77. package/dist/esm/kup-echart.entry.js +1 -1
  78. package/dist/esm/kup-editor.entry.js +1 -1
  79. package/dist/esm/kup-family-tree.entry.js +1 -1
  80. package/dist/esm/kup-grid.entry.js +1 -1
  81. package/dist/esm/kup-iframe.entry.js +1 -1
  82. package/dist/esm/kup-image-list.entry.js +4 -4
  83. package/dist/esm/kup-input-panel.entry.js +13 -6
  84. package/dist/esm/kup-input-panel.entry.js.map +1 -1
  85. package/dist/esm/kup-lazy.entry.js +1 -1
  86. package/dist/esm/kup-magic-box.entry.js +1 -1
  87. package/dist/esm/{kup-manager-11e9e4eb.js → kup-manager-30b785c0.js} +7 -1
  88. package/dist/esm/kup-manager-30b785c0.js.map +1 -0
  89. package/dist/esm/kup-nav-bar.entry.js +1 -1
  90. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  91. package/dist/esm/kup-pdf.entry.js +1 -1
  92. package/dist/esm/kup-photo-frame.entry.js +1 -1
  93. package/dist/esm/kup-planner.entry.js +2 -2
  94. package/dist/esm/kup-probe.entry.js +1 -1
  95. package/dist/esm/kup-qlik.entry.js +1 -1
  96. package/dist/esm/kup-snackbar.entry.js +1 -1
  97. package/dist/esm/kup-typography-list.entry.js +1 -1
  98. package/dist/esm/kup-typography.entry.js +1 -1
  99. package/dist/ketchup/index.esm.js +1 -1
  100. package/dist/ketchup/ketchup.esm.js +1 -1
  101. package/dist/ketchup/{p-4c05394a.entry.js → p-0a09fd0b.entry.js} +2 -2
  102. package/dist/ketchup/{p-529632c9.entry.js → p-0bbc107a.entry.js} +2 -2
  103. package/dist/ketchup/{p-56b44f04.js → p-1d215391.js} +2 -2
  104. package/dist/ketchup/p-1d215391.js.map +1 -0
  105. package/dist/ketchup/{p-bf1b9843.entry.js → p-255b0de9.entry.js} +2 -2
  106. package/dist/ketchup/{p-b2bf0eab.entry.js → p-261fa958.entry.js} +2 -2
  107. package/dist/ketchup/{p-1c22c2cd.entry.js → p-289f3508.entry.js} +2 -2
  108. package/dist/ketchup/{p-d80192a9.js → p-3c73ab2d.js} +2 -2
  109. package/dist/ketchup/{p-745037f2.entry.js → p-404ce351.entry.js} +2 -2
  110. package/dist/ketchup/{p-08887d7c.entry.js → p-41a62cd8.entry.js} +2 -2
  111. package/dist/ketchup/p-495b4a15.entry.js +2 -0
  112. package/dist/ketchup/p-495b4a15.entry.js.map +1 -0
  113. package/dist/ketchup/{p-8412389c.entry.js → p-4e4d469f.entry.js} +2 -2
  114. package/dist/ketchup/{p-a2f84ab4.entry.js → p-5017319c.entry.js} +2 -2
  115. package/dist/ketchup/{p-c5ef1391.entry.js → p-5ff0df56.entry.js} +2 -2
  116. package/dist/ketchup/{p-9fcf4425.entry.js → p-6827385d.entry.js} +2 -2
  117. package/dist/ketchup/{p-7c623aa3.entry.js → p-6b7764d0.entry.js} +2 -2
  118. package/dist/ketchup/{p-c315790c.js → p-71c0ab9e.js} +2 -2
  119. package/dist/ketchup/{p-16f61690.entry.js → p-7e35e20a.entry.js} +2 -2
  120. package/dist/ketchup/{p-0c11594e.js → p-81406670.js} +2 -2
  121. package/dist/ketchup/{p-9524e01d.entry.js → p-83b0aa2f.entry.js} +2 -2
  122. package/dist/ketchup/{p-bf7e2ff2.entry.js → p-861aa7c8.entry.js} +2 -2
  123. package/dist/ketchup/{p-188edcd5.entry.js → p-9a4c7853.entry.js} +2 -2
  124. package/dist/ketchup/{p-ed3c5848.entry.js → p-9bddff6e.entry.js} +2 -2
  125. package/dist/ketchup/{p-97439fd2.entry.js → p-9e329edc.entry.js} +2 -2
  126. package/dist/ketchup/{p-4ffbef91.entry.js → p-a0403a79.entry.js} +2 -2
  127. package/dist/ketchup/{p-0f20e19f.entry.js → p-abd36410.entry.js} +2 -2
  128. package/dist/ketchup/{p-d4c15514.entry.js → p-abe9af22.entry.js} +2 -2
  129. package/dist/ketchup/{p-22441167.entry.js → p-aefb781c.entry.js} +2 -2
  130. package/dist/ketchup/{p-659307e0.entry.js → p-b08664a5.entry.js} +2 -2
  131. package/dist/ketchup/p-b4c093c6.js +2 -0
  132. package/dist/ketchup/p-b4c093c6.js.map +1 -0
  133. package/dist/ketchup/{p-f9367d09.entry.js → p-c1541eb5.entry.js} +2 -2
  134. package/dist/ketchup/{p-8fe82d0e.entry.js → p-c9415b33.entry.js} +2 -2
  135. package/dist/ketchup/{p-6415175b.js → p-d46f8700.js} +2 -2
  136. package/dist/ketchup/{p-b65b747c.entry.js → p-f4b7d710.entry.js} +2 -2
  137. package/dist/ketchup/{p-21c0de7e.entry.js → p-fe21f352.entry.js} +2 -2
  138. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -0
  139. package/package.json +1 -1
  140. package/dist/cjs/f-cell-5272e2de.js.map +0 -1
  141. package/dist/cjs/kup-manager-17968474.js.map +0 -1
  142. package/dist/esm/kup-manager-11e9e4eb.js.map +0 -1
  143. package/dist/ketchup/p-56b44f04.js.map +0 -1
  144. package/dist/ketchup/p-771d6f8b.entry.js +0 -2
  145. package/dist/ketchup/p-771d6f8b.entry.js.map +0 -1
  146. package/dist/ketchup/p-80896d21.js +0 -2
  147. package/dist/ketchup/p-80896d21.js.map +0 -1
  148. /package/dist/ketchup/{p-4c05394a.entry.js.map → p-0a09fd0b.entry.js.map} +0 -0
  149. /package/dist/ketchup/{p-529632c9.entry.js.map → p-0bbc107a.entry.js.map} +0 -0
  150. /package/dist/ketchup/{p-bf1b9843.entry.js.map → p-255b0de9.entry.js.map} +0 -0
  151. /package/dist/ketchup/{p-b2bf0eab.entry.js.map → p-261fa958.entry.js.map} +0 -0
  152. /package/dist/ketchup/{p-1c22c2cd.entry.js.map → p-289f3508.entry.js.map} +0 -0
  153. /package/dist/ketchup/{p-d80192a9.js.map → p-3c73ab2d.js.map} +0 -0
  154. /package/dist/ketchup/{p-745037f2.entry.js.map → p-404ce351.entry.js.map} +0 -0
  155. /package/dist/ketchup/{p-08887d7c.entry.js.map → p-41a62cd8.entry.js.map} +0 -0
  156. /package/dist/ketchup/{p-8412389c.entry.js.map → p-4e4d469f.entry.js.map} +0 -0
  157. /package/dist/ketchup/{p-a2f84ab4.entry.js.map → p-5017319c.entry.js.map} +0 -0
  158. /package/dist/ketchup/{p-c5ef1391.entry.js.map → p-5ff0df56.entry.js.map} +0 -0
  159. /package/dist/ketchup/{p-9fcf4425.entry.js.map → p-6827385d.entry.js.map} +0 -0
  160. /package/dist/ketchup/{p-7c623aa3.entry.js.map → p-6b7764d0.entry.js.map} +0 -0
  161. /package/dist/ketchup/{p-c315790c.js.map → p-71c0ab9e.js.map} +0 -0
  162. /package/dist/ketchup/{p-16f61690.entry.js.map → p-7e35e20a.entry.js.map} +0 -0
  163. /package/dist/ketchup/{p-0c11594e.js.map → p-81406670.js.map} +0 -0
  164. /package/dist/ketchup/{p-9524e01d.entry.js.map → p-83b0aa2f.entry.js.map} +0 -0
  165. /package/dist/ketchup/{p-bf7e2ff2.entry.js.map → p-861aa7c8.entry.js.map} +0 -0
  166. /package/dist/ketchup/{p-188edcd5.entry.js.map → p-9a4c7853.entry.js.map} +0 -0
  167. /package/dist/ketchup/{p-ed3c5848.entry.js.map → p-9bddff6e.entry.js.map} +0 -0
  168. /package/dist/ketchup/{p-97439fd2.entry.js.map → p-9e329edc.entry.js.map} +0 -0
  169. /package/dist/ketchup/{p-4ffbef91.entry.js.map → p-a0403a79.entry.js.map} +0 -0
  170. /package/dist/ketchup/{p-0f20e19f.entry.js.map → p-abd36410.entry.js.map} +0 -0
  171. /package/dist/ketchup/{p-d4c15514.entry.js.map → p-abe9af22.entry.js.map} +0 -0
  172. /package/dist/ketchup/{p-22441167.entry.js.map → p-aefb781c.entry.js.map} +0 -0
  173. /package/dist/ketchup/{p-659307e0.entry.js.map → p-b08664a5.entry.js.map} +0 -0
  174. /package/dist/ketchup/{p-f9367d09.entry.js.map → p-c1541eb5.entry.js.map} +0 -0
  175. /package/dist/ketchup/{p-8fe82d0e.entry.js.map → p-c9415b33.entry.js.map} +0 -0
  176. /package/dist/ketchup/{p-6415175b.js.map → p-d46f8700.js.map} +0 -0
  177. /package/dist/ketchup/{p-b65b747c.entry.js.map → p-f4b7d710.entry.js.map} +0 -0
  178. /package/dist/ketchup/{p-21c0de7e.entry.js.map → p-fe21f352.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,f as s,h as e,H as n,d as h,g as o}from"./p-d7c15b0e.js";import{k as a,ae as r,g as f,s as l,b as d,E as u}from"./p-56b44f04.js";import{K as c,d as p,a as m,b as k,c as b}from"./p-cd3a7d53.js";import{c as w}from"./p-635bb4b3.js";import{F as g}from"./p-6415175b.js";import{F as y}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-2b519589.js";import"./p-d4a879fc.js";const v=a();function x(t,i,s,e,n,h,o,a){const r=D(t,i);let f=[];if(s&&e){if(C(s,e)){f=D(s,e)}else{f=[...r]}}let l=[];if(n&&h){if(z(n,h)){l=S(n,h)}else{f=[...r]}}let d=[];if(o&&a){if(z(o,a)){d=S(o,a)}else{f=[...r]}}return{dateValues:r,secDateValues:f,hourValues:l,secHourValues:d}}function D(t,i){let s=[t.value,i.value];if(j(t)&&j(i)){return s}else if(j(t)){return[t.value,t.value]}else if(j(i)){return[i.value,i.value]}else{return s}}function S(t,i){let s=[t.value,i.value];if(O(t)&&O(i)){return s}else if(O(t)){return[t.value,t.value]}else if(O(i)){return[i.value,i.value]}else{return s}}function j(t){return v.objects.isDate(t.obj)&&v.dates.isIsoDate(t.value)}function O(t){return v.objects.isTime(t.obj)||v.objects.isTimeWithSeconds(t.obj)}function C(t,i){return j(t)||j(i)}function z(t,i){return O(t)||O(i)}function T(t,i,s,e,n,h){let o=()=>n.map((i=>r(e.find((t=>t.name==i)),t.cells[i])));if(h){o=h}const a=(n===null||n===void 0?void 0:n.length)>=2?o():[t.cells[i].value,t.cells[s].value];return a}class E{constructor(){this.showSecondaryDates=false;this.detailFilter="";this.detailInitialScrollX=0;this.detailInitialScrollY=0;this.taskFilter="";this.taskInitialScrollX=0;this.taskInitialScrollY=0;this.viewMode="day"}toDebugString(){return"dt state"}}const H=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}.filter{margin-bottom:var(--kup-space-04)}.planner-render{padding-top:40px}";const M=H;var P=undefined&&undefined.__classPrivateFieldGet||function(t,i,s,e){if(s==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?e:s==="a"?e.call(t):e?e.value:i.get(t)};var W=undefined&&undefined.__classPrivateFieldSet||function(t,i,s,e,n){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?t!==i||!n:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?n.call(t,s):n?n.value=s:i.set(t,s),s};var I,R,V,Y,K,A,G,X,L,F,N,_,q,B,J,Q,U,Z,$,tt,it,st,et,nt;const ht=class{constructor(s){t(this,s);this.kupClick=i(this,"kup-planner-click",6);this.kupDblClick=i(this,"kup-planner-dblclick",6);this.kupDateChange=i(this,"kup-planner-datechange",6);this.kupPhaseDrop=i(this,"kup-planner-phasedrop",6);this.kupReady=i(this,"kup-planner-ready",6);this.kupContextMenu=i(this,"kup-planner-contextmenu",6);this.kupDidUnload=i(this,"kup-planner-didunload",6);I.add(this);this.state=new E;this.plannerRenderer=undefined;R.set(this,a());V.set(this,void 0);Y.set(this,[]);K.set(this,{});A.set(this,void 0);this.stateId="";this.store=undefined;this.customStyle="";this.data=undefined;this.detailData=undefined;this.detailColorCol=undefined;this.detailColumns=undefined;this.detailDates=undefined;this.detailFilter=undefined;this.detailHeight=undefined;this.detailHours=[];this.detailIconCol=undefined;this.detailIdCol=undefined;this.detailNameCol=undefined;this.detailPrevHours=[];this.detailPrevDates=undefined;this.detailInitialScrollX=undefined;this.detailInitialScrollY=undefined;this.listCellWidth="300px";this.maxWidth="90vw";this.phaseColorCol=undefined;this.phaseColumns=undefined;this.phaseColParDep=undefined;this.phaseDates=undefined;this.phaseHours=[];this.phaseIconCol=undefined;this.phaseIdCol=undefined;this.phaseNameCol=undefined;this.phasePrevHours=[];this.phasePrevDates=undefined;this.readOnly=false;this.showSecondaryDates=false;this.taskColumns=undefined;this.taskDates=undefined;this.taskFilter=undefined;this.taskHeight=undefined;this.taskHours=[];this.taskIconCol=undefined;this.taskIdCol=undefined;this.taskInitialScrollX=undefined;this.taskInitialScrollY=undefined;this.taskNameCol=undefined;this.taskPrevHours=[];this.taskPrevDates=undefined;this.titleMess=undefined;this.viewMode="month";this.mainFilter=undefined;this.secondaryFilter=undefined;this.scrollableTaskList=false;this.plannerProps=undefined}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){P(this,R,"f").debug.logMessage(this,"Initializing stateId "+this.stateId);this.detailFilter=t.detailFilter;this.showSecondaryDates=t.showSecondaryDates;this.detailInitialScrollX=t.detailInitialScrollX;this.detailInitialScrollY=t.detailInitialScrollY;this.taskFilter=t.taskFilter;this.taskInitialScrollX=t.taskInitialScrollX;this.taskInitialScrollY=t.taskInitialScrollY;this.viewMode=t.viewMode}}}persistState(){if(this.store&&this.stateId){let t=false;if(!P(this,R,"f").objects.deepEqual(this.state.detailFilter,P(this,A,"f").detailFilter)){this.state.detailFilter=P(this,A,"f").detailFilter;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.showSecondaryDates,P(this,A,"f").showSecondaryDates)){this.state.showSecondaryDates=P(this,A,"f").showSecondaryDates;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.detailInitialScrollX,P(this,A,"f").detailInitialScrollX)){this.state.detailInitialScrollX=P(this,A,"f").detailInitialScrollX;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.detailInitialScrollY,P(this,A,"f").detailInitialScrollY)){this.state.detailInitialScrollY=P(this,A,"f").detailInitialScrollY;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskFilter,P(this,A,"f").taskFilter)){this.state.taskFilter=P(this,A,"f").taskFilter;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskInitialScrollX,P(this,A,"f").taskInitialScrollX)){this.state.taskInitialScrollX=P(this,A,"f").taskInitialScrollX;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskInitialScrollY,P(this,A,"f").taskInitialScrollY)){this.state.taskInitialScrollY=P(this,A,"f").taskInitialScrollY;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.viewMode,P(this,A,"f").viewMode)){this.state.viewMode=P(this,A,"f").viewMode;t=true}if(t){P(this,R,"f").debug.logMessage(this,"Persisting stateId "+this.stateId);this.store.persistState(this.stateId,this.state)}}}dataChanged(){W(this,K,{},"f")}async getProps(t){return f(this,b,t)}async refresh(){s(this);this.plannerRenderer.refresh()}async setProps(t){l(this,b,t)}async addPhases(t,i){var s;const e=P(this,I,"m",L).call(this,t);if(e){P(this,K,"f")[t]=i;e.phases=(s=i.rows)===null||s===void 0?void 0:s.filter((t=>C(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]]))).map((t=>{const s=x(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]],t.cells[this.phasePrevDates[0]],t.cells[this.phasePrevDates[1]],t.cells[this.phaseHours[0]],t.cells[this.phaseHours[1]],t.cells[this.phasePrevHours[0]],t.cells[this.phasePrevHours[1]]);const n=T(t,this.phaseIdCol,this.phaseNameCol,i.columns,this.phaseColumns,(()=>this.phaseColumns.map((s=>s==this.phaseDates[0]?"#START#":s==this.phaseDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let h=P(this,I,"m",et).call(this,t,this.phaseIconCol);let o=P(this,I,"m",nt).call(this,t,this.phaseIconCol);let a={taskRow:e.taskRow,phaseRow:t,id:e.id+"_"+t.cells[this.phaseIdCol].value,phaseRowId:t.id,taskRowId:e.taskRowId,name:t.cells[this.phaseNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"task",color:t.cells[this.phaseColorCol].value,selectedColor:t.cells[this.phaseColorCol].value,valuesToShow:n,rowType:c.PHASE,icon:h?{url:h,color:o!==null&&o!==void 0?o:"#595959"}:undefined,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]};return a}))}this.plannerProps.mainGantt.initialScrollX=P(this,A,"f").taskInitialScrollX;this.plannerProps.mainGantt.initialScrollY=P(this,A,"f").taskInitialScrollY;if(this.plannerProps.secondaryGantt){this.plannerProps.secondaryGantt.initialScrollX=P(this,A,"f").detailInitialScrollX;this.plannerProps.secondaryGantt.initialScrollX=P(this,A,"f").detailInitialScrollY}this.plannerProps=Object.assign({},this.plannerProps);this.refresh()}componentWillLoad(){P(this,R,"f").debug.logLoad(this,false);P(this,R,"f").theme.register(this);this.initWithPersistedState();W(this,A,{detailFilter:this.detailFilter,detailInitialScrollX:this.detailInitialScrollX,detailInitialScrollY:this.detailInitialScrollY,showSecondaryDates:this.showSecondaryDates,taskFilter:this.taskFilter,taskInitialScrollX:this.taskInitialScrollX,taskInitialScrollY:this.taskInitialScrollY,viewMode:this.viewMode},"f")}componentDidLoad(){let t=P(this,I,"m",X).call(this,P(this,I,"m",st).call(this,P(this,A,"f").detailFilter,true));const i=this.rootElement.shadowRoot.querySelector("#main-filter");y(i);const s=this.rootElement.shadowRoot.querySelector("#secondary-filter");if(t){y(s)}let e;let n;let h;const o=500;this.plannerProps={mainGantt:{title:this.titleMess,items:P(this,I,"m",G).call(this,P(this,I,"m",st).call(this,P(this,A,"f").taskFilter,false)),stylingOptions:Object.assign(Object.assign({},p),{listCellWidth:this.listCellWidth}),filter:i,hideLabel:true,ganttHeight:this.taskHeight,showSecondaryDates:P(this,A,"f").showSecondaryDates,onClick:t=>this.handleOnClick(t),onDblClick:t=>this.handleOnDblClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.taskInitialScrollX,initialScrollY:this.taskInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(n);n=window.setTimeout((()=>this.handleTaskGanttScrollY(t)),o)},onPhaseDrop:t=>this.handleOnPhaseDrop(t)},secondaryGantt:t?{title:"",items:t,stylingOptions:Object.assign(Object.assign({},p),{listCellWidth:this.listCellWidth}),filter:s,hideLabel:true,ganttHeight:this.detailHeight,onClick:t=>this.handleOnClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.detailInitialScrollX,initialScrollY:this.detailInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(h);h=window.setTimeout((()=>this.handleDetailGanttScrollY(t)),o)}}:undefined,onSetDoubleView:t=>this.handleOnSetDoubleView(t),onSetViewMode:t=>this.handleOnSetViewMode(t),viewMode:this.viewMode,scrollableTaskList:this.scrollableTaskList,onScrollX:t=>{window.clearTimeout(e);e=window.setTimeout((()=>this.handleOnScrollX(t)),o)}};this.kupReady.emit({comp:this,id:this.rootElement.id,value:undefined});if(this.taskFilter){P(this,I,"m",it).call(this,this.taskFilter)}if(this.detailFilter){P(this,I,"m",it).call(this,this.detailFilter,true)}P(this,R,"f").debug.logLoad(this,true)}componentDidRender(){this.persistState();P(this,R,"f").debug.logRender(this,true)}onKupDblClick(t,i){this.kupDblClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupContextMenu(t,i,s){let e;let n;let h;switch(i.type){case"project":{e=i.taskRow;n=e.cells[this.taskIdCol];h=this.data.columns[this.taskIdCol];break}case"task":{e=i.phaseRow;n=e.cells[this.phaseIdCol];break}case"timeline":{e=i.detailRow;n=e.cells[this.detailIdCol];h=this.data.columns[this.detailIdCol];break}}this.kupContextMenu.emit({comp:this,id:this.rootElement.id,value:i,taskAction:s,details:{cell:n,column:h,originalEvent:t,row:e}})}onKupDateChange(t,i){this.kupDateChange.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupPhaseDrop(t,i){this.kupPhaseDrop.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}handleOnDblClick(t){switch(t.rowType){case c.TASK:if(P(this,I,"m",N).call(this)){this.onKupDblClick(t,m.onDblClick)}break;case c.PHASE:if(P(this,I,"m",_).call(this)){this.onKupDblClick(t,m.onDblClick)}break;case c.DETAIL:if(P(this,I,"m",q).call(this)){this.onKupDblClick(t,m.onDblClick)}break}for(let t=0;t<P(this,Y,"f").length;t++){clearTimeout(P(this,Y,"f")[t]);P(this,R,"f").debug.logMessage(this,"Cleared click timeout("+P(this,Y,"f")[t]+").")}W(this,Y,[],"f")}handleOnClick(t){P(this,Y,"f").push(setTimeout((()=>{switch(t.rowType){case c.TASK:const i=t.phases?m.onTaskClosing:m.onTaskOpening;if(P(this,I,"m",B).call(this,t)){this.onKupClick(t,i)}break;case c.PHASE:if(P(this,I,"m",J).call(this)){this.onKupClick(t,m.onClick)}break;case c.DETAIL:if(P(this,I,"m",Q).call(this)){this.onKupClick(t,m.onClick)}break}}),300))}handleOnContextMenu(t,i){switch(i.rowType){case c.TASK:if(P(this,I,"m",U).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break;case c.PHASE:if(P(this,I,"m",Z).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break;case c.DETAIL:if(P(this,I,"m",$).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break}}handleOnSetDoubleView(t){var i;P(this,A,"f").showSecondaryDates=t;if((i=this.plannerProps)===null||i===void 0?void 0:i.mainGantt){this.plannerProps.mainGantt.showSecondaryDates=t}this.persistState()}handleOnSetViewMode(t){P(this,A,"f").viewMode=t;this.plannerProps.viewMode=t;this.persistState()}handleOnScrollX(t){P(this,A,"f").taskInitialScrollX=t;P(this,A,"f").detailInitialScrollX=t;this.persistState()}handleTaskGanttScrollY(t){P(this,A,"f").taskInitialScrollY=t;this.persistState()}handleDetailGanttScrollY(t){P(this,A,"f").detailInitialScrollY=t;this.persistState()}handleOnDateChange(t){if(P(this,I,"m",tt).call(this,t)){if(t.rowType!=c.DETAIL){this.onKupDateChange(t,m.onResize)}}}handleOnPhaseDrop(t){this.onKupPhaseDrop(t,m.onTask)}render(){var t,i,s;const h=this.plannerProps?Object.assign(Object.assign({},this.plannerProps),{onSetDoubleView:this.handleOnSetDoubleView.bind(this),onSetViewMode:this.handleOnSetViewMode.bind(this),onScrollX:this.handleOnScrollX.bind(this),mainGantt:Object.assign(Object.assign({},(t=this.plannerProps)===null||t===void 0?void 0:t.mainGantt),{onScrollY:this.handleTaskGanttScrollY.bind(this)})}):null;if((i=this.plannerProps)===null||i===void 0?void 0:i.secondaryGantt){h.secondaryGantt=Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{onScrollY:this.handleDetailGanttScrollY.bind(this)})}return e(n,{key:"ab02db06dbbc4cec735bfe4a94be886dccdd074b"},e("style",{key:"a8e138dc9432e9a72e35c5ebbdd90a6ac7a4cdcb"},P(this,R,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"5a7c342a7ca934a076dce7ff708cb4d7c24f430a",id:w,style:{maxWidth:this.maxWidth}},this.plannerProps&&e("kup-planner-renderer",{key:"fb472e15412e52ab4df9fb3c64d37bb00c6d3bfc",props:h,ref:t=>this.plannerRenderer=t})),e("div",{key:"96a4a1cc970e0e1babf8814becbd057eb3c02ee4",style:{display:this.plannerProps?"none":""}},e(g,{key:"ff0b0c6354de9bad576fa94012693e74565c0392",icon:d.SEARCH,id:"main-filter",label:P(this,R,"f").language.translate(u.SEARCH),onKeyDown:t=>{if(t.key==="Enter"){P(this,I,"m",it).call(this,t.target.value)}},value:this.taskFilter,wrapperClass:"filter"}),((s=this.detailData)===null||s===void 0?void 0:s.rows)&&this.detailData.rows.length>0?e(g,{icon:d.SEARCH,id:"secondary-filter",label:P(this,R,"f").language.translate(u.SEARCH),onKeyDown:t=>{if(t.key==="Enter"){P(this,I,"m",it).call(this,t.target.value,true)}},value:this.detailFilter,wrapperClass:"filter"}):null))}disconnectedCallback(){P(this,R,"f").theme.unregister(this);this.kupDidUnload.emit({comp:this,id:this.rootElement.id,storedSettings:P(this,A,"f")})}get rootElement(){return h(this)}static get watchers(){return{data:["dataChanged"]}}};R=new WeakMap,V=new WeakMap,Y=new WeakMap,K=new WeakMap,A=new WeakMap,I=new WeakSet,G=function t(i){var s;if(!i||!i.rows){return[]}let e=(s=i.rows)===null||s===void 0?void 0:s.filter((t=>C(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]]))).map((t=>{const s=x(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]],t.cells[this.taskPrevDates[0]],t.cells[this.taskPrevDates[1]],t.cells[this.taskHours[0]],t.cells[this.taskHours[1]],t.cells[this.taskPrevHours[0]],t.cells[this.taskPrevHours[1]]);const e=T(t,this.taskIdCol,this.taskNameCol,i.columns,this.taskColumns,(()=>this.taskColumns.map((s=>s==this.taskDates[0]?"#START#":s==this.taskDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let n=P(this,I,"m",et).call(this,t,this.taskIconCol);let h=P(this,I,"m",nt).call(this,t,this.taskIconCol);let o={taskRow:t,taskRowId:t.id,id:t.cells[this.taskIdCol].value,name:t.cells[this.taskNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"project",valuesToShow:e,rowType:c.TASK,icon:n?{url:n,color:h!==null&&h!==void 0?h:"#595959"}:undefined,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]};return o}));return e},X=function t(i){if(!i||!i.rows){return undefined}let s=[];i.rows.filter((t=>C(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]]))).forEach((t=>{var e,n;const h=t.cells[this.detailIdCol].value;const o=t.cells[this.detailNameCol].value;const a=x(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]],undefined,undefined,t.cells[this.detailHours[0]],t.cells[this.detailHours[1]]);const r=T(t,this.detailIdCol,this.detailNameCol,i.columns,this.detailColumns);let f=s.find((t=>t.id==h));if(!f){f={id:h,name:o,detailRow:t,type:"timeline",valuesToShow:r,rowType:c.DETAIL,schedule:[]};s.push(f)}let l=P(this,I,"m",et).call(this,t,this.detailIconCol);let d=P(this,I,"m",nt).call(this,t,this.detailIconCol);f.schedule.push({startDate:a.dateValues[0],endDate:a.dateValues[1],color:this.detailColorCol?(e=t.cells[this.detailColorCol].value)!==null&&e!==void 0?e:"#D9D9D8":"#D9D9D8",selectedColor:this.detailColorCol?(n=t.cells[this.detailColorCol].value)!==null&&n!==void 0?n:"#D9D9D8":"#D9D9D8",icon:l?{url:l,color:d!==null&&d!==void 0?d:"#595959"}:undefined,startHour:a.hourValues[0],endHour:a.hourValues[1]})}));return s},L=function t(i){return this.plannerProps.mainGantt.items.find((t=>t.id==i))},F=function t(i){const s=P(this,I,"m",L).call(this,i);if(s)s.phases=undefined;this.plannerProps=Object.assign({},this.plannerProps)},N=function t(){return true},_=function t(){return true},q=function t(){return true},B=function t(i){const s=P(this,I,"m",L).call(this,i.id);if(s===null||s===void 0?void 0:s.phases){P(this,I,"m",F).call(this,s.id)}return true},J=function t(){return true},Q=function t(){return true},U=function t(){return true},Z=function t(){return true},$=function t(){return true},tt=function t(i){let s=false;if(!P(this,V,"f")){s=true;W(this,V,new k(i),"f")}else if(!P(this,V,"f").isEquivalent(i)){W(this,V,new k(i),"f");s=true}return s},it=function t(i,s){if(s){P(this,A,"f").detailFilter=i}else{P(this,A,"f").taskFilter=i}const e=s?{secondaryGantt:Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{items:P(this,I,"m",X).call(this,P(this,I,"m",st).call(this,i,s))})}:{mainGantt:Object.assign(Object.assign({},this.plannerProps.mainGantt),{items:P(this,I,"m",G).call(this,P(this,I,"m",st).call(this,i,s))})};this.plannerProps=Object.assign(Object.assign({},this.plannerProps),e);this.persistState()},st=function t(i,s){const e=s?this.detailData:this.data;if(!e||!e.rows||e.rows.length==0){return undefined}if(!i){return e}const n={columns:this.data.columns,rows:[]};const h=[];for(let t=0;t<e.rows.length;t++){const s=e.rows[t];const n=s.cells;for(let t=0;t<e.columns.length;t++){const o=e.columns[t];const a=n[o.name];if(a){const n=r(e.columns[t],a);const o=!!(n.toLowerCase().indexOf(i.toLowerCase())>-1);if(o){h.push({row:s,weight:t});break}}}}h.sort(((t,i)=>t.weight-i.weight)).forEach((t=>{n.rows.push(t.row)}));return n},et=function t(i,s){var e;let n=undefined;if(s){const t=i.cells[s];let h=(e=t===null||t===void 0?void 0:t.data)===null||e===void 0?void 0:e.resource;if(!h){h=t.value}if(h){n=o("./assets/svg/"+h+".svg")}}return n},nt=function t(i,s){var e;let n=undefined;if(s){const t=i.cells[s];n=(e=t===null||t===void 0?void 0:t.data)===null||e===void 0?void 0:e.color;if(n){n=P(this,R,"f").theme.colorCheck(n).hexColor}}return n};ht.style=M;export{ht as kup_planner};
2
- //# sourceMappingURL=p-bf1b9843.entry.js.map
1
+ import{r as t,c as i,f as s,h as e,H as n,d as h,g as o}from"./p-d7c15b0e.js";import{k as a,ae as r,g as f,s as l,b as d,E as u}from"./p-1d215391.js";import{K as c,d as p,a as m,b as k,c as w}from"./p-cd3a7d53.js";import{c as b}from"./p-635bb4b3.js";import{F as g}from"./p-d46f8700.js";import{F as y}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-2b519589.js";import"./p-d4a879fc.js";const v=a();function x(t,i,s,e,n,h,o,a){const r=D(t,i);let f=[];if(s&&e){if(C(s,e)){f=D(s,e)}else{f=[...r]}}let l=[];if(n&&h){if(z(n,h)){l=S(n,h)}else{f=[...r]}}let d=[];if(o&&a){if(z(o,a)){d=S(o,a)}else{f=[...r]}}return{dateValues:r,secDateValues:f,hourValues:l,secHourValues:d}}function D(t,i){let s=[t.value,i.value];if(j(t)&&j(i)){return s}else if(j(t)){return[t.value,t.value]}else if(j(i)){return[i.value,i.value]}else{return s}}function S(t,i){let s=[t.value,i.value];if(O(t)&&O(i)){return s}else if(O(t)){return[t.value,t.value]}else if(O(i)){return[i.value,i.value]}else{return s}}function j(t){return v.objects.isDate(t.obj)&&v.dates.isIsoDate(t.value)}function O(t){return v.objects.isTime(t.obj)||v.objects.isTimeWithSeconds(t.obj)}function C(t,i){return j(t)||j(i)}function z(t,i){return O(t)||O(i)}function T(t,i,s,e,n,h){let o=()=>n.map((i=>r(e.find((t=>t.name==i)),t.cells[i])));if(h){o=h}const a=(n===null||n===void 0?void 0:n.length)>=2?o():[t.cells[i].value,t.cells[s].value];return a}class E{constructor(){this.showSecondaryDates=false;this.detailFilter="";this.detailInitialScrollX=0;this.detailInitialScrollY=0;this.taskFilter="";this.taskInitialScrollX=0;this.taskInitialScrollY=0;this.viewMode="day"}toDebugString(){return"dt state"}}const H=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}.filter{margin-bottom:var(--kup-space-04)}.planner-render{padding-top:40px}";const M=H;var P=undefined&&undefined.__classPrivateFieldGet||function(t,i,s,e){if(s==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?e:s==="a"?e.call(t):e?e.value:i.get(t)};var W=undefined&&undefined.__classPrivateFieldSet||function(t,i,s,e,n){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?t!==i||!n:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?n.call(t,s):n?n.value=s:i.set(t,s),s};var I,R,V,Y,K,A,G,X,L,F,N,_,q,B,J,Q,U,Z,$,tt,it,st,et,nt;const ht=class{constructor(s){t(this,s);this.kupClick=i(this,"kup-planner-click",6);this.kupDblClick=i(this,"kup-planner-dblclick",6);this.kupDateChange=i(this,"kup-planner-datechange",6);this.kupPhaseDrop=i(this,"kup-planner-phasedrop",6);this.kupReady=i(this,"kup-planner-ready",6);this.kupContextMenu=i(this,"kup-planner-contextmenu",6);this.kupDidUnload=i(this,"kup-planner-didunload",6);I.add(this);this.state=new E;this.plannerRenderer=undefined;R.set(this,a());V.set(this,void 0);Y.set(this,[]);K.set(this,{});A.set(this,void 0);this.stateId="";this.store=undefined;this.customStyle="";this.data=undefined;this.detailData=undefined;this.detailColorCol=undefined;this.detailColumns=undefined;this.detailDates=undefined;this.detailFilter=undefined;this.detailHeight=undefined;this.detailHours=[];this.detailIconCol=undefined;this.detailIdCol=undefined;this.detailNameCol=undefined;this.detailPrevHours=[];this.detailPrevDates=undefined;this.detailInitialScrollX=undefined;this.detailInitialScrollY=undefined;this.listCellWidth="300px";this.maxWidth="90vw";this.phaseColorCol=undefined;this.phaseColumns=undefined;this.phaseColParDep=undefined;this.phaseDates=undefined;this.phaseHours=[];this.phaseIconCol=undefined;this.phaseIdCol=undefined;this.phaseNameCol=undefined;this.phasePrevHours=[];this.phasePrevDates=undefined;this.readOnly=false;this.showSecondaryDates=false;this.taskColumns=undefined;this.taskDates=undefined;this.taskFilter=undefined;this.taskHeight=undefined;this.taskHours=[];this.taskIconCol=undefined;this.taskIdCol=undefined;this.taskInitialScrollX=undefined;this.taskInitialScrollY=undefined;this.taskNameCol=undefined;this.taskPrevHours=[];this.taskPrevDates=undefined;this.titleMess=undefined;this.viewMode="month";this.mainFilter=undefined;this.secondaryFilter=undefined;this.scrollableTaskList=false;this.plannerProps=undefined}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){P(this,R,"f").debug.logMessage(this,"Initializing stateId "+this.stateId);this.detailFilter=t.detailFilter;this.showSecondaryDates=t.showSecondaryDates;this.detailInitialScrollX=t.detailInitialScrollX;this.detailInitialScrollY=t.detailInitialScrollY;this.taskFilter=t.taskFilter;this.taskInitialScrollX=t.taskInitialScrollX;this.taskInitialScrollY=t.taskInitialScrollY;this.viewMode=t.viewMode}}}persistState(){if(this.store&&this.stateId){let t=false;if(!P(this,R,"f").objects.deepEqual(this.state.detailFilter,P(this,A,"f").detailFilter)){this.state.detailFilter=P(this,A,"f").detailFilter;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.showSecondaryDates,P(this,A,"f").showSecondaryDates)){this.state.showSecondaryDates=P(this,A,"f").showSecondaryDates;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.detailInitialScrollX,P(this,A,"f").detailInitialScrollX)){this.state.detailInitialScrollX=P(this,A,"f").detailInitialScrollX;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.detailInitialScrollY,P(this,A,"f").detailInitialScrollY)){this.state.detailInitialScrollY=P(this,A,"f").detailInitialScrollY;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskFilter,P(this,A,"f").taskFilter)){this.state.taskFilter=P(this,A,"f").taskFilter;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskInitialScrollX,P(this,A,"f").taskInitialScrollX)){this.state.taskInitialScrollX=P(this,A,"f").taskInitialScrollX;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.taskInitialScrollY,P(this,A,"f").taskInitialScrollY)){this.state.taskInitialScrollY=P(this,A,"f").taskInitialScrollY;t=true}if(!P(this,R,"f").objects.deepEqual(this.state.viewMode,P(this,A,"f").viewMode)){this.state.viewMode=P(this,A,"f").viewMode;t=true}if(t){P(this,R,"f").debug.logMessage(this,"Persisting stateId "+this.stateId);this.store.persistState(this.stateId,this.state)}}}dataChanged(){W(this,K,{},"f")}async getProps(t){return f(this,w,t)}async refresh(){s(this);this.plannerRenderer.refresh()}async setProps(t){l(this,w,t)}async addPhases(t,i){var s;const e=P(this,I,"m",L).call(this,t);if(e){P(this,K,"f")[t]=i;e.phases=(s=i.rows)===null||s===void 0?void 0:s.filter((t=>C(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]]))).map((t=>{const s=x(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]],t.cells[this.phasePrevDates[0]],t.cells[this.phasePrevDates[1]],t.cells[this.phaseHours[0]],t.cells[this.phaseHours[1]],t.cells[this.phasePrevHours[0]],t.cells[this.phasePrevHours[1]]);const n=T(t,this.phaseIdCol,this.phaseNameCol,i.columns,this.phaseColumns,(()=>this.phaseColumns.map((s=>s==this.phaseDates[0]?"#START#":s==this.phaseDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let h=P(this,I,"m",et).call(this,t,this.phaseIconCol);let o=P(this,I,"m",nt).call(this,t,this.phaseIconCol);let a={taskRow:e.taskRow,phaseRow:t,id:e.id+"_"+t.cells[this.phaseIdCol].value,phaseRowId:t.id,taskRowId:e.taskRowId,name:t.cells[this.phaseNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"task",color:t.cells[this.phaseColorCol].value,selectedColor:t.cells[this.phaseColorCol].value,valuesToShow:n,rowType:c.PHASE,icon:h?{url:h,color:o!==null&&o!==void 0?o:"#595959"}:undefined,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]};return a}))}this.plannerProps.mainGantt.initialScrollX=P(this,A,"f").taskInitialScrollX;this.plannerProps.mainGantt.initialScrollY=P(this,A,"f").taskInitialScrollY;if(this.plannerProps.secondaryGantt){this.plannerProps.secondaryGantt.initialScrollX=P(this,A,"f").detailInitialScrollX;this.plannerProps.secondaryGantt.initialScrollX=P(this,A,"f").detailInitialScrollY}this.plannerProps=Object.assign({},this.plannerProps);this.refresh()}componentWillLoad(){P(this,R,"f").debug.logLoad(this,false);P(this,R,"f").theme.register(this);this.initWithPersistedState();W(this,A,{detailFilter:this.detailFilter,detailInitialScrollX:this.detailInitialScrollX,detailInitialScrollY:this.detailInitialScrollY,showSecondaryDates:this.showSecondaryDates,taskFilter:this.taskFilter,taskInitialScrollX:this.taskInitialScrollX,taskInitialScrollY:this.taskInitialScrollY,viewMode:this.viewMode},"f")}componentDidLoad(){let t=P(this,I,"m",X).call(this,P(this,I,"m",st).call(this,P(this,A,"f").detailFilter,true));const i=this.rootElement.shadowRoot.querySelector("#main-filter");y(i);const s=this.rootElement.shadowRoot.querySelector("#secondary-filter");if(t){y(s)}let e;let n;let h;const o=500;this.plannerProps={mainGantt:{title:this.titleMess,items:P(this,I,"m",G).call(this,P(this,I,"m",st).call(this,P(this,A,"f").taskFilter,false)),stylingOptions:Object.assign(Object.assign({},p),{listCellWidth:this.listCellWidth}),filter:i,hideLabel:true,ganttHeight:this.taskHeight,showSecondaryDates:P(this,A,"f").showSecondaryDates,onClick:t=>this.handleOnClick(t),onDblClick:t=>this.handleOnDblClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.taskInitialScrollX,initialScrollY:this.taskInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(n);n=window.setTimeout((()=>this.handleTaskGanttScrollY(t)),o)},onPhaseDrop:t=>this.handleOnPhaseDrop(t)},secondaryGantt:t?{title:"",items:t,stylingOptions:Object.assign(Object.assign({},p),{listCellWidth:this.listCellWidth}),filter:s,hideLabel:true,ganttHeight:this.detailHeight,onClick:t=>this.handleOnClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.detailInitialScrollX,initialScrollY:this.detailInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(h);h=window.setTimeout((()=>this.handleDetailGanttScrollY(t)),o)}}:undefined,onSetDoubleView:t=>this.handleOnSetDoubleView(t),onSetViewMode:t=>this.handleOnSetViewMode(t),viewMode:this.viewMode,scrollableTaskList:this.scrollableTaskList,onScrollX:t=>{window.clearTimeout(e);e=window.setTimeout((()=>this.handleOnScrollX(t)),o)}};this.kupReady.emit({comp:this,id:this.rootElement.id,value:undefined});if(this.taskFilter){P(this,I,"m",it).call(this,this.taskFilter)}if(this.detailFilter){P(this,I,"m",it).call(this,this.detailFilter,true)}P(this,R,"f").debug.logLoad(this,true)}componentDidRender(){this.persistState();P(this,R,"f").debug.logRender(this,true)}onKupDblClick(t,i){this.kupDblClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupContextMenu(t,i,s){let e;let n;let h;switch(i.type){case"project":{e=i.taskRow;n=e.cells[this.taskIdCol];h=this.data.columns[this.taskIdCol];break}case"task":{e=i.phaseRow;n=e.cells[this.phaseIdCol];break}case"timeline":{e=i.detailRow;n=e.cells[this.detailIdCol];h=this.data.columns[this.detailIdCol];break}}this.kupContextMenu.emit({comp:this,id:this.rootElement.id,value:i,taskAction:s,details:{cell:n,column:h,originalEvent:t,row:e}})}onKupDateChange(t,i){this.kupDateChange.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupPhaseDrop(t,i){this.kupPhaseDrop.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}handleOnDblClick(t){switch(t.rowType){case c.TASK:if(P(this,I,"m",N).call(this)){this.onKupDblClick(t,m.onDblClick)}break;case c.PHASE:if(P(this,I,"m",_).call(this)){this.onKupDblClick(t,m.onDblClick)}break;case c.DETAIL:if(P(this,I,"m",q).call(this)){this.onKupDblClick(t,m.onDblClick)}break}for(let t=0;t<P(this,Y,"f").length;t++){clearTimeout(P(this,Y,"f")[t]);P(this,R,"f").debug.logMessage(this,"Cleared click timeout("+P(this,Y,"f")[t]+").")}W(this,Y,[],"f")}handleOnClick(t){P(this,Y,"f").push(setTimeout((()=>{switch(t.rowType){case c.TASK:const i=t.phases?m.onTaskClosing:m.onTaskOpening;if(P(this,I,"m",B).call(this,t)){this.onKupClick(t,i)}break;case c.PHASE:if(P(this,I,"m",J).call(this)){this.onKupClick(t,m.onClick)}break;case c.DETAIL:if(P(this,I,"m",Q).call(this)){this.onKupClick(t,m.onClick)}break}}),300))}handleOnContextMenu(t,i){switch(i.rowType){case c.TASK:if(P(this,I,"m",U).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break;case c.PHASE:if(P(this,I,"m",Z).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break;case c.DETAIL:if(P(this,I,"m",$).call(this)){this.onKupContextMenu(t,i,m.onRightClick)}break}}handleOnSetDoubleView(t){var i;P(this,A,"f").showSecondaryDates=t;if((i=this.plannerProps)===null||i===void 0?void 0:i.mainGantt){this.plannerProps.mainGantt.showSecondaryDates=t}this.persistState()}handleOnSetViewMode(t){P(this,A,"f").viewMode=t;this.plannerProps.viewMode=t;this.persistState()}handleOnScrollX(t){P(this,A,"f").taskInitialScrollX=t;P(this,A,"f").detailInitialScrollX=t;this.persistState()}handleTaskGanttScrollY(t){P(this,A,"f").taskInitialScrollY=t;this.persistState()}handleDetailGanttScrollY(t){P(this,A,"f").detailInitialScrollY=t;this.persistState()}handleOnDateChange(t){if(P(this,I,"m",tt).call(this,t)){if(t.rowType!=c.DETAIL){this.onKupDateChange(t,m.onResize)}}}handleOnPhaseDrop(t){this.onKupPhaseDrop(t,m.onTask)}render(){var t,i,s;const h=this.plannerProps?Object.assign(Object.assign({},this.plannerProps),{onSetDoubleView:this.handleOnSetDoubleView.bind(this),onSetViewMode:this.handleOnSetViewMode.bind(this),onScrollX:this.handleOnScrollX.bind(this),mainGantt:Object.assign(Object.assign({},(t=this.plannerProps)===null||t===void 0?void 0:t.mainGantt),{onScrollY:this.handleTaskGanttScrollY.bind(this)})}):null;if((i=this.plannerProps)===null||i===void 0?void 0:i.secondaryGantt){h.secondaryGantt=Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{onScrollY:this.handleDetailGanttScrollY.bind(this)})}return e(n,{key:"ab02db06dbbc4cec735bfe4a94be886dccdd074b"},e("style",{key:"a8e138dc9432e9a72e35c5ebbdd90a6ac7a4cdcb"},P(this,R,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"5a7c342a7ca934a076dce7ff708cb4d7c24f430a",id:b,style:{maxWidth:this.maxWidth}},this.plannerProps&&e("kup-planner-renderer",{key:"fb472e15412e52ab4df9fb3c64d37bb00c6d3bfc",props:h,ref:t=>this.plannerRenderer=t})),e("div",{key:"96a4a1cc970e0e1babf8814becbd057eb3c02ee4",style:{display:this.plannerProps?"none":""}},e(g,{key:"ff0b0c6354de9bad576fa94012693e74565c0392",icon:d.SEARCH,id:"main-filter",label:P(this,R,"f").language.translate(u.SEARCH),onKeyDown:t=>{if(t.key==="Enter"){P(this,I,"m",it).call(this,t.target.value)}},value:this.taskFilter,wrapperClass:"filter"}),((s=this.detailData)===null||s===void 0?void 0:s.rows)&&this.detailData.rows.length>0?e(g,{icon:d.SEARCH,id:"secondary-filter",label:P(this,R,"f").language.translate(u.SEARCH),onKeyDown:t=>{if(t.key==="Enter"){P(this,I,"m",it).call(this,t.target.value,true)}},value:this.detailFilter,wrapperClass:"filter"}):null))}disconnectedCallback(){P(this,R,"f").theme.unregister(this);this.kupDidUnload.emit({comp:this,id:this.rootElement.id,storedSettings:P(this,A,"f")})}get rootElement(){return h(this)}static get watchers(){return{data:["dataChanged"]}}};R=new WeakMap,V=new WeakMap,Y=new WeakMap,K=new WeakMap,A=new WeakMap,I=new WeakSet,G=function t(i){var s;if(!i||!i.rows){return[]}let e=(s=i.rows)===null||s===void 0?void 0:s.filter((t=>C(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]]))).map((t=>{const s=x(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]],t.cells[this.taskPrevDates[0]],t.cells[this.taskPrevDates[1]],t.cells[this.taskHours[0]],t.cells[this.taskHours[1]],t.cells[this.taskPrevHours[0]],t.cells[this.taskPrevHours[1]]);const e=T(t,this.taskIdCol,this.taskNameCol,i.columns,this.taskColumns,(()=>this.taskColumns.map((s=>s==this.taskDates[0]?"#START#":s==this.taskDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let n=P(this,I,"m",et).call(this,t,this.taskIconCol);let h=P(this,I,"m",nt).call(this,t,this.taskIconCol);let o={taskRow:t,taskRowId:t.id,id:t.cells[this.taskIdCol].value,name:t.cells[this.taskNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"project",valuesToShow:e,rowType:c.TASK,icon:n?{url:n,color:h!==null&&h!==void 0?h:"#595959"}:undefined,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]};return o}));return e},X=function t(i){if(!i||!i.rows){return undefined}let s=[];i.rows.filter((t=>C(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]]))).forEach((t=>{var e,n;const h=t.cells[this.detailIdCol].value;const o=t.cells[this.detailNameCol].value;const a=x(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]],undefined,undefined,t.cells[this.detailHours[0]],t.cells[this.detailHours[1]]);const r=T(t,this.detailIdCol,this.detailNameCol,i.columns,this.detailColumns);let f=s.find((t=>t.id==h));if(!f){f={id:h,name:o,detailRow:t,type:"timeline",valuesToShow:r,rowType:c.DETAIL,schedule:[]};s.push(f)}let l=P(this,I,"m",et).call(this,t,this.detailIconCol);let d=P(this,I,"m",nt).call(this,t,this.detailIconCol);f.schedule.push({startDate:a.dateValues[0],endDate:a.dateValues[1],color:this.detailColorCol?(e=t.cells[this.detailColorCol].value)!==null&&e!==void 0?e:"#D9D9D8":"#D9D9D8",selectedColor:this.detailColorCol?(n=t.cells[this.detailColorCol].value)!==null&&n!==void 0?n:"#D9D9D8":"#D9D9D8",icon:l?{url:l,color:d!==null&&d!==void 0?d:"#595959"}:undefined,startHour:a.hourValues[0],endHour:a.hourValues[1]})}));return s},L=function t(i){return this.plannerProps.mainGantt.items.find((t=>t.id==i))},F=function t(i){const s=P(this,I,"m",L).call(this,i);if(s)s.phases=undefined;this.plannerProps=Object.assign({},this.plannerProps)},N=function t(){return true},_=function t(){return true},q=function t(){return true},B=function t(i){const s=P(this,I,"m",L).call(this,i.id);if(s===null||s===void 0?void 0:s.phases){P(this,I,"m",F).call(this,s.id)}return true},J=function t(){return true},Q=function t(){return true},U=function t(){return true},Z=function t(){return true},$=function t(){return true},tt=function t(i){let s=false;if(!P(this,V,"f")){s=true;W(this,V,new k(i),"f")}else if(!P(this,V,"f").isEquivalent(i)){W(this,V,new k(i),"f");s=true}return s},it=function t(i,s){if(s){P(this,A,"f").detailFilter=i}else{P(this,A,"f").taskFilter=i}const e=s?{secondaryGantt:Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{items:P(this,I,"m",X).call(this,P(this,I,"m",st).call(this,i,s))})}:{mainGantt:Object.assign(Object.assign({},this.plannerProps.mainGantt),{items:P(this,I,"m",G).call(this,P(this,I,"m",st).call(this,i,s))})};this.plannerProps=Object.assign(Object.assign({},this.plannerProps),e);this.persistState()},st=function t(i,s){const e=s?this.detailData:this.data;if(!e||!e.rows||e.rows.length==0){return undefined}if(!i){return e}const n={columns:this.data.columns,rows:[]};const h=[];for(let t=0;t<e.rows.length;t++){const s=e.rows[t];const n=s.cells;for(let t=0;t<e.columns.length;t++){const o=e.columns[t];const a=n[o.name];if(a){const n=r(e.columns[t],a);const o=!!(n.toLowerCase().indexOf(i.toLowerCase())>-1);if(o){h.push({row:s,weight:t});break}}}}h.sort(((t,i)=>t.weight-i.weight)).forEach((t=>{n.rows.push(t.row)}));return n},et=function t(i,s){var e;let n=undefined;if(s){const t=i.cells[s];let h=(e=t===null||t===void 0?void 0:t.data)===null||e===void 0?void 0:e.resource;if(!h){h=t.value}if(h){n=o("./assets/svg/"+h+".svg")}}return n},nt=function t(i,s){var e;let n=undefined;if(s){const t=i.cells[s];n=(e=t===null||t===void 0?void 0:t.data)===null||e===void 0?void 0:e.color;if(n){n=P(this,R,"f").theme.colorCheck(n).hexColor}}return n};ht.style=M;export{ht as kup_planner};
2
+ //# sourceMappingURL=p-255b0de9.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-56b44f04.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
2
- //# sourceMappingURL=p-b2bf0eab.entry.js.map
1
+ import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-1d215391.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
2
+ //# sourceMappingURL=p-261fa958.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as f,s as p,e as h}from"./p-56b44f04.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return f(this,r,t)}async refresh(){e(this)}async setProps(t){p(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
2
- //# sourceMappingURL=p-1c22c2cd.entry.js.map
1
+ import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as p,s as f,e as h}from"./p-1d215391.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,r,t)}async refresh(){e(this)}async setProps(t){f(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
2
+ //# sourceMappingURL=p-289f3508.entry.js.map
@@ -1,2 +1,2 @@
1
- import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-56b44f04.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
2
- //# sourceMappingURL=p-d80192a9.js.map
1
+ import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-1d215391.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
2
+ //# sourceMappingURL=p-3c73ab2d.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-56b44f04.js";import{c as h}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var r;(function(t){t["customStyle"]="Custom style of the component.";t["placeholderAttrs"]="Html attributes of the picture before the component enters the viewport.";t["resourceAttrs"]="Html attributes of the picture after the component enters the viewport."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-subtle)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";const c=l;var d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var u=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,i):a?a.value=i:e.set(t,i),i};var m,g,k,y,w,b;const x=class{constructor(i){t(this,i);this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6);this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6);m.set(this,null);g.set(this,s());k.set(this,null);y.set(this,null);w.set(this,false);b.set(this,null);this.isInViewport=false;this.customStyle="";this.placeholderAttrs={};this.resourceAttrs={};this.threshold=.25}async getProps(t){return f(this,r,t)}async refresh(){i(this)}async setProps(t){p(this,r,t)}setObserver(){let t=t=>{t.forEach((t=>{if(t.isIntersecting){this.isInViewport=true;d(this,m,"f").unobserve(this.rootElement)}}))};let e={threshold:this.threshold};u(this,m,new IntersectionObserver(t,e),"f")}componentWillLoad(){d(this,g,"f").debug.logLoad(this,false);d(this,g,"f").theme.register(this);this.setObserver()}componentDidLoad(){d(this,g,"f").debug.logLoad(this,true)}componentWillRender(){d(this,g,"f").debug.logRender(this,false)}componentDidRender(){d(this,g,"f").debug.logRender(this,true)}render(){if(this.isInViewport&&!d(this,w,"f")){u(this,w,true,"f")}return o(a,{key:"96e9dc9b29a8715944440efb3cde806001db9841"},o("style",{key:"1a9d6f8d9163c49ec458f52fcc47e3b83b37fd95"},d(this,g,"f").theme.setKupStyle(this.rootElement)),o("div",{key:"c41d71aba188a432bcbbd1e81234d4eb84ac5cad",id:h,ref:t=>{u(this,b,t,"f")}},o("img",Object.assign({key:"66a44a24938c4fa72cd984729d2c5edd37c357eb"},this.placeholderAttrs,{class:"placeholder",ref:t=>u(this,k,t,"f"),onLoad:()=>{if(d(this,k,"f").naturalWidth>d(this,k,"f").naturalHeight){d(this,b,"f").classList.add("horizontal")}else{d(this,b,"f").classList.add("vertical")}d(this,m,"f").observe(this.rootElement);d(this,k,"f").classList.add("placeholder--loaded");this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),d(this,w,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>u(this,y,t,"f"),onLoad:()=>{d(this,k,"f").classList.add("placeholder--fade-out");d(this,y,"f").classList.add("resource--fade-in");this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;d(this,g,"f").theme.unregister(this);(t=d(this,m,"f"))===null||t===void 0?void 0:t.unobserve(this.rootElement)}get rootElement(){return n(this)}};m=new WeakMap,g=new WeakMap,k=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap;x.style=c;export{x as kup_photo_frame};
2
- //# sourceMappingURL=p-745037f2.entry.js.map
1
+ import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-1d215391.js";import{c as h}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var r;(function(t){t["customStyle"]="Custom style of the component.";t["placeholderAttrs"]="Html attributes of the picture before the component enters the viewport.";t["resourceAttrs"]="Html attributes of the picture after the component enters the viewport."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-subtle)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";const c=l;var d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var u=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,i):a?a.value=i:e.set(t,i),i};var m,g,k,y,w,b;const x=class{constructor(i){t(this,i);this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6);this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6);m.set(this,null);g.set(this,s());k.set(this,null);y.set(this,null);w.set(this,false);b.set(this,null);this.isInViewport=false;this.customStyle="";this.placeholderAttrs={};this.resourceAttrs={};this.threshold=.25}async getProps(t){return f(this,r,t)}async refresh(){i(this)}async setProps(t){p(this,r,t)}setObserver(){let t=t=>{t.forEach((t=>{if(t.isIntersecting){this.isInViewport=true;d(this,m,"f").unobserve(this.rootElement)}}))};let e={threshold:this.threshold};u(this,m,new IntersectionObserver(t,e),"f")}componentWillLoad(){d(this,g,"f").debug.logLoad(this,false);d(this,g,"f").theme.register(this);this.setObserver()}componentDidLoad(){d(this,g,"f").debug.logLoad(this,true)}componentWillRender(){d(this,g,"f").debug.logRender(this,false)}componentDidRender(){d(this,g,"f").debug.logRender(this,true)}render(){if(this.isInViewport&&!d(this,w,"f")){u(this,w,true,"f")}return o(a,{key:"96e9dc9b29a8715944440efb3cde806001db9841"},o("style",{key:"1a9d6f8d9163c49ec458f52fcc47e3b83b37fd95"},d(this,g,"f").theme.setKupStyle(this.rootElement)),o("div",{key:"c41d71aba188a432bcbbd1e81234d4eb84ac5cad",id:h,ref:t=>{u(this,b,t,"f")}},o("img",Object.assign({key:"66a44a24938c4fa72cd984729d2c5edd37c357eb"},this.placeholderAttrs,{class:"placeholder",ref:t=>u(this,k,t,"f"),onLoad:()=>{if(d(this,k,"f").naturalWidth>d(this,k,"f").naturalHeight){d(this,b,"f").classList.add("horizontal")}else{d(this,b,"f").classList.add("vertical")}d(this,m,"f").observe(this.rootElement);d(this,k,"f").classList.add("placeholder--loaded");this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),d(this,w,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>u(this,y,t,"f"),onLoad:()=>{d(this,k,"f").classList.add("placeholder--fade-out");d(this,y,"f").classList.add("resource--fade-in");this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;d(this,g,"f").theme.unregister(this);(t=d(this,m,"f"))===null||t===void 0?void 0:t.unobserve(this.rootElement)}get rootElement(){return n(this)}};m=new WeakMap,g=new WeakMap,k=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap;x.style=c;export{x as kup_photo_frame};
2
+ //# sourceMappingURL=p-404ce351.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as s,f as t,h as i,H as e,d as h}from"./p-d7c15b0e.js";import{k as l}from"./p-56b44f04.js";import{c as o}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const c=class{constructor(t){s(this,t);this.kupManager=l();this.startTime=performance.now();this.featuresStartTime=null;this.endTime=null;this.content=null;this.customStyle="";this.features={debug:false,language:false,longCycleProp:false,longCycleVar:false,objects:false,objectsFunction:false,theme:false}}async printLifecycleTime(){const s=this.endTime-this.featuresStartTime;const t=this.endTime-this.startTime;this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+t+"ms, while features took "+s+"ms.";return{id:this.rootElement.id,fullTime:t,featuresTime:s}}async refresh(){t(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let s=0;s<1e6;s++){this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now();if(this.features.debug){this.kupManager.debug.logLoad(this,false)}if(this.features.language){this.kupManager.language.register(this)}if(this.features.longCycleProp){this.longCycleProp()}if(this.features.longCycleVar){this.longCycleVar()}if(this.features.objects){this.longCycleObjects()}if(this.features.objectsFunction){this.longCycleObjectsFunction()}if(this.features.theme){this.kupManager.theme.register(this)}}componentDidLoad(){if(this.features.debug){this.kupManager.debug.logLoad(this,true)}this.endTime=performance.now()}componentWillRender(){if(this.features.debug){this.kupManager.debug.logRender(this,false)}}componentDidRender(){if(this.features.debug){this.kupManager.debug.logRender(this,true)}}render(){let s=null;if(this.features.theme){s=this.kupManager.theme.setKupStyle(this.rootElement)}return i(e,{key:"996ddafe0d4e6423ce2479b9cac0ae323939cb71"},s?i("style",null,s):null,i("div",{key:"39eae7739d080800145c30fa1ce713d131d3352f",id:o},this.content))}disconnectedCallback(){if(this.features.language){this.kupManager.language.unregister(this)}if(this.features.theme){this.kupManager.theme.unregister(this)}}get rootElement(){return h(this)}};export{c as kup_probe};
2
- //# sourceMappingURL=p-08887d7c.entry.js.map
1
+ import{r as s,f as t,h as i,H as e,d as h}from"./p-d7c15b0e.js";import{k as l}from"./p-1d215391.js";import{c as o}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const c=class{constructor(t){s(this,t);this.kupManager=l();this.startTime=performance.now();this.featuresStartTime=null;this.endTime=null;this.content=null;this.customStyle="";this.features={debug:false,language:false,longCycleProp:false,longCycleVar:false,objects:false,objectsFunction:false,theme:false}}async printLifecycleTime(){const s=this.endTime-this.featuresStartTime;const t=this.endTime-this.startTime;this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+t+"ms, while features took "+s+"ms.";return{id:this.rootElement.id,fullTime:t,featuresTime:s}}async refresh(){t(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let s=0;s<1e6;s++){this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now();if(this.features.debug){this.kupManager.debug.logLoad(this,false)}if(this.features.language){this.kupManager.language.register(this)}if(this.features.longCycleProp){this.longCycleProp()}if(this.features.longCycleVar){this.longCycleVar()}if(this.features.objects){this.longCycleObjects()}if(this.features.objectsFunction){this.longCycleObjectsFunction()}if(this.features.theme){this.kupManager.theme.register(this)}}componentDidLoad(){if(this.features.debug){this.kupManager.debug.logLoad(this,true)}this.endTime=performance.now()}componentWillRender(){if(this.features.debug){this.kupManager.debug.logRender(this,false)}}componentDidRender(){if(this.features.debug){this.kupManager.debug.logRender(this,true)}}render(){let s=null;if(this.features.theme){s=this.kupManager.theme.setKupStyle(this.rootElement)}return i(e,{key:"996ddafe0d4e6423ce2479b9cac0ae323939cb71"},s?i("style",null,s):null,i("div",{key:"39eae7739d080800145c30fa1ce713d131d3352f",id:o},this.content))}disconnectedCallback(){if(this.features.language){this.kupManager.language.unregister(this)}if(this.features.theme){this.kupManager.theme.unregister(this)}}get rootElement(){return h(this)}};export{c as kup_probe};
2
+ //# sourceMappingURL=p-41a62cd8.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-b4c093c6.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ai as m,ak as b,aj as v,am as k,e as g}from"./p-1d215391.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-d46f8700.js";import"./p-71c0ab9e.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const $=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const z=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,V,A,L,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,$t,zt,St,Mt,Tt,Wt;const Dt=document.documentElement;const Ct=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",St).bind(this)],["SmeupDataTree",D(this,F,"m",Mt).bind(this)],["SmeupTable",D(this,F,"m",Tt).bind(this)],["SmeupDataTable",D(this,F,"m",Tt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));V.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));A.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));L.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,L,"f").length){D(this,L,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,L,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"93af46e356581180658ec85aacb6315d0fc23770"},n("style",{key:"99c8f160706db2a9c5419b574f39adcbf1df8a5a"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"21a361de12cecf8363088cbb936ce5337ee45e63",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakMap,A=new WeakMap,L=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,V,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Dt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,A,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a;const r={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};o.gap=+i.gap>0?`${i.gap}rem`:"1rem";let u=[];if((l=i.sections)===null||l===void 0?void 0:l.length){u=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)));const n=i.sections.some((t=>t.dim));if(!i.gridCols&&i.horizontal){o.gridTemplateColumns=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}if(!i.gridRows&&!i.horizontal){o.gridTemplateRows=n?i.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${i.sections.length}, 1fr)`}}else if((a=i.content)===null||a===void 0?void 0:a.length){u=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)));o.gridTemplateColumns=+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"";o.gridTemplateRows=+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""}const c=n("div",{class:r,style:o},u);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),c):c},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${$(i.absoluteWidth)}px`;const r=`${z(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${$(o)}px`;const a=`${z(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Dt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Dt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",$t).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Dt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",jt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.OBJECT,D(this,F,"m",xt).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",Ot).bind(this)],[u.TIME,D(this,F,"m",wt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Dt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,L,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Dt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Wt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n,s,o){return{initialValue:n||"",label:i||" ",value:n||""}},wt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},jt=function t(e,i,n){return{label:i}},Ot=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},$t=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Tt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Wt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Ct.style=W;export{Ct as kup_input_panel};
2
+ //# sourceMappingURL=p-495b4a15.entry.js.map