@sme.up/ketchup 10.2.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-cell-3ed4ad9e.js → f-cell-cfdd6703.js} +4 -4
- package/dist/cjs/{f-chip-b936dcaf.js → f-chip-24b1eb58.js} +1 -1
- package/dist/cjs/{f-object-field-348fa103.js → f-object-field-2ffc49c1.js} +2 -2
- package/dist/cjs/{f-paginator-utils-f951cc54.js → f-paginator-utils-51bb9317.js} +1 -1
- package/dist/cjs/{f-text-field-e41f653a.js → f-text-field-5face063.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_29.cjs.entry.js +121 -57
- package/dist/cjs/kup-box.cjs.entry.js +11 -8
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-adaa11bb.js → kup-data-table-helper-6f4d86ea.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +9 -4
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js +44 -69
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
- package/dist/cjs/{kup-manager-39bc2be8.js → kup-manager-49d2d8fe.js} +81 -157
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +1 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +39 -7
- package/dist/collection/components/kup-box/kup-box.js +24 -1
- package/dist/collection/components/kup-button/kup-button.js +0 -24
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +24 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +94 -24
- package/dist/collection/components/kup-editor/kup-editor.js +8 -3
- package/dist/collection/components/kup-input-panel/kup-input-panel-utils.js +24 -11
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +47 -31
- package/dist/collection/components/kup-tree/kup-tree.js +42 -12
- package/dist/collection/managers/kup-manager/kup-manager.js +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +44 -68
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-7d0f1f90.js → p-1ee81222.js} +118 -52
- package/dist/components/{p-b80494d7.js → p-2a4abe21.js} +2 -2
- package/dist/components/{p-eb8a2811.js → p-66d53743.js} +10 -5
- package/dist/components/{p-b304b91c.js → p-7550d08c.js} +81 -157
- package/dist/components/{p-a0258e6f.js → p-7dd33834.js} +2 -2
- package/dist/components/{p-3438f15f.js → p-c45e24b0.js} +6 -3
- package/dist/esm/{f-cell-6576e009.js → f-cell-fbe84498.js} +4 -4
- package/dist/esm/{f-chip-bb62428a.js → f-chip-35dfafdb.js} +1 -1
- package/dist/esm/{f-object-field-b87b6ae6.js → f-object-field-fa368c87.js} +2 -2
- package/dist/esm/{f-paginator-utils-04903d74.js → f-paginator-utils-d7e6b742.js} +1 -1
- package/dist/esm/{f-text-field-9be88e51.js → f-text-field-dcf09b57.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_29.entry.js +121 -57
- package/dist/esm/kup-box.entry.js +11 -8
- package/dist/esm/kup-calendar.entry.js +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-13eb7abf.js → kup-data-table-helper-537035b9.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +9 -4
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +5 -5
- package/dist/esm/kup-input-panel.entry.js +44 -69
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-6aa0a1c7.js → kup-manager-2b2b7c68.js} +81 -157
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-b365f2f2.entry.js → p-058d9f3a.entry.js} +1 -1
- package/dist/ketchup/{p-42a1f9ec.entry.js → p-0866ddcf.entry.js} +1 -1
- package/dist/ketchup/{p-e104cfb7.js → p-0a60f2ec.js} +1 -1
- package/dist/ketchup/{p-838d8e97.js → p-0f7a8165.js} +1 -1
- package/dist/ketchup/{p-f8a027a1.entry.js → p-13f159d6.entry.js} +1 -1
- package/dist/ketchup/{p-a597a851.entry.js → p-19689040.entry.js} +1 -1
- package/dist/ketchup/p-1f32300c.entry.js +1 -0
- package/dist/ketchup/{p-55b0991f.entry.js → p-2020fbaf.entry.js} +1 -1
- package/dist/ketchup/{p-07f50333.entry.js → p-328896f0.entry.js} +1 -1
- package/dist/ketchup/{p-6fc1bb18.entry.js → p-32aa082e.entry.js} +1 -1
- package/dist/ketchup/{p-9b907768.entry.js → p-35e03e2f.entry.js} +1 -1
- package/dist/ketchup/{p-58002a23.entry.js → p-3aa35543.entry.js} +1 -1
- package/dist/ketchup/{p-9edd90c2.entry.js → p-3c882916.entry.js} +1 -1
- package/dist/ketchup/{p-15f192f0.entry.js → p-3eb4daa3.entry.js} +1 -1
- package/dist/ketchup/{p-5d9f2d24.entry.js → p-4418988a.entry.js} +1 -1
- package/dist/ketchup/{p-d084b2d4.entry.js → p-446fedb6.entry.js} +1 -1
- package/dist/ketchup/{p-267d1898.js → p-45d34ba7.js} +1 -1
- package/dist/ketchup/{p-d0554d1f.entry.js → p-4a44bef2.entry.js} +1 -1
- package/dist/ketchup/{p-9bc02da6.entry.js → p-4a6c6bf4.entry.js} +1 -1
- package/dist/ketchup/{p-fdcb43a2.entry.js → p-63117858.entry.js} +1 -1
- package/dist/ketchup/{p-92431583.entry.js → p-6714d68a.entry.js} +1 -1
- package/dist/ketchup/{p-8be42f5c.js → p-6eb5f3da.js} +1 -1
- package/dist/ketchup/{p-fb775526.entry.js → p-7722245b.entry.js} +1 -1
- package/dist/ketchup/{p-100b8ae7.entry.js → p-7b45a31b.entry.js} +1 -1
- package/dist/ketchup/{p-d8dbf3df.entry.js → p-8932614c.entry.js} +2 -2
- package/dist/ketchup/{p-c2ccbaca.entry.js → p-8a8da47d.entry.js} +1 -1
- package/dist/ketchup/{p-da44226a.entry.js → p-8feabbf8.entry.js} +1 -1
- package/dist/ketchup/p-97d8720e.entry.js +1 -0
- package/dist/ketchup/{p-6d628b49.entry.js → p-bce5be1c.entry.js} +1 -1
- package/dist/ketchup/{p-e4fa2cf3.js → p-cd73eaec.js} +2 -2
- package/dist/ketchup/{p-e6afa8a6.entry.js → p-d7d84da0.entry.js} +1 -1
- package/dist/ketchup/{p-0de49966.entry.js → p-e695fd91.entry.js} +1 -1
- package/dist/ketchup/p-e6be6193.entry.js +9 -0
- package/dist/ketchup/{p-0b1e0b48.js → p-e78670d8.js} +1 -1
- package/dist/ketchup/{p-a4b6d6c5.js → p-eaabc269.js} +1 -1
- package/dist/ketchup/{p-4ffc1a88.entry.js → p-f69679df.entry.js} +1 -1
- package/dist/ketchup/p-f69923dd.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +2 -1
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +5 -0
- package/dist/types/components/kup-box/kup-box.d.ts +2 -0
- package/dist/types/components/kup-button/kup-button.d.ts +0 -1
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +2 -1
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +5 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +1 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +5 -0
- package/dist/types/components/kup-input-panel/kup-input-panel-utils.d.ts +7 -4
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +5 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +2 -1
- package/dist/types/components.d.ts +36 -4
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +0 -2
- package/dist/types/managers/kup-manager/kup-manager.d.ts +0 -2
- package/package.json +2 -2
- package/dist/collection/managers/kup-keys-binding/kup-keys-binding-declarations.js +0 -1
- package/dist/collection/managers/kup-keys-binding/kup-keys-binding.js +0 -79
- package/dist/ketchup/p-2d84c26e.entry.js +0 -1
- package/dist/ketchup/p-3dbafa20.entry.js +0 -9
- package/dist/ketchup/p-3e42953b.entry.js +0 -1
- package/dist/ketchup/p-65b23870.entry.js +0 -1
- package/dist/types/managers/kup-keys-binding/kup-keys-binding-declarations.d.ts +0 -1
- package/dist/types/managers/kup-keys-binding/kup-keys-binding.d.ts +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,E as t,C as n,ah as l,w as o,y as r,ai as i,aj as s,N as a,O as u,F as c,ak as f,al as h,am as d,an as b,ao as m,a7 as p}from"./p-e4fa2cf3.js";import{K as v}from"./p-1ee561ba.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 C=document.documentElement;function T(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=T(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=C.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?C.ketchup.math.numberify(C.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=C.ketchup.math.numberify(C.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=C.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=C.ketchup.math.numberify(C.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&&C.ketchup.objects.isDate(r.obj)&&C.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(C.ketchup.dates.toDayjs(t)),e.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=C.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(C.ketchup.dates.toDayjs(e)),n.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=C.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=C.ketchup.math.numberify(C.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&&C.ketchup.objects.isDate(r.obj)&&C.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(C.ketchup.dates.toDayjs(t)),e.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=C.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(C.ketchup.dates.toDayjs(e)),n.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=C.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]=C.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(C.ketchup.objects.isEmptyJsObject(n)||C.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(C.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+C.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+C.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>C.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>C.ketchup.math.numberifySafe(e)))).toString())}if(C.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>C.ketchup.dates.isIsoDate(e))).map((e=>C.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=C.ketchup.dates.format(C.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=C.ketchup.dates.format(C.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]=C.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])=>(C.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:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function I(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 $(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:I(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function z(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),[c.COMBOBOX]:()=>f(o,"",i),[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,z as d,F as e,M as f,q as g,A as n,S as p,T as s,x as t}
|
|
1
|
+
import{D as e,E as t,C as n,ah as l,w as o,y as r,ai as i,aj as s,N as a,O as u,F as c,ak as f,al as h,am as d,an as b,ao as m,a7 as p}from"./p-cd73eaec.js";import{K as v}from"./p-1ee561ba.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 C=document.documentElement;function T(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=T(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=C.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?C.ketchup.math.numberify(C.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=C.ketchup.math.numberify(C.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=C.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=C.ketchup.math.numberify(C.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&&C.ketchup.objects.isDate(r.obj)&&C.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(C.ketchup.dates.toDayjs(t)),e.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=C.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(C.ketchup.dates.toDayjs(e)),n.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=C.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=C.ketchup.math.numberify(C.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&&C.ketchup.objects.isDate(r.obj)&&C.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(C.ketchup.dates.toDayjs(t)),e.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=C.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(C.ketchup.dates.toDayjs(e)),n.group.totals[o]=C.ketchup.dates.format(C.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=C.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]=C.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(C.ketchup.objects.isEmptyJsObject(n)||C.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(C.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+C.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+C.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>C.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>C.ketchup.math.numberifySafe(e)))).toString())}if(C.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>C.ketchup.dates.isIsoDate(e))).map((e=>C.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=C.ketchup.dates.format(C.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=C.ketchup.dates.format(C.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]=C.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])=>(C.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:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function I(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 $(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:I(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,n=!1){const l={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const o of t.rows){const t={cells:{},id:o.id};for(const n of l.columns){const l=n.name,r=o.cells[l],i=e.rows.find((e=>e.id===o.id)),s=i?i.cells[l]:null;(!s&&r.value||s&&r.value!==s.value)&&(t.cells[l]=r)}(Object.keys(t.cells).length>0||n)&&l.rows.push(t)}return l}function z(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),[c.COMBOBOX]:()=>f(o,"",i),[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,z as d,F as e,M as f,q as g,A as n,S as p,T as s,x as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,g as l}from"./p-710d0a7d.js";import{b as t}from"./p-
|
|
1
|
+
import{h as e,g as l}from"./p-710d0a7d.js";import{b as t}from"./p-cd73eaec.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),c=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),c?a:null,e("label",null,l.label)]):[o(l),c?a:null],t)};function o(d){var o,c,s,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(d.maxLength>=256&&(d.textArea=!0),!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===(c=d.allowNegative)||void 0===c||c,decimal:d.decimals,group:null===(s=d.group)||void 0===s||s,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 c={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 s=e.target,r=s.value,u=r.substring(0,s.selectionStart),m=r.substring(s.selectionEnd,s.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,c)||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?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 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as l,c as a,u as p}from"./p-e4fa2cf3.js";import{c as r}from"./p-635bb4b3.js";import{F as u}from"./p-a4b6d6c5.js";import{F as c}from"./p-c4054aba.js";import"./p-1ee561ba.js";import"./p-3cab6420.js";import"./p-d4a879fc.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(f||(f={}));const m=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=o(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){return l(this,f,t)}async refresh(){e(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,!0);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t,o=h>-1?t.substring(h+1):"";for(this.maxIntegers&&n.length>this.maxIntegers&&(n=n.substring(n.length-this.maxIntegers)),this.maxDecimals&&o.length>this.maxDecimals&&(o=o.substring(0,this.maxDecimals));this.maxLength&&n.length+o.length>this.maxLength;)o.length>1?o=o.substring(0,o.length-1):n.length>1&&(n=n.substring(1));t=h>-1?`${n}.${o}`:n,1!=e&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,a.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),e=Object.assign({},this.data["kup-text-field"]);return e.icon||(e.icon="calculator"),e.icon&&(e.trailingIcon=!0),s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:p.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),c(i))}this.kupManager.debug.logRender(this,!0)}render(){return s(h,{key:"7f7f0f85e214b1689be88c1f2bd313132ab37833"},s("style",{key:"c627cb9c574954df16eeff160eca5423a6f79724"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"5d633e89e27179bf77e8ef298dc589b572c1d70e",id:r},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return n(this)}};m.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{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
|
|
1
|
+
import{r as t,c as i,f as e,h as s,H as h,d as n}from"./p-710d0a7d.js";import{k as o,g as l,c as a,u as p}from"./p-cd73eaec.js";import{c as r}from"./p-635bb4b3.js";import{F as u}from"./p-eaabc269.js";import{F as c}from"./p-c4054aba.js";import"./p-1ee561ba.js";import"./p-3cab6420.js";import"./p-d4a879fc.js";var f;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(f||(f={}));const m=class{constructor(e){t(this,e),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.kupManager=o(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null,this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){return l(this,f,t)}async refresh(){e(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,e){let s=this.kupManager.math.numberify(t,!0);if(s){let t=s.toString();const h=t.indexOf(".");let n=h>-1?t.substring(0,h):t,o=h>-1?t.substring(h+1):"";for(this.maxIntegers&&n.length>this.maxIntegers&&(n=n.substring(n.length-this.maxIntegers)),this.maxDecimals&&o.length>this.maxDecimals&&(o=o.substring(0,this.maxDecimals));this.maxLength&&n.length+o.length>this.maxLength;)o.length>1?o=o.substring(0,o.length-1):n.length>1&&(n=n.substring(1));t=h>-1?`${n}.${o}`:n,1!=e&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,a.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),e=Object.assign({},this.data["kup-text-field"]);return e.icon||(e.icon="calculator"),e.icon&&(e.trailingIcon=!0),s(u,Object.assign({},e,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return s("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:p.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),c(i))}this.kupManager.debug.logRender(this,!0)}render(){return s(h,{key:"7f7f0f85e214b1689be88c1f2bd313132ab37833"},s("style",{key:"c627cb9c574954df16eeff160eca5423a6f79724"},this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{key:"5d633e89e27179bf77e8ef298dc589b572c1d70e",id:r},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return n(this)}};m.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{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color-60);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color-50);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-710d0a7d.js";import{F as o}from"./p-c4224227.js";import{F as a,e as u}from"./p-45d34ba7.js";import{F as r,k as h,ac as p,g as c,s as f,h as d,ah as m,an as v,ak as b,am as _,al as k,ao as g,e as x,V as y}from"./p-cd73eaec.js";import{F as w}from"./p-c4054aba.js";import{F as j,a as O}from"./p-cec0955d.js";import{c as $}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-3cab6420.js";import"./p-9f9428d1.js";import"./p-0a60f2ec.js";import"./p-0f7a8165.js";import"./p-eaabc269.js";import"./p-1ee561ba.js";import"./p-d4a879fc.js";var z,M,T,E,S;!function(t){t.TAB="tab"}(z||(z={})),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."}(M||(M={})),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"}(E||(E={})),function(t){t.BLUR="blur",t.ITEMCLICK="itemclick"}(S||(S={}));const C={blur:t=>t===r.CHECKBOX||t===r.SWITCH||t===r.COMBOBOX||t===r.AUTOCOMPLETE,itemclick:t=>t!==r.COMBOBOX&&t!==r.AUTOCOMPLETE},W=(t,i)=>0==t?3.75:t?1===t?11.25:7.5*t+(i?18:0)+4:null,D=t=>t?20*t:null,L=(t,i)=>t?t>(null==i?void 0:i.absoluteRow)?20*((null==i?void 0:i.absoluteRow)-1)+2*((null==i?void 0:i.absoluteRow)-1)+D(i.absoluteHeight)+20*(t-((null==i?void 0:i.absoluteRow)+(null==i?void 0:i.absoluteHeight)-1)-1):20*(t-1)+2*(t-1):null,I=t=>t?10*(t-1)*1.15:null;var P,F,K,N,R,H,A,U,V,B,G,J,q,X,Y,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,rt,ht,pt,ct,ft,dt,mt,vt,bt,_t,kt,gt,xt,yt,wt,jt,Ot,$t,zt,Mt,Tt,Et,St,Ct,Wt,Dt,Lt,It,Pt,Ft,Kt,Nt,Rt,Ht,At,Ut,Vt,Bt,Gt,Jt,qt,Xt,Yt,Qt,Zt=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)},ti=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 ii=document.documentElement,ni=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),this.kupInputPanelObjectFieldSearchPayload=i(this,"kup-inputpanel-objectfield-searchpayload",6),this.kupInputPanelObjectFieldOpenSearchMenu=i(this,"kup-inputpanel-objectfield-opensearchmenu",6),this.kupInputPanelObjectFieldSelectedMenuItem=i(this,"kup-inputpanel-objectfield-selectedmenuitem",6),P.add(this),F.set(this,h()),K.set(this,void 0),N.set(this,new Map([["SmeupDataTree",Zt(this,P,"m",Ft).bind(this)],["SmeupDataTable",Zt(this,P,"m",Kt).bind(this)],["SmeupTreeNode",Zt(this,P,"m",Pt).bind(this)],["SmeupTable",Zt(this,P,"m",Kt).bind(this)]])),R.set(this,null),H.set(this,[]),A.set(this,new Map([[p.DATE,"kup-date-picker"],[p.TIME,"kup-time-picker"]])),U.set(this,new Map([[p.COMBOBOX,"kup-combobox"],[p.AUTOCOMPLETE,"kup-autocomplete"]])),V.set(this,new Map([[r.BUTTON_LIST,Zt(this,P,"m",Z).bind(this)],[r.LABEL,Zt(this,P,"m",nt).bind(this)],[r.TABLE,Zt(this,P,"m",it).bind(this)]])),B.set(this,new Map([[z.TAB,Zt(this,P,"m",rt).bind(this)]])),G.set(this,[]),J.set(this,void 0),q.set(this,void 0),this.buttonPosition=E.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.updateOnClick=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){ti(this,R,structuredClone(this.data),"f"),Zt(this,H,"f").length&&(Zt(this,H,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),ti(this,H,[],"f")),this.data&&Zt(this,P,"m",ft).call(this,this.data)}listenKeydown(t){if("Enter"===t.key){t.preventDefault(),t.stopPropagation();const i=this.rootElement.shadowRoot.activeElement;"enter"===t.key.toLowerCase()&&i&&(null==i||i.blur(),this.submitCb({value:{before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)}}))}}async waitForReady(){return Zt(this,J,"f")}async getProps(t){return c(this,M,t)}async refresh(){n(this)}async setProps(t){f(this,M,t)}async update(t){Zt(this,P,"m",Bt).call(this,Zt(this,P,"m",X).call(this,t),t)}connectedCallback(){ti(this,J,new Promise((t=>{ti(this,q,t,"f")})),"f")}componentWillLoad(){Zt(this,F,"f").debug.logLoad(this,!1),Zt(this,F,"f").language.register(this),Zt(this,F,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Zt(this,P,"m",qt).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Zt(this,P,"m",Xt).call(this),Zt(this,F,"f").debug.logLoad(this,!0)}componentWillRender(){Zt(this,F,"f").debug.logRender(this,!1)}componentDidRender(){if(Zt(this,K,"f")){const t=Zt(this,K,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)w(t[i])}requestAnimationFrame((async()=>{Zt(this,K,"f")&&Zt(this,q,"f")&&(Zt(this,q,"f").call(this),ti(this,q,null,"f"))})),Zt(this,F,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Zt(this,F,"f").language.translate(d.EMPTY_DATA))]:this.inputPanelCells.map((t=>Zt(this,P,"m",Y).call(this,t)));return e(l,{key:"4ff52711b69f8e049b9b269696bbf9464afcec14","onKup-cell-blur":t=>Zt(this,P,"m",Ht).call(this,t,S.BLUR),"onKup-cell-update":Zt(this,P,"m",At).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Zt(this,P,"m",wt).bind(this),"onKup-autocomplete-iconclick":Zt(this,P,"m",wt).bind(this),"onKup-combobox-iconclick":t=>Zt(this,P,"m",wt).call(this,t,!0),"onKup-cell-itemclick":t=>Zt(this,P,"m",Ht).call(this,t,S.ITEMCLICK),"onKup-objectfield-searchpayload":t=>{this.kupInputPanelObjectFieldSearchPayload.emit(t.detail)},"onKup-objectfield-opensearchmenu":t=>{this.kupInputPanelObjectFieldOpenSearchMenu.emit(t.detail)},"onKup-objectfield-selectedmenuitem":t=>{this.kupInputPanelObjectFieldSelectedMenuItem.emit(t.detail)}},e("style",{key:"0e7d0c363c2ca6c6c9742b633f6f4bc54c8fee19"},Zt(this,F,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"9c9a06f9c2b7cc15b3e1a844824d5153b1f2f399",id:$},t))}disconnectedCallback(){Zt(this,F,"f").language.unregister(this),Zt(this,F,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};F=new WeakMap,K=new WeakMap,N=new WeakMap,R=new WeakMap,H=new WeakMap,A=new WeakMap,U=new WeakMap,V=new WeakMap,B=new WeakMap,G=new WeakMap,J=new WeakMap,q=new WeakMap,P=new WeakSet,X=function(t){return t?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):null},Y=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=Zt(this,P,"m",st).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=Zt(this,P,"m",lt).call(this,t,l)}else u=t.cells.filter((({column:t})=>t.visible)).map((i=>Zt(this,P,"m",Q).call(this,i.cell,t.row,i.column)));const r={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==E.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},p={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},c={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:O.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:r,ref:t=>ti(this,K,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)}})},onContextMenu:t=>{null!=Zt(this,P,"m",Gt).call(this,t)&&t.preventDefault()}},e("div",{class:"input-panel__typography"},e(j,Object.assign({},c))),e("div",{class:h,style:a},u),e("div",{class:p},e(o,{buttonType:"submit",label:Zt(this,F,"f").language.translate(d.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},Q=function(t,i,n){var l;if(!t)return;const s=Zt(this,V,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);t.data=Object.assign(Object.assign({},t.data),{sizing:"extra-small"});const o={cell:t,column:n,row:i,editable:!0,component:this,renderKup:!0,setSizes:!0},u=Zt(this,P,"m",et).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))},Z=function(t,{name:i}){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},tt=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Zt(this,P,"m",Bt).call(this,t.detail.node,t.detail.node.id)}}))},it=function(t,{name:i}){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},nt=function(t,i,n){const l=ii.ketchup.objects.isNumber(t.obj),s=l||ii.ketchup.objects.isDate(t.obj)||ii.ketchup.objects.isTime(t.obj)||ii.ketchup.objects.isTimestamp(t.obj),o=["input-panel-label"];n&&o.push("input-panel-label--legacy-look"),l&&o.push("input-panel-label-number");const a=s?m(i,t):t.value;return e("span",{class:o.join(" "),id:i.name},e(u,{text:a}))},et=function(t,i){return i&&ii.ketchup.data.cell.getType(t,t.shape)===p.RADIO?e("span",null,i):null},lt=function(t,i){const n=Zt(this,B,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Zt(this,P,"m",ot).call(this,t,i,!1)))},st=function(t,i){return i.sections.map((i=>Zt(this,P,"m",at).call(this,t,i)))},ot=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=>Zt(this,P,"m",t).call(this,i,n))).filter(Boolean);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=>Zt(this,P,"m",ht).call(this,i,t))).filter(Boolean),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const h=r.length?e("div",{class:u,style:s},r):void 0;return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(j,{type:O.HEADING1,value:n.title}),h):h},at=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=>Zt(this,P,"m",t).call(this,i,n)));else if(null===(s=n.content)||void 0===s?void 0:s.length){const t=n.content.find((t=>t.shape===r.TABLE)),e=t?{absoluteRow:t.absoluteRow,absoluteHeight:t.absoluteHeight}:{};o=n.content.map((t=>Zt(this,P,"m",pt).call(this,i,t,e)))}if(null==W(n.absoluteWidth))return o;const a=null!=W(n.absoluteWidth)?`${W(n.absoluteWidth)}px`:"100%",u=null!=D(n.absoluteHeight)?`${D(n.absoluteHeight)}px`:"100%",h=`${L(n.absoluteRow)}px`,p=`${I(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:h,left:p,overflow:"auto"}},o)},ut=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(Zt(this,P,"m",t).call(this,i))})),l},rt=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Zt(this,P,"m",ut).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 Zt(this,P,"m",ot).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)},ht=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell||!n.column.visible)return;const 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;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}`:""}},Zt(this,P,"m",Q).call(this,n.cell,t.row,n.column))},pt=function(t,i,n){const l=t.cells.find((t=>t.column.name===i.id));if(!l||!l.cell||!l.column.visible)return;let s;s=l.cell.shape==r.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const o=l.cell.shape===r.LABEL?(t=>0==t?3.75:t?1===t?11.25:7.5*t:null)(s):W(s,(a=l.cell.shape)===r.AUTOCOMPLETE||a===r.COMBOBOX||a===r.DATE);var a;const u=D(i.absoluteHeight),h=L(i.absoluteRow,n),p=I(i.absoluteColumn),c={position:"absolute",width:null!=o?`${o}px`:null,"min-width":null!=o?`${o}px`:null,"max-width":null!=o?`${o}px`:null,height:null!=u?`${u}px`:null,"min-height":null!=u?`${u}px`:null,"max-height":null!=u?`${u}px`:null,top:null!=h?`${h}px`:null,left:null!=p?`${p}px`:null,overflow:"hidden"};return l.cell.data=Object.assign(Object.assign(Object.assign({},l.cell.data),{customStyle:(l.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),l.cell.shape===r.TABLE&&{rowsPerPage:l.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${u}px`}),e("div",{style:c},Zt(this,P,"m",Q).call(this,l.cell,t.row,l.column))},ct=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=>Zt(this,P,"m",Nt).call(this,t)))}};return Zt(this,P,"m",tt).call(this,t,i)}{const i=Zt(this,P,"m",Nt).call(this,t);return Zt(this,P,"m",Z).call(this,i,{name:t.value,title:t.value})}})).flat()},ft=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)&&Zt(this,P,"m",ct).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.map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Zt(this,P,"m",dt).call(this,i,t,s),slotData:Zt(this,P,"m",_t).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{var n;const e=ii.ketchup.data.cell.getType(t,t.shape),l=Zt(this,A,"f").get(e),s=Zt(this,U,"f").get(e);if(!l&&!s)return;const o=(null!=l?l:s)+`[id='${i.name.replace(/\//g,"\\$1")}']`,a=this.rootElement.shadowRoot.querySelector(o);s?null==a||a.reset():null===(n=null==a?void 0:a.setValue)||void 0===n||n.call(a,t.value)})))),this.inputPanelCells=o},dt=function(t,i,n){const e=Object.assign(Object.assign({},Zt(this,P,"m",bt).call(this,t,i,n)),{disabled:!t.isEditable,id:i.name}),l=ii.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!==p.MULTI_AUTOCOMPLETE&&l!==p.MULTI_COMBOBOX?Zt(this,P,"m",mt).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},mt=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Zt(this,P,"m",t).call(this,i[e],n[e]):n[e];return i},vt=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)===r.TABLE&&(s=JSON.stringify(Zt(this,P,"m",Lt).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:[]})},bt=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=ii.ketchup.data.cell.getType(t,t.shape),a=new Map([[p.AUTOCOMPLETE,Zt(this,P,"m",yt).bind(this)],[p.BUTTON_LIST,Zt(this,P,"m",xt).bind(this)],[p.CHART,Zt(this,P,"m",gt).bind(this)],[p.CHIP,Zt(this,P,"m",kt).bind(this)],[p.CHECKBOX,Zt(this,P,"m",jt).bind(this)],[p.COLOR_PICKER,Zt(this,P,"m",Ot).bind(this)],[p.COMBOBOX,Zt(this,P,"m",yt).bind(this)],[p.EDITOR,Zt(this,P,"m",$t).bind(this)],[p.MULTI_AUTOCOMPLETE,Zt(this,P,"m",kt).bind(this)],[p.MULTI_COMBOBOX,Zt(this,P,"m",kt).bind(this)],[p.NUMBER,Zt(this,P,"m",Wt).bind(this)],[p.DATE,Zt(this,P,"m",Et).bind(this)],[p.OBJECT,Zt(this,P,"m",St).bind(this)],[p.RADIO,Zt(this,P,"m",Mt).bind(this)],[p.STRING,Zt(this,P,"m",zt).bind(this)],[p.SWITCH,Zt(this,P,"m",Tt).bind(this)],[p.TABLE,Zt(this,P,"m",Dt).bind(this)],[p.TIME,Zt(this,P,"m",Ct).bind(this)]]).get(o);return a?a(e,l,s,t,i.name,n):null},_t=function(t,i){const n=ii.ketchup.data.cell.getType(t,t.shape);return n===p.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.isEditable,id:i.name,fullWidth:!1}:n===p.MULTI_AUTOCOMPLETE||n===p.MULTI_COMBOBOX?Object.assign(Object.assign({},Zt(this,P,"m",yt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.isEditable,id:i.name}):null},kt=function(t,i,n,e){return v(n,e.decode)},gt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},xt=function(t,i,n,e,l){return e.data=e.data||{},e.data.onClick=()=>{Zt(this,P,"m",Bt).call(this,e,l)},Object.assign({label:e.value,fun:e.fun},e.data)},yt=function(t,i,n){const e=b(n,i,[]);return t&&(e.data["kup-list"].data=Zt(this,P,"m",It).call(this,t,n)),e},wt=function({detail:t},i=!1){const n=Zt(this,P,"m",X).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),n.fun&&e&&Zt(this,P,"m",Rt).call(this,t,n)},jt=function(t,i,n){return _(n,i)},Ot=function(t,i){return{data:{"kup-text-field":{label:i}}}},$t=function(t,i,n){return{initialValue:n}},zt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&e.isEditable&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Zt(this,P,"m",Qt).call(this,l,t)}),o},Mt=function(t,i,n){return k(n,t)},Tt=function(t,i,n){return g(n,i)},Et=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},St=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Ct=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},Wt=function(t,i){return{label:i}},Dt=function(t,i,n,e,l,s){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Zt(this,F,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,x.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({},Zt(this,P,"m",bt).call(this,i.cells[e],l,s)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Zt(this,F,"f").debug.logMessage(this,`Empty value for ${l} cell.`,x.WARNING),null)}catch(t){return Zt(this,F,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,x.ERROR),null}},Lt=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(Zt(this,R,"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}},It=function(t,i){const n=Zt(this,N,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Pt=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)?Zt(this,P,"m",t).call(this,i,n):[]}}))},Ft=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)?Zt(this,P,"m",t).call(this,i,n):[]}}))},Kt=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:l?n[l].value:n[e].value,selected:i===n[e].value}}))},Nt=function(t){return Object.assign(Object.assign({},t),{data:Zt(this,P,"m",xt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Rt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Zt(this,P,"m",vt).call(this),t.id).then((n=>{var e,l,s,o,a,u;const h=(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)))||[],p=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=h.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),c=Object.assign(Object.assign({},n),{rows:p}),f=i.shape===r.MULTI_AUTOCOMPLETE?i.slotData.data["kup-list"]:null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];f?(f.data=(null==p?void 0:p.length)&&null!==(a=Zt(this,P,"m",It).call(this,c,i.value))&&void 0!==a?a:[],f.options=null!==(u=n.columns)&&void 0!==u?u:[]):Zt(this,F,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',x.WARNING),t.comp.refresh()}))},Ht=async function(t,i){var n,e,l,s,o;const{detail:{column:a,cell:u}}=t;if(C[i](null==u?void 0:u.shape))return;const r=Zt(this,P,"m",X).call(this,a.name),h=Zt(this,R,"f").rows[0].cells[a.name];if(r){if(u.mandatory){if(Zt(this,P,"m",Ut).call(this,a.name,r.value?(null===(n=h.data)||void 0===n?void 0:n.error)||null:Zt(this,F,"f").language.translate(d.REQUIRED_VALUE)),!u.value)return}else Zt(this,P,"m",Ut).call(this,a.name,(null===(e=h.data)||void 0===e?void 0:e.error)||null);if(null===(l=u.inputSettings)||void 0===l?void 0:l.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:u.obj,currentState:Zt(this,P,"m",vt).call(this),fun:u.fun});if(!t)return void Zt(this,P,"m",Ut).call(this,a.name,Zt(this,F,"f").language.translate(d.INVALID_VALUE));Zt(this,P,"m",Ut).call(this,a.name,(null===(s=h.data)||void 0===s?void 0:s.error)||null)}(null===(o=u.inputSettings)||void 0===o?void 0:o.checkValueOnExit)&&Zt(this,P,"m",Vt).call(this)&&this.checkValidValueCallback({before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)},a.name)}},At=function({detail:{cell:t,column:i}}){var n;t.shape!==r.CHECKBOX&&t.shape!==r.SWITCH||(this.updateOnClick?this.submitCb({value:{before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)},cell:i.name}):(null===(n=t.inputSettings)||void 0===n?void 0:n.checkValueOnExit)&&this.checkValidValueCallback({before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)},i.name))},Ut=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})}}))})))},Vt=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Bt=function(t,i){(null==t?void 0:t.fun)?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Zt(this,P,"m",vt).call(this)}):this.submitCb({value:{before:Object.assign({},Zt(this,R,"f")),after:Zt(this,P,"m",vt).call(this)},cell:i})},Gt=function(t){return Zt(this,F,"f").getEventPath(t.target,this.rootElement).find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}))},Jt=function(t){const i=Zt(this,P,"m",Gt).call(this,t);if(null==i)return;const n=Zt(this,P,"m",vt).call(this),e=i["kup-get-cell-props"]().column.name;return{anchor:i,cell:n.rows[0].cells[e],column:n.columns.find((t=>t.name==e)),row:n.rows[0],originalEvent:t}},qt=function(){Zt(this,F,"f").interact.managedElements.add(Zt(this,K,"f")),Zt(this,F,"f").interact.on(Zt(this,K,"f"),y.TAP,(t=>{if(2==t.button){const i=Zt(this,P,"m",Jt).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Xt=function(){if(!Zt(this,K,"f"))return;const t=Array.from(Zt(this,K,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Zt(this,P,"m",Yt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Zt(this,P,"m",Yt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Yt=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}},Qt=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=Zt(this,K,"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()},ni.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-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_textfield_textarea_height_input_panel:var(\n --kup-textfield-textarea-height-input_panel,\n 200px\n );--kup_textfield_textarea_width_input_panel:var(\n --kup-textfield-textarea-width-input_panel,\n 300px\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(\n --kup-input-panel-padding--inline,\n 1em 0\n );--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:8px}: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;align-items:flex-end}: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 .f-text-field .mdc-text-field.mdc-text-field--textarea{min-height:var(--kup_textfield_textarea_height_input_panel) !important;min-width:var(--kup_textfield_textarea_width_input_panel) !important}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}: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;overflow:hidden}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height);--kup-textfield-extrasmall-height:20px;--kup-textfield-extrasmall-padding:0 var(--kup-space-01)}: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{ni as kup_input_panel}
|
|
@@ -17,7 +17,8 @@ export declare enum KupAutocompleteProps {
|
|
|
17
17
|
selectMode = "Sets how to return the selected item value. Suported values: \"CodeOnly\", \"DescOnly\", \"Both\" or \"CodeAndDesc\" and \"DescAndCode\".",
|
|
18
18
|
serverHandledFilter = "When true, the items filter is managed server side, otherwise items filter is done client side.",
|
|
19
19
|
showDropDownIcon = "When true shows the drop-down icon, for open list.",
|
|
20
|
-
showMarker = "When true shows a small marker on the component"
|
|
20
|
+
showMarker = "When true shows a small marker on the component",
|
|
21
|
+
legacyLook = "When true enables the monospaces look for the ACP component"
|
|
21
22
|
}
|
|
22
23
|
export interface KupAutocompleteEventPayload extends KupEventPayload {
|
|
23
24
|
value: string;
|
|
@@ -129,6 +129,11 @@ export declare class KupAutocomplete {
|
|
|
129
129
|
* @default "Type code or description"
|
|
130
130
|
*/
|
|
131
131
|
placeholder: string;
|
|
132
|
+
/**
|
|
133
|
+
* Allows legacyLook in ACP
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
legacyLook: boolean;
|
|
132
137
|
kupBlur: EventEmitter<KupAutocompleteEventPayload>;
|
|
133
138
|
kupChange: EventEmitter<KupAutocompleteEventPayload>;
|
|
134
139
|
kupClick: EventEmitter<KupAutocompleteEventPayload>;
|
|
@@ -3,6 +3,7 @@ import { KupBoxRow, KupBoxLayout, KupBoxKanban, KupBoxClickEventPayload, KupBoxS
|
|
|
3
3
|
import { KupBoxState } from './kup-box-state';
|
|
4
4
|
import { KupStore } from '../kup-state/kup-store';
|
|
5
5
|
import { GenericObject, KupEventPayload } from '../../types/GenericTypes';
|
|
6
|
+
import { FCellEventPayload } from '../../f-components/f-cell/f-cell-declarations';
|
|
6
7
|
import { KupDataRowAction } from '../../managers/kup-data/kup-data-declarations';
|
|
7
8
|
export declare class KupBox {
|
|
8
9
|
#private;
|
|
@@ -219,6 +220,7 @@ export declare class KupBox {
|
|
|
219
220
|
*/
|
|
220
221
|
kupBoxContextMenu: EventEmitter<KupBoxContextMenuEventPayload>;
|
|
221
222
|
kupLoadMoreClick: EventEmitter<KupBoxLoadMoreClickEventPayload>;
|
|
223
|
+
kupBoxCellClick: EventEmitter<FCellEventPayload>;
|
|
222
224
|
rowsPerPageHandler(newValue: number): void;
|
|
223
225
|
recalculateRows(): void;
|
|
224
226
|
onDataChanged(): void;
|
|
@@ -17,7 +17,8 @@ export declare enum KupComboboxProps {
|
|
|
17
17
|
showDropDownIcon = "When true shows the drop-down icon, for open list.",
|
|
18
18
|
label = "When set, its content will be shown as a label.",
|
|
19
19
|
leadingLabel = "When set to true, the label will be on the left of the component.",
|
|
20
|
-
showMarker = "When true shows a small marker on the component"
|
|
20
|
+
showMarker = "When true shows a small marker on the component",
|
|
21
|
+
legacyLook = "When true enables the monospaced look for the CMB component"
|
|
21
22
|
}
|
|
22
23
|
export interface KupComboboxEventPayload extends KupEventPayload {
|
|
23
24
|
inputValue: any;
|
|
@@ -99,6 +99,11 @@ export declare class KupCombobox {
|
|
|
99
99
|
* @default false
|
|
100
100
|
*/
|
|
101
101
|
showMarker: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Allows legacyLook aspect in CMB.
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
legacyLook: boolean;
|
|
102
107
|
kupClick: EventEmitter<KupComboboxEventPayload>;
|
|
103
108
|
kupBlur: EventEmitter<KupComboboxEventPayload>;
|
|
104
109
|
kupChange: EventEmitter<KupComboboxEventPayload>;
|
|
@@ -238,6 +238,7 @@ export interface KupDatatableRowSelectedEventPayload extends KupEventPayload {
|
|
|
238
238
|
selectedRows: Array<KupDataRow>;
|
|
239
239
|
clickedRow: KupDataRow;
|
|
240
240
|
clickedColumn: string;
|
|
241
|
+
isKeyboardNav?: boolean;
|
|
241
242
|
}
|
|
242
243
|
export interface KupDatatableClickEventPayload extends KupEventPayload {
|
|
243
244
|
details: KupDatatableEventHandlerDetails;
|
|
@@ -526,6 +526,11 @@ export declare class KupDataTable {
|
|
|
526
526
|
* This method is used to force tooltip request for current focused cell
|
|
527
527
|
*/
|
|
528
528
|
tooltipRequest(): Promise<void>;
|
|
529
|
+
/**
|
|
530
|
+
* Trigger update from outside
|
|
531
|
+
* @param {string} commandId - When provided, will trigger onclick event of command instead of *UPDATE
|
|
532
|
+
*/
|
|
533
|
+
update(commandId?: string): Promise<void>;
|
|
529
534
|
listenEnterKeydown(e: KeyboardEvent): void;
|
|
530
535
|
listenCopyCellValueInColumnListener(e: KeyboardEvent): void;
|
|
531
536
|
connectedCallback(): void;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { AbsoluteTblPositioningData, KupInputPanelLayout } from './kup-input-panel-declarations';
|
|
2
|
-
export declare const CHAR_WIDTH = 10;
|
|
3
2
|
export declare const ROW_HEIGHT = 20;
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const SPACED_ROW_HEIGHT = 22;
|
|
4
|
+
export declare const LEFT_MULTIPLIER = 1.15;
|
|
5
|
+
export declare const ADDITIONAL_WIDTH_WITH_ICON = 18;
|
|
5
6
|
export declare const FONT_SIZE = 12;
|
|
6
|
-
export declare const FONT_SIZE_TO_WIDTH_RATIO = 1.
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const FONT_SIZE_TO_WIDTH_RATIO = 1.6;
|
|
8
|
+
export declare const CHAR_WIDTH: number;
|
|
9
|
+
export declare const getAbsoluteWidth: (length: number, graphicShapeHasIcon?: boolean) => number;
|
|
8
10
|
export declare const getLabelAbsoluteWidth: (length: number) => number;
|
|
9
11
|
export declare const getAbsoluteHeight: (height: number) => number;
|
|
10
12
|
export declare const getAbsoluteTop: (row: number, absoluteTblPositioningData?: AbsoluteTblPositioningData) => number;
|
|
11
13
|
export declare const getAbsoluteLeft: (col: number) => number;
|
|
12
14
|
export declare const getInpComponentAbsoluteHeight: (layout: KupInputPanelLayout) => number;
|
|
15
|
+
export declare const graphicShapeHasIcon: (shape: string) => shape is "ACP" | "CMB" | "CAL";
|
|
@@ -115,6 +115,11 @@ export declare class KupInputPanel {
|
|
|
115
115
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
116
116
|
*/
|
|
117
117
|
setProps(props: GenericObject): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Trigger update from outside
|
|
120
|
+
* @param {string} cellId - When provided, will trigger onclick event of cell instead of *UPDATE
|
|
121
|
+
*/
|
|
122
|
+
update(cellId?: string): Promise<void>;
|
|
118
123
|
/**
|
|
119
124
|
* When component load is complete
|
|
120
125
|
*/
|
|
@@ -6,7 +6,7 @@ import { KupStore } from '../kup-state/kup-store';
|
|
|
6
6
|
import { GenericFilter, KupGlobalFilterMode, ValueDisplayedValue } from '../../utils/filters/filters-declarations';
|
|
7
7
|
import { ItemsDisplayMode } from '../kup-list/kup-list-declarations';
|
|
8
8
|
import { GenericObject, KupEventPayload } from '../../types/GenericTypes';
|
|
9
|
-
import { FCellPadding } from '../../f-components/f-cell/f-cell-declarations';
|
|
9
|
+
import { FCellEventPayload, FCellPadding } from '../../f-components/f-cell/f-cell-declarations';
|
|
10
10
|
import { KupDataColumn, KupDataDataset, KupDataRow } from '../../managers/kup-data/kup-data-declarations';
|
|
11
11
|
export declare class KupTree {
|
|
12
12
|
#private;
|
|
@@ -227,6 +227,7 @@ export declare class KupTree {
|
|
|
227
227
|
* Event fired when columns are removed (set to hidden).
|
|
228
228
|
*/
|
|
229
229
|
kupColumnRemove: EventEmitter<KupTreeColumnRemoveEventPayload>;
|
|
230
|
+
kupTreeCellClick: EventEmitter<FCellEventPayload>;
|
|
230
231
|
/**
|
|
231
232
|
* This method will get the selected nodes of the component.
|
|
232
233
|
*/
|
|
@@ -15,13 +15,13 @@ import { KupAutocompleteEventPayload, KupAutocompleteIconClickEventPayload } fro
|
|
|
15
15
|
import { BadgeType } from "./components/kup-badge/kup-badge-declarations";
|
|
16
16
|
import { KupBoxAutoSelectEventPayload, KupBoxClickEventPayload, KupBoxContextMenuEventPayload, KupBoxData, KupBoxKanban, KupBoxLayout, KupBoxLoadMoreClickEventPayload, KupBoxRow, KupBoxRowActionClickEventPayload, KupBoxSelectedEventPayload, LoadMoreMode } from "./components/kup-box/kup-box-declarations";
|
|
17
17
|
import { KupStore } from "./components/kup-state/kup-store";
|
|
18
|
+
import { FCellEventPayload, FCellPadding } from "./f-components/f-cell/f-cell-declarations";
|
|
18
19
|
import { FButtonAlign, FButtonProps, FButtonStyling } from "./f-components/f-button/f-button-declarations";
|
|
19
20
|
import { KupButtonClickEventPayload } from "./components/kup-button/kup-button-declarations";
|
|
20
21
|
import { KupButtonListClickEventPayload, KupButtonListNode } from "./components/kup-button-list/kup-button-list-declarations";
|
|
21
22
|
import { KupCalendarColumnsProp, KupCalendarData, KupCalendarDateClickEventPayload, KupCalendarEventClickEventPayload, KupCalendarEventDropEventPayload, KupCalendarViewChangeEventPayload, KupCalendarViewTypes } from "./components/kup-calendar/kup-calendar-declarations";
|
|
22
23
|
import { KupCardClickPayload, KupCardData, KupCardEventPayload, KupCardFamily } from "./components/kup-card/kup-card-declarations";
|
|
23
24
|
import { KupCardListClickEventPayload, KupCardListData } from "./components/kup-card-list/kup-card-list-declarations";
|
|
24
|
-
import { FCellEventPayload, FCellPadding } from "./f-components/f-cell/f-cell-declarations";
|
|
25
25
|
import { KupCellElementsPosition, KupCellSubmitClickEventPayload } from "./components/kup-cell/kup-cell-declarations";
|
|
26
26
|
import { KupFileUploadEventPayload } from "./components/kup-file-upload/kup-file-upload-declarations";
|
|
27
27
|
import { ChartAspect, ChartAxis, ChartOfflineMode, ChartSerie, ChartTitle, ChartType, KupChartClickEvent, KupChartSort, KupChartTrendlines } from "./components/kup-chart/kup-chart-declarations";
|
|
@@ -77,13 +77,13 @@ export { KupAutocompleteEventPayload, KupAutocompleteIconClickEventPayload } fro
|
|
|
77
77
|
export { BadgeType } from "./components/kup-badge/kup-badge-declarations";
|
|
78
78
|
export { KupBoxAutoSelectEventPayload, KupBoxClickEventPayload, KupBoxContextMenuEventPayload, KupBoxData, KupBoxKanban, KupBoxLayout, KupBoxLoadMoreClickEventPayload, KupBoxRow, KupBoxRowActionClickEventPayload, KupBoxSelectedEventPayload, LoadMoreMode } from "./components/kup-box/kup-box-declarations";
|
|
79
79
|
export { KupStore } from "./components/kup-state/kup-store";
|
|
80
|
+
export { FCellEventPayload, FCellPadding } from "./f-components/f-cell/f-cell-declarations";
|
|
80
81
|
export { FButtonAlign, FButtonProps, FButtonStyling } from "./f-components/f-button/f-button-declarations";
|
|
81
82
|
export { KupButtonClickEventPayload } from "./components/kup-button/kup-button-declarations";
|
|
82
83
|
export { KupButtonListClickEventPayload, KupButtonListNode } from "./components/kup-button-list/kup-button-list-declarations";
|
|
83
84
|
export { KupCalendarColumnsProp, KupCalendarData, KupCalendarDateClickEventPayload, KupCalendarEventClickEventPayload, KupCalendarEventDropEventPayload, KupCalendarViewChangeEventPayload, KupCalendarViewTypes } from "./components/kup-calendar/kup-calendar-declarations";
|
|
84
85
|
export { KupCardClickPayload, KupCardData, KupCardEventPayload, KupCardFamily } from "./components/kup-card/kup-card-declarations";
|
|
85
86
|
export { KupCardListClickEventPayload, KupCardListData } from "./components/kup-card-list/kup-card-list-declarations";
|
|
86
|
-
export { FCellEventPayload, FCellPadding } from "./f-components/f-cell/f-cell-declarations";
|
|
87
87
|
export { KupCellElementsPosition, KupCellSubmitClickEventPayload } from "./components/kup-cell/kup-cell-declarations";
|
|
88
88
|
export { KupFileUploadEventPayload } from "./components/kup-file-upload/kup-file-upload-declarations";
|
|
89
89
|
export { ChartAspect, ChartAxis, ChartOfflineMode, ChartSerie, ChartTitle, ChartType, KupChartClickEvent, KupChartSort, KupChartTrendlines } from "./components/kup-chart/kup-chart-declarations";
|
|
@@ -299,6 +299,11 @@ export namespace Components {
|
|
|
299
299
|
* @default false
|
|
300
300
|
*/
|
|
301
301
|
"leadingLabel": boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Allows legacyLook in ACP
|
|
304
|
+
* @default false
|
|
305
|
+
*/
|
|
306
|
+
"legacyLook": boolean;
|
|
302
307
|
/**
|
|
303
308
|
* Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
|
|
304
309
|
*/
|
|
@@ -623,7 +628,6 @@ export namespace Components {
|
|
|
623
628
|
* @default null
|
|
624
629
|
*/
|
|
625
630
|
"iconOff": string;
|
|
626
|
-
"keyShortcut": string;
|
|
627
631
|
/**
|
|
628
632
|
* When set, the button will show this text.
|
|
629
633
|
* @default null
|
|
@@ -1393,6 +1397,11 @@ export namespace Components {
|
|
|
1393
1397
|
* @default false
|
|
1394
1398
|
*/
|
|
1395
1399
|
"leadingLabel": boolean;
|
|
1400
|
+
/**
|
|
1401
|
+
* Allows legacyLook aspect in CMB.
|
|
1402
|
+
* @default false
|
|
1403
|
+
*/
|
|
1404
|
+
"legacyLook": boolean;
|
|
1396
1405
|
/**
|
|
1397
1406
|
* Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
|
|
1398
1407
|
*/
|
|
@@ -1885,6 +1894,11 @@ export namespace Components {
|
|
|
1885
1894
|
* @default false
|
|
1886
1895
|
*/
|
|
1887
1896
|
"updatableData": boolean;
|
|
1897
|
+
/**
|
|
1898
|
+
* Trigger update from outside
|
|
1899
|
+
* @param commandId - When provided, will trigger onclick event of command instead of *UPDATE
|
|
1900
|
+
*/
|
|
1901
|
+
"update": (commandId?: string) => Promise<void>;
|
|
1888
1902
|
/**
|
|
1889
1903
|
* When set to true, editable checkbox will call update
|
|
1890
1904
|
* @default false
|
|
@@ -3089,6 +3103,11 @@ export namespace Components {
|
|
|
3089
3103
|
* @default null
|
|
3090
3104
|
*/
|
|
3091
3105
|
"submitCb": (e: KupInputPanelSubmit) => unknown;
|
|
3106
|
+
/**
|
|
3107
|
+
* Trigger update from outside
|
|
3108
|
+
* @param cellId - When provided, will trigger onclick event of cell instead of *UPDATE
|
|
3109
|
+
*/
|
|
3110
|
+
"update": (cellId?: string) => Promise<void>;
|
|
3092
3111
|
/**
|
|
3093
3112
|
* When set to true, checkbox will call update
|
|
3094
3113
|
* @default false
|
|
@@ -5153,6 +5172,7 @@ declare global {
|
|
|
5153
5172
|
"kup-box-didunload": KupEventPayload;
|
|
5154
5173
|
"kup-box-contextmenu": KupBoxContextMenuEventPayload;
|
|
5155
5174
|
"kup-box-loadmoreclick": KupBoxLoadMoreClickEventPayload;
|
|
5175
|
+
"kup-box-cell-click": FCellEventPayload;
|
|
5156
5176
|
}
|
|
5157
5177
|
interface HTMLKupBoxElement extends Components.KupBox, HTMLStencilElement {
|
|
5158
5178
|
addEventListener<K extends keyof HTMLKupBoxElementEventMap>(type: K, listener: (this: HTMLKupBoxElement, ev: KupBoxCustomEvent<HTMLKupBoxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -6139,6 +6159,7 @@ declare global {
|
|
|
6139
6159
|
"kup-tree-nodedblclick": KupTreeNodeCollapseEventPayload;
|
|
6140
6160
|
"kup-tree-dynamicmassexpansion": KupTreeDynamicMassExpansionEventPayload;
|
|
6141
6161
|
"kup-tree-columnremove": KupTreeColumnRemoveEventPayload;
|
|
6162
|
+
"kup-tree-cell-click": FCellEventPayload;
|
|
6142
6163
|
}
|
|
6143
6164
|
interface HTMLKupTreeElement extends Components.KupTree, HTMLStencilElement {
|
|
6144
6165
|
addEventListener<K extends keyof HTMLKupTreeElementEventMap>(type: K, listener: (this: HTMLKupTreeElement, ev: KupTreeCustomEvent<HTMLKupTreeElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -6423,6 +6444,11 @@ declare namespace LocalJSX {
|
|
|
6423
6444
|
* @default false
|
|
6424
6445
|
*/
|
|
6425
6446
|
"leadingLabel"?: boolean;
|
|
6447
|
+
/**
|
|
6448
|
+
* Allows legacyLook in ACP
|
|
6449
|
+
* @default false
|
|
6450
|
+
*/
|
|
6451
|
+
"legacyLook"?: boolean;
|
|
6426
6452
|
/**
|
|
6427
6453
|
* Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
|
|
6428
6454
|
*/
|
|
@@ -6600,6 +6626,7 @@ declare namespace LocalJSX {
|
|
|
6600
6626
|
* Triggered when a box is auto selected via selectBox prop
|
|
6601
6627
|
*/
|
|
6602
6628
|
"onKup-box-autoselect"?: (event: KupBoxCustomEvent<KupBoxAutoSelectEventPayload>) => void;
|
|
6629
|
+
"onKup-box-cell-click"?: (event: KupBoxCustomEvent<FCellEventPayload>) => void;
|
|
6603
6630
|
/**
|
|
6604
6631
|
* Triggered when a box is clicked
|
|
6605
6632
|
*/
|
|
@@ -6725,7 +6752,6 @@ declare namespace LocalJSX {
|
|
|
6725
6752
|
* @default null
|
|
6726
6753
|
*/
|
|
6727
6754
|
"iconOff"?: string;
|
|
6728
|
-
"keyShortcut"?: string;
|
|
6729
6755
|
/**
|
|
6730
6756
|
* When set, the button will show this text.
|
|
6731
6757
|
* @default null
|
|
@@ -7389,6 +7415,11 @@ declare namespace LocalJSX {
|
|
|
7389
7415
|
* @default false
|
|
7390
7416
|
*/
|
|
7391
7417
|
"leadingLabel"?: boolean;
|
|
7418
|
+
/**
|
|
7419
|
+
* Allows legacyLook aspect in CMB.
|
|
7420
|
+
* @default false
|
|
7421
|
+
*/
|
|
7422
|
+
"legacyLook"?: boolean;
|
|
7392
7423
|
/**
|
|
7393
7424
|
* Sets how to show the selected item value. Suported values: "CodeOnly", "DescOnly", "Both" or "CodeAndDesc" and "DescAndCode".
|
|
7394
7425
|
*/
|
|
@@ -10088,6 +10119,7 @@ declare namespace LocalJSX {
|
|
|
10088
10119
|
*/
|
|
10089
10120
|
"globalFilterValue"?: string;
|
|
10090
10121
|
"onKup-tree-buttonclick"?: (event: KupTreeCustomEvent<KupTreeNodeButtonClickEventPayload>) => void;
|
|
10122
|
+
"onKup-tree-cell-click"?: (event: KupTreeCustomEvent<FCellEventPayload>) => void;
|
|
10091
10123
|
/**
|
|
10092
10124
|
* When the column menu is being opened/closed.
|
|
10093
10125
|
*/
|
|
@@ -22,7 +22,6 @@ import { KupMathLocales } from '../kup-math/kup-math-declarations';
|
|
|
22
22
|
import { KupTooltipCallbacks } from '../kup-tooltip/kup-tooltip-declarations';
|
|
23
23
|
import { Options } from 'html2canvas';
|
|
24
24
|
import { KupOpenAI } from '../kup-openai/kup-openai';
|
|
25
|
-
import { KupKeysBinding } from '../kup-keys-binding/kup-keys-binding';
|
|
26
25
|
import { KupPerfTuning } from '../kup-perf-tuning/kup-perf-tuning';
|
|
27
26
|
import { KupPerfMonitoring } from '../kup-perf-monitoring/kup-perf-monitoring';
|
|
28
27
|
/**
|
|
@@ -54,7 +53,6 @@ export interface KupManager {
|
|
|
54
53
|
theme: KupTheme;
|
|
55
54
|
toolbar: KupToolbar;
|
|
56
55
|
tooltip: KupTooltip;
|
|
57
|
-
keysBinding: KupKeysBinding;
|
|
58
56
|
utilities: KupManagerUtilities;
|
|
59
57
|
perfTuning: KupPerfTuning;
|
|
60
58
|
perfMonitoring: KupPerfMonitoring;
|
|
@@ -15,7 +15,6 @@ import { KupMath } from '../kup-math/kup-math';
|
|
|
15
15
|
import { KupTooltip } from '../kup-tooltip/kup-tooltip';
|
|
16
16
|
import { Options } from 'html2canvas';
|
|
17
17
|
import { KupOpenAI } from '../kup-openai/kup-openai';
|
|
18
|
-
import { KupKeysBinding } from '../kup-keys-binding/kup-keys-binding';
|
|
19
18
|
import { KupPerfTuning } from '../kup-perf-tuning/kup-perf-tuning';
|
|
20
19
|
import { KupPerfMonitoring } from '../kup-perf-monitoring/kup-perf-monitoring';
|
|
21
20
|
/**
|
|
@@ -41,7 +40,6 @@ export declare class KupManager {
|
|
|
41
40
|
utilities: KupManagerUtilities;
|
|
42
41
|
theme: KupTheme;
|
|
43
42
|
toolbar: KupToolbar;
|
|
44
|
-
keysBinding: KupKeysBinding;
|
|
45
43
|
tooltip: KupTooltip;
|
|
46
44
|
perfTuning: KupPerfTuning;
|
|
47
45
|
perfMonitoring: KupPerfMonitoring;
|