@sme.up/ketchup 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/cjs/{f-button-40953600.js → f-button-1d63db82.js} +2 -2
  2. package/dist/cjs/{f-cell-e603ae4f.js → f-cell-abc20cee.js} +59 -6
  3. package/dist/cjs/{f-checkbox-1097ca5d.js → f-checkbox-1148e791.js} +1 -1
  4. package/dist/cjs/{f-chip-01efabde.js → f-chip-ae40e47a.js} +6 -4
  5. package/dist/cjs/{f-image-f741cb4c.js → f-image-c5f5880a.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-35a6a848.js → f-paginator-utils-e8449af2.js} +3 -3
  7. package/dist/cjs/{f-text-field-60a2f24c.js → f-text-field-d200b904.js} +2 -2
  8. package/dist/cjs/{index-ffdb46f6.js → index-1f177abc.js} +120 -2
  9. package/dist/cjs/ketchup.cjs.js +10 -3
  10. package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
  11. package/dist/cjs/{kup-autocomplete_26.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +1028 -861
  12. package/dist/cjs/kup-box.cjs.entry.js +9 -9
  13. package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
  14. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +2 -2
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
  18. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-echart.cjs.entry.js +89 -16
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
  21. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  22. package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
  23. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  25. package/dist/cjs/{kup-manager-6f05ebe1.js → kup-manager-bbbe0491.js} +58 -13
  26. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  28. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  30. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  32. package/dist/cjs/loader.cjs.js +4 -3
  33. package/dist/collection/assets/dialog.js +0 -0
  34. package/dist/collection/assets/echart.js +146 -0
  35. package/dist/collection/assets/index.js +4 -0
  36. package/dist/collection/collection-manifest.json +3 -2
  37. package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +4 -1
  38. package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +12 -0
  39. package/dist/collection/components/kup-card/kup-card.css +0 -22
  40. package/dist/collection/components/kup-card/kup-card.js +1 -40
  41. package/dist/collection/components/kup-chip/kup-chip-declarations.js +2 -0
  42. package/dist/collection/components/kup-chip/kup-chip.js +122 -4
  43. package/dist/collection/components/kup-combobox/kup-combobox.js +4 -2
  44. package/dist/collection/components/kup-data-table/kup-data-table.js +12 -23
  45. package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -0
  46. package/dist/collection/components/kup-dialog/kup-dialog.css +64 -0
  47. package/dist/collection/components/kup-dialog/kup-dialog.js +467 -0
  48. package/dist/collection/components/kup-echart/kup-echart-declarations.js +1 -0
  49. package/dist/collection/components/kup-echart/kup-echart.js +86 -14
  50. package/dist/collection/components/kup-list/kup-list-helper.js +6 -4
  51. package/dist/collection/components/kup-list/kup-list.js +0 -6
  52. package/dist/collection/f-components/f-cell/f-cell-declarations.js +7 -0
  53. package/dist/collection/f-components/f-cell/f-cell.js +17 -0
  54. package/dist/collection/f-components/f-chip/f-chip.js +3 -1
  55. package/dist/collection/managers/kup-data/kup-data.js +4 -0
  56. package/dist/collection/managers/kup-interact/kup-interact.js +33 -1
  57. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  58. package/dist/collection/types/GenericTypes.js +1 -0
  59. package/dist/collection/utils/kup-column-menu/kup-column-menu.js +6 -3
  60. package/dist/components/index.d.ts +9 -50
  61. package/dist/components/index.js +1 -48
  62. package/dist/components/kup-accordion.js +18 -13
  63. package/dist/components/kup-autocomplete.js +1 -1
  64. package/dist/components/kup-autocomplete2.js +1622 -1187
  65. package/dist/components/kup-badge.js +1 -1
  66. package/dist/components/kup-box2.js +18 -13
  67. package/dist/components/kup-button-list.js +1 -1
  68. package/dist/components/kup-button.js +1 -1
  69. package/dist/components/kup-calendar.js +18 -13
  70. package/dist/components/kup-card.js +1 -1
  71. package/dist/components/kup-cell.js +18 -13
  72. package/dist/components/kup-chart.js +1 -1
  73. package/dist/components/kup-checkbox.js +1 -1
  74. package/dist/components/kup-chip.js +1 -1
  75. package/dist/components/kup-color-picker.js +1 -1
  76. package/dist/components/kup-combobox.js +1 -1
  77. package/dist/components/kup-dash-list.js +20 -15
  78. package/dist/components/kup-dash2.js +18 -13
  79. package/dist/components/kup-dashboard.js +18 -13
  80. package/dist/components/kup-data-table.js +1 -1
  81. package/dist/components/kup-date-picker.js +1 -1
  82. package/dist/components/kup-dialog.d.ts +11 -0
  83. package/dist/components/kup-dialog.js +6 -0
  84. package/dist/components/kup-drawer.js +18 -13
  85. package/dist/components/kup-dropdown-button.js +1 -1
  86. package/dist/components/kup-echart2.js +105 -27
  87. package/dist/components/kup-family-tree.js +20 -15
  88. package/dist/components/kup-form.js +1 -1
  89. package/dist/components/kup-gauge.js +1 -1
  90. package/dist/components/kup-grid2.js +18 -13
  91. package/dist/components/kup-iframe.js +18 -13
  92. package/dist/components/kup-image-list.js +18 -13
  93. package/dist/components/kup-image.js +1 -1
  94. package/dist/components/kup-lazy.js +18 -13
  95. package/dist/components/kup-list.js +1 -1
  96. package/dist/components/kup-magic-box.js +20 -15
  97. package/dist/components/kup-nav-bar.js +18 -13
  98. package/dist/components/kup-numeric-picker.js +18 -13
  99. package/dist/components/kup-photo-frame.js +18 -13
  100. package/dist/components/kup-probe.js +18 -13
  101. package/dist/components/kup-progress-bar.js +1 -1
  102. package/dist/components/kup-qlik.js +18 -13
  103. package/dist/components/kup-radio.js +1 -1
  104. package/dist/components/kup-rating.js +1 -1
  105. package/dist/components/kup-snackbar.js +18 -13
  106. package/dist/components/kup-spinner.js +1 -1
  107. package/dist/components/kup-switch.js +1 -1
  108. package/dist/components/kup-tab-bar.js +1 -1
  109. package/dist/components/kup-text-field.js +1 -1
  110. package/dist/components/kup-time-picker.js +1 -1
  111. package/dist/components/kup-tree.js +1 -1
  112. package/dist/esm/{f-button-9aec1bc5.js → f-button-a8843fb2.js} +2 -2
  113. package/dist/esm/{f-cell-556937d0.js → f-cell-aa0acc55.js} +60 -7
  114. package/dist/esm/{f-checkbox-b721178e.js → f-checkbox-9b3f5f5b.js} +1 -1
  115. package/dist/esm/{f-chip-677db32a.js → f-chip-4555fb98.js} +6 -4
  116. package/dist/esm/{f-image-52bb5950.js → f-image-fed7623c.js} +2 -2
  117. package/dist/esm/{f-paginator-utils-d472e336.js → f-paginator-utils-8c88fab3.js} +3 -3
  118. package/dist/esm/{f-text-field-88f92118.js → f-text-field-b74f4b58.js} +2 -2
  119. package/dist/esm/{index-a2197376.js → index-8bd38435.js} +120 -3
  120. package/dist/esm/ketchup.js +7 -3
  121. package/dist/esm/kup-accordion.entry.js +3 -3
  122. package/dist/esm/{kup-autocomplete_26.entry.js → kup-autocomplete_27.entry.js} +1009 -843
  123. package/dist/esm/kup-box.entry.js +9 -9
  124. package/dist/esm/kup-calendar.entry.js +5 -5
  125. package/dist/esm/kup-cell.entry.js +7 -7
  126. package/dist/esm/kup-dash-list.entry.js +2 -2
  127. package/dist/esm/kup-dash_2.entry.js +2 -2
  128. package/dist/esm/kup-dashboard.entry.js +6 -6
  129. package/dist/esm/kup-drawer.entry.js +2 -2
  130. package/dist/esm/kup-echart.entry.js +89 -16
  131. package/dist/esm/kup-family-tree.entry.js +4 -4
  132. package/dist/esm/kup-iframe.entry.js +2 -2
  133. package/dist/esm/kup-image-list.entry.js +8 -8
  134. package/dist/esm/kup-lazy.entry.js +2 -2
  135. package/dist/esm/kup-magic-box.entry.js +3 -3
  136. package/dist/esm/{kup-manager-12e99c22.js → kup-manager-311c87ab.js} +59 -14
  137. package/dist/esm/kup-nav-bar.entry.js +2 -2
  138. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  139. package/dist/esm/kup-photo-frame.entry.js +2 -2
  140. package/dist/esm/kup-probe.entry.js +2 -2
  141. package/dist/esm/kup-qlik.entry.js +2 -2
  142. package/dist/esm/kup-snackbar.entry.js +4 -4
  143. package/dist/esm/loader.js +4 -3
  144. package/dist/esm/polyfills/css-shim.js +1 -1
  145. package/dist/ketchup/ketchup.esm.js +1 -1
  146. package/dist/ketchup/{p-c59e6bc7.entry.js → p-028e4c1d.entry.js} +1 -1
  147. package/dist/ketchup/p-06d55b09.entry.js +39 -0
  148. package/dist/ketchup/p-09b2668f.entry.js +27 -0
  149. package/dist/ketchup/p-115220b5.entry.js +1 -0
  150. package/dist/ketchup/{p-ce1da4a8.entry.js → p-17d827e8.entry.js} +1 -1
  151. package/dist/ketchup/{p-60609877.entry.js → p-1d7f90be.entry.js} +1 -1
  152. package/dist/ketchup/p-1e5fda58.entry.js +1 -0
  153. package/dist/ketchup/{p-ac33139e.entry.js → p-247362de.entry.js} +1 -1
  154. package/dist/ketchup/{p-25617855.js → p-388d18a1.js} +1 -1
  155. package/dist/ketchup/{p-88adddcf.entry.js → p-3a0cf42a.entry.js} +1 -1
  156. package/dist/ketchup/{p-9570ebfa.js → p-48be0d93.js} +1 -1
  157. package/dist/ketchup/p-4c0206cf.entry.js +1 -0
  158. package/dist/ketchup/{p-85c7a3a4.js → p-519f4074.js} +1 -1
  159. package/dist/ketchup/{p-053824eb.entry.js → p-5f920acd.entry.js} +1 -1
  160. package/dist/ketchup/{p-ad3e7b2b.entry.js → p-6ae98bb0.entry.js} +1 -1
  161. package/dist/ketchup/p-6dde2079.entry.js +1 -0
  162. package/dist/ketchup/p-79b0730b.js +1 -1
  163. package/dist/ketchup/{p-4f7302a9.js → p-7e9f8adf.js} +1 -1
  164. package/dist/ketchup/p-7f9912b1.js +1 -0
  165. package/dist/ketchup/p-8df0191d.entry.js +9 -0
  166. package/dist/ketchup/{p-e094ebb8.entry.js → p-910249f5.entry.js} +1 -1
  167. package/dist/ketchup/{p-52f19c4f.entry.js → p-9174622b.entry.js} +1 -1
  168. package/dist/ketchup/p-9dcfbb1e.js +2 -0
  169. package/dist/ketchup/{p-23cd5a68.js → p-9f9b6656.js} +1 -1
  170. package/dist/ketchup/{p-3a7a05a7.entry.js → p-a1708266.entry.js} +1 -1
  171. package/dist/ketchup/p-b67a295b.js +30 -0
  172. package/dist/ketchup/{p-485883cb.entry.js → p-bc68a9de.entry.js} +1 -1
  173. package/dist/ketchup/p-cb28bc8c.js +1 -0
  174. package/dist/ketchup/p-de9375f7.entry.js +1 -0
  175. package/dist/ketchup/{p-f44aba79.entry.js → p-df6617bc.entry.js} +1 -1
  176. package/dist/ketchup/{p-94290b09.entry.js → p-fb6ee94f.entry.js} +1 -1
  177. package/dist/loader/index.d.ts +9 -0
  178. package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +4 -2
  179. package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +6 -0
  180. package/dist/types/components/kup-card/kup-card.d.ts +0 -5
  181. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +5 -0
  182. package/dist/types/components/kup-chip/kup-chip.d.ts +16 -1
  183. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +1 -1
  184. package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -0
  185. package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -0
  186. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -1
  187. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +1 -1
  188. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -1
  189. package/dist/types/components.d.ts +185 -11
  190. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -0
  191. package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +1 -0
  192. package/dist/types/managers/kup-data/kup-data-declarations.d.ts +2 -1
  193. package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -1
  194. package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +2 -2
  195. package/dist/types/managers/kup-interact/kup-interact.d.ts +11 -0
  196. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
  197. package/dist/types/stencil-public-runtime.d.ts +71 -15
  198. package/dist/types/types/GenericTypes.d.ts +1 -0
  199. package/dist/types/utils/filters/filters-declarations.d.ts +2 -0
  200. package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +3 -1
  201. package/package.json +2 -2
  202. package/dist/ketchup/p-1c371df3.entry.js +0 -39
  203. package/dist/ketchup/p-278188bf.js +0 -1
  204. package/dist/ketchup/p-4021d751.entry.js +0 -1
  205. package/dist/ketchup/p-4fdb684f.js +0 -2
  206. package/dist/ketchup/p-5483f20e.js +0 -30
  207. package/dist/ketchup/p-584369be.entry.js +0 -1
  208. package/dist/ketchup/p-6a6c3e69.entry.js +0 -27
  209. package/dist/ketchup/p-751b5708.js +0 -1
  210. package/dist/ketchup/p-775e0d34.entry.js +0 -1
  211. package/dist/ketchup/p-7e013c24.entry.js +0 -1
  212. package/dist/ketchup/p-b0f22298.entry.js +0 -9
  213. package/dist/ketchup/p-e0135ce0.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{E as e,J as t,H as l,C as n,af as r,u as i,y as o,ag as s,ah as a,N as u,ai as c,f,aj as h,a3 as d,ak as p,q as b,l as m}from"./p-5483f20e.js";import{h as v}from"./p-4fdb684f.js";import{F}from"./p-4f7302a9.js";import{F as x}from"./p-6c77a36c.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var g;!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.removableColumns="Sets the possibility to remove the selected column.",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.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."}(g||(g={}));const k="TREE_COLUMN";var T;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(T||(T={}));const y=document.documentElement,C=y.ketchup?y.ketchup.objects:new o,j=y.ketchup?y.ketchup.data:new s;class V extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new w),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(C.isNumber(r.obj)||C.isDate(r.obj)||C.isTime(r.obj)||C.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let p=s.getCheckBoxFilterValues(t,n);if(0==p.length)continue;let b=!1;for(let e=0;e<p.length;e++){let t=p[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}}}if(!b)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new w);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s="TREE_COLUMN"===o?{name:"TREE_COLUMN",title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new w);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const O=document.documentElement;function I(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:d.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=I(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=M(e,n,t[l]);if(0!==r)return r}return 0}return M(e,n,t[0])}))}function M(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function _(e=[],t={},l="",n=[],r,i){return null==i&&(i=new V),i.filterRows(e,t,l,n,r)}function N(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let f={};return t.forEach((t=>{const l=s[0].column,h=t.cells[l];if(h){const d=i(e,l),p=r(d,h),b=h.value;let m=null;for(let e of a)if(e.group.label===p){m=e;break}null===m&&(m={group:{id:b,parent:null,column:l,columnLabel:o[l],expanded:!1,label:p,children:[],obj:h.obj,totals:{}},cells:{}},a.push(m));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=O.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=O.ketchup.objects.isNumber(o.obj);const s=t[r];switch(s){case u.COUNT:e.group.totals[r]=i+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case u.DISTINCT:let a;if(a=l?O.ketchup.math.numberify(c(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let f=e.group.parent;for(;null!=f;){if(n[f.group.id]){let e=n[f.group.id][r];e?e.push(a):(n[f.group.id][r]=[],n[f.group.id][r].push(a))}else n[f.group.id]={},n[f.group.id][r]=[],n[f.group.id][r].push(a);f=f.group.parent}break;case u.SUM:case u.AVERAGE:if(l){const t=O.ketchup.math.numberify(c(o.value));e.group.totals[r]=t+i;let l=e.group.parent;for(;null!=l;){const e=O.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l){const t=e.group.totals[r],l=O.ketchup.math.numberify(c(o.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(O.ketchup.objects.isDate(o.obj)){const t=o.obj?O.ketchup.objects.parseDate(o.obj):O.ketchup.dates.toDayjs(o.value);if(O.ketchup.dates.isValid(t)){const l=O.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(O.ketchup.dates.format(n)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(O.ketchup.dates.format(e)),i.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case u.MAX:if(l){const t=e.group.totals[r],l=O.ketchup.math.numberify(c(o.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(O.ketchup.objects.isDate(o.obj)){const t=o.obj?O.ketchup.objects.parseDate(o.obj):O.ketchup.dates.toDayjs(o.value);if(O.ketchup.dates.isValid(t)){const l=O.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(O.ketchup.dates.format(n)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(O.ketchup.dates.format(e)),i.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=s.indexOf(u.MATH)&&console.warn(`invalid total mode: ${s}`)}}}))}(m,n,t,f)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,r,l)))}(a,n,f),E(a,u.AVERAGE,n),E(a,u.MATH,n),a}function E(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function W(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{W(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=O.ketchup.math.numberify(e.group.totals[l])/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=O.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function B(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function D(e=[],t={}){if(O.ketchup.objects.isEmptyJsObject(e)||O.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=O.ketchup.objects.isNumber(a.obj)?O.ketchup.math.numberify(c(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(O.ketchup.objects.isNumber(a.obj)){const e=O.ketchup.math.numberify(c(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+O.ketchup.math.numberify(r)}}else if(O.ketchup.objects.isDate(a.obj)){-1==r.indexOf(l)&&r.push(l);const e=O.ketchup.dates.toDayjs(a.value);if(O.ketchup.dates.isValid(e)){const r=O.ketchup.dates.toDate(e),i=n[l]?O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(i){let e=[];e.push(r),e.push(i),n[l]=O.ketchup.dates.format(O.ketchup.dates.min(e),f.ISO_DATE)}else n[l]=O.ketchup.dates.format(r,f.ISO_DATE);break;case t[l]===u.MAX:if(i){let e=[];e.push(r),e.push(i),n[l]=O.ketchup.dates.format(O.ketchup.dates.max(e),f.ISO_DATE)}else n[l]=O.ketchup.dates.format(r,f.ISO_DATE)}}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=O.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=O.ketchup.dates.format(n[i]):h(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function L(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function $(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return R(e,o,r,Number(l),0),o}function R(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=S(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=R(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function S(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:U(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function q(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=S(e[l]);return t}function U(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:q(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var z;!function(e){e.SIMPLE="simple",e.FULL="full"}(z||(z={}));const H=document.documentElement,J=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:H.ketchup.language.translate(p.PAGE),helper:H.ketchup.language.translate(p.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:H.ketchup.language.translate(b.ROWS)+" / "+H.ketchup.language.translate(p.PAGE),helper:H.ketchup.language.translate(b.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return v("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==z.SIMPLE?v(F,{icon:"chevron_left",disabled:G(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,v("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==z.SIMPLE?v(F,{icon:"chevron_right",disabled:K(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,v("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?v(F,{icon:"plus",onClick:e.onLoadMore,label:H.ketchup.language.translate(m.LOAD_MORE),styling:x.FLAT,wrapperClass:"load-more-button"}):null)};function K(e){return e.currentPage*e.perPage>=e.max}function G(e){return 1==e.currentPage}function P(e,t,l){if(h(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function Q(e,t){if(h(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{w as F,T as K,V as a,J as b,D as c,P as d,g as e,_ as f,N as g,z as h,B as n,$ as p,Q as r,I as s,k as t}
@@ -1 +0,0 @@
1
- import{r as t,c as e,f as i,h as r,H as a,g as l}from"./p-4fdb684f.js";import{F as o}from"./p-4f7302a9.js";import{F as s}from"./p-6c77a36c.js";import{F as _}from"./p-85c7a3a4.js";import{k as n,g as m,s as f,l as h,R as c}from"./p-5483f20e.js";import{c as u}from"./p-97e8ea42.js";var p;!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."}(p||(p={}));var d,y,k,v,g,x,b,w,j,C,E,T,W,M,S,z,D,L,O,P,R,A,F,X,Y,H,$=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)},B=function(t,e,i,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(t,i):a?a.value=i:e.set(t,i),i};const N=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),d.add(this),y.set(this,[]),k.set(this,!1),v.set(this,0),g.set(this,0),x.set(this,[]),b.set(this,n()),w.set(this,(t=>{const e=t.clientX-$(this,v,"f"),i=t.clientY-$(this,g,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,B(this,v,t.clientX,"f"),B(this,g,t.clientY,"f")})),j.set(this,!1),C.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){$(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){$(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return m(this,p,t)}async refresh(){i(this)}async runAutofit(){const t=$(this,C,"f").clientWidth,e=$(this,C,"f").children[0].clientWidth,i=.01,r=.85*t,a=.95*t;let l=1,o=2e3,s=e;for(;(s<r||s>a)&&o>0&&l>i;)o--,s<r?l+=i:s>a?l-=i:o=0,s=e*l;$(this,C,"f").style.setProperty("--kup_familytree_scale",l<=1?l.toFixed(2):"1")}async setProps(t){f(this,p,t)}componentWillLoad(){$(this,b,"f").debug.logLoad(this,!1),$(this,b,"f").language.register(this),$(this,b,"f").theme.register(this)}componentDidLoad(){$(this,d,"m",Y).call(this),this.autofitOnLoad&&this.runAutofit(),$(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){$(this,b,"f").debug.logRender(this,!1)}componentDidRender(){$(this,j,"f")&&(B(this,j,!1,"f"),this.runAutofit()),$(this,b,"f").debug.logRender(this,!0)}render(){return r(a,{onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),$(this,d,"m",O).call(this,t)},onWheel:t=>{$(this,d,"m",H).call(this,t)}},r("style",null,$(this,b,"f").theme.setKupStyle(this.rootElement)),r("div",{id:u},$(this,d,"m",D).call(this)))}disconnectedCallback(){$(this,b,"f").language.unregister(this),$(this,b,"f").theme.unregister(this)}get rootElement(){return l(this)}};y=new WeakMap,k=new WeakMap,v=new WeakMap,g=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,j=new WeakMap,C=new WeakMap,d=new WeakSet,E=function(t,e,i,a){const l=[];return l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},r("div",{class:"family-tree__line--placeholder"}))),l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||a&&!e}},r("div",{class:"family-tree__line--placeholder"}))),l},T=function t(e){var i;let a=null,l=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(l||(l=[]),l.push(t)):(a||(a=[]),a.push(t))})));const _=this.stackedLeaves&&a&&a.every((t=>!t.children||0==t.children.length)),n=a?2*a.length:1,m={"family-tree__line":!0,"family-tree__line--placeholder":!(!a&&!l),"family-tree__line--vertical":!(!a&&!l)},f={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},c=e.layout||this.layout||1,u={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:s.OUTLINED,title:`${$(this,b,"f").language.translate(h.EXPAND)}/${$(this,b,"f").language.translate(h.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&B(this,j,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let p=null;$(this,d,"m",L).call(this,c)&&(p=r("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:f,cardData:this.cardData,layout:this.cardData?null:c,showSelection:!1}));const y=r("div",{class:"family-tree__item"},r("div",{class:"family-tree__item__wrapper"},$(this,d,"m",L).call(this,c)?p:$(this,d,"m",W).call(this,e,c),this.collapsible&&e.children&&e.children.length>0?r(o,Object.assign({},u)):void 0)),k={"--kup_familytree_staffchildren":(null==l?void 0:l.length.toString())||"0"};return r("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},r("tr",null,r("td",{"data-row":e,colSpan:n},y)),r("tr",null,r("td",{colSpan:n},r("div",{class:m}))),l?[r("tr",null,r("td",{colSpan:n},r("div",{class:Object.assign(Object.assign({},m),{"family-tree__line--staff":!0}),style:k}),r("div",{class:"family-tree__node__staff",style:k},l.map((e=>[r("div",{class:"family-tree__node__staff__item"},$(this,d,"m",t).call(this,e))])))))]:null,l&&a?[r("tr",null,r("td",{colSpan:n},r("div",{class:m})))]:null,a?[r("tr",null,_?r("td",{colSpan:n},r("div",{class:m})):a.map((t=>$(this,d,"m",E).call(this,0==a.indexOf(t),a.indexOf(t)==a.length-1,1==a.length,a.length>2)))),r("tr",null,_?r("td",{colSpan:n},a.map((e=>$(this,d,"m",t).call(this,e)))):a.map((e=>r("td",{colSpan:2},$(this,d,"m",t).call(this,e)))))]:void 0)},W=function(t,e){switch(e){case 2:return $(this,d,"m",S).call(this,t);default:return $(this,d,"m",M).call(this,t)}},M=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--1"},r("div",{class:"family-tree__item__layout__text__title"},t.value))},S=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--2"},r("div",{class:"family-tree__item__layout__color"}),r("div",{class:"family-tree__item__layout__image"},r(_,{resource:t.icon,sizeX:"48px",sizeY:"48px"})),r("div",{class:"family-tree__item__layout__text"},r("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?r("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},z=function(t){return t.map((t=>$(this,d,"m",T).call(this,t)))},D=function(){return r("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>B(this,C,t,"f")},this.data&&this.data.rows&&this.data.rows.length?$(this,d,"m",z).call(this,this.data.rows):r("div",null,$(this,b,"f").language.translate(h.EMPTY_DATA)))},L=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},O=function(t){B(this,v,t.clientX,"f"),B(this,g,t.clientY,"f"),$(this,C,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",$(this,w,"f")),document.removeEventListener("pointerup",e),$(this,C,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",$(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t){const e=[];for(;t&&t!==this.rootElement&&t!==document.body;)e.push(t),t=t.parentNode?t.parentNode:t.host;return e},R=function(t,e){let i,r;if(t)for(let e=t.length-1;e>=0;e--){const a=t[e];if(a.tagName)switch(a.classList.contains("family-tree__item__expand")&&(i=a),a.tagName.toUpperCase()){case"TD":r=a}}let a=null,l=null,o=null;return r&&(a=r["data-cell"],l=r["data-column"],o=r["data-row"]),{cell:a||null,column:l||null,expandButton:i||null,originalEvent:e,row:o||null,td:r||null}},A=function(t){return $(this,d,"m",R).call(this,$(this,d,"m",P).call(this,t.target),t)},F=function(t){return $(this,d,"m",R).call(this,$(this,d,"m",P).call(this,t.target),t)},X=function(t){return $(this,d,"m",R).call(this,$(this,d,"m",P).call(this,t.target),t)},Y=function(){$(this,x,"f").push(this.rootElement),$(this,b,"f").interact.on(this.rootElement,c.TAP,(t=>{if($(this,k,"f"))B(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];$(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",A).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",F).call(this,t)})}})),$(this,b,"f").interact.on(this.rootElement,c.DOUBLETAP,(t=>{switch(t.button){case 0:for(let t=0;t<$(this,y,"f").length;t++)clearTimeout($(this,y,"f")[t]),$(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+$(this,y,"f")[t]+").");B(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",X).call(this,t)})}})),$(this,b,"f").interact.on(this.rootElement,c.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(B(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",F).call(this,t)}))}))},H=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat($(this,C,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let r=t.deltaY>0?e-i:e+i;r<i&&(r=i),$(this,C,"f").style.setProperty("--kup_familytree_scale",r.toFixed(2))}},N.style=':host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-background-color)\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(--kup-familytree-item-h-padding, 8px);--kup_familytree_item_v_padding:var(--kup-familytree-item-v-padding, 10px);--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\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);border:1px solid var(--kup_familytree_lines_color);border-radius:8px;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-secondary-color);border-bottom-left-radius:8px;border-top-left-radius:8px;height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto 10px}.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}';export{N as kup_family_tree}
@@ -1 +0,0 @@
1
- import{r as t,c as e,f as h,h as i,H as s,g as a}from"./p-4fdb684f.js";import{k as o,g as n,s as l}from"./p-5483f20e.js";import{c as p}from"./p-97e8ea42.js";var r,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(r||(r={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(h){t(this,h),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return n(this,r,t)}async getComponent(){return this.lazyComponent}async refresh(){h(this)}async setProps(t){l(this,r,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,h=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),h+=" kup-loaded"):this.showPlaceholder&&(t=e,h+=" kup-to-be-loaded"),i(s,{class:h},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:p},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return a(this)}};d.style=":host{--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}