@sme.up/ketchup 11.0.0-SNAPSHOT-20241118135127 → 11.0.0-SNAPSHOT-20241118143411

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 (165) hide show
  1. package/dist/cjs/{f-cell-2c5c4b63.js → f-cell-99c84f1c.js} +4 -4
  2. package/dist/cjs/{f-cell-2c5c4b63.js.map → f-cell-99c84f1c.js.map} +1 -1
  3. package/dist/cjs/{f-chip-c76e0caa.js → f-chip-29e9258a.js} +2 -2
  4. package/dist/cjs/{f-chip-c76e0caa.js.map → f-chip-29e9258a.js.map} +1 -1
  5. package/dist/cjs/{f-paginator-utils-e30b6e63.js → f-paginator-utils-af69bd51.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-e30b6e63.js.map → f-paginator-utils-af69bd51.js.map} +1 -1
  7. package/dist/cjs/{f-text-field-41132ecd.js → f-text-field-4226081f.js} +2 -2
  8. package/dist/cjs/{f-text-field-41132ecd.js.map → f-text-field-4226081f.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_28.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-f228f568.js → kup-data-table-helper-00427a69.js} +2 -2
  19. package/dist/cjs/{kup-data-table-helper-f228f568.js.map → kup-data-table-helper-00427a69.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-htm.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  27. package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
  28. package/dist/cjs/kup-input-panel.cjs.entry.js +4 -4
  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-77611451.js → kup-manager-fe741ac9.js} +2 -2
  32. package/dist/cjs/{kup-manager-77611451.js.map → kup-manager-fe741ac9.js.map} +1 -1
  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-txt.cjs.entry.js +1 -1
  42. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  43. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  44. package/dist/components/kup-manager.js +1 -1
  45. package/dist/components/kup-manager.js.map +1 -1
  46. package/dist/esm/{f-cell-ed323876.js → f-cell-84b76695.js} +4 -4
  47. package/dist/esm/{f-cell-ed323876.js.map → f-cell-84b76695.js.map} +1 -1
  48. package/dist/esm/{f-chip-493f6e72.js → f-chip-cd564624.js} +2 -2
  49. package/dist/esm/{f-chip-493f6e72.js.map → f-chip-cd564624.js.map} +1 -1
  50. package/dist/esm/{f-paginator-utils-45b88cb0.js → f-paginator-utils-7fd2bb01.js} +2 -2
  51. package/dist/esm/{f-paginator-utils-45b88cb0.js.map → f-paginator-utils-7fd2bb01.js.map} +1 -1
  52. package/dist/esm/{f-text-field-234a66b4.js → f-text-field-66b6f8a6.js} +2 -2
  53. package/dist/esm/{f-text-field-234a66b4.js.map → f-text-field-66b6f8a6.js.map} +1 -1
  54. package/dist/esm/index.js +1 -1
  55. package/dist/esm/kup-accordion.entry.js +1 -1
  56. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  57. package/dist/esm/kup-autocomplete_28.entry.js +6 -6
  58. package/dist/esm/kup-box.entry.js +6 -6
  59. package/dist/esm/kup-calendar.entry.js +2 -2
  60. package/dist/esm/kup-card-list.entry.js +1 -1
  61. package/dist/esm/kup-cell.entry.js +4 -4
  62. package/dist/esm/kup-dashboard.entry.js +2 -2
  63. package/dist/esm/{kup-data-table-helper-dc9ece8a.js → kup-data-table-helper-7807c3bc.js} +2 -2
  64. package/dist/esm/{kup-data-table-helper-dc9ece8a.js.map → kup-data-table-helper-7807c3bc.js.map} +1 -1
  65. package/dist/esm/kup-drawer.entry.js +1 -1
  66. package/dist/esm/kup-echart.entry.js +1 -1
  67. package/dist/esm/kup-editor.entry.js +1 -1
  68. package/dist/esm/kup-family-tree.entry.js +1 -1
  69. package/dist/esm/kup-grid.entry.js +1 -1
  70. package/dist/esm/kup-htm.entry.js +1 -1
  71. package/dist/esm/kup-iframe.entry.js +1 -1
  72. package/dist/esm/kup-image-list.entry.js +4 -4
  73. package/dist/esm/kup-input-panel.entry.js +4 -4
  74. package/dist/esm/kup-lazy.entry.js +1 -1
  75. package/dist/esm/kup-magic-box.entry.js +1 -1
  76. package/dist/esm/{kup-manager-0f056eae.js → kup-manager-e6854c15.js} +2 -2
  77. package/dist/esm/{kup-manager-0f056eae.js.map → kup-manager-e6854c15.js.map} +1 -1
  78. package/dist/esm/kup-nav-bar.entry.js +1 -1
  79. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  80. package/dist/esm/kup-pdf.entry.js +1 -1
  81. package/dist/esm/kup-photo-frame.entry.js +1 -1
  82. package/dist/esm/kup-planner.entry.js +2 -2
  83. package/dist/esm/kup-probe.entry.js +1 -1
  84. package/dist/esm/kup-qlik.entry.js +1 -1
  85. package/dist/esm/kup-snackbar.entry.js +1 -1
  86. package/dist/esm/kup-txt.entry.js +1 -1
  87. package/dist/esm/kup-typography-list.entry.js +1 -1
  88. package/dist/esm/kup-typography.entry.js +1 -1
  89. package/dist/ketchup/index.esm.js +1 -1
  90. package/dist/ketchup/ketchup.esm.js +1 -1
  91. package/dist/ketchup/{p-f8982626.entry.js → p-00696d0b.entry.js} +2 -2
  92. package/dist/ketchup/{p-4e4f3c12.entry.js → p-02d83afd.entry.js} +2 -2
  93. package/dist/ketchup/{p-28a98448.entry.js → p-08a8d90e.entry.js} +2 -2
  94. package/dist/ketchup/{p-e7ba0039.entry.js → p-0f194063.entry.js} +2 -2
  95. package/dist/ketchup/{p-e5b89e72.entry.js → p-0f8be7d2.entry.js} +2 -2
  96. package/dist/ketchup/{p-941633cf.entry.js → p-10cea33b.entry.js} +2 -2
  97. package/dist/ketchup/{p-07101843.entry.js → p-1b23ecb9.entry.js} +2 -2
  98. package/dist/ketchup/{p-8b1f6d22.js → p-1f0bd3bc.js} +2 -2
  99. package/dist/ketchup/{p-8666c112.entry.js → p-1fd1da4a.entry.js} +2 -2
  100. package/dist/ketchup/{p-e4e7cb0a.entry.js → p-36f1f1f2.entry.js} +2 -2
  101. package/dist/ketchup/{p-18c2474c.entry.js → p-3a0e74d7.entry.js} +2 -2
  102. package/dist/ketchup/{p-e177845a.entry.js → p-4e8485bb.entry.js} +2 -2
  103. package/dist/ketchup/{p-4ac7f525.js → p-5403ec7d.js} +2 -2
  104. package/dist/ketchup/{p-6722ad32.entry.js → p-56ebec9a.entry.js} +2 -2
  105. package/dist/ketchup/{p-6a7aad42.entry.js → p-582719d0.entry.js} +2 -2
  106. package/dist/ketchup/{p-d88f2604.entry.js → p-6b510eea.entry.js} +2 -2
  107. package/dist/ketchup/{p-73b94f37.entry.js → p-7fd94ab9.entry.js} +2 -2
  108. package/dist/ketchup/{p-7f6331ba.entry.js → p-822300c4.entry.js} +2 -2
  109. package/dist/ketchup/{p-98d28887.entry.js → p-9466c7b2.entry.js} +2 -2
  110. package/dist/ketchup/{p-7c151495.entry.js → p-9b45f18d.entry.js} +2 -2
  111. package/dist/ketchup/{p-43d46909.entry.js → p-b2a20978.entry.js} +2 -2
  112. package/dist/ketchup/{p-2215ccf4.entry.js → p-c0aed6b3.entry.js} +2 -2
  113. package/dist/ketchup/{p-27163fd2.js → p-c398ed83.js} +2 -2
  114. package/dist/ketchup/{p-f00d7dff.js → p-c618c6fd.js} +2 -2
  115. package/dist/ketchup/p-c71c14ea.entry.js +2 -0
  116. package/dist/ketchup/{p-c88e7d76.entry.js.map → p-c71c14ea.entry.js.map} +1 -1
  117. package/dist/ketchup/{p-525b168f.entry.js → p-cda00e9e.entry.js} +2 -2
  118. package/dist/ketchup/{p-996ba080.entry.js → p-d073f545.entry.js} +2 -2
  119. package/dist/ketchup/{p-fb533065.entry.js → p-d26f1d41.entry.js} +2 -2
  120. package/dist/ketchup/{p-99171aba.js → p-da7ae266.js} +2 -2
  121. package/dist/ketchup/{p-013a555c.entry.js → p-e1c69d06.entry.js} +2 -2
  122. package/dist/ketchup/{p-15f54117.js → p-e1cf074e.js} +4 -4
  123. package/dist/ketchup/p-e1cf074e.js.map +1 -0
  124. package/dist/ketchup/{p-b2699d88.entry.js → p-ee8fc062.entry.js} +2 -2
  125. package/dist/ketchup/{p-5b8896da.entry.js → p-f1d7efa6.entry.js} +2 -2
  126. package/dist/ketchup/{p-dc8e1959.entry.js → p-f9e43ad1.entry.js} +2 -2
  127. package/dist/ketchup/{p-12c06de2.entry.js → p-fcce8e0d.entry.js} +2 -2
  128. package/dist/ketchup/{p-b896d5c4.entry.js → p-ff6a7fca.entry.js} +2 -2
  129. package/package.json +1 -1
  130. package/dist/ketchup/p-15f54117.js.map +0 -1
  131. package/dist/ketchup/p-c88e7d76.entry.js +0 -2
  132. /package/dist/ketchup/{p-f8982626.entry.js.map → p-00696d0b.entry.js.map} +0 -0
  133. /package/dist/ketchup/{p-4e4f3c12.entry.js.map → p-02d83afd.entry.js.map} +0 -0
  134. /package/dist/ketchup/{p-28a98448.entry.js.map → p-08a8d90e.entry.js.map} +0 -0
  135. /package/dist/ketchup/{p-e7ba0039.entry.js.map → p-0f194063.entry.js.map} +0 -0
  136. /package/dist/ketchup/{p-e5b89e72.entry.js.map → p-0f8be7d2.entry.js.map} +0 -0
  137. /package/dist/ketchup/{p-941633cf.entry.js.map → p-10cea33b.entry.js.map} +0 -0
  138. /package/dist/ketchup/{p-07101843.entry.js.map → p-1b23ecb9.entry.js.map} +0 -0
  139. /package/dist/ketchup/{p-8b1f6d22.js.map → p-1f0bd3bc.js.map} +0 -0
  140. /package/dist/ketchup/{p-8666c112.entry.js.map → p-1fd1da4a.entry.js.map} +0 -0
  141. /package/dist/ketchup/{p-e4e7cb0a.entry.js.map → p-36f1f1f2.entry.js.map} +0 -0
  142. /package/dist/ketchup/{p-18c2474c.entry.js.map → p-3a0e74d7.entry.js.map} +0 -0
  143. /package/dist/ketchup/{p-e177845a.entry.js.map → p-4e8485bb.entry.js.map} +0 -0
  144. /package/dist/ketchup/{p-4ac7f525.js.map → p-5403ec7d.js.map} +0 -0
  145. /package/dist/ketchup/{p-6722ad32.entry.js.map → p-56ebec9a.entry.js.map} +0 -0
  146. /package/dist/ketchup/{p-6a7aad42.entry.js.map → p-582719d0.entry.js.map} +0 -0
  147. /package/dist/ketchup/{p-d88f2604.entry.js.map → p-6b510eea.entry.js.map} +0 -0
  148. /package/dist/ketchup/{p-73b94f37.entry.js.map → p-7fd94ab9.entry.js.map} +0 -0
  149. /package/dist/ketchup/{p-7f6331ba.entry.js.map → p-822300c4.entry.js.map} +0 -0
  150. /package/dist/ketchup/{p-98d28887.entry.js.map → p-9466c7b2.entry.js.map} +0 -0
  151. /package/dist/ketchup/{p-7c151495.entry.js.map → p-9b45f18d.entry.js.map} +0 -0
  152. /package/dist/ketchup/{p-43d46909.entry.js.map → p-b2a20978.entry.js.map} +0 -0
  153. /package/dist/ketchup/{p-2215ccf4.entry.js.map → p-c0aed6b3.entry.js.map} +0 -0
  154. /package/dist/ketchup/{p-27163fd2.js.map → p-c398ed83.js.map} +0 -0
  155. /package/dist/ketchup/{p-f00d7dff.js.map → p-c618c6fd.js.map} +0 -0
  156. /package/dist/ketchup/{p-525b168f.entry.js.map → p-cda00e9e.entry.js.map} +0 -0
  157. /package/dist/ketchup/{p-996ba080.entry.js.map → p-d073f545.entry.js.map} +0 -0
  158. /package/dist/ketchup/{p-fb533065.entry.js.map → p-d26f1d41.entry.js.map} +0 -0
  159. /package/dist/ketchup/{p-99171aba.js.map → p-da7ae266.js.map} +0 -0
  160. /package/dist/ketchup/{p-013a555c.entry.js.map → p-e1c69d06.entry.js.map} +0 -0
  161. /package/dist/ketchup/{p-b2699d88.entry.js.map → p-ee8fc062.entry.js.map} +0 -0
  162. /package/dist/ketchup/{p-5b8896da.entry.js.map → p-f1d7efa6.entry.js.map} +0 -0
  163. /package/dist/ketchup/{p-dc8e1959.entry.js.map → p-f9e43ad1.entry.js.map} +0 -0
  164. /package/dist/ketchup/{p-12c06de2.entry.js.map → p-fcce8e0d.entry.js.map} +0 -0
  165. /package/dist/ketchup/{p-b896d5c4.entry.js.map → p-ff6a7fca.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-d7c15b0e.js";import{k as o,g as l,c as a,t as r}from"./p-15f54117.js";import{c as p}from"./p-635bb4b3.js";import{F as u}from"./p-4ac7f525.js";import{F as c}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-2b519589.js";import"./p-d4a879fc.js";var f;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Props of the sub-components.";t["decimals"]="Defaults at false. When set to true, the component has decimals.";t["disabled"]="Defaults at false. When set to true, the component is disabled.";t["initialValue"]="Sets the initial value of the component";t["maxDecimals"]="when set, the component allows you to enter decimals with a maximum of characters.";t["maxIntegers"]="When set, the component allows you to enter integer numbers with a maximum of characters.";t["maxLength"]="When set, the component allows you to enter numbers with a maximum of characters, including decimals.";t["negative"]="Defaults at false. When set to true, the component has negative number."})(f||(f={}));const m=".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;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";const k=m;const g=class{constructor(e){t(this,e);this.kupBlur=i(this,"kup-numericpicker-blur",6);this.kupChange=i(this,"kup-numericpicker-change",6);this.kupClick=i(this,"kup-numericpicker-click",6);this.kupFocus=i(this,"kup-numericpicker-focus",6);this.kupInput=i(this,"kup-numericpicker-input",6);this.kupIconClick=i(this,"kup-numericpicker-iconclick",6);this.kupItemClick=i(this,"kup-numericpicker-itemclick",6);this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6);this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6);this.kupManager=o();this.textfieldEl=null;this.pickerContainerEl=null;this.pickerEl={value:(new Date).toISOString(),date:new Date};this.clickCb=null;this.stateSwitcher=false;this.value="";this.customStyle="";this.data=null;this.decimals=false;this.disabled=false;this.initialValue="";this.maxDecimals=null;this.maxIntegers=null;this.maxLength=null;this.negative=false}onKupPickerItemClick(t){this.setPickerValueSelected(t);this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value});this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value});this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected("");this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value});this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,true)}onkupTextFieldSubmit(t){if(t.key==="Enter"){this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}}onKupIconClick(){if(this.isPickerOpened()){this.closePicker()}else{this.openPicker()}this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){if(this.isPickerOpened()){if(t.key==="Escape"){this.closePicker()}if(t.key==="Enter"){this.setPickerValueSelected()}}}async getValue(){return this.value}async getProps(t){return l(this,f,t)}async refresh(){e(this)}async setFocus(){if(this.textfieldEl!=null){this.textfieldEl.focus()}}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,true);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t;let o=h>-1?t.substring(h+1):"";if(this.maxIntegers&&n.length>this.maxIntegers)n=n.substring(n.length-this.maxIntegers);if(this.maxDecimals&&o.length>this.maxDecimals)o=o.substring(0,this.maxDecimals);while(this.maxLength&&n.length+o.length>this.maxLength){if(o.length>1)o=o.substring(0,o.length-1);else if(n.length>1)n=n.substring(1)}t=h>-1?`${n}.${o}`:n;if(e!=true){this.setValue(t)}if(i!=null){i.emit({id:this.rootElement.id,value:t})}}}setPickerValueSelected(t){if(this.disabled==true){return}if(t==null){t=this.getPickerValueSelected()}this.closePicker();if(t==null){return}this.setValue(t)}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=true;const i=this.pickerContainerEl.style;i.height="auto";i.minWidth=this.textfieldEl.parentElement.clientWidth+"px";if(t!=null){t.classList.add("toggled")}if(this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)){this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement)}else{this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,a.AUTO,true)}this.kupManager.dynamicPosition.start(this.pickerContainerEl);if(!this.clickCb){this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}}this.kupManager.addClickCallback(this.clickCb,true)}closePicker(){this.kupManager.removeClickCallback(this.clickCb);if(!this.isPickerOpened()){return}let t=this.textfieldEl;if(t!=null){t.classList.remove("toggled")}this.pickerContainerEl.menuVisible=false;this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return this.pickerContainerEl.menuVisible==true}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){if(!this.decimals&&!this.maxIntegers)this.maxIntegers=17;if(this.decimals&&!this.maxIntegers&&!this.maxDecimals){this.maxIntegers=15;this.maxDecimals=2}const t=this.rootElement.classList.contains("kup-full-height");const i=this.rootElement.classList.contains("kup-full-width");const e=Object.assign({},this.data["kup-text-field"]);if(!e.icon){e.icon="calculator"}if(e.icon){e.trailingIcon=true}return s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){const t={options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:true}};return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:t,layoutFamily:r.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:true,"onkup-card-click":t=>{if(t.detail.value!=null)this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this);this.value=this.initialValue;if(!this.data){this.data={"kup-text-field":{}}}}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");if(i){this.textfieldEl=i.querySelector("input");c(i)}}this.kupManager.debug.logRender(this,true)}render(){return s(h,{key:"d76abbac915abcc83bac32c74b35822acfe2bfc9"},s("style",{key:"bd6b6d0854cb79f7df85031c246984954f1faec3"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"b495a995883a1ef06a4b9a1921406cb867af1f04",id:p},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this);this.kupManager.theme.unregister(this);if(this.pickerContainerEl){this.pickerContainerEl.remove()}}get rootElement(){return n(this)}};g.style=k;export{g as kup_numeric_picker};
