@sme.up/ketchup 11.0.0-SNAPSHOT-20250805065134 → 11.0.0-SNAPSHOT-20250806071842

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 (190) hide show
  1. package/dist/cjs/{f-cell-a77d97c3.js → f-cell-507025b3.js} +4 -4
  2. package/dist/cjs/{f-chip-b4aebf7c.js → f-chip-f1b14141.js} +1 -1
  3. package/dist/cjs/{f-object-field-62195164.js → f-object-field-7c1ea180.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-54bc1b31.js → f-paginator-utils-49cf707b.js} +1 -1
  5. package/dist/cjs/{f-text-field-03e975ad.js → f-text-field-f5b2163a.js} +1 -1
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/cjs/ketchup.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  10. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +32 -26
  11. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  12. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  13. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  16. package/dist/cjs/{kup-data-table-helper-c1145096.js → kup-data-table-helper-63e5d7a2.js} +1 -1
  17. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-editor.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-htm.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  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-bb0a1490.js → kup-manager-15f30f03.js} +1 -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-planner.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  34. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  35. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-txt.cjs.entry.js +1 -1
  37. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  38. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/components/kup-chip/kup-chip-declarations.js +6 -1
  41. package/dist/collection/components/kup-chip/kup-chip.js +57 -57
  42. package/dist/collection/components/kup-data-table/kup-data-table.js +13 -12
  43. package/dist/collection/f-components/f-chip/f-chip.js +1 -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-file-upload.js +1 -1
  71. package/dist/components/kup-form.js +1 -1
  72. package/dist/components/kup-gauge.js +1 -1
  73. package/dist/components/kup-grid.js +1 -1
  74. package/dist/components/kup-htm.js +2 -2
  75. package/dist/components/kup-iframe.js +2 -2
  76. package/dist/components/kup-image-list.js +1 -1
  77. package/dist/components/kup-image.js +1 -1
  78. package/dist/components/kup-input-panel.js +3 -3
  79. package/dist/components/kup-lazy.js +2 -2
  80. package/dist/components/kup-list.js +1 -1
  81. package/dist/components/kup-magic-box.js +4 -4
  82. package/dist/components/kup-nav-bar.js +2 -2
  83. package/dist/components/kup-numeric-picker.js +2 -2
  84. package/dist/components/kup-object-field.js +2 -2
  85. package/dist/components/kup-pdf.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-79d1f615.js → p-1e55c9d9.js} +30 -24
  104. package/dist/components/{p-a8911531.js → p-45535b3a.js} +2 -2
  105. package/dist/components/{p-265e4b28.js → p-90f25b3f.js} +2 -2
  106. package/dist/components/{p-c9f8c885.js → p-e6ff41f1.js} +2 -2
  107. package/dist/components/{p-5fc1dad8.js → p-eaaa8901.js} +2 -2
  108. package/dist/components/{p-970526a0.js → p-fbaf1165.js} +1 -1
  109. package/dist/esm/{f-cell-81309366.js → f-cell-74347dce.js} +4 -4
  110. package/dist/esm/{f-chip-28fde4c9.js → f-chip-d5f27ee2.js} +1 -1
  111. package/dist/esm/{f-object-field-24f67438.js → f-object-field-6f759bf9.js} +2 -2
  112. package/dist/esm/{f-paginator-utils-3e2a0dcd.js → f-paginator-utils-6d124369.js} +1 -1
  113. package/dist/esm/{f-text-field-f64cc53e.js → f-text-field-86dd8534.js} +1 -1
  114. package/dist/esm/index.js +1 -1
  115. package/dist/esm/ketchup.js +1 -1
  116. package/dist/esm/kup-accordion.entry.js +1 -1
  117. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  118. package/dist/esm/kup-autocomplete_30.entry.js +32 -26
  119. package/dist/esm/kup-box.entry.js +7 -7
  120. package/dist/esm/kup-calendar.entry.js +2 -2
  121. package/dist/esm/kup-card-list.entry.js +1 -1
  122. package/dist/esm/kup-cell.entry.js +5 -5
  123. package/dist/esm/kup-dashboard.entry.js +2 -2
  124. package/dist/esm/{kup-data-table-helper-8a7b3a79.js → kup-data-table-helper-7d5e4260.js} +1 -1
  125. package/dist/esm/kup-drawer.entry.js +1 -1
  126. package/dist/esm/kup-echart.entry.js +1 -1
  127. package/dist/esm/kup-editor.entry.js +1 -1
  128. package/dist/esm/kup-family-tree.entry.js +1 -1
  129. package/dist/esm/kup-grid.entry.js +1 -1
  130. package/dist/esm/kup-htm.entry.js +1 -1
  131. package/dist/esm/kup-iframe.entry.js +1 -1
  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-7acd779a.js → kup-manager-2b06d829.js} +1 -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-planner.entry.js +2 -2
  141. package/dist/esm/kup-probe.entry.js +1 -1
  142. package/dist/esm/kup-qlik.entry.js +1 -1
  143. package/dist/esm/kup-snackbar.entry.js +1 -1
  144. package/dist/esm/kup-txt.entry.js +1 -1
  145. package/dist/esm/kup-typography-list.entry.js +1 -1
  146. package/dist/esm/kup-typography.entry.js +1 -1
  147. package/dist/esm/loader.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-4e8d34ad.entry.js → p-00963efe.entry.js} +1 -1
  151. package/dist/ketchup/{p-e0b948bf.entry.js → p-0224f595.entry.js} +1 -1
  152. package/dist/ketchup/{p-637150e5.entry.js → p-0d4f7e56.entry.js} +1 -1
  153. package/dist/ketchup/{p-dc52b02d.entry.js → p-1833f1df.entry.js} +1 -1
  154. package/dist/ketchup/{p-683a5a81.entry.js → p-1c1395de.entry.js} +1 -1
  155. package/dist/ketchup/{p-59ef4c6d.entry.js → p-1f6d5a98.entry.js} +1 -1
  156. package/dist/ketchup/p-2bb6c663.js +1 -0
  157. package/dist/ketchup/{p-58d2a18c.entry.js → p-3bdd6c6c.entry.js} +1 -1
  158. package/dist/ketchup/p-4159b799.entry.js +8 -0
  159. package/dist/ketchup/{p-e0bd16b8.js → p-43246def.js} +1 -1
  160. package/dist/ketchup/{p-e7c457c4.entry.js → p-4992a7f2.entry.js} +1 -1
  161. package/dist/ketchup/{p-ebcf33a3.entry.js → p-4f380f49.entry.js} +1 -1
  162. package/dist/ketchup/{p-b7b54a12.js → p-514a0dfd.js} +1 -1
  163. package/dist/ketchup/{p-c00b4f52.js → p-5f35bc3e.js} +1 -1
  164. package/dist/ketchup/{p-84a053a8.js → p-62b0efc0.js} +1 -1
  165. package/dist/ketchup/{p-62a9c8e3.entry.js → p-63a686bc.entry.js} +1 -1
  166. package/dist/ketchup/{p-712f2e6c.entry.js → p-66d8c28a.entry.js} +1 -1
  167. package/dist/ketchup/{p-8fd8943f.entry.js → p-6a822f80.entry.js} +1 -1
  168. package/dist/ketchup/{p-3afd729a.entry.js → p-7b7d2c56.entry.js} +1 -1
  169. package/dist/ketchup/{p-a802f5c5.entry.js → p-7bc9db2e.entry.js} +1 -1
  170. package/dist/ketchup/{p-e65ca213.entry.js → p-8664f2d6.entry.js} +1 -1
  171. package/dist/ketchup/{p-2ef55ae7.entry.js → p-8d68c939.entry.js} +1 -1
  172. package/dist/ketchup/{p-4518f1bb.entry.js → p-93f419c8.entry.js} +1 -1
  173. package/dist/ketchup/{p-dacc25e0.entry.js → p-96904611.entry.js} +1 -1
  174. package/dist/ketchup/{p-5f418d60.entry.js → p-9c35165c.entry.js} +1 -1
  175. package/dist/ketchup/{p-c38d19f9.js → p-a186678f.js} +1 -1
  176. package/dist/ketchup/{p-0f3e905b.entry.js → p-b1a9f499.entry.js} +1 -1
  177. package/dist/ketchup/{p-140bd051.entry.js → p-b3ab3b46.entry.js} +1 -1
  178. package/dist/ketchup/{p-c149961e.entry.js → p-ba0497d4.entry.js} +1 -1
  179. package/dist/ketchup/{p-cdf00a54.entry.js → p-c611bb93.entry.js} +1 -1
  180. package/dist/ketchup/{p-9dd436ae.entry.js → p-c662be76.entry.js} +1 -1
  181. package/dist/ketchup/{p-2a760a0e.entry.js → p-ca669fe4.entry.js} +1 -1
  182. package/dist/ketchup/{p-975535a4.js → p-df012d8b.js} +1 -1
  183. package/dist/ketchup/{p-9c5d2818.entry.js → p-e04629d5.entry.js} +1 -1
  184. package/dist/ketchup/{p-797b0ce5.entry.js → p-e6cad40c.entry.js} +1 -1
  185. package/dist/ketchup/{p-9b942f80.entry.js → p-ebf38e37.entry.js} +1 -1
  186. package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +5 -1
  187. package/dist/types/components/kup-chip/kup-chip.d.ts +15 -15
  188. package/package.json +1 -1
  189. package/dist/ketchup/p-216b5deb.js +0 -1
  190. package/dist/ketchup/p-250f2fe0.entry.js +0 -8
