@sme.up/ketchup 11.0.0-SNAPSHOT-20250131103815 → 11.0.0-SNAPSHOT-20250131113452
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-fec01e9b.js → f-cell-886dd2e7.js} +5 -5
- package/dist/cjs/{f-chip-3d6f5596.js → f-chip-286f1c8d.js} +1 -1
- package/dist/cjs/{f-object-field-2c820f58.js → f-object-field-0986026c.js} +2 -2
- package/dist/cjs/{f-paginator-utils-2e1606ce.js → f-paginator-utils-ee281217.js} +1 -1
- package/dist/cjs/{f-text-field-9fddfbb1.js → f-text-field-463a6dbe.js} +1 -1
- package/dist/cjs/index.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_28.cjs.entry.js +17 -17
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- 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-0fdbfcc7.js → kup-data-table-helper-c7d3445e.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 +1 -1
- 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 +26 -12
- 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-ab625fb8.js → kup-manager-f41ad314.js} +1 -0
- 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/collection/components/kup-combobox/kup-combobox.js +2 -2
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js +16 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +7 -8
- package/dist/collection/components/kup-list/kup-list.js +8 -8
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +1 -0
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- 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-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 +24 -10
- 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-0fe21d53.js → p-27b58f4a.js} +2 -2
- package/dist/components/{p-31262cbf.js → p-45127a76.js} +2 -2
- package/dist/components/{p-62a78912.js → p-51c58db5.js} +2 -2
- package/dist/components/{p-c0c129f9.js → p-a3f73a90.js} +1 -0
- package/dist/components/{p-86319192.js → p-bb253195.js} +12 -12
- package/dist/components/{p-8cf58b3e.js → p-cd99d5bb.js} +2 -2
- package/dist/esm/{f-cell-9f9d59a8.js → f-cell-b04df6dd.js} +5 -5
- package/dist/esm/{f-chip-a98acec8.js → f-chip-f98be128.js} +1 -1
- package/dist/esm/{f-object-field-b1b2fb3d.js → f-object-field-1a4f54ea.js} +2 -2
- package/dist/esm/{f-paginator-utils-1a006f20.js → f-paginator-utils-2fc5cd18.js} +1 -1
- package/dist/esm/{f-text-field-32d9b78c.js → f-text-field-e766e681.js} +1 -1
- package/dist/esm/index.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_28.entry.js +17 -17
- package/dist/esm/kup-box.entry.js +7 -7
- 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-ba38d186.js → kup-data-table-helper-e350cc90.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 +1 -1
- 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 +26 -12
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-db26ffb1.js → kup-manager-6c75d73b.js} +1 -0
- 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/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-a8dad75b.entry.js → p-035e5ea5.entry.js} +1 -1
- package/dist/ketchup/{p-6cebb48f.entry.js → p-0516685f.entry.js} +1 -1
- package/dist/ketchup/{p-dc2d3170.js → p-153b7eda.js} +1 -1
- package/dist/ketchup/{p-d4b70629.entry.js → p-15435f64.entry.js} +1 -1
- package/dist/ketchup/{p-de4428da.entry.js → p-1a23b472.entry.js} +1 -1
- package/dist/ketchup/{p-51b559ac.entry.js → p-2133fdbb.entry.js} +1 -1
- package/dist/ketchup/{p-2560f300.entry.js → p-2342f4de.entry.js} +1 -1
- package/dist/ketchup/{p-56142aab.entry.js → p-23580011.entry.js} +1 -1
- package/dist/ketchup/{p-da399d79.entry.js → p-2d98b2c7.entry.js} +1 -1
- package/dist/ketchup/{p-078b764b.entry.js → p-3d7e2c21.entry.js} +1 -1
- package/dist/ketchup/{p-c376cfa2.entry.js → p-4c0d6ec5.entry.js} +1 -1
- package/dist/ketchup/{p-82eb7fd8.js → p-5ee25762.js} +1 -1
- package/dist/ketchup/{p-609c9034.entry.js → p-645a242a.entry.js} +1 -1
- package/dist/ketchup/{p-a91954f6.entry.js → p-6ef38f59.entry.js} +1 -1
- package/dist/ketchup/p-6f07a619.js +1 -0
- package/dist/ketchup/{p-c1e40bfa.entry.js → p-74eb221f.entry.js} +1 -1
- package/dist/ketchup/{p-2c0ba8ba.entry.js → p-7585373e.entry.js} +1 -1
- package/dist/ketchup/{p-06987073.js → p-7a36e244.js} +1 -1
- package/dist/ketchup/{p-4c99fc15.js → p-7a4f5182.js} +1 -1
- package/dist/ketchup/{p-8e69cd27.entry.js → p-7ee36a56.entry.js} +1 -1
- package/dist/ketchup/{p-08ba7f59.entry.js → p-805973c2.entry.js} +1 -1
- package/dist/ketchup/p-97811e7c.entry.js +1 -0
- package/dist/ketchup/{p-08b55e76.entry.js → p-98b79f9f.entry.js} +1 -1
- package/dist/ketchup/{p-060fe2a5.entry.js → p-9950f97c.entry.js} +1 -1
- package/dist/ketchup/p-b190515a.entry.js +9 -0
- package/dist/ketchup/{p-672221b4.entry.js → p-bad6461d.entry.js} +1 -1
- package/dist/ketchup/{p-aeab5cdd.entry.js → p-bbab51da.entry.js} +1 -1
- package/dist/ketchup/{p-3925dd28.entry.js → p-bec346a3.entry.js} +1 -1
- package/dist/ketchup/{p-7727edb5.entry.js → p-c26081c0.entry.js} +1 -1
- package/dist/ketchup/{p-efd1c9d4.js → p-c5614700.js} +1 -1
- package/dist/ketchup/{p-f738dcda.entry.js → p-cf219af4.entry.js} +1 -1
- package/dist/ketchup/{p-00891d17.js → p-d104a456.js} +1 -1
- package/dist/ketchup/{p-7bf5bdaa.entry.js → p-e1c92b6a.entry.js} +1 -1
- package/dist/ketchup/{p-21a88375.entry.js → p-e37d2589.entry.js} +1 -1
- package/dist/ketchup/{p-403a3698.entry.js → p-e8f73419.entry.js} +1 -1
- package/dist/ketchup/{p-7d7dd860.entry.js → p-f648a3cb.entry.js} +1 -1
- package/dist/ketchup/{p-9a02d8b0.entry.js → p-fe5aad1a.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +9 -0
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ketchup/p-2b537830.entry.js +0 -9
- package/dist/ketchup/p-37160902.entry.js +0 -1
- package/dist/ketchup/p-ba149bf6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,D as t,B as n,ac as l,v as o,x as r,ad as i,ae as s,M as u,N as a,F as c,af as f,ag as h,ah as d,ai as b,aj as m,a3 as p}from"./p-efd1c9d4.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(t={},n,l){if(null==t||null==l)return;let o=t[n];if(null==o)return;null==o.checkBoxes&&(o.checkBoxes=[]);let r=e.indexOfValueInValuesArray(o.checkBoxes,l);if(r>=0){let e=[];for(let t=0;t<o.checkBoxes.length;t++)t!=r&&(e[e.length]=o.checkBoxes[t]);o.checkBoxes=[...e]}}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 u="";return r.forEach((e=>{u+=i+n(e,l),i=" OR "})),""!=u&&(u="("+u+")",""!=s&&(u=" AND "+u)),u=s+u,u}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[]}}}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 k=document.documentElement,j=k.ketchup?k.ketchup.objects:new r,O=k.ketchup?k.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t)}isFilterCompliantForCellObj(e,t){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t)}isRowCompliant(e,t={},n="",l=!1,o=[],r){return this.areCellsCompliant(e.cells,t,n,l,o,r)}areCellsCompliant(e,t={},n="",o=!1,r=[],i){if(o){let t=!0;if(r&&null!=r&&r.length>0){t=!1;let o=this.filterIsNegative(n);for(let i=0;i<r.length;i++){if(0==r[i].visible)continue;const s=e[r[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,n);let u=l(r[i],s);if(u!=s.value&&(t=t||this.isFilterCompliantForValue(u,n)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}if(null==i&&(i=new w),!this.hasFilters(t,r,i))return!0;let s=Object.keys(t);for(let n=0;n<s.length;n++){let l=s[n];const o=e[l];if(!o)return!1;let r=i.getTextFilterValue(t,l);const u=this.filterIsNegative(r);let a=this.isFilterCompliantForCell(o,r),c=u;if(j.isNumber(o.obj)||j.isDate(o.obj)||j.isTime(o.obj)||j.isTimestamp(o.obj)||(c=this.isFilterCompliantForCellObj(o,r)),u){if(!a||!c)return!1}else if(!a&&!c)return!1;let f=i.getCheckBoxFilterValues(t,l);if(0==f.length)continue;let h=!1;for(let e=0;e<f.length;e++){let t=f[e];if(null!=t&&null!=t.value){if(null!=o.value&&o.value.toLowerCase().trim()==t.value.toLowerCase().trim()){h=!0;break}if(null!=o.obj&&o.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){h=!0;break}}}if(!h)return!1}return!0}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){if(!e||null==e)return[];let r=[];const i=!(!n||!l);if(this.hasFilters(t,l,o)||i)for(let s=0;s<e.length;s++){let u=e[s];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,i,l,o))&&(r[r.length]=u)}else r=[...e];return r}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),u=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(u,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let a=Object.assign({},n.filters);a[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),a,o,n.getVisibleColumns(),r);for(let e=0;e<u.length;e++)i.push(u[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r){return null==r&&(r=new y),r.filterRows(e,t,n,l,o)}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 a=[];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 a)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:{}},a.push(m));for(let n=1;n<s.length;n++){const r=s[n],u=t.cells[r.column];if(u){const t=o(e,r.column),n=l(t,u),s=u.value;let a=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){a=t;break}}a||(a={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:u.obj}},L(a),m.group.children.push(a)),m=a}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case u.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 u.DISTINCT:let a;if(a=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(a):(l[e.group.id][o]=[],l[e.group.id][o].push(a))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(a);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(a):(l[c.group.id][o]=[],l[c.group.id][o].push(a))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case u.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(a),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(a),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);n=n.group.parent}}break;case u.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(a),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(a),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(u.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=>u.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,o,n)))}(a,r,c),B(a,u.AVERAGE,r),B(a,u.MATH,r),a}function B(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==u.AVERAGE&&(o=l.filter((e=>u.AVERAGE===n[e]))),t==u.MATH&&(o=l.filter((e=>0==n[e].indexOf(u.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,t,o,n)))}function W(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{W(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function D(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+=D(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==u.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==u.MATH){let t=l[n].substring(u.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function E(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===u.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(u.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===u.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===u.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===u.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===u.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===u.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===u.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===u.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(a(u.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],u=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){u.group.children=[];let e=_(s.group.children,u.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=u)}else o>=n&&(t[t.length]=u,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.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const i={[c.AUTOCOMPLETE]:()=>f(o,"",r),[c.COMBOBOX]:()=>f(o,"",r),[c.RADIO]:()=>h(o,r),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o),[c.SWITCH]:()=>m(o,"")}[l.shape];i&&(l.data=Object.assign(Object.assign({},i()),l.data))}))}))}export{w as F,g as K,y as a,N as b,E as c,z as d,F as e,M as f,q as g,A as n,S as p,C as s,x as t}
|
|
1
|
+
import{C as e,D as t,B as n,ac as l,v as o,x as r,ad as i,ae as s,M as u,N as a,F as c,af as f,ag as h,ah as d,ai as b,aj as m,a3 as p}from"./p-c5614700.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(t={},n,l){if(null==t||null==l)return;let o=t[n];if(null==o)return;null==o.checkBoxes&&(o.checkBoxes=[]);let r=e.indexOfValueInValuesArray(o.checkBoxes,l);if(r>=0){let e=[];for(let t=0;t<o.checkBoxes.length;t++)t!=r&&(e[e.length]=o.checkBoxes[t]);o.checkBoxes=[...e]}}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 u="";return r.forEach((e=>{u+=i+n(e,l),i=" OR "})),""!=u&&(u="("+u+")",""!=s&&(u=" AND "+u)),u=s+u,u}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[]}}}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 k=document.documentElement,j=k.ketchup?k.ketchup.objects:new r,O=k.ketchup?k.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t)}isFilterCompliantForCellObj(e,t){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t)}isRowCompliant(e,t={},n="",l=!1,o=[],r){return this.areCellsCompliant(e.cells,t,n,l,o,r)}areCellsCompliant(e,t={},n="",o=!1,r=[],i){if(o){let t=!0;if(r&&null!=r&&r.length>0){t=!1;let o=this.filterIsNegative(n);for(let i=0;i<r.length;i++){if(0==r[i].visible)continue;const s=e[r[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,n);let u=l(r[i],s);if(u!=s.value&&(t=t||this.isFilterCompliantForValue(u,n)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}if(null==i&&(i=new w),!this.hasFilters(t,r,i))return!0;let s=Object.keys(t);for(let n=0;n<s.length;n++){let l=s[n];const o=e[l];if(!o)return!1;let r=i.getTextFilterValue(t,l);const u=this.filterIsNegative(r);let a=this.isFilterCompliantForCell(o,r),c=u;if(j.isNumber(o.obj)||j.isDate(o.obj)||j.isTime(o.obj)||j.isTimestamp(o.obj)||(c=this.isFilterCompliantForCellObj(o,r)),u){if(!a||!c)return!1}else if(!a&&!c)return!1;let f=i.getCheckBoxFilterValues(t,l);if(0==f.length)continue;let h=!1;for(let e=0;e<f.length;e++){let t=f[e];if(null!=t&&null!=t.value){if(null!=o.value&&o.value.toLowerCase().trim()==t.value.toLowerCase().trim()){h=!0;break}if(null!=o.obj&&o.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){h=!0;break}}}if(!h)return!1}return!0}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){if(!e||null==e)return[];let r=[];const i=!(!n||!l);if(this.hasFilters(t,l,o)||i)for(let s=0;s<e.length;s++){let u=e[s];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,i,l,o))&&(r[r.length]=u)}else r=[...e];return r}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),u=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(u,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let a=Object.assign({},n.filters);a[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),a,o,n.getVisibleColumns(),r);for(let e=0;e<u.length;e++)i.push(u[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r){return null==r&&(r=new y),r.filterRows(e,t,n,l,o)}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 a=[];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 a)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:{}},a.push(m));for(let n=1;n<s.length;n++){const r=s[n],u=t.cells[r.column];if(u){const t=o(e,r.column),n=l(t,u),s=u.value;let a=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){a=t;break}}a||(a={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:u.obj}},L(a),m.group.children.push(a)),m=a}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case u.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 u.DISTINCT:let a;if(a=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(a):(l[e.group.id][o]=[],l[e.group.id][o].push(a))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(a);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(a):(l[c.group.id][o]=[],l[c.group.id][o].push(a))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case u.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(a),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(a),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);n=n.group.parent}}break;case u.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(a),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(a),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(a,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(u.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=>u.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,o,n)))}(a,r,c),B(a,u.AVERAGE,r),B(a,u.MATH,r),a}function B(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==u.AVERAGE&&(o=l.filter((e=>u.AVERAGE===n[e]))),t==u.MATH&&(o=l.filter((e=>0==n[e].indexOf(u.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,t,o,n)))}function W(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{W(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function D(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+=D(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==u.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==u.MATH){let t=l[n].substring(u.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function A(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function E(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===u.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(u.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===u.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===u.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===u.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===u.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===u.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===u.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===u.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(a(u.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],u=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){u.group.children=[];let e=_(s.group.children,u.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=u)}else o>=n&&(t[t.length]=u,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.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const i={[c.AUTOCOMPLETE]:()=>f(o,"",r),[c.COMBOBOX]:()=>f(o,"",r),[c.RADIO]:()=>h(o,r),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o),[c.SWITCH]:()=>m(o,"")}[l.shape];i&&(l.data=Object.assign(Object.assign({},i()),l.data))}))}))}export{w as F,g as K,y as a,N as b,E as c,z as d,F as e,M as f,q as g,A as n,S as p,C as s,x as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as o,H as s,d as n}from"./p-b0368f88.js";import{k as r,y as a,g as h,s as l,a3 as c,v as p,h as d,b,e as u,Q as x,V as f,aB as g,X as m,E as k}from"./p-efd1c9d4.js";import{f as w,p as v,s as y}from"./p-00891d17.js";import{F as _}from"./p-b120abd7.js";import{c as j}from"./p-4c99fc15.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-ba149bf6.js";import{p as P,r as M,F as A}from"./p-06987073.js";import{F as R}from"./p-7db300e0.js";import"./p-1ee561ba.js";import"./p-d39c3267.js";import"./p-e3062c19.js";import"./p-8b97f53e.js";import"./p-dc2d3170.js";import"./p-82eb7fd8.js";import"./p-c56195a0.js";var I,E;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.lazyLoadRows="When set to true, extra rows will be automatically loaded once the last row enters the viewport.",t.loadMoreLimit="Sets a maximum limit of new records which can be required by the load more functionality.",t.loadMoreMode="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.",t.loadMoreStep="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showLoadMore="If set to true, displays the button to load more records.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(I||(I={})),function(t){t.CONSTANT="constant",t.CONSTANT_INCREMENT="constant_increment",t.PROGRESSIVE_THRESHOLD="progressive_threshold"}(E||(E={}));class S{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1,this.loadMoreLimit=1e3,this.showLoadMore=!1}toDebugString(){return"box state"}}var O,B,D,W,T,$,L,F,H,N=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)},G=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const V=class{constructor(e){t(this,e),this.kupBoxClick=i(this,"kup-box-click",6),this.kupBoxSelected=i(this,"kup-box-selected",6),this.kupAutoBoxSelect=i(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=i(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=i(this,"kup-box-rowactionclick",6),this.kupDidLoad=i(this,"kup-box-didload",6),this.kupDidUnload=i(this,"kup-box-didunload",6),this.kupBoxContextMenu=i(this,"kup-box-contextmenu",6),this.kupLoadMoreClick=i(this,"kup-box-loadmoreclick",6),O.add(this),this.state=new S,this.kupManager=r(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),D.set(this,[]),W.set(this,0),T.set(this,0),$.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.loadMoreLimit=1e3,this.loadMoreMode=E.PROGRESSIVE_THRESHOLD,this.loadMoreStep=60,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showLoadMore=!1,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=t.sortBy,this.globalFilterValue=t.globalFilterValue,this.selectedRowsState=t.selectedRowsState,this.pageSelected=t.pageSelected,this.rowsPerPage=t.rowsPerPage,this.loadMoreLimit=t.loadMoreLimit,this.showLoadMore=t.showLoadMore)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const i=this.selectedRows.reduce(((t,i,e)=>t+(e>0?";":"")+i.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,i)||(this.state.selectedRowsState=i,t=!0),this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)||(this.state.loadMoreLimit=this.loadMoreLimit,t=!0),this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)||(this.state.showLoadMore=this.showLoadMore,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,I,t)}async loadRowActions(t,i){t.actions=i,this.rowActionMenuOpened=t}async refresh(){e(this)}async setProps(t){l(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let i=t;return this.sortBy&&(i=y(i,this.toSortObjectList())),i}toSortObjectList(){return this.sortBy.split("|").map((t=>{const i=t.split(",");return{column:i[0],sortMode:i.length>1?c[i[1]]:c.A}}))}checkScrollOnHover(){this.boxContainer&&(this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer))}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},i=this.visibleColumns;let e=i.length,o=[],s=0;for(;e-- >0;)o.push({column:i[s++].name});t.content=o,this.boxLayout={sections:[t]}}onSortChange(t){let i=p(this.visibleColumns,t.detail.value);this.sortBy=i.name}onGlobalFilterChange({detail:t}){let i="";t&&t.value&&(i=t.value),this.globalFilterValue=i}isSectionExpanded(t,i){return!(!t.id||!i.id)&&this.collapsedSection[i.id]&&this.collapsedSection[i.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,i){let e=null,o=null,s=null,n=null;if(t)for(let i=t.length-1;i>=0;i--){let o=t[i];o.tagName&&(o.tagName.toUpperCase(),o.classList.contains("box-object")&&(e=o),!s&&o["data-row"]&&(s=o["data-row"]))}if(e)if(e.classList.contains("f-cell")){const t=e["kup-get-cell-props"]();o=t.cell,n=t.column,s=t.row}else o=e["data-cell"],s=e["data-row"],n=p(this.visibleColumns,e.dataset.column);return{boxObject:e||null,column:n||null,cell:o||null,originalEvent:i,row:s||null}}clickHandler(t){const i=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return i.row&&(this.multiSelection?this.onSelectionCheckChange(i.row):this.selectedRows=[i.row]),i}contextMenuHandler(t){return this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onSelectionCheckChange(t){var i=-1;for(let e=0;e<this.selectedRows.length;e++)if(this.selectedRows[e].id===t.id){i=e;break}i>=0?(this.selectedRows.splice(i,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,i){if(i.id)if(t.id){if(this.collapsedSection[i.id]){const e=this.collapsedSection[i.id];e[t.id]=!e[t.id]||!e[t.id]}else this.collapsedSection[i.id]={},this.collapsedSection[i.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,i,e){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:i,index:e})}clickFunction(t){try{const i=t.composedPath();for(let t of i)if(this.checkIfElementIsActionMenuIcon(t))return}catch(i){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const i=P(t,this.filteredRows.length,this.currentRowsPerPage);i&&(this.currentPage=i)}handleRowsPerPageChange(t){const i=M(t,this.filteredRows.length);i&&(this.currentRowsPerPage=i,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let i=!1;const e={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let i=0;i<this.data.columns.length;i++){const o=this.data.columns[i];!1!==o.visible&&(e.cell.push(t.cells[o.name]),e.columns.push(o))}for(const i in t.cells)if(t.cells.hasOwnProperty(i)){const o=t.cells[i];if(void 0!==o.cardID&&o.obj)switch(o.obj.p){case"BTN":do{e.button.push({})}while(e.button.length<o.cardID);e.button[o.cardID]={label:o.value};break;case"IMG":do{e.image.push({})}while(e.image.length<o.cardID);e.image[o.cardID]={resource:o.value};break;case"PGB":do{e.progressbar.push({})}while(e.progressbar.length<o.cardID);e.progressbar[o.cardID]={value:o.value};break;default:do{e.text.push("")}while(e.text.length<o.cardID);e.text[o.cardID]=o.value}}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(void 0===s.cardID&&s.obj)switch(i=!1,s.obj.p){case"BTN":for(let t=0;t<e.button.length;t++)if(!Object.keys(e.button[t]).length){e.button[t]={label:s.value},i=!0;break}i||e.button.push({label:s.value});break;case"IMG":for(let t=0;t<e.image.length;t++)if(!Object.keys(e.image[t]).length){e.image[t]={resource:s.value},i=!0;break}i||e.image.push({resource:s.value});break;case"PGB":for(let t=0;t<e.progressbar.length;t++)if(!Object.keys(e.progressbar[t]).length){e.progressbar[t]={value:s.value},i=!0;break}i||e.progressbar.push({value:s.value});break;default:for(let t=0;t<e.text.length;t++)if(""===e.text[t]){e.text[t]=s.value,i=!0;break}i||e.text.push(s.value)}}return o("kup-card",Object.assign({data:e},this.cardData))}renderRow(t){const i=[...this.visibleColumns];let e=null,s=t.layout;s||(s=this.boxLayout);let n=!1;if(s){s.horizontal&&(n=!0);const o=s.sections;let r=o.length,a=0;r>0&&(e=[]);const h={horizontal:n};for(;r-- >0;)e.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(o[a++],h,t,i))}var r=!1;for(let i of this.selectedRows)i.id===t.id&&(r=!0);let a=null;this.multiSelection&&(a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r})));let h=null;if(this.enableRowActions&&!this.swipeDisabled){const i={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let e=null;if(t.actions){const i=t.actions.map(((i,e)=>o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,i,e)},o("div",{class:`icon ${i.icon}`}),o("div",{class:"text"},i.text))));e=o("ul",null,i)}h=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:i},e)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),o("div",{class:"box-wrapper",style:t.style||{},ref:t=>{t&&N(this,D,"f").push(t)}},o("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n},"data-row":t,ref:t=>this.rowsRefs.push(t)},a,e,l),h)}renderSection(t,i,e,s){let n=null;if(t.sections&&t.sections.length>0){const i=t.sections;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderSection(i[r++],t,e,s))}else if(t.content){const i=t.content;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderBoxObject({boxObject:i[r++],row:e,visibleColumns:s},!0))}else s.length>0&&(n=this.renderBoxObject({boxObject:{column:s[0].name},row:e,visibleColumns:s}));const r=this.isSectionExpanded(e,t),a=!!t.columns,h={"box-section":!0,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},l=t.style||{};t.dim&&i&&(l.overflow="hidden",i.horizontal&&(l.flex=`0 0 ${t.dim}`,l.maxWidth=t.dim)),a&&(l["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const i={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(r?d.COLLAPSE:d.EXPAND),c=o("div",{class:h,style:l},o("div",{class:i},n),o("div",{class:"header",role:"button",onClick:i=>{i.stopPropagation(),this.toggleSectionExpand(e,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const i=t.title?o("h3",null,t.title):null;c=o("div",{class:h,style:l},i,n)}return c}renderBoxObject({boxObject:t,row:i,visibleColumns:e},s){const n={"box-object":!0};let r=null,a=-1;for(let i=0;i<e.length;i++)if(e[i].name===t.column){a=i;break}a>=0?(r=e[a],e.splice(a,1)):s&&(r=this.data.columns.find((i=>i.name===t.column)));const h=i.cells[t.column];let l;return h&&!this.kupManager.objects.isEmptyKupObj(h.obj)&&(n["is-obj"]=!0,this.kupManager.debug.isDebug()&&(l=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";")),o("div",{"data-cell":h,"data-row":i,"data-column":t.column,class:n,style:{},title:l},h&&r?o(z,Object.assign({},{cell:h,column:r,component:this,editable:this.editableData,renderKup:!0,row:i,setSizes:!0,shape:t.shape})):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(d.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let i=0;i<this.kanban.labels.length;i++)t.push({labels:this.kanban.labels[i],nodes:[]});for(let i=0;i<this.rows.length;i++){let e=[];for(let t=0;t<this.kanban.columns.length;t++)try{e.push(this.rows[i].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,u.WARNING)}const o={found:!1,index:null};for(let i=0;i<t.length;i++){let s=t[i].labels,n=!0;for(let t=0;t<s.length;t++)if(e[t]!==s[t]){n=!1;break}if(n){o.found=!0,o.index=i;break}}o.found?t[o.index].nodes.push(this.renderRow(this.rows[i])):t.push({labels:e,nodes:[this.renderRow(this.rows[i])]})}const i=[];for(let e=0;e<t.length;e++){const s=t[e].labels,n={data:[]};for(let t=0;t<s.length;t++)n.data.push({value:s[t],id:s[t]});i.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[e].nodes))}return{jsx:i,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,x.TAP,(t=>{var i;if(this.hold)this.hold=!1;else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];const o=this.clickHandler(e);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:null===(i=o.column)||void 0===i?void 0:i.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),this.kupManager.interact.on(this.boxContainer,x.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const i=this.rowsRefs[t],e=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};i&&!this.interactableDrag.includes(i)&&(this.interactableDrag.push(i),this.kupManager.interact.draggable(i,{allowFrom:".box-object",cursorChecker:()=>null},{callback:e},f.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t)return void this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",u.WARNING);const i=this.kupManager.getEventPath(t,this.rootElement),e=this.getEventDetails(i);return{cell:e.cell,column:e.column,id:this.rootElement.id,row:e.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX}));for(let i=0;i<this.rowsRefs.length;i++){const e=this.rowsRefs[i];e&&!this.interactableDrop.includes(e)&&(this.interactableDrop.push(e),this.kupManager.interact.dropzone(e,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.initWithPersistedState(),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?G(this,W,document.querySelector(".header").clientHeight,"f"):G(this,W,0,"f"),document.querySelector(".topbar")&&G(this,W,N(this,W,"f")+document.querySelector(".topbar").clientHeight,"f"),N(this,O,"m",F).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((i=>t.indexOf(i.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++)R(i[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),N(this,O,"m",L).call(this),this.kupManager.debug.logRender(this,!0)}render(){G(this,D,[],"f");const t=!("object"!=typeof this.kanban||null===this.kanban);let i=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let e={label:this.kupManager.language.translate(d.SORT_BY),trailingIcon:!0};i=o("div",{id:"sort-panel"},o("kup-combobox",{data:{"kup-text-field":e,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let e=null;this.globalFilter&&(e=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(k.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let n=null;(this.showLoadMore||!this.lazyLoadRows&&this.pagination)&&(n=o(A,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{N(this,O,"m",H).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let r=null,a={};if(0===this.rows.length)r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(d.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();r=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let i=t.length,e=0;for(r=[];i-- >0;)r.push(this.renderRow(t[e++]))}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},i,e,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};B=new WeakMap,D=new WeakMap,W=new WeakMap,T=new WeakMap,$=new WeakMap,O=new WeakSet,L=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&N(this,B,"f").observe(N(this,D,"f")[N(this,D,"f").length-1])},F=function(){const t={threshold:0,rootMargin:"-"+N(this,W,"f")+"px 0px 0px 0px"};G(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const i=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=i<this.loadMoreStep?i:this.loadMoreStep,t.target.classList.remove("last-row"),N(this,B,"f").unobserve(t.target)}}))}),t),"f")},H=function(){var t;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(N(this,T,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(N(this,$,"f"),this.loadMoreStep)*Math.min(N(this,T,"f")+1,2)}i>this.loadMoreLimit&&(i=this.loadMoreLimit),this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i}),G(this,$,i,"f"),G(this,T,(t=N(this,T,"f"),++t),"f")},V.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{V as kup_box}
|
|
1
|
+
import{r as t,c as i,f as e,h as o,H as s,d as n}from"./p-b0368f88.js";import{k as r,y as a,g as h,s as l,a3 as c,v as p,h as d,b,e as u,Q as x,V as f,aB as g,X as m,E as k}from"./p-c5614700.js";import{f as w,p as v,s as y}from"./p-d104a456.js";import{F as _}from"./p-b120abd7.js";import{c as j}from"./p-7a4f5182.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-6f07a619.js";import{p as P,r as M,F as A}from"./p-7a36e244.js";import{F as R}from"./p-7db300e0.js";import"./p-1ee561ba.js";import"./p-d39c3267.js";import"./p-e3062c19.js";import"./p-8b97f53e.js";import"./p-153b7eda.js";import"./p-5ee25762.js";import"./p-c56195a0.js";var I,E;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.lazyLoadRows="When set to true, extra rows will be automatically loaded once the last row enters the viewport.",t.loadMoreLimit="Sets a maximum limit of new records which can be required by the load more functionality.",t.loadMoreMode="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.",t.loadMoreStep="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showLoadMore="If set to true, displays the button to load more records.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(I||(I={})),function(t){t.CONSTANT="constant",t.CONSTANT_INCREMENT="constant_increment",t.PROGRESSIVE_THRESHOLD="progressive_threshold"}(E||(E={}));class S{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1,this.loadMoreLimit=1e3,this.showLoadMore=!1}toDebugString(){return"box state"}}var O,B,D,W,T,$,L,F,H,N=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)},G=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const V=class{constructor(e){t(this,e),this.kupBoxClick=i(this,"kup-box-click",6),this.kupBoxSelected=i(this,"kup-box-selected",6),this.kupAutoBoxSelect=i(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=i(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=i(this,"kup-box-rowactionclick",6),this.kupDidLoad=i(this,"kup-box-didload",6),this.kupDidUnload=i(this,"kup-box-didunload",6),this.kupBoxContextMenu=i(this,"kup-box-contextmenu",6),this.kupLoadMoreClick=i(this,"kup-box-loadmoreclick",6),O.add(this),this.state=new S,this.kupManager=r(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],B.set(this,void 0),D.set(this,[]),W.set(this,0),T.set(this,0),$.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.loadMoreLimit=1e3,this.loadMoreMode=E.PROGRESSIVE_THRESHOLD,this.loadMoreStep=60,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showLoadMore=!1,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=t.sortBy,this.globalFilterValue=t.globalFilterValue,this.selectedRowsState=t.selectedRowsState,this.pageSelected=t.pageSelected,this.rowsPerPage=t.rowsPerPage,this.loadMoreLimit=t.loadMoreLimit,this.showLoadMore=t.showLoadMore)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const i=this.selectedRows.reduce(((t,i,e)=>t+(e>0?";":"")+i.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,i)||(this.state.selectedRowsState=i,t=!0),this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)||(this.state.loadMoreLimit=this.loadMoreLimit,t=!0),this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)||(this.state.showLoadMore=this.showLoadMore,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,I,t)}async loadRowActions(t,i){t.actions=i,this.rowActionMenuOpened=t}async refresh(){e(this)}async setProps(t){l(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let i=t;return this.sortBy&&(i=y(i,this.toSortObjectList())),i}toSortObjectList(){return this.sortBy.split("|").map((t=>{const i=t.split(",");return{column:i[0],sortMode:i.length>1?c[i[1]]:c.A}}))}checkScrollOnHover(){this.boxContainer&&(this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer))}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},i=this.visibleColumns;let e=i.length,o=[],s=0;for(;e-- >0;)o.push({column:i[s++].name});t.content=o,this.boxLayout={sections:[t]}}onSortChange(t){let i=p(this.visibleColumns,t.detail.value);this.sortBy=i.name}onGlobalFilterChange({detail:t}){let i="";t&&t.value&&(i=t.value),this.globalFilterValue=i}isSectionExpanded(t,i){return!(!t.id||!i.id)&&this.collapsedSection[i.id]&&this.collapsedSection[i.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,i){let e=null,o=null,s=null,n=null;if(t)for(let i=t.length-1;i>=0;i--){let o=t[i];o.tagName&&(o.tagName.toUpperCase(),o.classList.contains("box-object")&&(e=o),!s&&o["data-row"]&&(s=o["data-row"]))}if(e)if(e.classList.contains("f-cell")){const t=e["kup-get-cell-props"]();o=t.cell,n=t.column,s=t.row}else o=e["data-cell"],s=e["data-row"],n=p(this.visibleColumns,e.dataset.column);return{boxObject:e||null,column:n||null,cell:o||null,originalEvent:i,row:s||null}}clickHandler(t){const i=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return i.row&&(this.multiSelection?this.onSelectionCheckChange(i.row):this.selectedRows=[i.row]),i}contextMenuHandler(t){return this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onSelectionCheckChange(t){var i=-1;for(let e=0;e<this.selectedRows.length;e++)if(this.selectedRows[e].id===t.id){i=e;break}i>=0?(this.selectedRows.splice(i,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,i){if(i.id)if(t.id){if(this.collapsedSection[i.id]){const e=this.collapsedSection[i.id];e[t.id]=!e[t.id]||!e[t.id]}else this.collapsedSection[i.id]={},this.collapsedSection[i.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,i,e){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:i,index:e})}clickFunction(t){try{const i=t.composedPath();for(let t of i)if(this.checkIfElementIsActionMenuIcon(t))return}catch(i){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const i=P(t,this.filteredRows.length,this.currentRowsPerPage);i&&(this.currentPage=i)}handleRowsPerPageChange(t){const i=M(t,this.filteredRows.length);i&&(this.currentRowsPerPage=i,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let i=!1;const e={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let i=0;i<this.data.columns.length;i++){const o=this.data.columns[i];!1!==o.visible&&(e.cell.push(t.cells[o.name]),e.columns.push(o))}for(const i in t.cells)if(t.cells.hasOwnProperty(i)){const o=t.cells[i];if(void 0!==o.cardID&&o.obj)switch(o.obj.p){case"BTN":do{e.button.push({})}while(e.button.length<o.cardID);e.button[o.cardID]={label:o.value};break;case"IMG":do{e.image.push({})}while(e.image.length<o.cardID);e.image[o.cardID]={resource:o.value};break;case"PGB":do{e.progressbar.push({})}while(e.progressbar.length<o.cardID);e.progressbar[o.cardID]={value:o.value};break;default:do{e.text.push("")}while(e.text.length<o.cardID);e.text[o.cardID]=o.value}}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(void 0===s.cardID&&s.obj)switch(i=!1,s.obj.p){case"BTN":for(let t=0;t<e.button.length;t++)if(!Object.keys(e.button[t]).length){e.button[t]={label:s.value},i=!0;break}i||e.button.push({label:s.value});break;case"IMG":for(let t=0;t<e.image.length;t++)if(!Object.keys(e.image[t]).length){e.image[t]={resource:s.value},i=!0;break}i||e.image.push({resource:s.value});break;case"PGB":for(let t=0;t<e.progressbar.length;t++)if(!Object.keys(e.progressbar[t]).length){e.progressbar[t]={value:s.value},i=!0;break}i||e.progressbar.push({value:s.value});break;default:for(let t=0;t<e.text.length;t++)if(""===e.text[t]){e.text[t]=s.value,i=!0;break}i||e.text.push(s.value)}}return o("kup-card",Object.assign({data:e},this.cardData))}renderRow(t){const i=[...this.visibleColumns];let e=null,s=t.layout;s||(s=this.boxLayout);let n=!1;if(s){s.horizontal&&(n=!0);const o=s.sections;let r=o.length,a=0;r>0&&(e=[]);const h={horizontal:n};for(;r-- >0;)e.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(o[a++],h,t,i))}var r=!1;for(let i of this.selectedRows)i.id===t.id&&(r=!0);let a=null;this.multiSelection&&(a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r})));let h=null;if(this.enableRowActions&&!this.swipeDisabled){const i={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let e=null;if(t.actions){const i=t.actions.map(((i,e)=>o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,i,e)},o("div",{class:`icon ${i.icon}`}),o("div",{class:"text"},i.text))));e=o("ul",null,i)}h=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:i},e)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),o("div",{class:"box-wrapper",style:t.style||{},ref:t=>{t&&N(this,D,"f").push(t)}},o("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n},"data-row":t,ref:t=>this.rowsRefs.push(t)},a,e,l),h)}renderSection(t,i,e,s){let n=null;if(t.sections&&t.sections.length>0){const i=t.sections;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderSection(i[r++],t,e,s))}else if(t.content){const i=t.content;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderBoxObject({boxObject:i[r++],row:e,visibleColumns:s},!0))}else s.length>0&&(n=this.renderBoxObject({boxObject:{column:s[0].name},row:e,visibleColumns:s}));const r=this.isSectionExpanded(e,t),a=!!t.columns,h={"box-section":!0,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},l=t.style||{};t.dim&&i&&(l.overflow="hidden",i.horizontal&&(l.flex=`0 0 ${t.dim}`,l.maxWidth=t.dim)),a&&(l["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const i={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(r?d.COLLAPSE:d.EXPAND),c=o("div",{class:h,style:l},o("div",{class:i},n),o("div",{class:"header",role:"button",onClick:i=>{i.stopPropagation(),this.toggleSectionExpand(e,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const i=t.title?o("h3",null,t.title):null;c=o("div",{class:h,style:l},i,n)}return c}renderBoxObject({boxObject:t,row:i,visibleColumns:e},s){const n={"box-object":!0};let r=null,a=-1;for(let i=0;i<e.length;i++)if(e[i].name===t.column){a=i;break}a>=0?(r=e[a],e.splice(a,1)):s&&(r=this.data.columns.find((i=>i.name===t.column)));const h=i.cells[t.column];let l;return h&&!this.kupManager.objects.isEmptyKupObj(h.obj)&&(n["is-obj"]=!0,this.kupManager.debug.isDebug()&&(l=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";")),o("div",{"data-cell":h,"data-row":i,"data-column":t.column,class:n,style:{},title:l},h&&r?o(z,Object.assign({},{cell:h,column:r,component:this,editable:this.editableData,renderKup:!0,row:i,setSizes:!0,shape:t.shape})):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(d.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let i=0;i<this.kanban.labels.length;i++)t.push({labels:this.kanban.labels[i],nodes:[]});for(let i=0;i<this.rows.length;i++){let e=[];for(let t=0;t<this.kanban.columns.length;t++)try{e.push(this.rows[i].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,u.WARNING)}const o={found:!1,index:null};for(let i=0;i<t.length;i++){let s=t[i].labels,n=!0;for(let t=0;t<s.length;t++)if(e[t]!==s[t]){n=!1;break}if(n){o.found=!0,o.index=i;break}}o.found?t[o.index].nodes.push(this.renderRow(this.rows[i])):t.push({labels:e,nodes:[this.renderRow(this.rows[i])]})}const i=[];for(let e=0;e<t.length;e++){const s=t[e].labels,n={data:[]};for(let t=0;t<s.length;t++)n.data.push({value:s[t],id:s[t]});i.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[e].nodes))}return{jsx:i,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,x.TAP,(t=>{var i;if(this.hold)this.hold=!1;else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];const o=this.clickHandler(e);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:null===(i=o.column)||void 0===i?void 0:i.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),this.kupManager.interact.on(this.boxContainer,x.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const i=this.rowsRefs[t],e=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};i&&!this.interactableDrag.includes(i)&&(this.interactableDrag.push(i),this.kupManager.interact.draggable(i,{allowFrom:".box-object",cursorChecker:()=>null},{callback:e},f.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t)return void this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",u.WARNING);const i=this.kupManager.getEventPath(t,this.rootElement),e=this.getEventDetails(i);return{cell:e.cell,column:e.column,id:this.rootElement.id,row:e.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX}));for(let i=0;i<this.rowsRefs.length;i++){const e=this.rowsRefs[i];e&&!this.interactableDrop.includes(e)&&(this.interactableDrop.push(e),this.kupManager.interact.dropzone(e,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.initWithPersistedState(),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?G(this,W,document.querySelector(".header").clientHeight,"f"):G(this,W,0,"f"),document.querySelector(".topbar")&&G(this,W,N(this,W,"f")+document.querySelector(".topbar").clientHeight,"f"),N(this,O,"m",F).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((i=>t.indexOf(i.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++)R(i[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),N(this,O,"m",L).call(this),this.kupManager.debug.logRender(this,!0)}render(){G(this,D,[],"f");const t=!("object"!=typeof this.kanban||null===this.kanban);let i=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let e={label:this.kupManager.language.translate(d.SORT_BY),trailingIcon:!0};i=o("div",{id:"sort-panel"},o("kup-combobox",{data:{"kup-text-field":e,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let e=null;this.globalFilter&&(e=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(k.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let n=null;(this.showLoadMore||!this.lazyLoadRows&&this.pagination)&&(n=o(A,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{N(this,O,"m",H).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let r=null,a={};if(0===this.rows.length)r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(d.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();r=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let i=t.length,e=0;for(r=[];i-- >0;)r.push(this.renderRow(t[e++]))}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},i,e,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};B=new WeakMap,D=new WeakMap,W=new WeakMap,T=new WeakMap,$=new WeakMap,O=new WeakSet,L=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&N(this,B,"f").observe(N(this,D,"f")[N(this,D,"f").length-1])},F=function(){const t={threshold:0,rootMargin:"-"+N(this,W,"f")+"px 0px 0px 0px"};G(this,B,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const i=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=i<this.loadMoreStep?i:this.loadMoreStep,t.target.classList.remove("last-row"),N(this,B,"f").unobserve(t.target)}}))}),t),"f")},H=function(){var t;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(N(this,T,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(N(this,$,"f"),this.loadMoreStep)*Math.min(N(this,T,"f")+1,2)}i>this.loadMoreLimit&&(i=this.loadMoreLimit),this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i}),G(this,$,i,"f"),G(this,T,(t=N(this,T,"f"),++t),"f")},V.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{V as kup_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as s,h,H as e,d as n,g as o}from"./p-b0368f88.js";import{k as a,ac as r,g as l,s as c,b as f,E as d}from"./p-efd1c9d4.js";import{K as p,d as u,a as m,b as v,c as k}from"./p-cd3a7d53.js";import{c as w}from"./p-635bb4b3.js";import{F as g}from"./p-82eb7fd8.js";import{F as y}from"./p-7db300e0.js";import"./p-1ee561ba.js";import"./p-b120abd7.js";import"./p-c56195a0.js";const b=a();function x(t,i,s,h,e,n,o,a){const r=D(t,i);let l=[];s&&h&&(l=C(s,h)?D(s,h):[...r]);let c=[];e&&n&&(z(e,n)?c=S(e,n):l=[...r]);let f=[];return o&&a&&(z(o,a)?f=S(o,a):l=[...r]),{dateValues:r,secDateValues:l,hourValues:c,secHourValues:f}}function D(t,i){let s=[t.value,i.value];return j(t)&&j(i)?s:j(t)?[t.value,t.value]:j(i)?[i.value,i.value]:s}function S(t,i){let s=[t.value,i.value];return O(t)&&O(i)?s:O(t)?[t.value,t.value]:O(i)?[i.value,i.value]:s}function j(t){return b.objects.isDate(t.obj)&&b.dates.isIsoDate(t.value)}function O(t){return b.objects.isTime(t.obj)||b.objects.isTimeWithSeconds(t.obj)}function C(t,i){return j(t)||j(i)}function z(t,i){return O(t)||O(i)}function T(t,i,s,h,e,n){let o=()=>e.map((i=>r(h.find((t=>t.name==i)),t.cells[i])));return n&&(o=n),(null==e?void 0:e.length)>=2?o():[t.cells[i].value,t.cells[s].value]}class E{constructor(){this.showSecondaryDates=!1,this.detailFilter="",this.detailInitialScrollX=0,this.detailInitialScrollY=0,this.taskFilter="",this.taskInitialScrollX=0,this.taskInitialScrollY=0,this.viewMode="day"}toDebugString(){return"dt state"}}var H,M,P,W,I,R,V,Y,K,A,G,X,L,F,N,_,q,B,J,Q,U,Z,$,tt,it=function(t,i,s,h){if("a"===s&&!h)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!h:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?h:"a"===s?h.call(t):h?h.value:i.get(t)},st=function(t,i,s,h,e){if("m"===h)throw new TypeError("Private method is not writable");if("a"===h&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===h?e.call(t,s):e?e.value=s:i.set(t,s),s};const ht=class{constructor(s){t(this,s),this.kupClick=i(this,"kup-planner-click",6),this.kupDblClick=i(this,"kup-planner-dblclick",6),this.kupDateChange=i(this,"kup-planner-datechange",6),this.kupPhaseDrop=i(this,"kup-planner-phasedrop",6),this.kupReady=i(this,"kup-planner-ready",6),this.kupContextMenu=i(this,"kup-planner-contextmenu",6),this.kupDidUnload=i(this,"kup-planner-didunload",6),H.add(this),this.state=new E,this.plannerRenderer=void 0,M.set(this,a()),P.set(this,void 0),W.set(this,[]),I.set(this,{}),R.set(this,void 0),this.stateId="",this.store=void 0,this.customStyle="",this.data=void 0,this.detailData=void 0,this.detailColorCol=void 0,this.detailColumns=void 0,this.detailDates=void 0,this.detailFilter=void 0,this.detailHeight=void 0,this.detailHours=[],this.detailIconCol=void 0,this.detailIdCol=void 0,this.detailNameCol=void 0,this.detailPrevHours=[],this.detailPrevDates=void 0,this.detailInitialScrollX=void 0,this.detailInitialScrollY=void 0,this.listCellWidth="300px",this.maxWidth="90vw",this.phaseColorCol=void 0,this.phaseColumns=void 0,this.phaseColParDep=void 0,this.phaseDates=void 0,this.phaseHours=[],this.phaseIconCol=void 0,this.phaseIdCol=void 0,this.phaseNameCol=void 0,this.phasePrevHours=[],this.phasePrevDates=void 0,this.readOnly=!1,this.showSecondaryDates=!1,this.taskColumns=void 0,this.taskDates=void 0,this.taskFilter=void 0,this.taskHeight=void 0,this.taskHours=[],this.taskIconCol=void 0,this.taskIdCol=void 0,this.taskInitialScrollX=void 0,this.taskInitialScrollY=void 0,this.taskNameCol=void 0,this.taskPrevHours=[],this.taskPrevDates=void 0,this.titleMess=void 0,this.viewMode="month",this.mainFilter=void 0,this.secondaryFilter=void 0,this.scrollableTaskList=!1,this.plannerProps=void 0}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(it(this,M,"f").debug.logMessage(this,"Initializing stateId "+this.stateId),this.detailFilter=t.detailFilter,this.showSecondaryDates=t.showSecondaryDates,this.detailInitialScrollX=t.detailInitialScrollX,this.detailInitialScrollY=t.detailInitialScrollY,this.taskFilter=t.taskFilter,this.taskInitialScrollX=t.taskInitialScrollX,this.taskInitialScrollY=t.taskInitialScrollY,this.viewMode=t.viewMode)}}persistState(){if(this.store&&this.stateId){let t=!1;it(this,M,"f").objects.deepEqual(this.state.detailFilter,it(this,R,"f").detailFilter)||(this.state.detailFilter=it(this,R,"f").detailFilter,t=!0),it(this,M,"f").objects.deepEqual(this.state.showSecondaryDates,it(this,R,"f").showSecondaryDates)||(this.state.showSecondaryDates=it(this,R,"f").showSecondaryDates,t=!0),it(this,M,"f").objects.deepEqual(this.state.detailInitialScrollX,it(this,R,"f").detailInitialScrollX)||(this.state.detailInitialScrollX=it(this,R,"f").detailInitialScrollX,t=!0),it(this,M,"f").objects.deepEqual(this.state.detailInitialScrollY,it(this,R,"f").detailInitialScrollY)||(this.state.detailInitialScrollY=it(this,R,"f").detailInitialScrollY,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskFilter,it(this,R,"f").taskFilter)||(this.state.taskFilter=it(this,R,"f").taskFilter,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskInitialScrollX,it(this,R,"f").taskInitialScrollX)||(this.state.taskInitialScrollX=it(this,R,"f").taskInitialScrollX,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskInitialScrollY,it(this,R,"f").taskInitialScrollY)||(this.state.taskInitialScrollY=it(this,R,"f").taskInitialScrollY,t=!0),it(this,M,"f").objects.deepEqual(this.state.viewMode,it(this,R,"f").viewMode)||(this.state.viewMode=it(this,R,"f").viewMode,t=!0),t&&(it(this,M,"f").debug.logMessage(this,"Persisting stateId "+this.stateId),this.store.persistState(this.stateId,this.state))}}dataChanged(){st(this,I,{},"f")}async getProps(t){return l(this,k,t)}async refresh(){s(this),this.plannerRenderer.refresh()}async setProps(t){c(this,k,t)}async addPhases(t,i){var s;const h=it(this,H,"m",K).call(this,t);h&&(it(this,I,"f")[t]=i,h.phases=null===(s=i.rows)||void 0===s?void 0:s.filter((t=>C(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]]))).map((t=>{const s=x(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]],t.cells[this.phasePrevDates[0]],t.cells[this.phasePrevDates[1]],t.cells[this.phaseHours[0]],t.cells[this.phaseHours[1]],t.cells[this.phasePrevHours[0]],t.cells[this.phasePrevHours[1]]),e=T(t,this.phaseIdCol,this.phaseNameCol,i.columns,this.phaseColumns,(()=>this.phaseColumns.map((s=>s==this.phaseDates[0]?"#START#":s==this.phaseDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let n=it(this,H,"m",$).call(this,t,this.phaseIconCol),o=it(this,H,"m",tt).call(this,t,this.phaseIconCol);return{taskRow:h.taskRow,phaseRow:t,id:h.id+"_"+t.cells[this.phaseIdCol].value,phaseRowId:t.id,taskRowId:h.taskRowId,name:t.cells[this.phaseNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"task",color:t.cells[this.phaseColorCol].value,selectedColor:t.cells[this.phaseColorCol].value,valuesToShow:e,rowType:p.PHASE,icon:n?{url:n,color:null!=o?o:"#595959"}:void 0,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]}}))),this.plannerProps.mainGantt.initialScrollX=it(this,R,"f").taskInitialScrollX,this.plannerProps.mainGantt.initialScrollY=it(this,R,"f").taskInitialScrollY,this.plannerProps.secondaryGantt&&(this.plannerProps.secondaryGantt.initialScrollX=it(this,R,"f").detailInitialScrollX,this.plannerProps.secondaryGantt.initialScrollX=it(this,R,"f").detailInitialScrollY),this.plannerProps=Object.assign({},this.plannerProps),this.refresh()}componentWillLoad(){it(this,M,"f").debug.logLoad(this,!1),it(this,M,"f").theme.register(this),this.initWithPersistedState(),st(this,R,{detailFilter:this.detailFilter,detailInitialScrollX:this.detailInitialScrollX,detailInitialScrollY:this.detailInitialScrollY,showSecondaryDates:this.showSecondaryDates,taskFilter:this.taskFilter,taskInitialScrollX:this.taskInitialScrollX,taskInitialScrollY:this.taskInitialScrollY,viewMode:this.viewMode},"f")}componentDidLoad(){let t=it(this,H,"m",Y).call(this,it(this,H,"m",Z).call(this,it(this,R,"f").detailFilter,!0));const i=this.rootElement.shadowRoot.querySelector("#main-filter");y(i);const s=this.rootElement.shadowRoot.querySelector("#secondary-filter");let h,e,n;t&&y(s),this.plannerProps={mainGantt:{title:this.titleMess,items:it(this,H,"m",V).call(this,it(this,H,"m",Z).call(this,it(this,R,"f").taskFilter,!1)),stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:i,hideLabel:!0,ganttHeight:this.taskHeight,showSecondaryDates:it(this,R,"f").showSecondaryDates,onClick:t=>this.handleOnClick(t),onDblClick:t=>this.handleOnDblClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.taskInitialScrollX,initialScrollY:this.taskInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(e),e=window.setTimeout((()=>this.handleTaskGanttScrollY(t)),500)},onPhaseDrop:t=>this.handleOnPhaseDrop(t)},secondaryGantt:t?{title:"",items:t,stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:s,hideLabel:!0,ganttHeight:this.detailHeight,onClick:t=>this.handleOnClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.detailInitialScrollX,initialScrollY:this.detailInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(n),n=window.setTimeout((()=>this.handleDetailGanttScrollY(t)),500)}}:void 0,onSetDoubleView:t=>this.handleOnSetDoubleView(t),onSetViewMode:t=>this.handleOnSetViewMode(t),viewMode:this.viewMode,scrollableTaskList:this.scrollableTaskList,onScrollX:t=>{window.clearTimeout(h),h=window.setTimeout((()=>this.handleOnScrollX(t)),500)}},this.kupReady.emit({comp:this,id:this.rootElement.id,value:void 0}),this.taskFilter&&it(this,H,"m",U).call(this,this.taskFilter),this.detailFilter&&it(this,H,"m",U).call(this,this.detailFilter,!0),it(this,M,"f").debug.logLoad(this,!0)}componentDidRender(){this.persistState(),it(this,M,"f").debug.logRender(this,!0)}onKupDblClick(t,i){this.kupDblClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupContextMenu(t,i,s){let h,e,n;switch(i.type){case"project":h=i.taskRow,e=h.cells[this.taskIdCol],n=this.data.columns[this.taskIdCol];break;case"task":h=i.phaseRow,e=h.cells[this.phaseIdCol];break;case"timeline":h=i.detailRow,e=h.cells[this.detailIdCol],n=this.data.columns[this.detailIdCol]}this.kupContextMenu.emit({comp:this,id:this.rootElement.id,value:i,taskAction:s,details:{cell:e,column:n,originalEvent:t,row:h}})}onKupDateChange(t,i){this.kupDateChange.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupPhaseDrop(t,i){this.kupPhaseDrop.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}handleOnDblClick(t){switch(t.rowType){case p.TASK:it(this,H,"m",G).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.PHASE:it(this,H,"m",X).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.DETAIL:it(this,H,"m",L).call(this)&&this.onKupDblClick(t,m.onDblClick)}for(let t=0;t<it(this,W,"f").length;t++)clearTimeout(it(this,W,"f")[t]),it(this,M,"f").debug.logMessage(this,"Cleared click timeout("+it(this,W,"f")[t]+").");st(this,W,[],"f")}handleOnClick(t){it(this,W,"f").push(setTimeout((()=>{switch(t.rowType){case p.TASK:const i=t.phases?m.onTaskClosing:m.onTaskOpening;it(this,H,"m",F).call(this,t)&&this.onKupClick(t,i);break;case p.PHASE:it(this,H,"m",N).call(this)&&this.onKupClick(t,m.onClick);break;case p.DETAIL:it(this,H,"m",_).call(this)&&this.onKupClick(t,m.onClick)}}),300))}handleOnContextMenu(t,i){switch(i.rowType){case p.TASK:it(this,H,"m",q).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.PHASE:it(this,H,"m",B).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.DETAIL:it(this,H,"m",J).call(this)&&this.onKupContextMenu(t,i,m.onRightClick)}}handleOnSetDoubleView(t){var i;it(this,R,"f").showSecondaryDates=t,(null===(i=this.plannerProps)||void 0===i?void 0:i.mainGantt)&&(this.plannerProps.mainGantt.showSecondaryDates=t),this.persistState()}handleOnSetViewMode(t){it(this,R,"f").viewMode=t,this.plannerProps.viewMode=t,this.persistState()}handleOnScrollX(t){it(this,R,"f").taskInitialScrollX=t,it(this,R,"f").detailInitialScrollX=t,this.persistState()}handleTaskGanttScrollY(t){it(this,R,"f").taskInitialScrollY=t,this.persistState()}handleDetailGanttScrollY(t){it(this,R,"f").detailInitialScrollY=t,this.persistState()}handleOnDateChange(t){it(this,H,"m",Q).call(this,t)&&t.rowType!=p.DETAIL&&this.onKupDateChange(t,m.onResize)}handleOnPhaseDrop(t){this.onKupPhaseDrop(t,m.onTask)}render(){var t,i,s;const n=this.plannerProps?Object.assign(Object.assign({},this.plannerProps),{onSetDoubleView:this.handleOnSetDoubleView.bind(this),onSetViewMode:this.handleOnSetViewMode.bind(this),onScrollX:this.handleOnScrollX.bind(this),mainGantt:Object.assign(Object.assign({},null===(t=this.plannerProps)||void 0===t?void 0:t.mainGantt),{onScrollY:this.handleTaskGanttScrollY.bind(this)})}):null;return(null===(i=this.plannerProps)||void 0===i?void 0:i.secondaryGantt)&&(n.secondaryGantt=Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{onScrollY:this.handleDetailGanttScrollY.bind(this)})),h(e,{key:"566acc19713e3e86dd7df82289970c2177d9ca64"},h("style",{key:"b963bc1a35ee326159dcfdba26d54b0363a6b24d"},it(this,M,"f").theme.setKupStyle(this.rootElement)),h("div",{key:"431b11c904af49b67400e33dd151eab1e662a2c9",id:w,style:{maxWidth:this.maxWidth}},this.plannerProps&&h("kup-planner-renderer",{key:"c3ea134d3afc42f6e1d3089dc65c251e2338febe",props:n,ref:t=>this.plannerRenderer=t})),h("div",{key:"43969a35e6a3ada36973257bcdb0081d560098e4",style:{display:this.plannerProps?"none":""}},h(g,{key:"c0a01be246cc6e28f2780fe57194b6e4c84ad194",icon:f.SEARCH,id:"main-filter",label:it(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&it(this,H,"m",U).call(this,t.target.value)},value:this.taskFilter,wrapperClass:"filter"}),(null===(s=this.detailData)||void 0===s?void 0:s.rows)&&this.detailData.rows.length>0?h(g,{icon:f.SEARCH,id:"secondary-filter",label:it(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&it(this,H,"m",U).call(this,t.target.value,!0)},value:this.detailFilter,wrapperClass:"filter"}):null))}disconnectedCallback(){it(this,M,"f").theme.unregister(this),this.kupDidUnload.emit({comp:this,id:this.rootElement.id,storedSettings:it(this,R,"f")})}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};M=new WeakMap,P=new WeakMap,W=new WeakMap,I=new WeakMap,R=new WeakMap,H=new WeakSet,V=function(t){var i;return t&&t.rows?null===(i=t.rows)||void 0===i?void 0:i.filter((t=>C(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]]))).map((i=>{const s=x(i.cells[this.taskDates[0]],i.cells[this.taskDates[1]],i.cells[this.taskPrevDates[0]],i.cells[this.taskPrevDates[1]],i.cells[this.taskHours[0]],i.cells[this.taskHours[1]],i.cells[this.taskPrevHours[0]],i.cells[this.taskPrevHours[1]]),h=T(i,this.taskIdCol,this.taskNameCol,t.columns,this.taskColumns,(()=>this.taskColumns.map((s=>s==this.taskDates[0]?"#START#":s==this.taskDates[1]?"#END#":r(t.columns.find((t=>t.name==s)),i.cells[s])))));let e=it(this,H,"m",$).call(this,i,this.taskIconCol),n=it(this,H,"m",tt).call(this,i,this.taskIconCol);return{taskRow:i,taskRowId:i.id,id:i.cells[this.taskIdCol].value,name:i.cells[this.taskNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"project",valuesToShow:h,rowType:p.TASK,icon:e?{url:e,color:null!=n?n:"#595959"}:void 0,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]}})):[]},Y=function(t){if(!t||!t.rows)return;let i=[];return t.rows.filter((t=>C(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]]))).forEach((s=>{var h,e;const n=s.cells[this.detailIdCol].value,o=s.cells[this.detailNameCol].value,a=x(s.cells[this.detailDates[0]],s.cells[this.detailDates[1]],void 0,void 0,s.cells[this.detailHours[0]],s.cells[this.detailHours[1]]),r=T(s,this.detailIdCol,this.detailNameCol,t.columns,this.detailColumns);let l=i.find((t=>t.id==n));l||(l={id:n,name:o,detailRow:s,type:"timeline",valuesToShow:r,rowType:p.DETAIL,schedule:[]},i.push(l));let c=it(this,H,"m",$).call(this,s,this.detailIconCol),f=it(this,H,"m",tt).call(this,s,this.detailIconCol);l.schedule.push({startDate:a.dateValues[0],endDate:a.dateValues[1],color:this.detailColorCol&&null!==(h=s.cells[this.detailColorCol].value)&&void 0!==h?h:"#D9D9D8",selectedColor:this.detailColorCol&&null!==(e=s.cells[this.detailColorCol].value)&&void 0!==e?e:"#D9D9D8",icon:c?{url:c,color:null!=f?f:"#595959"}:void 0,startHour:a.hourValues[0],endHour:a.hourValues[1]})})),i},K=function(t){return this.plannerProps.mainGantt.items.find((i=>i.id==t))},A=function(t){const i=it(this,H,"m",K).call(this,t);i&&(i.phases=void 0),this.plannerProps=Object.assign({},this.plannerProps)},G=function(){return!0},X=function(){return!0},L=function(){return!0},F=function(t){const i=it(this,H,"m",K).call(this,t.id);return(null==i?void 0:i.phases)&&it(this,H,"m",A).call(this,i.id),!0},N=function(){return!0},_=function(){return!0},q=function(){return!0},B=function(){return!0},J=function(){return!0},Q=function(t){let i=!1;return it(this,P,"f")?it(this,P,"f").isEquivalent(t)||(st(this,P,new v(t),"f"),i=!0):(i=!0,st(this,P,new v(t),"f")),i},U=function(t,i){i?it(this,R,"f").detailFilter=t:it(this,R,"f").taskFilter=t;const s=i?{secondaryGantt:Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{items:it(this,H,"m",Y).call(this,it(this,H,"m",Z).call(this,t,i))})}:{mainGantt:Object.assign(Object.assign({},this.plannerProps.mainGantt),{items:it(this,H,"m",V).call(this,it(this,H,"m",Z).call(this,t,i))})};this.plannerProps=Object.assign(Object.assign({},this.plannerProps),s),this.persistState()},Z=function(t,i){const s=i?this.detailData:this.data;if(!s||!s.rows||0==s.rows.length)return;if(!t)return s;const h={columns:this.data.columns,rows:[]},e=[];for(let i=0;i<s.rows.length;i++){const h=s.rows[i],n=h.cells;for(let i=0;i<s.columns.length;i++){const o=n[s.columns[i].name];if(o&&r(s.columns[i],o).toLowerCase().indexOf(t.toLowerCase())>-1){e.push({row:h,weight:i});break}}}return e.sort(((t,i)=>t.weight-i.weight)).forEach((t=>{h.rows.push(t.row)})),h},$=function(t,i){var s;let h;if(i){const e=t.cells[i];let n=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.resource;n||(n=e.value),n&&(h=o("./assets/svg/"+n+".svg"))}return h},tt=function(t,i){var s;let h;if(i){const e=t.cells[i];h=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.color,h&&(h=it(this,M,"f").theme.colorCheck(h).hexColor)}return h},ht.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}.filter{margin-bottom:var(--kup-space-04)}.planner-render{padding-top:40px}";export{ht as kup_planner}
|
|
1
|
+
import{r as t,c as i,f as s,h,H as e,d as n,g as o}from"./p-b0368f88.js";import{k as a,ac as r,g as l,s as c,b as f,E as d}from"./p-c5614700.js";import{K as p,d as u,a as m,b as v,c as k}from"./p-cd3a7d53.js";import{c as w}from"./p-635bb4b3.js";import{F as g}from"./p-5ee25762.js";import{F as y}from"./p-7db300e0.js";import"./p-1ee561ba.js";import"./p-b120abd7.js";import"./p-c56195a0.js";const b=a();function x(t,i,s,h,e,n,o,a){const r=D(t,i);let l=[];s&&h&&(l=C(s,h)?D(s,h):[...r]);let c=[];e&&n&&(z(e,n)?c=S(e,n):l=[...r]);let f=[];return o&&a&&(z(o,a)?f=S(o,a):l=[...r]),{dateValues:r,secDateValues:l,hourValues:c,secHourValues:f}}function D(t,i){let s=[t.value,i.value];return j(t)&&j(i)?s:j(t)?[t.value,t.value]:j(i)?[i.value,i.value]:s}function S(t,i){let s=[t.value,i.value];return O(t)&&O(i)?s:O(t)?[t.value,t.value]:O(i)?[i.value,i.value]:s}function j(t){return b.objects.isDate(t.obj)&&b.dates.isIsoDate(t.value)}function O(t){return b.objects.isTime(t.obj)||b.objects.isTimeWithSeconds(t.obj)}function C(t,i){return j(t)||j(i)}function z(t,i){return O(t)||O(i)}function T(t,i,s,h,e,n){let o=()=>e.map((i=>r(h.find((t=>t.name==i)),t.cells[i])));return n&&(o=n),(null==e?void 0:e.length)>=2?o():[t.cells[i].value,t.cells[s].value]}class E{constructor(){this.showSecondaryDates=!1,this.detailFilter="",this.detailInitialScrollX=0,this.detailInitialScrollY=0,this.taskFilter="",this.taskInitialScrollX=0,this.taskInitialScrollY=0,this.viewMode="day"}toDebugString(){return"dt state"}}var H,M,P,W,I,R,V,Y,K,A,G,X,L,F,N,_,q,B,J,Q,U,Z,$,tt,it=function(t,i,s,h){if("a"===s&&!h)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!h:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?h:"a"===s?h.call(t):h?h.value:i.get(t)},st=function(t,i,s,h,e){if("m"===h)throw new TypeError("Private method is not writable");if("a"===h&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===h?e.call(t,s):e?e.value=s:i.set(t,s),s};const ht=class{constructor(s){t(this,s),this.kupClick=i(this,"kup-planner-click",6),this.kupDblClick=i(this,"kup-planner-dblclick",6),this.kupDateChange=i(this,"kup-planner-datechange",6),this.kupPhaseDrop=i(this,"kup-planner-phasedrop",6),this.kupReady=i(this,"kup-planner-ready",6),this.kupContextMenu=i(this,"kup-planner-contextmenu",6),this.kupDidUnload=i(this,"kup-planner-didunload",6),H.add(this),this.state=new E,this.plannerRenderer=void 0,M.set(this,a()),P.set(this,void 0),W.set(this,[]),I.set(this,{}),R.set(this,void 0),this.stateId="",this.store=void 0,this.customStyle="",this.data=void 0,this.detailData=void 0,this.detailColorCol=void 0,this.detailColumns=void 0,this.detailDates=void 0,this.detailFilter=void 0,this.detailHeight=void 0,this.detailHours=[],this.detailIconCol=void 0,this.detailIdCol=void 0,this.detailNameCol=void 0,this.detailPrevHours=[],this.detailPrevDates=void 0,this.detailInitialScrollX=void 0,this.detailInitialScrollY=void 0,this.listCellWidth="300px",this.maxWidth="90vw",this.phaseColorCol=void 0,this.phaseColumns=void 0,this.phaseColParDep=void 0,this.phaseDates=void 0,this.phaseHours=[],this.phaseIconCol=void 0,this.phaseIdCol=void 0,this.phaseNameCol=void 0,this.phasePrevHours=[],this.phasePrevDates=void 0,this.readOnly=!1,this.showSecondaryDates=!1,this.taskColumns=void 0,this.taskDates=void 0,this.taskFilter=void 0,this.taskHeight=void 0,this.taskHours=[],this.taskIconCol=void 0,this.taskIdCol=void 0,this.taskInitialScrollX=void 0,this.taskInitialScrollY=void 0,this.taskNameCol=void 0,this.taskPrevHours=[],this.taskPrevDates=void 0,this.titleMess=void 0,this.viewMode="month",this.mainFilter=void 0,this.secondaryFilter=void 0,this.scrollableTaskList=!1,this.plannerProps=void 0}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(it(this,M,"f").debug.logMessage(this,"Initializing stateId "+this.stateId),this.detailFilter=t.detailFilter,this.showSecondaryDates=t.showSecondaryDates,this.detailInitialScrollX=t.detailInitialScrollX,this.detailInitialScrollY=t.detailInitialScrollY,this.taskFilter=t.taskFilter,this.taskInitialScrollX=t.taskInitialScrollX,this.taskInitialScrollY=t.taskInitialScrollY,this.viewMode=t.viewMode)}}persistState(){if(this.store&&this.stateId){let t=!1;it(this,M,"f").objects.deepEqual(this.state.detailFilter,it(this,R,"f").detailFilter)||(this.state.detailFilter=it(this,R,"f").detailFilter,t=!0),it(this,M,"f").objects.deepEqual(this.state.showSecondaryDates,it(this,R,"f").showSecondaryDates)||(this.state.showSecondaryDates=it(this,R,"f").showSecondaryDates,t=!0),it(this,M,"f").objects.deepEqual(this.state.detailInitialScrollX,it(this,R,"f").detailInitialScrollX)||(this.state.detailInitialScrollX=it(this,R,"f").detailInitialScrollX,t=!0),it(this,M,"f").objects.deepEqual(this.state.detailInitialScrollY,it(this,R,"f").detailInitialScrollY)||(this.state.detailInitialScrollY=it(this,R,"f").detailInitialScrollY,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskFilter,it(this,R,"f").taskFilter)||(this.state.taskFilter=it(this,R,"f").taskFilter,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskInitialScrollX,it(this,R,"f").taskInitialScrollX)||(this.state.taskInitialScrollX=it(this,R,"f").taskInitialScrollX,t=!0),it(this,M,"f").objects.deepEqual(this.state.taskInitialScrollY,it(this,R,"f").taskInitialScrollY)||(this.state.taskInitialScrollY=it(this,R,"f").taskInitialScrollY,t=!0),it(this,M,"f").objects.deepEqual(this.state.viewMode,it(this,R,"f").viewMode)||(this.state.viewMode=it(this,R,"f").viewMode,t=!0),t&&(it(this,M,"f").debug.logMessage(this,"Persisting stateId "+this.stateId),this.store.persistState(this.stateId,this.state))}}dataChanged(){st(this,I,{},"f")}async getProps(t){return l(this,k,t)}async refresh(){s(this),this.plannerRenderer.refresh()}async setProps(t){c(this,k,t)}async addPhases(t,i){var s;const h=it(this,H,"m",K).call(this,t);h&&(it(this,I,"f")[t]=i,h.phases=null===(s=i.rows)||void 0===s?void 0:s.filter((t=>C(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]]))).map((t=>{const s=x(t.cells[this.phaseDates[0]],t.cells[this.phaseDates[1]],t.cells[this.phasePrevDates[0]],t.cells[this.phasePrevDates[1]],t.cells[this.phaseHours[0]],t.cells[this.phaseHours[1]],t.cells[this.phasePrevHours[0]],t.cells[this.phasePrevHours[1]]),e=T(t,this.phaseIdCol,this.phaseNameCol,i.columns,this.phaseColumns,(()=>this.phaseColumns.map((s=>s==this.phaseDates[0]?"#START#":s==this.phaseDates[1]?"#END#":r(i.columns.find((t=>t.name==s)),t.cells[s])))));let n=it(this,H,"m",$).call(this,t,this.phaseIconCol),o=it(this,H,"m",tt).call(this,t,this.phaseIconCol);return{taskRow:h.taskRow,phaseRow:t,id:h.id+"_"+t.cells[this.phaseIdCol].value,phaseRowId:t.id,taskRowId:h.taskRowId,name:t.cells[this.phaseNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"task",color:t.cells[this.phaseColorCol].value,selectedColor:t.cells[this.phaseColorCol].value,valuesToShow:e,rowType:p.PHASE,icon:n?{url:n,color:null!=o?o:"#595959"}:void 0,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]}}))),this.plannerProps.mainGantt.initialScrollX=it(this,R,"f").taskInitialScrollX,this.plannerProps.mainGantt.initialScrollY=it(this,R,"f").taskInitialScrollY,this.plannerProps.secondaryGantt&&(this.plannerProps.secondaryGantt.initialScrollX=it(this,R,"f").detailInitialScrollX,this.plannerProps.secondaryGantt.initialScrollX=it(this,R,"f").detailInitialScrollY),this.plannerProps=Object.assign({},this.plannerProps),this.refresh()}componentWillLoad(){it(this,M,"f").debug.logLoad(this,!1),it(this,M,"f").theme.register(this),this.initWithPersistedState(),st(this,R,{detailFilter:this.detailFilter,detailInitialScrollX:this.detailInitialScrollX,detailInitialScrollY:this.detailInitialScrollY,showSecondaryDates:this.showSecondaryDates,taskFilter:this.taskFilter,taskInitialScrollX:this.taskInitialScrollX,taskInitialScrollY:this.taskInitialScrollY,viewMode:this.viewMode},"f")}componentDidLoad(){let t=it(this,H,"m",Y).call(this,it(this,H,"m",Z).call(this,it(this,R,"f").detailFilter,!0));const i=this.rootElement.shadowRoot.querySelector("#main-filter");y(i);const s=this.rootElement.shadowRoot.querySelector("#secondary-filter");let h,e,n;t&&y(s),this.plannerProps={mainGantt:{title:this.titleMess,items:it(this,H,"m",V).call(this,it(this,H,"m",Z).call(this,it(this,R,"f").taskFilter,!1)),stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:i,hideLabel:!0,ganttHeight:this.taskHeight,showSecondaryDates:it(this,R,"f").showSecondaryDates,onClick:t=>this.handleOnClick(t),onDblClick:t=>this.handleOnDblClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.taskInitialScrollX,initialScrollY:this.taskInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(e),e=window.setTimeout((()=>this.handleTaskGanttScrollY(t)),500)},onPhaseDrop:t=>this.handleOnPhaseDrop(t)},secondaryGantt:t?{title:"",items:t,stylingOptions:Object.assign(Object.assign({},u),{listCellWidth:this.listCellWidth}),filter:s,hideLabel:!0,ganttHeight:this.detailHeight,onClick:t=>this.handleOnClick(t),onContextMenu:(t,i)=>this.handleOnContextMenu(t,i),onDateChange:t=>this.handleOnDateChange(t),initialScrollX:this.detailInitialScrollX,initialScrollY:this.detailInitialScrollY,readOnly:this.readOnly,onScrollY:t=>{window.clearTimeout(n),n=window.setTimeout((()=>this.handleDetailGanttScrollY(t)),500)}}:void 0,onSetDoubleView:t=>this.handleOnSetDoubleView(t),onSetViewMode:t=>this.handleOnSetViewMode(t),viewMode:this.viewMode,scrollableTaskList:this.scrollableTaskList,onScrollX:t=>{window.clearTimeout(h),h=window.setTimeout((()=>this.handleOnScrollX(t)),500)}},this.kupReady.emit({comp:this,id:this.rootElement.id,value:void 0}),this.taskFilter&&it(this,H,"m",U).call(this,this.taskFilter),this.detailFilter&&it(this,H,"m",U).call(this,this.detailFilter,!0),it(this,M,"f").debug.logLoad(this,!0)}componentDidRender(){this.persistState(),it(this,M,"f").debug.logRender(this,!0)}onKupDblClick(t,i){this.kupDblClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupContextMenu(t,i,s){let h,e,n;switch(i.type){case"project":h=i.taskRow,e=h.cells[this.taskIdCol],n=this.data.columns[this.taskIdCol];break;case"task":h=i.phaseRow,e=h.cells[this.phaseIdCol];break;case"timeline":h=i.detailRow,e=h.cells[this.detailIdCol],n=this.data.columns[this.detailIdCol]}this.kupContextMenu.emit({comp:this,id:this.rootElement.id,value:i,taskAction:s,details:{cell:e,column:n,originalEvent:t,row:h}})}onKupDateChange(t,i){this.kupDateChange.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}onKupPhaseDrop(t,i){this.kupPhaseDrop.emit({comp:this,id:this.rootElement.id,value:t,taskAction:i})}handleOnDblClick(t){switch(t.rowType){case p.TASK:it(this,H,"m",G).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.PHASE:it(this,H,"m",X).call(this)&&this.onKupDblClick(t,m.onDblClick);break;case p.DETAIL:it(this,H,"m",L).call(this)&&this.onKupDblClick(t,m.onDblClick)}for(let t=0;t<it(this,W,"f").length;t++)clearTimeout(it(this,W,"f")[t]),it(this,M,"f").debug.logMessage(this,"Cleared click timeout("+it(this,W,"f")[t]+").");st(this,W,[],"f")}handleOnClick(t){it(this,W,"f").push(setTimeout((()=>{switch(t.rowType){case p.TASK:const i=t.phases?m.onTaskClosing:m.onTaskOpening;it(this,H,"m",F).call(this,t)&&this.onKupClick(t,i);break;case p.PHASE:it(this,H,"m",N).call(this)&&this.onKupClick(t,m.onClick);break;case p.DETAIL:it(this,H,"m",_).call(this)&&this.onKupClick(t,m.onClick)}}),300))}handleOnContextMenu(t,i){switch(i.rowType){case p.TASK:it(this,H,"m",q).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.PHASE:it(this,H,"m",B).call(this)&&this.onKupContextMenu(t,i,m.onRightClick);break;case p.DETAIL:it(this,H,"m",J).call(this)&&this.onKupContextMenu(t,i,m.onRightClick)}}handleOnSetDoubleView(t){var i;it(this,R,"f").showSecondaryDates=t,(null===(i=this.plannerProps)||void 0===i?void 0:i.mainGantt)&&(this.plannerProps.mainGantt.showSecondaryDates=t),this.persistState()}handleOnSetViewMode(t){it(this,R,"f").viewMode=t,this.plannerProps.viewMode=t,this.persistState()}handleOnScrollX(t){it(this,R,"f").taskInitialScrollX=t,it(this,R,"f").detailInitialScrollX=t,this.persistState()}handleTaskGanttScrollY(t){it(this,R,"f").taskInitialScrollY=t,this.persistState()}handleDetailGanttScrollY(t){it(this,R,"f").detailInitialScrollY=t,this.persistState()}handleOnDateChange(t){it(this,H,"m",Q).call(this,t)&&t.rowType!=p.DETAIL&&this.onKupDateChange(t,m.onResize)}handleOnPhaseDrop(t){this.onKupPhaseDrop(t,m.onTask)}render(){var t,i,s;const n=this.plannerProps?Object.assign(Object.assign({},this.plannerProps),{onSetDoubleView:this.handleOnSetDoubleView.bind(this),onSetViewMode:this.handleOnSetViewMode.bind(this),onScrollX:this.handleOnScrollX.bind(this),mainGantt:Object.assign(Object.assign({},null===(t=this.plannerProps)||void 0===t?void 0:t.mainGantt),{onScrollY:this.handleTaskGanttScrollY.bind(this)})}):null;return(null===(i=this.plannerProps)||void 0===i?void 0:i.secondaryGantt)&&(n.secondaryGantt=Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{onScrollY:this.handleDetailGanttScrollY.bind(this)})),h(e,{key:"566acc19713e3e86dd7df82289970c2177d9ca64"},h("style",{key:"b963bc1a35ee326159dcfdba26d54b0363a6b24d"},it(this,M,"f").theme.setKupStyle(this.rootElement)),h("div",{key:"431b11c904af49b67400e33dd151eab1e662a2c9",id:w,style:{maxWidth:this.maxWidth}},this.plannerProps&&h("kup-planner-renderer",{key:"c3ea134d3afc42f6e1d3089dc65c251e2338febe",props:n,ref:t=>this.plannerRenderer=t})),h("div",{key:"43969a35e6a3ada36973257bcdb0081d560098e4",style:{display:this.plannerProps?"none":""}},h(g,{key:"c0a01be246cc6e28f2780fe57194b6e4c84ad194",icon:f.SEARCH,id:"main-filter",label:it(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&it(this,H,"m",U).call(this,t.target.value)},value:this.taskFilter,wrapperClass:"filter"}),(null===(s=this.detailData)||void 0===s?void 0:s.rows)&&this.detailData.rows.length>0?h(g,{icon:f.SEARCH,id:"secondary-filter",label:it(this,M,"f").language.translate(d.SEARCH),onKeyDown:t=>{"Enter"===t.key&&it(this,H,"m",U).call(this,t.target.value,!0)},value:this.detailFilter,wrapperClass:"filter"}):null))}disconnectedCallback(){it(this,M,"f").theme.unregister(this),this.kupDidUnload.emit({comp:this,id:this.rootElement.id,storedSettings:it(this,R,"f")})}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};M=new WeakMap,P=new WeakMap,W=new WeakMap,I=new WeakMap,R=new WeakMap,H=new WeakSet,V=function(t){var i;return t&&t.rows?null===(i=t.rows)||void 0===i?void 0:i.filter((t=>C(t.cells[this.taskDates[0]],t.cells[this.taskDates[1]]))).map((i=>{const s=x(i.cells[this.taskDates[0]],i.cells[this.taskDates[1]],i.cells[this.taskPrevDates[0]],i.cells[this.taskPrevDates[1]],i.cells[this.taskHours[0]],i.cells[this.taskHours[1]],i.cells[this.taskPrevHours[0]],i.cells[this.taskPrevHours[1]]),h=T(i,this.taskIdCol,this.taskNameCol,t.columns,this.taskColumns,(()=>this.taskColumns.map((s=>s==this.taskDates[0]?"#START#":s==this.taskDates[1]?"#END#":r(t.columns.find((t=>t.name==s)),i.cells[s])))));let e=it(this,H,"m",$).call(this,i,this.taskIconCol),n=it(this,H,"m",tt).call(this,i,this.taskIconCol);return{taskRow:i,taskRowId:i.id,id:i.cells[this.taskIdCol].value,name:i.cells[this.taskNameCol].value,startDate:s.dateValues[0],endDate:s.dateValues[1],secondaryStartDate:s.secDateValues[0],secondaryEndDate:s.secDateValues[1],type:"project",valuesToShow:h,rowType:p.TASK,icon:e?{url:e,color:null!=n?n:"#595959"}:void 0,startHour:s.hourValues[0],endHour:s.hourValues[1],secondaryStartHour:s.secHourValues[0],secondaryEndHour:s.secHourValues[1]}})):[]},Y=function(t){if(!t||!t.rows)return;let i=[];return t.rows.filter((t=>C(t.cells[this.detailDates[0]],t.cells[this.detailDates[1]]))).forEach((s=>{var h,e;const n=s.cells[this.detailIdCol].value,o=s.cells[this.detailNameCol].value,a=x(s.cells[this.detailDates[0]],s.cells[this.detailDates[1]],void 0,void 0,s.cells[this.detailHours[0]],s.cells[this.detailHours[1]]),r=T(s,this.detailIdCol,this.detailNameCol,t.columns,this.detailColumns);let l=i.find((t=>t.id==n));l||(l={id:n,name:o,detailRow:s,type:"timeline",valuesToShow:r,rowType:p.DETAIL,schedule:[]},i.push(l));let c=it(this,H,"m",$).call(this,s,this.detailIconCol),f=it(this,H,"m",tt).call(this,s,this.detailIconCol);l.schedule.push({startDate:a.dateValues[0],endDate:a.dateValues[1],color:this.detailColorCol&&null!==(h=s.cells[this.detailColorCol].value)&&void 0!==h?h:"#D9D9D8",selectedColor:this.detailColorCol&&null!==(e=s.cells[this.detailColorCol].value)&&void 0!==e?e:"#D9D9D8",icon:c?{url:c,color:null!=f?f:"#595959"}:void 0,startHour:a.hourValues[0],endHour:a.hourValues[1]})})),i},K=function(t){return this.plannerProps.mainGantt.items.find((i=>i.id==t))},A=function(t){const i=it(this,H,"m",K).call(this,t);i&&(i.phases=void 0),this.plannerProps=Object.assign({},this.plannerProps)},G=function(){return!0},X=function(){return!0},L=function(){return!0},F=function(t){const i=it(this,H,"m",K).call(this,t.id);return(null==i?void 0:i.phases)&&it(this,H,"m",A).call(this,i.id),!0},N=function(){return!0},_=function(){return!0},q=function(){return!0},B=function(){return!0},J=function(){return!0},Q=function(t){let i=!1;return it(this,P,"f")?it(this,P,"f").isEquivalent(t)||(st(this,P,new v(t),"f"),i=!0):(i=!0,st(this,P,new v(t),"f")),i},U=function(t,i){i?it(this,R,"f").detailFilter=t:it(this,R,"f").taskFilter=t;const s=i?{secondaryGantt:Object.assign(Object.assign({},this.plannerProps.secondaryGantt),{items:it(this,H,"m",Y).call(this,it(this,H,"m",Z).call(this,t,i))})}:{mainGantt:Object.assign(Object.assign({},this.plannerProps.mainGantt),{items:it(this,H,"m",V).call(this,it(this,H,"m",Z).call(this,t,i))})};this.plannerProps=Object.assign(Object.assign({},this.plannerProps),s),this.persistState()},Z=function(t,i){const s=i?this.detailData:this.data;if(!s||!s.rows||0==s.rows.length)return;if(!t)return s;const h={columns:this.data.columns,rows:[]},e=[];for(let i=0;i<s.rows.length;i++){const h=s.rows[i],n=h.cells;for(let i=0;i<s.columns.length;i++){const o=n[s.columns[i].name];if(o&&r(s.columns[i],o).toLowerCase().indexOf(t.toLowerCase())>-1){e.push({row:h,weight:i});break}}}return e.sort(((t,i)=>t.weight-i.weight)).forEach((t=>{h.rows.push(t.row)})),h},$=function(t,i){var s;let h;if(i){const e=t.cells[i];let n=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.resource;n||(n=e.value),n&&(h=o("./assets/svg/"+n+".svg"))}return h},tt=function(t,i){var s;let h;if(i){const e=t.cells[i];h=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.color,h&&(h=it(this,M,"f").theme.colorCheck(h).hexColor)}return h},ht.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block}.filter{margin-bottom:var(--kup-space-04)}.planner-render{padding-top:40px}";export{ht as kup_planner}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-b0368f88.js";import{k as o}from"./p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-b0368f88.js";import{k as o}from"./p-c5614700.js";import"./p-1ee561ba.js";const p=class{constructor(t){i(this,t),this.kupManager=o(),this.config=void 0,this.qlik=void 0,this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),e(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((e=>{this.divlist=[],i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,e.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},e))})),e(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,e=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},e={"--lyo_obj-height":this.defobjsize},t("div",{key:"9a7377976f44e92eae2b34ed098d91859939ae89",class:i,style:e},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return e(this)}};p.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{p as kup_qlik}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-b0368f88.js";import{k as p,g as l,s,e as m,ac as c}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-b0368f88.js";import{k as p,g as l,s,e as m,ac as c}from"./p-c5614700.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-b120abd7.js";import{s as d}from"./p-d104a456.js";import"./p-1ee561ba.js";var g,u;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sortOrder="Order for sorting"}(g||(g={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(u||(u={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,p()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,g,t)}async refresh(){e(this)}async setProps(t){s(this,g,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:u.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:u.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.columns.map((t=>n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,t.value))))))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t,n=i.find((t=>t.name===this.dateColumn)),a=i.find((t=>t.name===this.timeColumn));if(!n||!a)return[];const o=d(e,this.sort).reduce(((t,e)=>{const o=`${c(n,e.cells[n.name])} ${c(a,e.cells[a.name])}`;return t[o]=t[o]||[],t[o].push({columns:i.filter((t=>!1!==t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t}),{});return Object.entries(o).map((([t,i])=>({date:t,activities:i})))},w.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';export{w as kup_activity_timeline}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-b0368f88.js";import{k as p,g as n,s}from"./p-
|
|
1
|
+
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-b0368f88.js";import{k as p,g as n,s}from"./p-c5614700.js";import{c as l}from"./p-635bb4b3.js";import"./p-1ee561ba.js";const d="drawer";var c;!function(t){t.customStyle="Custom style of the component.",t.opened="Defaults at false. When set to true, the drawer appears."}(c||(c={}));const h=class{constructor(e){t(this,e),this.kupDrawerClose=r(this,"kup-drawer-close",6),this.kupDrawerOpen=r(this,"kup-drawer-open",6),this.kupDrawerReady=r(this,"kup-drawer-ready",6),this.kupManager=p(),this.opened=!1,this.customStyle=""}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(t){return n(this,c,t)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){e(this)}async setProps(t){s(this,c,t)}async toggle(){this.opened?this.close():this.open()}content(){const t=[],r=Array.prototype.slice.call(this.rootElement.children,0),e=[];for(let e=0;e<r.length;e++)t.push(o("slot",null));return e.push(o("div",{class:`${d}__content`},t)),e}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return o(a,{key:"93f1b8abbecb61a277b9e727363a63a79bec6b2f","kup-opened":this.opened},o("style",{key:"a4adae4c503ce4cd85171f3aba656d00cc537e11"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"241bc8dd79fc0a01b7912a525f6b7cb56ef7c8f6",class:"backdrop",onClick:t=>{t.preventDefault(),t.stopPropagation()},onPointerDown:t=>{t.preventDefault(),t.stopPropagation(),this.close()},onTouchStart:t=>{t.preventDefault(),t.stopPropagation()}}),o("div",{key:"b267c124462e0ca0b7255c004bbc25fd85897775",id:l},o("div",{key:"fa2ed194e5be92c1dabee9cd32fd641a4960561d",class:d},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};h.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_slotted_color:var(\n --kup-drawer-slotted-color,\n var(--kup-text-secondary)\n );--kup_drawer_background_color:var(\n --kup-drawer-background-color,\n var(--kup-layer-1)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-subtle)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 300ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup_drawer_background_color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup_drawer_slotted_color);--kup-button-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-button-primary-color-h:var(--kup_drawer_slotted_color-h);--kup-button-primary-color-s:var(--kup_drawer_slotted_color-s);--kup-button-primary-color-l:var(--kup_drawer_slotted_color-l);--kup-switch-label-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-color:var(--kup_drawer_slotted_color);--kup-textfield-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-primary-color:var(--kup_drawer_slotted_color);--kup-textfield-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-color:var(--kup_drawer_slotted_color);--kup-tree-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup_drawer_slotted_color);color:var(--kup_drawer_slotted_color);fill:var(--kup_drawer_slotted_color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{h as kup_drawer}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GenericObject, KupEventPayload } from '../../components';
|
|
2
|
+
import { FCellShapes } from '../../f-components/f-cell/f-cell-declarations';
|
|
2
3
|
import { KupDataCell, KupDataCellOptions, KupDataColumn, KupDataCommand, KupDataRow } from '../../managers/kup-data/kup-data-declarations';
|
|
3
4
|
import { KupObj } from '../../managers/kup-objects/kup-objects-declarations';
|
|
4
5
|
export interface KupInputPanelSubmit {
|
|
@@ -151,4 +152,12 @@ interface InputPanelCommand {
|
|
|
151
152
|
[key: string]: string;
|
|
152
153
|
}
|
|
153
154
|
export declare const InputPanelKeyCommands: InputPanelCommand;
|
|
155
|
+
export declare enum CheckTriggeringEvents {
|
|
156
|
+
BLUR = "blur",
|
|
157
|
+
ITEMCLICK = "itemclick"
|
|
158
|
+
}
|
|
159
|
+
export declare const CheckConditionsByEventType: {
|
|
160
|
+
blur: (value: FCellShapes) => value is "CHK" | "CMB" | "SWT";
|
|
161
|
+
itemclick: (value: FCellShapes) => boolean;
|
|
162
|
+
};
|
|
154
163
|
export {};
|
|
@@ -41,6 +41,7 @@ export declare enum FCellEvents {
|
|
|
41
41
|
CLICK = "kup-cell-click",
|
|
42
42
|
ICON_CLICK = "kup-cell-iconclick",
|
|
43
43
|
INPUT = "kup-cell-input",
|
|
44
|
+
ITEMCLICK = "kup-cell-itemclick",// Exclusively used for combobox
|
|
44
45
|
KEYUP = "kup-cell-keyup",
|
|
45
46
|
SECONDARY_ICON_CLICK = "kup-cell-secondaryiconclick",
|
|
46
47
|
UPDATE = "kup-cell-update"
|