@sme.up/ketchup 11.0.0-SNAPSHOT-20241015124136 → 11.0.0-SNAPSHOT-20241015133651

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 (162) hide show
  1. package/dist/cjs/{f-cell-626b7a7b.js → f-cell-8eca61f9.js} +4 -4
  2. package/dist/cjs/{f-cell-626b7a7b.js.map → f-cell-8eca61f9.js.map} +1 -1
  3. package/dist/cjs/{f-chip-96264a96.js → f-chip-657a698b.js} +2 -2
  4. package/dist/cjs/{f-chip-96264a96.js.map → f-chip-657a698b.js.map} +1 -1
  5. package/dist/cjs/{f-paginator-utils-111bcb5d.js → f-paginator-utils-e8954368.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-111bcb5d.js.map → f-paginator-utils-e8954368.js.map} +1 -1
  7. package/dist/cjs/{f-text-field-9e8c3323.js → f-text-field-a489112a.js} +2 -2
  8. package/dist/cjs/{f-text-field-9e8c3323.js.map → f-text-field-a489112a.js.map} +1 -1
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  12. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +6 -6
  13. package/dist/cjs/kup-box.cjs.entry.js +6 -6
  14. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  15. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  16. package/dist/cjs/kup-cell.cjs.entry.js +4 -4
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  18. package/dist/cjs/{kup-data-table-helper-60a18b5e.js → kup-data-table-helper-e665fbe5.js} +2 -2
  19. package/dist/cjs/{kup-data-table-helper-60a18b5e.js.map → kup-data-table-helper-e665fbe5.js.map} +1 -1
  20. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
  27. package/dist/cjs/kup-input-panel.cjs.entry.js +4 -4
  28. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  30. package/dist/cjs/{kup-manager-3b3c6a6b.js → kup-manager-22be97c0.js} +3 -2
  31. package/dist/cjs/kup-manager-22be97c0.js.map +1 -0
  32. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  34. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  35. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  37. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  38. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  39. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  40. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  41. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  42. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  43. package/dist/collection/managers/kup-theme/kup-theme-declarations.js.map +1 -1
  44. package/dist/components/kup-manager.js +2 -1
  45. package/dist/components/kup-manager.js.map +1 -1
  46. package/dist/esm/{f-cell-0bd9bc8c.js → f-cell-582be39b.js} +4 -4
  47. package/dist/esm/{f-cell-0bd9bc8c.js.map → f-cell-582be39b.js.map} +1 -1
  48. package/dist/esm/{f-chip-7a198b38.js → f-chip-add4a0ae.js} +2 -2
  49. package/dist/esm/{f-chip-7a198b38.js.map → f-chip-add4a0ae.js.map} +1 -1
  50. package/dist/esm/{f-paginator-utils-f9a14b0e.js → f-paginator-utils-7b5c0780.js} +2 -2
  51. package/dist/esm/{f-paginator-utils-f9a14b0e.js.map → f-paginator-utils-7b5c0780.js.map} +1 -1
  52. package/dist/esm/{f-text-field-c1cf2b71.js → f-text-field-f2ed44a9.js} +2 -2
  53. package/dist/esm/{f-text-field-c1cf2b71.js.map → f-text-field-f2ed44a9.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_27.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-12596469.js → kup-data-table-helper-1be99de5.js} +2 -2
  64. package/dist/esm/{kup-data-table-helper-12596469.js.map → kup-data-table-helper-1be99de5.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-iframe.entry.js +1 -1
  71. package/dist/esm/kup-image-list.entry.js +4 -4
  72. package/dist/esm/kup-input-panel.entry.js +4 -4
  73. package/dist/esm/kup-lazy.entry.js +1 -1
  74. package/dist/esm/kup-magic-box.entry.js +1 -1
  75. package/dist/esm/{kup-manager-79c3423a.js → kup-manager-82161dea.js} +3 -2
  76. package/dist/esm/kup-manager-82161dea.js.map +1 -0
  77. package/dist/esm/kup-nav-bar.entry.js +1 -1
  78. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  79. package/dist/esm/kup-pdf.entry.js +1 -1
  80. package/dist/esm/kup-photo-frame.entry.js +1 -1
  81. package/dist/esm/kup-planner.entry.js +2 -2
  82. package/dist/esm/kup-probe.entry.js +1 -1
  83. package/dist/esm/kup-qlik.entry.js +1 -1
  84. package/dist/esm/kup-snackbar.entry.js +1 -1
  85. package/dist/esm/kup-typography-list.entry.js +1 -1
  86. package/dist/esm/kup-typography.entry.js +1 -1
  87. package/dist/ketchup/index.esm.js +1 -1
  88. package/dist/ketchup/ketchup.esm.js +1 -1
  89. package/dist/ketchup/{p-e29ab71d.entry.js → p-06c56ec4.entry.js} +2 -2
  90. package/dist/ketchup/{p-b2ec62ed.entry.js → p-102bc318.entry.js} +2 -2
  91. package/dist/ketchup/{p-ba36e4fd.entry.js → p-11c3f3be.entry.js} +2 -2
  92. package/dist/ketchup/{p-c654fca7.entry.js → p-131dfa03.entry.js} +2 -2
  93. package/dist/ketchup/{p-399b9933.js → p-178c8a26.js} +2 -2
  94. package/dist/ketchup/{p-74fdfc38.entry.js → p-1a6acdad.entry.js} +2 -2
  95. package/dist/ketchup/{p-67caac39.entry.js → p-2214607f.entry.js} +2 -2
  96. package/dist/ketchup/{p-655031a0.entry.js → p-24b02a70.entry.js} +2 -2
  97. package/dist/ketchup/{p-b6871892.entry.js → p-2e4de380.entry.js} +2 -2
  98. package/dist/ketchup/{p-b27381aa.js → p-3788598c.js} +2 -2
  99. package/dist/ketchup/p-3788598c.js.map +1 -0
  100. package/dist/ketchup/{p-c0714101.entry.js → p-39478ede.entry.js} +2 -2
  101. package/dist/ketchup/{p-3d42578c.entry.js → p-5340e384.entry.js} +2 -2
  102. package/dist/ketchup/{p-505f9f0b.entry.js → p-557f3e37.entry.js} +2 -2
  103. package/dist/ketchup/p-5dd13932.entry.js +2 -0
  104. package/dist/ketchup/{p-af710e2a.entry.js.map → p-5dd13932.entry.js.map} +1 -1
  105. package/dist/ketchup/{p-516bb0a6.entry.js → p-60c73c17.entry.js} +2 -2
  106. package/dist/ketchup/{p-30bff580.entry.js → p-6a87e1d2.entry.js} +2 -2
  107. package/dist/ketchup/{p-d5fb7b8a.entry.js → p-83dd1290.entry.js} +2 -2
  108. package/dist/ketchup/{p-1ce6fad3.entry.js → p-9333a3e6.entry.js} +2 -2
  109. package/dist/ketchup/{p-5a14e097.entry.js → p-a04245a4.entry.js} +2 -2
  110. package/dist/ketchup/{p-2c8a584c.entry.js → p-a0875191.entry.js} +2 -2
  111. package/dist/ketchup/{p-426ec79b.entry.js → p-ab432adb.entry.js} +2 -2
  112. package/dist/ketchup/{p-e3c9639a.entry.js → p-ac0c9718.entry.js} +2 -2
  113. package/dist/ketchup/{p-b7edd010.js → p-b563176c.js} +2 -2
  114. package/dist/ketchup/{p-42c4a3fa.entry.js → p-bf3b655e.entry.js} +2 -2
  115. package/dist/ketchup/{p-d031e461.js → p-c42a79a7.js} +2 -2
  116. package/dist/ketchup/{p-993317a3.entry.js → p-c6f65088.entry.js} +2 -2
  117. package/dist/ketchup/{p-8f2bdf39.js → p-d002f625.js} +2 -2
  118. package/dist/ketchup/{p-531830b6.entry.js → p-d0774afd.entry.js} +2 -2
  119. package/dist/ketchup/{p-34ec8c06.entry.js → p-d57db62b.entry.js} +2 -2
  120. package/dist/ketchup/{p-62c2268b.entry.js → p-d8c17372.entry.js} +2 -2
  121. package/dist/ketchup/{p-248c1472.entry.js → p-e0a0a49c.entry.js} +2 -2
  122. package/dist/ketchup/{p-245fa3a2.entry.js → p-e18a5f0c.entry.js} +2 -2
  123. package/dist/ketchup/p-f106458a.js +2 -0
  124. package/dist/ketchup/{p-b54a5f2b.js.map → p-f106458a.js.map} +1 -1
  125. package/dist/ketchup/{p-cf931b2f.entry.js → p-f1fa3169.entry.js} +2 -2
  126. package/package.json +1 -1
  127. package/dist/cjs/kup-manager-3b3c6a6b.js.map +0 -1
  128. package/dist/esm/kup-manager-79c3423a.js.map +0 -1
  129. package/dist/ketchup/p-af710e2a.entry.js +0 -2
  130. package/dist/ketchup/p-b27381aa.js.map +0 -1
  131. package/dist/ketchup/p-b54a5f2b.js +0 -2
  132. /package/dist/ketchup/{p-e29ab71d.entry.js.map → p-06c56ec4.entry.js.map} +0 -0
  133. /package/dist/ketchup/{p-b2ec62ed.entry.js.map → p-102bc318.entry.js.map} +0 -0
  134. /package/dist/ketchup/{p-ba36e4fd.entry.js.map → p-11c3f3be.entry.js.map} +0 -0
  135. /package/dist/ketchup/{p-c654fca7.entry.js.map → p-131dfa03.entry.js.map} +0 -0
  136. /package/dist/ketchup/{p-399b9933.js.map → p-178c8a26.js.map} +0 -0
  137. /package/dist/ketchup/{p-74fdfc38.entry.js.map → p-1a6acdad.entry.js.map} +0 -0
  138. /package/dist/ketchup/{p-67caac39.entry.js.map → p-2214607f.entry.js.map} +0 -0
  139. /package/dist/ketchup/{p-655031a0.entry.js.map → p-24b02a70.entry.js.map} +0 -0
  140. /package/dist/ketchup/{p-b6871892.entry.js.map → p-2e4de380.entry.js.map} +0 -0
  141. /package/dist/ketchup/{p-c0714101.entry.js.map → p-39478ede.entry.js.map} +0 -0
  142. /package/dist/ketchup/{p-3d42578c.entry.js.map → p-5340e384.entry.js.map} +0 -0
  143. /package/dist/ketchup/{p-505f9f0b.entry.js.map → p-557f3e37.entry.js.map} +0 -0
  144. /package/dist/ketchup/{p-516bb0a6.entry.js.map → p-60c73c17.entry.js.map} +0 -0
  145. /package/dist/ketchup/{p-30bff580.entry.js.map → p-6a87e1d2.entry.js.map} +0 -0
  146. /package/dist/ketchup/{p-d5fb7b8a.entry.js.map → p-83dd1290.entry.js.map} +0 -0
  147. /package/dist/ketchup/{p-1ce6fad3.entry.js.map → p-9333a3e6.entry.js.map} +0 -0
  148. /package/dist/ketchup/{p-5a14e097.entry.js.map → p-a04245a4.entry.js.map} +0 -0
  149. /package/dist/ketchup/{p-2c8a584c.entry.js.map → p-a0875191.entry.js.map} +0 -0
  150. /package/dist/ketchup/{p-426ec79b.entry.js.map → p-ab432adb.entry.js.map} +0 -0
  151. /package/dist/ketchup/{p-e3c9639a.entry.js.map → p-ac0c9718.entry.js.map} +0 -0
  152. /package/dist/ketchup/{p-b7edd010.js.map → p-b563176c.js.map} +0 -0
  153. /package/dist/ketchup/{p-42c4a3fa.entry.js.map → p-bf3b655e.entry.js.map} +0 -0
  154. /package/dist/ketchup/{p-d031e461.js.map → p-c42a79a7.js.map} +0 -0
  155. /package/dist/ketchup/{p-993317a3.entry.js.map → p-c6f65088.entry.js.map} +0 -0
  156. /package/dist/ketchup/{p-8f2bdf39.js.map → p-d002f625.js.map} +0 -0
  157. /package/dist/ketchup/{p-531830b6.entry.js.map → p-d0774afd.entry.js.map} +0 -0
  158. /package/dist/ketchup/{p-34ec8c06.entry.js.map → p-d57db62b.entry.js.map} +0 -0
  159. /package/dist/ketchup/{p-62c2268b.entry.js.map → p-d8c17372.entry.js.map} +0 -0
  160. /package/dist/ketchup/{p-248c1472.entry.js.map → p-e0a0a49c.entry.js.map} +0 -0
  161. /package/dist/ketchup/{p-245fa3a2.entry.js.map → p-e18a5f0c.entry.js.map} +0 -0
  162. /package/dist/ketchup/{p-cf931b2f.entry.js.map → p-f1fa3169.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-b27381aa.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["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."})(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-8f2bdf39.js.map
1
+ import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-3788598c.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["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."})(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-d002f625.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-d031e461.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ai as m,ak as b,aj as v,am as k,e as g}from"./p-b27381aa.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-b7edd010.js";import"./p-399b9933.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const z=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const $=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,A,L,V,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,zt,$t,St,Mt,Tt;const Wt=document.documentElement;const Dt=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",$t).bind(this)],["SmeupDataTree",D(this,F,"m",St).bind(this)],["SmeupTable",D(this,F,"m",Mt).bind(this)],["SmeupDataTable",D(this,F,"m",Mt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));A.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));L.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));V.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,V,"f").length){D(this,V,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,V,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"525584941a5ebb2b3baea0b002139bb008e58065"},n("style",{key:"dda6f8455cbe807a5e6ab758404dfef606397a82"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"b932a344a74bca096f71290cc8fca64b962b952b",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,V=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,A,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Wt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,L,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a,r,u;let c=[];if((l=i.sections)===null||l===void 0?void 0:l.length){c=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((a=i.content)===null||a===void 0?void 0:a.length){c=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)))}const h={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};if((u=(r=e.row)===null||r===void 0?void 0:r.layout)===null||u===void 0?void 0:u.horizontal){o.maxWidth=i.dim}else{o.maxHeight=i.dim}const p=Object.assign(Object.assign({},o),{gap:+i.gap>0?`${i.gap}rem`:"","grid-template-columns":+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"","grid-template-rows":+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""});const f=n("div",{class:h,style:p},c);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),f):f},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${z(i.absoluteWidth)}px`;const r=`${$(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${z(o)}px`;const a=`${$(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Wt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Wt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",Ot).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Wt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",wt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",jt).bind(this)],[u.TIME,D(this,F,"m",xt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Wt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,V,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Wt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Tt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},wt=function t(e,i,n){return{label:i}},jt=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},Ot=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},$t=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Tt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Dt.style=W;export{Dt as kup_input_panel};
2
- //# sourceMappingURL=p-531830b6.entry.js.map
1
+ import{r as t,c as e,f as i,h as n,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as a}from"./p-c42a79a7.js";import{k as r,a5 as u,F as c,g as h,s as p,h as f,al as d,ai as m,ak as b,aj as v,am as k,e as g}from"./p-3788598c.js";import{F as y}from"./p-c4054aba.js";import{c as _}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-b563176c.js";import"./p-178c8a26.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var x;(function(t){t["TAB"]="tab"})(x||(x={}));var w;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(w||(w={}));const j=12;const O=22;const z=t=>{if(t==0){return j/2}if(!t){return null}if(t===1){return 1.5*j}return t*j};const $=t=>{if(!t){return null}return t*O};const S=t=>{if(!t){return null}return(t-1)*O};const M=t=>{if(!t){return null}return t*j};const T=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:87ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const W=T;var D=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var C=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var E=undefined&&undefined.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var F,I,P,R,N,G,J,A,L,V,B,H,K,X,Y,q,Q,U,Z,tt,et,it,nt,st,ot,lt,at,rt,ut,ct,ht,pt,ft,dt,mt,bt,vt,kt,gt,yt,_t,xt,wt,jt,Ot,zt,$t,St,Mt,Tt;const Wt=document.documentElement;const Dt=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-input-panel-ready",6);F.add(this);I.set(this,r());P.set(this,new Map([["SmeupTreeNode",D(this,F,"m",$t).bind(this)],["SmeupDataTree",D(this,F,"m",St).bind(this)],["SmeupTable",D(this,F,"m",Mt).bind(this)],["SmeupDataTable",D(this,F,"m",Mt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));A.set(this,new Map([[c.BUTTON_LIST,D(this,F,"m",K).bind(this)],[c.EDITOR,D(this,F,"m",X).bind(this)],[c.LABEL,D(this,F,"m",q).bind(this)],[c.TABLE,D(this,F,"m",Y).bind(this)]]));L.set(this,new Map([[x.TAB,D(this,F,"m",it).bind(this)]]));V.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.inputPanelCells=[];this.tabSelected=null}onDataChanged(){C(this,R,structuredClone(this.data),"f");if(D(this,G,"f").length){D(this,G,"f").map((({event:t,handler:e})=>{this.rootElement.removeEventListener(t,e)}));C(this,G,[],"f")}if(D(this,V,"f").length){D(this,V,"f").map((t=>{D(this,I,"f").keysBinding.unregister(t)}));C(this,V,[],"f")}D(this,F,"m",ot).call(this,this.data)}async getProps(t){return h(this,w,t)}async refresh(){i(this)}async setProps(t){p(this,w,t)}componentWillLoad(){D(this,I,"f").debug.logLoad(this,false);D(this,I,"f").language.register(this);D(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});D(this,I,"f").debug.logLoad(this,true)}componentWillRender(){D(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){y(e[t])}}D(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const e=t?[n("p",null,D(this,I,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>D(this,F,"m",B).call(this,t)));return n(s,{key:"525584941a5ebb2b3baea0b002139bb008e58065"},n("style",{key:"dda6f8455cbe807a5e6ab758404dfef606397a82"},D(this,I,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"b932a344a74bca096f71290cc8fca64b962b952b",id:_},e))}disconnectedCallback(){D(this,I,"f").language.unregister(this);D(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,V=new WeakMap,F=new WeakSet,B=function t(e){var i;const s=e.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;let a;if(!((i=s===null||s===void 0?void 0:s.sections)===null||i===void 0?void 0:i.length)){a=e.cells.map((t=>D(this,F,"m",H).call(this,t.cell,e.row,t.column)))}else{a=s.absolute?D(this,F,"m",Z).call(this,e,s):D(this,F,"m",U).call(this,e,s)}const r={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return n("form",{class:r,name:this.rootElement.id,onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)}})}},a,!this.hiddenSubmitButton?n(l,{buttonType:"submit",label:D(this,I,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit"}):null)},H=function t(e,i,s){if(!e){return}const o=D(this,A,"f").get(e.shape);if(o!==undefined){return o(e,s.name)}const l={cell:e,column:s,row:i,component:this,editable:true,renderKup:true,setSizes:true};const r=D(this,F,"m",Q).call(this,e,s.title);if(r){return n("div",{class:{"input-panel__label_container":true}},r,n(a,Object.assign({},l)))}return n(a,Object.assign({},l))},K=function t(e,i){return n(l,Object.assign({icon:e.icon,id:i},e.data,{wrapperClass:"form__submit"}))},X=function t(e,i){const s="kup-editor-save";const o=t=>{const e=this.inputPanelCells.reduce(((t,{cells:e})=>{if(!t){return e.find((({column:t})=>t.name===i)).cell}return t}),null);e.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);D(this,G,"f").push({event:s,handler:o});return n("kup-editor",Object.assign({},e.data,{id:i,isReadOnly:!e.isEditable,showToolbar:true}))},Y=function t(e,i){return n("kup-data-table",Object.assign({id:i,editableData:true,showGroups:true,showFilters:true,showFooter:true},e.data))},q=function t(e,i){return n("span",{class:"input-panel-label",id:i},e.value)},Q=function t(e,i){if(!i){return null}const s=Wt.ketchup.data.cell.getType(e,e.shape);if(s===u.RADIO){return n("span",null,i)}return null},U=function t(e,i){const n=D(this,L,"f").get(i.sectionsType);return n?n(e,i.sections):i.sections.map((t=>D(this,F,"m",tt).call(this,e,t)))},Z=function t(e,i){return i.sections.map((t=>D(this,F,"m",et).call(this,e,t)))},tt=function t(e,i,s=false,o={}){var l,a,r,u;let c=[];if((l=i.sections)===null||l===void 0?void 0:l.length){c=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((a=i.content)===null||a===void 0?void 0:a.length){c=i.content.map((t=>D(this,F,"m",nt).call(this,e,t)))}const h={"input-panel__section":!i.horizontal,"input-panel__horizontal-section":i.horizontal};if((u=(r=e.row)===null||r===void 0?void 0:r.layout)===null||u===void 0?void 0:u.horizontal){o.maxWidth=i.dim}else{o.maxHeight=i.dim}const p=Object.assign(Object.assign({},o),{gap:+i.gap>0?`${i.gap}rem`:"","grid-template-columns":+i.gridCols>0?`repeat(${i.gridCols}, 1fr)`:"","grid-template-rows":+i.gridRows>0?`repeat(${i.gridRows}, 1fr)`:""});const f=n("div",{class:h,style:p},c);return i.title&&!s?n("div",{class:{"input-panel__section_label_container":true}},n("h3",null,i.title),f):f},et=function t(e,i){var s,o;let l=[];if((s=i.sections)===null||s===void 0?void 0:s.length){l=i.sections.map((i=>D(this,F,"m",t).call(this,e,i)))}else if((o=i.content)===null||o===void 0?void 0:o.length){l=i.content.map((t=>D(this,F,"m",st).call(this,e,t)))}const a=`${z(i.absoluteWidth)}px`;const r=`${$(i.absoluteHeight)}px`;const u=`${S(i.absoluteRow)}px`;const c=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:a,"min-width":a,"max-width":a,height:r,"min-height":r,"max-height":r,top:u,left:c,overflow:"auto"};return n("div",{style:h},l)},it=function t(e,i){if(!this.tabSelected){this.tabSelected=i[0].id||"0"}const s=i.map(((t,e)=>({active:(t.id||`${e}`)===this.tabSelected,value:t.title,icon:t.icon,id:t.id||`${e}`})));const o=i.map(((t,i)=>{const n=t.id||`${i}`;return D(this,F,"m",tt).call(this,e,t,true,{display:this.tabSelected!==n?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!D(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const e=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}return n("div",{class:{"input-panel__tabs_container":true}},n("kup-tab-bar",{data:s,customStyle:l}),o)},nt=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));const o=+i.colSpan>0?i.colSpan:!(+i.colSpan>0)&&!(+i.colStart>0)?1:null;const l=o?`span ${o}`:`${i.colStart}`;const a=+i.colEnd>0?`${i.colEnd}`:"";const r=+i.rowSpan>0?i.rowSpan:!(+i.rowSpan>0)&&!(+i.rowStart>0)?1:null;const u=r?`span ${r}`:`${i.rowStart}`;const c=+i.rowEnd>0?`${i.rowEnd}`:"";const h={"grid-column-start":l,"grid-column-end":a,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},st=function t(e,i){const s=e.cells.find((t=>t.column.name===i.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=i.absoluteLength>8?i.absoluteLength:8}else{o=i.absoluteLength}const l=`${z(o)}px`;const a=`${$(1)}px`;const r=`${S(i.absoluteRow)}px`;const u=`${M(i.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:a,"min-height":a,"max-height":a,top:r,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return n("div",{style:h},D(this,F,"m",H).call(this,s.cell,e.row,s.column))},ot=function t(e){var i;const n=((i=e===null||e===void 0?void 0:e.rows)===null||i===void 0?void 0:i.length)?e.rows.reduce(((t,i)=>{const n=e.columns.filter((t=>t.visible)).map((t=>{const e=structuredClone(i.cells[t.name]);const n=e?Object.assign(Object.assign({},e),{data:D(this,F,"m",lt).call(this,e,t),slotData:D(this,F,"m",ct).call(this,e,t),isEditable:true}):null;return{column:t,cell:n}}));return[...t,{cells:n,row:i}]}),[]):[];n.map((({cells:t})=>t.map((({cell:t,column:e})=>{const i=Wt.ketchup.data.cell.getType(t,t.shape);const n=D(this,J,"f").get(i);if(!n){return}const s=this.rootElement.shadowRoot.querySelector(`${n}[id=${e.name}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=n},lt=function t(e,i){const n=Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e,i)),{disabled:!e.editable,id:i.name});const s=Wt.ketchup.data.cell.getType(e,e.shape);const o=e.data||{},l=E(o,["data"]);return s!==u.MULTI_AUTOCOMPLETE&&s!==u.MULTI_COMBOBOX?D(this,F,"m",at).call(this,n,Object.assign({},e.data)):Object.assign(Object.assign({},n),l)},at=function t(e,i){for(const n in i){if(i[n]instanceof Object&&!Array.isArray(i[n])&&n in e){e[n]=D(this,F,"m",t).call(this,e[n],i[n])}else{e[n]=i[n]}}return e},rt=function t(){return this.inputPanelCells.reduce(((t,e)=>{const i=Object.keys(e.row.cells).reduce(((t,i)=>{var n;const s=(n=e.cells.find((t=>t.column.name===i)))===null||n===void 0?void 0:n.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(D(this,F,"m",Ot).call(this,s.data.data,i))}return Object.assign(Object.assign({},t),{[i]:Object.assign(Object.assign({},e.row.cells[i]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...e.cells.map((t=>t.column))],rows:[...t.rows,{cells:i,layout:e.row.layout}]}}),{columns:[],rows:[]})},ut=function t(e,i){if(!e){return null}const n=e.options;const s=i.title;const o=e.value;const l=Wt.ketchup.data.cell.getType(e,e.shape);const a=new Map([[u.AUTOCOMPLETE,D(this,F,"m",dt).bind(this)],[u.BUTTON_LIST,D(this,F,"m",ft).bind(this)],[u.CHART,D(this,F,"m",pt).bind(this)],[u.CHIP,D(this,F,"m",ht).bind(this)],[u.CHECKBOX,D(this,F,"m",mt).bind(this)],[u.COLOR_PICKER,D(this,F,"m",bt).bind(this)],[u.COMBOBOX,D(this,F,"m",dt).bind(this)],[u.EDITOR,D(this,F,"m",vt).bind(this)],[u.MULTI_AUTOCOMPLETE,D(this,F,"m",ht).bind(this)],[u.MULTI_COMBOBOX,D(this,F,"m",ht).bind(this)],[u.NUMBER,D(this,F,"m",wt).bind(this)],[u.DATE,D(this,F,"m",_t).bind(this)],[u.RADIO,D(this,F,"m",gt).bind(this)],[u.STRING,D(this,F,"m",kt).bind(this)],[u.SWITCH,D(this,F,"m",yt).bind(this)],[u.TABLE,D(this,F,"m",jt).bind(this)],[u.TIME,D(this,F,"m",xt).bind(this)]]);const r=a.get(l);return r?r(n,s,o,e,i.name):null},ct=function t(e,i){const n=Wt.ketchup.data.cell.getType(e,e.shape);if(!e.editable){return null}if(n===u.CHIP){return{trailingIcon:true,label:i.title,disabled:!e.editable,id:i.name,fullWidth:false}}if(n===u.MULTI_AUTOCOMPLETE||n===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},D(this,F,"m",dt).call(this,e.options,i.title,null,e,i.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!e.editable,id:i.name})}return null},ht=function t(e,i,n){return d(n)},pt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},ft=function t(e,i,n,s,o){var l,a,r,u;s.data=s.data||{};s.data.onClick=()=>{s.fun?this.customButtonClickHandler({fun:s.fun,cellId:o,currentState:D(this,F,"m",rt).call(this)}):this.submitCb({value:{before:Object.assign({},D(this,R,"f")),after:D(this,F,"m",rt).call(this)},cell:o})};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((a=s.data)===null||a===void 0?void 0:a.disabled)){D(this,V,"f").push((r=s.data)===null||r===void 0?void 0:r.keyShortcut);D(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},dt=function t(e,i,n,s,o){const l=m(n,i,[]);if(s.fun){const t=Wt.ketchup.data.cell.getType(s,s.shape);const e=D(this,N,"f").get(t);if(!e){return}e.map((t=>{const e=t=>{D(this,F,"m",Tt).call(this,t.detail,s.fun,l,o,n)};this.rootElement.addEventListener(t,e);D(this,G,"f").push({event:t,handler:e})}))}else if(e){l.data["kup-list"].data=D(this,F,"m",zt).call(this,e,n)}return l},mt=function t(e,i,n){return b(n,i)},bt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},vt=function t(e,i,n){return{initialValue:n}},kt=function t(e,i,n){return{label:i}},gt=function t(e,i,n){return v(n,e)},yt=function t(e,i,n){return k(n,i)},_t=function t(e,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},xt=function t(e,i,n){return{data:{"kup-text-field":{label:i}}}},wt=function t(e,i,n){return{label:i}},jt=function t(e,i,n,s,o){try{let t=JSON.parse(s.value);if(!t){D(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,g.WARNING);return null}if(t.type!=="SmeupDataTable"){D(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,g.ERROR);return null}return{data:{columns:t.columns.map((e=>Object.assign(Object.assign({},e),{obj:t.rows[0].cells[e.name].obj}))),rows:t.rows.map((e=>Object.assign(Object.assign({},e),{cells:Object.keys(e.cells).reduce(((i,n)=>{const s=t.columns.find((t=>t.name===n));return Object.assign(Object.assign({},i),{[n]:Object.assign(Object.assign({},e.cells[n]),{data:Object.assign(Object.assign({},D(this,F,"m",ut).call(this,e.cells[n],s)),{disabled:e.cells[n].editable===false,id:s.id})})})}),{})})))}}}catch(t){D(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,g.ERROR);return null}},Ot=function t(e,i){const n=Object.assign(Object.assign({},e),{rows:e.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=e.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return n}try{const t=JSON.parse(D(this,R,"f").rows[0].cells[i].value);n.rows=e.rows.map(((e,i)=>s.reduce(((n,s)=>{const o=t.rows[i].cells[s]&&e.cells[s].value!==t.rows[i].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[i]),{cells:Object.assign(Object.assign({},n.cells),{[s]:Object.assign(Object.assign({},t.rows[i].cells[s]),{value:e.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[i]),{cells:n.cells})}),Object.assign(Object.assign({},t.rows[i]),{cells:{}}))));return n}catch(t){return n}},zt=function t(e,i){const n=D(this,P,"f").get(e.type);if(n){return n(e,i)}else{return e.map((t=>({value:t.label,id:t.id,selected:i===t.id})))}},$t=function t(e,i){return e.children.map((e=>{var n;return{id:e.content.codice,value:e.content.testo,selected:i===e.content.codice,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},St=function t(e,i){return e.children.map((e=>{var n;return{id:e.obj.k,value:e.value,selected:i===e.obj.k,children:((n=e.children)===null||n===void 0?void 0:n.length)?D(this,F,"m",t).call(this,e,i):[]}}))},Mt=function t(e,i){return e.rows.map((t=>{var e;const n=t.fields||t.cells;const[s,o]=Object.keys(n);return{id:n[s].value,value:((e=n[o])===null||e===void 0?void 0:e.value)||n[s].value,selected:i===n[s].value}}))},Tt=function t(e,i,n,s,o){if(e.id!==s||e.open===false){return}this.optionsHandler(i,e.inputValue,D(this,F,"m",rt).call(this),e.id).then((t=>{var i;n.data["kup-list"].data=(i=D(this,F,"m",zt).call(this,t,o))!==null&&i!==void 0?i:[];e.comp.refresh()}))};Dt.style=W;export{Dt as kup_input_panel};
2
+ //# sourceMappingURL=p-d0774afd.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as n,f as i,h as e,H as a,d as s}from"./p-d7c15b0e.js";import{k as o,e as p,g as h,s as f}from"./p-b27381aa.js";import{F as l,a as r}from"./p-6568b295.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["data"]="prop of the sub compoennt";t["Style"]="it is the style of the text";t["Border"]="when true it will appear a border";t["BorderWidth"]="it is the width of the border";t["Align"]="text alignment";t["FontBold"]="when true it will display the bold font";t["FontItalic"]="when true it will display the italic ( cursive )";t["FontName"]="it is the name of the font";t["FontSize"]="it is the size of the font of the text";t["FontULine"]="when true it will show the underline";t["FontColor"]="it is the color of the font of the text";t["BackColor"]="it is the background color of the text";t["Type"]="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"})(u||(u={}));const g=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";const y=g;const d=class{constructor(i){t(this,i);this.kupIconClick=n(this,"kup-typographylist-icon-click",6);this.KupClick=n(this,"kup-typographylist-click",6);this.kupManager=o();this.customStyle="";this.data=[];this.type=l.BODY_COMPACT;this.toolbar=false}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){if(!t){t=[]}if(t.columns){this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING);const t=this.data;this.data=this.kupManager.data.row.toNode(t)}}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(t===null){this.kupManager.debug.logMessage(this,"Empty data text.",p.WARNING);return null}const i=this.prepareDataFromTreeNode(t,n);if(!i.value){this.kupManager.debug.logMessage(this,"Empty text.",p.WARNING);return null}const a={value:i.value,type:i.type,toolbar:i.toolbar};return e(r,Object.assign({},a))}prepareDataFromTreeNode(t,n){const i=t.data!=null?Object.assign({},t.data):{};if(this.customStyle!=null&&this.customStyle.trim()!=""){i.customStyle=this.customStyle}if(i.value==null){i.value=t.value}if(!i.wrapperClass){i.wrapperClass=""}if(this.type!=null){i.type=this.type}if(this.toolbar!=null){i.toolbar=this.toolbar}i.id=n.toString();return i}renderTypographys(){if(this.data==null||this.data.length<1){return null}const t=[];for(let n=0;n<this.data.length;n++){const i=this.data[n];let e=null;e=this.renderTypography(i,n);if(e){t.push(e)}}return t}getObjForEvent(t,n){let i=Number(t);let e=-1;if(n!=null&&n.trim()!=""){e=Number(n)}let a=this.data[i];if(e!=-1){return a.children[e].obj}return a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.checkDataset(this.data);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){const t=this.renderTypographys();return e(a,{key:"fe03c54c9dcb80d85fb4ce5fe5b307906113632d"},e("style",{key:"aaa3c98e4d550f2669c5b9db481e390e03a3bf25"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a6eb07b0d4da2fb8b9a818eeb6000c31d7641809",id:c},e("div",{key:"d3496f8ba12d87d2cd51dc5c80817590b62485df",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["checkDataset"]}}};d.style=y;export{d as kup_typography_list};
2
- //# sourceMappingURL=p-34ec8c06.entry.js.map
1
+ import{r as t,c as n,f as i,h as e,H as s,d as a}from"./p-d7c15b0e.js";import{k as o,e as p,g as h,s as f}from"./p-3788598c.js";import{F as l,a as r}from"./p-6568b295.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["data"]="prop of the sub compoennt";t["Style"]="it is the style of the text";t["Border"]="when true it will appear a border";t["BorderWidth"]="it is the width of the border";t["Align"]="text alignment";t["FontBold"]="when true it will display the bold font";t["FontItalic"]="when true it will display the italic ( cursive )";t["FontName"]="it is the name of the font";t["FontSize"]="it is the size of the font of the text";t["FontULine"]="when true it will show the underline";t["FontColor"]="it is the color of the font of the text";t["BackColor"]="it is the background color of the text";t["Type"]="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"})(u||(u={}));const g=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";const y=g;const d=class{constructor(i){t(this,i);this.kupIconClick=n(this,"kup-typographylist-icon-click",6);this.KupClick=n(this,"kup-typographylist-click",6);this.kupManager=o();this.customStyle="";this.data=[];this.type=l.BODY_COMPACT;this.toolbar=false}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){if(!t){t=[]}if(t.columns){this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",p.WARNING);const t=this.data;this.data=this.kupManager.data.row.toNode(t)}}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(t===null){this.kupManager.debug.logMessage(this,"Empty data text.",p.WARNING);return null}const i=this.prepareDataFromTreeNode(t,n);if(!i.value){this.kupManager.debug.logMessage(this,"Empty text.",p.WARNING);return null}const s={value:i.value,type:i.type,toolbar:i.toolbar};return e(r,Object.assign({},s))}prepareDataFromTreeNode(t,n){const i=t.data!=null?Object.assign({},t.data):{};if(this.customStyle!=null&&this.customStyle.trim()!=""){i.customStyle=this.customStyle}if(i.value==null){i.value=t.value}if(!i.wrapperClass){i.wrapperClass=""}if(this.type!=null){i.type=this.type}if(this.toolbar!=null){i.toolbar=this.toolbar}i.id=n.toString();return i}renderTypographys(){if(this.data==null||this.data.length<1){return null}const t=[];for(let n=0;n<this.data.length;n++){const i=this.data[n];let e=null;e=this.renderTypography(i,n);if(e){t.push(e)}}return t}getObjForEvent(t,n){let i=Number(t);let e=-1;if(n!=null&&n.trim()!=""){e=Number(n)}let s=this.data[i];if(e!=-1){return s.children[e].obj}return s.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.checkDataset(this.data);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){const t=this.renderTypographys();return e(s,{key:"fe03c54c9dcb80d85fb4ce5fe5b307906113632d"},e("style",{key:"aaa3c98e4d550f2669c5b9db481e390e03a3bf25"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a6eb07b0d4da2fb8b9a818eeb6000c31d7641809",id:c},e("div",{key:"d3496f8ba12d87d2cd51dc5c80817590b62485df",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{data:["checkDataset"]}}};d.style=y;export{d as kup_typography_list};
2
+ //# sourceMappingURL=p-d57db62b.entry.js.map