2
- //# sourceMappingURL=p-996ba080.entry.js.map
1
+ import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-d7c15b0e.js";import{k as o,g as l,c as a,t as r}from"./p-e1cf074e.js";import{c as p}from"./p-635bb4b3.js";import{F as u}from"./p-5403ec7d.js";import{F as c}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-2b519589.js";import"./p-d4a879fc.js";var f;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Props of the sub-components.";t["decimals"]="Defaults at false. When set to true, the component has decimals.";t["disabled"]="Defaults at false. When set to true, the component is disabled.";t["initialValue"]="Sets the initial value of the component";t["maxDecimals"]="when set, the component allows you to enter decimals with a maximum of characters.";t["maxIntegers"]="When set, the component allows you to enter integer numbers with a maximum of characters.";t["maxLength"]="When set, the component allows you to enter numbers with a maximum of characters, including decimals.";t["negative"]="Defaults at false. When set to true, the component has negative number."})(f||(f={}));const m=".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;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";const k=m;const g=class{constructor(e){t(this,e);this.kupBlur=i(this,"kup-numericpicker-blur",6);this.kupChange=i(this,"kup-numericpicker-change",6);this.kupClick=i(this,"kup-numericpicker-click",6);this.kupFocus=i(this,"kup-numericpicker-focus",6);this.kupInput=i(this,"kup-numericpicker-input",6);this.kupIconClick=i(this,"kup-numericpicker-iconclick",6);this.kupItemClick=i(this,"kup-numericpicker-itemclick",6);this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6);this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6);this.kupManager=o();this.textfieldEl=null;this.pickerContainerEl=null;this.pickerEl={value:(new Date).toISOString(),date:new Date};this.clickCb=null;this.stateSwitcher=false;this.value="";this.customStyle="";this.data=null;this.decimals=false;this.disabled=false;this.initialValue="";this.maxDecimals=null;this.maxIntegers=null;this.maxLength=null;this.negative=false}onKupPickerItemClick(t){this.setPickerValueSelected(t);this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value});this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value});this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected("");this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value});this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,true)}onkupTextFieldSubmit(t){if(t.key==="Enter"){this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}}onKupIconClick(){if(this.isPickerOpened()){this.closePicker()}else{this.openPicker()}this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){if(this.isPickerOpened()){if(t.key==="Escape"){this.closePicker()}if(t.key==="Enter"){this.setPickerValueSelected()}}}async getValue(){return this.value}async getProps(t){return l(this,f,t)}async refresh(){e(this)}async setFocus(){if(this.textfieldEl!=null){this.textfieldEl.focus()}}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,true);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t;let o=h>-1?t.substring(h+1):"";if(this.maxIntegers&&n.length>this.maxIntegers)n=n.substring(n.length-this.maxIntegers);if(this.maxDecimals&&o.length>this.maxDecimals)o=o.substring(0,this.maxDecimals);while(this.maxLength&&n.length+o.length>this.maxLength){if(o.length>1)o=o.substring(0,o.length-1);else if(n.length>1)n=n.substring(1)}t=h>-1?`${n}.${o}`:n;if(e!=true){this.setValue(t)}if(i!=null){i.emit({id:this.rootElement.id,value:t})}}}setPickerValueSelected(t){if(this.disabled==true){return}if(t==null){t=this.getPickerValueSelected()}this.closePicker();if(t==null){return}this.setValue(t)}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=true;const i=this.pickerContainerEl.style;i.height="auto";i.minWidth=this.textfieldEl.parentElement.clientWidth+"px";if(t!=null){t.classList.add("toggled")}if(this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)){this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement)}else{this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,a.AUTO,true)}this.kupManager.dynamicPosition.start(this.pickerContainerEl);if(!this.clickCb){this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}}this.kupManager.addClickCallback(this.clickCb,true)}closePicker(){this.kupManager.removeClickCallback(this.clickCb);if(!this.isPickerOpened()){return}let t=this.textfieldEl;if(t!=null){t.classList.remove("toggled")}this.pickerContainerEl.menuVisible=false;this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return this.pickerContainerEl.menuVisible==true}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){if(!this.decimals&&!this.maxIntegers)this.maxIntegers=17;if(this.decimals&&!this.maxIntegers&&!this.maxDecimals){this.maxIntegers=15;this.maxDecimals=2}const t=this.rootElement.classList.contains("kup-full-height");const i=this.rootElement.classList.contains("kup-full-width");const e=Object.assign({},this.data["kup-text-field"]);if(!e.icon){e.icon="calculator"}if(e.icon){e.trailingIcon=true}return s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){const t={options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:true}};return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:t,layoutFamily:r.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:true,"onkup-card-click":t=>{if(t.detail.value!=null)this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this);this.value=this.initialValue;if(!this.data){this.data={"kup-text-field":{}}}}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");if(i){this.textfieldEl=i.querySelector("input");c(i)}}this.kupManager.debug.logRender(this,true)}render(){return s(h,{key:"d76abbac915abcc83bac32c74b35822acfe2bfc9"},s("style",{key:"bd6b6d0854cb79f7df85031c246984954f1faec3"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"b495a995883a1ef06a4b9a1921406cb867af1f04",id:p},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this);this.kupManager.theme.unregister(this);if(this.pickerContainerEl){this.pickerContainerEl.remove()}}get rootElement(){return n(this)}};g.style=k;export{g as kup_numeric_picker};
2
+ //# sourceMappingURL=p-d073f545.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-15f54117.js";import"./p-029c7cbe.js";const n=".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}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";const p=n;const h=class{constructor(t){i(this,t);this.kupManager=o();this.config=undefined;this.qlik=undefined;this.appid="";this.app=false;this.grid=[];this.debug=false;this.fluid=false;this.bordered=false;this.defobjsize="400px";this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=false;if(i.noSelections)t=i.noSelections;this.app.getObject(i.obj,i.obj,{noInteraction:false,noSelections:t})}))}));e(true)}))}doSelection(i){return new Promise((t=>{if(i.selections){i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,false,true)}))}t(true)}))}setRender(i){return new Promise((e=>{this.divlist=[];i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";if(this.bordered){o=o+"bordered "}o=o+"width-"+i.colDim+" size-"+i.size;if(i.obj!="")e.push(t("div",{id:i.obj,class:o}));else e.push(t("div",{class:o}))}));this.divlist.push(t("div",{class:"kup-qlik-row"},e))}));e(true)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);this.setRender(this.grid)}render(){let i=null;let e=null;if(this.fluid){i={["kup-qlik-container-fluid"]:true}}else{i={["kup-qlik-container"]:true}}e={["--lyo_obj-height"]:this.defobjsize};return t("div",{key:"990a2317cd30c5a3ca78c987ebbed601b4a6a8b4",class:i,style:e},this.divlist)}componentDidRender(){if(this.debug){console.log("Grid",this.grid)}if(this.qlik){if(this.appid!=""&&!this.app){this.app=this.qlik.openApp(this.appid,this.config)}else{if(this.debug){console.log("App already open:",this.app)}}if(this.app){this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))}}this.kupManager.debug.logRender(this,true)}get rootElement(){return e(this)}};h.style=p;export{h as kup_qlik};
2
- //# sourceMappingURL=p-fb533065.entry.js.map
1
+ import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-e1cf074e.js";import"./p-029c7cbe.js";const n=".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}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";const p=n;const h=class{constructor(t){i(this,t);this.kupManager=o();this.config=undefined;this.qlik=undefined;this.appid="";this.app=false;this.grid=[];this.debug=false;this.fluid=false;this.bordered=false;this.defobjsize="400px";this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=false;if(i.noSelections)t=i.noSelections;this.app.getObject(i.obj,i.obj,{noInteraction:false,noSelections:t})}))}));e(true)}))}doSelection(i){return new Promise((t=>{if(i.selections){i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,false,true)}))}t(true)}))}setRender(i){return new Promise((e=>{this.divlist=[];i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";if(this.bordered){o=o+"bordered "}o=o+"width-"+i.colDim+" size-"+i.size;if(i.obj!="")e.push(t("div",{id:i.obj,class:o}));else e.push(t("div",{class:o}))}));this.divlist.push(t("div",{class:"kup-qlik-row"},e))}));e(true)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);this.setRender(this.grid)}render(){let i=null;let e=null;if(this.fluid){i={["kup-qlik-container-fluid"]:true}}else{i={["kup-qlik-container"]:true}}e={["--lyo_obj-height"]:this.defobjsize};return t("div",{key:"990a2317cd30c5a3ca78c987ebbed601b4a6a8b4",class:i,style:e},this.divlist)}componentDidRender(){if(this.debug){console.log("Grid",this.grid)}if(this.qlik){if(this.appid!=""&&!this.app){this.app=this.qlik.openApp(this.appid,this.config)}else{if(this.debug){console.log("App already open:",this.app)}}if(this.app){this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))}}this.kupManager.debug.logRender(this,true)}get rootElement(){return e(this)}};h.style=p;export{h as kup_qlik};
2
+ //# sourceMappingURL=p-d26f1d41.entry.js.map
@@ -1,2 +1,2 @@
1
- import{C as e,H as t,D as l,B as n,ag as i,v as r,x as s,ai as o,aj as a,J as u,e as f,F as c,ab as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-15f54117.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-99171aba.js.map
1
+ import{C as e,H as t,D as l,B as n,ag as i,v as r,x as s,ai as o,aj as a,J as u,e as f,F as c,ab as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-e1cf074e.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-da7ae266.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-15f54117.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-013a555c.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-e1cf074e.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-e1c69d06.entry.js.map