@sme.up/ketchup 11.0.0-SNAPSHOT-20241113152928 → 11.0.0-SNAPSHOT-20241114111957
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-7848f154.js → f-cell-7a7094c3.js} +4 -4
- package/dist/cjs/{f-cell-7848f154.js.map → f-cell-7a7094c3.js.map} +1 -1
- package/dist/cjs/{f-chip-5c5d992e.js → f-chip-969c6eb5.js} +2 -2
- package/dist/cjs/{f-chip-5c5d992e.js.map → f-chip-969c6eb5.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-e7d293dc.js → f-paginator-utils-8a493112.js} +2 -2
- package/dist/cjs/{f-paginator-utils-e7d293dc.js.map → f-paginator-utils-8a493112.js.map} +1 -1
- package/dist/cjs/{f-text-field-56b1c1f3.js → f-text-field-e58da03f.js} +2 -2
- package/dist/cjs/{f-text-field-56b1c1f3.js.map → f-text-field-e58da03f.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-ff5b20f2.js → kup-data-table-helper-cf35565b.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-ff5b20f2.js.map → kup-data-table-helper-cf35565b.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 +5 -5
- 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-f62248e6.js → kup-manager-00453a7f.js} +2 -2
- package/dist/cjs/{kup-manager-f62248e6.js.map → kup-manager-00453a7f.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-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +1 -0
- package/dist/collection/managers/kup-data/kup-data-declarations.js.map +1 -1
- package/dist/components/kup-input-panel.js +1 -1
- package/dist/components/kup-input-panel.js.map +1 -1
- package/dist/components/kup-manager.js +1 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-63cde277.js → f-cell-a3fcd070.js} +4 -4
- package/dist/esm/{f-cell-63cde277.js.map → f-cell-a3fcd070.js.map} +1 -1
- package/dist/esm/{f-chip-de87c329.js → f-chip-11164dbd.js} +2 -2
- package/dist/esm/{f-chip-de87c329.js.map → f-chip-11164dbd.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-47b3c68f.js → f-paginator-utils-5b648354.js} +2 -2
- package/dist/esm/{f-paginator-utils-47b3c68f.js.map → f-paginator-utils-5b648354.js.map} +1 -1
- package/dist/esm/{f-text-field-b47e7de6.js → f-text-field-d8ec09c2.js} +2 -2
- package/dist/esm/{f-text-field-b47e7de6.js.map → f-text-field-d8ec09c2.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-c75f79b1.js → kup-data-table-helper-2341446b.js} +2 -2
- package/dist/esm/{kup-data-table-helper-c75f79b1.js.map → kup-data-table-helper-2341446b.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 +5 -5
- 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-39b2f1b2.js → kup-manager-d241c3bf.js} +2 -2
- package/dist/esm/{kup-manager-39b2f1b2.js.map → kup-manager-d241c3bf.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-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-673acbbc.entry.js → p-04dc34d1.entry.js} +2 -2
- package/dist/ketchup/{p-966dbe5e.entry.js → p-0be8f1e1.entry.js} +2 -2
- package/dist/ketchup/{p-8271d172.entry.js → p-0dae30ec.entry.js} +2 -2
- package/dist/ketchup/{p-320fe052.entry.js → p-35c2f33f.entry.js} +2 -2
- package/dist/ketchup/{p-85d1c29d.js → p-38dece71.js} +2 -2
- package/dist/ketchup/{p-ddba823b.entry.js → p-3fa555da.entry.js} +2 -2
- package/dist/ketchup/{p-2b16d40e.entry.js → p-42781a36.entry.js} +2 -2
- package/dist/ketchup/{p-4db19bf5.entry.js → p-4add7654.entry.js} +2 -2
- package/dist/ketchup/{p-f5637bd2.js → p-4c50bb9f.js} +2 -2
- package/dist/ketchup/p-4c50bb9f.js.map +1 -0
- package/dist/ketchup/{p-f9257f22.entry.js → p-4cc830c3.entry.js} +2 -2
- package/dist/ketchup/p-54f53946.js +2 -0
- package/dist/ketchup/{p-3206190d.entry.js → p-6645d469.entry.js} +2 -2
- package/dist/ketchup/{p-cb0ce086.entry.js → p-67d896df.entry.js} +2 -2
- package/dist/ketchup/{p-09b5a3b9.js → p-7214c35d.js} +2 -2
- package/dist/ketchup/{p-b3ddf1bb.entry.js → p-7523c5cd.entry.js} +2 -2
- package/dist/ketchup/p-776c1e24.entry.js +2 -0
- package/dist/ketchup/{p-531b9481.entry.js.map → p-776c1e24.entry.js.map} +1 -1
- package/dist/ketchup/{p-95b8815a.entry.js → p-8b6be7fa.entry.js} +2 -2
- package/dist/ketchup/{p-8a899dc8.entry.js → p-a2ea147d.entry.js} +2 -2
- package/dist/ketchup/{p-0a1b80cb.entry.js → p-aaae71bf.entry.js} +2 -2
- package/dist/ketchup/{p-ac790b73.entry.js → p-b1bf76ff.entry.js} +2 -2
- package/dist/ketchup/{p-bd05c318.entry.js → p-ba2e72a3.entry.js} +2 -2
- package/dist/ketchup/{p-fbd3cff4.entry.js → p-bb842ed9.entry.js} +2 -2
- package/dist/ketchup/{p-680bb950.entry.js → p-bb8f0a87.entry.js} +2 -2
- package/dist/ketchup/{p-1e53fd6a.entry.js → p-bc78ec09.entry.js} +2 -2
- package/dist/ketchup/{p-d18bd9fe.entry.js → p-cdb2390e.entry.js} +2 -2
- package/dist/ketchup/{p-dbf128eb.entry.js → p-cdfb48a1.entry.js} +2 -2
- package/dist/ketchup/{p-9b6c3b7b.entry.js → p-d5653e1e.entry.js} +2 -2
- package/dist/ketchup/{p-8b07b6a1.entry.js → p-d9fb28db.entry.js} +2 -2
- package/dist/ketchup/{p-a34d633f.entry.js → p-da7674ed.entry.js} +2 -2
- package/dist/ketchup/{p-ec6becc1.entry.js → p-de38ab09.entry.js} +2 -2
- package/dist/ketchup/{p-a0af92b1.js → p-e58fef5e.js} +2 -2
- package/dist/ketchup/{p-97f0af0c.entry.js → p-e9913b1a.entry.js} +2 -2
- package/dist/ketchup/{p-88849e1b.entry.js → p-e9b04bca.entry.js} +2 -2
- package/dist/ketchup/{p-5a3c6f45.entry.js → p-eaeacc57.entry.js} +2 -2
- package/dist/ketchup/{p-d303778a.js → p-f8022672.js} +2 -2
- package/dist/ketchup/p-fc9c65a4.entry.js +2 -0
- package/dist/ketchup/p-fc9c65a4.entry.js.map +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ketchup/p-531b9481.entry.js +0 -2
- package/dist/ketchup/p-5e28d846.entry.js +0 -2
- package/dist/ketchup/p-5e28d846.entry.js.map +0 -1
- package/dist/ketchup/p-a253b622.js +0 -2
- package/dist/ketchup/p-f5637bd2.js.map +0 -1
- /package/dist/ketchup/{p-673acbbc.entry.js.map → p-04dc34d1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-966dbe5e.entry.js.map → p-0be8f1e1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8271d172.entry.js.map → p-0dae30ec.entry.js.map} +0 -0
- /package/dist/ketchup/{p-320fe052.entry.js.map → p-35c2f33f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-85d1c29d.js.map → p-38dece71.js.map} +0 -0
- /package/dist/ketchup/{p-ddba823b.entry.js.map → p-3fa555da.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2b16d40e.entry.js.map → p-42781a36.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4db19bf5.entry.js.map → p-4add7654.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f9257f22.entry.js.map → p-4cc830c3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a253b622.js.map → p-54f53946.js.map} +0 -0
- /package/dist/ketchup/{p-3206190d.entry.js.map → p-6645d469.entry.js.map} +0 -0
- /package/dist/ketchup/{p-cb0ce086.entry.js.map → p-67d896df.entry.js.map} +0 -0
- /package/dist/ketchup/{p-09b5a3b9.js.map → p-7214c35d.js.map} +0 -0
- /package/dist/ketchup/{p-b3ddf1bb.entry.js.map → p-7523c5cd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-95b8815a.entry.js.map → p-8b6be7fa.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8a899dc8.entry.js.map → p-a2ea147d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-0a1b80cb.entry.js.map → p-aaae71bf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ac790b73.entry.js.map → p-b1bf76ff.entry.js.map} +0 -0
- /package/dist/ketchup/{p-bd05c318.entry.js.map → p-ba2e72a3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-fbd3cff4.entry.js.map → p-bb842ed9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-680bb950.entry.js.map → p-bb8f0a87.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1e53fd6a.entry.js.map → p-bc78ec09.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d18bd9fe.entry.js.map → p-cdb2390e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-dbf128eb.entry.js.map → p-cdfb48a1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9b6c3b7b.entry.js.map → p-d5653e1e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8b07b6a1.entry.js.map → p-d9fb28db.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a34d633f.entry.js.map → p-da7674ed.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ec6becc1.entry.js.map → p-de38ab09.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a0af92b1.js.map → p-e58fef5e.js.map} +0 -0
- /package/dist/ketchup/{p-97f0af0c.entry.js.map → p-e9913b1a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-88849e1b.entry.js.map → p-e9b04bca.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5a3c6f45.entry.js.map → p-eaeacc57.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d303778a.js.map → p-f8022672.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 f,s as p,e as h}from"./p-
|
|
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-4c50bb9f.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-da7674ed.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-f5637bd2.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s,d,b as l}from"./p-4c50bb9f.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.MEDIUM}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){s(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${d.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"57777569afca152462d5986886aabea876bba925"},e("style",{key:"91e13f524bb7457d1ee123104e3857db9be71adc"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"a73c87f19581e2964c651b781690e39c12b94e7e",id:u},e("div",{key:"f1d089a3a4f996c6a032acc26316d4722d8c094e",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
+
//# sourceMappingURL=p-de38ab09.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e,g as t}from"./p-d7c15b0e.js";import{b as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{h as e,g as t}from"./p-d7c15b0e.js";import{b as l}from"./p-4c50bb9f.js";import{F as n}from"./p-2b519589.js";const i=document.documentElement;const s=(t,l)=>{const n={"f-text-field":true,"kup-danger":t.danger,"kup-full-height":t.fullHeight,"kup-full-width":t.fullWidth,"kup-info":t.info,"kup-light-mode":t.lightMode,"kup-secondary":t.secondary,"kup-shaped":t.shaped,"kup-success":t.success,"kup-warning":t.warning,[t.wrapperClass]:!!t.wrapperClass};return e("div",Object.assign({class:n},t.dataSet,{id:t.id,title:t.title}),t.leadingLabel||t.trailingLabel?e("div",{class:`mdc-form-field ${t.leadingLabel?"mdc-form-field--align-end":""}`},[d(t),c(t),e("label",null,t.label)]):[d(t),c(t)],l)};function d(s){var d,c;const r=s.textArea||s.outlined;let o;let u;let f;let m;if(s.label&&!s.leadingLabel&&!s.trailingLabel){o=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},s.label),s.maxLength?e("div",{class:"mdc-text-field-character-counter"},s.value.length," / ",s.maxLength):undefined)}if(s.icon){let n;let i="";if(Object.values(l).indexOf(s.icon)>-1){i=s.icon.replace("--","")}else{let e=`url('${t(`./assets/svg/${s.icon}.svg`)}') no-repeat center`;n={mask:e,webkitMask:e}}u=e("span",{style:n,onClick:s.onIconClick,class:`mdc-text-field__icon kup-icon action ${i}`})}if(s.quantityButtons){const l=`url('${t(`./assets/svg/minus.svg`)}') no-repeat center`;const n=`url('${t(`./assets/svg/plus.svg`)}') no-repeat center`;const i={mask:l,webkitMask:l};const s={mask:n,webkitMask:n};f=e("span",{style:i,class:`mdc-text-field__icon kup-icon action`});m=e("span",{style:s,class:`mdc-text-field__icon kup-icon action`})}const p={color:s.error?`var(--kup-danger-color-60)`:`var(--kup-warning-color-50)`,resource:s.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"};const x={"mdc-text-field-container":true,"mdc-text-field-container--disabled":s.disabled};const g={"is-clearable":s.isClearable,"mdc-text-field":true,"mdc-text-field--disabled":s.disabled,"mdc-text-field--read-only":s.readOnly,"mdc-text-field--filled":!s.fullWidth&&!r,"mdc-text-field--no-label":!s.label,"mdc-text-field--fullwidth":s.fullWidth,"mdc-text-field--lightmode":s.lightMode,"mdc-text-field--outlined":r,"mdc-text-field--textarea":s.textArea,"mdc-text-field--with-leading-icon":s.icon&&!s.trailingIcon,"mdc-text-field--with-trailing-icon":s.icon&&s.trailingIcon,"mdc-text-field--with-quantity-buttons":s.quantityButtons,"mdc-text-field--error":Boolean(s.error),"mdc-text-field--alert":Boolean(s.alert),[`mdc-text-field--${s.sizing}`]:s.sizing?true:false};let v=s.value;let k=s.quantityButtons?"number":(d=s.inputType)!==null&&d!==void 0?d:"text";let b=false;if(s.inputType==="number"&&(s.decimals&&s.decimals>0||s.group)){k="text";b=true}if(s.inputType==="number"){const e={allowNegative:(c=s.allowNegative)!==null&&c!==void 0?c:true,decimal:s.decimals,group:s.group,integer:s.integers};v=a(v,e,false)}return e("div",{class:x},!s.fullWidth?o:undefined,e("div",{class:g},!s.trailingIcon?u:undefined,s.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:s.disabled,maxlength:s.maxLength,value:v,onBlur:s.onBlur,onClick:s.onClick,onChange:s.onChange,onFocus:s.onFocus,onInput:s.onInput,onKeyDown:s.onKeyDown})):e("input",{inputmode:s.inputMode?s.inputMode:undefined,type:k,step:s.step,min:s.min,max:s.max,name:s.name,class:"mdc-text-field__input",disabled:s.disabled,placeholder:s.placeholder,maxlength:s.maxLength,size:s.size,value:v,onBlur:e=>{var t;if(b){const l={allowNegative:(t=s.allowNegative)!==null&&t!==void 0?t:true,decimal:s.decimals,group:s.group,integer:s.integers};e.target.value=a(e.target.value,l,true)}if(s.onBlur){s.onBlur(e)}},onChange:e=>{var t;if(b){const l={allowNegative:(t=s.allowNegative)!==null&&t!==void 0?t:true,decimal:s.decimals,group:s.group,integer:s.integers};if(s.min!==undefined&&s.min!==null&&s.min>parseFloat(e.target.value)){e.target.value=a(s.min.toString(),l,true)}else if(s.max!==undefined&&s.max!==null&&s.max<parseFloat(e.target.value)){e.target.value=a(s.max.toString(),l,true)}else{e.target.value=a(e.target.value,l,true)}}else{if(s.min!==undefined&&s.min!==null&&s.min>parseFloat(e.target.value)){e.target.value=s.min.toString()}else if(s.max!==undefined&&s.max!==null&&s.max<parseFloat(e.target.value)){e.target.value=s.max.toString()}}if(s.onChange){s.onChange(e)}},onClick:s.onClick,onFocus:s.onFocus,onInput:s.onInput,onKeyDown:s.onKeyDown,onKeyPress:e=>{var t;if(!b){return}if(e.ctrlKey){return}if(e.key.length>1){return}const l={allowNegative:(t=s.allowNegative)!==null&&t!==void 0?t:true,decimal:s.decimals,group:s.group,integer:s.integers};let n=e.target;let d=n.value;let c=d.substring(0,n.selectionStart);let a=d.substring(n.selectionEnd,n.selectionEnd+d.length-1);let r=c+e.key+a;if(!i.ketchup.math.matchNumericValueWithOptions(r,l)){e.preventDefault();return}}}),s.trailingIcon?u:undefined,s.helperIcon&&s.error?e("div",{class:"mdc-error-icon"},e(n,Object.assign({},p))):s.helperIcon&&s.alert?e("div",{class:"mdc-alert-icon"},e(n,Object.assign({},p))):undefined,s.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:s.onMinusClick},f),e("button",{onClick:s.onPlusClick},m)),s.isClearable?e("span",{class:`mdc-text-field__icon kup-icon ${l.CLEAR.replace("--","")}`,onClick:s.onClearIconClick}):undefined))}function c(t){if(t.error||t.alert){return e("div",{class:"mdc-text-field-helper-line"},t.error?e("span",{class:"mdc-error-message"},t.error):t.alert?e("span",{class:"mdc-alert-message"},t.alert):undefined)}else if(t.helperEnabled!==false){if(t.helper){const l={"mdc-text-field-helper-text":true,"mdc-text-field-helper-text--persistent":!t.helperWhenFocused};return e("div",{class:"mdc-text-field-helper-line"},e("div",{class:l},t.helper))}}}const a=function(e,t,l){let n=e;if(!n){return n}if(n=="-"){return""}return i.ketchup.math.format(n,i.ketchup.math.createFormatPattern(t.group,t.decimal),l)};export{s as F};
|
|
2
|
+
//# sourceMappingURL=p-e58fef5e.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as o,H as n,d as a}from"./p-d7c15b0e.js";import{k as s,c as p,g as h,s as r}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,f as e,h as o,H as n,d as a}from"./p-d7c15b0e.js";import{k as s,c as p,g as h,s as r}from"./p-4c50bb9f.js";import{F as f,a as l}from"./p-6568b295.js";import{c}from"./p-635bb4b3.js";import{F as u}from"./p-2b519589.js";import"./p-029c7cbe.js";var g;(function(t){t["data"]="the text of the text";t["Style"]="it is the style of the text";t["Border"]="when true it will appear a border";t["BorderWidth"]="it is the width of the border";t["Align"]="text alignment";t["FontBold"]="when true it will display the bold font";t["FontItalic"]="when true it will display the italic ( cursive )";t["FontName"]="it is the name of the font";t["FontSize"]="it is the size of the font of the text";t["FontULine"]="when true it will show the underline";t["FontColor"]="it is the color of the font of the text";t["BackColor"]="it is the background color of the text";t["Type"]="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"})(g||(g={}));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}.kup-typography--wrap{display:flex;align-items:center;gap:var(--kup-space-03)}.kup-typography--wrap:hover .image__iconToolbar{opacity:0.3}.kup-typography--wrap:hover .image__iconToolbar:hover{cursor:pointer;opacity:1;background-color:var(--kup-gray-color-20-hover)}.kup-typography--wrap .image__iconToolbar{opacity:0.3;margin:0}:host{display:block}";const m=y;var d=undefined&&undefined.__classPrivateFieldSet||function(t,i,e,o,n){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?t!==i||!n:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?n.call(t,e):n?n.value=e:i.set(t,e),e};var k=undefined&&undefined.__classPrivateFieldGet||function(t,i,e,o){if(e==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?o:e==="a"?o.call(t):o?o.value:i.get(t)};var b,w;const x=class{constructor(e){t(this,e);this.kupIconClick=i(this,"kup-typography-iconclick",6);this.kupClick=i(this,"kup-typography-click",6);this.kupItemClick=i(this,"kup-typography-itemclick",6);this.kupManager=s();b.set(this,null);w.set(this,null);this.customStyle="";this.toolbar=true;this.toolbarData=undefined;this.type=f.BODY_COMPACT;this.value=null}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupIconClick(t){d(this,w,t,"f");this.kupIconClick.emit({comp:this,id:this.rootElement.id});this.createDropDownToolbarList()}onKupToolbarItemClick(t){this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value,node:t.detail.selected})}closeRowToolbarList(){if(this.toolbarList){this.kupManager.dynamicPosition.stop(this.toolbarList);this.kupManager.removeClickCallback(k(this,b,"f"));this.toolbarList.remove();this.toolbarList=null}}createDropDownToolbarList(){if(this.toolbarList){this.closeRowToolbarList()}const t=document.createElement("kup-toolbar");t.data=this.toolbarData;t.addEventListener("kup-toolbar-click",(t=>{this.onKupToolbarItemClick(t);setTimeout((()=>{this.closeRowToolbarList()}),0)}));this.toolbarList=t;d(this,b,{cb:()=>{this.closeRowToolbarList()},el:this.toolbarList},"f");this.kupManager.addClickCallback(k(this,b,"f"),true);this.rootElement.shadowRoot.appendChild(this.toolbarList);requestAnimationFrame((()=>{this.kupManager.dynamicPosition.register(this.toolbarList,k(this,w,"f"),0,p.AUTO,true);this.kupManager.dynamicPosition.start(this.toolbarList)}))}async getProps(t){return h(this,g,t)}async refresh(){e(this)}async setProps(t){r(this,g,t)}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 t={toolbar:this.toolbar,value:this.value,type:this.type};const i={color:"var(--kup-gray-color-70)",resource:"more_vert",sizeX:"16px",sizeY:"16px",wrapperClass:"image__iconToolbar"};const e={"kup-typography--wrap":t.toolbar?true:false};return o(n,{key:"f2ccc3ddf69b9437396b2cf490ddf9b8e4f8bdee"},o("style",{key:"317ab3cfb143944a4bcb571d6a8293aab4df4651"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"0e7fdb7e3c04f6cac4af1ce9a745288e1762901c",id:c,class:e,onClick:()=>this.onKupClick},o(l,Object.assign({key:"4c73eb780cf5cf0002ffc581c409925c2055bd17"},t)),o(u,Object.assign({key:"1bb15e447e28e95e633607b96897fd6c2fb8a5bf"},i,{onClick:t=>{t.stopPropagation();this.onKupIconClick(t.currentTarget)}}))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}static get assetsDirs(){return["assets/fonts"]}get rootElement(){return a(this)}};b=new WeakMap,w=new WeakMap;x.style=m;export{x as kup_typography};
|
|
2
|
+
//# sourceMappingURL=p-e9913b1a.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-4c50bb9f.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-e9b04bca.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-4c50bb9f.js";import{a as g}from"./p-e3062c19.js";import{F as m}from"./p-2b519589.js";import{c as b}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var k;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Sets the data that will be used to display different components."})(k||(k={}));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,k,t)}async refresh(){e(this)}async setProps(t){l(this,k,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:b},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-eaeacc57.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-f5637bd2.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-4c50bb9f.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-f8022672.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as i,f as n,h as e,H as s,d as o}from"./p-d7c15b0e.js";import{F as l}from"./p-cc32b7a2.js";import{F as r}from"./p-7214c35d.js";import{k as a,a5 as u,F as c,g as h,s as f,h as p,al as d,ab as m,aa as v,am as b,e as k,ak as g,a as y}from"./p-4c50bb9f.js";import{F as _}from"./p-c4054aba.js";import{c as j}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-5d03c077.js";import"./p-e58fef5e.js";import"./p-38dece71.js";import"./p-029c7cbe.js";import"./p-d4a879fc.js";var w;(function(t){t["TAB"]="tab"})(w||(w={}));var x;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the input panel.";t["hiddenSubmitButton"]="Creates a hidden submit button in order to submit the form with enter.";t["submitCb"]="Sets the callback function on submit form";t["optionsHandler"]="Sets the callback function to recieve options"})(x||(x={}));const O=12;const $=22;const z=t=>{if(t==0){return O/2}if(!t){return null}if(t===1){return 1.5*O}return t*O};const S=t=>{if(!t){return null}return t*$};const M=t=>{if(!t){return null}return(t-1)*$};const T=t=>{if(!t){return null}return t*O};const W=".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-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0)}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:2rem}:host .input-panel__commands{display:flex;gap:2rem}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel--absolute{height:40ch;justify-content:flex-end}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .mdc-text-field{height:unset !important}";const D=W;var C=undefined&&undefined.__classPrivateFieldGet||function(t,i,n,e){if(n==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof i==="function"?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?e:n==="a"?e.call(t):e?e.value:i.get(t)};var E=undefined&&undefined.__classPrivateFieldSet||function(t,i,n,e,s){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof i==="function"?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?s.call(t,n):s?s.value=n:i.set(t,n),n};var F=undefined&&undefined.__rest||function(t,i){var n={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0)n[e]=t[e];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,e=Object.getOwnPropertySymbols(t);s<e.length;s++){if(i.indexOf(e[s])<0&&Object.prototype.propertyIsEnumerable.call(t,e[s]))n[e[s]]=t[e[s]]}return n};var B,I,P,R,N,V,G,J,A,L,H,K,X,Y,q,Q,U,Z,tt,it,nt,et,st,ot,lt,rt,at,ut,ct,ht,ft,pt,dt,mt,vt,bt,kt,gt,yt,_t,jt,wt,xt,Ot,$t,zt,St,Mt,Tt,Wt,Dt,Ct,Et,Ft,Bt,It,Pt,Rt,Nt,Vt,Gt,Jt;const At=document.documentElement;const Lt=class{constructor(n){t(this,n);this.kupReady=i(this,"kup-input-panel-ready",6);B.add(this);I.set(this,a());P.set(this,new Map([["SmeupTreeNode",C(this,B,"m",Et).bind(this)],["SmeupDataTree",C(this,B,"m",Ft).bind(this)],["SmeupTable",C(this,B,"m",Bt).bind(this)],["SmeupDataTable",C(this,B,"m",Bt).bind(this)]]));R.set(this,null);N.set(this,new Map([[u.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[u.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[u.MULTI_COMBOBOX,["kup-combobox-iconclick"]]]));V.set(this,new Map([[c.AUTOCOMPLETE,"kup-autocomplete-blur"],[c.CHIP,"kup-textfield-blur"],[c.COMBOBOX,"kup-combobox-blur"],[c.DATE,"kup-datepicker-blur"],[c.MULTI_AUTOCOMPLETE,"kup-autocomplete-blur"],[c.MULTI_COMBOBOX,"kup-combobox-blur"],[c.TIME,"kup-timepicker-blur"]]));G.set(this,[]);J.set(this,new Map([[u.DATE,"kup-date-picker"],[u.TIME,"kup-time-picker"]]));A.set(this,new Map([[c.BUTTON_LIST,C(this,B,"m",q).bind(this)],[c.EDITOR,C(this,B,"m",U).bind(this)],[c.LABEL,C(this,B,"m",tt).bind(this)],[c.TABLE,C(this,B,"m",Z).bind(this)]]));L.set(this,new Map([[w.TAB,C(this,B,"m",rt).bind(this)]]));H.set(this,[]);this.customStyle="";this.data=null;this.hiddenSubmitButton=false;this.submitCb=null;this.optionsHandler=null;this.customButtonClickHandler=null;this.checkValidObjCallback=null;this.checkValidValueCallback=null;this.inputPanelCells=[];this.inputPanelCommands=[];this.tabSelected=null}onDataChanged(){E(this,R,structuredClone(this.data),"f");if(C(this,G,"f").length){C(this,G,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)}));E(this,G,[],"f")}if(C(this,H,"f").length){C(this,H,"f").map((t=>{C(this,I,"f").keysBinding.unregister(t)}));E(this,H,[],"f")}C(this,B,"m",ht).call(this,this.data)}async getProps(t){return h(this,x,t)}async refresh(){n(this)}async setProps(t){f(this,x,t)}componentWillLoad(){C(this,I,"f").debug.logLoad(this,false);C(this,I,"f").language.register(this);C(this,I,"f").theme.register(this);this.onDataChanged()}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});C(this,I,"f").debug.logLoad(this,true)}componentWillRender(){C(this,I,"f").debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++){_(i[t])}}C(this,I,"f").debug.logRender(this,true)}render(){const t=Boolean(!this.inputPanelCells.length);const i=t?[e("p",null,C(this,I,"f").language.translate(p.EMPTY_DATA))]:this.inputPanelCells.map((t=>C(this,B,"m",X).call(this,t)));return e(s,{key:"51d6591625d21011a22538863879959fb476900b"},e("style",{key:"7cb79388c85b0adb25d6e3cc0a85660985a66643"},C(this,I,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"a8530ff7c62de5dcd6e95c12e7441ffca2d1ce91",id:j},i))}disconnectedCallback(){C(this,I,"f").language.unregister(this);C(this,I,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{data:["onDataChanged"]}}};I=new WeakMap,P=new WeakMap,R=new WeakMap,N=new WeakMap,V=new WeakMap,G=new WeakMap,J=new WeakMap,A=new WeakMap,L=new WeakMap,H=new WeakMap,B=new WeakSet,K=function t(i){return this.inputPanelCells.reduce(((t,{cells:n})=>{if(!t){return n.find((({column:t})=>t.name===i)).cell}return t}),null)},X=function t(i){var n;const s=i.row.layout;const o=(s===null||s===void 0?void 0:s.horizontal)||false;const r={};let a;if(!((n=s===null||s===void 0?void 0:s.sections)===null||n===void 0?void 0:n.length)){a=i.cells.map((t=>C(this,B,"m",Y).call(this,t.cell,i.row,t.column)))}else{if(s.absolute){a=C(this,B,"m",et).call(this,i,s)}else{if(!s.sectionsType){const t=s.sections.some((t=>t.dim));r.display="grid";if(s.horizontal){r.gridTemplateColumns=t?s.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${s.sections.length}, 1fr)`}else{r.gridTemplateRows=t?s.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${s.sections.length}, 1fr)`}}a=C(this,B,"m",nt).call(this,i,s)}}const u={"input-panel":true,"input-panel--column":!o,"input-panel--absolute":s===null||s===void 0?void 0:s.absolute};return e("form",{name:this.rootElement.id,id:this.rootElement.id,class:{"input-panel-form":true},onSubmit:t=>{t.preventDefault();this.submitCb({value:{before:Object.assign({},C(this,R,"f")),after:C(this,B,"m",dt).call(this)}})}},e("div",{class:u,style:r},a),e("div",{class:"input-panel__commands"},!this.hiddenSubmitButton?e(l,{buttonType:"submit",label:C(this,I,"f").language.translate(p.CONFIRM),wrapperClass:"form__submit"}):null,this.inputPanelCommands))},Y=function t(i,n,s){if(!i){return}const o=C(this,A,"f").get(i.shape);if(o!==undefined){return o(i,s.name)}const l={cell:i,column:s,row:n,component:this,editable:true,renderKup:true,setSizes:true};const a=C(this,B,"m",it).call(this,i,s.title);if(a){return e("div",{class:{"input-panel__label_container":true}},a,e(r,Object.assign({},l)))}return e(r,Object.assign({},l))},q=function t(i,n){return e(l,Object.assign({icon:i.icon,id:n},i.data,{wrapperClass:"form__submit"}))},Q=function t(i,n){return e("kup-dropdown-button",Object.assign({},i.data,{sizing:y.MEDIUM,label:i.value,data:n,"onkup-dropdownbutton-itemclick":t=>{C(this,B,"m",Jt).call(this,t.detail.node,t.detail.node.id)}}))},U=function t(i,n){const s="kup-editor-save";const o=t=>{const i=this.inputPanelCells.reduce(((t,{cells:i})=>{if(!t){return i.find((({column:t})=>t.name===n)).cell}return t}),null);i.value=t.detail.htmlValue.replace(/\n/g,"<br>")};this.rootElement.addEventListener(s,o);C(this,G,"f").push({event:s,handler:o});return e("kup-editor",Object.assign({},i.data,{id:n,isReadOnly:!i.isEditable,showToolbar:true}))},Z=function t(i,n){return e("kup-data-table",Object.assign({id:n,editableData:true,showGroups:true,showFilters:true,showFooter:true},i.data))},tt=function t(i,n){return e("span",{class:"input-panel-label",id:n},i.value)},it=function t(i,n){if(!n){return null}const s=At.ketchup.data.cell.getType(i,i.shape);if(s===u.RADIO){return e("span",null,n)}return null},nt=function t(i,n){const e=C(this,L,"f").get(n.sectionsType);return e?e(i,n.sections):n.sections.map((t=>C(this,B,"m",st).call(this,i,t)))},et=function t(i,n){return n.sections.map((t=>C(this,B,"m",ot).call(this,i,t)))},st=function t(i,n,s=false,o={}){var l,r;const a={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal};o.gap=+n.gap>0?`${n.gap}rem`:"1rem";let u=[];if((l=n.sections)===null||l===void 0?void 0:l.length){u=n.sections.map((n=>C(this,B,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));if(!n.gridCols&&n.horizontal){o.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`}if(!n.gridRows&&!n.horizontal){o.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`}}else if((r=n.content)===null||r===void 0?void 0:r.length){u=n.content.map((t=>C(this,B,"m",at).call(this,i,t)));o.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"";o.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""}const c=e("div",{class:a,style:o},u);return n.title&&!s?e("div",{class:{"input-panel__section_label_container":true}},e("h3",null,n.title),c):c},ot=function t(i,n){var s,o;let l=[];if((s=n.sections)===null||s===void 0?void 0:s.length){l=n.sections.map((n=>C(this,B,"m",t).call(this,i,n)))}else if((o=n.content)===null||o===void 0?void 0:o.length){l=n.content.map((t=>C(this,B,"m",ut).call(this,i,t)))}const r=`${z(n.absoluteWidth)}px`;const a=`${S(n.absoluteHeight)}px`;const u=`${M(n.absoluteRow)}px`;const c=`${T(n.absoluteColumn)}px`;const h={position:"absolute",width:r,"min-width":r,"max-width":r,height:a,"min-height":a,"max-height":a,top:u,left:c,overflow:"auto"};return e("div",{style:h},l)},lt=function t(i){var n,e;let s=[];if((n=i.content)===null||n===void 0?void 0:n.length){i.content.forEach((t=>{if(t.id){s.push(t.id)}}))}if((e=i.sections)===null||e===void 0?void 0:e.length){i.sections.forEach((i=>{s=s.concat(C(this,B,"m",t).call(this,i))}))}return s},rt=function t(i,n){if(!this.tabSelected){this.tabSelected=n[0].id||"0"}const s=n.map(((t,n)=>{const e=C(this,B,"m",lt).call(this,t);const s=i.cells.some((t=>{var i;const n=t.cell;const s=t.column;return e.includes(s.name)&&!!((i=n.data)===null||i===void 0?void 0:i.error)}));return{active:(t.id||`${n}`)===this.tabSelected,value:t.title,icon:s?"error":t.icon,id:t.id||`${n}`,danger:s}}));const o=n.map(((t,n)=>{const e=t.id||`${n}`;return C(this,B,"m",st).call(this,i,t,true,{display:this.tabSelected!==e?"none":"grid"})}));const l=".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }";if(!C(this,G,"f").map((t=>t.event)).includes("kup-tabbar-click")){const t="kup-tabbar-click";const i=t=>{this.tabSelected=t.detail.node.id};this.rootElement.addEventListener(t,i);C(this,G,"f").push({event:t,handler:i})}return e("div",{class:{"input-panel__tabs_container":true}},e("kup-tab-bar",{data:s,customStyle:l}),o)},at=function t(i,n){const s=i.cells.find((t=>t.column.name===n.id));const o=+n.colSpan>0?n.colSpan:!(+n.colSpan>0)&&!(+n.colStart>0)?1:null;const l=o?`span ${o}`:`${n.colStart}`;const r=+n.colEnd>0?`${n.colEnd}`:"";const a=+n.rowSpan>0?n.rowSpan:!(+n.rowSpan>0)&&!(+n.rowStart>0)?1:null;const u=a?`span ${a}`:`${n.rowStart}`;const c=+n.rowEnd>0?`${n.rowEnd}`:"";const h={"min-width":"0","grid-column-start":l,"grid-column-end":r,"grid-row-start":u,"grid-row-end":c};if(!s||!s.cell){return}return e("div",{style:h},C(this,B,"m",Y).call(this,s.cell,i.row,s.column))},ut=function t(i,n){const s=i.cells.find((t=>t.column.name===n.id));if(!s||!s.cell){return}let o;if(s.cell.shape==c.DATE){o=n.absoluteLength>8?n.absoluteLength:8}else{o=n.absoluteLength}const l=`${z(o)}px`;const r=`${S(1)}px`;const a=`${M(n.absoluteRow)}px`;const u=`${T(n.absoluteColumn)}px`;const h={position:"absolute",width:l,"min-width":l,"max-width":l,height:r,"min-height":r,"max-height":r,top:a,left:u,overflow:"auto"};s.cell.data=Object.assign(Object.assign({},s.cell.data),{customStyle:(s.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}"});return e("div",{style:h},C(this,B,"m",Y).call(this,s.cell,i.row,s.column))},ct=function t(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((t===null||t===void 0?void 0:t.children)&&(t===null||t===void 0?void 0:t.children.length)>0){const i={"kup-list":{showIcons:true,data:t.children.map((t=>C(this,B,"m",It).call(this,t)))}};return C(this,B,"m",Q).call(this,t,i)}else{const i=C(this,B,"m",It).call(this,t);return C(this,B,"m",q).call(this,i,t.value)}})).flat()},ht=function t(i){var n,e,s,o;if((e=(n=i.setup)===null||n===void 0?void 0:n.commands)===null||e===void 0?void 0:e.length){C(this,B,"m",ct).call(this)}const l=(s=i===null||i===void 0?void 0:i.rows[0])===null||s===void 0?void 0:s.layout;const r=((o=i===null||i===void 0?void 0:i.rows)===null||o===void 0?void 0:o.length)?i.rows.reduce(((t,n)=>{const e=i.columns.filter((t=>t.visible)).map((t=>{const i=structuredClone(n.cells[t.name]);const e=i?Object.assign(Object.assign({},i),{data:C(this,B,"m",ft).call(this,i,t,l),slotData:C(this,B,"m",vt).call(this,i,t),isEditable:true}):null;return{column:t,cell:e}}));return[...t,{cells:e,row:n}]}),[]):[];r.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=At.ketchup.data.cell.getType(t,t.shape);const e=C(this,J,"f").get(n);if(!e){return}const s=this.rootElement.shadowRoot.querySelector(`${e}[id=${i.name.replace(/\//g,"\\$1")}]`);s===null||s===void 0?void 0:s.setValue(t.value)}))));this.inputPanelCells=r},ft=function t(i,n,e){const s=Object.assign(Object.assign({},C(this,B,"m",mt).call(this,i,n,e)),{disabled:!i.editable,id:n.name});const o=At.ketchup.data.cell.getType(i,i.shape);const l=i.data||{},r=F(l,["data"]);return o!==u.MULTI_AUTOCOMPLETE&&o!==u.MULTI_COMBOBOX?C(this,B,"m",pt).call(this,s,Object.assign({},i.data)):Object.assign(Object.assign({},s),r)},pt=function t(i,n){for(const e in n){if(n[e]instanceof Object&&!Array.isArray(n[e])&&e in i){i[e]=C(this,B,"m",t).call(this,i[e],n[e])}else{i[e]=n[e]}}return i},dt=function t(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const s=(e=i.cells.find((t=>t.column.name===n)))===null||e===void 0?void 0:e.cell;let o=s===null||s===void 0?void 0:s.value;if((s===null||s===void 0?void 0:s.shape)===c.TABLE){o=JSON.stringify(C(this,B,"m",Dt).call(this,s.data.data,n))}return Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:o,obj:s===null||s===void 0?void 0:s.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},mt=function t(i,n,e){if(!i){return null}const s=i.options;let o;if(e===null||e===void 0?void 0:e.absolute){o=null}else{o=n.title}const l=i.value;const r=At.ketchup.data.cell.getType(i,i.shape);const a=new Map([[u.AUTOCOMPLETE,C(this,B,"m",yt).bind(this)],[u.BUTTON_LIST,C(this,B,"m",gt).bind(this)],[u.CHART,C(this,B,"m",kt).bind(this)],[u.CHIP,C(this,B,"m",bt).bind(this)],[u.CHECKBOX,C(this,B,"m",_t).bind(this)],[u.COLOR_PICKER,C(this,B,"m",jt).bind(this)],[u.COMBOBOX,C(this,B,"m",yt).bind(this)],[u.EDITOR,C(this,B,"m",wt).bind(this)],[u.MULTI_AUTOCOMPLETE,C(this,B,"m",bt).bind(this)],[u.MULTI_COMBOBOX,C(this,B,"m",bt).bind(this)],[u.NUMBER,C(this,B,"m",Tt).bind(this)],[u.DATE,C(this,B,"m",zt).bind(this)],[u.OBJECT,C(this,B,"m",St).bind(this)],[u.RADIO,C(this,B,"m",Ot).bind(this)],[u.STRING,C(this,B,"m",xt).bind(this)],[u.SWITCH,C(this,B,"m",$t).bind(this)],[u.TABLE,C(this,B,"m",Wt).bind(this)],[u.TIME,C(this,B,"m",Mt).bind(this)]]);const c=a.get(r);return c?c(s,o,l,i,n.name):null},vt=function t(i,n){const e=At.ketchup.data.cell.getType(i,i.shape);if(!i.editable){return null}if(e===u.CHIP){return{trailingIcon:true,label:n.title,disabled:!i.editable,id:n.name,fullWidth:false}}if(e===u.MULTI_AUTOCOMPLETE||e===u.MULTI_COMBOBOX){return Object.assign(Object.assign({},C(this,B,"m",yt).call(this,i.options,n.title,null,i,n.name)),{showDropDownIcon:true,class:"",style:{width:"100%"},disabled:!i.editable,id:n.name})}return null},bt=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){C(this,B,"m",Nt).call(this,s,o)}return d(e)},kt=function t(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},gt=function t(i,n,e,s,o){var l,r,a,u;s.data=s.data||{};s.data.onClick=()=>{C(this,B,"m",Jt).call(this,s,o)};if(((l=s.data)===null||l===void 0?void 0:l.keyShortcut)&&!((r=s.data)===null||r===void 0?void 0:r.disabled)){C(this,H,"f").push((a=s.data)===null||a===void 0?void 0:a.keyShortcut);C(this,I,"f").keysBinding.register((u=s.data)===null||u===void 0?void 0:u.keyShortcut,s.data.onClick.bind(this))}return Object.assign({label:s.value,fun:s.fun},s.data)},yt=function t(i,n,e,s,o){var l,r;const a=m(e,n,[]);if(s.fun){const t=At.ketchup.data.cell.getType(s,s.shape);const i=C(this,N,"f").get(t);if(!i){return}i.map((t=>{const i=t=>{C(this,B,"m",Pt).call(this,t.detail,s.fun,a,o,e)};this.rootElement.addEventListener(t,i);C(this,G,"f").push({event:t,handler:i})}))}else if(i){a.data["kup-list"].data=C(this,B,"m",Ct).call(this,i,e)}if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){C(this,B,"m",Nt).call(this,s,o)}return a},_t=function t(i,n,e,s,o){var l,r;let a=g(e,n);if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return Object.assign(Object.assign({},a),{onBlur:()=>{C(this,B,"m",Rt).call(this,s,o)}})}return a},jt=function t(i,n,e){return{data:{"kup-text-field":{label:n}}}},wt=function t(i,n,e){return{initialValue:e}},xt=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{label:n,onBlur:()=>{C(this,B,"m",Rt).call(this,s,o)}}}return{label:n}},Ot=function t(i,n,e,s,o){var l,r;let a=v(e,i);if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return Object.assign(Object.assign({},a),{onBlur:()=>{C(this,B,"m",Rt).call(this,s,o)}})}return a},$t=function t(i,n,e){return b(e,n)},zt=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){C(this,B,"m",Nt).call(this,s,o)}return{data:{"kup-text-field":{label:n}},initialValue:e}},St=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{initialValue:e||"",label:n||" ",value:e||"",onBlur:()=>{C(this,B,"m",Rt).call(this,s,o)}}}return{initialValue:e||"",label:n||" ",value:e||""}},Mt=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){C(this,B,"m",Nt).call(this,s,o)}return{data:{"kup-text-field":{label:n}}}},Tt=function t(i,n,e,s,o){var l,r;if(((l=s.inputSettings)===null||l===void 0?void 0:l.checkObject)||((r=s.inputSettings)===null||r===void 0?void 0:r.checkValueOnExit)||s.mandatory){return{label:n,onBlur:()=>{C(this,B,"m",Rt).call(this,s,o)}}}return{label:n}},Wt=function t(i,n,e,s,o){try{let t=JSON.parse(s.value);if(!t){C(this,I,"f").debug.logMessage(this,`Empty value for ${o} cell.`,k.WARNING);return null}if(t.type!=="SmeupDataTable"){C(this,I,"f").debug.logMessage(this,`Wrong data table type for ${o} cell. Type \`SmeupDataTable\` in value expected`,k.ERROR);return null}return{data:{columns:t.columns.map((i=>Object.assign(Object.assign({},i),{obj:t.rows[0].cells[i.name].obj}))),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const s=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},C(this,B,"m",mt).call(this,i.cells[e],s)),{disabled:i.cells[e].editable===false,id:s.id})})})}),{})})))}}}catch(t){C(this,I,"f").debug.logMessage(this,`Invalid value for ${o} cell. Type \`SmeupDataTable\` expected`,k.ERROR);return null}},Dt=function t(i,n){const e=Object.assign(Object.assign({},i),{rows:i.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))});const s=i.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!s.length){return e}try{const t=JSON.parse(C(this,R,"f").rows[0].cells[n].value);e.rows=i.rows.map(((i,n)=>s.reduce(((e,s)=>{const o=t.rows[n].cells[s]&&i.cells[s].value!==t.rows[n].cells[s].value;if(o){return Object.assign(Object.assign({},t.rows[n]),{cells:Object.assign(Object.assign({},e.cells),{[s]:Object.assign(Object.assign({},t.rows[n].cells[s]),{value:i.cells[s].value})})})}return Object.assign(Object.assign({},t.rows[n]),{cells:e.cells})}),Object.assign(Object.assign({},t.rows[n]),{cells:{}}))));return e}catch(t){return e}},Ct=function t(i,n){const e=C(this,P,"f").get(i.type);if(e){return e(i,n)}else{return i.map((t=>({value:t.label,id:t.id,selected:n===t.id})))}},Et=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:((e=i.children)===null||e===void 0?void 0:e.length)?C(this,B,"m",t).call(this,i,n):[]}}))},Ft=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:((e=i.children)===null||e===void 0?void 0:e.length)?C(this,B,"m",t).call(this,i,n):[]}}))},Bt=function t(i,n){return i.rows.map((t=>{var i;const e=t.fields||t.cells;const[s,o]=Object.keys(e);return{id:e[s].value,value:((i=e[o])===null||i===void 0?void 0:i.value)||e[s].value,selected:n===e[s].value}}))},It=function t(i){const n=Object.assign(Object.assign({},i),{data:C(this,B,"m",gt).call(this,null,null,i.value,i,i.obj.k),id:i.obj.k});return n},Pt=function t(i,n,e,s,o){if(i.id!==s||i.open===false){return}this.optionsHandler(n,i.inputValue,C(this,B,"m",dt).call(this),i.id).then((t=>{var n;e.data["kup-list"].data=(n=C(this,B,"m",Ct).call(this,t,o))!==null&&n!==void 0?n:[];i.comp.refresh()}))},Rt=async function t(i,n){var e,s;const o=C(this,B,"m",K).call(this,n);if(i.mandatory){C(this,B,"m",Vt).call(this,n,o.value?null:C(this,I,"f").language.translate(p.REQUIRED_VALUE));if(!o.value){return}}else{C(this,B,"m",Vt).call(this,n,null)}if(((e=i.inputSettings)===null||e===void 0?void 0:e.checkObject)&&o.value){const{valid:t}=await this.checkValidObjCallback({obj:i.obj,currentState:C(this,B,"m",dt).call(this),fun:i.fun});if(t){C(this,B,"m",Vt).call(this,n,null)}else{C(this,B,"m",Vt).call(this,n,C(this,I,"f").language.translate(p.INVALID_VALUE));return}}if(((s=i.inputSettings)===null||s===void 0?void 0:s.checkValueOnExit)&&C(this,B,"m",Gt).call(this)){this.checkValidValueCallback({before:Object.assign({},C(this,R,"f")),after:C(this,B,"m",dt).call(this)})}},Nt=function t(i,n){const e=C(this,V,"f").get(i.shape);if(!e){return}const s=async t=>{var e,s;const o=C(this,B,"m",K).call(this,n);if(t.detail.id!==n){return}if(i.mandatory){C(this,B,"m",Vt).call(this,n,o.value?null:C(this,I,"f").language.translate(p.REQUIRED_VALUE));if(!t.detail.value){return}}else{C(this,B,"m",Vt).call(this,n,null)}if(((e=i.inputSettings)===null||e===void 0?void 0:e.checkObject)&&t.detail.value){const{valid:t}=await this.checkValidObjCallback({obj:i.obj,currentState:C(this,B,"m",dt).call(this),fun:i.fun});C(this,B,"m",Vt).call(this,n,t?null:C(this,I,"f").language.translate(p.INVALID_VALUE));if(!t){return}}if(((s=i.inputSettings)===null||s===void 0?void 0:s.checkValueOnExit)&&C(this,B,"m",Gt).call(this)){this.checkValidValueCallback({before:Object.assign({},C(this,R,"f")),after:C(this,B,"m",dt).call(this)})}};this.rootElement.addEventListener(e,s);C(this,G,"f").push({event:e,handler:s})},Vt=function t(i,n){this.inputPanelCells=this.inputPanelCells.map((t=>Object.assign(Object.assign({},t),{cells:t.cells.map((({cell:t,column:e})=>{const s=e.name===i?Object.assign(Object.assign({},t.data),{error:n}):t.data;return{column:e,cell:Object.assign(Object.assign({},t),{data:s})}}))})))},Gt=function t(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Jt=function t(i,n){i.fun?this.customButtonClickHandler({fun:i.fun,cellId:n,currentState:C(this,B,"m",dt).call(this)}):this.submitCb({value:{before:Object.assign({},C(this,R,"f")),after:C(this,B,"m",dt).call(this)},cell:n})};Lt.style=D;export{Lt as kup_input_panel};
|
|
2
|
+
//# sourceMappingURL=p-fc9c65a4.entry.js.map
|