@@ -1 +1 @@
1
- import{E as e,H as t,D as n,ai as l,x as o,z as r,aj as i,ak as s,N as a,O as u,F as c,al as f,am as h,an as d,ao as b,ap as m,a8 as p}from"./p-84a053a8.js";import{K as v}from"./p-cabebabc.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!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."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(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===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(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:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1,l=[]){const o={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){if(l.includes(r.id)){o.rows.push(r);continue}const t={cells:{},id:r.id};for(const n of o.columns){const l=n.name,o=r.cells[l],i=e.rows.find((e=>e.id===r.id)),s=i?i.cells[l]:null;(!s&&o.value||s&&o.value!==s.value)&&(t.cells[l]=o)}(Object.keys(t.cells).length>0||n)&&o.rows.push(t)}return o}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i,l.data),[c.COMBOBOX]:()=>f(o,"",i,l.data),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
1
+ import{E as e,H as t,D as n,ai as l,x as o,z as r,aj as i,ak as s,N as a,O as u,F as c,al as f,am as h,an as d,ao as b,ap as m,a8 as p}from"./p-62b0efc0.js";import{K as v}from"./p-cabebabc.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=t[n];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},t[n]=o),null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes[o.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;const o=e[t];o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length&&delete e[t]}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=e[t];null==o&&(o={textField:"",textFieldTmp:"",checkBoxes:[]},e[t]=o),l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!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."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(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===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,o,n)))}function D(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{D(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function E(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=E(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function B(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:I(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function z(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function I(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:z(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function $(e,t,n=!1,l=[]){const o={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){if(l.includes(r.id)){o.rows.push(r);continue}const t={cells:{},id:r.id};for(const n of o.columns){const l=n.name,o=r.cells[l],i=e.rows.find((e=>e.id===r.id)),s=i?i.cells[l]:null;(!s&&o.value||s&&o.value!==s.value)&&(t.cells[l]=o)}(Object.keys(t.cells).length>0||n)&&o.rows.push(t)}return o}function q(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i,l.data),[c.COMBOBOX]:()=>f(o,"",i,l.data),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,B as c,q as d,F as e,M as f,$ as g,A as n,S as p,C as s,x as t}
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as a,H as n,d as o}from"./p-710d0a7d.js";import{k as s,g as p,s as r}from"./p-84a053a8.js";import{c}from"./p-635bb4b3.js";import{F as l}from"./p-c4224227.js";import"./p-cabebabc.js";import"./p-e3062c19.js";import"./p-3cab6420.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:"29fc36a9d37ee6a6eb561ba7f3b34f6f52f376d0","kup-visible":this.visible},a("style",{key:"6acdde175ca85d13aaa9476c185872504c9aec67"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"0e4c3911b05c87a79d430ae7f42bffc21430167f",id:c},a("div",{key:"6bc4090dfcbda8cf603fed53b010e3a534f819a5",class:f},a("div",{key:"10d40a1420f7876997476be973d1f05ac2e1e628",class:"snackbar__text__block"},a("div",{key:"13871cdd376fe9c57b2a2484d1338c218a3adab1",class:`${f}__header`},this.header),a("div",{key:"79dcfa8747ac1e0621210f48810c591dc8fe343c",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:var(--kup-label-01-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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-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:var(--kup-heading-compact-01-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
+ import{r as t,c as e,f as i,h as a,H as n,d as o}from"./p-710d0a7d.js";import{k as s,g as p,s as r}from"./p-62b0efc0.js";import{c}from"./p-635bb4b3.js";import{F as l}from"./p-c4224227.js";import"./p-cabebabc.js";import"./p-e3062c19.js";import"./p-3cab6420.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:"29fc36a9d37ee6a6eb561ba7f3b34f6f52f376d0","kup-visible":this.visible},a("style",{key:"6acdde175ca85d13aaa9476c185872504c9aec67"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"0e4c3911b05c87a79d430ae7f42bffc21430167f",id:c},a("div",{key:"6bc4090dfcbda8cf603fed53b010e3a534f819a5",class:f},a("div",{key:"10d40a1420f7876997476be973d1f05ac2e1e628",class:"snackbar__text__block"},a("div",{key:"13871cdd376fe9c57b2a2484d1338c218a3adab1",class:`${f}__header`},this.header),a("div",{key:"79dcfa8747ac1e0621210f48810c591dc8fe343c",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:var(--kup-label-01-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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-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:var(--kup-heading-compact-01-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 e,h as n,H as o,d as a}from"./p-710d0a7d.js";import{k as p,g as s,s as h,h as f}from"./p-84a053a8.js";import"./p-cabebabc.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:var(--kup-label-01-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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-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-710d0a7d.js";import{k as p,g as s,s as h,h as f}from"./p-62b0efc0.js";import"./p-cabebabc.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:var(--kup-label-01-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:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-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{h as o}from"./p-710d0a7d.js";import{a as t,k as e,e as n}from"./p-84a053a8.js";import{F as c}from"./p-c4224227.js";import{a as i}from"./p-e3062c19.js";import{F as l}from"./p-c00b4f52.js";const s=new WeakMap,a=e=>{var n;let s;return o("div",{class:`f-object-field ${e.wrapperClass?e.wrapperClass:""}`,ref:async o=>{o&&(e.root=o,p(e))}},o("div",{class:"fields-wrapper"},o(l,Object.assign({icon:"search",trailingIcon:!0,disabled:!1},null===(n=e.cell)||void 0===n?void 0:n.data,{attachHelperSection:o=>(s=o,!1),value:e.inputValue,onChange:e.onChange,onIconClick:d.icon.bind(e),onInput:d.input.bind(e),onKeyDown:d.keydown.bind(e)})),o(c,{icon:"menu",onClick:d.button.bind(e),sizing:t.SMALL,styling:i.FLAT,wrapperClass:"obj-field-extra-btn"})),s,o("kup-toolbar",{"onKup-toolbar-click":d.toolbar.bind(e)}))};function r(o){const{cell:t}=o,n=s.get(t),{clickCb:c}=n,{toolbar:i}=u(n),l=e();l.dynamicPosition.stop(i),l.removeClickCallback(c),i.style.display="none",n.isListOpened=!1}const u=o=>{const{children:t,clickCb:e,root:n}=o;return Object.keys(o.children).length||(t.button=n.querySelector(".f-button"),t.textfield=n.querySelector(".f-text-field"),t.toolbar=n.querySelector("kup-toolbar"),e.el=t.toolbar),t},p=o=>{const{cell:t,root:e}=o,n=s.get(t);s.set(t,n?Object.assign(Object.assign({},n),{root:e,children:u(n)}):{children:{},clickCb:{cb:r.bind(r,o)},inputValue:o.inputValue,isListOpened:!1,root:e})},b=(o,t,e)=>{const{cell:n,column:c,row:i,root:l}=o,{children:a,inputValue:r}=s.get(n),u=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{cell:n,children:a,column:c,inputValue:r,originalEvent:e,row:i}});l.dispatchEvent(u)},d={button:function(o){(function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i}=c;i?r(o):function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i,clickCb:l}=c,{button:a,toolbar:r}=u(c);if(i)return;const p=e();p.dynamicPosition.isRegistered(r)?p.dynamicPosition.changeAnchor(r,a):p.dynamicPosition.register(r,a,0,n.AUTO,!1),p.dynamicPosition.start(r),p.addClickCallback(l,!0),r.style.display="block",c.isListOpened=!0}(o)})(this),b(this,"kup-objectfield-opensearchmenu",o)},icon:function(o){b(this,"kup-objectfield-searchpayload",o)},input:function(o){const{cell:t}=this;s.get(t).inputValue=o.target.value},keydown:function(o){"F4"===o.code&&(o.preventDefault(),o.stopPropagation(),b(this,"kup-objectfield-searchpayload",o))},toolbar:function(o){r(this),b(this,"kup-objectfield-selectedmenuitem",o)}};export{a as F}
1
+ import{h as o}from"./p-710d0a7d.js";import{a as t,k as e,e as n}from"./p-62b0efc0.js";import{F as c}from"./p-c4224227.js";import{a as i}from"./p-e3062c19.js";import{F as l}from"./p-5f35bc3e.js";const s=new WeakMap,r=e=>{var n;let s;return o("div",{class:`f-object-field ${e.wrapperClass?e.wrapperClass:""}`,ref:async o=>{o&&(e.root=o,p(e))}},o("div",{class:"fields-wrapper"},o(l,Object.assign({icon:"search",trailingIcon:!0,disabled:!1},null===(n=e.cell)||void 0===n?void 0:n.data,{attachHelperSection:o=>(s=o,!1),value:e.inputValue,onChange:e.onChange,onIconClick:d.icon.bind(e),onInput:d.input.bind(e),onKeyDown:d.keydown.bind(e)})),o(c,{icon:"menu",onClick:d.button.bind(e),sizing:t.SMALL,styling:i.FLAT,wrapperClass:"obj-field-extra-btn"})),s,o("kup-toolbar",{"onKup-toolbar-click":d.toolbar.bind(e)}))};function a(o){const{cell:t}=o,n=s.get(t),{clickCb:c}=n,{toolbar:i}=u(n),l=e();l.dynamicPosition.stop(i),l.removeClickCallback(c),i.style.display="none",n.isListOpened=!1}const u=o=>{const{children:t,clickCb:e,root:n}=o;return Object.keys(o.children).length||(t.button=n.querySelector(".f-button"),t.textfield=n.querySelector(".f-text-field"),t.toolbar=n.querySelector("kup-toolbar"),e.el=t.toolbar),t},p=o=>{const{cell:t,root:e}=o,n=s.get(t);s.set(t,n?Object.assign(Object.assign({},n),{root:e,children:u(n)}):{children:{},clickCb:{cb:a.bind(a,o)},inputValue:o.inputValue,isListOpened:!1,root:e})},b=(o,t,e)=>{const{cell:n,column:c,row:i,root:l}=o,{children:r,inputValue:a}=s.get(n),u=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{cell:n,children:r,column:c,inputValue:a,originalEvent:e,row:i}});l.dispatchEvent(u)},d={button:function(o){(function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i}=c;i?a(o):function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i,clickCb:l}=c,{button:r,toolbar:a}=u(c);if(i)return;const p=e();p.dynamicPosition.isRegistered(a)?p.dynamicPosition.changeAnchor(a,r):p.dynamicPosition.register(a,r,0,n.AUTO,!1),p.dynamicPosition.start(a),p.addClickCallback(l,!0),a.style.display="block",c.isListOpened=!0}(o)})(this),b(this,"kup-objectfield-opensearchmenu",o)},icon:function(o){b(this,"kup-objectfield-searchpayload",o)},input:function(o){const{cell:t}=this;s.get(t).inputValue=o.target.value},keydown:function(o){"F4"===o.code&&(o.preventDefault(),o.stopPropagation(),b(this,"kup-objectfield-searchpayload",o))},toolbar:function(o){a(this),b(this,"kup-objectfield-selectedmenuitem",o)}};export{r as F}
@@ -1 +1 @@
1
- import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-84a053a8.js";import{F as i}from"./p-3cab6420.js";const n=document.documentElement,d=(l,t)=>{var i,n;const d={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},a=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,a))||void 0===n||n;return e("div",Object.assign({class:d},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),s?a:null,e("label",null,l.label)]):[o(l),s?a:null],t)};function o(d){var o,s,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(!d.label||d.leadingLabel||d.trailingLabel||d.legacyLook||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,[`mdc-text-field--textarea--${d.sizing||"small"}`]:d.textArea,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(s=d.allowNegative)||void 0===s||s,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=a(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=a(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?a(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?a(d.max.toString(),o,!0):a(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o,a;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,d=n.ketchup.math.decimalSeparator();return t.value.includes(d)||(t.value=t.value.slice(0,i)+d+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=d.allowNegative)||void 0===t||t,decimal:d.decimals,group:null===(i=d.group)||void 0===i||i,integer:(null!==(o=d.integers)&&void 0!==o?o:0)-(null!==(a=d.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable&&d.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}const a=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}
1
+ import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-62b0efc0.js";import{F as i}from"./p-3cab6420.js";const n=document.documentElement,d=(l,t)=>{var i,n;const d={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},a=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,a))||void 0===n||n;return e("div",Object.assign({class:d},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),s?a:null,e("label",null,l.label)]):[o(l),s?a:null],t)};function o(d){var o,s,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(!d.label||d.leadingLabel||d.trailingLabel||d.legacyLook||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,[`mdc-text-field--textarea--${d.sizing||"small"}`]:d.textArea,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(s=d.allowNegative)||void 0===s||s,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=a(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=a(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?a(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?a(d.max.toString(),o,!0):a(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o,a;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,d=n.ketchup.math.decimalSeparator();return t.value.includes(d)||(t.value=t.value.slice(0,i)+d+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=d.allowNegative)||void 0===t||t,decimal:d.decimals,group:null===(i=d.group)||void 0===i||i,integer:(null!==(o=d.integers)&&void 0!==o?o:0)-(null!==(a=d.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable&&d.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}const a=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}