@sme.up/ketchup 11.0.0-SNAPSHOT-20250110090843 → 11.0.0-SNAPSHOT-20250110102928

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 (193) hide show
  1. package/dist/cjs/{f-cell-a8e37702.js → f-cell-d983064c.js} +5 -5
  2. package/dist/cjs/{f-chip-a1a38005.js → f-chip-6df032a5.js} +1 -1
  3. package/dist/cjs/{f-object-field-a6c12a08.js → f-object-field-f2ef5096.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-39ded702.js → f-paginator-utils-c6892f51.js} +1 -1
  5. package/dist/cjs/{f-text-field-700b8ec5.js → f-text-field-3eba8257.js} +1 -1
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-autocomplete_28.cjs.entry.js +18 -18
  10. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  11. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  12. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  13. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  14. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  15. package/dist/cjs/{kup-data-table-helper-eb507104.js → kup-data-table-helper-8981fb6a.js} +1 -1
  16. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-editor.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-htm.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-image-list.cjs.entry.js +5 -5
  24. package/dist/cjs/kup-input-panel.cjs.entry.js +5 -5
  25. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  27. package/dist/cjs/{kup-manager-8623e363.js → kup-manager-e865005c.js} +4 -1
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  30. package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
  31. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  33. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  34. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  35. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  37. package/dist/cjs/kup-txt.cjs.entry.js +1 -1
  38. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  39. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  40. package/dist/collection/components/kup-data-table/kup-data-table.js +11 -11
  41. package/dist/collection/components/kup-editor/kup-editor.js +1 -1
  42. package/dist/collection/f-components/f-cell/f-cell.js +1 -1
  43. package/dist/collection/managers/kup-data/kup-data.js +4 -1
  44. package/dist/components/index.js +1 -1
  45. package/dist/components/kup-accordion.js +2 -2
  46. package/dist/components/kup-activity-timeline.js +2 -2
  47. package/dist/components/kup-autocomplete.js +1 -1
  48. package/dist/components/kup-badge.js +1 -1
  49. package/dist/components/kup-box.js +1 -1
  50. package/dist/components/kup-button-list.js +1 -1
  51. package/dist/components/kup-button.js +1 -1
  52. package/dist/components/kup-calendar.js +2 -2
  53. package/dist/components/kup-card-list.js +3 -3
  54. package/dist/components/kup-card.js +1 -1
  55. package/dist/components/kup-cell.js +2 -2
  56. package/dist/components/kup-chart.js +1 -1
  57. package/dist/components/kup-checkbox.js +1 -1
  58. package/dist/components/kup-chip.js +1 -1
  59. package/dist/components/kup-color-picker.js +1 -1
  60. package/dist/components/kup-combobox.js +1 -1
  61. package/dist/components/kup-dashboard.js +2 -2
  62. package/dist/components/kup-data-table.js +1 -1
  63. package/dist/components/kup-date-picker.js +1 -1
  64. package/dist/components/kup-dialog.js +1 -1
  65. package/dist/components/kup-drawer.js +2 -2
  66. package/dist/components/kup-dropdown-button.js +1 -1
  67. package/dist/components/kup-echart.js +1 -1
  68. package/dist/components/kup-editor.js +1 -1
  69. package/dist/components/kup-family-tree.js +3 -3
  70. package/dist/components/kup-form.js +1 -1
  71. package/dist/components/kup-gauge.js +1 -1
  72. package/dist/components/kup-grid.js +1 -1
  73. package/dist/components/kup-htm.js +2 -2
  74. package/dist/components/kup-iframe.js +2 -2
  75. package/dist/components/kup-image-list.js +2 -2
  76. package/dist/components/kup-image.js +1 -1
  77. package/dist/components/kup-input-panel.js +3 -3
  78. package/dist/components/kup-lazy.js +2 -2
  79. package/dist/components/kup-list.js +1 -1
  80. package/dist/components/kup-magic-box.js +4 -4
  81. package/dist/components/kup-nav-bar.js +2 -2
  82. package/dist/components/kup-numeric-picker.js +2 -2
  83. package/dist/components/kup-object-field.js +2 -2
  84. package/dist/components/kup-pdf.js +2 -2
  85. package/dist/components/kup-photo-frame.js +2 -2
  86. package/dist/components/kup-planner.js +2 -2
  87. package/dist/components/kup-probe.js +2 -2
  88. package/dist/components/kup-progress-bar.js +1 -1
  89. package/dist/components/kup-qlik.js +2 -2
  90. package/dist/components/kup-radio.js +1 -1
  91. package/dist/components/kup-rating.js +1 -1
  92. package/dist/components/kup-snackbar.js +2 -2
  93. package/dist/components/kup-spinner.js +1 -1
  94. package/dist/components/kup-switch.js +1 -1
  95. package/dist/components/kup-tab-bar.js +1 -1
  96. package/dist/components/kup-text-field.js +1 -1
  97. package/dist/components/kup-time-picker.js +1 -1
  98. package/dist/components/kup-toolbar.js +1 -1
  99. package/dist/components/kup-tree.js +1 -1
  100. package/dist/components/kup-txt.js +2 -2
  101. package/dist/components/kup-typography-list.js +2 -2
  102. package/dist/components/kup-typography.js +2 -2
  103. package/dist/components/{p-10ebf03a.js → p-2ab1c139.js} +2 -2
  104. package/dist/components/{p-c8389c1a.js → p-547a1270.js} +5 -2
  105. package/dist/components/{p-a693f0ec.js → p-8225d20f.js} +2 -2
  106. package/dist/components/{p-5d3022c2.js → p-b5e6074c.js} +13 -13
  107. package/dist/components/{p-3339e382.js → p-dfd05c4c.js} +2 -2
  108. package/dist/components/{p-ebc0afef.js → p-f0473a03.js} +3 -3
  109. package/dist/esm/{f-cell-2047701f.js → f-cell-1ea7aba2.js} +5 -5
  110. package/dist/esm/{f-chip-207d4e6a.js → f-chip-cc0af5b0.js} +1 -1
  111. package/dist/esm/{f-object-field-fc05da83.js → f-object-field-65df4ce0.js} +2 -2
  112. package/dist/esm/{f-paginator-utils-e5824c9d.js → f-paginator-utils-a6ff95c6.js} +1 -1
  113. package/dist/esm/{f-text-field-ae84246a.js → f-text-field-a667b660.js} +1 -1
  114. package/dist/esm/index.js +1 -1
  115. package/dist/esm/kup-accordion.entry.js +1 -1
  116. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  117. package/dist/esm/kup-autocomplete_28.entry.js +18 -18
  118. package/dist/esm/kup-box.entry.js +7 -7
  119. package/dist/esm/kup-calendar.entry.js +2 -2
  120. package/dist/esm/kup-card-list.entry.js +1 -1
  121. package/dist/esm/kup-cell.entry.js +5 -5
  122. package/dist/esm/kup-dashboard.entry.js +2 -2
  123. package/dist/esm/{kup-data-table-helper-814e63ca.js → kup-data-table-helper-7064700b.js} +1 -1
  124. package/dist/esm/kup-drawer.entry.js +1 -1
  125. package/dist/esm/kup-echart.entry.js +1 -1
  126. package/dist/esm/kup-editor.entry.js +2 -2
  127. package/dist/esm/kup-family-tree.entry.js +1 -1
  128. package/dist/esm/kup-grid.entry.js +1 -1
  129. package/dist/esm/kup-htm.entry.js +1 -1
  130. package/dist/esm/kup-iframe.entry.js +1 -1
  131. package/dist/esm/kup-image-list.entry.js +5 -5
  132. package/dist/esm/kup-input-panel.entry.js +5 -5
  133. package/dist/esm/kup-lazy.entry.js +1 -1
  134. package/dist/esm/kup-magic-box.entry.js +1 -1
  135. package/dist/esm/{kup-manager-69018613.js → kup-manager-2cecde50.js} +4 -1
  136. package/dist/esm/kup-nav-bar.entry.js +1 -1
  137. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  138. package/dist/esm/kup-object-field.entry.js +3 -3
  139. package/dist/esm/kup-pdf.entry.js +1 -1
  140. package/dist/esm/kup-photo-frame.entry.js +1 -1
  141. package/dist/esm/kup-planner.entry.js +2 -2
  142. package/dist/esm/kup-probe.entry.js +1 -1
  143. package/dist/esm/kup-qlik.entry.js +1 -1
  144. package/dist/esm/kup-snackbar.entry.js +1 -1
  145. package/dist/esm/kup-txt.entry.js +1 -1
  146. package/dist/esm/kup-typography-list.entry.js +1 -1
  147. package/dist/esm/kup-typography.entry.js +1 -1
  148. package/dist/ketchup/index.esm.js +1 -1
  149. package/dist/ketchup/ketchup.esm.js +1 -1
  150. package/dist/ketchup/{p-1de5af30.entry.js → p-02f7572a.entry.js} +1 -1
  151. package/dist/ketchup/{p-d3dec47b.entry.js → p-0488ffed.entry.js} +1 -1
  152. package/dist/ketchup/{p-ca700b27.entry.js → p-06d9d159.entry.js} +1 -1
  153. package/dist/ketchup/p-1a234ef5.js +1 -0
  154. package/dist/ketchup/{p-b15208a3.entry.js → p-253ebc7b.entry.js} +1 -1
  155. package/dist/ketchup/{p-3dddbeba.entry.js → p-334a82ad.entry.js} +1 -1
  156. package/dist/ketchup/{p-9fb64fa4.entry.js → p-3d30da76.entry.js} +1 -1
  157. package/dist/ketchup/{p-7029eb59.entry.js → p-616a1fb9.entry.js} +1 -1
  158. package/dist/ketchup/{p-e2d84f0b.entry.js → p-61c7295c.entry.js} +1 -1
  159. package/dist/ketchup/p-688c9ac5.entry.js +1 -0
  160. package/dist/ketchup/{p-8ce7aae9.entry.js → p-6bd80586.entry.js} +1 -1
  161. package/dist/ketchup/{p-d7991871.entry.js → p-6f145f53.entry.js} +1 -1
  162. package/dist/ketchup/{p-f7136e2e.entry.js → p-74dcb62d.entry.js} +1 -1
  163. package/dist/ketchup/{p-556e06eb.entry.js → p-78cc215e.entry.js} +1 -1
  164. package/dist/ketchup/{p-a3247374.entry.js → p-7bb35e89.entry.js} +1 -1
  165. package/dist/ketchup/{p-59ea2e16.js → p-8e4212a7.js} +1 -1
  166. package/dist/ketchup/{p-f943d857.entry.js → p-905aa115.entry.js} +1 -1
  167. package/dist/ketchup/{p-613e2c59.entry.js → p-92a731c1.entry.js} +1 -1
  168. package/dist/ketchup/{p-ea4fd414.entry.js → p-957d2864.entry.js} +1 -1
  169. package/dist/ketchup/{p-3f5ee4c7.entry.js → p-9bf28495.entry.js} +1 -1
  170. package/dist/ketchup/{p-8270992b.entry.js → p-a35d9244.entry.js} +1 -1
  171. package/dist/ketchup/p-a905d4a7.js +1 -0
  172. package/dist/ketchup/{p-f1d16d73.js → p-ac3b7d2c.js} +1 -1
  173. package/dist/ketchup/{p-b47ad4fe.entry.js → p-ac4db706.entry.js} +2 -2
  174. package/dist/ketchup/{p-f4372c3c.entry.js → p-b14e4ae1.entry.js} +1 -1
  175. package/dist/ketchup/{p-8667f590.entry.js → p-bdc41b60.entry.js} +1 -1
  176. package/dist/ketchup/{p-b9094df4.js → p-ccc4a1ea.js} +1 -1
  177. package/dist/ketchup/{p-474e978a.entry.js → p-d066bbc9.entry.js} +1 -1
  178. package/dist/ketchup/{p-e2c78ebc.js → p-da7e333d.js} +1 -1
  179. package/dist/ketchup/{p-c8c31335.entry.js → p-dfd6a93e.entry.js} +1 -1
  180. package/dist/ketchup/p-e3e74d87.entry.js +1 -0
  181. package/dist/ketchup/{p-5d98bad4.entry.js → p-e4fead91.entry.js} +1 -1
  182. package/dist/ketchup/{p-ba661cef.entry.js → p-eb4e0f54.entry.js} +1 -1
  183. package/dist/ketchup/{p-3fcc6d1d.entry.js → p-f46d1a6f.entry.js} +1 -1
  184. package/dist/ketchup/{p-24dddc23.entry.js → p-f563967a.entry.js} +2 -2
  185. package/dist/ketchup/p-f79d76b3.js +1 -0
  186. package/dist/ketchup/{p-a29926c9.entry.js → p-f81a7dd5.entry.js} +1 -1
  187. package/dist/ketchup/{p-24015160.entry.js → p-fe321427.entry.js} +1 -1
  188. package/package.json +1 -1
  189. package/dist/ketchup/p-2252ad30.js +0 -1
  190. package/dist/ketchup/p-6954ad12.js +0 -1
  191. package/dist/ketchup/p-7982cbcf.entry.js +0 -1
  192. package/dist/ketchup/p-8ddd83f1.js +0 -1
  193. package/dist/ketchup/p-fd091486.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,f as i,h as e,H as a,d as o}from"./p-b0368f88.js";import{k as s,g as n,s as l,h as c,e as p,ay as h,Q as r,az as f,W as u,d}from"./p-b9094df4.js";import{a as g}from"./p-e3062c19.js";import{F as m}from"./p-f2213e00.js";import{c as b}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var k,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(k||(k={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=s(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return n(this,k,t)}async refresh(){i(this)}async setProps(t){l(this,k,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],a={};if(this.display===x.JSON)a.initialValue=this.data?JSON.stringify(this.data,null,2):"",a.textArea=!0,i.push(e("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:a.data=this.data,i.push(e("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data,i.push(e("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data,i.push(e("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data,a.series=[],a.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==a.axis?a.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):a.axis=i.name}0===a.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",p.WARNING),a.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",p.WARNING),i.push(e(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},a)));break;case x.DATATABLE:a.data=this.data,a.autoFillMissingCells=!0,i.push(e("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data,i.push(e("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",p.ERROR)}else i.push(e("div",{class:"empty"},e(m,{sizeY:"100px",resource:"move_to_inbox"}),e("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),e=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(e&&e.name?i.columns?this.data.columns.find((t=>t.name===e.name))||i.columns.push(e):i.columns=[e]:this.kupManager.debug.logMessage(this,"Invalid column received.",p.WARNING),a&&(i.rows?i.rows.push(a):i.rows=[a]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${r}],[${f}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{key:"19559ab46345e9c3ecc29275426ec178ef11bd0b"},e("style",{key:"2ea8d1c9c0806f6473ca57d5a40c6133cf18299b"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"547b20e88aae14de3f632f0b110752ea233b0d1c",id:b},e("div",{key:"69a70ca5e15dc286598572c0322981b20c6254b4",class:"magic-box-wrapper"},e("div",{key:"5993e844304c4c9dd55ab66cf06cb4e9262bd14e",class:"actions",id:"drag-handle"},e("kup-combobox",Object.assign({key:"4caa2853c7cb8001d63f4d7d03c9133014a8d3e7"},this.comboboxProps())),e("kup-button",{key:"63ba56d1ac393295f2bf26ae7b868c2b7c7d216d",styling:g.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),e("kup-button",{key:"530dcfc48a20edc0e4907a87a417c8a538565de2",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),e("div",{key:"84d53eb1166f5421071f89078cfeda2c9e958420",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
1
+ import{r as t,f as i,h as e,H as a,d as o}from"./p-b0368f88.js";import{k as s,g as n,s as c,h as l,e as p,ay as h,Q as r,az as f,W as u,d}from"./p-ccc4a1ea.js";import{a as g}from"./p-e3062c19.js";import{F as m}from"./p-f2213e00.js";import{c as k}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var b,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(b||(b={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=s(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return n(this,b,t)}async refresh(){i(this)}async setProps(t){c(this,b,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(l.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],a={};if(this.display===x.JSON)a.initialValue=this.data?JSON.stringify(this.data,null,2):"",a.textArea=!0,i.push(e("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:a.data=this.data,i.push(e("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data,i.push(e("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data,i.push(e("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data,a.series=[],a.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==a.axis?a.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):a.axis=i.name}0===a.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",p.WARNING),a.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",p.WARNING),i.push(e(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},a)));break;case x.DATATABLE:a.data=this.data,a.autoFillMissingCells=!0,i.push(e("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data,i.push(e("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",p.ERROR)}else i.push(e("div",{class:"empty"},e(m,{sizeY:"100px",resource:"move_to_inbox"}),e("div",{class:"empty-text"},this.kupManager.language.translate(l.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),e=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(e&&e.name?i.columns?this.data.columns.find((t=>t.name===e.name))||i.columns.push(e):i.columns=[e]:this.kupManager.debug.logMessage(this,"Invalid column received.",p.WARNING),a&&(i.rows?i.rows.push(a):i.rows=[a]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${r}],[${f}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{key:"19559ab46345e9c3ecc29275426ec178ef11bd0b"},e("style",{key:"2ea8d1c9c0806f6473ca57d5a40c6133cf18299b"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"547b20e88aae14de3f632f0b110752ea233b0d1c",id:k},e("div",{key:"69a70ca5e15dc286598572c0322981b20c6254b4",class:"magic-box-wrapper"},e("div",{key:"5993e844304c4c9dd55ab66cf06cb4e9262bd14e",class:"actions",id:"drag-handle"},e("kup-combobox",Object.assign({key:"4caa2853c7cb8001d63f4d7d03c9133014a8d3e7"},this.comboboxProps())),e("kup-button",{key:"63ba56d1ac393295f2bf26ae7b868c2b7c7d216d",styling:g.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),e("kup-button",{key:"530dcfc48a20edc0e4907a87a417c8a538565de2",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),e("div",{key:"84d53eb1166f5421071f89078cfeda2c9e958420",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,f as i,h as a,H as n,d as o}from"./p-b0368f88.js";import{k as s,g as p,s as r}from"./p-ccc4a1ea.js";import{c}from"./p-635bb4b3.js";import{F as l}from"./p-504fe614.js";import"./p-1ee561ba.js";import"./p-e3062c19.js";import"./p-f2213e00.js";const f="snackbar";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const k=class{constructor(i){t(this,i),this.kupActionClick=e(this,"kup-snackbar-actionclick",6),this.kupTimeoutComplete=e(this,"kup-snackbar-timeoutcomplete",6),this.kupManager=s(),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.header="",this.timeout=null}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}onKupTimeoutComplete(){this.kupTimeoutComplete.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){r(this,h,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide(),this.onKupTimeoutComplete()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return a(n,{key:"890b1234a2d5593b9b415feb1da06e0982b1146e","kup-visible":this.visible},a("style",{key:"c051deb2512ad890cfc1a6457df7324903911155"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"4372f0bcb5ee5095fefa48ec0fbfd6cdf38afe44",id:c},a("div",{key:"1752bef794c75497c724bec4fc18a2c222c48455",class:f},a("div",{key:"ca97d5630bdc691754629705cdaef76cdcdb8396",class:"snackbar__text__block"},a("div",{key:"4d1aa9bee9c516feeb0af00283712489ad4c70b6",class:`${f}__header`},this.header),a("div",{key:"b460834174f423ada45fce03b32db0a7a4b6581a",class:`${f}__text`},this.text)),this.actionButton||this.closeButton?a("div",{class:`${f}__buttons`},this.actionButton?a("div",{class:`${f}__action`},a(l,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?a("div",{class:`${f}__close`},a(l,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};k.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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_snackbar_border_left_color:var(\n --kup-snackbar-border-left-color,\n var(--kup-border-interactive)\n );--kup_snackbar_background_color:var(\n --kup-snackbar-background-color,\n var(--kup-layer-0-inverted)\n );--kup_snackbar_text_color:var(\n --kup-snackbar-text-color,\n var(--kup-text-primary-inverted)\n );--kup_snackbar_text_color:var(--kup-snackbar-text-color, var(--kup-layer-1));animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{box-sizing:border-box;display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background-color:var(--kup_snackbar_background_color);color:var(--kup_snackbar_text_color);display:flex;justify-content:space-between;max-width:672px;min-height:48px;min-width:344px;border-left:4px solid var(--kup_snackbar_border_left_color);padding:0 var(--kup-space-05)}.snackbar .snackbar__text__block{padding:var(--kup-space-05) 0;color:var(--kup_snackbar_text_color)}.snackbar__header{pointer-events:all;word-break:break-word;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.snackbar__text{pointer-events:all;word-break:break-word;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}.snackbar__buttons{align-items:center;display:flex;justify-content:flex-end;pointer-events:all;width:max-content}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@media (min-width: 768px){.snackbar__text__block{padding:var(--kup-space-05) 0;min-width:350px}}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{k as kup_snackbar}
@@ -1 +1 @@
1
- import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{F as a}from"./p-e2c78ebc.js";import{k as u,a6 as r,F as h,g as c,s as p,h as f,ab as d,ah as m,ae as b,ag as v,af as g,ai as k,e as _,O as x}from"./p-b9094df4.js";import{F as y}from"./p-7db300e0.js";import{F as w,a as j}from"./p-60cfddce.js";import{c as O}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-982a5cfc.js";import"./p-2252ad30.js";import"./p-6954ad12.js";import"./p-f1d16d73.js";import"./p-1ee561ba.js";import"./p-c56195a0.js";var F,$,T,z;!function(t){t.TAB="tab"}(F||(F={})),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",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus."}($||($={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}(T||(T={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(z||(z={}));const E={"*F01":"F1","*F02":"F2","*F03":"F3","*F04":"F4","*F05":"F5","*F06":"F6","*F07":"F7","*F08":"F8","*F09":"F9","*F10":"F10","*F11":"F11","*F12":"F12","*F13":"shift+F1","*F14":"shift+F2","*F15":"shift+F3","*F16":"shift+F4","*F17":"shift+F5","*F18":"shift+F6","*F19":"shift+F7","*F20":"shift+F8","*F21":"shift+F9","*F22":"shift+F10","*F23":"shift+F11","*F24":"shift+F12","*ENT":"Enter","*PDN":"PageDown","*PUP":"PageUp"},M=t=>0==t?6:t?1===t?18:12*t:null,S=t=>t?22*t:null,C=t=>t?22*(t-1):null,D=t=>t?12*t:null;var P,L,W,I,N,H,R,A,U,K,G,V,B,J,X,Y,q,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,rt,ht,ct,pt,ft,dt,mt,bt,vt,gt,kt,_t,xt,yt,wt,jt,Ot,Ft,$t,Tt,zt,Et,Mt,St,Ct,Dt,Pt,Lt,Wt,It,Nt,Ht,Rt,At,Ut,Kt,Gt,Vt,Bt,Jt=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},Xt=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const Yt=document.documentElement,qt=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),P.add(this),L.set(this,u()),W.set(this,void 0),I.set(this,new Map([["SmeupTreeNode",Jt(this,P,"m",Ct).bind(this)],["SmeupDataTree",Jt(this,P,"m",Dt).bind(this)],["SmeupTable",Jt(this,P,"m",Pt).bind(this)],["SmeupDataTable",Jt(this,P,"m",Pt).bind(this)]])),N.set(this,null),H.set(this,new Map([[r.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[r.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[r.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[r.MULTI_COMBOBOX,["kup-combobox-iconclick"]]])),R.set(this,[]),A.set(this,new Map([[r.DATE,"kup-date-picker"],[r.TIME,"kup-time-picker"]])),U.set(this,new Map([[h.BUTTON_LIST,Jt(this,P,"m",X).bind(this)],[h.LABEL,Jt(this,P,"m",Q).bind(this)],[h.TABLE,Jt(this,P,"m",q).bind(this)]])),K.set(this,new Map([[F.TAB,Jt(this,P,"m",st).bind(this)]])),G.set(this,[]),this.buttonPosition=z.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.inputPanelPosition=T.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){Xt(this,N,structuredClone(this.data),"f"),Jt(this,R,"f").length&&(Jt(this,R,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),Xt(this,R,[],"f")),Jt(this,G,"f").length&&(Jt(this,G,"f").map((t=>{Jt(this,L,"f").keysBinding.unregister(t)})),Xt(this,G,[],"f")),this.data&&Jt(this,P,"m",rt).call(this,this.data)}async getProps(t){return c(this,$,t)}async refresh(){n(this)}async setProps(t){p(this,$,t)}componentWillLoad(){Jt(this,L,"f").debug.logLoad(this,!1),Jt(this,L,"f").language.register(this),Jt(this,L,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Jt(this,P,"m",Kt).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Jt(this,P,"m",Gt).call(this),Jt(this,L,"f").debug.logLoad(this,!0)}componentWillRender(){Jt(this,L,"f").debug.logRender(this,!1)}componentDidRender(){if(Jt(this,W,"f")){const t=Jt(this,W,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)y(t[i])}Jt(this,L,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Jt(this,L,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>Jt(this,P,"m",B).call(this,t)));return e(l,{key:"46ca5065f8b29c17cbf82792698ca30b49b7aebb","onKup-cell-blur":Jt(this,P,"m",It).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Jt(this,P,"m",kt).bind(this),"onKup-autocomplete-iconclick":Jt(this,P,"m",kt).bind(this),"onKup-combobox-iconclick":t=>Jt(this,P,"m",kt).call(this,t,!0)},e("style",{key:"3b47a0c817308efdd984e9abfd86fad33d9e37bd"},Jt(this,L,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"5aa429efa68411c420beba6ec7d58395740d8968",id:O},t))}disconnectedCallback(){Jt(this,L,"f").language.unregister(this),Jt(this,L,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};L=new WeakMap,W=new WeakMap,I=new WeakMap,N=new WeakMap,H=new WeakMap,R=new WeakMap,A=new WeakMap,U=new WeakMap,K=new WeakMap,G=new WeakMap,P=new WeakSet,V=function(t){return this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null)},B=function(t){var i,n;const l=t.row.layout,s=(null==l?void 0:l.horizontal)||!1,a={};let u;if(null===(i=null==l?void 0:l.sections)||void 0===i?void 0:i.length)if(l.absolute)u=Jt(this,P,"m",it).call(this,t,l),a.height=22*(t=>{let i=0;return t.sections.forEach((t=>{t.content.forEach((t=>{t.absoluteRow>i&&(i=t.absoluteRow+(t.absoluteHeight>1?t.absoluteHeight:0))}))})),i})(l)+12+"px";else{if(!l.sectionsType){const i=l.sections.some((t=>t.dim));a.display="grid",this.inputPanelPosition!==T.INLINE&&this.inputPanelPosition!==T.UPINLINE||(a.display=""),l.horizontal?a.gridTemplateColumns=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(a.gridTemplateRows=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${l.sections.length}, 1fr)`)}u=Jt(this,P,"m",tt).call(this,t,l)}else u=t.cells.map((i=>Jt(this,P,"m",J).call(this,i.cell,t.row,i.column)));const r={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==z.RIGHT},h={"input-panel":!0,"input-panel--column":!s,"input-panel--absolute":null==l?void 0:l.absolute,"input-panel--inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE},c={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},p={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:j.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:r,ref:t=>Xt(this,W,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)}})},onContextMenu:t=>{t.preventDefault()}},e("div",{class:"input-panel__typography"},e(w,Object.assign({},p))),e("div",{class:h,style:a},u),e("div",{class:c},e(o,{buttonType:"submit",label:Jt(this,L,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},J=function(t,i,n){var l;if(!t)return;const s=Jt(this,U,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);const o={cell:t,column:n,row:i,component:this,editable:!0,renderKup:!0,setSizes:!0},u=Jt(this,P,"m",Z).call(this,t,n.title);return u?e("div",{class:{"input-panel__label_container":!0}},u,e(a,Object.assign({},o))):e(a,Object.assign({},o))},X=function(t,{name:i}){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},Y=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Jt(this,P,"m",Rt).call(this,t.detail.node,t.detail.node.id)}}))},q=function(t,{name:i}){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},Q=function(t,i,n){const l=Yt.ketchup.data.cell.getType(t,t.shape),s="input-panel-label",o=n?" input-panel-label--legacy-look":"";return l===r.NUMBER?e("span",{class:`${s}${o}${l===r.NUMBER?" input-panel-label-number":""}`,id:i.name},d(i,t)):e("span",{class:`${s}${o}`,id:i.name},t.value)},Z=function(t,i){return i&&Yt.ketchup.data.cell.getType(t,t.shape)===r.RADIO?e("span",null,i):null},tt=function(t,i){const n=Jt(this,K,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Jt(this,P,"m",nt).call(this,t,i,!1)))},it=function(t,i){return i.sections.map((i=>Jt(this,P,"m",et).call(this,t,i)))},nt=function t(i,n,l=!1,s={}){var o,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE};s.gap=+n.gap>0?`${n.gap}rem`:"1rem";let r=[];if(null===(o=n.sections)||void 0===o?void 0:o.length){r=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(s.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(s.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(r=n.content.map((t=>Jt(this,P,"m",ot).call(this,i,t))),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const h=e("div",{class:u,style:s},r.filter(Boolean));return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(w,{type:j.HEADING1,value:n.title}),h):h},et=function t(i,n){var l,s;let o=[];if((null===(l=n.sections)||void 0===l?void 0:l.length)?o=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n))):(null===(s=n.content)||void 0===s?void 0:s.length)&&(o=n.content.map((t=>Jt(this,P,"m",at).call(this,i,t)))),null==M(n.absoluteWidth))return o;const a=null!=M(n.absoluteWidth)?`${M(n.absoluteWidth)}px`:"100%",u=null!=S(n.absoluteHeight)?`${S(n.absoluteHeight)}px`:"100%",r=`${C(n.absoluteRow)}px`,h=`${D(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:r,left:h,overflow:"auto"}},o)},lt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(Jt(this,P,"m",t).call(this,i))})),l},st=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Jt(this,P,"m",lt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return Jt(this,P,"m",nt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},ot=function(t,i){const n=t.cells.find((t=>t.column.name===i.id)),l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,s=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;if(n&&n.cell)return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":s?`span ${s}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},at=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell)return;let l;l=n.cell.shape==h.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=M(l),o=S(i.absoluteHeight),a=C(i.absoluteRow),u=D(i.absoluteColumn),r={position:"absolute",width:null!==s?`${s}px`:null,"min-width":null!==s?`${s}px`:null,"max-width":null!==s?`${s}px`:null,height:null!==o?`${o}px`:null,"min-height":null!==o?`${o}px`:null,"max-height":null!==o?`${o}px`:null,top:null!==a?`${C(i.absoluteRow)}px`:null,left:null!==u?`${D(i.absoluteColumn)}px`:null,overflow:"auto"};return n.cell.data=Object.assign(Object.assign(Object.assign({},n.cell.data),{customStyle:(n.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),n.cell.shape===h.TABLE&&{rowsPerPage:n.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${o}px`}),e("div",{style:r},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},ut=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>Jt(this,P,"m",Lt).call(this,t)))}};return Jt(this,P,"m",Y).call(this,t,i)}{const i=Jt(this,P,"m",Lt).call(this,t);return Jt(this,P,"m",X).call(this,i,{name:t.value,title:t.value})}})).flat()},rt=function(t){var i,n,e,l;(null===(n=null===(i=t.setup)||void 0===i?void 0:i.commands)||void 0===n?void 0:n.length)&&Jt(this,P,"m",ut).call(this);const s=null===(e=null==t?void 0:t.rows[0])||void 0===e?void 0:e.layout,o=(null===(l=null==t?void 0:t.rows)||void 0===l?void 0:l.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.filter((t=>t.visible)).map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Jt(this,P,"m",ht).call(this,i,t,s),slotData:Jt(this,P,"m",dt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Yt.ketchup.data.cell.getType(t,t.shape),e=Jt(this,A,"f").get(n);if(!e)return;const l=this.rootElement.shadowRoot.querySelector(`${e}[id='${i.name.replace(/\//g,"\\$1")}']`);t.value&&(null==l||l.setValue(t.value))})))),this.inputPanelCells=o},ht=function(t,i,n){const e=Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,t,i,n)),{disabled:!t.editable,id:i.name}),l=Yt.ketchup.data.cell.getType(t,t.shape),s=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==r.MULTI_AUTOCOMPLETE&&l!==r.MULTI_COMBOBOX?Jt(this,P,"m",ct).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},ct=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Jt(this,P,"m",t).call(this,i[e],n[e]):n[e];return i},pt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let s=null==l?void 0:l.value;return(null==l?void 0:l.shape)===h.TABLE&&(s=JSON.stringify(Jt(this,P,"m",Mt).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:s,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},ft=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const s=t.value,o=Yt.ketchup.data.cell.getType(t,t.shape),a=new Map([[r.AUTOCOMPLETE,Jt(this,P,"m",gt).bind(this)],[r.BUTTON_LIST,Jt(this,P,"m",vt).bind(this)],[r.CHART,Jt(this,P,"m",bt).bind(this)],[r.CHIP,Jt(this,P,"m",mt).bind(this)],[r.CHECKBOX,Jt(this,P,"m",_t).bind(this)],[r.COLOR_PICKER,Jt(this,P,"m",xt).bind(this)],[r.COMBOBOX,Jt(this,P,"m",gt).bind(this)],[r.EDITOR,Jt(this,P,"m",yt).bind(this)],[r.MULTI_AUTOCOMPLETE,Jt(this,P,"m",mt).bind(this)],[r.MULTI_COMBOBOX,Jt(this,P,"m",mt).bind(this)],[r.NUMBER,Jt(this,P,"m",zt).bind(this)],[r.DATE,Jt(this,P,"m",Ft).bind(this)],[r.OBJECT,Jt(this,P,"m",$t).bind(this)],[r.RADIO,Jt(this,P,"m",jt).bind(this)],[r.STRING,Jt(this,P,"m",wt).bind(this)],[r.SWITCH,Jt(this,P,"m",Ot).bind(this)],[r.TABLE,Jt(this,P,"m",Et).bind(this)],[r.TIME,Jt(this,P,"m",Tt).bind(this)]]).get(o);return a?a(e,l,s,t,i.name):null},dt=function(t,i){const n=Yt.ketchup.data.cell.getType(t,t.shape);return t.editable?n===r.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.editable,id:i.name,fullWidth:!1}:n===r.MULTI_AUTOCOMPLETE||n===r.MULTI_COMBOBOX?Object.assign(Object.assign({},Jt(this,P,"m",gt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.editable,id:i.name}):null:null},mt=function(t,i,n){return m(n)},bt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},vt=function(t,i,n,e,l){var s,o,a,u;return e.data=e.data||{},e.data.onClick=()=>{Jt(this,P,"m",Rt).call(this,e,l)},(null===(s=e.data)||void 0===s?void 0:s.keyShortcut)&&!(null===(o=e.data)||void 0===o?void 0:o.disabled)&&(Jt(this,G,"f").push(null===(a=e.data)||void 0===a?void 0:a.keyShortcut),Jt(this,L,"f").keysBinding.register(null===(u=e.data)||void 0===u?void 0:u.keyShortcut,e.data.onClick.bind(this))),Object.assign({label:e.value,fun:e.fun},e.data)},gt=function(t,i,n){const e=b(n,i,[]);return t&&(e.data["kup-list"].data=Jt(this,P,"m",St).call(this,t,n)),e},kt=function({detail:t},i=!1){const n=Jt(this,P,"m",V).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),n.fun&&e&&Jt(this,P,"m",Wt).call(this,t,n)},_t=function(t,i,n){return v(n,i)},xt=function(t,i){return{data:{"kup-text-field":{label:i}}}},yt=function(t,i,n){return{initialValue:n}},wt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&(e.isEditable||e.editable)&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Jt(this,P,"m",Bt).call(this,l,t)}),o},jt=function(t,i,n){return g(n,t)},Ot=function(t,i,n){return k(n,i)},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},$t=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Tt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},zt=function(t,i){return{label:i}},Et=function(t,i,n,e,l){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Jt(this,L,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,_.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,i.cells[e],l)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Jt(this,L,"f").debug.logMessage(this,`Empty value for ${l} cell.`,_.WARNING),null)}catch(t){return Jt(this,L,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,_.ERROR),null}},Mt=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(Jt(this,N,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const s=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),s?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},St=function(t,i){const n=Jt(this,I,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Pt=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[l].value||n[e].value,selected:i===n[e].value}}))},Lt=function(t){return t.data&&!t.data.keyShortcut&&Jt(this,L,"f").objects.isJ1Key(t.obj?t.obj:{})&&(t.data.keyShortcut=E[t.obj.k]),Object.assign(Object.assign({},t),{data:Jt(this,P,"m",vt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Wt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Jt(this,P,"m",pt).call(this),t.id).then((n=>{var e,l,s,o,a;const u=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>(null==t?void 0:t.visible)||!("visible"in t))).map((t=>t.name)))||[],r=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=u.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),h=Object.assign(Object.assign({},n),{rows:r}),c=null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];c?c.data=(null==r?void 0:r.length)&&null!==(a=Jt(this,P,"m",St).call(this,h,i.value))&&void 0!==a?a:[]:Jt(this,L,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',_.WARNING),t.comp.refresh()}))},It=async function(t){var i,n,e,l,s;const{detail:{column:o,cell:a}}=t,u=Jt(this,P,"m",V).call(this,o.name),r=Jt(this,N,"f").rows[0].cells[o.name];if(u){if(a.mandatory){if(Jt(this,P,"m",Nt).call(this,o.name,u.value?(null===(i=r.data)||void 0===i?void 0:i.error)||null:Jt(this,L,"f").language.translate(f.REQUIRED_VALUE)),!a.value)return}else Jt(this,P,"m",Nt).call(this,o.name,(null===(n=r.data)||void 0===n?void 0:n.error)||null);if(null===(e=a.inputSettings)||void 0===e?void 0:e.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:a.obj,currentState:Jt(this,P,"m",pt).call(this),fun:a.fun});if(!t)return void Jt(this,P,"m",Nt).call(this,o.name,Jt(this,L,"f").language.translate(f.INVALID_VALUE));Jt(this,P,"m",Nt).call(this,o.name,(null===(l=r.data)||void 0===l?void 0:l.error)||null)}(null===(s=a.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&Jt(this,P,"m",Ht).call(this)&&this.checkValidValueCallback({before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},o.name)}},Nt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Ht=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Rt=function(t,i){t.fun?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Jt(this,P,"m",pt).call(this)}):this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},cell:i})},At=function(t,i){const n=t.find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}));if(null==n)return;const e=Jt(this,P,"m",pt).call(this),l=n["kup-get-cell-props"]().column.name;return{anchor:n,cell:e.rows[0].cells[l],column:e.columns.find((t=>t.name==l)),row:e.rows[0],originalEvent:i}},Ut=function(t){const i=Jt(this,L,"f").getEventPath(t.target,this.rootElement);return Jt(this,P,"m",At).call(this,i,t)},Kt=function(){Jt(this,L,"f").interact.managedElements.add(Jt(this,W,"f")),Jt(this,L,"f").interact.on(Jt(this,W,"f"),x.TAP,(t=>{if(2==t.button){const i=Jt(this,P,"m",Ut).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Gt=function(){if(!Jt(this,W,"f"))return;const t=Array.from(Jt(this,W,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Jt(this,P,"m",Vt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Jt(this,P,"m",Vt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Vt=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const s=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of s){const i=t.shadowRoot.querySelector(e);if(i)return i}},Bt=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:s,value:o}=l;if(!s||s<0||(null==o?void 0:o.length)<s)return;const a=Array.from(null===(n=Jt(this,W,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},qt.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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-fcell-width:fit-content;--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);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}: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:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}: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;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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 .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";export{qt as kup_input_panel}
1
+ import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{F as a}from"./p-da7e333d.js";import{k as u,a6 as r,F as h,g as c,s as p,h as f,ab as d,ah as m,ae as b,ag as v,af as g,ai as k,e as _,O as x}from"./p-ccc4a1ea.js";import{F as y}from"./p-7db300e0.js";import{F as w,a as j}from"./p-60cfddce.js";import{c as O}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-982a5cfc.js";import"./p-1a234ef5.js";import"./p-a905d4a7.js";import"./p-ac3b7d2c.js";import"./p-1ee561ba.js";import"./p-c56195a0.js";var F,$,T,z;!function(t){t.TAB="tab"}(F||(F={})),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",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus."}($||($={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}(T||(T={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(z||(z={}));const E={"*F01":"F1","*F02":"F2","*F03":"F3","*F04":"F4","*F05":"F5","*F06":"F6","*F07":"F7","*F08":"F8","*F09":"F9","*F10":"F10","*F11":"F11","*F12":"F12","*F13":"shift+F1","*F14":"shift+F2","*F15":"shift+F3","*F16":"shift+F4","*F17":"shift+F5","*F18":"shift+F6","*F19":"shift+F7","*F20":"shift+F8","*F21":"shift+F9","*F22":"shift+F10","*F23":"shift+F11","*F24":"shift+F12","*ENT":"Enter","*PDN":"PageDown","*PUP":"PageUp"},M=t=>0==t?6:t?1===t?18:12*t:null,S=t=>t?22*t:null,C=t=>t?22*(t-1):null,D=t=>t?12*t:null;var P,L,W,I,N,H,R,A,U,K,G,V,B,J,X,Y,q,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,rt,ht,ct,pt,ft,dt,mt,bt,vt,gt,kt,_t,xt,yt,wt,jt,Ot,Ft,$t,Tt,zt,Et,Mt,St,Ct,Dt,Pt,Lt,Wt,It,Nt,Ht,Rt,At,Ut,Kt,Gt,Vt,Bt,Jt=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},Xt=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const Yt=document.documentElement,qt=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),P.add(this),L.set(this,u()),W.set(this,void 0),I.set(this,new Map([["SmeupTreeNode",Jt(this,P,"m",Ct).bind(this)],["SmeupDataTree",Jt(this,P,"m",Dt).bind(this)],["SmeupTable",Jt(this,P,"m",Pt).bind(this)],["SmeupDataTable",Jt(this,P,"m",Pt).bind(this)]])),N.set(this,null),H.set(this,new Map([[r.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[r.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[r.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[r.MULTI_COMBOBOX,["kup-combobox-iconclick"]]])),R.set(this,[]),A.set(this,new Map([[r.DATE,"kup-date-picker"],[r.TIME,"kup-time-picker"]])),U.set(this,new Map([[h.BUTTON_LIST,Jt(this,P,"m",X).bind(this)],[h.LABEL,Jt(this,P,"m",Q).bind(this)],[h.TABLE,Jt(this,P,"m",q).bind(this)]])),K.set(this,new Map([[F.TAB,Jt(this,P,"m",st).bind(this)]])),G.set(this,[]),this.buttonPosition=z.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.inputPanelPosition=T.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){Xt(this,N,structuredClone(this.data),"f"),Jt(this,R,"f").length&&(Jt(this,R,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),Xt(this,R,[],"f")),Jt(this,G,"f").length&&(Jt(this,G,"f").map((t=>{Jt(this,L,"f").keysBinding.unregister(t)})),Xt(this,G,[],"f")),this.data&&Jt(this,P,"m",rt).call(this,this.data)}async getProps(t){return c(this,$,t)}async refresh(){n(this)}async setProps(t){p(this,$,t)}componentWillLoad(){Jt(this,L,"f").debug.logLoad(this,!1),Jt(this,L,"f").language.register(this),Jt(this,L,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Jt(this,P,"m",Kt).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Jt(this,P,"m",Gt).call(this),Jt(this,L,"f").debug.logLoad(this,!0)}componentWillRender(){Jt(this,L,"f").debug.logRender(this,!1)}componentDidRender(){if(Jt(this,W,"f")){const t=Jt(this,W,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)y(t[i])}Jt(this,L,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Jt(this,L,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>Jt(this,P,"m",B).call(this,t)));return e(l,{key:"46ca5065f8b29c17cbf82792698ca30b49b7aebb","onKup-cell-blur":Jt(this,P,"m",It).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Jt(this,P,"m",kt).bind(this),"onKup-autocomplete-iconclick":Jt(this,P,"m",kt).bind(this),"onKup-combobox-iconclick":t=>Jt(this,P,"m",kt).call(this,t,!0)},e("style",{key:"3b47a0c817308efdd984e9abfd86fad33d9e37bd"},Jt(this,L,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"5aa429efa68411c420beba6ec7d58395740d8968",id:O},t))}disconnectedCallback(){Jt(this,L,"f").language.unregister(this),Jt(this,L,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};L=new WeakMap,W=new WeakMap,I=new WeakMap,N=new WeakMap,H=new WeakMap,R=new WeakMap,A=new WeakMap,U=new WeakMap,K=new WeakMap,G=new WeakMap,P=new WeakSet,V=function(t){return this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null)},B=function(t){var i,n;const l=t.row.layout,s=(null==l?void 0:l.horizontal)||!1,a={};let u;if(null===(i=null==l?void 0:l.sections)||void 0===i?void 0:i.length)if(l.absolute)u=Jt(this,P,"m",it).call(this,t,l),a.height=22*(t=>{let i=0;return t.sections.forEach((t=>{t.content.forEach((t=>{t.absoluteRow>i&&(i=t.absoluteRow+(t.absoluteHeight>1?t.absoluteHeight:0))}))})),i})(l)+12+"px";else{if(!l.sectionsType){const i=l.sections.some((t=>t.dim));a.display="grid",this.inputPanelPosition!==T.INLINE&&this.inputPanelPosition!==T.UPINLINE||(a.display=""),l.horizontal?a.gridTemplateColumns=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(a.gridTemplateRows=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${l.sections.length}, 1fr)`)}u=Jt(this,P,"m",tt).call(this,t,l)}else u=t.cells.map((i=>Jt(this,P,"m",J).call(this,i.cell,t.row,i.column)));const r={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==z.RIGHT},h={"input-panel":!0,"input-panel--column":!s,"input-panel--absolute":null==l?void 0:l.absolute,"input-panel--inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE},c={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},p={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:j.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:r,ref:t=>Xt(this,W,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)}})},onContextMenu:t=>{t.preventDefault()}},e("div",{class:"input-panel__typography"},e(w,Object.assign({},p))),e("div",{class:h,style:a},u),e("div",{class:c},e(o,{buttonType:"submit",label:Jt(this,L,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},J=function(t,i,n){var l;if(!t)return;const s=Jt(this,U,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);const o={cell:t,column:n,row:i,component:this,editable:!0,renderKup:!0,setSizes:!0},u=Jt(this,P,"m",Z).call(this,t,n.title);return u?e("div",{class:{"input-panel__label_container":!0}},u,e(a,Object.assign({},o))):e(a,Object.assign({},o))},X=function(t,{name:i}){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},Y=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Jt(this,P,"m",Rt).call(this,t.detail.node,t.detail.node.id)}}))},q=function(t,{name:i}){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},Q=function(t,i,n){const l=Yt.ketchup.data.cell.getType(t,t.shape),s="input-panel-label",o=n?" input-panel-label--legacy-look":"";return l===r.NUMBER?e("span",{class:`${s}${o}${l===r.NUMBER?" input-panel-label-number":""}`,id:i.name},d(i,t)):e("span",{class:`${s}${o}`,id:i.name},t.value)},Z=function(t,i){return i&&Yt.ketchup.data.cell.getType(t,t.shape)===r.RADIO?e("span",null,i):null},tt=function(t,i){const n=Jt(this,K,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Jt(this,P,"m",nt).call(this,t,i,!1)))},it=function(t,i){return i.sections.map((i=>Jt(this,P,"m",et).call(this,t,i)))},nt=function t(i,n,l=!1,s={}){var o,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE};s.gap=+n.gap>0?`${n.gap}rem`:"1rem";let r=[];if(null===(o=n.sections)||void 0===o?void 0:o.length){r=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(s.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(s.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(r=n.content.map((t=>Jt(this,P,"m",ot).call(this,i,t))),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const h=e("div",{class:u,style:s},r.filter(Boolean));return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(w,{type:j.HEADING1,value:n.title}),h):h},et=function t(i,n){var l,s;let o=[];if((null===(l=n.sections)||void 0===l?void 0:l.length)?o=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n))):(null===(s=n.content)||void 0===s?void 0:s.length)&&(o=n.content.map((t=>Jt(this,P,"m",at).call(this,i,t)))),null==M(n.absoluteWidth))return o;const a=null!=M(n.absoluteWidth)?`${M(n.absoluteWidth)}px`:"100%",u=null!=S(n.absoluteHeight)?`${S(n.absoluteHeight)}px`:"100%",r=`${C(n.absoluteRow)}px`,h=`${D(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:r,left:h,overflow:"auto"}},o)},lt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(Jt(this,P,"m",t).call(this,i))})),l},st=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Jt(this,P,"m",lt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return Jt(this,P,"m",nt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},ot=function(t,i){const n=t.cells.find((t=>t.column.name===i.id)),l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,s=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;if(n&&n.cell)return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":s?`span ${s}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},at=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell)return;let l;l=n.cell.shape==h.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=M(l),o=S(i.absoluteHeight),a=C(i.absoluteRow),u=D(i.absoluteColumn),r={position:"absolute",width:null!==s?`${s}px`:null,"min-width":null!==s?`${s}px`:null,"max-width":null!==s?`${s}px`:null,height:null!==o?`${o}px`:null,"min-height":null!==o?`${o}px`:null,"max-height":null!==o?`${o}px`:null,top:null!==a?`${C(i.absoluteRow)}px`:null,left:null!==u?`${D(i.absoluteColumn)}px`:null,overflow:"auto"};return n.cell.data=Object.assign(Object.assign(Object.assign({},n.cell.data),{customStyle:(n.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),n.cell.shape===h.TABLE&&{rowsPerPage:n.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${o}px`}),e("div",{style:r},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},ut=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>Jt(this,P,"m",Lt).call(this,t)))}};return Jt(this,P,"m",Y).call(this,t,i)}{const i=Jt(this,P,"m",Lt).call(this,t);return Jt(this,P,"m",X).call(this,i,{name:t.value,title:t.value})}})).flat()},rt=function(t){var i,n,e,l;(null===(n=null===(i=t.setup)||void 0===i?void 0:i.commands)||void 0===n?void 0:n.length)&&Jt(this,P,"m",ut).call(this);const s=null===(e=null==t?void 0:t.rows[0])||void 0===e?void 0:e.layout,o=(null===(l=null==t?void 0:t.rows)||void 0===l?void 0:l.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.filter((t=>t.visible)).map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Jt(this,P,"m",ht).call(this,i,t,s),slotData:Jt(this,P,"m",dt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Yt.ketchup.data.cell.getType(t,t.shape),e=Jt(this,A,"f").get(n);if(!e)return;const l=this.rootElement.shadowRoot.querySelector(`${e}[id='${i.name.replace(/\//g,"\\$1")}']`);t.value&&(null==l||l.setValue(t.value))})))),this.inputPanelCells=o},ht=function(t,i,n){const e=Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,t,i,n)),{disabled:!t.editable,id:i.name}),l=Yt.ketchup.data.cell.getType(t,t.shape),s=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==r.MULTI_AUTOCOMPLETE&&l!==r.MULTI_COMBOBOX?Jt(this,P,"m",ct).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},ct=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Jt(this,P,"m",t).call(this,i[e],n[e]):n[e];return i},pt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let s=null==l?void 0:l.value;return(null==l?void 0:l.shape)===h.TABLE&&(s=JSON.stringify(Jt(this,P,"m",Mt).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:s,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},ft=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const s=t.value,o=Yt.ketchup.data.cell.getType(t,t.shape),a=new Map([[r.AUTOCOMPLETE,Jt(this,P,"m",gt).bind(this)],[r.BUTTON_LIST,Jt(this,P,"m",vt).bind(this)],[r.CHART,Jt(this,P,"m",bt).bind(this)],[r.CHIP,Jt(this,P,"m",mt).bind(this)],[r.CHECKBOX,Jt(this,P,"m",_t).bind(this)],[r.COLOR_PICKER,Jt(this,P,"m",xt).bind(this)],[r.COMBOBOX,Jt(this,P,"m",gt).bind(this)],[r.EDITOR,Jt(this,P,"m",yt).bind(this)],[r.MULTI_AUTOCOMPLETE,Jt(this,P,"m",mt).bind(this)],[r.MULTI_COMBOBOX,Jt(this,P,"m",mt).bind(this)],[r.NUMBER,Jt(this,P,"m",zt).bind(this)],[r.DATE,Jt(this,P,"m",Ft).bind(this)],[r.OBJECT,Jt(this,P,"m",$t).bind(this)],[r.RADIO,Jt(this,P,"m",jt).bind(this)],[r.STRING,Jt(this,P,"m",wt).bind(this)],[r.SWITCH,Jt(this,P,"m",Ot).bind(this)],[r.TABLE,Jt(this,P,"m",Et).bind(this)],[r.TIME,Jt(this,P,"m",Tt).bind(this)]]).get(o);return a?a(e,l,s,t,i.name):null},dt=function(t,i){const n=Yt.ketchup.data.cell.getType(t,t.shape);return t.editable?n===r.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.editable,id:i.name,fullWidth:!1}:n===r.MULTI_AUTOCOMPLETE||n===r.MULTI_COMBOBOX?Object.assign(Object.assign({},Jt(this,P,"m",gt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.editable,id:i.name}):null:null},mt=function(t,i,n){return m(n)},bt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},vt=function(t,i,n,e,l){var s,o,a,u;return e.data=e.data||{},e.data.onClick=()=>{Jt(this,P,"m",Rt).call(this,e,l)},(null===(s=e.data)||void 0===s?void 0:s.keyShortcut)&&!(null===(o=e.data)||void 0===o?void 0:o.disabled)&&(Jt(this,G,"f").push(null===(a=e.data)||void 0===a?void 0:a.keyShortcut),Jt(this,L,"f").keysBinding.register(null===(u=e.data)||void 0===u?void 0:u.keyShortcut,e.data.onClick.bind(this))),Object.assign({label:e.value,fun:e.fun},e.data)},gt=function(t,i,n){const e=b(n,i,[]);return t&&(e.data["kup-list"].data=Jt(this,P,"m",St).call(this,t,n)),e},kt=function({detail:t},i=!1){const n=Jt(this,P,"m",V).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),n.fun&&e&&Jt(this,P,"m",Wt).call(this,t,n)},_t=function(t,i,n){return v(n,i)},xt=function(t,i){return{data:{"kup-text-field":{label:i}}}},yt=function(t,i,n){return{initialValue:n}},wt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&(e.isEditable||e.editable)&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Jt(this,P,"m",Bt).call(this,l,t)}),o},jt=function(t,i,n){return g(n,t)},Ot=function(t,i,n){return k(n,i)},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},$t=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Tt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},zt=function(t,i){return{label:i}},Et=function(t,i,n,e,l){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Jt(this,L,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,_.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,i.cells[e],l)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Jt(this,L,"f").debug.logMessage(this,`Empty value for ${l} cell.`,_.WARNING),null)}catch(t){return Jt(this,L,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,_.ERROR),null}},Mt=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(Jt(this,N,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const s=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),s?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},St=function(t,i){const n=Jt(this,I,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Pt=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[l].value||n[e].value,selected:i===n[e].value}}))},Lt=function(t){return t.data&&!t.data.keyShortcut&&Jt(this,L,"f").objects.isJ1Key(t.obj?t.obj:{})&&(t.data.keyShortcut=E[t.obj.k]),Object.assign(Object.assign({},t),{data:Jt(this,P,"m",vt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Wt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Jt(this,P,"m",pt).call(this),t.id).then((n=>{var e,l,s,o,a;const u=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>(null==t?void 0:t.visible)||!("visible"in t))).map((t=>t.name)))||[],r=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=u.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),h=Object.assign(Object.assign({},n),{rows:r}),c=null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];c?c.data=(null==r?void 0:r.length)&&null!==(a=Jt(this,P,"m",St).call(this,h,i.value))&&void 0!==a?a:[]:Jt(this,L,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',_.WARNING),t.comp.refresh()}))},It=async function(t){var i,n,e,l,s;const{detail:{column:o,cell:a}}=t,u=Jt(this,P,"m",V).call(this,o.name),r=Jt(this,N,"f").rows[0].cells[o.name];if(u){if(a.mandatory){if(Jt(this,P,"m",Nt).call(this,o.name,u.value?(null===(i=r.data)||void 0===i?void 0:i.error)||null:Jt(this,L,"f").language.translate(f.REQUIRED_VALUE)),!a.value)return}else Jt(this,P,"m",Nt).call(this,o.name,(null===(n=r.data)||void 0===n?void 0:n.error)||null);if(null===(e=a.inputSettings)||void 0===e?void 0:e.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:a.obj,currentState:Jt(this,P,"m",pt).call(this),fun:a.fun});if(!t)return void Jt(this,P,"m",Nt).call(this,o.name,Jt(this,L,"f").language.translate(f.INVALID_VALUE));Jt(this,P,"m",Nt).call(this,o.name,(null===(l=r.data)||void 0===l?void 0:l.error)||null)}(null===(s=a.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&Jt(this,P,"m",Ht).call(this)&&this.checkValidValueCallback({before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},o.name)}},Nt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Ht=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Rt=function(t,i){t.fun?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Jt(this,P,"m",pt).call(this)}):this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},cell:i})},At=function(t,i){const n=t.find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}));if(null==n)return;const e=Jt(this,P,"m",pt).call(this),l=n["kup-get-cell-props"]().column.name;return{anchor:n,cell:e.rows[0].cells[l],column:e.columns.find((t=>t.name==l)),row:e.rows[0],originalEvent:i}},Ut=function(t){const i=Jt(this,L,"f").getEventPath(t.target,this.rootElement);return Jt(this,P,"m",At).call(this,i,t)},Kt=function(){Jt(this,L,"f").interact.managedElements.add(Jt(this,W,"f")),Jt(this,L,"f").interact.on(Jt(this,W,"f"),x.TAP,(t=>{if(2==t.button){const i=Jt(this,P,"m",Ut).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Gt=function(){if(!Jt(this,W,"f"))return;const t=Array.from(Jt(this,W,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Jt(this,P,"m",Vt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Jt(this,P,"m",Vt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Vt=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const s=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of s){const i=t.shadowRoot.querySelector(e);if(i)return i}},Bt=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:s,value:o}=l;if(!s||s<0||(null==o?void 0:o.length)<s)return;const a=Array.from(null===(n=Jt(this,W,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},qt.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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-fcell-width:fit-content;--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);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}: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:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}: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;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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 .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";export{qt as kup_input_panel}
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-b9094df4.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.autofitOnExpand="The component will autofit everytime a node is expanded.",t.autofitOnLoad="The component's initial render will fit the container by invoking the runAutofit method.",t.cardData="Used to render the family tree boxes as kup-cards (through kup-box).",t.collapsible="Nodes can be expanded/collapsed.",t.customStyle="Custom style of the component.",t.data="Actual data of the component",t.layout="Layout of the boxes.",t.stackedLeaves="Child nodes that have no children are arranged vertically."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=class{constructor(i){t(this,i),this.kupClick=e(this,"kup-familytree-click",6),this.kupContextMenu=e(this,"kup-familytree-contextmenu",6),this.kupDblClick=e(this,"kup-familytree-dblclick",6),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"794180479c55c31c847a73d20eee24d64703761a",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"29ba61f73082eff219190f04dde88c348599048e"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"da6208fd0a75cd26714faee4c15bff91679619a1",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{B as kup_family_tree}
1
+ import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-ccc4a1ea.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.autofitOnExpand="The component will autofit everytime a node is expanded.",t.autofitOnLoad="The component's initial render will fit the container by invoking the runAutofit method.",t.cardData="Used to render the family tree boxes as kup-cards (through kup-box).",t.collapsible="Nodes can be expanded/collapsed.",t.customStyle="Custom style of the component.",t.data="Actual data of the component",t.layout="Layout of the boxes.",t.stackedLeaves="Child nodes that have no children are arranged vertically."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=class{constructor(i){t(this,i),this.kupClick=e(this,"kup-familytree-click",6),this.kupContextMenu=e(this,"kup-familytree-contextmenu",6),this.kupDblClick=e(this,"kup-familytree-dblclick",6),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"794180479c55c31c847a73d20eee24d64703761a",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"29ba61f73082eff219190f04dde88c348599048e"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"da6208fd0a75cd26714faee4c15bff91679619a1",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{B as kup_family_tree}
@@ -1 +1 @@
1
- import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-b0368f88.js";import{k as p,g as s,s as h,e as f}from"./p-b9094df4.js";import"./p-1ee561ba.js";var r;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(r||(r={}));const l=class{constructor(e){t(this,e),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.kupManager=p(),this.buttonData={},this.isButton=!1,this.src=void 0}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return s(this,r,t)}async refresh(){e(this)}async setProps(t){h(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?n(o,{"is-button":!0},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):n(o,{"is-iframe":!0},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",f.WARNING)}get rootElement(){return a(this)}};l.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{l as kup_iframe}
1
+ import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-b0368f88.js";import{k as p,g as s,s as h,e as f}from"./p-ccc4a1ea.js";import"./p-1ee561ba.js";var r;!function(t){t.buttonData="Props of the button (when isButton is set to true).",t.isButton="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.",t.src="The address the iframe should be referencing to."}(r||(r={}));const l=class{constructor(e){t(this,e),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.kupManager=p(),this.buttonData={},this.isButton=!1,this.src=void 0}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return s(this,r,t)}async refresh(){e(this)}async setProps(t){h(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?n(o,{"is-button":!0},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):n(o,{"is-iframe":!0},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",f.WARNING)}get rootElement(){return a(this)}};l.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{l as kup_iframe}
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as a,H as h,d as n}from"./p-b0368f88.js";import{k as o,g as p,s}from"./p-b9094df4.js";import{c as l}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var f,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(f||(f={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(i){t(this,i),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return p(this,f,t)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(t){s(this,f,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,i=this.componentName;switch(this.componentName){case"kup-button":e=a("svg",{key:"fae1bbf13d272c54202ef51f681388ec62a998ce",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"11d474a91430a995fe5a839349f7e5f8ae25f0f3",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=a("svg",{key:"9585bf08511b88191d891a956b059c7dddee3184",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"95a3d7b9a4644dbaa9bfc38440df8819f009bc1b",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=a("svg",{key:"6e96b294e13695fe7919a8047cf0b2616c897527",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f8c6a50ed3225f902eabb853bbeebbb2b16acf3f",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=a("svg",{key:"292adcee2f17141a84ee9696941d8ceb44373b48",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"4babd2ad182cf158941fc73f5ce937c5b72b76d2",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=a("svg",{key:"e1f780646b2581e0dce3f66cd44c522be64dd286",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"80803ce2ede8637a62be98c59d40c9e668603dc9",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=a("svg",{key:"695e368ba41d4d8507b558d6f372f182c0dff18a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"5a88603b6e142b2dbbc37682fcca7e12f994c7ee",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=a("svg",{key:"7889e02daf972afb3e28c1409be9c070245da8fe",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"ac721fd2fccf78250d095e5b40a8cfac48183d5a",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=a("svg",{key:"aa1787b48f62a6992dbce7f221012535c25707c1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"3b1ab1419dd67b5116639a8afbbdb53c510392ea",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=a("svg",{key:"89dfba9ea1a9a9b713538bfb36a2961f617b4e57",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"7f50de3733354e832f065f173519ccce3d8874d4",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=a(this.componentName,Object.assign({key:"a38145c24a4458edde8a967dea131c22c7aa3ac0"},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),a(h,{key:"9c39ec36b4088f74db7b6d32ee40529d7437d206",class:i},a("style",{key:"a11b797eb1925f3e652d429e915680a50bff6b98"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"f7dda28649ba016306f903f5641e214ba23b52a7",id:l},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return n(this)}};d.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
1
+ import{r as t,c as e,f as i,h as a,H as h,d as n}from"./p-b0368f88.js";import{k as o,g as p,s}from"./p-ccc4a1ea.js";import{c as l}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var f,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(f||(f={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(i){t(this,i),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return p(this,f,t)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(t){s(this,f,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,i=this.componentName;switch(this.componentName){case"kup-button":e=a("svg",{key:"fae1bbf13d272c54202ef51f681388ec62a998ce",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"11d474a91430a995fe5a839349f7e5f8ae25f0f3",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=a("svg",{key:"9585bf08511b88191d891a956b059c7dddee3184",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"95a3d7b9a4644dbaa9bfc38440df8819f009bc1b",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=a("svg",{key:"6e96b294e13695fe7919a8047cf0b2616c897527",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f8c6a50ed3225f902eabb853bbeebbb2b16acf3f",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=a("svg",{key:"292adcee2f17141a84ee9696941d8ceb44373b48",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"4babd2ad182cf158941fc73f5ce937c5b72b76d2",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=a("svg",{key:"e1f780646b2581e0dce3f66cd44c522be64dd286",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"80803ce2ede8637a62be98c59d40c9e668603dc9",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=a("svg",{key:"695e368ba41d4d8507b558d6f372f182c0dff18a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"5a88603b6e142b2dbbc37682fcca7e12f994c7ee",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=a("svg",{key:"7889e02daf972afb3e28c1409be9c070245da8fe",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"ac721fd2fccf78250d095e5b40a8cfac48183d5a",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=a("svg",{key:"aa1787b48f62a6992dbce7f221012535c25707c1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"3b1ab1419dd67b5116639a8afbbdb53c510392ea",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=a("svg",{key:"89dfba9ea1a9a9b713538bfb36a2961f617b4e57",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"7f50de3733354e832f065f173519ccce3d8874d4",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=a(this.componentName,Object.assign({key:"a38145c24a4458edde8a967dea131c22c7aa3ac0"},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),a(h,{key:"9c39ec36b4088f74db7b6d32ee40529d7437d206",class:i},a("style",{key:"a11b797eb1925f3e652d429e915680a50bff6b98"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"f7dda28649ba016306f903f5641e214ba23b52a7",id:l},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return n(this)}};d.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-b0368f88.js";import{k as n,g as h,s as r,t as c,ab as l}from"./p-b9094df4.js";import{c as p}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var f;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.decvalueCol="Sets the decimal value column.",t.descrCol="Sets the description column.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.iconCol="Sets the icon column.",t.iconcolorCol="Sets the icon color column.",t.intvalueCol="Sets the integer value column.",t.isClickable="Sets whether a single card is clickable or not.",t.layoutCol="Sets the layout column.",t.measureCol="Sets the unit of measure column.",t.textcolorCol="Sets the text color column.",t.valueCol="Sets the value column.",t.valuecolorCol="Sets the value color column."}(f||(f={}));var u,m=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)};const d=class{constructor(i){t(this,i),this.kupCardListClickEvent=e(this,"kup-cardlist-click",7),u.set(this,n()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.descrCol="",this.iconCol="",this.valueCol="",this.measureCol="",this.intvalueCol="",this.decvalueCol="",this.textcolorCol="",this.valuecolorCol="",this.iconcolorCol="",this.layoutCol="",this.isClickable=!1}async getProps(t){return h(this,f,t)}async refresh(){i(this)}async setProps(t){r(this,f,t)}componentWillLoad(){m(this,u,"f").debug.logLoad(this,!1),m(this,u,"f").theme.register(this)}componentDidLoad(){m(this,u,"f").debug.logLoad(this,!0)}componentDidRender(){m(this,u,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let e,i,o,n,h,r,f,d,g,k;for(let t=0;t<this.data.columns.length;t++){const a=this.data.columns[t];if(a.name)switch(a.name){case this.decvalueCol:e=a;break;case this.descrCol:i=a;break;case this.iconCol:o=a;break;case this.iconcolorCol:n=a;break;case this.intvalueCol:h=a;break;case this.layoutCol:r=a;break;case this.measureCol:f=a;break;case this.textcolorCol:d=a;break;case this.valueCol:g=a;break;case this.valuecolorCol:k=a}}for(let s=0;s<this.data.rows.length;s++){const p=this.data.rows[s],x={color:[],image:[],text:[]},y=r&&p.cells[r.name].value?parseInt(p.cells[r.name].value):1,w=a("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:x,layoutFamily:c.SCALABLE,layoutNumber:y,key:s,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:s,row:p})},slot:s.toString()}),b=(t,e,i)=>{if(t){const a=p.cells[t.name];if(a){const s=a.value;switch(e){case"color":x[e][i]=m(this,u,"f").theme.colorCheck(s).hexColor;break;case"image":x[e][i]={resource:s};break;default:x[e][i]=l(t,a)}}}};switch(y){case 1:b(d,"color",0),b(k,"color",1),b(i,"text",0),b(g,"text",1);break;case 2:b(n,"color",0),b(k,"color",1),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2);break;case 3:b(k,"color",0),b(d,"color",1),b(g,"text",0),b(i,"text",1);break;case 4:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2),b(i,"text",3);break;case 5:b(n,"color",0),b(d,"color",1),b(k,"color",2),b(o,"image",0),b(i,"text",0),b(g,"text",1);break;case 6:case 7:case 8:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(g,"text",0),b(i,"text",1)}t.push(w)}return a(s,null,a("style",null,m(this,u,"f").theme.setKupStyle(this.rootElement)),a("div",{id:p},a("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){m(this,u,"f").theme.unregister(this)}get rootElement(){return o(this)}};u=new WeakMap,d.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:fit-content;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{d as kup_card_list}
1
+ import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-b0368f88.js";import{k as n,g as h,s as r,t as c,ab as l}from"./p-ccc4a1ea.js";import{c as p}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var f;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.decvalueCol="Sets the decimal value column.",t.descrCol="Sets the description column.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.iconCol="Sets the icon column.",t.iconcolorCol="Sets the icon color column.",t.intvalueCol="Sets the integer value column.",t.isClickable="Sets whether a single card is clickable or not.",t.layoutCol="Sets the layout column.",t.measureCol="Sets the unit of measure column.",t.textcolorCol="Sets the text color column.",t.valueCol="Sets the value column.",t.valuecolorCol="Sets the value color column."}(f||(f={}));var u,m=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)};const d=class{constructor(i){t(this,i),this.kupCardListClickEvent=e(this,"kup-cardlist-click",7),u.set(this,n()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.descrCol="",this.iconCol="",this.valueCol="",this.measureCol="",this.intvalueCol="",this.decvalueCol="",this.textcolorCol="",this.valuecolorCol="",this.iconcolorCol="",this.layoutCol="",this.isClickable=!1}async getProps(t){return h(this,f,t)}async refresh(){i(this)}async setProps(t){r(this,f,t)}componentWillLoad(){m(this,u,"f").debug.logLoad(this,!1),m(this,u,"f").theme.register(this)}componentDidLoad(){m(this,u,"f").debug.logLoad(this,!0)}componentDidRender(){m(this,u,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let e,i,o,n,h,r,f,d,g,k;for(let t=0;t<this.data.columns.length;t++){const a=this.data.columns[t];if(a.name)switch(a.name){case this.decvalueCol:e=a;break;case this.descrCol:i=a;break;case this.iconCol:o=a;break;case this.iconcolorCol:n=a;break;case this.intvalueCol:h=a;break;case this.layoutCol:r=a;break;case this.measureCol:f=a;break;case this.textcolorCol:d=a;break;case this.valueCol:g=a;break;case this.valuecolorCol:k=a}}for(let s=0;s<this.data.rows.length;s++){const p=this.data.rows[s],x={color:[],image:[],text:[]},y=r&&p.cells[r.name].value?parseInt(p.cells[r.name].value):1,w=a("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:x,layoutFamily:c.SCALABLE,layoutNumber:y,key:s,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:s,row:p})},slot:s.toString()}),b=(t,e,i)=>{if(t){const a=p.cells[t.name];if(a){const s=a.value;switch(e){case"color":x[e][i]=m(this,u,"f").theme.colorCheck(s).hexColor;break;case"image":x[e][i]={resource:s};break;default:x[e][i]=l(t,a)}}}};switch(y){case 1:b(d,"color",0),b(k,"color",1),b(i,"text",0),b(g,"text",1);break;case 2:b(n,"color",0),b(k,"color",1),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2);break;case 3:b(k,"color",0),b(d,"color",1),b(g,"text",0),b(i,"text",1);break;case 4:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2),b(i,"text",3);break;case 5:b(n,"color",0),b(d,"color",1),b(k,"color",2),b(o,"image",0),b(i,"text",0),b(g,"text",1);break;case 6:case 7:case 8:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(g,"text",0),b(i,"text",1)}t.push(w)}return a(s,null,a("style",null,m(this,u,"f").theme.setKupStyle(this.rootElement)),a("div",{id:p},a("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){m(this,u,"f").theme.unregister(this)}get rootElement(){return o(this)}};u=new WeakMap,d.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size: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_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:fit-content;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{d as kup_card_list}
@@ -1 +1 @@
1
- import{C as e,H as t,D as l,B as n,ab as r,v as i,x as o,ac as s,ad as a,M as u,F as c,ae as f,af as h,ag as d,ah as b,ai as m,a2 as p}from"./p-b9094df4.js";import{K as v}from"./p-1ee561ba.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(x||(x={}));const w="TREE_COLUMN";var T;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(T||(T={}));const g=document.documentElement,k=g.ketchup?g.ketchup.objects:new o,j=g.ketchup?g.ketchup.data:new s;class y extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(k.isNumber(r.obj)||k.isDate(r.obj)||k.isTime(r.obj)||k.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=s.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let m=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const O=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:p.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=C(e,n,t[l]);if(0!==r)return r}return 0}return C(e,n,t[0])}))}function C(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new y),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let m=null;for(let e of a)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(m));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=O.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=O.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(m,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),B(a,u.AVERAGE,n),B(a,u.MATH,n),a}function B(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=O.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(O.ketchup.objects.isEmptyJsObject(e)||O.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=O.ketchup.objects.isNumber(a.obj)?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(O.ketchup.objects.isNumber(a.obj)){const e=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+O.ketchup.math.numberify(r)}}else if(O.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),O.ketchup.dates.isValidFormattedStringDate(a.value))){const e=O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(a.value)),r=n[l]?O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE)}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=O.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=O.ketchup.dates.format(n[i]):O.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return L(e,o,r,Number(l),0),o}function L(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=S(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=L(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function S(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=S(e[l]);return t}function $(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],o=e.rows.find((e=>e.id===r.id)),s=o?o.cells[n]:null;(!s&&i.value||s&&i.value!==s.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function z(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const o={[c.AUTOCOMPLETE]:()=>f(r,"",i),[c.COMBOBOX]:()=>f(r,"",i),[c.RADIO]:()=>h(r,i),[c.CHECKBOX]:()=>d(r,""),[c.CHIP]:()=>b(r),[c.SWITCH]:()=>m(r,"")}[n.shape];o&&(n.data=Object.assign(Object.assign({},o()),n.data))}))}))}export{F,T as K,y as a,M as b,N as c,z as d,x as e,I as f,q as g,D as n,E as p,V as s,w as t}
1
+ import{C as e,H as t,D as l,B as n,ab as r,v as i,x as o,ac as s,ad as a,M as u,F as c,ae as f,af as h,ag as d,ah as b,ai as m,a2 as p}from"./p-ccc4a1ea.js";import{K as v}from"./p-1ee561ba.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(x||(x={}));const w="TREE_COLUMN";var T;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(T||(T={}));const g=document.documentElement,k=g.ketchup?g.ketchup.objects:new o,j=g.ketchup?g.ketchup.data:new s;class y extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(k.isNumber(r.obj)||k.isDate(r.obj)||k.isTime(r.obj)||k.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=s.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let m=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const O=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:p.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=C(e,n,t[l]);if(0!==r)return r}return 0}return C(e,n,t[0])}))}function C(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new y),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let m=null;for(let e of a)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(m));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=O.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=O.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(m,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),B(a,u.AVERAGE,n),B(a,u.MATH,n),a}function B(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=O.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(O.ketchup.objects.isEmptyJsObject(e)||O.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=O.ketchup.objects.isNumber(a.obj)?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(O.ketchup.objects.isNumber(a.obj)){const e=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+O.ketchup.math.numberify(r)}}else if(O.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),O.ketchup.dates.isValidFormattedStringDate(a.value))){const e=O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(a.value)),r=n[l]?O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE)}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=O.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=O.ketchup.dates.format(n[i]):O.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return L(e,o,r,Number(l),0),o}function L(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=S(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=L(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function S(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=S(e[l]);return t}function $(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],o=e.rows.find((e=>e.id===r.id)),s=o?o.cells[n]:null;(!s&&i.value||s&&i.value!==s.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function z(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const o={[c.AUTOCOMPLETE]:()=>f(r,"",i),[c.COMBOBOX]:()=>f(r,"",i),[c.RADIO]:()=>h(r,i),[c.CHECKBOX]:()=>d(r,""),[c.CHIP]:()=>b(r),[c.SWITCH]:()=>m(r,"")}[n.shape];o&&(n.data=Object.assign(Object.assign({},o()),n.data))}))}))}export{F,T as K,y as a,M as b,N as c,z as d,x as e,I as f,q as g,D as n,E as p,V as s,w as t}