@sme.up/ketchup 11.0.0-SNAPSHOT-20241029160403 → 11.0.0-SNAPSHOT-20241030100919
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-51f23dcb.js → f-cell-784e142a.js} +4 -4
- package/dist/cjs/{f-cell-51f23dcb.js.map → f-cell-784e142a.js.map} +1 -1
- package/dist/cjs/{f-chip-b49adf5f.js → f-chip-af09446d.js} +2 -2
- package/dist/cjs/{f-chip-b49adf5f.js.map → f-chip-af09446d.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-5d1c3cbe.js → f-paginator-utils-662821e2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-5d1c3cbe.js.map → f-paginator-utils-662821e2.js.map} +1 -1
- package/dist/cjs/{f-text-field-03d5cda6.js → f-text-field-02d9d284.js} +2 -2
- package/dist/cjs/{f-text-field-03d5cda6.js.map → f-text-field-02d9d284.js.map} +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 +6 -6
- package/dist/cjs/kup-box.cjs.entry.js +6 -6
- 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 +4 -4
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-5f2f9608.js → kup-data-table-helper-d5528bc5.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-5f2f9608.js.map → kup-data-table-helper-d5528bc5.js.map} +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 +4 -4
- package/dist/cjs/kup-input-panel.cjs.entry.js +4 -4
- 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-51a6b521.js → kup-manager-189eaf63.js} +107 -80
- package/dist/cjs/kup-manager-189eaf63.js.map +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-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.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-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +3 -2
- package/dist/cjs/kup-typography.cjs.entry.js.map +1 -1
- package/dist/collection/components/kup-typography/assets/fonts/IBMPlexMono-Regular.woff +0 -0
- package/dist/collection/components/kup-typography/assets/fonts/IBMPlexMono-Regular.woff2 +0 -0
- package/dist/collection/components/kup-typography/assets/fonts/IBMPlexSans-Regular.woff +0 -0
- package/dist/collection/components/kup-typography/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/dist/collection/components/kup-typography/kup-typography.js +2 -1
- package/dist/collection/components/kup-typography/kup-typography.js.map +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +9 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js.map +1 -1
- package/dist/collection/managers/kup-theme/kup-theme.js +17 -14
- package/dist/collection/managers/kup-theme/kup-theme.js.map +1 -1
- package/dist/components/kup-manager.js +106 -79
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/components/kup-typography.js +2 -1
- package/dist/components/kup-typography.js.map +1 -1
- package/dist/esm/{f-cell-a11f1068.js → f-cell-9f52a30a.js} +4 -4
- package/dist/esm/{f-cell-a11f1068.js.map → f-cell-9f52a30a.js.map} +1 -1
- package/dist/esm/{f-chip-6a8151c3.js → f-chip-dd98e13c.js} +2 -2
- package/dist/esm/{f-chip-6a8151c3.js.map → f-chip-dd98e13c.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-1b1bf83b.js → f-paginator-utils-72800ef7.js} +2 -2
- package/dist/esm/{f-paginator-utils-1b1bf83b.js.map → f-paginator-utils-72800ef7.js.map} +1 -1
- package/dist/esm/{f-text-field-ba253046.js → f-text-field-81c7e63b.js} +2 -2
- package/dist/esm/{f-text-field-ba253046.js.map → f-text-field-81c7e63b.js.map} +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 +6 -6
- package/dist/esm/kup-box.entry.js +6 -6
- 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 +4 -4
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-cf099214.js → kup-data-table-helper-52b21f9e.js} +2 -2
- package/dist/esm/{kup-data-table-helper-cf099214.js.map → kup-data-table-helper-52b21f9e.js.map} +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 +4 -4
- package/dist/esm/kup-input-panel.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-58202f14.js → kup-manager-ee1e7cd4.js} +107 -80
- package/dist/esm/kup-manager-ee1e7cd4.js.map +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-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.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-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +3 -2
- package/dist/esm/kup-typography.entry.js.map +1 -1
- package/dist/ketchup/assets/fonts/IBMPlexMono-Regular.woff +0 -0
- package/dist/ketchup/assets/fonts/IBMPlexMono-Regular.woff2 +0 -0
- package/dist/ketchup/assets/fonts/IBMPlexSans-Regular.woff +0 -0
- package/dist/ketchup/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-0b4f9fbd.entry.js → p-15ed7d99.entry.js} +2 -2
- package/dist/ketchup/{p-c670c1ae.js → p-1cb80f82.js} +2 -2
- package/dist/ketchup/{p-01ff9884.js → p-2049ede1.js} +2 -2
- package/dist/ketchup/{p-7c94e917.entry.js → p-20bae24d.entry.js} +2 -2
- package/dist/ketchup/{p-1b82fe39.entry.js → p-24ff4213.entry.js} +2 -2
- package/dist/ketchup/{p-8452e252.entry.js → p-25355f43.entry.js} +2 -2
- package/dist/ketchup/{p-a44b1d04.entry.js → p-2bf4b018.entry.js} +2 -2
- package/dist/ketchup/{p-32042eb5.entry.js → p-2ebedaaa.entry.js} +2 -2
- package/dist/ketchup/{p-2724b666.js → p-3dde5808.js} +2 -2
- package/dist/ketchup/{p-838b6a2f.entry.js → p-444237dd.entry.js} +2 -2
- package/dist/ketchup/{p-837824a9.entry.js → p-48e9e28a.entry.js} +2 -2
- package/dist/ketchup/{p-56e04d74.js → p-49a79002.js} +4 -4
- package/dist/ketchup/p-49a79002.js.map +1 -0
- package/dist/ketchup/{p-05da2b79.entry.js → p-4a98256d.entry.js} +2 -2
- package/dist/ketchup/{p-6ea6f43e.entry.js → p-5ae04be3.entry.js} +2 -2
- package/dist/ketchup/{p-d6761118.entry.js → p-602cd520.entry.js} +2 -2
- package/dist/ketchup/{p-fb33b3c1.entry.js → p-69012c53.entry.js} +2 -2
- package/dist/ketchup/{p-824a75e1.entry.js → p-6e258e44.entry.js} +2 -2
- package/dist/ketchup/{p-6278ee25.entry.js → p-6e7863c6.entry.js} +2 -2
- package/dist/ketchup/{p-ffc02752.entry.js → p-70d05775.entry.js} +2 -2
- package/dist/ketchup/{p-879a4c67.entry.js → p-724a3fdb.entry.js} +2 -2
- package/dist/ketchup/p-724a3fdb.entry.js.map +1 -0
- package/dist/ketchup/{p-c3bc85c3.entry.js → p-7728ffb2.entry.js} +2 -2
- package/dist/ketchup/{p-17992b1b.entry.js → p-7fbb3587.entry.js} +2 -2
- package/dist/ketchup/{p-81e39d58.entry.js → p-80928c2c.entry.js} +2 -2
- package/dist/ketchup/{p-5cc75efb.entry.js → p-8de170dd.entry.js} +2 -2
- package/dist/ketchup/{p-8dacbd87.entry.js → p-92f8f2a8.entry.js} +2 -2
- package/dist/ketchup/{p-8a6b8754.entry.js → p-a5329b0b.entry.js} +2 -2
- package/dist/ketchup/{p-22a17b5a.js → p-b2875c24.js} +2 -2
- package/dist/ketchup/{p-d2bf9725.entry.js → p-b8c8d7b8.entry.js} +2 -2
- package/dist/ketchup/{p-6a532839.js → p-ba47d93e.js} +2 -2
- package/dist/ketchup/{p-4ac3481d.entry.js → p-bec9fb36.entry.js} +2 -2
- package/dist/ketchup/{p-f6103b1d.entry.js → p-dd80dcd1.entry.js} +2 -2
- package/dist/ketchup/{p-c40ad67f.entry.js → p-f08e6820.entry.js} +2 -2
- package/dist/ketchup/{p-c4129003.entry.js → p-f0be4c49.entry.js} +2 -2
- package/dist/ketchup/{p-2292af7c.entry.js → p-f28e4d30.entry.js} +2 -2
- package/dist/ketchup/{p-a27d4e3d.entry.js → p-fd00900c.entry.js} +2 -2
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +6 -1
- package/dist/types/managers/kup-theme/kup-theme.d.ts +1 -4
- package/package.json +1 -1
- package/dist/cjs/kup-manager-51a6b521.js.map +0 -1
- package/dist/esm/kup-manager-58202f14.js.map +0 -1
- package/dist/ketchup/p-56e04d74.js.map +0 -1
- package/dist/ketchup/p-879a4c67.entry.js.map +0 -1
- /package/dist/ketchup/{p-0b4f9fbd.entry.js.map → p-15ed7d99.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c670c1ae.js.map → p-1cb80f82.js.map} +0 -0
- /package/dist/ketchup/{p-01ff9884.js.map → p-2049ede1.js.map} +0 -0
- /package/dist/ketchup/{p-7c94e917.entry.js.map → p-20bae24d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1b82fe39.entry.js.map → p-24ff4213.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8452e252.entry.js.map → p-25355f43.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a44b1d04.entry.js.map → p-2bf4b018.entry.js.map} +0 -0
- /package/dist/ketchup/{p-32042eb5.entry.js.map → p-2ebedaaa.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2724b666.js.map → p-3dde5808.js.map} +0 -0
- /package/dist/ketchup/{p-838b6a2f.entry.js.map → p-444237dd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-837824a9.entry.js.map → p-48e9e28a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-05da2b79.entry.js.map → p-4a98256d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6ea6f43e.entry.js.map → p-5ae04be3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d6761118.entry.js.map → p-602cd520.entry.js.map} +0 -0
- /package/dist/ketchup/{p-fb33b3c1.entry.js.map → p-69012c53.entry.js.map} +0 -0
- /package/dist/ketchup/{p-824a75e1.entry.js.map → p-6e258e44.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6278ee25.entry.js.map → p-6e7863c6.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ffc02752.entry.js.map → p-70d05775.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c3bc85c3.entry.js.map → p-7728ffb2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-17992b1b.entry.js.map → p-7fbb3587.entry.js.map} +0 -0
- /package/dist/ketchup/{p-81e39d58.entry.js.map → p-80928c2c.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5cc75efb.entry.js.map → p-8de170dd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8dacbd87.entry.js.map → p-92f8f2a8.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8a6b8754.entry.js.map → p-a5329b0b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-22a17b5a.js.map → p-b2875c24.js.map} +0 -0
- /package/dist/ketchup/{p-d2bf9725.entry.js.map → p-b8c8d7b8.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6a532839.js.map → p-ba47d93e.js.map} +0 -0
- /package/dist/ketchup/{p-4ac3481d.entry.js.map → p-bec9fb36.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f6103b1d.entry.js.map → p-dd80dcd1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c40ad67f.entry.js.map → p-f08e6820.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c4129003.entry.js.map → p-f0be4c49.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2292af7c.entry.js.map → p-f28e4d30.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a27d4e3d.entry.js.map → p-fd00900c.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,H as t,D as l,B as n,ag as i,v as r,x as s,ai as o,aj as a,J as u,e as f,F as c,ab as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-56e04d74.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{C as e,H as t,D as l,B as n,ag as i,v as r,x as s,ai as o,aj as a,J as u,e as f,F as c,ab as h,aa as d,ak as b,al as p,am as m,a1 as v}from"./p-49a79002.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
+
//# sourceMappingURL=p-2049ede1.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-49a79002.js";import"./p-029c7cbe.js";const n=".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%}";const p=n;const h=class{constructor(t){i(this,t);this.kupManager=o();this.config=undefined;this.qlik=undefined;this.appid="";this.app=false;this.grid=[];this.debug=false;this.fluid=false;this.bordered=false;this.defobjsize="400px";this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=false;if(i.noSelections)t=i.noSelections;this.app.getObject(i.obj,i.obj,{noInteraction:false,noSelections:t})}))}));e(true)}))}doSelection(i){return new Promise((t=>{if(i.selections){i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,false,true)}))}t(true)}))}setRender(i){return new Promise((e=>{this.divlist=[];i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";if(this.bordered){o=o+"bordered "}o=o+"width-"+i.colDim+" size-"+i.size;if(i.obj!="")e.push(t("div",{id:i.obj,class:o}));else e.push(t("div",{class:o}))}));this.divlist.push(t("div",{class:"kup-qlik-row"},e))}));e(true)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);this.setRender(this.grid)}render(){let i=null;let e=null;if(this.fluid){i={["kup-qlik-container-fluid"]:true}}else{i={["kup-qlik-container"]:true}}e={["--lyo_obj-height"]:this.defobjsize};return t("div",{key:"3014bd82bd94053748127d5913f9ff4bda8ef3e1",class:i,style:e},this.divlist)}componentDidRender(){if(this.debug){console.log("Grid",this.grid)}if(this.qlik){if(this.appid!=""&&!this.app){this.app=this.qlik.openApp(this.appid,this.config)}else{if(this.debug){console.log("App already open:",this.app)}}if(this.app){this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))}}this.kupManager.debug.logRender(this,true)}get rootElement(){return e(this)}};h.style=p;export{h as kup_qlik};
|
|
2
|
+
//# sourceMappingURL=p-20bae24d.entry.js.map
|