@sme.up/ketchup 11.0.0-SNAPSHOT-20241105144724 → 11.0.0-SNAPSHOT-20241107091530
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-ccde7158.js → f-cell-32c25f65.js} +4 -4
- package/dist/cjs/{f-cell-ccde7158.js.map → f-cell-32c25f65.js.map} +1 -1
- package/dist/cjs/{f-chip-dbe137ed.js → f-chip-3118b9ba.js} +2 -2
- package/dist/cjs/{f-chip-dbe137ed.js.map → f-chip-3118b9ba.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-4cf8ac1e.js → f-paginator-utils-3099b4b3.js} +2 -2
- package/dist/cjs/{f-paginator-utils-4cf8ac1e.js.map → f-paginator-utils-3099b4b3.js.map} +1 -1
- package/dist/cjs/{f-text-field-8b373b26.js → f-text-field-1ced2cfa.js} +2 -2
- package/dist/cjs/{f-text-field-8b373b26.js.map → f-text-field-1ced2cfa.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-bef7a94e.js → kup-data-table-helper-457ee6aa.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-bef7a94e.js.map → kup-data-table-helper-457ee6aa.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 +12 -6
- package/dist/cjs/kup-input-panel.cjs.entry.js.map +1 -1
- 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-6e414e08.js → kup-manager-65839aad.js} +3 -3
- package/dist/cjs/{kup-manager-6e414e08.js.map → kup-manager-65839aad.js.map} +1 -1
- 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 +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +8 -2
- package/dist/collection/components/kup-input-panel/kup-input-panel.js.map +1 -1
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js.map +1 -1
- package/dist/collection/managers/kup-interact/kup-interact.js +1 -1
- package/dist/collection/managers/kup-interact/kup-interact.js.map +1 -1
- package/dist/components/kup-input-panel.js +8 -2
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/components/kup-manager.js +2 -2
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-e6b53a87.js → f-cell-678a99c3.js} +4 -4
- package/dist/esm/{f-cell-e6b53a87.js.map → f-cell-678a99c3.js.map} +1 -1
- package/dist/esm/{f-chip-ebf776f3.js → f-chip-b0b7b121.js} +2 -2
- package/dist/esm/{f-chip-ebf776f3.js.map → f-chip-b0b7b121.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-2aac0d1a.js → f-paginator-utils-56f66406.js} +2 -2
- package/dist/esm/{f-paginator-utils-2aac0d1a.js.map → f-paginator-utils-56f66406.js.map} +1 -1
- package/dist/esm/{f-text-field-ca6c5386.js → f-text-field-73c20614.js} +2 -2
- package/dist/esm/{f-text-field-ca6c5386.js.map → f-text-field-73c20614.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-2ff0b12a.js → kup-data-table-helper-1333a2f8.js} +2 -2
- package/dist/esm/{kup-data-table-helper-2ff0b12a.js.map → kup-data-table-helper-1333a2f8.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 +12 -6
- package/dist/esm/kup-input-panel.entry.js.map +1 -1
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-1d6b8b1a.js → kup-manager-c6f89439.js} +3 -3
- package/dist/esm/{kup-manager-1d6b8b1a.js.map → kup-manager-c6f89439.js.map} +1 -1
- 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 +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-a3ace76e.entry.js → p-00286291.entry.js} +2 -2
- package/dist/ketchup/{p-cc901eb3.entry.js → p-07e7fade.entry.js} +2 -2
- package/dist/ketchup/{p-f607dc0d.entry.js → p-0efc24e7.entry.js} +2 -2
- package/dist/ketchup/p-197aa6ed.entry.js +2 -0
- package/dist/ketchup/{p-853e2b1d.entry.js.map → p-197aa6ed.entry.js.map} +1 -1
- package/dist/ketchup/{p-196f3059.entry.js → p-256ca361.entry.js} +2 -2
- package/dist/ketchup/{p-a16707d1.js → p-2b14f215.js} +2 -2
- package/dist/ketchup/{p-2389ccc1.entry.js → p-31d98241.entry.js} +2 -2
- package/dist/ketchup/{p-8e844b9d.entry.js → p-3e9957c1.entry.js} +2 -2
- package/dist/ketchup/{p-16e93198.entry.js → p-42ea84f3.entry.js} +2 -2
- package/dist/ketchup/{p-7d7b8718.js → p-49485bbf.js} +2 -2
- package/dist/ketchup/{p-25345be4.entry.js → p-4d6644f0.entry.js} +2 -2
- package/dist/ketchup/{p-25345be4.entry.js.map → p-4d6644f0.entry.js.map} +1 -1
- package/dist/ketchup/{p-587e12b4.entry.js → p-5184497b.entry.js} +2 -2
- package/dist/ketchup/{p-67763e23.entry.js → p-634b3510.entry.js} +2 -2
- package/dist/ketchup/{p-d6243c07.entry.js → p-65780ddc.entry.js} +2 -2
- package/dist/ketchup/{p-7cdceaea.entry.js → p-69ada7f9.entry.js} +2 -2
- package/dist/ketchup/{p-23e745f1.entry.js → p-6e4b8f6d.entry.js} +2 -2
- package/dist/ketchup/{p-d5325eb6.entry.js → p-784120c9.entry.js} +2 -2
- package/dist/ketchup/{p-c4ae346f.entry.js → p-7f762e33.entry.js} +2 -2
- package/dist/ketchup/{p-fe31a004.js → p-9b0551b5.js} +2 -2
- package/dist/ketchup/{p-b0ca996f.entry.js → p-a3b1896e.entry.js} +2 -2
- package/dist/ketchup/{p-0b4f6874.entry.js → p-a496ba6a.entry.js} +2 -2
- package/dist/ketchup/{p-62596f5d.entry.js → p-b05c0af5.entry.js} +2 -2
- package/dist/ketchup/{p-9da57972.entry.js → p-b947f411.entry.js} +2 -2
- package/dist/ketchup/{p-deb86dcb.entry.js → p-d1fc3c35.entry.js} +2 -2
- package/dist/ketchup/{p-e9388650.js → p-d336255f.js} +2 -2
- package/dist/ketchup/{p-bbc10d85.entry.js → p-dd816cfe.entry.js} +2 -2
- package/dist/ketchup/{p-f59fb7d0.entry.js → p-ddc78c64.entry.js} +2 -2
- package/dist/ketchup/{p-18481eec.entry.js → p-dfaaabb5.entry.js} +2 -2
- package/dist/ketchup/{p-affd9a2c.entry.js → p-e34f8755.entry.js} +2 -2
- package/dist/ketchup/{p-192c022f.entry.js → p-e545ca7b.entry.js} +2 -2
- package/dist/ketchup/p-e9985f62.js +2 -0
- package/dist/ketchup/{p-e036c5cd.entry.js → p-ebdf1442.entry.js} +2 -2
- package/dist/ketchup/{p-8ab1203f.entry.js → p-f073ce49.entry.js} +2 -2
- package/dist/ketchup/{p-607b83f5.entry.js → p-f8fe5435.entry.js} +2 -2
- package/dist/ketchup/p-f98dc5f6.js +29 -0
- package/dist/ketchup/{p-86b6489e.js.map → p-f98dc5f6.js.map} +1 -1
- package/package.json +1 -1
- package/dist/ketchup/p-853e2b1d.entry.js +0 -2
- package/dist/ketchup/p-86b6489e.js +0 -29
- package/dist/ketchup/p-f3f54269.js +0 -2
- /package/dist/ketchup/{p-a3ace76e.entry.js.map → p-00286291.entry.js.map} +0 -0
- /package/dist/ketchup/{p-cc901eb3.entry.js.map → p-07e7fade.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f607dc0d.entry.js.map → p-0efc24e7.entry.js.map} +0 -0
- /package/dist/ketchup/{p-196f3059.entry.js.map → p-256ca361.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a16707d1.js.map → p-2b14f215.js.map} +0 -0
- /package/dist/ketchup/{p-2389ccc1.entry.js.map → p-31d98241.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8e844b9d.entry.js.map → p-3e9957c1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-16e93198.entry.js.map → p-42ea84f3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7d7b8718.js.map → p-49485bbf.js.map} +0 -0
- /package/dist/ketchup/{p-587e12b4.entry.js.map → p-5184497b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-67763e23.entry.js.map → p-634b3510.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d6243c07.entry.js.map → p-65780ddc.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7cdceaea.entry.js.map → p-69ada7f9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-23e745f1.entry.js.map → p-6e4b8f6d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d5325eb6.entry.js.map → p-784120c9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c4ae346f.entry.js.map → p-7f762e33.entry.js.map} +0 -0
- /package/dist/ketchup/{p-fe31a004.js.map → p-9b0551b5.js.map} +0 -0
- /package/dist/ketchup/{p-b0ca996f.entry.js.map → p-a3b1896e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-0b4f6874.entry.js.map → p-a496ba6a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-62596f5d.entry.js.map → p-b05c0af5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9da57972.entry.js.map → p-b947f411.entry.js.map} +0 -0
- /package/dist/ketchup/{p-deb86dcb.entry.js.map → p-d1fc3c35.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e9388650.js.map → p-d336255f.js.map} +0 -0
- /package/dist/ketchup/{p-bbc10d85.entry.js.map → p-dd816cfe.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f59fb7d0.entry.js.map → p-ddc78c64.entry.js.map} +0 -0
- /package/dist/ketchup/{p-18481eec.entry.js.map → p-dfaaabb5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-affd9a2c.entry.js.map → p-e34f8755.entry.js.map} +0 -0
- /package/dist/ketchup/{p-192c022f.entry.js.map → p-e545ca7b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f3f54269.js.map → p-e9985f62.js.map} +0 -0
- /package/dist/ketchup/{p-e036c5cd.entry.js.map → p-ebdf1442.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8ab1203f.entry.js.map → p-f073ce49.entry.js.map} +0 -0
- /package/dist/ketchup/{p-607b83f5.entry.js.map → p-f8fe5435.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{k as a,g as f,s as p,e as h}from"./p-f98dc5f6.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return f(this,r,t)}async refresh(){e(this)}async setProps(t){p(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
|
|
2
|
+
//# sourceMappingURL=p-d1fc3c35.entry.js.map
|
|
@@ -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-86b6489e.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-f98dc5f6.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-d336255f.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as s,H as n,d as a}from"./p-d7c15b0e.js";import{k as o,f,ao as p,g as h,s as l,R as r,ap as c,h as m,aq as g}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,f as e,h as s,H as n,d as a}from"./p-d7c15b0e.js";import{k as o,f,ao as p,g as h,s as l,R as r,ap as c,h as m,aq as g}from"./p-f98dc5f6.js";import{c as u}from"./p-635bb4b3.js";import{F as d}from"./p-cc32b7a2.js";import{F as y}from"./p-49485bbf.js";import"./p-029c7cbe.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-9b0551b5.js";import"./p-2b14f215.js";const k=".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;height:100%;width:100%}#kup-component{height:fit-content;width:100%}";const b=k;var x=undefined&&undefined.__classPrivateFieldGet||function(t,i,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!s:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(t):s?s.value:i.get(t)};var w;const v=class{constructor(e){t(this,e);this.kupCellSubmitClick=i(this,"kup-cell-submit-click",6);w.set(this,o());this.customStyle="";this.data=null;this.density=f.NONE;this.dragEnabled=false;this.showSubmit=false;this.submitPosition=p.right}async addCssClasses(t){if(!this.data.cssClass){this.data.cssClass=""}if(t){for(let i=0;i<t.length;i++){const e=t[i];if(this.data.cssClass.indexOf(e)<0){this.data.cssClass+=` ${e}`}}}this.refresh()}async getProps(t){return h(this,g,t)}async refresh(){e(this)}async removeCssClasses(t){if(!this.data.cssClass){return}if(t){for(let i=0;i<t.length;i++){const e=t[i];if(this.data.cssClass.indexOf(e)>0){this.data.cssClass=this.data.cssClass.replace(new RegExp(e,"g"),"")}}}this.refresh()}async setProps(t){l(this,g,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:false,row:this.generateRow()});x(this,w,"f").interact.draggable(this.rootElement.shadowRoot.querySelector("#"+u),{cursorChecker(){return null}},{callback:t},r.BADGE)}}generateColumn(){const t="KUPCELL";const i=undefined;return{name:t,title:i}}generateRow(){const t=this.generateColumn();const i={cells:{}};i.cells[t.name]=this.data;return i}submitClick(t){t.stopPropagation();this.kupCellSubmitClick.emit({comp:this,id:this.rootElement.id,cell:this.data})}componentWillLoad(){x(this,w,"f").dates.register(this);x(this,w,"f").debug.logLoad(this,false);x(this,w,"f").language.register(this);x(this,w,"f").theme.register(this)}componentDidLoad(){x(this,w,"f").debug.logLoad(this,true)}componentWillRender(){x(this,w,"f").debug.logRender(this,false)}componentDidRender(){this.didRenderInteractables();x(this,w,"f").debug.logRender(this,true)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:true,row:this.generateRow()};return s(n,{key:"90637215fbd5c4b76a36681e4638c8999ce77a4b"},s("style",{key:"a8833d7b93b58e42b897ac3b807e33d6797bb59c"},x(this,w,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"ebc03e49d971e45309f70180481687696ff43054",id:u,style:this.showSubmit?{display:"flex","flex-direction":c(this.submitPosition),"align-items":"center",gap:"0.5rem"}:{}},s(y,Object.assign({key:"d247b4b45d87e9b7dd325f0dac80853d0b8155e2"},t)),this.showSubmit?s(d,{buttonType:"submit",label:x(this,w,"f").language.translate(m.CONFIRM),wrapperClass:"form__submit",onClick:t=>{this.submitClick(t)}}):null))}disconnectedCallback(){x(this,w,"f").dates.unregister(this);x(this,w,"f").language.unregister(this);x(this,w,"f").theme.unregister(this)}get rootElement(){return a(this)}};w=new WeakMap;v.style=b;export{v as kup_cell};
|
|
2
|
+
//# sourceMappingURL=p-dd816cfe.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,f as e,h as i,H as a,d as s}from"./p-d7c15b0e.js";import{k as o,g as n,s as l,h as c,e as p,as as h,O as f,at as r,V as u,d}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,f as e,h as i,H as a,d as s}from"./p-d7c15b0e.js";import{k as o,g as n,s as l,h as c,e as p,as as h,O as f,at as r,V as u,d}from"./p-f98dc5f6.js";import{a as g}from"./p-e3062c19.js";import{F as m}from"./p-2b519589.js";import{c as k}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var b;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Sets the data that will be used to display different components."})(b||(b={}));var x;(function(t){t["BOX"]="Box";t["BUTTON_LIST"]="Button List";t["CHART"]="Chart";t["CHIP"]="Chip";t["ECHART"]="Echart";t["DATATABLE"]="Datatable";t["JSON"]="JSON";t["TREE"]="Tree"})(x||(x={}));const y=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";const v=y;const w=class{constructor(e){t(this,e);this.dragHandler=null;this.kupManager=o();this.textArea=null;this.wrapperRef=null;this.display=x.DATATABLE;this.customStyle="";this.data=null}async getProps(t){return n(this,b,t)}async refresh(){e(this)}async setProps(t){l(this,b,t)}comboboxProps(){const t=[];for(const e in x){if(Object.prototype.hasOwnProperty.call(x,e)){t.push({id:x[e],selected:false,value:x[e]})}}return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:false,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:true,["onKup-combobox-itemclick"]:t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0);const e=[];const a={};if(this.display===x.JSON){a.initialValue=this.data?JSON.stringify(this.data,null,2):"";a.textArea=true;e.push(i("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})))}else if(!t){e.push(i("div",{class:"empty"},i(m,{sizeY:"100px",resource:"move_to_inbox"}),i("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))))}else{switch(this.display){case x.BOX:a.data=this.data;e.push(i("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data;e.push(i("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data;e.push(i("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data;a["series"]=[];a["axis"]=null;for(let t=0;t<this.data.columns.length;t++){const e=this.data.columns[t];if(e.obj&&this.kupManager.objects.isNumber(e.obj)||a["axis"]!==null){if(this.display===x.CHART){a["series"].push({code:e.name,decode:e.title})}else{a["series"].push(e.name)}}else{a["axis"]=e.name}}if(a["series"].length===0){this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",p.WARNING)}if(!a["axis"]){this.kupManager.debug.logMessage(this,"No axis for the chart!",p.WARNING)}if(this.display===x.CHART){e.push(i("kup-chart",Object.assign({},a)))}else{e.push(i("kup-echart",Object.assign({},a)))}break;case x.DATATABLE:a.data=this.data;a["autoFillMissingCells"]=true;e.push(i("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data;e.push(i("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",p.ERROR);return}}return e}updateData(t){{const e=Object.assign({},this.data);const i=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null;const a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(i&&i.name){if(!e.columns){e.columns=[i]}else{const t=this.data.columns.find((t=>t.name===i.name));if(!t){e.columns.push(i)}}}else{this.kupManager.debug.logMessage(this,"Invalid column received.",p.WARNING)}if(a){if(!e.rows){e.rows=[a]}else{e.rows.push(a)}}this.data=e;if(this.data&&this.textArea){try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t)));this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle");this.kupManager.interact.dialogify(this.rootElement,this.dragHandler);this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${f}],[${r}]`},{dispatcher:this.rootElement,type:u.MAGICBOX});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return i(a,{key:"8f04a5029dad9d7d8f3673124a6fb954880719d5"},i("style",{key:"af43ffc44c345efb6982aecac7ffeb7469a1e1ab"},this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{key:"4da32884b8cfaee501fe98de3ad61dbfd40644f1",id:k},i("div",{key:"3ae6ee9f2ee07d1ace113fe223bf45fe907eb1d2",class:"magic-box-wrapper"},i("div",{key:"7331459e7beeecbad1f94907c5dfc37e6fd77221",class:"actions",id:"drag-handle"},i("kup-combobox",Object.assign({key:"cf49975df5a5aa923c031c64ecee9a81ae4ad0bc"},this.comboboxProps())),i("kup-button",{key:"9268ce09ec663aa4e00a82ba0fadef493422d12f",styling:g.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),i("kup-button",{key:"3724463433b93aa9ae13ae19d67be8fc39c702f6",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),i("div",{key:"448858d039c7cd0ea8e756d9ad66af2b3baf5c52",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}};w.style=v;export{w as kup_magic_box};
|
|
2
|
+
//# sourceMappingURL=p-ddc78c64.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-86b6489e.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-cc32b7a2.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-f98dc5f6.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
+
//# sourceMappingURL=p-dfaaabb5.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,f as n,h as t,H as e,d as a}from"./p-d7c15b0e.js";import{k as l,g as o,s as p,e as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as i,f as n,h as t,H as e,d as a}from"./p-d7c15b0e.js";import{k as l,g as o,s as p,e as r}from"./p-f98dc5f6.js";import{c as s}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var d;(function(i){i["columns"]="The number of columns displayed by the grid, the default behavior is 12.";i["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";i["singleLine"]="When set to true, forces the content on a single line."})(d||(d={}));const g=".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_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);display:block;font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}:host(.kup-full-width.scalable-cards) .flex-layout__inner{width:100%}:host(.kup-full-width.scalable-cards) .flex-layout__inner *{margin:0;height:100%;width:100%}";const u=g;const f=class{constructor(n){i(this,n);this.kupManager=l();this.columns=12;this.customStyle="";this.singleLine=false}async getProps(i){return o(this,d,i)}async refresh(){n(this)}async setProps(i){p(this,d,i)}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){const i=this.rootElement.children;if(!i||i.length===0){this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",r.WARNING);return}const n=[];for(let e=0;e<i.length;e++){let a=null;if(this.singleLine){a=t("slot",{name:`${e}`})}else{const n=i[e]["span"]||i[e].getAttribute("span")||1;a=t("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},t("slot",{name:`${e}`}))}n.push(a)}const a={};if(this.columns&&this.columns!==12){a["--kup_grid_columns"]=this.columns}return t(e,{style:a},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:s},t("div",{class:this.singleLine?"flex-layout":"layout-grid"},t("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};f.style=u;export{f as kup_grid};
|
|
2
|
+
//# sourceMappingURL=p-e34f8755.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{F as a}from"./p-cc32b7a2.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-fe31a004.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as f,s as p,ar as d,h as u,R as m,e as g}from"./p-86b6489e.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-d4a879fc.js";import"./p-029c7cbe.js";var y;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="The data of the component.";t["enableDesign"]="When set to true, the component is in design mode and it is draggable."})(y||(y={}));const b=".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{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";const k=b;const v=class{constructor(i){t(this,i);this.kupSave=e(this,"kup-dashboard-save",6);this.kupManager=c();this.internalData=null;this.internalDataBackup=null;this.resetInternalData=false;this.customStyle="";this.data=null;this.enableDesign=false}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return f(this,y,t)}async refresh(){i(this)}async setProps(t){p(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=Math.random()*16|0,i=t==="x"?e:e&3|8;return i.toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(d.RESET),secondary:true,onClick:()=>{this.resetData()}};const e={icon:"save",label:this.kupManager.language.translate(d.SAVE),onClick:()=>this.onKupSave()};return n("div",{class:"header"},this.enableDesign?n(a,Object.assign({},t)):undefined,this.enableDesign?n(a,Object.assign({},e)):undefined)}buildForm(t,e){const i={form:true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row","form-dropzone":this.enableDesign&&t&&t.sections!=null&&t.sections.length>0};return t?n("div",{class:i,style:this.getGridStyle(t),ref:i=>{if(!i)return;const n=i;n.kupData={parent:e,form:t}}},t.sections.map((e=>this.buildSection(e,t)))):n("div",null,this.kupManager.language.translate(u.EMPTY_DATA))}buildSectionHeader(t,e){const i={value:t.dim,label:this.kupManager.language.translate(d.DIMENSION),onChange:e=>{const{target:i}=e;t.dim=i.value;this.refresh()}};const o={icon:"add",slim:true,onClick:()=>{if(!t.sections){t.sections=[]}const e={id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout};t.sections.push(e);this.resetData(this.internalData)}};const s={icon:"remove",slim:true,secondary:true,onClick:()=>{const i=e.sections.indexOf(t);e.sections.splice(i,1);this.resetData(this.internalData)}};const h={checked:t.loaded,label:this.kupManager.language.translate(d.LOADED),onChange:()=>{t.loaded=!t.loaded;this.refresh()}};const c={checked:t.layout=="column",label:this.kupManager.language.translate(d.VERTICAL),onChange:()=>{t.layout=t.layout=="column"?"row":"column";this.refresh()}};return n("div",{class:"section-header"},n("div",null,t.id," - ",t.layout),n("div",null,n("div",{class:"section-header-actions"},n(l,Object.assign({},i)),n(r,Object.assign({},h)),n(r,Object.assign({},c)),n(a,Object.assign({},o)),n(a,Object.assign({},s)))))}buildSection(t,e){const i={section:true,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign};const o={"section-body":true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row"};return n("div",{class:i,ref:i=>{if(!i)return;const n=i;n.kupData={parent:e,section:t}}},this.enableDesign?this.buildSectionHeader(t,e):undefined,n("div",{class:o,style:this.getGridStyle(t)},!this.enableDesign&&t.loaded&&(!t.sections||t.sections.length==0)?n("slot",{name:t.id}):undefined,t.sections&&(t.loaded||this.enableDesign)?t.sections.map((e=>this.buildSection(e,t))):undefined))}calcSectionPosition(t,e,i,n,o){let s=n;for(let n=0;n<o.length;n++){const a=o[n];const r=a.getBoundingClientRect();if(i&&t<r.y){s=n;break}else if(!i&&e<r.x){s=n;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((e=>t.push(e)));t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,m.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((e=>t.push(e)));this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((e=>t.push(e)));t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder();this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,e,i){if(i.kupData.form){const n=this.calcSectionPosition(t,e,i.kupData.form.layout=="column",i.kupData.form.sections.length,i.children);this.setSectionPlaceHolder(i,n)}else if(i.kupData.section){const n=this.calcSectionPosition(t,e,i.kupData.section.layout=="column",i.kupData.section.sections.length,i.lastElementChild.children);this.setSectionPlaceHolder(i.lastElementChild,n)}}dropped(t,e,i){const n=i.kupData.parent.sections.indexOf(i.kupData.section);i.kupData.parent.sections.splice(n,1);if(e.kupData.form){if(!e.kupData.form.sections)e.kupData.form.sections=[];const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,e.kupData.form.layout=="column",e.kupData.form.sections.length,e.children);e.kupData.form.sections.splice(n,0,i.kupData.section);i.kupData.parent=e.kupData.form}else if(e.kupData.section){if(!e.kupData.section.sections||e.kupData.section.sections.length==0){const t=JSON.parse(JSON.stringify(e.kupData.section));t.dim=null;i.kupData.section.dim=null;e.kupData.section.id=this.buildGuid();e.kupData.section.sections=[];e.kupData.section.sections.push(t)}const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,e.kupData.section.layout=="column",e.kupData.section.sections.length,e.lastElementChild.children);e.kupData.section.sections.splice(n,0,i.kupData.section);i.kupData.parent=e.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let e={};if(t.sections){let i="";t.sections.forEach((t=>{if(this.enableDesign||!t.dim)i+=" 1fr";else i+=t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim}));if(t.layout=="column")e["gridTemplateRows"]=i;if(t.layout=="row")e["gridTemplateColumns"]=i}return e}setSectionPlaceHolder(t,e){const i=document.createElement("div");i.className="section-placeholder";t.insertBefore(i,t.childNodes[e])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");if(t)t.parentElement.removeChild(t)}resetData(t=null){if(t)this.internalDataBackup=t;this.resetInternalData=true;setTimeout((()=>{if(this.internalDataBackup){this.internalData=this.internalDataBackup;this.internalDataBackup=null}this.resetInternalData=false}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);if(this.resetInternalData){this.internalData=null;this.unregisterInteractables()}else if(!this.internalData)this.internalData=JSON.parse(JSON.stringify(this.data))}componentDidRender(){this.kupManager.debug.logRender(this,true);const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");if(e)e.forEach((t=>{h(t)}))}this.didRenderInteractables()}render(){return n(o,{key:"2a5f7d91b832041e5c68460409f8723bcae04c25"},n("style",{key:"00165eccb43eb45e9519e50ae383b6f237b6d293"},this.kupManager.theme.setKupStyle(this.rootElement)),n("div",{key:"66a90a4032f46aec89e48e2e8c3c95d948dee416",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables();this.kupManager.dates.unregister(this);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};v.style=k;export{v as kup_dashboard};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{F as a}from"./p-cc32b7a2.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-9b0551b5.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as f,s as p,ar as d,h as u,R as m,e as g}from"./p-f98dc5f6.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-d4a879fc.js";import"./p-029c7cbe.js";var y;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="The data of the component.";t["enableDesign"]="When set to true, the component is in design mode and it is draggable."})(y||(y={}));const b=".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{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";const k=b;const v=class{constructor(e){t(this,e);this.kupSave=i(this,"kup-dashboard-save",6);this.kupManager=c();this.internalData=null;this.internalDataBackup=null;this.resetInternalData=false;this.customStyle="";this.data=null;this.enableDesign=false}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return f(this,y,t)}async refresh(){e(this)}async setProps(t){p(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=Math.random()*16|0,e=t==="x"?i:i&3|8;return e.toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(d.RESET),secondary:true,onClick:()=>{this.resetData()}};const i={icon:"save",label:this.kupManager.language.translate(d.SAVE),onClick:()=>this.onKupSave()};return n("div",{class:"header"},this.enableDesign?n(a,Object.assign({},t)):undefined,this.enableDesign?n(a,Object.assign({},i)):undefined)}buildForm(t,i){const e={form:true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row","form-dropzone":this.enableDesign&&t&&t.sections!=null&&t.sections.length>0};return t?n("div",{class:e,style:this.getGridStyle(t),ref:e=>{if(!e)return;const n=e;n.kupData={parent:i,form:t}}},t.sections.map((i=>this.buildSection(i,t)))):n("div",null,this.kupManager.language.translate(u.EMPTY_DATA))}buildSectionHeader(t,i){const e={value:t.dim,label:this.kupManager.language.translate(d.DIMENSION),onChange:i=>{const{target:e}=i;t.dim=e.value;this.refresh()}};const o={icon:"add",slim:true,onClick:()=>{if(!t.sections){t.sections=[]}const i={id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout};t.sections.push(i);this.resetData(this.internalData)}};const s={icon:"remove",slim:true,secondary:true,onClick:()=>{const e=i.sections.indexOf(t);i.sections.splice(e,1);this.resetData(this.internalData)}};const h={checked:t.loaded,label:this.kupManager.language.translate(d.LOADED),onChange:()=>{t.loaded=!t.loaded;this.refresh()}};const c={checked:t.layout=="column",label:this.kupManager.language.translate(d.VERTICAL),onChange:()=>{t.layout=t.layout=="column"?"row":"column";this.refresh()}};return n("div",{class:"section-header"},n("div",null,t.id," - ",t.layout),n("div",null,n("div",{class:"section-header-actions"},n(l,Object.assign({},e)),n(r,Object.assign({},h)),n(r,Object.assign({},c)),n(a,Object.assign({},o)),n(a,Object.assign({},s)))))}buildSection(t,i){const e={section:true,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign};const o={"section-body":true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row"};return n("div",{class:e,ref:e=>{if(!e)return;const n=e;n.kupData={parent:i,section:t}}},this.enableDesign?this.buildSectionHeader(t,i):undefined,n("div",{class:o,style:this.getGridStyle(t)},!this.enableDesign&&t.loaded&&(!t.sections||t.sections.length==0)?n("slot",{name:t.id}):undefined,t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):undefined))}calcSectionPosition(t,i,e,n,o){let s=n;for(let n=0;n<o.length;n++){const a=o[n];const r=a.getBoundingClientRect();if(e&&t<r.y){s=n;break}else if(!e&&i<r.x){s=n;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i)));t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,m.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i)));this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i)));t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder();this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,e){if(e.kupData.form){const n=this.calcSectionPosition(t,i,e.kupData.form.layout=="column",e.kupData.form.sections.length,e.children);this.setSectionPlaceHolder(e,n)}else if(e.kupData.section){const n=this.calcSectionPosition(t,i,e.kupData.section.layout=="column",e.kupData.section.sections.length,e.lastElementChild.children);this.setSectionPlaceHolder(e.lastElementChild,n)}}dropped(t,i,e){const n=e.kupData.parent.sections.indexOf(e.kupData.section);e.kupData.parent.sections.splice(n,1);if(i.kupData.form){if(!i.kupData.form.sections)i.kupData.form.sections=[];const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,i.kupData.form.layout=="column",i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(n,0,e.kupData.section);e.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||i.kupData.section.sections.length==0){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null;e.kupData.section.dim=null;i.kupData.section.id=this.buildGuid();i.kupData.section.sections=[];i.kupData.section.sections.push(t)}const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,i.kupData.section.layout=="column",i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(n,0,e.kupData.section);e.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let e="";t.sections.forEach((t=>{if(this.enableDesign||!t.dim)e+=" 1fr";else e+=t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim}));if(t.layout=="column")i["gridTemplateRows"]=e;if(t.layout=="row")i["gridTemplateColumns"]=e}return i}setSectionPlaceHolder(t,i){const e=document.createElement("div");e.className="section-placeholder";t.insertBefore(e,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");if(t)t.parentElement.removeChild(t)}resetData(t=null){if(t)this.internalDataBackup=t;this.resetInternalData=true;setTimeout((()=>{if(this.internalDataBackup){this.internalData=this.internalDataBackup;this.internalDataBackup=null}this.resetInternalData=false}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);if(this.resetInternalData){this.internalData=null;this.unregisterInteractables()}else if(!this.internalData)this.internalData=JSON.parse(JSON.stringify(this.data))}componentDidRender(){this.kupManager.debug.logRender(this,true);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");if(i)i.forEach((t=>{h(t)}))}this.didRenderInteractables()}render(){return n(o,{key:"2a5f7d91b832041e5c68460409f8723bcae04c25"},n("style",{key:"00165eccb43eb45e9519e50ae383b6f237b6d293"},this.kupManager.theme.setKupStyle(this.rootElement)),n("div",{key:"66a90a4032f46aec89e48e2e8c3c95d948dee416",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables();this.kupManager.dates.unregister(this);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};v.style=k;export{v as kup_dashboard};
|
|
2
|
+
//# sourceMappingURL=p-e545ca7b.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as e}from"./p-d7c15b0e.js";import{an as n,r as t,a as l,h as o}from"./p-f98dc5f6.js";import{F as r}from"./p-cc32b7a2.js";import{a}from"./p-e3062c19.js";var i;(function(e){e["SIMPLE"]="simple";e["FULL"]="full"})(i||(i={}));const s=document.documentElement;const c=c=>{if(!c.perPage){c.perPage=10}const m=Math.ceil(c.max/c.perPage);const b=u(c,m);const h=p(c);const k={"kup-list":{data:b},"kup-text-field":{label:s.ketchup.language.translate(n.PAGE),helper:s.ketchup.language.translate(n.TOTAL)+`: ${m}`,helperWhenFocused:true,inputType:"number",max:m,min:1}};const g={"kup-list":{data:h},"kup-text-field":{label:s.ketchup.language.translate(t.ROWS)+" / "+s.ketchup.language.translate(n.PAGE),helper:s.ketchup.language.translate(t.TOTAL)+`: ${c.max}`,helperWhenFocused:true,inputType:"number",max:c.max,min:1}};return e("div",Object.assign({class:`f-paginator ${c.mode?c.mode:""} ${c.wrapperClass?c.wrapperClass:""}`},c.dataSet,{id:c.id,title:c.title}),c.onLoadMore?e(r,{icon:"plus",onClick:c.onLoadMore,label:s.ketchup.language.translate(o.LOAD_MORE),sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"load-more-button kup-neutral"}):null,e("kup-combobox",{class:"rows-selector",data:g,initialValue:c.perPage.toString(),"onkup-combobox-change":c.onRowsChange}),e("kup-combobox",{class:"page-selector",data:k,initialValue:c.currentPage.toString(),"onkup-combobox-change":c.onPageChange}),e("div",{class:"arrow-wrapper"},c.mode!==i.SIMPLE?e(r,{icon:"chevron_left",disabled:d(c),onClick:c.onPrevPage,sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"kup-neutral prev-page"}):null,c.mode!==i.SIMPLE?e(r,{icon:"chevron_right",disabled:f(c),onClick:c.onNextPage,sizing:l.MEDIUM,styling:a.FLAT,wrapperClass:"kup-neutral next-page"}):null))};function u(e,n){const t=[];for(let l=1;l<=n;l++){const n=l==e.currentPage;t.push({id:l.toString(),selected:n,value:l.toString()})}return t}function p(e){const n=[];let t=e.perPage;if(t===0){return n}while(t<e.max){const l=t==e.perPage;n.push({id:t.toString(),selected:l,value:t.toString()});t=t*2}const l=e.max==e.perPage;n.push({id:e.max.toString(),selected:l,value:e.max.toString()});return n}function f(e){return e.currentPage*e.perPage>=e.max}function d(e){return e.currentPage==1}const m=document.documentElement;function b(e,n,t){if(m.ketchup.math.isNumber(e)){const l=Math.ceil(n/t);let o=e;if(o>l){o=l}if(o<1){o=1}return o}return null}function h(e,n){if(m.ketchup.math.isNumber(e)){let t=e;if(t>n){t=n}if(t<1){t=1}return t}return null}export{c as F,b as p,h as r};
|
|
2
|
+
//# sourceMappingURL=p-e9985f62.js.map
|