@sme.up/ketchup 10.4.7 → 10.4.8
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-b6499daf.js → f-cell-452d8a39.js} +6 -6
- package/dist/cjs/{f-chip-ad2e88cd.js → f-chip-973b22de.js} +1 -1
- package/dist/cjs/{f-object-field-a2060085.js → f-object-field-43d986c5.js} +2 -2
- package/dist/cjs/{f-paginator-utils-ae22f3de.js → f-paginator-utils-bc66522f.js} +1 -1
- package/dist/cjs/{f-text-field-582fa181.js → f-text-field-cc70132b.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_30.cjs.entry.js +69 -58
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-a1c73939.js → kup-data-table-helper-c04ab7a9.js} +11 -12
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +22 -13
- 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-input-panel.cjs.entry.js +5 -5
- 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-5faed2fc.js → kup-manager-2e0a7a26.js} +16 -11
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-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-data-table/kup-data-table.js +62 -51
- package/dist/collection/components/kup-echart/kup-echart.js +21 -12
- package/dist/collection/f-components/f-cell/f-cell.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -1
- package/dist/collection/managers/kup-data/kup-data.js +15 -10
- package/dist/collection/utils/filters/filters-column-menu.js +10 -11
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +3 -3
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-a42dc353.js → p-64e94968.js} +16 -11
- package/dist/components/{p-99de2f5f.js → p-69425921.js} +2 -2
- package/dist/components/{p-77f72bf7.js → p-6d5f0117.js} +23 -14
- package/dist/components/{p-ba6132b3.js → p-8359b10a.js} +76 -66
- package/dist/components/{p-6c44f471.js → p-bddae662.js} +2 -2
- package/dist/components/{p-cd1fbb3a.js → p-fa3c07b8.js} +2 -2
- package/dist/esm/{f-cell-0a7e6c09.js → f-cell-9353dd77.js} +6 -6
- package/dist/esm/{f-chip-a2d07acb.js → f-chip-f9277fd9.js} +1 -1
- package/dist/esm/{f-object-field-bc0b6f80.js → f-object-field-e797f627.js} +2 -2
- package/dist/esm/{f-paginator-utils-8c3d7b88.js → f-paginator-utils-29fcddb4.js} +1 -1
- package/dist/esm/{f-text-field-0f550594.js → f-text-field-f2cd4df1.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_30.entry.js +69 -58
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-3f3bb266.js → kup-data-table-helper-4c4da1ec.js} +11 -12
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +22 -13
- 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-input-panel.entry.js +5 -5
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-232be463.js → kup-manager-75b947f4.js} +16 -11
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-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-40d9b650.entry.js → p-04d4d4bb.entry.js} +1 -1
- package/dist/ketchup/{p-96bef43d.js → p-0829e7c5.js} +1 -1
- package/dist/ketchup/{p-860e64d6.entry.js → p-0a962ac8.entry.js} +1 -1
- package/dist/ketchup/{p-a41766d3.entry.js → p-174fe9ca.entry.js} +1 -1
- package/dist/ketchup/{p-a84998d8.entry.js → p-1fac1a59.entry.js} +1 -1
- package/dist/ketchup/p-3fa60abf.entry.js +1 -0
- package/dist/ketchup/{p-6622b9dd.js → p-459f5369.js} +1 -1
- package/dist/ketchup/{p-498e38ec.entry.js → p-613028b3.entry.js} +1 -1
- package/dist/ketchup/{p-8ab45e3d.entry.js → p-679ce9d9.entry.js} +1 -1
- package/dist/ketchup/{p-2ea8982a.entry.js → p-71705280.entry.js} +1 -1
- package/dist/ketchup/p-75a8afbe.entry.js +8 -0
- package/dist/ketchup/{p-8ac64a64.entry.js → p-76679ede.entry.js} +1 -1
- package/dist/ketchup/{p-106ef861.entry.js → p-7c3619bb.entry.js} +1 -1
- package/dist/ketchup/{p-88e822d6.entry.js → p-84ddf341.entry.js} +1 -1
- package/dist/ketchup/{p-bc2604ea.entry.js → p-856f4922.entry.js} +1 -1
- package/dist/ketchup/{p-9510d04c.entry.js → p-950f09bd.entry.js} +1 -1
- package/dist/ketchup/{p-5b05f037.entry.js → p-96ae851c.entry.js} +1 -1
- package/dist/ketchup/{p-855d7a7c.entry.js → p-9957f141.entry.js} +1 -1
- package/dist/ketchup/{p-e049f7d8.entry.js → p-9bf6f42d.entry.js} +1 -1
- package/dist/ketchup/{p-7d05209d.entry.js → p-9ee7e62f.entry.js} +1 -1
- package/dist/ketchup/{p-d53275b8.entry.js → p-ac579cc8.entry.js} +1 -1
- package/dist/ketchup/{p-5bb7d7b3.entry.js → p-b52908a9.entry.js} +1 -1
- package/dist/ketchup/{p-e032f052.entry.js → p-b6c1dc95.entry.js} +1 -1
- package/dist/ketchup/{p-c6acc505.entry.js → p-b82e6d26.entry.js} +1 -1
- package/dist/ketchup/{p-5f41ae01.entry.js → p-b894c2a3.entry.js} +1 -1
- package/dist/ketchup/{p-ce92a1d6.entry.js → p-bc2b81c7.entry.js} +2 -2
- package/dist/ketchup/{p-4e86911e.entry.js → p-c3efe25a.entry.js} +1 -1
- package/dist/ketchup/{p-0c4fdac4.js → p-c49cb8be.js} +1 -1
- package/dist/ketchup/{p-6f00f1a3.js → p-d230c26d.js} +1 -1
- package/dist/ketchup/p-d4dac70d.js +1 -0
- package/dist/ketchup/{p-6b2e3868.entry.js → p-db38289c.entry.js} +1 -1
- package/dist/ketchup/{p-ca31b7ee.entry.js → p-e703e6c1.entry.js} +1 -1
- package/dist/ketchup/{p-e155cbac.js → p-e7fbf76f.js} +1 -1
- package/dist/ketchup/{p-cc193dee.entry.js → p-f51a8f12.entry.js} +1 -1
- package/dist/ketchup/p-f81ec6f8.js +1 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +13 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +5 -5
- package/package.json +1 -1
- package/dist/ketchup/p-1d602e4b.entry.js +0 -8
- package/dist/ketchup/p-436ef56e.js +0 -1
- package/dist/ketchup/p-b7abe6a2.entry.js +0 -1
- package/dist/ketchup/p-c284a18d.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as o,H as s,d as a}from"./p-710d0a7d.js";import{k as n,e as h,g as r,s as p}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as o,H as s,d as a}from"./p-710d0a7d.js";import{k as n,e as h,g as r,s as p}from"./p-459f5369.js";import{a as f,F as l}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import{F as u}from"./p-cce08de3.js";import"./p-adadf8b5.js";var d;!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"}(d||(d={}));var y,g,m=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e},k=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupIconClick=i(this,"kup-typography-iconclick",6),this.kupClick=i(this,"kup-typography-click",6),this.kupInfoIconClick=i(this,"kup-typography-infoiconclick",6),this.kupItemClick=i(this,"kup-typography-itemclick",6),this.toolbarState=[],this.infoState=[],this.kupManager=n(),y.set(this,null),g.set(this,null),this.customStyle="",this.infoIcon=!1,this.toolbar=!0,this.type=f.BODY_COMPACT,this.value=null,this.toolbarCallback=void 0,this.infoCallBack=void 0}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInfoIconClick(t){t?(m(this,g,t,"f"),this.createDropDownInfoList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupIconClick(t){t?(m(this,g,t,"f"),this.createDropDownToolbarList()):this.kupManager.debug.logMessage(this,"onKupIconClick: Element is null")}onKupToolbarItemClick(t){this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value,node:t.detail.selected})}closeRowToolbarList(){this.toolbarList&&(this.kupManager.dynamicPosition.stop(this.toolbarList),this.kupManager.removeClickCallback(k(this,y,"f")),this.toolbarList.remove(),this.kupManager.dynamicPosition.unregister([this.toolbarList]),this.toolbarList=null)}createDropDownToolbarList(){if(!k(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.toolbarList&&this.closeRowToolbarList(),0===this.toolbarState.length)return void this.kupManager.debug.logMessage(this,"No toolbar state available.");const t=document.createElement("kup-toolbar");t.data=this.toolbarState,t.addEventListener("kup-toolbar-click",(t=>{this.onKupToolbarItemClick(t),setTimeout((()=>{this.closeRowToolbarList()}),0)})),this.toolbarList=t,m(this,y,{cb:()=>{this.closeRowToolbarList()},el:this.toolbarList},"f"),this.kupManager.addClickCallback(k(this,y,"f"),!0),this.rootElement.shadowRoot.appendChild(this.toolbarList),requestAnimationFrame((()=>{k(this,g,"f")?(this.kupManager.dynamicPosition.register(this.toolbarList,k(this,g,"f"),0,h.AUTO,!0),this.kupManager.dynamicPosition.start(this.toolbarList)):this.kupManager.debug.logMessage(this,"DropDown anchor is still null after delay!")}))}createDropDownInfoList(){if(!k(this,g,"f"))return void this.kupManager.debug.logMessage(this,"createDropDownToolbarList: Anchor is null!");if(this.infoList&&this.closeInfoDataList(),0===this.infoState.length)return void this.kupManager.debug.logMessage(this,"No infoicon available.");const t=document.createElement("kup-list");t.data=this.infoState,this.infoList=t,m(this,y,{cb:()=>{this.closeInfoDataList()},el:this.infoList},"f"),this.kupManager.addClickCallback(k(this,y,"f"),!0),this.rootElement.shadowRoot.appendChild(this.infoList),requestAnimationFrame((()=>{this.kupManager.dynamicPosition.register(this.infoList,k(this,g,"f"),0,h.AUTO,!0),this.kupManager.dynamicPosition.start(this.infoList)}))}closeInfoDataList(){this.infoList&&(this.kupManager.dynamicPosition.stop(this.infoList),this.kupManager.removeClickCallback(k(this,y,"f")),this.infoList.remove(),this.kupManager.dynamicPosition.unregister([this.infoList]),this.infoList=null)}async getProps(t){return r(this,d,t)}async refresh(){e(this)}async setProps(t){p(this,d,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t={toolbar:this.toolbar,value:this.value,type:this.type},i={"kup-typography--wrap":!!t.toolbar};return o(s,{key:"4d9b49a70410c35af3d8fa1c5868a6cfb1ee5420"},o("style",{key:"d614ca7ac690e2b84fecf531c0a35ef450fe97b0"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"1518f326fa6e41f67b5208ade340e6e949f168bf",id:c,class:i,onClick:()=>this.onKupClick},o(l,Object.assign({key:"d7d9b24f7707041edd45e1d526d3e73d754137cd"},t)),this.infoIcon&&o(u,Object.assign({key:"1edfaa26af5dd36705f7abb793835db19e73abae"},{color:"var(--kup-gray-color-70)",resource:"info_outline",sizeX:"16px",sizeY:"16px",wrapperClass:"image__iconToolbar iconInfo"},{onClick:async t=>{t.stopPropagation();const i=t.currentTarget,e=await this.infoCallBack();this.infoState=e,this.infoState.length>0?this.onKupInfoIconClick(i):this.kupManager.debug.logMessage(this,"Toolbar data is empty, not opening dropdown.")}})),this.toolbar&&o(u,Object.assign({key:"9b4e57e71be401942c814ddded5208c6e68d9db3"},{color:"var(--kup-gray-color-70)",resource:"more_vert",sizeX:"16px",sizeY:"16px",wrapperClass:"image__iconToolbar iconToolbar"},{onClick:async t=>{t.stopPropagation();const i=t.currentTarget,e=await this.toolbarCallback();this.toolbarState=e,this.toolbarState.length>0?this.onKupIconClick(i):this.kupManager.debug.logMessage(this,"Toolbar data is empty, not opening dropdown.")}}))))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.toolbarList&&this.kupManager.dynamicPosition.unregister([this.toolbarList]),this.infoList&&this.kupManager.dynamicPosition.unregister([this.infoList])}static get assetsDirs(){return["assets/fonts"]}get rootElement(){return a(this)}};y=new WeakMap,g=new WeakMap,w.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.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}";export{w as kup_typography}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o}from"./p-710d0a7d.js";import{a as e,k as t,e as n}from"./p-
|
|
1
|
+
import{h as o}from"./p-710d0a7d.js";import{a as e,k as t,e as n}from"./p-459f5369.js";import{F as c}from"./p-14c6efce.js";import{a as i}from"./p-e3062c19.js";import{F as l}from"./p-e7fbf76f.js";const s=new WeakMap,r=t=>{var n;let s;return o("div",{class:`f-object-field ${t.wrapperClass?t.wrapperClass:""}`,ref:async o=>{o&&(t.root=o,p(t))}},o("div",{class:"fields-wrapper"},o(l,Object.assign({icon:"search",trailingIcon:!0,disabled:!1},null===(n=t.cell)||void 0===n?void 0:n.data,{attachHelperSection:o=>(s=o,!1),value:t.inputValue,onChange:t.onChange,onIconClick:f.icon.bind(t),onInput:f.input.bind(t),onKeyDown:f.keydown.bind(t)})),o(c,{icon:"menu",onClick:f.button.bind(t),sizing:e.SMALL,styling:i.FLAT,wrapperClass:"obj-field-extra-btn"})),s,o("kup-toolbar",{"onKup-toolbar-click":f.toolbar.bind(t)}))};function a(o){const{cell:e}=o,n=s.get(e),{clickCb:c}=n,{toolbar:i}=u(n),l=t();l.dynamicPosition.stop(i),l.removeClickCallback(c),i.style.display="none",n.isListOpened=!1}const u=o=>{const{children:e,clickCb:t,root:n}=o;return Object.keys(o.children).length||(e.button=n.querySelector(".f-button"),e.textfield=n.querySelector(".f-text-field"),e.toolbar=n.querySelector("kup-toolbar"),t.el=e.toolbar),e},p=o=>{const{cell:e,root:t}=o,n=s.get(e);s.set(e,n?Object.assign(Object.assign({},n),{root:t,children:u(n)}):{children:{},clickCb:{cb:a.bind(a,o)},inputValue:o.inputValue,isListOpened:!1,root:t})},b=(o,e,t)=>{const{cell:n,column:c,row:i,root:l}=o,{children:r,inputValue:a}=s.get(n),u=new CustomEvent(e,{bubbles:!0,cancelable:!0,composed:!0,detail:{cell:n,children:r,column:c,inputValue:a,originalEvent:t,row:i}});l.dispatchEvent(u)},f={button:function(o){(function(o){const{cell:e}=o,c=s.get(e),{isListOpened:i}=c;i?a(o):function(o){const{cell:e}=o,c=s.get(e),{isListOpened:i,clickCb:l}=c,{button:r,toolbar:a}=u(c);if(i)return;const p=t();p.dynamicPosition.isRegistered(a)?p.dynamicPosition.changeAnchor(a,r):p.dynamicPosition.register(a,r,0,n.AUTO,!1),p.dynamicPosition.start(a),p.addClickCallback(l,!0),a.style.display="block",c.isListOpened=!0}(o)})(this),b(this,"kup-objectfield-opensearchmenu",o)},icon:function(o){b(this,"kup-objectfield-searchpayload",o)},input:function(o){const{cell:e}=this;s.get(e).inputValue=o.target.value},keydown:function(o){"F4"===o.code&&(o.preventDefault(),o.stopPropagation(),b(this,"kup-objectfield-searchpayload",o))},toolbar:function(o){a(this),b(this,"kup-objectfield-selectedmenuitem",o)}};export{r as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./p-710d0a7d.js";import{I as t,aA as a,t as l,a as n,b as r}from"./p-
|
|
1
|
+
import{h as e}from"./p-710d0a7d.js";import{I as t,aA as a,t as l,a as n,b as r}from"./p-459f5369.js";import{F as s}from"./p-14c6efce.js";import{a as o}from"./p-e3062c19.js";var i;!function(e){e.SIMPLE="simple",e.FULL="full"}(i||(i={}));const c=document.documentElement,u=u=>{u.perPage||(u.perPage=1e3),u.perPage>u.max&&(u.perPage=u.max);const m=Math.ceil(u.max/u.perPage),f=function(e,t){const a=[];for(let l=1;l<=t;l++){const t=l==e.currentPage;a.push({id:l.toString(),selected:t,value:l.toString()})}return a}(u,m),b=function(e){const t=[],a=Math.min(e.max,e.maxRowsPerPage);let l=e.perPage;if(0===l)return t;for(;l<a;){const a=l==e.perPage;t.push({id:l.toString(),selected:a,value:l.toString()}),l*=2}const n=a==e.perPage;return t.push({id:a.toString(),selected:n,value:a.toString()}),t}(u),g={"kup-list":{data:f,DescrMode:t.CODE},"kup-text-field":{label:c.ketchup.language.translate(a.PAGE),helper:c.ketchup.language.translate(a.TOTAL)+`: ${m}`,helperWhenFocused:!0,inputType:"number",max:m,min:1,size:5}},h={"kup-list":{data:b,DescrMode:t.CODE},"kup-text-field":{label:c.ketchup.language.translate(l.ROWS)+" / "+c.ketchup.language.translate(a.PAGE),helper:c.ketchup.language.translate(l.TOTAL)+`: ${u.max}`,helperWhenFocused:!0,inputType:"number",max:u.max,min:1,size:5}};return e("div",Object.assign({class:`f-paginator ${u.mode?u.mode:""} ${u.wrapperClass?u.wrapperClass:""}`},u.dataSet,{id:u.id,title:u.title}),u.onLoadMore?e(s,{icon:"plus",onClick:u.onLoadMore,label:c.ketchup.language.translate(r.LOAD_MORE),sizing:n.SMALL,styling:o.FLAT,wrapperClass:"load-more-button kup-neutral"}):null,e("kup-combobox",{class:"rows-selector",data:h,DescrMode:t.CODE,initialValue:u.perPage.toString(),initialValueDecode:u.perPage.toString(),"onkup-combobox-change":u.onRowsChange}),e("div",{class:"page-wrapper"},e("div",{class:"page-selector-wrapper"},e("kup-combobox",{class:"page-selector",data:g,DescrMode:t.CODE,initialValue:u.currentPage.toString(),initialValueDecode:u.currentPage.toString(),"onkup-combobox-change":u.onPageChange}),u.showMaxPages?e("div",{class:"max-page-wrapper"},e("label",{htmlFor:"page-selector"},"/ "+m)):null),e("div",{class:"arrow-wrapper"},u.mode!==i.SIMPLE?e(s,{icon:"chevron_left",disabled:d(u),onClick:u.onPrevPage,sizing:n.SMALL,styling:o.FLAT,wrapperClass:"kup-neutral prev-page"}):null,u.mode!==i.SIMPLE?e(s,{icon:"chevron_right",disabled:p(u),onClick:u.onNextPage,sizing:n.SMALL,styling:o.FLAT,wrapperClass:"kup-neutral next-page"}):null)))};function p(e){return e.currentPage*e.perPage>=e.max}function d(e){return 1==e.currentPage}const m=document.documentElement;function f(e,t,a){if(m.ketchup.math.isNumber(e)){const l=Math.ceil(t/a);let n=e;return n>l&&(n=l),n<1&&(n=1),n}return null}function b(e,t){if(m.ketchup.math.isNumber(e)){let a=e;return a>t&&(a=t),a<1&&(a=1),a}return null}export{u as F,f as p,b as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,H as t,D as n,aj as l,x as o,z as r,ak as i,al as s,O as a,Q as u,F as c,am as f,an as h,ao as d,ap as b,aq as m,a9 as p}from"./p-459f5369.js";import{K as v}from"./p-adadf8b5.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,n){let l="";if(null==e)return l;let o=e[t];return null==o||(l=n?o.textFieldTmp:o.textField),l}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,n){if(!t)return!1;let l=this._getTextFilterValue(e,t.name,n);if(null!=l&&""!=l.trim())return!0;let o=this.getCheckBoxFilterValues(e,t.name);return!(null==o||o.length<1)}getCheckBoxFilterValues(e={},t){let n=[];if(null==e)return n;let l=e[t];return null==l||null==l.checkBoxes||(n=l.checkBoxes),n}addCheckboxFilter(t={},n,l){if(null==t)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},t[n]);null==o.checkBoxes&&(o.checkBoxes=[]),null==l||null==l.value?o.checkBoxes=[]:e.valuesArrayContainsValue(o.checkBoxes,l.value)||(o.checkBoxes=[...o.checkBoxes,l]),t[n]=o}removeCheckboxFilter(e={},t,n){var l;if(!e||null==n||!e[t])return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);o.checkBoxes=null!==(l=o.checkBoxes)&&void 0!==l?l:[],o.checkBoxes=o.checkBoxes.filter((e=>e.value!==n)),0===o.checkBoxes.length?delete e[t]:e[t]=o}isColumnNumeric(e){return this.isObjNumeric(e.obj)}setTextFieldFilterValue(e={},t,n){this._setTextFieldFilterValue(e,t,n,!0)}_setTextFieldFilterValue(e={},t,n,l){if(null==e)return;let o=Object.assign({textField:"",textFieldTmp:"",checkBoxes:[]},e[t]);l?o.textFieldTmp=null!=n?n.trim():n:o.textField=null!=n?n.trim():n,e[t]=o}saveTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0)}getFilterValueForTooltip(e={},l){let o=this.getTextFilterValue(e,l.name),r=this.getCheckBoxFilterValues(e,l.name),i="",s=t(o,l.obj,l.decimals);""!=o&&(i=" AND "),i="";let a="";return r.forEach((e=>{a+=i+n(e,l),i=" OR "})),""!=a&&(a="("+a+")",""!=s&&(a=" AND "+a)),a=s+a,a}removeFilter(e={},t){delete e[t]}}var F;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.removableColumns="Sets the possibility to remove the selected column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(F||(F={}));const x="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const j=document.documentElement,k=j.ketchup?j.ketchup.objects:new r,O=j.ketchup?j.ketchup.data:new i;class y extends e{isFilterCompliantForCell(e,t,n){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,n)}isFilterCompliantForCellObj(e,t,n){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,n)}isRowCompliant(e,t={},n="",l=!1,o=[],r,i){return this.areCellsCompliant(e.cells,t,n,l,o,r,i)}areCellsCompliant(e,t={},n="",r=!1,i=[],s,a){if(r){let t=!0;if(i&&null!=i&&i.length>0){t=!1;let o=this.filterIsNegative(n);for(let s=0;s<i.length;s++){if(!1===i[s].visible&&!a||(null==a?void 0:a.length)>0&&!a.includes(i[s].name))continue;const u=e[i[s].name];if(null==u)continue;t=this.isFilterCompliantForValue(u.value,n,r);let c=l(i[s],u);if(c!=u.value&&(t=t||this.isFilterCompliantForValue(c,n,r)),1==t&&!o)break;if(0==t&&o)break}}if(!t)return!1}return null==s&&(s=new w),!this.hasFilters(t,i,s)||Object.keys(t).every((n=>{const l=e[n],r=o(i,n);if(!l)return!1;let a=s.getTextFilterValue(t,n),u=s.getCheckBoxFilterValues(t,n);const c=this.filterIsNegative(a);let f=""!==a&&this.isFilterCompliantForCell(l,a,!0)||u.some((e=>this.isFilterCompliantForCell(l,e.value)))||u.some((e=>this.isFilterCompliantForCell(l,e.displayedValue)))||!s.hasFiltersForColumn(t,r),h=c;return k.isNumber(l.obj)||k.isDate(l.obj)||k.isTime(l.obj)||k.isTimestamp(l.obj)||(h=""!==a&&this.isFilterCompliantForCellObj(l,a,!0)||u.some((e=>this.isFilterCompliantForCellObj(l,e.value)))||!s.hasFiltersForColumn(t,r)),c?f&&h:f||h}))}hasFilters(e={},t,n){if(null==e)return!1;let l=Object.keys(e);if(null==l||l.length<1)return!1;null==n&&(n=new w);for(let r=0;r<l.length;r++){let i=l[r],s=null;if(s=i===x?{name:x,title:""}:o(t,i),n.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},n="",l=[],o,r){if(!e||null==e)return[];let i=[];const s=!(!n||!l);if(this.hasFilters(t,l,o)||s)for(let a=0;a<e.length;a++){let u=e[a];(u.id&&u.id.indexOf("insert_")>-1||this.isRowCompliant(u,t,n,s,l,o,r))&&(i[i.length]=u)}else i=[...e];return i}getColumnValues(n,l,o,r){let i=new Array;null==r&&(r=new w);let s=r.getTextFilterValueTmp(n.filters,l.name),a=r.getCheckBoxFilterValues(n.filters,l.name);if(null!=l.valuesForFilter&&l.valuesForFilter.length>0)return l.valuesForFilter.forEach((n=>{let o=n;(e.valuesArrayContainsValue(a,o)||""==s||r.isFilterCompliantForSimpleValue(o,l.obj,s))&&i.push({value:o,displayedValue:t(o,l.obj,l.decimals)})})),i;let u=Object.assign({},n.filters);u[l.name]={textField:s,textFieldTmp:s,checkBoxes:[]};let c=this.filterRows(n.getRows(),u,o,n.getVisibleColumns(),r);for(let e=0;e<a.length;e++)i.push(a[e]);return O.cell.getUnivocalValue({rows:c},l,!0)}}const T=document.documentElement;function C(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const n=e[0].group.column;let l=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let n of t)if(n.column===e)return n;return null}(n,t);return l||(l={column:n,sortMode:p.A}),e.sort(((e,t)=>s({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},l.sortMode))),e.forEach((e=>{e.group.children=C(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const n=t.length>1;return e.slice(0).sort(((e,l)=>{if(n){for(let n=0;n<t.length;n++){const o=V(e,l,t[n]);if(0!==o)return o}return 0}return V(e,l,t[0])}))}function V(e,t,n){const l=e.cells[n.column],o=t.cells[n.column];return l||o?l?o?s(l,o,n.sortMode):-1:1:0}function M(e=[],t={},n="",l=[],o,r,i){return null==r&&(r=new y),r.filterRows(e,t,n,l,o,i)}function N(e=[],t=[],n=[],r={}){if(!t)return[];if(!n||0===n.length||!e||0===e.length)return t;const i={},s=n.filter((({column:t})=>{for(let{name:n,title:l}of e)if(n===t)return i[n]=l,!0;return!1}));if(0===s.length)return t;const u=[];let c={};return t.forEach((t=>{const n=s[0].column,f=t.cells[n];if(f){const h=o(e,n),d=l(h,f),b=f.value;let m=null;for(let e of u)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:n,columnLabel:i[n],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},u.push(m));for(let n=1;n<s.length;n++){const r=s[n],a=t.cells[r.column];if(a){const t=o(e,r.column),n=l(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===n){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:r.column,columnLabel:i[r.column],children:[],expanded:!1,label:n,totals:{},obj:a.obj}},L(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,n,l){if(!e||!t)return;const o=Object.keys(t);0!==o.length&&o.forEach((o=>{const r=n.cells[o];if(r){const n=T.ketchup.objects.isNumber(r.obj),i=t[o];switch(i){case a.COUNT:let t=e.group.totals[o]||0;e.group.totals[o]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[o]||0;s.group.totals[o]=++e,s=s.group.parent}break;case a.DISTINCT:let u;if(u=n?T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value)):r.value,l[e.group.id]){let t=l[e.group.id][o];t?t.push(u):(l[e.group.id][o]=[],l[e.group.id][o].push(u))}else l[e.group.id]={},l[e.group.id][o]=[],l[e.group.id][o].push(u);let c=e.group.parent;for(;null!=c;){if(l[c.group.id]){let e=l[c.group.id][o];e?e.push(u):(l[c.group.id][o]=[],l[c.group.id][o].push(u))}else l[c.group.id]={},l[c.group.id][o]=[],l[c.group.id][o].push(u);c=c.group.parent}break;case a.SUM:case a.AVERAGE:if(n&&r.value){const t=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t+(e.group.totals[o]||0);let n=e.group.parent;for(;null!=n;){const e=T.ketchup.math.numberify(n.group.totals[o]||0);n.group.totals[o]=t+e,n=n.group.parent}}break;case a.MIN:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.min(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.min(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.min(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;case a.MAX:if(n&&r.value){const t=e.group.totals[o],n=T.ketchup.math.numberify(T.ketchup.math.numberifySafe(r.value));e.group.totals[o]=t?Math.max(t,n):n;let l=e.group.parent;for(;null!=l;){const e=l.group.totals[o];l.group.totals[o]=e?Math.max(e,n):n,l=l.group.parent}}else if(r.value&&T.ketchup.objects.isDate(r.obj)&&T.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[o];if(t){let n=[];n.push(u),n.push(T.ketchup.dates.toDayjs(t)),e.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE)}else e.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);let n=e.group.parent;for(;null!=n;){const e=n.group.totals[o];if(e){let t=[];t.push(u),t.push(T.ketchup.dates.toDayjs(e)),n.group.totals[o]=T.ketchup.dates.format(T.ketchup.dates.max(t),v.ISO_DATE)}else n.group.totals[o]=T.ketchup.dates.format(u,v.ISO_DATE);n=n.group.parent}}break;default:0!=i.indexOf(a.MATH)&&console.warn(`invalid total mode: ${i}`)}}}))}(m,r,t,c)}})),function(e,t,n){if(!e||!t)return;const l=Object.keys(t);if(0===e.length||!e[0].group||0===l.length)return;let o=l.filter((e=>a.DISTINCT===t[e]));o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>B(e,o,n)))}(u,r,c),W(u,a.AVERAGE,r),W(u,a.MATH,r),u}function W(e,t,n){if(!e||!n)return;const l=Object.keys(n);if(0===e.length||!e[0].group||0===l.length)return;let o;t==a.AVERAGE&&(o=l.filter((e=>a.AVERAGE===n[e]))),t==a.MATH&&(o=l.filter((e=>0==n[e].indexOf(a.MATH)))),o.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>D(e,t,o,n)))}function B(e,t,n){const l=e.group.children;0!==l.length&&(l[0].group&&l.forEach((e=>{B(e,t,n)})),t.forEach((t=>{e.group.totals[t]=new Set(n[e.group.id][t]).size})))}function D(e,t,n,l){const o=e.group.children;if(0===o.length)return 0;let r=0;return o[0].group?o.forEach((e=>{r+=D(e,t,n,l)})):r=o.length,n.forEach((n=>{if(t==a.AVERAGE&&(e.group.totals[n]=e.group.totals[n]/r),t==a.MATH){let t=l[n].substring(a.MATH.length);e.group.totals[n]=T.ketchup.math.formulas.custom(t,e.group.totals)}})),r}function E(e,t){if(t){const n=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const n=t.cells[e.name];n&&e.obj&&!n.obj&&(n.obj={t:e.obj.t,p:e.obj.p,k:n.value})}}))})),n}}function A(e,t,n){if(T.ketchup.objects.isEmptyJsObject(n)||T.ketchup.objects.isEmptyJsObject(e))return{};const l={},o=[],r=t.reduce(((t,r)=>{if(!e[r.name])return t;const i=e[r.name];return i===a.COUNT?(l[r.name]=n.length.toString(),t):0===i.indexOf(a.MATH)?(o.push([r.name,i]),t):(t.push({totalOperation:i,totalColumn:r,columnValues:n.map((e=>e.cells[r.name].value))}),t)}),[]);return r||o?(null==r||r.forEach((({totalOperation:e,totalColumn:t,columnValues:o})=>{if(T.ketchup.objects.isNumber(t.obj)){if(e===a.SUM)return void(l[t.name]=o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0).toString());if(e===a.AVERAGE)return void(l[t.name]=(o.reduce(((e,t)=>e+T.ketchup.math.numberifySafe(t)),0)/n.length).toString());if(e===a.MIN)return void(l[t.name]=Math.min(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString());if(e===a.MAX)return void(l[t.name]=Math.max(...o.map((e=>T.ketchup.math.numberifySafe(e)))).toString())}if(T.ketchup.objects.isDate(t.obj)){const n=o.filter((e=>T.ketchup.dates.isIsoDate(e))).map((e=>T.ketchup.dates.toDate(e,v.ISO_DATE)));if(!n)return;if(e===a.MIN)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.min(n),v.ISO_DATE));if(e===a.MAX)return void(l[t.name]=T.ketchup.dates.format(T.ketchup.dates.max(n),v.ISO_DATE))}e===a.DISTINCT&&(l[t.name]=new Set(o).size.toString())})),null==o||o.forEach((([e,t])=>{const n=null==t?void 0:t.replace(u(a.MATH,"g"),"");l[e]=T.ketchup.math.formulas.custom(n,function(e){var t;return Object.fromEntries(null===(t=Object.entries(e))||void 0===t?void 0:t.reduce(((e,[t,n])=>(T.ketchup.math.isNumber(n)&&e.push([t,Number(n)]),e)),[]))}(l)).toString()})),l):l}function L(e){if(!e.group)return;let t=e.group.id,n=e.group.parent;for(;null!==n;)t=`${n.group.id};${t}`,n=n.group.parent;e.group.id=t}function S(e,t,n,l){const o=t*n-n,r=o+Number(n);if(0==l)return e.slice(o,r);let i=[];return _(e,i,o,Number(n),0),i}function _(e,t,n,l,o){let r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=R(e[i]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=_(s.group.children,a.group.children,n,l,o);o=e.ci,r=e.added,1==r&&(t[t.length]=a)}else o>=n&&(t[t.length]=a,r=!0),o++;if(o>=n+l)break}return{ci:o,added:r}}function R(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:z(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function q(e){if(null==e)return null;let t=[];for(let n=0;n<e.length;n++)t[t.length]=R(e[n]);return t}function z(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:q(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function I(e,t,n=!1,l=[]){const o={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){if(l.includes(r.id)){o.rows.push(r);continue}const t={cells:{},id:r.id};for(const n of o.columns){const l=n.name,o=r.cells[l],i=e.rows.find((e=>e.id===r.id)),s=i?i.cells[l]:null;(!s&&o.value||s&&o.value!==s.value)&&(t.cells[l]=o)}(Object.keys(t.cells).length>0||n)&&o.rows.push(t)}return o}function $(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var n;let l=e.cells[t];const o=l.value,r=l.decode,i=l.options;l.isEditable=null!==(n=l.isEditable)&&void 0!==n?n:l.editable;const s={[c.AUTOCOMPLETE]:()=>f(o,"",i,l.data),[c.COMBOBOX]:()=>f(o,"",i,l.data),[c.RADIO]:()=>h(o,i),[c.CHECKBOX]:()=>d(o,""),[c.CHIP]:()=>b(o,r),[c.SWITCH]:()=>m(o,""),[c.MULTI_AUTOCOMPLETE]:()=>b(o,r),[c.MULTI_COMBOBOX]:()=>b(o,r)}[l.shape];s&&(l.data=Object.assign(Object.assign({},s()),l.data))}))}))}export{w as F,g as K,y as a,N as b,A as c,$ as d,F as e,M as f,I as g,E as n,S as p,C as s,x as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-710d0a7d.js";import{k as o,h as s,g as h,s as
|
|
1
|
+
import{r as t,c as n,f as i,h as e,H as a,d as p}from"./p-710d0a7d.js";import{k as o,h as s,g as h,s as f}from"./p-459f5369.js";import{a as l,F as r}from"./p-cec0955d.js";import{c}from"./p-635bb4b3.js";import"./p-adadf8b5.js";var u;!function(t){t.data="prop of the sub compoennt",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"}(u||(u={}));const g=class{constructor(i){t(this,i),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=l.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){i(this)}async setProps(t){f(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const i=this.prepareDataFromTreeNode(t,n);return i.value?e(r,Object.assign({},{value:i.value,type:i.type,toolbar:i.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const i=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(i.customStyle=this.customStyle),null==i.value&&(i.value=t.value),i.wrapperClass||(i.wrapperClass=""),null!=this.type&&(i.type=this.type),null!=this.toolbar&&(i.toolbar=this.toolbar),i.id=n.toString(),i}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let i=null;i=this.renderTypography(this.data[n],n),i&&t.push(i)}return t}getObjForEvent(t,n){let i=Number(t),e=-1;null!=n&&""!=n.trim()&&(e=Number(n));let a=this.data[i];return-1!=e?a.children[e].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t=this.renderTypographys();return e(a,{key:"fe46fa2e9c4b087812bbc31953125b891a980887"},e("style",{key:"b962671bbaf0632c1f153a13d1aefec4f01a19b5"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"087aa8e59f12ffd537f9204a417a3edb650355cb",id:c},e("div",{key:"8d939397c90ae7f1801853833097f2c0d78848cd",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-label-01-font-size, 12px);\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-heading-01-font-size, 14px);\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-710d0a7d.js";import{k as o}from"./p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-710d0a7d.js";import{k as o}from"./p-459f5369.js";import"./p-adadf8b5.js";const n=class{constructor(t){i(this,t),this.kupManager=o(),this.config=void 0,this.qlik=void 0,this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),e(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((e=>{this.divlist=[],i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,e.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},e))})),e(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,e=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},e={"--lyo_obj-height":this.defobjsize},t("div",{key:"458836be7c3870d32d0a142c619f0066e0fab2f1",class:i,style:e},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return e(this)}};n.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{n as kup_qlik}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-
|
|
1
|
+
import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-459f5369.js";import{F as i}from"./p-cce08de3.js";const n=document.documentElement;let o=null;const d=(l,t)=>{var i,n;const o={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},d=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,d))||void 0===n||n;return e("div",Object.assign({class:o},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[a(l),s?d:null,e("label",null,l.label)]):[a(l),s?d:null],t)};function a(o){var d,a,u,m,p,f,v;const x=o.textArea||o.outlined;let g,k,h,b;if(!o.label||o.leadingLabel||o.trailingLabel||o.legacyLook||(g=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},o.label,o.labelHelper&&e("span",{onPointerMove:e=>r(e,o.labelHelper),onPointerDown:e=>r(e,o.labelHelper),onPointerOut:()=>c()},e(i,{resource:"info_outline",wrapperClass:"helper-icon"}))),o.maxLength&&o.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},o.value.length," / ",o.maxLength):void 0)),o.icon){let i,n="";if(Object.values(t).indexOf(o.icon)>-1)n=o.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${o.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}k=e("span",{style:i,onClick:o.onIconClick,onMouseDown:e=>{e.preventDefault()},class:`mdc-text-field__icon kup-icon action ${n}`})}if(o.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};h=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),b=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const w={color:o.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:o.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},_={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":o.disabled},y={"is-clearable":o.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":o.disabled,"mdc-text-field--read-only":o.readOnly,"mdc-text-field--read-only-is-select":o.isSelect,"mdc-text-field--filled":!o.fullWidth&&!x,"mdc-text-field--no-label":!o.label,"mdc-text-field--fullwidth":o.fullWidth,"mdc-text-field--lightmode":o.lightMode,"mdc-text-field--outlined":x,"mdc-text-field--textarea":o.textArea,"mdc-text-field--with-leading-icon":o.icon&&!o.trailingIcon,"mdc-text-field--with-trailing-icon":o.icon&&o.trailingIcon,"mdc-text-field--with-quantity-buttons":o.quantityButtons,"mdc-text-field--error":Boolean(o.error),"mdc-text-field--alert":Boolean(o.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":o.legacyLook,[`mdc-text-field--${o.sizing||"small"}`]:!o.textArea&&!o.legacyLook,[`mdc-text-field--textarea--${o.sizing||"small"}`]:o.textArea,"top-right-indicator":o.showMarker};let C=o.value,$=o.quantityButtons?"number":null!==(d=o.inputType)&&void 0!==d?d:"text",F=!1;if("number"===o.inputType&&($="text",o.inputMode="numeric",F=!0),"number"===o.inputType){const e={allowNegative:null===(a=o.allowNegative)||void 0===a||a,decimal:o.decimals,group:null===(u=o.group)||void 0===u||u,integer:(null!==(m=o.integers)&&void 0!==m?m:0)-(null!==(p=o.decimals)&&void 0!==p?p:0)};C=s(C,e,!1)}return e("div",{class:_},o.fullWidth?void 0:g,e("div",{class:y},o.trailingIcon?void 0:k,o.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:o.disabled,maxlength:o.maxLength,value:C,autoComplete:null!==(f=o.autocomplete)&&void 0!==f?f:"off",onBlur:o.onBlur,onClick:o.onClick,onChange:o.onChange,onFocus:o.onFocus,onInput:o.onInput,onKeyDown:o.onKeyDown})):e("input",{type:$,inputmode:o.inputMode?o.inputMode:void 0,step:o.step,min:o.min,max:o.max,name:o.name,class:"mdc-text-field__input",disabled:o.disabled,placeholder:o.placeholder,maxlength:o.maxLength,size:o.size,value:C,readOnly:o.isSelect,autoComplete:null!==(v=o.autocomplete)&&void 0!==v?v:"off",onBlur:e=>{var l,t,i,n;if(F){const d={allowNegative:null===(l=o.allowNegative)||void 0===l||l,decimal:o.decimals,group:null===(t=o.group)||void 0===t||t,integer:(null!==(i=o.integers)&&void 0!==i?i:0)-(null!==(n=o.decimals)&&void 0!==n?n:0)};e.target.value=s(e.target.value,d,!0)}o.onBlur&&o.onBlur(e)},onChange:e=>{var l,t,i,n;if(F){const d={allowNegative:null===(l=o.allowNegative)||void 0===l||l,decimal:o.decimals,group:null===(t=o.group)||void 0===t||t,integer:(null!==(i=o.integers)&&void 0!==i?i:0)-(null!==(n=o.decimals)&&void 0!==n?n:0)};e.target.value=null!=o.min&&o.min>parseFloat(e.target.value)?s(o.min.toString(),d,!0):null!=o.max&&o.max<parseFloat(e.target.value)?s(o.max.toString(),d,!0):s(e.target.value,d,!0)}else null!=o.min&&o.min>parseFloat(e.target.value)?e.target.value=o.min.toString():null!=o.max&&o.max<parseFloat(e.target.value)&&(e.target.value=o.max.toString());o.onChange&&o.onChange(e)},onClick:o.onClick,onFocus:o.onFocus,onInput:o.onInput,onKeyDown:o.onKeyDown,onKeyPress:e=>{var l,t,i,d,a;if(!F)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,o=n.ketchup.math.decimalSeparator();return t.value.includes(o)||(t.value=t.value.slice(0,i)+o+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=o.allowNegative)||void 0===t||t,decimal:o.decimals,group:null===(i=o.group)||void 0===i||i,integer:(null!==(d=o.integers)&&void 0!==d?d:0)-(null!==(a=o.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),o.trailingIcon?k:void 0,o.helperIcon&&o.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},w))):o.helperIcon&&o.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},w))):void 0,o.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:o.onMinusClick},h),e("button",{onClick:o.onPlusClick},b)),o.isClearable&&o.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:o.onClearIconClick}):void 0))}const s=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i},c=()=>{o&&(o.remove(),o=null)},r=(e,l)=>{l&&0!==l.length&&(o?(o.innerText=l,u(o,e)):(o=document.createElement("div"),o.className="kup-helper-tooltip",o.innerText=l,document.body.appendChild(o),u(o,e)))},u=(e,l)=>{const t=10,i=window.innerWidth,n=window.innerHeight,o=e.getBoundingClientRect(),d=o.width,a=o.height;let s=l.clientX+t,c=l.clientY+t;s+d>i&&(s=l.clientX-d-t,s<0&&(s=i-d-t)),c+a>n&&(c=l.clientY-a-t,c<0&&(c=n-a-t)),s=Math.max(t,Math.min(s,i-d-t)),c=Math.max(t,Math.min(c,n-a-t)),e.style.left=`${s}px`,e.style.top=`${c}px`};export{d as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as s,H as n,d as a}from"./p-710d0a7d.js";import{k as o,i as
|
|
1
|
+
import{r as t,c as i,f as e,h as s,H as n,d as a}from"./p-710d0a7d.js";import{k as o,i as f,aB as p,g as h,s as l,Z as r,aC as c,b as m,aD as d}from"./p-459f5369.js";import{c as g}from"./p-635bb4b3.js";import{F as u}from"./p-14c6efce.js";import{F as k}from"./p-f81ec6f8.js";import"./p-adadf8b5.js";import"./p-e3062c19.js";import"./p-cce08de3.js";import"./p-31ae78d1.js";import"./p-0829e7c5.js";import"./p-c49cb8be.js";import"./p-e7fbf76f.js";var y,x=function(t,i,e,s){if("a"===e&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:i.get(t)};const b=class{constructor(e){t(this,e),this.kupCellSubmitClick=i(this,"kup-cell-submit-click",6),this.kupCellUpload=i(this,"kup-cell-upload",6),y.set(this,o()),this.customStyle="",this.data=null,this.density=f.NONE,this.dragEnabled=!1,this.showSubmit=!1,this.submitPosition=p.right}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let i=0;i<t.length;i++){const e=t[i];this.data.cssClass.indexOf(e)<0&&(this.data.cssClass+=` ${e}`)}this.refresh()}async getProps(t){return h(this,d,t)}async refresh(){e(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let i=0;i<t.length;i++){const e=t[i];this.data.cssClass.indexOf(e)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(e,"g"),""))}this.refresh()}}async setProps(t){l(this,d,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});x(this,y,"f").interact.draggable(this.rootElement.shadowRoot.querySelector("#"+g),{cursorChecker:()=>null},{callback:t},r.BADGE)}}generateColumn(){return{name:"KUPCELL",title:void 0}}generateRow(){const t=this.generateColumn(),i={cells:{}};return i.cells[t.name]=this.data,i}submitClick(t){t.stopPropagation(),this.kupCellSubmitClick.emit({comp:this,id:this.rootElement.id,cell:this.data})}upload(t){t.stopPropagation(),this.kupCellUpload.emit(t.detail)}componentWillLoad(){x(this,y,"f").dates.register(this),x(this,y,"f").debug.logLoad(this,!1),x(this,y,"f").language.register(this),x(this,y,"f").theme.register(this)}componentDidLoad(){x(this,y,"f").debug.logLoad(this,!0)}componentWillRender(){x(this,y,"f").debug.logRender(this,!1)}componentDidRender(){this.didRenderInteractables(),x(this,y,"f").debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return s(n,{key:"01c0f9dc1d970c0da37687dd07ecf95cf0cb0279","onKup-file-upload-upload":this.upload.bind(this)},s("style",{key:"4ad06f4bbbb2cfebee565fee5606194d2e68d871"},x(this,y,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"2d06ac608cd5eaa25b014dbc2420e2dec44ea89b",id:g,style:this.showSubmit?{display:"flex","flex-direction":c(this.submitPosition),"align-items":"center",gap:"0.5rem"}:{}},s(k,Object.assign({key:"393bd349a7310e9e9f8fbefac85c6ef733799a3f"},t)),this.showSubmit?s(u,{buttonType:"submit",label:x(this,y,"f").language.translate(m.CONFIRM),wrapperClass:"form__submit",onClick:t=>{this.submitClick(t)}}):null))}disconnectedCallback(){x(this,y,"f").dates.unregister(this),x(this,y,"f").language.unregister(this),x(this,y,"f").theme.unregister(this)}get rootElement(){return a(this)}};y=new WeakMap,b.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;height:fit-content;width:100%}#kup-component{height:fit-content;width:100%}";export{b as kup_cell}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,F as n}from"./p-710d0a7d.js";import{ar as o,as as t,U as a,ae as c,f as l,ap as i,an as r,am as s,at as u,F as d,aj as p,a as b,au as k,I as v,av as f,aw as m,ax as h,ay as g,az as j,h as O}from"./p-459f5369.js";import{F as x}from"./p-14c6efce.js";import{F as w}from"./p-31ae78d1.js";import{F as _,d as y}from"./p-0829e7c5.js";import{F as C}from"./p-cce08de3.js";import{F as $}from"./p-c49cb8be.js";import{F}from"./p-e7fbf76f.js";var I;!function(e){e.RADIO="radio",e.CHEVRON="chevron"}(I||(I={}));const D=o=>{var t;const a=o.horizontal||"lineDirection"==o.RadLay,c=!!o.columns,l=[],i=o.type||I.RADIO;for(let a=0;a<(null===(t=o.data)||void 0===t?void 0:t.length);a++){const t=o.data[a],c={radio:!0,"radio--checked":!!t.checked,"radio--disabled":!!o.disabled,[`radio--${o.type}`]:!!o.type};l.push(e("div",{class:`form-field \n ${o.leadingLabel?" form-field--align-end":""} ${o.disabled?"radio--disabled":""} ${i===I.CHEVRON?"form--chevron":""}`,onClick:o.onChange?o.onChange.bind(o.onChange,a):null},e("div",{class:c},i===I.RADIO?e("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:t.value,checked:t.checked,disabled:o.disabled,onBlur:o.onBlur,onChange:e=>{o.onChange&&o.onChange(a,e),e.stopPropagation()},onFocus:o.onFocus}):e(n,null,e(C,t.checked?{resource:"check",sizeX:"14px",sizeY:"14px"}:{sizeX:"14px",sizeY:"14px",onClick:e=>{o.onChange&&o.onChange(a,e),e.stopPropagation()}})),i===I.RADIO&&e("div",{class:"radio__background"},e("div",{class:"radio__outer-circle"}),e("div",{class:"radio__inner-circle"}))),e("div",{class:"label-wrapper",onClick:e=>{o.onChange&&o.onChange(a,e),e.stopPropagation()}},i===I.CHEVRON&&e(C,{resource:t.icon,sizeX:"14px",sizeY:"14px"}),e("label",{htmlFor:"radio-element"},t.label?t.label:""),t.shortcutLabel&&e("div",{class:"shortcut"},t.shortcutLabel))))}return e("div",{class:`f-radio radio-wrapper\n ${c?"radio-wrapper-grid":""} ${o.danger?"kup-danger":""} ${o.info?"kup-info":""} ${o.secondary?"kup-secondary":""} ${o.success?"kup-success":""} ${o.warning?"kup-warning":""} ${o.wrapperClass?o.wrapperClass:""} ${a?"kup-horizontal":""}`,style:{"--kup_radio_columns":c?`repeat(${o.columns}, 1fr)`:""}},l)},E=n=>(n.maxValue||(n.maxValue=5),e("div",{class:`f-rating ${n.disabled?"disabled":""} ${n.danger?"kup-danger":""} ${n.info?"kup-info":""} ${n.secondary?"kup-secondary":""} ${n.success?"kup-success":""} ${n.warning?"kup-warning":""} ${n.wrapperClass?n.wrapperClass:""}`},function(n){const o=[];for(let t=1;t<=n.maxValue;t++)o.push(e("span",{class:"rating",onClick:n.onClick?n.onClick.bind(n.onClick,t):null},t<=n.value?"★":"☆"));return o}(n)));var A;!function(e){e.SMALL="small",e.MEDIUM="medium"}(A||(A={}));const B=n=>{n.sizing||(n.sizing=A.MEDIUM),n.sizing.toLowerCase();const o={switch:!0,"switch--checked":n.checked,"switch--disabled":n.disabled,[`switch--${n.sizing}`]:!!n.sizing};return e("div",Object.assign({class:`f-switch ${n.danger?"kup-danger":""} ${n.info?"kup-info":""} ${n.secondary?"kup-secondary":""} ${n.success?"kup-success":""} ${n.warning?"kup-warning":""} ${n.wrapperClass?n.wrapperClass:""}`},n.dataSet,{id:n.id,title:n.title}),e("div",{class:"form-field "+(n.leadingLabel?"form-field--align-end":"")},e("div",{class:o},e("div",{class:"switch__track"}),e("div",{class:"switch__thumb-underlay"},e("div",{class:"switch__thumb"},e("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:n.checked,disabled:n.disabled,value:n.checked?"on":"off",onBlur:n.onBlur,onChange:n.onChange,onFocus:n.onFocus})))),e("label",{onClick:n.onChange},n.label)))},z={"*BOLD":"font-weight: bold; !important;","*ERROR":"color: white !important; background: red !important;","*UNDERLINE":"text-decoration: underline !important;","*ITALIC":"font-style: italic !important;"};function N(e){let n;switch(e){case"0":n="color: #000000 !important;";break;case"1":n="color: #6C7A89 !important;";break;case"2":n="color: #3A539B !important;";break;case"3":n="color: var(--kup-danger-color-60) !important;";break;case"4":n="color: #C0C0C0 !important;";break;case"5":n="color: #FFFFFF !important;";break;case"6":n="color: var(--kup-success-color-60) !important;";break;case"7":n="color: #9B59B6 !important;";break;default:n=""}return n}function R(e){let n;switch(e){case"1":n="font-weight: bold !important;";break;case"2":n="font-style: italic !important;";break;case"3":n="text-decoration: underline !important;";break;default:n=""}return n}function L(e){let n;switch(e){case"0":n="background: transparent;";break;case"1":n="background: #D5ECF7;";break;case"2":n="background: #59ABE3;";break;case"3":n="background: #446CB3;";break;case"4":n="background: #9B59B6;";break;case"5":n="background: #F1A9A0;";break;case"6":n="background: #E74C3C;";break;case"7":n="background: #CF000F;";break;case"8":n="background: #C0392B;";break;case"9":n="background: #95A5A6;";break;case"A":n="background: #F5D76E;";break;case"B":case"C":n="background: #F7CA18;";break;case"D":n="background: #F39C12;";break;case"E":n="background: #90C695;";break;case"F":n="background: #26A65B;";break;case"G":n="background: #019875;";break;case"H":n="background: #36D7B7;";break;default:n=""}return n}function K(e){let n;switch(e){case"1":n='font-family: "Courier New", Courier, monospace !important;';break;case"2":n='font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif !important;';break;case"3":n="font-family: Arial, Helvetica, sans-serif !important;";break;default:n=""}return n}const M=({style:n,text:o,classes:t})=>{const a=function(e){const n=[];let o=null;return function(e,n){const o=/((_G\d{2}[A-Z0-9]\d{2}_|_G\*(BOLD|ERROR|ITALIC|UNDERLINE)_)|_n_)/g;let t,a=0;for(;null!==(t=o.exec(e));)t.index>a&&n.onContent(e.slice(a,t.index)),"_n_"===t[1]?n.onEndTag(t[1]):n.onStartTag(t[2]),a=o.lastIndex;a<e.length&&n.onContent(e.slice(a))}(e,{onStartTag(e){(null==o?void 0:o.tag)&&(o.closed=!0),n.push(o={tag:e,content:""})},onEndTag(e){o?o.tag?(o.closed=!0,o=null):this.onContent(e):n.push(o={content:e})},onContent(e){o?o.content+=e:n.push(o={content:e})}}),o&&o.tag&&(o.closed=!0),n}(o);return e("span",{class:t,style:n},a.find((e=>void 0!==e.tag))?function(n){return n.map((n=>{var o,t;const a=function(e){const n=function(e){let n="";if((null==e?void 0:e.match(/\d{2}[A-Z0-9]\d{2}|\*(BOLD|ERROR|ITALIC|UNDERLINE)/))&&(n=z[e],!n)){n="";for(let o=0;o<e.length;o++)switch(o){case 0:n+=N(e.charAt(o));break;case 1:n+=R(e.charAt(o));break;case 2:n+=L(e.charAt(o));break;case 3:n+=K(e.charAt(o))}}return n}(e);return n.split(";").filter((e=>e.trim())).reduce(((e,n)=>{const[o,t]=n.split(":").map((e=>e.trim()));if(o&&t){const n=t.replace(/!important/g,"").trim();e[o.replace(/-([a-z])/g,((e,n)=>n.toUpperCase()))]=n}return e}),{})}(null===(o=n.tag)||void 0===o?void 0:o.replace(/[_]/g,"").slice(1));return n.closed?e("span",{style:a},n.content):e("span",null,`${null!==(t=n.tag)&&void 0!==t?t:""}${n.content}`)}))}(a):o)},T=document.documentElement,V=(n,i)=>{var r,s,k,f,O;const I=n.cell,A=n.column,z=n.row,N=n.shape?n.shape:I.shape?I.shape:A.shape?A.shape:null,R=!T.ketchup.objects.isEmptyKupObj(I.obj);let L=!1;I.hasOwnProperty("isEditable")?L=I.isEditable:A.hasOwnProperty("isEditable")&&(L=A.isEditable),L=L&&n.editable,I.data=null!==(r=X(I,A))&&void 0!==r?r:I.data;const K=n.previousValue!==I.value?I.value:"",V=T.ketchup.data.cell.getType(I,N),G="extra_dense"===n.density?"extra-small":null===(s=I.data)||void 0===s?void 0:s.sizing;let U=I.cssClass?I.cssClass:(null==A?void 0:A.cssClass)?null==A?void 0:A.cssClass:"";const Y={"f-cell":!0,[a.OBJ]:!!R,[V+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||V===c.BAR),[U]:!!U,"c-input-uppercase":g(I),"c-input-lowercase":j(I),"monospace c-pre":null===(k=I.data)||void 0===k?void 0:k.legacyLook};let W=K;I.data&&0!==Object.keys(I.data).length||function(e,n){function o(e){return e.toUpperCase().startsWith("SHAPE;BAR")}function t(e){return e.toUpperCase().startsWith("SHAPE;")}function a(e){return e.toUpperCase().startsWith("BCOLOR;")}function l(e){return e.toUpperCase().startsWith("HEIGHT;")}function i(e){return e.toUpperCase().startsWith("SEP;")||e.toUpperCase().startsWith("DIV;")||e.toUpperCase().startsWith("ARW;")||e.toUpperCase().startsWith("GRID;")}function r(e){const n={},c=e.split("\\\\"),r=[];for(const e of c){if(e){if(i(e))return null;if(t(e)){if(!o(e))return null;{const o=e.split(";");if(3===o.length){const e=o[2].replace(",",".");isNaN(parseFloat(e))||(n.width=`${e}%`)}}}else if(a(e));else if(l(e)){const o=e.substring(7).replace(",",".");isNaN(parseFloat(o))||(n.height=`${o}%`)}else r.push(s(e,n))}return r.length?r:null}function s(e,n){const o=Object.assign({},n),t=e.split(";");if(t.length>=1){const e=/R(\d+)G(\d+)B(\d+)/.exec(t[0]);if(e){const[,n,t,a]=e;isNaN(parseInt(n,10))||isNaN(parseInt(t,10))||isNaN(parseInt(a,10))||(o.color=`rgb(${parseInt(n)},${parseInt(t)},${parseInt(a)})`)}if(t.length>=2){const e=t[1].replace(",",".");isNaN(parseFloat(e))||(o.width=`${e}%`)}}return o}}n.data={};switch(e){case c.CHECKBOX:case c.SWITCH:n.data.checked="1"===n.value;break;case c.BAR:t(n.value)?(n.data.isCanvas=!0,n.data.resource=n.value):n.data.data=function(e){if(!e)return null;const n=e.split("\\\\AND\\"),o=[];for(const e of n){const n=r(e);if(!n)return null;o.push(...n)}return o}(n.value);break;case c.BUTTON:n.data.label=n.value;break;case c.CHART:Object.assign(n.data,{sizeX:"100px",sizeY:"100px",offlineMode:{value:n.value,shape:"pie"}});break;case c.BUTTON_LIST:case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.RADIO:(()=>{var e;const o=null===(e=n.value)||void 0===e?void 0:e.split(";");if(""===(null==o?void 0:o[o.length-1].trim())&&o.pop(),o&&o.length){n.data.data=[];for(let e of o)n.data.data.push({id:e,value:e})}})();break;case c.COLOR_PICKER:n.data.initialValue=n.value;break;case c.GAUGE:case c.KNOB:case c.PROGRESS_BAR:case c.RATING:n.data.value=parseInt(n.value);break;case c.ICON:case c.IMAGE:n.data.resource=n.value}}(V,I);const P=Object.assign(Object.assign(Object.assign(Object.assign({},I.data),(null==I?void 0:I.icon)?{resource:I.icon}:{}),(null==I?void 0:I.placeholderIcon)?{placeholderResource:I.placeholderIcon}:{}),G?{sizing:G}:{});L&&o.includes(V)?(I.data.showMarker=null!==(f=I.tooltip)&&void 0!==f&&f,W=function(n,o,t,l,i){var r,s,u,k,f,m,g,j,O,x,y,C,I,E;switch(n){case c.AUTOCOMPLETE:return e("kup-autocomplete",Object.assign({key:l.name+i.row.id,initialValue:t.value,initialValueDecode:t.decode},t.data,{class:le(i)?"kup-full-width":"","onkup-autocomplete-change":e=>ae(e,i,n,h.UPDATE),"onkup-autocomplete-input":e=>ae(e,i,n,h.INPUT),"onkup-autocomplete-iconclick":e=>ae(e,i,n,h.ICON_CLICK),"onKup-autocomplete-blur":e=>ae(e,i,n,h.BLUR),"onKup-autocomplete-itemclick":e=>ae(e,i,n,h.ITEMCLICK)}));case c.CHECKBOX:return ce(i)&&(o[a.C_CENTERED]=!0),t.shape===d.INPUT_CHECKBOX?e("input",{checked:"on"===t.value.toLowerCase()||"1"===t.value,class:"input-checkbox",onChange:e=>ae(e,i,n,h.UPDATE),type:"checkbox",onBlur:e=>ae(e,i,n,h.BLUR)}):e(w,Object.assign({},t.data,{onChange:e=>ae(e,i,n,h.UPDATE),onBlur:e=>ae(e,i,n,h.BLUR)}));case c.CHIP:return e("kup-chip",Object.assign({},t.data,{type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>ae(e,i,n,h.UPDATE)}),e("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},t.slotData,{error:t.data.error,"onKup-textfield-blur":e=>ae(e,i,n,h.BLUR)})));case c.COLOR_PICKER:return e("kup-color-picker",Object.assign({},t.data,{key:l.name+i.row.id,initialValue:t.value.toUpperCase(),class:le(i)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":e=>ae(e,i,n,h.UPDATE)}));case c.COMBOBOX:return e("kup-combobox",Object.assign({key:l.name+i.row.id,initialValue:t.value,initialValueDecode:t.decode,ListDescrMode:t.data.ListDescrMode},t.data,{class:le(i)?"kup-full-width":"","onkup-combobox-change":e=>ae(e,i,n,h.UPDATE),"onkup-combobox-input":e=>ae(e,i,n,h.INPUT),"onkup-combobox-iconclick":e=>ae(e,i,n,h.ICON_CLICK),"onKup-combobox-blur":e=>ae(e,i,n,h.BLUR),"onKup-combobox-itemclick":e=>ae(e,i,n,h.ITEMCLICK)}));case c.DATE:return e("kup-date-picker",Object.assign({key:l.name+i.row.id,initialValue:t.value},t.data,{class:le(i)?"kup-full-width":"","onkup-datepicker-change":e=>ae(e,i,n,h.UPDATE),"onkup-datepicker-input":e=>ae(e,i,n,h.INPUT),"onKup-datepicker-blur":e=>ae(e,i,n,h.BLUR),"onkup-datepicker-textfieldsubmit":e=>ae(e,i,n,h.UPDATE)}));case c.EDITOR:const A=e=>{"Enter"!==e.key||e.ctrlKey?("Enter"===e.key&&e.ctrlKey||/^F[1-9]|F1[0-2]$/.test(e.key))&&ae(e,i,n,h.UPDATE):e.stopPropagation()};return e(F,Object.assign({},t.data,{textArea:!0,sizing:b.EXTRA_LARGE,label:l.title,fullWidth:!!le(i),maxLength:t.data.maxLength,value:t.value,onChange:e=>{ae(e,i,n,h.UPDATE)},onInput:e=>{var o,a;null===(a=null===(o=t.data)||void 0===o?void 0:o.onInput)||void 0===a||a.call(o,e),ae(e,i,n,h.INPUT)},onBlur:e=>ae(e,i,n,h.BLUR),onKeyDown:A}));case c.FILE_UPLOAD:return e("kup-file-upload",Object.assign({"onKup-file-upload-change":e=>ae(e,i,n,h.UPDATE)},t.data));case c.MULTI_AUTOCOMPLETE:return e("kup-chip",Object.assign({DescrMode:null!==(r=t.data.DescrMode)&&void 0!==r?r:v.DESCRIPTION},t.data,{label:null!==(u=null===(s=t.slotData)||void 0===s?void 0:s.label)&&void 0!==u?u:"",type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>ae(e,i,n,h.UPDATE)}),e("kup-autocomplete",{class:"kup-full-width",slot:"field",DescrMode:v.CODE_AND_DESC,sizing:b.EXTRA_SMALL,"onKup-autocomplete-blur":e=>ae(e,i,n,h.BLUR),"onkup-autocomplete-input":e=>ae(e,i,n,h.INPUT),"onkup-autocomplete-iconclick":e=>ae(e,i,n,h.ICON_CLICK),data:null===(k=t.slotData)||void 0===k?void 0:k.data,initialValue:null===(f=t.slotData)||void 0===f?void 0:f.initialValue,showDropDownIcon:null===(m=t.slotData)||void 0===m?void 0:m.showDropDownIcon,style:null===(g=t.slotData)||void 0===g?void 0:g.style,disabled:null===(j=t.slotData)||void 0===j?void 0:j.disabled,id:null===(O=t.slotData)||void 0===O?void 0:O.id,error:t.data.error,showMarker:null!==(x=t.tooltip)&&void 0!==x&&x,ListDescrMode:t.data.ListDescrMode}));case c.MULTI_COMBOBOX:return e("kup-chip",Object.assign({DescrMode:null!==(y=t.data.DescrMode)&&void 0!==y?y:v.DESCRIPTION},t.data,{type:_.INPUT,enableInput:!0,"onKup-chip-change":e=>ae(e,i,n,h.UPDATE)}),e("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",DescrMode:v.CODE_AND_DESC,sizing:b.EXTRA_SMALL,"onKup-combobox-blur":e=>ae(e,i,n,h.BLUR),"onkup-combobox-input":e=>ae(e,i,n,h.INPUT),"onkup-combobox-iconclick":e=>ae(e,i,n,h.ICON_CLICK)},t.slotData,{error:t.data.error,showMarker:null!==(C=t.tooltip)&&void 0!==C&&C,ListDescrMode:t.data.ListDescrMode})));case c.RADIO:return e(D,Object.assign({},t.data,{disabled:!1,onChange:(e,o)=>{const a=t.data.data;for(let n=0;n<a.length;n++){a[n].checked=n===e}ae(o,i,n,h.UPDATE)},onBlur:e=>ae(e,i,n,h.BLUR)}));case c.RATING:return e("kup-rating",Object.assign({key:l.name+i.row.id},t.data,{disabled:!1,"onkup-rating-click":e=>ae(e,i,n,h.UPDATE)}));case c.SWITCH:return e(B,Object.assign({},t.data,{disabled:!1,onChange:e=>ae(e,i,n,h.UPDATE),onBlur:e=>ae(e,i,n,h.BLUR)}));case c.TIME:return e("kup-time-picker",Object.assign({key:l.name+i.row.id,initialValue:t.value},t.data,{class:le(i)?"kup-full-width":"","onkup-timepicker-change":e=>ae(e,i,n,h.UPDATE),"onkup-timepicker-input":e=>ae(e,i,n,h.INPUT),"onKup-timepicker-blur":e=>ae(e,i,n,h.BLUR)}));case c.OBJECT:return e($,{cell:t,column:i.column,row:i.row,inputValue:t.value,onChange:e=>ae(e,i,n,h.UPDATE)});case c.NUMBER:o[a.C_RIGHT_ALIGNED]=!0;case c.LINK:case c.MEMO:case c.STRING:const z=e=>ae(e,i,n,h.UPDATE),N=e=>{var o,a;null===(a=null===(o=t.data)||void 0===o?void 0:o.onInput)||void 0===a||a.call(o,e),ae(e,i,n,h.INPUT)},R=e=>{var o,a,l;null===(a=null===(o=t.data)||void 0===o?void 0:o.onKeyDown)||void 0===a||a.call(o,e);const r="MEMO"===t.shape||(null===(l=t.data)||void 0===l?void 0:l.maxLength)>=256||n===c.MEMO,s="Enter"===e.key&&e.ctrlKey;r&&"Enter"===e.key&&!e.ctrlKey?e.stopPropagation():(s||/^F[1-9]|F1[0-2]$/.test(e.key))&&ae(e,i,n,h.UPDATE)},L=n===c.NUMBER?"number":null;if(t.shape===d.INPUT_FIELD){const o=n===c.NUMBER&&t.value?p(l,t):t.value;return e("input",{class:"input-field",onChange:z,onInput:N,onKeyDown:R,type:L,value:o,maxLength:null!==(E=null===(I=l.cellData)||void 0===I?void 0:I.maxLength)&&void 0!==E?E:-1})}{const o=!!t.shape&&t.shape===d.MEMO||!!n&&n===c.MEMO||t.data.maxLength>=256;return e(F,Object.assign({},t.data,{textArea:o,sizing:t.data.sizing?t.data.sizing:o?b.EXTRA_LARGE:b.SMALL,inputType:L,fullWidth:!!le(i),maxLength:n==c.NUMBER&&(i.column.decimals&&i.column.decimals>0||i.column.group)||i.column.integers&&i.column.integers>0?-1:t.data.maxLength,icon:t.data&&t.data.icon?t.data.icon:t.icon?t.icon:l.icon?l.icon:null,decimals:i.column.decimals,integers:i.column.integers,group:i.column.group,value:t.value,label:l.title,onChange:z,onInput:N,onKeyDown:R,onIconClick:e=>ae(e,i,n,h.ICON_CLICK),onBlur:e=>ae(e,i,n,h.BLUR)}))}}}(V,Y,I,A,n)):I.data&&t.includes(V)?(n.setSizes&&function(e,n,o){switch(e){case c.BAR:n.sizeY||(n.sizeY="26px");break;case c.BUTTON:let e="";n.label&&(e="36px"),o.style?o.style.height||(o.style.minHeight=e):o.style={minHeight:e};break;case c.CHART:n.sizeX||(n.sizeX="100%"),n.sizeY||(n.sizeY="100%");break;case c.CHIP:o.style?o.style.height||(o.style.minHeight="18px"):o.style={minHeight:"18px"};break;case c.RADIO:o.style?o.style.height||(o.style.minHeight="40px"):o.style={minHeight:"40px"}}}(V,P,I),W=n.renderKup?function(n,o,t,l,i,r,s){switch(n){case c.BAR:return t.data?e("div",{style:{height:t.sizeY,width:"100%"}},e(C,Object.assign({},t))):e("kup-image",Object.assign({key:r.name+s.row.id,sizeX:"250px"},t));case c.BUTTON:ce(s)&&(o[a.C_CENTERED]=!0);const u=Object.assign({label:l.value,icon:l.icon,placeholderIcon:l.placeholderIcon,title:r.title},t);return e(x,Object.assign({},u,{onClick:e=>ae(e,s,n,h.CLICK)}));case c.BUTTON_LIST:return ce(s)&&(o[a.C_CENTERED]=!0),t["data-storage"]={cell:l,row:i,column:r},e("kup-button-list",Object.assign({key:r.name+s.row.id},t,{"onKup-buttonlist-click":e=>ae(e,s,n,h.CLICK)}));case c.CHART:return ce(s)&&(o[a.C_CENTERED]=!0),e("kup-chart",Object.assign({key:r.name+s.row.id},t));case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.CHIP:return e(y,Object.assign({},t));case c.COLOR_PICKER:return e("kup-color-picker",Object.assign({key:r.name+s.row.id},t,{class:le(s)?"kup-full-width":"",disabled:!0}));case c.GAUGE:return e("kup-gauge",Object.assign({key:r.name+s.row.id,value:T.ketchup.math.numberifySafe(l.value),"width-component":"280px"},t));case c.KNOB:case c.PROGRESS_BAR:return e("kup-progress-bar",Object.assign({key:r.name+s.row.id},t,{value:T.ketchup.math.numberifySafe(l.value)}));case c.RADIO:return ce(s)&&(o[a.C_CENTERED]=!0),t.disabled=i.readOnly,e(D,Object.assign({},t));case c.RATING:return e(E,Object.assign({},t,{disabled:!0}));case c.OBJECT:return e(F,Object.assign({icon:"table"},t,{disabled:!0}))}}(V,Y,P,I,z,A,n):e("span",{class:"cell-"+V+" placeholder"})):(n.setSizes&&function(e,n,o,t){var a;switch(e){case c.CHECKBOX:case c.ICON:n.sizeX||(n.sizeX="18px"),n.sizeY||(n.sizeY="18px"),o.style?o.style.height||(o.style.minHeight=n.sizeY):o.style={minHeight:n.sizeY};break;case c.IMAGE:const e=(null===(a=t.cell)||void 0===a?void 0:a.value)||"",l=e.indexOf(".")>-1||e.indexOf("/")>-1||e.indexOf("\\")>-1;t.component.rootElement.tagName!==u.DATA_TABLE||l||(n.sizeX||n.sizeY?(n.sizeX||(n.sizeX="100%",n.wrapperClass="noWidth"),n.sizeY||(n.sizeY="auto")):(n.sizeX="100%",n.sizeY="64px",n.wrapperClass="noWidth")),t.component.rootElement.tagName===u.BOX?(n.sizeY||(n.sizeY="auto"),void 0===n.fit&&(n.fit=!0)):n.sizeX||(n.sizeX="auto"),n.sizeY||(n.sizeY="64px")}}(V,P,I,n),Y[a.INDICATOR_TOPRIGHT]=null!==(O=I.tooltip)&&void 0!==O&&O,W=function(n,o,t,l,i,r,s){switch(n){case c.AUTOCOMPLETE:case c.COMBOBOX:return t&&""!=t?e("div",{class:"f-cell__text"},m(i,t," - ")):t;case c.DATE:case c.DATETIME:case c.TIME:if(t&&""!=t){const n=p(r,i);return e("div",{class:"f-cell__text"},n)}return t;case c.CHECKBOX:return ce(s)&&(l[a.C_CENTERED]=!0),e(C,{resource:o.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case c.EDITOR:case c.MEMO:return e("div",{innerHTML:i.value});case c.ICON:case c.IMAGE:return ce(s)&&(l[a.C_CENTERED]=!0),o.badgeData&&(l[a.C_PADDED]=!0),e(C,Object.assign({},o));case c.LINK:return e("a",{href:t,target:"_blank"},i.value);case c.NUMBER:if(t&&""!=t){const n=T.ketchup.math.numberifySafe(i.value),o=p(r,i);return!Boolean(i.style&&i.style.color)&&n<0&&(l[a.TEXT_DANGER]=!0),ce(s)&&(l[a.C_RIGHT_ALIGNED]=!0),e("div",{class:"f-cell__text"},o)}return e("div",{class:"f-cell__text"},t);case c.SWITCH:return ce(s)&&(l[a.C_CENTERED]=!0),o.disabled=!0,e(B,Object.assign({},o));case c.LABEL:return e(M,{style:i.style,text:i.value,classes:"f-cell__text"});case c.IMAGE_LIST:const u=i.data.data.find((e=>e.value===i.value))||null;return e("kup-image-list",Object.assign({ripple:!0},i.data,{"onKup-imagelist-click":e=>ae(e,s,n,h.UPDATE),activeNode:u}));default:return e("div",{class:"f-cell__text"},i.data.DescrMode?m(i,t,"-"):t)}}(V,P,W,Y,I,A,n));let Z=null;!L&&(A.icon||I.icon)&&W&&V!=c.BUTTON&&V!=c.BUTTON_LIST&&V!=c.IMAGE&&V!=c.ICON&&(Z=e(C,Object.assign({},{color:`rgba(var(${l.TEXT}-rgb), 0.375)`,resource:I.icon?I.icon:A.icon,placeholderResource:I.placeholderIcon?I.placeholderIcon:A.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let q=null;T.ketchup.debug.isDebug()&&R?q=I.obj.t+"; "+I.obj.p+"; "+I.obj.k+";":null!=I.title&&""!=I.title.trim()&&(q=I.title);let J=null;if(I.info){const n=Object.assign({},I.info);n.color||(n.color=`var(${l.INFO})`),n.icon||(n.icon="info"),J=e(C,Object.assign({},{color:n.color,resource:n.icon,placeholderResource:n.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",title:n.message?n.message:"",wrapperClass:"cell-info"}))}if(n.component.rootElement.tagName===u.INPUT_PANEL&&I.style){if(I.style.backgroundColor){const e=I.style.backgroundColor;I.style.backgroundColor="",I.style["--kup-textfield-background-color"]=e}if(I.style.color){const e=I.style.color;I.style.color="",I.style["--kup-textfield-color"]=e}}return e("div",{onKeyUp:e=>ae(e,n,V,h.KEYUP),class:Y,"kup-get-cell-props":()=>n,ref:e=>I.element=e,style:I.style},e("div",{class:"f-cell__content",style:I.styleContent,title:q,onMouseEnter:e=>H(e,n,V),onMouseLeave:e=>S(e)},i&&i.length>0?i:[n.indents,J,Z,W]))},H=(e,n,o)=>{var t;if(n.cellActionIcon){const a=e.currentTarget,l=document.createElement("kup-image");l.resource="more_vert",l.sizeX="16px",l.sizeY="16px",l.tabIndex=0,l.className="f-cell__iconfunction "+(o===c.NUMBER?"left":"right"),(null===(t=n.cellActionIcon)||void 0===t?void 0:t.onClick)&&l.addEventListener("click",n.cellActionIcon.onClick),a.appendChild(l)}},S=e=>{const n=e.currentTarget.querySelector("kup-image");n&&n.remove()},X=(e,n)=>{var o;if(!e)return null;const t=e.options,a=(null===(o=e.data)||void 0===o?void 0:o.hasOwnProperty("label"))?e.data.label:n.title,l=e.value,i=T.ketchup.data.cell.getType(e,e.shape),r=new Map([[c.BUTTON_LIST,W.bind(void 0)],[c.STRING,P.bind(void 0)],[c.RADIO,Z.bind(void 0)],[c.AUTOCOMPLETE,q.bind(void 0)],[c.COMBOBOX,q.bind(void 0)],[c.CHECKBOX,Y.bind(void 0)],[c.OBJECT,U.bind(void 0)],[c.CHIP,G.bind(void 0)],[c.FILE_UPLOAD,J.bind(void 0)]]).get(i);return r?r(t,a,l,e):null},G=(e,n,o,t)=>{var a;return(null===(a=t.data)||void 0===a?void 0:a.data)?Object.assign({},t.data):i(t.value,t.decode)},U=(e,n,o,t)=>Object.assign(Object.assign({},t.data),{data:{initialValue:o||"",label:n||"",value:o||""}}),Y=(e,n,o,t)=>Object.assign(Object.assign({},t.data),{checked:"on"===o||"1"===o,label:n}),W=(e,n,o,t)=>({data:[Object.assign(Object.assign({},t.data),{icon:t.icon,placeholderIcon:t.placeholderIcon,value:o})]}),P=(e,n,o,t)=>{var a;return Object.assign(Object.assign(Object.assign({},t.data),{label:n}),(null===(a=t.data)||void 0===a?void 0:a.maxLength)&&{textArea:t.data.maxLength>=256})},Z=(e,n,o,t)=>{var a,c,l;const i=r(o,e);return Object.assign(Object.assign(Object.assign({},t.data),i),{data:Array.from(new Map([...null!==(c=null===(a=t.data)||void 0===a?void 0:a.data)&&void 0!==c?c:[],...null!==(l=i.data)&&void 0!==l?l:[]].map((e=>[e.value,e]))).values())})},q=(e,n,o,t)=>{if(e){const a=s(o,n,[],t.data);return a.data["kup-list"].data=Q(e,o),t.data?Object.assign(Object.assign({},a),t.data):a}},J=(e,n,o,t)=>Object.assign(Object.assign({},t.data),{pathString:o}),Q=(e,n)=>{const o=te.get(e.type);return o?o(e,n):e.map((e=>({value:e.label,id:e.id,selected:n===e.id})))},ee=(e,n)=>e.children.map((e=>{var o;return{id:e.content.codice,value:e.content.testo,selected:n===e.content.codice,children:(null===(o=e.children)||void 0===o?void 0:o.length)?ee(e,n):[]}})),ne=(e,n)=>e.children.map((e=>{var o;return{id:e.obj.k,value:e.value,selected:n===e.obj.k,children:(null===(o=e.children)||void 0===o?void 0:o.length)?ne(e,n):[]}})),oe=(e,n)=>e.rows.map((e=>{var o;const t=e.fields||e.cells,[a,c]=Object.keys(t);return{id:t[a].value,value:(null===(o=t[c])||void 0===o?void 0:o.value)||t[a].value,selected:n===t[a].value}})),te=new Map([["SmeupTreeNode",ee.bind(void 0)],["SmeupDataTree",ne.bind(void 0)],["SmeupTable",oe.bind(void 0)],["SmeupDataTable",oe.bind(void 0)]]);function ae(e,n,o,t){var a,l,i,r,s,u,d,b;const k=n.cell,v=n.column,f=n.component,m=n.row;if(t===h.UPDATE){let n=function(e,n){var o;const t=!("INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName);let a=t?e.target.value:e.detail.value;return n===c.CHECKBOX&&t&&(a=e.target.checked?"off":"on"),n===c.DATE&&t&&(a=null===(o=e.detail)||void 0===o?void 0:o.value),n===c.NUMBER&&t&&(a=T.ketchup.math.formattedStringToNumberString(a,"")),a}(e,o);switch(g(k)?n=null==n?void 0:n.toUpperCase():j(k)&&(n=null==n?void 0:n.toLowerCase()),o){case c.AUTOCOMPLETE:k.decode=null===(l=null===(a=e.detail)||void 0===a?void 0:a.node)||void 0===l?void 0:l.value,k.data&&(k.data.initialValue=n,k.data.initialValueDecode=null===(r=null===(i=e.detail)||void 0===i?void 0:i.node)||void 0===r?void 0:r.value);break;case c.COMBOBOX:k.decode=null===(u=null===(s=e.detail)||void 0===s?void 0:s.node)||void 0===u?void 0:u.value;case c.DATE:case c.TIME:k.data&&(k.data.initialValue=n);break;case c.CHECKBOX:case c.SWITCH:n="on"===n.toLowerCase()?"0":"1",k.data&&(k.data.checked="0"!==n);break;case c.RADIO:if(k.data.data){const e=k.data.data.find((e=>e.checked));e&&(n=e.value)}break;case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:n=e.detail.stringifiedValues,k.data&&(k.data.data=e.detail.comp.data);break;case c.IMAGE_LIST:const o=e.detail.details.cell.obj;n=(null==o?void 0:o.k)?o.k:e.detail.details.cell.value}k.obj&&(k.obj.k=null==n?void 0:n.toString()),k.value=null==n?void 0:n.toString(),k.displayedValue=null,k.displayedValue=p(v,k)}if(f&&f.rootElement){const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:f,id:f.rootElement.id,cell:k,column:v,event:e,row:m,type:o,inputValue:(null===(b=null===(d=k.element)||void 0===d?void 0:d.querySelector("input"))||void 0===b?void 0:b.value)||null}});if(f.rootElement.dispatchEvent(n),t===h.UPDATE)try{f.refresh()}catch(e){T.ketchup.debug.logMessage(f,e,O.ERROR)}}}function ce(e){var n;return f.includes(null===(n=e.component)||void 0===n?void 0:n.rootElement.tagName)}function le(e){var n;return k.includes(null===(n=e.component)||void 0===n?void 0:n.rootElement.tagName)}export{V as F,D as a,E as b,A as c,B as d,M as e}
|
|
@@ -548,6 +548,19 @@ export declare class KupDataTable {
|
|
|
548
548
|
componentDidLoad(): void;
|
|
549
549
|
resetCurrentPage(): void;
|
|
550
550
|
getColumns(): Array<KupDataColumn>;
|
|
551
|
+
/**
|
|
552
|
+
* Retrieves the list of visible columns based on configuration and grouping state.
|
|
553
|
+
*
|
|
554
|
+
* This method handles multiple visibility scenarios:
|
|
555
|
+
* 1. Explicit visibility list (via visibleColumns property)
|
|
556
|
+
* 2. Column-level visibility flags
|
|
557
|
+
* 3. CodVer (code/version) column filtering
|
|
558
|
+
* 4. Group-based visibility when grouping is enabled
|
|
559
|
+
*
|
|
560
|
+
* @param {Object} options - Configuration options
|
|
561
|
+
* @param {boolean} options.includeCodVer - If true, includes CodVer columns in the result (default: false)
|
|
562
|
+
* @returns {Array<KupDataColumn>} Array of visible columns, ordered and filtered according to configuration
|
|
563
|
+
*/
|
|
551
564
|
getVisibleColumns({ includeCodVer }?: {
|
|
552
565
|
includeCodVer?: boolean;
|
|
553
566
|
}): Array<KupDataColumn>;
|
|
@@ -21,7 +21,7 @@ export declare class KupData {
|
|
|
21
21
|
* @param {KupDataTableRow} row single row.
|
|
22
22
|
* @returns { { id: string, column: KupDataColumn; cell: KupDataTableCell }[]} row codvers
|
|
23
23
|
*/
|
|
24
|
-
getRowCodVers: (columns: KupDataColumn[], row: KupDataTableRow) => {
|
|
24
|
+
getRowCodVers: (columns: KupDataColumn[], row: KupDataTableRow, visibleColumns: string[]) => {
|
|
25
25
|
id: string;
|
|
26
26
|
column: KupDataColumn;
|
|
27
27
|
cell: KupDataTableCell;
|
|
@@ -87,9 +87,9 @@ export declare class KupData {
|
|
|
87
87
|
/**
|
|
88
88
|
* Check if almost one column has COD_VER
|
|
89
89
|
* @param { KupDataColumn[] } columns single column.
|
|
90
|
-
* @returns { boolean }
|
|
90
|
+
* @returns { boolean } result of cod_ver search.
|
|
91
91
|
*/
|
|
92
|
-
hasCodVer: (columns: KupDataColumn[]) => boolean;
|
|
92
|
+
hasCodVer: (columns: KupDataColumn[], visibleColumns: string[]) => boolean;
|
|
93
93
|
};
|
|
94
94
|
node: {
|
|
95
95
|
getDrilldownInfo(nodes: KupDataNode[]): KupDataNodeDrilldownInfo;
|
|
@@ -117,7 +117,7 @@ export declare class KupData {
|
|
|
117
117
|
* @param { KupCommand[] } commands commands in component prop
|
|
118
118
|
* @returns { KupDataRowAction[] } action that must be show on row
|
|
119
119
|
*/
|
|
120
|
-
buildRowActions: (row: KupDataRow, columns: KupDataColumn[], actions: KupDataRowAction[], commands: KupCommand[]) => KupDataRowAction[];
|
|
120
|
+
buildRowActions: (row: KupDataRow, columns: KupDataColumn[], actions: KupDataRowAction[], commands: KupCommand[], visibleColumns: string[]) => KupDataRowAction[];
|
|
121
121
|
};
|
|
122
122
|
action: {
|
|
123
123
|
/**
|
|
@@ -147,7 +147,7 @@ export declare class KupData {
|
|
|
147
147
|
* @param {KupCommand[]} commands group of commands.
|
|
148
148
|
* @returns { KupDataRowAction[]} Actions founded.
|
|
149
149
|
*/
|
|
150
|
-
createActionsFromVoCodRow: (row: KupDataTableRow, columns: KupDataColumn[], commands: KupCommand[]) => KupDataRowAction[];
|
|
150
|
+
createActionsFromVoCodRow: (row: KupDataTableRow, columns: KupDataColumn[], commands: KupCommand[], visibleColumns: string[]) => KupDataRowAction[];
|
|
151
151
|
/**
|
|
152
152
|
* Creates a row action object, optionally linked to a command.
|
|
153
153
|
* Handles both default CODVER actions and COMMAND-based actions.
|