@sme.up/ketchup 11.0.0-SNAPSHOT-20250115150844 → 11.0.0-SNAPSHOT-20250115163113
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-de130b6e.js → f-cell-823c0f27.js} +8 -4
- package/dist/cjs/{f-chip-730c3e47.js → f-chip-e7733d4f.js} +1 -1
- package/dist/cjs/{f-object-field-9787234f.js → f-object-field-5abaa74e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-2d0f35ae.js → f-paginator-utils-6f367510.js} +1 -1
- package/dist/cjs/{f-text-field-216090a9.js → f-text-field-3d362e56.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +13 -12
- package/dist/cjs/kup-box.cjs.entry.js +13 -12
- package/dist/cjs/kup-calendar.cjs.entry.js +125 -54
- 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-4b2129ba.js → kup-data-table-helper-369072f0.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js +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-22358eba.js → kup-manager-b4ee0e69.js} +5 -3
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-box/kup-box.js +6 -5
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -0
- package/dist/collection/components/kup-calendar/kup-calendar-state.js +5 -0
- package/dist/collection/components/kup-calendar/kup-calendar.js +156 -52
- package/dist/collection/components/kup-tree/kup-tree.js +6 -5
- package/dist/collection/f-components/f-cell/f-cell.js +4 -0
- package/dist/collection/utils/cell-utils.js +5 -3
- 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 +127 -54
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +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-pdf.js +2 -2
- package/dist/components/kup-photo-frame.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-56ac07f6.js → p-3553a914.js} +2 -2
- package/dist/components/{p-79520a06.js → p-58d1b25e.js} +2 -2
- package/dist/components/{p-55db2b6d.js → p-59efe29f.js} +2 -2
- package/dist/components/{p-d86d7bda.js → p-60a23d8f.js} +11 -6
- package/dist/components/{p-302afb7a.js → p-71fb255c.js} +8 -7
- package/dist/components/{p-ad519bcc.js → p-9a52cf80.js} +6 -4
- package/dist/esm/{f-cell-b30ba79a.js → f-cell-2aa8e38c.js} +8 -4
- package/dist/esm/{f-chip-3a7cb4f8.js → f-chip-7030a6b7.js} +1 -1
- package/dist/esm/{f-object-field-4988dd7b.js → f-object-field-faa9f92c.js} +2 -2
- package/dist/esm/{f-paginator-utils-dcf8ab6a.js → f-paginator-utils-3e911694.js} +1 -1
- package/dist/esm/{f-text-field-2c973324.js → f-text-field-ddb43a8d.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_28.entry.js +13 -12
- package/dist/esm/kup-box.entry.js +13 -12
- package/dist/esm/kup-calendar.entry.js +125 -54
- 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-81d2d07f.js → kup-data-table-helper-0acc1df9.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +5 -5
- package/dist/esm/kup-input-panel.entry.js +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-ca77a2e1.js → kup-manager-0255a23e.js} +5 -3
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3d2f1f12.js → p-00ce3103.js} +1 -1
- package/dist/ketchup/{p-fd115e9d.js → p-0b5b175c.js} +1 -1
- package/dist/ketchup/{p-f69ee132.entry.js → p-1c499e9b.entry.js} +1 -1
- package/dist/ketchup/{p-d202ae0a.entry.js → p-1c8640ad.entry.js} +1 -1
- package/dist/ketchup/{p-ff3761cf.entry.js → p-258f9a76.entry.js} +1 -1
- package/dist/ketchup/{p-5d302874.entry.js → p-281c8b1b.entry.js} +1 -1
- package/dist/ketchup/{p-1e2967e3.entry.js → p-33d43ec6.entry.js} +1 -1
- package/dist/ketchup/{p-355974f1.entry.js → p-3ad0ac42.entry.js} +1 -1
- package/dist/ketchup/{p-4fad0f38.entry.js → p-3fae8f6d.entry.js} +1 -1
- package/dist/ketchup/{p-aba86824.js → p-4505f903.js} +1 -1
- package/dist/ketchup/{p-f78befa1.entry.js → p-4786e087.entry.js} +1 -1
- package/dist/ketchup/{p-ce02f27e.entry.js → p-4798a49a.entry.js} +1 -1
- package/dist/ketchup/{p-b59ea56b.js → p-4886e26b.js} +1 -1
- package/dist/ketchup/{p-8dd1d91d.entry.js → p-60ea9a9d.entry.js} +1 -1
- package/dist/ketchup/{p-e32245fd.entry.js → p-63c353b0.entry.js} +1 -1
- package/dist/ketchup/{p-062851ea.entry.js → p-671b4dc9.entry.js} +1 -1
- package/dist/ketchup/{p-bf9b7237.entry.js → p-6a2aa972.entry.js} +1 -1
- package/dist/ketchup/{p-52f1a2bc.entry.js → p-6c7d4b54.entry.js} +1 -1
- package/dist/ketchup/{p-e7f592ef.entry.js → p-7207cec9.entry.js} +1 -1
- package/dist/ketchup/p-7d152b15.js +1 -0
- package/dist/ketchup/{p-0bfd28b7.entry.js → p-8031909a.entry.js} +1 -1
- package/dist/ketchup/p-8636974b.entry.js +1 -0
- package/dist/ketchup/{p-af884f84.entry.js → p-879c86ff.entry.js} +1 -1
- package/dist/ketchup/{p-45d5264d.entry.js → p-8eeb61be.entry.js} +1 -1
- package/dist/ketchup/{p-3afacd1c.js → p-a166fdf2.js} +1 -1
- package/dist/ketchup/{p-997b94f9.entry.js → p-a389bc98.entry.js} +1 -1
- package/dist/ketchup/{p-3e273410.entry.js → p-aa77e8a7.entry.js} +1 -1
- package/dist/ketchup/{p-69c3b3fd.entry.js → p-b0639472.entry.js} +2 -2
- package/dist/ketchup/{p-0dc3dd14.js → p-b4bd6ef0.js} +1 -1
- package/dist/ketchup/{p-2e576700.entry.js → p-ba7bd783.entry.js} +1 -1
- package/dist/ketchup/{p-4b913e48.entry.js → p-bcc871a0.entry.js} +1 -1
- package/dist/ketchup/{p-bb749e71.entry.js → p-cee4fdb5.entry.js} +1 -1
- package/dist/ketchup/{p-2a6cc9f6.entry.js → p-d1b148ad.entry.js} +1 -1
- package/dist/ketchup/{p-0b9fee26.entry.js → p-e66f3d17.entry.js} +1 -1
- package/dist/ketchup/{p-4cabcbb7.entry.js → p-eada699b.entry.js} +1 -1
- package/dist/ketchup/{p-1a18f3c1.entry.js → p-f537e04b.entry.js} +1 -1
- package/dist/ketchup/{p-fcf845c9.entry.js → p-f8fdcc20.entry.js} +1 -1
- package/dist/ketchup/{p-fd420db2.entry.js → p-fc32aa0e.entry.js} +1 -1
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +2 -1
- package/dist/types/components/kup-calendar/kup-calendar-state.d.ts +7 -0
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +8 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/ketchup/p-998139e0.js +0 -1
- package/dist/ketchup/p-d5936098.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{F as a}from"./p-3afacd1c.js";import{k as u,a6 as h,F as r,g as c,s as p,h as f,ab as d,ah as m,ae as b,ag as v,af as k,ai as g,e as _,O as x}from"./p-b59ea56b.js";import{F as y}from"./p-7db300e0.js";import{F as w,a as j}from"./p-60cfddce.js";import{c as O}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-982a5cfc.js";import"./p-fd115e9d.js";import"./p-0dc3dd14.js";import"./p-3d2f1f12.js";import"./p-1ee561ba.js";import"./p-c56195a0.js";var F,$,T,z;!function(t){t.TAB="tab"}(F||(F={})),function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the input panel.",t.hiddenSubmitButton="Creates a hidden submit button in order to submit the form with enter.",t.submitCb="Sets the callback function on submit form",t.optionsHandler="Sets the callback function to recieve options",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus."}($||($={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}(T||(T={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(z||(z={}));const E={"*F01":"F1","*F02":"F2","*F03":"F3","*F04":"F4","*F05":"F5","*F06":"F6","*F07":"F7","*F08":"F8","*F09":"F9","*F10":"F10","*F11":"F11","*F12":"F12","*F13":"shift+F1","*F14":"shift+F2","*F15":"shift+F3","*F16":"shift+F4","*F17":"shift+F5","*F18":"shift+F6","*F19":"shift+F7","*F20":"shift+F8","*F21":"shift+F9","*F22":"shift+F10","*F23":"shift+F11","*F24":"shift+F12","*ENT":"Enter","*PDN":"PageDown","*PUP":"PageUp"},M=t=>0==t?5:t?1===t?15:10*t:null,S=t=>t?22*t:null,C=t=>t?22*(t-1):null,D=t=>t?10*t:null;var P,L,W,I,N,K,H,R,A,U,G,V,B,J,X,Y,q,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,ht,rt,ct,pt,ft,dt,mt,bt,vt,kt,gt,_t,xt,yt,wt,jt,Ot,Ft,$t,Tt,zt,Et,Mt,St,Ct,Dt,Pt,Lt,Wt,It,Nt,Kt,Ht,Rt,At,Ut,Gt,Vt,Bt,Jt=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},Xt=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const Yt=document.documentElement,qt=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),this.kupInputPanelObjectFieldSearchPayload=i(this,"kup-inputpanel-objectfield-searchpayload",6),this.kupInputPanelObjectFieldOpenSearchMenu=i(this,"kup-inputpanel-objectfield-opensearchmenu",6),this.kupInputPanelObjectFieldSelectedMenuItem=i(this,"kup-inputpanel-objectfield-selectedmenuitem",6),P.add(this),L.set(this,u()),W.set(this,void 0),I.set(this,new Map([["SmeupTreeNode",Jt(this,P,"m",Ct).bind(this)],["SmeupDataTree",Jt(this,P,"m",Dt).bind(this)],["SmeupTable",Jt(this,P,"m",Pt).bind(this)],["SmeupDataTable",Jt(this,P,"m",Pt).bind(this)]])),N.set(this,null),K.set(this,new Map([[h.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[h.MULTI_COMBOBOX,["kup-combobox-iconclick"]]])),H.set(this,[]),R.set(this,new Map([[h.DATE,"kup-date-picker"],[h.TIME,"kup-time-picker"]])),A.set(this,new Map([[r.BUTTON_LIST,Jt(this,P,"m",X).bind(this)],[r.LABEL,Jt(this,P,"m",Q).bind(this)],[r.TABLE,Jt(this,P,"m",q).bind(this)]])),U.set(this,new Map([[F.TAB,Jt(this,P,"m",st).bind(this)]])),G.set(this,[]),this.buttonPosition=z.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.inputPanelPosition=T.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){Xt(this,N,structuredClone(this.data),"f"),Jt(this,H,"f").length&&(Jt(this,H,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),Xt(this,H,[],"f")),Jt(this,G,"f").length&&(Jt(this,G,"f").map((t=>{Jt(this,L,"f").keysBinding.unregister(t)})),Xt(this,G,[],"f")),this.data&&Jt(this,P,"m",ht).call(this,this.data)}async getProps(t){return c(this,$,t)}async refresh(){n(this)}async setProps(t){p(this,$,t)}componentWillLoad(){Jt(this,L,"f").debug.logLoad(this,!1),Jt(this,L,"f").language.register(this),Jt(this,L,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Jt(this,P,"m",Ut).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Jt(this,P,"m",Gt).call(this),Jt(this,L,"f").debug.logLoad(this,!0)}componentWillRender(){Jt(this,L,"f").debug.logRender(this,!1)}componentDidRender(){if(Jt(this,W,"f")){const t=Jt(this,W,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)y(t[i])}Jt(this,L,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Jt(this,L,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>Jt(this,P,"m",B).call(this,t)));return e(l,{key:"2693a3209b62fa0fa6346c2dd92aa6668212e264","onKup-cell-blur":Jt(this,P,"m",It).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Jt(this,P,"m",gt).bind(this),"onKup-autocomplete-iconclick":Jt(this,P,"m",gt).bind(this),"onKup-combobox-iconclick":t=>Jt(this,P,"m",gt).call(this,t,!0),"onKup-objectfield-searchpayload":t=>{this.kupInputPanelObjectFieldSearchPayload.emit(t.detail)},"onKup-objectfield-opensearchmenu":t=>{this.kupInputPanelObjectFieldOpenSearchMenu.emit(t.detail)},"onKup-objectfield-selectedmenuitem":t=>{this.kupInputPanelObjectFieldSelectedMenuItem.emit(t.detail)}},e("style",{key:"6a278ab0fb5a9c1ce040eb333d5d252ecddd631f"},Jt(this,L,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"2a8ec9ae9aa81826ef7f5e3cf16298f29f1d8763",id:O},t))}disconnectedCallback(){Jt(this,L,"f").language.unregister(this),Jt(this,L,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};L=new WeakMap,W=new WeakMap,I=new WeakMap,N=new WeakMap,K=new WeakMap,H=new WeakMap,R=new WeakMap,A=new WeakMap,U=new WeakMap,G=new WeakMap,P=new WeakSet,V=function(t){return this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null)},B=function(t){var i,n;const l=t.row.layout,s=(null==l?void 0:l.horizontal)||!1,a={};let u;if(null===(i=null==l?void 0:l.sections)||void 0===i?void 0:i.length)if(l.absolute)u=Jt(this,P,"m",it).call(this,t,l),a.height=22*(t=>{let i=0;return t.sections.forEach((t=>{t.content.forEach((t=>{t.absoluteRow>i&&(i=t.absoluteRow+(t.absoluteHeight>1?t.absoluteHeight:0))}))})),i})(l)+12+"px";else{if(!l.sectionsType){const i=l.sections.some((t=>t.dim));a.display="grid",this.inputPanelPosition!==T.INLINE&&this.inputPanelPosition!==T.UPINLINE||(a.display=""),l.horizontal?a.gridTemplateColumns=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(a.gridTemplateRows=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${l.sections.length}, 1fr)`)}u=Jt(this,P,"m",tt).call(this,t,l)}else u=t.cells.filter((({column:t})=>t.visible)).map((i=>Jt(this,P,"m",J).call(this,i.cell,t.row,i.column)));const h={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==z.RIGHT},r={"input-panel":!0,"input-panel--column":!s,"input-panel--absolute":null==l?void 0:l.absolute,"input-panel--inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE},c={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},p={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:j.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:h,ref:t=>Xt(this,W,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)}})},onContextMenu:t=>{t.preventDefault()}},e("div",{class:"input-panel__typography"},e(w,Object.assign({},p))),e("div",{class:r,style:a},u),e("div",{class:c},e(o,{buttonType:"submit",label:Jt(this,L,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},J=function(t,i,n){var l;if(!t)return;const s=Jt(this,A,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);const o={cell:t,column:n,row:i,component:this,editable:!0,renderKup:!0,setSizes:!0},u=Jt(this,P,"m",Z).call(this,t,n.title);return u?e("div",{class:{"input-panel__label_container":!0}},u,e(a,Object.assign({},o))):e(a,Object.assign({},o))},X=function(t,{name:i}){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},Y=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Jt(this,P,"m",Ht).call(this,t.detail.node,t.detail.node.id)}}))},q=function(t,{name:i}){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},Q=function(t,i,n){const l=Yt.ketchup.data.cell.getType(t,t.shape),s="input-panel-label",o=n?" input-panel-label--legacy-look":"";return l===h.NUMBER?e("span",{class:`${s}${o}${l===h.NUMBER?" input-panel-label-number":""}`,id:i.name},d(i,t)):e("span",{class:`${s}${o}`,id:i.name},t.value)},Z=function(t,i){return i&&Yt.ketchup.data.cell.getType(t,t.shape)===h.RADIO?e("span",null,i):null},tt=function(t,i){const n=Jt(this,U,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Jt(this,P,"m",nt).call(this,t,i,!1)))},it=function(t,i){return i.sections.map((i=>Jt(this,P,"m",et).call(this,t,i)))},nt=function t(i,n,l=!1,s={}){var o,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE};s.gap=+n.gap>0?`${n.gap}rem`:"1rem";let h=[];if(null===(o=n.sections)||void 0===o?void 0:o.length){h=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(s.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(s.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(h=n.content.map((t=>Jt(this,P,"m",ot).call(this,i,t))),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const r=e("div",{class:u,style:s},h.filter(Boolean));return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(w,{type:j.HEADING1,value:n.title}),r):r},et=function t(i,n){var l,s;let o=[];if((null===(l=n.sections)||void 0===l?void 0:l.length)?o=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n))):(null===(s=n.content)||void 0===s?void 0:s.length)&&(o=n.content.map((t=>Jt(this,P,"m",at).call(this,i,t)))),null==M(n.absoluteWidth))return o;const a=null!=M(n.absoluteWidth)?`${M(n.absoluteWidth)}px`:"100%",u=null!=S(n.absoluteHeight)?`${S(n.absoluteHeight)}px`:"100%",h=`${C(n.absoluteRow)}px`,r=`${D(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:h,left:r,overflow:"auto"}},o)},lt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(Jt(this,P,"m",t).call(this,i))})),l},st=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Jt(this,P,"m",lt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return Jt(this,P,"m",nt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},ot=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell||!n.column.visible)return;const l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,s=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":s?`span ${s}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},at=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell||!n.column.visible)return;let l;l=n.cell.shape==r.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=n.cell.shape===r.LABEL?(t=>0==t?3.599999999999999:t?1===t?10.799999999999997:7.199999999999998*t:null)(l):M(l),o=S(i.absoluteHeight),a=C(i.absoluteRow),u=D(i.absoluteColumn),h={position:"absolute",width:null!==s?`${s}px`:null,"min-width":null!==s?`${s}px`:null,"max-width":null!==s?`${s}px`:null,height:null!==o?`${o}px`:null,"min-height":null!==o?`${o}px`:null,"max-height":null!==o?`${o}px`:null,top:null!==a?`${C(i.absoluteRow)}px`:null,left:null!==u?`${D(i.absoluteColumn)}px`:null,overflow:"auto"};return n.cell.data=Object.assign(Object.assign(Object.assign({},n.cell.data),{customStyle:(n.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),n.cell.shape===r.TABLE&&{rowsPerPage:n.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${o}px`}),e("div",{style:h},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},ut=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>Jt(this,P,"m",Lt).call(this,t)))}};return Jt(this,P,"m",Y).call(this,t,i)}{const i=Jt(this,P,"m",Lt).call(this,t);return Jt(this,P,"m",X).call(this,i,{name:t.value,title:t.value})}})).flat()},ht=function(t){var i,n,e,l;(null===(n=null===(i=t.setup)||void 0===i?void 0:i.commands)||void 0===n?void 0:n.length)&&Jt(this,P,"m",ut).call(this);const s=null===(e=null==t?void 0:t.rows[0])||void 0===e?void 0:e.layout,o=(null===(l=null==t?void 0:t.rows)||void 0===l?void 0:l.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Jt(this,P,"m",rt).call(this,i,t,s),slotData:Jt(this,P,"m",dt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Yt.ketchup.data.cell.getType(t,t.shape),e=Jt(this,R,"f").get(n);if(!e)return;const l=this.rootElement.shadowRoot.querySelector(`${e}[id='${i.name.replace(/\//g,"\\$1")}']`);t.value&&(null==l||l.setValue(t.value))})))),this.inputPanelCells=o},rt=function(t,i,n){const e=Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,t,i,n)),{disabled:!t.editable,id:i.name}),l=Yt.ketchup.data.cell.getType(t,t.shape),s=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==h.MULTI_AUTOCOMPLETE&&l!==h.MULTI_COMBOBOX?Jt(this,P,"m",ct).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},ct=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Jt(this,P,"m",t).call(this,i[e],n[e]):n[e];return i},pt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let s=null==l?void 0:l.value;return(null==l?void 0:l.shape)===r.TABLE&&(s=JSON.stringify(Jt(this,P,"m",Mt).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:s,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},ft=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const s=t.value,o=Yt.ketchup.data.cell.getType(t,t.shape),a=new Map([[h.AUTOCOMPLETE,Jt(this,P,"m",kt).bind(this)],[h.BUTTON_LIST,Jt(this,P,"m",vt).bind(this)],[h.CHART,Jt(this,P,"m",bt).bind(this)],[h.CHIP,Jt(this,P,"m",mt).bind(this)],[h.CHECKBOX,Jt(this,P,"m",_t).bind(this)],[h.COLOR_PICKER,Jt(this,P,"m",xt).bind(this)],[h.COMBOBOX,Jt(this,P,"m",kt).bind(this)],[h.EDITOR,Jt(this,P,"m",yt).bind(this)],[h.MULTI_AUTOCOMPLETE,Jt(this,P,"m",mt).bind(this)],[h.MULTI_COMBOBOX,Jt(this,P,"m",mt).bind(this)],[h.NUMBER,Jt(this,P,"m",zt).bind(this)],[h.DATE,Jt(this,P,"m",Ft).bind(this)],[h.OBJECT,Jt(this,P,"m",$t).bind(this)],[h.RADIO,Jt(this,P,"m",jt).bind(this)],[h.STRING,Jt(this,P,"m",wt).bind(this)],[h.SWITCH,Jt(this,P,"m",Ot).bind(this)],[h.TABLE,Jt(this,P,"m",Et).bind(this)],[h.TIME,Jt(this,P,"m",Tt).bind(this)]]).get(o);return a?a(e,l,s,t,i.name):null},dt=function(t,i){const n=Yt.ketchup.data.cell.getType(t,t.shape);return t.editable?n===h.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.editable,id:i.name,fullWidth:!1}:n===h.MULTI_AUTOCOMPLETE||n===h.MULTI_COMBOBOX?Object.assign(Object.assign({},Jt(this,P,"m",kt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.editable,id:i.name}):null:null},mt=function(t,i,n){return m(n)},bt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},vt=function(t,i,n,e,l){var s,o,a,u;return e.data=e.data||{},e.data.onClick=()=>{Jt(this,P,"m",Ht).call(this,e,l)},(null===(s=e.data)||void 0===s?void 0:s.keyShortcut)&&!(null===(o=e.data)||void 0===o?void 0:o.disabled)&&(Jt(this,G,"f").push(null===(a=e.data)||void 0===a?void 0:a.keyShortcut),Jt(this,L,"f").keysBinding.register(null===(u=e.data)||void 0===u?void 0:u.keyShortcut,e.data.onClick.bind(this))),Object.assign({label:e.value,fun:e.fun},e.data)},kt=function(t,i,n){const e=b(n,i,[]);return t&&(e.data["kup-list"].data=Jt(this,P,"m",St).call(this,t,n)),e},gt=function({detail:t},i=!1){const n=Jt(this,P,"m",V).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),n.fun&&e&&Jt(this,P,"m",Wt).call(this,t,n)},_t=function(t,i,n){return v(n,i)},xt=function(t,i){return{data:{"kup-text-field":{label:i}}}},yt=function(t,i,n){return{initialValue:n}},wt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&(e.isEditable||e.editable)&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Jt(this,P,"m",Bt).call(this,l,t)}),o},jt=function(t,i,n){return k(n,t)},Ot=function(t,i,n){return g(n,i)},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},$t=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Tt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},zt=function(t,i){return{label:i}},Et=function(t,i,n,e,l){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Jt(this,L,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,_.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,i.cells[e],l)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Jt(this,L,"f").debug.logMessage(this,`Empty value for ${l} cell.`,_.WARNING),null)}catch(t){return Jt(this,L,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,_.ERROR),null}},Mt=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(Jt(this,N,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const s=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),s?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},St=function(t,i){const n=Jt(this,I,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Pt=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[l].value||n[e].value,selected:i===n[e].value}}))},Lt=function(t){return t.data&&!t.data.keyShortcut&&Jt(this,L,"f").objects.isJ1Key(t.obj?t.obj:{})&&(t.data.keyShortcut=E[t.obj.k]),Object.assign(Object.assign({},t),{data:Jt(this,P,"m",vt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Wt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Jt(this,P,"m",pt).call(this),t.id).then((n=>{var e,l,s,o,a;const u=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>(null==t?void 0:t.visible)||!("visible"in t))).map((t=>t.name)))||[],h=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=u.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),r=Object.assign(Object.assign({},n),{rows:h}),c=null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];c?c.data=(null==h?void 0:h.length)&&null!==(a=Jt(this,P,"m",St).call(this,r,i.value))&&void 0!==a?a:[]:Jt(this,L,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',_.WARNING),t.comp.refresh()}))},It=async function(t){var i,n,e,l,s;const{detail:{column:o,cell:a}}=t,u=Jt(this,P,"m",V).call(this,o.name),h=Jt(this,N,"f").rows[0].cells[o.name];if(u){if(a.mandatory){if(Jt(this,P,"m",Nt).call(this,o.name,u.value?(null===(i=h.data)||void 0===i?void 0:i.error)||null:Jt(this,L,"f").language.translate(f.REQUIRED_VALUE)),!a.value)return}else Jt(this,P,"m",Nt).call(this,o.name,(null===(n=h.data)||void 0===n?void 0:n.error)||null);if(null===(e=a.inputSettings)||void 0===e?void 0:e.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:a.obj,currentState:Jt(this,P,"m",pt).call(this),fun:a.fun});if(!t)return void Jt(this,P,"m",Nt).call(this,o.name,Jt(this,L,"f").language.translate(f.INVALID_VALUE));Jt(this,P,"m",Nt).call(this,o.name,(null===(l=h.data)||void 0===l?void 0:l.error)||null)}(null===(s=a.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&Jt(this,P,"m",Kt).call(this)&&this.checkValidValueCallback({before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},o.name)}},Nt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Kt=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Ht=function(t,i){t.fun?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Jt(this,P,"m",pt).call(this)}):this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},cell:i})},Rt=function(t,i){const n=t.find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}));if(null==n)return;const e=Jt(this,P,"m",pt).call(this),l=n["kup-get-cell-props"]().column.name;return{anchor:n,cell:e.rows[0].cells[l],column:e.columns.find((t=>t.name==l)),row:e.rows[0],originalEvent:i}},At=function(t){const i=Jt(this,L,"f").getEventPath(t.target,this.rootElement);return Jt(this,P,"m",Rt).call(this,i,t)},Ut=function(){Jt(this,L,"f").interact.managedElements.add(Jt(this,W,"f")),Jt(this,L,"f").interact.on(Jt(this,W,"f"),x.TAP,(t=>{if(2==t.button){const i=Jt(this,P,"m",At).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Gt=function(){if(!Jt(this,W,"f"))return;const t=Array.from(Jt(this,W,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Jt(this,P,"m",Vt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Jt(this,P,"m",Vt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Vt=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const s=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of s){const i=t.shadowRoot.querySelector(e);if(i)return i}},Bt=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:s,value:o}=l;if(!s||s<0||(null==o?void 0:o.length)<s)return;const a=Array.from(null===(n=Jt(this,W,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},qt.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";export{qt as kup_input_panel}
|
|
1
|
+
import{r as t,c as i,f as n,h as e,H as l,d as s}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{F as a}from"./p-a166fdf2.js";import{k as u,a6 as h,F as r,g as c,s as p,h as f,ab as d,ah as m,ae as b,ag as v,af as k,ai as g,e as _,O as x}from"./p-4886e26b.js";import{F as y}from"./p-7db300e0.js";import{F as w,a as j}from"./p-60cfddce.js";import{c as O}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-982a5cfc.js";import"./p-0b5b175c.js";import"./p-b4bd6ef0.js";import"./p-00ce3103.js";import"./p-1ee561ba.js";import"./p-c56195a0.js";var F,$,T,z;!function(t){t.TAB="tab"}(F||(F={})),function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the input panel.",t.hiddenSubmitButton="Creates a hidden submit button in order to submit the form with enter.",t.submitCb="Sets the callback function on submit form",t.optionsHandler="Sets the callback function to recieve options",t.buttonPosition="Manage the position of the buttons related to the input panel content. It is an enumeration",t.inputPanelPosition="Manage the global layout of the input panel fields. The default is COLUMNS.",t.autoSkip="Sets the auto skip between input text fields when the value reaches the max length.",t.autoFocus="Sets whether the first input should receive focus."}($||($={})),function(t){t.COLUMNS="COLUMNS",t.INLINE="INLINE",t.STRETCHED="STRETCHED",t.UPINLINE="UPINLINE",t.UPCOLUMNS="UPCOLUMNS",t.PLACEHOLDER="PLACEHOLDER"}(T||(T={})),function(t){t.CENTER="CENTER",t.LEFT="LEFT",t.BOTTOM="BOTTOM",t.RIGHT="RIGHT",t.TOP="TOP"}(z||(z={}));const E={"*F01":"F1","*F02":"F2","*F03":"F3","*F04":"F4","*F05":"F5","*F06":"F6","*F07":"F7","*F08":"F8","*F09":"F9","*F10":"F10","*F11":"F11","*F12":"F12","*F13":"shift+F1","*F14":"shift+F2","*F15":"shift+F3","*F16":"shift+F4","*F17":"shift+F5","*F18":"shift+F6","*F19":"shift+F7","*F20":"shift+F8","*F21":"shift+F9","*F22":"shift+F10","*F23":"shift+F11","*F24":"shift+F12","*ENT":"Enter","*PDN":"PageDown","*PUP":"PageUp"},M=t=>0==t?5:t?1===t?15:10*t:null,S=t=>t?22*t:null,C=t=>t?22*(t-1):null,D=t=>t?10*t:null;var P,L,W,I,N,K,H,R,A,U,G,V,B,J,X,Y,q,Q,Z,tt,it,nt,et,lt,st,ot,at,ut,ht,rt,ct,pt,ft,dt,mt,bt,vt,kt,gt,_t,xt,yt,wt,jt,Ot,Ft,$t,Tt,zt,Et,Mt,St,Ct,Dt,Pt,Lt,Wt,It,Nt,Kt,Ht,Rt,At,Ut,Gt,Vt,Bt,Jt=function(t,i,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!e:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(t):e?e.value:i.get(t)},Xt=function(t,i,n,e,l){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!l:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?l.call(t,n):l?l.value=n:i.set(t,n),n};const Yt=document.documentElement,qt=class{constructor(n){t(this,n),this.kupReady=i(this,"kup-input-panel-ready",6),this.kupDataTableContextMenu=i(this,"kup-inputpanel-contextmenu",6),this.kupInputPanelObjectFieldSearchPayload=i(this,"kup-inputpanel-objectfield-searchpayload",6),this.kupInputPanelObjectFieldOpenSearchMenu=i(this,"kup-inputpanel-objectfield-opensearchmenu",6),this.kupInputPanelObjectFieldSelectedMenuItem=i(this,"kup-inputpanel-objectfield-selectedmenuitem",6),P.add(this),L.set(this,u()),W.set(this,void 0),I.set(this,new Map([["SmeupTreeNode",Jt(this,P,"m",Ct).bind(this)],["SmeupDataTree",Jt(this,P,"m",Dt).bind(this)],["SmeupTable",Jt(this,P,"m",Pt).bind(this)],["SmeupDataTable",Jt(this,P,"m",Pt).bind(this)]])),N.set(this,null),K.set(this,new Map([[h.AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.MULTI_AUTOCOMPLETE,["kup-autocomplete-input","kup-autocomplete-iconclick"]],[h.COMBOBOX,["kup-combobox-iconclick","kup-combobox-blur"]],[h.MULTI_COMBOBOX,["kup-combobox-iconclick"]]])),H.set(this,[]),R.set(this,new Map([[h.DATE,"kup-date-picker"],[h.TIME,"kup-time-picker"]])),A.set(this,new Map([[r.BUTTON_LIST,Jt(this,P,"m",X).bind(this)],[r.LABEL,Jt(this,P,"m",Q).bind(this)],[r.TABLE,Jt(this,P,"m",q).bind(this)]])),U.set(this,new Map([[F.TAB,Jt(this,P,"m",st).bind(this)]])),G.set(this,[]),this.buttonPosition=z.BOTTOM,this.customStyle="",this.dashboardMode=!1,this.data=null,this.hiddenSubmitButton=!1,this.inputPanelPosition=T.COLUMNS,this.submitCb=null,this.optionsHandler=null,this.customButtonClickHandler=null,this.checkValidObjCallback=null,this.checkValidValueCallback=null,this.autoFocus=!1,this.autoSkip=!1,this.inputPanelCells=[],this.inputPanelCommands=[],this.tabSelected=null}onDataChanged(){Xt(this,N,structuredClone(this.data),"f"),Jt(this,H,"f").length&&(Jt(this,H,"f").map((({event:t,handler:i})=>{this.rootElement.removeEventListener(t,i)})),Xt(this,H,[],"f")),Jt(this,G,"f").length&&(Jt(this,G,"f").map((t=>{Jt(this,L,"f").keysBinding.unregister(t)})),Xt(this,G,[],"f")),this.data&&Jt(this,P,"m",ht).call(this,this.data)}async getProps(t){return c(this,$,t)}async refresh(){n(this)}async setProps(t){p(this,$,t)}componentWillLoad(){Jt(this,L,"f").debug.logLoad(this,!1),Jt(this,L,"f").language.register(this),Jt(this,L,"f").theme.register(this),this.onDataChanged()}componentDidLoad(){Jt(this,P,"m",Ut).call(this),this.kupReady.emit({comp:this,id:this.rootElement.id}),Jt(this,P,"m",Gt).call(this),Jt(this,L,"f").debug.logLoad(this,!0)}componentWillRender(){Jt(this,L,"f").debug.logRender(this,!1)}componentDidRender(){if(Jt(this,W,"f")){const t=Jt(this,W,"f").querySelectorAll(".f-text-field");for(let i=0;i<t.length;i++)y(t[i])}Jt(this,L,"f").debug.logRender(this,!0)}render(){const t=Boolean(!this.inputPanelCells.length)?[e("p",null,Jt(this,L,"f").language.translate(f.EMPTY_DATA))]:this.inputPanelCells.map((t=>Jt(this,P,"m",B).call(this,t)));return e(l,{key:"2693a3209b62fa0fa6346c2dd92aa6668212e264","onKup-cell-blur":Jt(this,P,"m",It).bind(this),"onKup-tabbar-click":t=>{this.tabSelected=t.detail.node.id},"onKup-autocomplete-input":Jt(this,P,"m",gt).bind(this),"onKup-autocomplete-iconclick":Jt(this,P,"m",gt).bind(this),"onKup-combobox-iconclick":t=>Jt(this,P,"m",gt).call(this,t,!0),"onKup-objectfield-searchpayload":t=>{this.kupInputPanelObjectFieldSearchPayload.emit(t.detail)},"onKup-objectfield-opensearchmenu":t=>{this.kupInputPanelObjectFieldOpenSearchMenu.emit(t.detail)},"onKup-objectfield-selectedmenuitem":t=>{this.kupInputPanelObjectFieldSelectedMenuItem.emit(t.detail)}},e("style",{key:"6a278ab0fb5a9c1ce040eb333d5d252ecddd631f"},Jt(this,L,"f").theme.setKupStyle(this.rootElement)),e("div",{key:"2a8ec9ae9aa81826ef7f5e3cf16298f29f1d8763",id:O},t))}disconnectedCallback(){Jt(this,L,"f").language.unregister(this),Jt(this,L,"f").theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["onDataChanged"]}}};L=new WeakMap,W=new WeakMap,I=new WeakMap,N=new WeakMap,K=new WeakMap,H=new WeakMap,R=new WeakMap,A=new WeakMap,U=new WeakMap,G=new WeakMap,P=new WeakSet,V=function(t){return this.inputPanelCells.reduce(((i,{cells:n})=>{if(!i){const i=n.find((({column:i})=>i.name===t));return i?i.cell:null}return i}),null)},B=function(t){var i,n;const l=t.row.layout,s=(null==l?void 0:l.horizontal)||!1,a={};let u;if(null===(i=null==l?void 0:l.sections)||void 0===i?void 0:i.length)if(l.absolute)u=Jt(this,P,"m",it).call(this,t,l),a.height=22*(t=>{let i=0;return t.sections.forEach((t=>{t.content.forEach((t=>{t.absoluteRow>i&&(i=t.absoluteRow+(t.absoluteHeight>1?t.absoluteHeight:0))}))})),i})(l)+12+"px";else{if(!l.sectionsType){const i=l.sections.some((t=>t.dim));a.display="grid",this.inputPanelPosition!==T.INLINE&&this.inputPanelPosition!==T.UPINLINE||(a.display=""),l.horizontal?a.gridTemplateColumns=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${t.cells.length}, 1fr)`:this.dashboardMode&&(a.gridTemplateRows=i?l.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${l.sections.length}, 1fr)`)}u=Jt(this,P,"m",tt).call(this,t,l)}else u=t.cells.filter((({column:t})=>t.visible)).map((i=>Jt(this,P,"m",J).call(this,i.cell,t.row,i.column)));const h={"input-panel-form":!0,"input-panel-form--inline":this.buttonPosition==z.RIGHT},r={"input-panel":!0,"input-panel--column":!s,"input-panel--absolute":null==l?void 0:l.absolute,"input-panel--inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE},c={"input-panel__commands":!0,[`input-panel__commands--${this.buttonPosition}`]:!0},p={value:null===(n=null==l?void 0:l.sections[0])||void 0===n?void 0:n.title,type:j.HEADING1};return e("div",null,e("form",{name:this.rootElement.id,id:this.rootElement.id,class:h,ref:t=>Xt(this,W,t,"f"),onSubmit:t=>{t.preventDefault(),this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)}})},onContextMenu:t=>{t.preventDefault()}},e("div",{class:"input-panel__typography"},e(w,Object.assign({},p))),e("div",{class:r,style:a},u),e("div",{class:c},e(o,{buttonType:"submit",label:Jt(this,L,"f").language.translate(f.CONFIRM),wrapperClass:"form__submit",invisible:this.hiddenSubmitButton}),this.inputPanelCommands)))},J=function(t,i,n){var l;if(!t)return;const s=Jt(this,A,"f").get(t.shape);if(void 0!==s)return s(t,n,null===(l=i.layout)||void 0===l?void 0:l.absolute);const o={cell:t,column:n,row:i,component:this,editable:!0,renderKup:!0,setSizes:!0},u=Jt(this,P,"m",Z).call(this,t,n.title);return u?e("div",{class:{"input-panel__label_container":!0}},u,e(a,Object.assign({},o))):e(a,Object.assign({},o))},X=function(t,{name:i}){return e(o,Object.assign({icon:t.icon,id:i},t.data,{wrapperClass:"form__submit"}))},Y=function(t,i){return e("kup-dropdown-button",Object.assign({},t.data,{label:t.value,data:i,"onkup-dropdownbutton-itemclick":t=>{Jt(this,P,"m",Ht).call(this,t.detail.node,t.detail.node.id)}}))},q=function(t,{name:i}){return e("kup-data-table",Object.assign({id:i,editableData:!0,showGroups:!0,showFilters:!0},t.data))},Q=function(t,i,n){const l=Yt.ketchup.data.cell.getType(t,t.shape),s="input-panel-label",o=n?" input-panel-label--legacy-look":"";return l===h.NUMBER?e("span",{class:`${s}${o}${l===h.NUMBER?" input-panel-label-number":""}`,id:i.name},d(i,t)):e("span",{class:`${s}${o}`,id:i.name},t.value)},Z=function(t,i){return i&&Yt.ketchup.data.cell.getType(t,t.shape)===h.RADIO?e("span",null,i):null},tt=function(t,i){const n=Jt(this,U,"f").get(i.sectionsType);return n?n(t,i.sections):i.sections.map((i=>Jt(this,P,"m",nt).call(this,t,i,!1)))},it=function(t,i){return i.sections.map((i=>Jt(this,P,"m",et).call(this,t,i)))},nt=function t(i,n,l=!1,s={}){var o,a;const u={"input-panel__section":!n.horizontal,"input-panel__horizontal-section":n.horizontal,"input-panel__section-inline":this.inputPanelPosition===T.INLINE||this.inputPanelPosition===T.UPINLINE};s.gap=+n.gap>0?`${n.gap}rem`:"1rem";let h=[];if(null===(o=n.sections)||void 0===o?void 0:o.length){h=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n)));const e=n.sections.some((t=>t.dim));!n.gridCols&&n.horizontal&&(s.gridTemplateColumns=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`),n.gridRows||n.horizontal||!this.dashboardMode||(s.gridTemplateRows=e?n.sections.map((t=>t.dim||"auto")).join(" "):`repeat(${n.sections.length}, 1fr)`)}else(null===(a=n.content)||void 0===a?void 0:a.length)&&(h=n.content.map((t=>Jt(this,P,"m",ot).call(this,i,t))),s.gridTemplateColumns=+n.gridCols>0?`repeat(${n.gridCols}, 1fr)`:"",this.dashboardMode&&(s.gridTemplateRows=+n.gridRows>0?`repeat(${n.gridRows}, 1fr)`:""));const r=e("div",{class:u,style:s},h.filter(Boolean));return n.title&&!l?e("div",{class:{"input-panel__section_label_container":!0}},e(w,{type:j.HEADING1,value:n.title}),r):r},et=function t(i,n){var l,s;let o=[];if((null===(l=n.sections)||void 0===l?void 0:l.length)?o=n.sections.map((n=>Jt(this,P,"m",t).call(this,i,n))):(null===(s=n.content)||void 0===s?void 0:s.length)&&(o=n.content.map((t=>Jt(this,P,"m",at).call(this,i,t)))),null==M(n.absoluteWidth))return o;const a=null!=M(n.absoluteWidth)?`${M(n.absoluteWidth)}px`:"100%",u=null!=S(n.absoluteHeight)?`${S(n.absoluteHeight)}px`:"100%",h=`${C(n.absoluteRow)}px`,r=`${D(n.absoluteColumn)}px`;return e("div",{style:{position:"relative",width:a,"min-width":a,"max-width":a,height:u,"min-height":u,"max-height":u,top:h,left:r,overflow:"auto"}},o)},lt=function t(i){var n,e;let l=[];return(null===(n=i.content)||void 0===n?void 0:n.length)&&i.content.forEach((t=>{t.id&&l.push(t.id)})),(null===(e=i.sections)||void 0===e?void 0:e.length)&&i.sections.forEach((i=>{l=l.concat(Jt(this,P,"m",t).call(this,i))})),l},st=function(t,i){this.tabSelected||(this.tabSelected=i[0].id||"0");const n=i.map(((i,n)=>{const e=Jt(this,P,"m",lt).call(this,i),l=t.cells.some((t=>{var i;const n=t.cell;return e.includes(t.column.name)&&!!(null===(i=n.data)||void 0===i?void 0:i.error)}));return{active:(i.id||`${n}`)===this.tabSelected,value:i.title,icon:l?"error":i.icon,id:i.id||`${n}`,danger:l}})),l=i.map(((i,n)=>{const e=i.id||`${n}`;return Jt(this,P,"m",nt).call(this,t,i,!0,{display:this.tabSelected!==e?"none":"grid"})}));return e("div",{class:{"input-panel__tabs_container":!0}},e("kup-tab-bar",{data:n,customStyle:".tab-bar .tab-scroller .tab .tab__content { justify-content: flex-start; }"}),l)},ot=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell||!n.column.visible)return;const l=+i.colSpan>0?i.colSpan:+i.colSpan>0||+i.colStart>0?null:1,s=+i.rowSpan>0?i.rowSpan:+i.rowSpan>0||+i.rowStart>0?null:1;return e("div",{style:{"min-width":"0","grid-column-start":l?`span ${l}`:`${i.colStart}`,"grid-column-end":+i.colEnd>0?`${i.colEnd}`:"","grid-row-start":s?`span ${s}`:`${i.rowStart}`,"grid-row-end":+i.rowEnd>0?`${i.rowEnd}`:""}},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},at=function(t,i){const n=t.cells.find((t=>t.column.name===i.id));if(!n||!n.cell||!n.column.visible)return;let l;l=n.cell.shape==r.DATE?i.absoluteLength>8?i.absoluteLength:8:i.absoluteLength,i.absoluteHeight||(i.absoluteHeight=1);const s=n.cell.shape===r.LABEL?(t=>0==t?3.599999999999999:t?1===t?10.799999999999997:7.199999999999998*t:null)(l):M(l),o=S(i.absoluteHeight),a=C(i.absoluteRow),u=D(i.absoluteColumn),h={position:"absolute",width:null!==s?`${s}px`:null,"min-width":null!==s?`${s}px`:null,"max-width":null!==s?`${s}px`:null,height:null!==o?`${o}px`:null,"min-height":null!==o?`${o}px`:null,"max-height":null!==o?`${o}px`:null,top:null!==a?`${C(i.absoluteRow)}px`:null,left:null!==u?`${D(i.absoluteColumn)}px`:null,overflow:"auto"};return n.cell.data=Object.assign(Object.assign(Object.assign({},n.cell.data),{customStyle:(n.cell.data.customStyle||"")+".mdc-text-field {height: unset !important;}",legacyLook:!0,helperEnabled:!1}),n.cell.shape===r.TABLE&&{rowsPerPage:n.cell.data.data.rows.length,showPaginator:!1,showFooter:!1,tableHeight:`${o}px`}),e("div",{style:h},Jt(this,P,"m",J).call(this,n.cell,t.row,n.column))},ut=function(){this.inputPanelCommands=this.data.setup.commands.map((t=>{if((null==t?void 0:t.children)&&(null==t?void 0:t.children.length)>0){const i={"kup-list":{showIcons:!0,data:t.children.map((t=>Jt(this,P,"m",Lt).call(this,t)))}};return Jt(this,P,"m",Y).call(this,t,i)}{const i=Jt(this,P,"m",Lt).call(this,t);return Jt(this,P,"m",X).call(this,i,{name:t.value,title:t.value})}})).flat()},ht=function(t){var i,n,e,l;(null===(n=null===(i=t.setup)||void 0===i?void 0:i.commands)||void 0===n?void 0:n.length)&&Jt(this,P,"m",ut).call(this);const s=null===(e=null==t?void 0:t.rows[0])||void 0===e?void 0:e.layout,o=(null===(l=null==t?void 0:t.rows)||void 0===l?void 0:l.length)?t.rows.reduce(((i,n)=>[...i,{cells:t.columns.map((t=>{const i=structuredClone(n.cells[t.name]);return{column:t,cell:i?Object.assign(Object.assign({},i),{data:Jt(this,P,"m",rt).call(this,i,t,s),slotData:Jt(this,P,"m",dt).call(this,i,t),isEditable:!0}):null}})),row:n}]),[]):[];o.map((({cells:t})=>t.map((({cell:t,column:i})=>{const n=Yt.ketchup.data.cell.getType(t,t.shape),e=Jt(this,R,"f").get(n);if(!e)return;const l=this.rootElement.shadowRoot.querySelector(`${e}[id='${i.name.replace(/\//g,"\\$1")}']`);t.value&&(null==l||l.setValue(t.value))})))),this.inputPanelCells=o},rt=function(t,i,n){const e=Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,t,i,n)),{disabled:!t.editable,id:i.name}),l=Yt.ketchup.data.cell.getType(t,t.shape),s=function(t,i){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(e=Object.getOwnPropertySymbols(t);l<e.length;l++)i.indexOf(e[l])<0&&Object.prototype.propertyIsEnumerable.call(t,e[l])&&(n[e[l]]=t[e[l]])}return n}(t.data||{},["data"]);return l!==h.MULTI_AUTOCOMPLETE&&l!==h.MULTI_COMBOBOX?Jt(this,P,"m",ct).call(this,e,Object.assign({},t.data)):Object.assign(Object.assign({},e),s)},ct=function t(i,n){for(const e in n)i[e]=n[e]instanceof Object&&!Array.isArray(n[e])&&e in i?Jt(this,P,"m",t).call(this,i[e],n[e]):n[e];return i},pt=function(){return this.inputPanelCells.reduce(((t,i)=>{const n=Object.keys(i.row.cells).reduce(((t,n)=>{var e;const l=null===(e=i.cells.find((t=>t.column.name===n)))||void 0===e?void 0:e.cell;let s=null==l?void 0:l.value;return(null==l?void 0:l.shape)===r.TABLE&&(s=JSON.stringify(Jt(this,P,"m",Mt).call(this,l.data.data,n))),Object.assign(Object.assign({},t),{[n]:Object.assign(Object.assign({},i.row.cells[n]),{value:s,obj:null==l?void 0:l.obj})})}),{});return{columns:[...t.columns,...i.cells.map((t=>t.column))],rows:[...t.rows,{cells:n,layout:i.row.layout}]}}),{columns:[],rows:[]})},ft=function(t,i,n){if(!t)return null;const e=t.options;let l;l=(null==n?void 0:n.absolute)?null:i.title;const s=t.value,o=Yt.ketchup.data.cell.getType(t,t.shape),a=new Map([[h.AUTOCOMPLETE,Jt(this,P,"m",kt).bind(this)],[h.BUTTON_LIST,Jt(this,P,"m",vt).bind(this)],[h.CHART,Jt(this,P,"m",bt).bind(this)],[h.CHIP,Jt(this,P,"m",mt).bind(this)],[h.CHECKBOX,Jt(this,P,"m",_t).bind(this)],[h.COLOR_PICKER,Jt(this,P,"m",xt).bind(this)],[h.COMBOBOX,Jt(this,P,"m",kt).bind(this)],[h.EDITOR,Jt(this,P,"m",yt).bind(this)],[h.MULTI_AUTOCOMPLETE,Jt(this,P,"m",mt).bind(this)],[h.MULTI_COMBOBOX,Jt(this,P,"m",mt).bind(this)],[h.NUMBER,Jt(this,P,"m",zt).bind(this)],[h.DATE,Jt(this,P,"m",Ft).bind(this)],[h.OBJECT,Jt(this,P,"m",$t).bind(this)],[h.RADIO,Jt(this,P,"m",jt).bind(this)],[h.STRING,Jt(this,P,"m",wt).bind(this)],[h.SWITCH,Jt(this,P,"m",Ot).bind(this)],[h.TABLE,Jt(this,P,"m",Et).bind(this)],[h.TIME,Jt(this,P,"m",Tt).bind(this)]]).get(o);return a?a(e,l,s,t,i.name):null},dt=function(t,i){const n=Yt.ketchup.data.cell.getType(t,t.shape);return t.editable?n===h.CHIP?{trailingIcon:!0,label:i.title,disabled:!t.editable,id:i.name,fullWidth:!1}:n===h.MULTI_AUTOCOMPLETE||n===h.MULTI_COMBOBOX?Object.assign(Object.assign({},Jt(this,P,"m",kt).call(this,t.options,i.title,null)),{showDropDownIcon:!0,class:"",style:{width:"100%"},disabled:!t.editable,id:i.name}):null:null},mt=function(t,i,n){return m(n)},bt=function(){return{data:{sizeX:"50px",offlineMode:{value:"8;4;5"},id:"i1012_GREF_0",cellId:"i1012_GREF_0",sizeY:"50px"}}},vt=function(t,i,n,e,l){var s,o,a,u;return e.data=e.data||{},e.data.onClick=()=>{Jt(this,P,"m",Ht).call(this,e,l)},(null===(s=e.data)||void 0===s?void 0:s.keyShortcut)&&!(null===(o=e.data)||void 0===o?void 0:o.disabled)&&(Jt(this,G,"f").push(null===(a=e.data)||void 0===a?void 0:a.keyShortcut),Jt(this,L,"f").keysBinding.register(null===(u=e.data)||void 0===u?void 0:u.keyShortcut,e.data.onClick.bind(this))),Object.assign({label:e.value,fun:e.fun},e.data)},kt=function(t,i,n){const e=b(n,i,[]);return t&&(e.data["kup-list"].data=Jt(this,P,"m",St).call(this,t,n)),e},gt=function({detail:t},i=!1){const n=Jt(this,P,"m",V).call(this,t.id);let e=!0;i&&(e=!t.comp.data["kup-list"].data.length),n.fun&&e&&Jt(this,P,"m",Wt).call(this,t,n)},_t=function(t,i,n){return v(n,i)},xt=function(t,i){return{data:{"kup-text-field":{label:i}}}},yt=function(t,i,n){return{initialValue:n}},wt=function(t,i,n,e,l){var s;const o=Object.assign({label:i},e.data);return this.autoSkip&&(e.isEditable||e.editable)&&(null===(s=e.data)||void 0===s?void 0:s.maxLength)&&(o.onInput=t=>{Jt(this,P,"m",Bt).call(this,l,t)}),o},jt=function(t,i,n){return k(n,t)},Ot=function(t,i,n){return g(n,i)},Ft=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:null!=n?n:""}},$t=function(t,i,n){return{initialValue:n||"",label:i||" ",value:n||""}},Tt=function(t,i,n){return{data:{"kup-text-field":{label:i}},initialValue:n}},zt=function(t,i){return{label:i}},Et=function(t,i,n,e,l){try{let t=JSON.parse(e.value);return t?"SmeupDataTable"!==t.type?(Jt(this,L,"f").debug.logMessage(this,`Wrong data table type for ${l} cell. Type \`SmeupDataTable\` in value expected`,_.ERROR),null):{data:{columns:t.columns.map((i=>{var n;if(t.rows.length>0){const e=null===(n=t.rows[0].cells[i.name])||void 0===n?void 0:n.obj;return!i.obj&&e?Object.assign(Object.assign({},i),{obj:{t:e.t,p:e.p}}):i}return i})),rows:t.rows.map((i=>Object.assign(Object.assign({},i),{cells:Object.keys(i.cells).reduce(((n,e)=>{const l=t.columns.find((t=>t.name===e));return Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i.cells[e]),{data:Object.assign(Object.assign({},Jt(this,P,"m",ft).call(this,i.cells[e],l)),{disabled:!1===i.cells[e].editable,id:l.id})})})}),{})})))}}:(Jt(this,L,"f").debug.logMessage(this,`Empty value for ${l} cell.`,_.WARNING),null)}catch(t){return Jt(this,L,"f").debug.logMessage(this,`Invalid value for ${l} cell. Type \`SmeupDataTable\` expected`,_.ERROR),null}},Mt=function(t,i){const n=Object.assign(Object.assign({},t),{rows:t.rows.map((t=>Object.assign(Object.assign({},t),{cells:{}})))}),e=t.columns.filter((t=>t.isEditable)).map((t=>t.name));if(!e.length)return n;try{const l=JSON.parse(Jt(this,N,"f").rows[0].cells[i].value);return n.rows=t.rows.map(((t,i)=>e.reduce(((n,e)=>{const s=l.rows[i].cells[e]&&t.cells[e].value!==l.rows[i].cells[e].value;return Object.assign(Object.assign({},l.rows[i]),s?{cells:Object.assign(Object.assign({},n.cells),{[e]:Object.assign(Object.assign({},l.rows[i].cells[e]),{value:t.cells[e].value})})}:{cells:n.cells})}),Object.assign(Object.assign({},l.rows[i]),{cells:{}})))),n}catch(t){return n}},St=function(t,i){const n=Jt(this,I,"f").get(t.type);return n?n(t,i):t.map((t=>({value:t.label,id:t.id,selected:i===t.id})))},Ct=function t(i,n){return i.children.map((i=>{var e;return{id:i.content.codice,value:i.content.testo,selected:n===i.content.codice,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Dt=function t(i,n){return i.children.map((i=>{var e;return{id:i.obj.k,value:i.value,selected:n===i.obj.k,children:(null===(e=i.children)||void 0===e?void 0:e.length)?Jt(this,P,"m",t).call(this,i,n):[]}}))},Pt=function(t,i){return t.rows.map((t=>{const n=t.fields||t.cells,[e,l]=Object.keys(n);return{id:n[e].value,value:n[l].value||n[e].value,selected:i===n[e].value}}))},Lt=function(t){return t.data&&!t.data.keyShortcut&&Jt(this,L,"f").objects.isJ1Key(t.obj?t.obj:{})&&(t.data.keyShortcut=E[t.obj.k]),Object.assign(Object.assign({},t),{data:Jt(this,P,"m",vt).call(this,null,null,t.value,t,t.obj.k),id:t.obj.k})},Wt=function(t,i){this.optionsHandler(i.fun,t.inputValue,Jt(this,P,"m",pt).call(this),t.id).then((n=>{var e,l,s,o,a;const u=(null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.filter((t=>(null==t?void 0:t.visible)||!("visible"in t))).map((t=>t.name)))||[],h=null===(l=null==n?void 0:n.rows)||void 0===l?void 0:l.map((t=>{const{cells:i}=t,n=u.reduce(((n,e)=>(t.cells.hasOwnProperty(e)&&(n[e]=i[e]),n)),{});return Object.assign(Object.assign({},t),{cells:n})})),r=Object.assign(Object.assign({},n),{rows:h}),c=null===(o=null===(s=i.data)||void 0===s?void 0:s.data)||void 0===o?void 0:o["kup-list"];c?c.data=(null==h?void 0:h.length)&&null!==(a=Jt(this,P,"m",St).call(this,r,i.value))&&void 0!==a?a:[]:Jt(this,L,"f").debug.logMessage(this,'getAutocompleteEventCallback() - "kup-list" not found in cell.data.data',_.WARNING),t.comp.refresh()}))},It=async function(t){var i,n,e,l,s;const{detail:{column:o,cell:a}}=t,u=Jt(this,P,"m",V).call(this,o.name),h=Jt(this,N,"f").rows[0].cells[o.name];if(u){if(a.mandatory){if(Jt(this,P,"m",Nt).call(this,o.name,u.value?(null===(i=h.data)||void 0===i?void 0:i.error)||null:Jt(this,L,"f").language.translate(f.REQUIRED_VALUE)),!a.value)return}else Jt(this,P,"m",Nt).call(this,o.name,(null===(n=h.data)||void 0===n?void 0:n.error)||null);if(null===(e=a.inputSettings)||void 0===e?void 0:e.checkObject){const{valid:t}=await this.checkValidObjCallback({obj:a.obj,currentState:Jt(this,P,"m",pt).call(this),fun:a.fun});if(!t)return void Jt(this,P,"m",Nt).call(this,o.name,Jt(this,L,"f").language.translate(f.INVALID_VALUE));Jt(this,P,"m",Nt).call(this,o.name,(null===(l=h.data)||void 0===l?void 0:l.error)||null)}(null===(s=a.inputSettings)||void 0===s?void 0:s.checkValueOnExit)&&Jt(this,P,"m",Kt).call(this)&&this.checkValidValueCallback({before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},o.name)}},Nt=function(t,i){this.inputPanelCells=this.inputPanelCells.map((n=>Object.assign(Object.assign({},n),{cells:n.cells.map((({cell:n,column:e})=>{const l=e.name===t?Object.assign(Object.assign({},n.data),{error:i}):n.data;return{column:e,cell:Object.assign(Object.assign({},n),{data:l})}}))})))},Kt=function(){return this.inputPanelCells.some((({cells:t,row:i})=>t.some((({cell:t,column:{name:n}})=>t.value!==i.cells[n].value))))},Ht=function(t,i){t.fun?this.customButtonClickHandler({fun:t.fun,cellId:i,currentState:Jt(this,P,"m",pt).call(this)}):this.submitCb({value:{before:Object.assign({},Jt(this,N,"f")),after:Jt(this,P,"m",pt).call(this)},cell:i})},Rt=function(t,i){const n=t.find((t=>{var i;return null===(i=t.classList)||void 0===i?void 0:i.contains("f-cell")}));if(null==n)return;const e=Jt(this,P,"m",pt).call(this),l=n["kup-get-cell-props"]().column.name;return{anchor:n,cell:e.rows[0].cells[l],column:e.columns.find((t=>t.name==l)),row:e.rows[0],originalEvent:i}},At=function(t){const i=Jt(this,L,"f").getEventPath(t.target,this.rootElement);return Jt(this,P,"m",Rt).call(this,i,t)},Ut=function(){Jt(this,L,"f").interact.managedElements.add(Jt(this,W,"f")),Jt(this,L,"f").interact.on(Jt(this,W,"f"),x.TAP,(t=>{if(2==t.button){const i=Jt(this,P,"m",At).call(this,t);i&&this.kupDataTableContextMenu.emit({comp:this,id:this.rootElement.id,details:i})}}))},Gt=function(){if(!Jt(this,W,"f"))return;const t=Array.from(Jt(this,W,"f").querySelectorAll(".f-cell__content"));for(const i of t){const t=Jt(this,P,"m",Vt).call(this,i,!0);if(t)return void setTimeout((()=>t.focus()),300)}if(!this.autoFocus||0===t.length)return;const i=Jt(this,P,"m",Vt).call(this,t[0]);i&&setTimeout((()=>i.focus()),300)},Vt=function(t,i=!1){if(!(t&&t instanceof HTMLElement))return;const n=".mdc-text-field__input",e=i?`.mdc-text-field--error ${n}`:n,l=t.querySelector(e);if(l)return l;const s=Array.from(t.querySelectorAll("*")).filter((t=>t.shadowRoot));for(const t of s){const i=t.shadowRoot.querySelector(e);if(i)return i}},Bt=function(t,i){var n,e;const l=null==i?void 0:i.target;if(!(l&&l instanceof HTMLInputElement))return;const{maxLength:s,value:o}=l;if(!s||s<0||(null==o?void 0:o.length)<s)return;const a=Array.from(null===(n=Jt(this,W,"f"))||void 0===n?void 0:n.querySelectorAll(".f-text-field")).reduce(((t,i)=>{const n=i.querySelector("input");return n?(t.push({id:(null==i?void 0:i.id)||"",HTMLInputElement:n}),t):t}),[]);if(!a.length)return;const u=a.findIndex((i=>i.id===t));u<0||u===a.length-1||null===(e=a[u+1].HTMLInputElement)||void 0===e||e.focus()},qt.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";export{qt as kup_input_panel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-b59ea56b.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.autofitOnExpand="The component will autofit everytime a node is expanded.",t.autofitOnLoad="The component's initial render will fit the container by invoking the runAutofit method.",t.cardData="Used to render the family tree boxes as kup-cards (through kup-box).",t.collapsible="Nodes can be expanded/collapsed.",t.customStyle="Custom style of the component.",t.data="Actual data of the component",t.layout="Layout of the boxes.",t.stackedLeaves="Child nodes that have no children are arranged vertically."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=class{constructor(i){t(this,i),this.kupClick=e(this,"kup-familytree-click",6),this.kupContextMenu=e(this,"kup-familytree-contextmenu",6),this.kupDblClick=e(this,"kup-familytree-dblclick",6),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"09a067148b3438469a9773c276c6aaddecda73fa",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"dbae8f187ff51f8168d4df72de2ba563ef7a9d7c"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"cf23802e9e58e68d0c89ee7fdd13fde331a04705",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},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:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{B as kup_family_tree}
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-4886e26b.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.autofitOnExpand="The component will autofit everytime a node is expanded.",t.autofitOnLoad="The component's initial render will fit the container by invoking the runAutofit method.",t.cardData="Used to render the family tree boxes as kup-cards (through kup-box).",t.collapsible="Nodes can be expanded/collapsed.",t.customStyle="Custom style of the component.",t.data="Actual data of the component",t.layout="Layout of the boxes.",t.stackedLeaves="Child nodes that have no children are arranged vertically."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=class{constructor(i){t(this,i),this.kupClick=e(this,"kup-familytree-click",6),this.kupContextMenu=e(this,"kup-familytree-contextmenu",6),this.kupDblClick=e(this,"kup-familytree-dblclick",6),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"09a067148b3438469a9773c276c6aaddecda73fa",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"dbae8f187ff51f8168d4df72de2ba563ef7a9d7c"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"cf23802e9e58e68d0c89ee7fdd13fde331a04705",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},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:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{B as kup_family_tree}
|
|
@@ -10,7 +10,8 @@ export declare enum KupCalendarProps {
|
|
|
10
10
|
data = "Actual data of the calendar.",
|
|
11
11
|
editableEvents = "When true, events are editable.",
|
|
12
12
|
hideNavigation = "When disabled, the navigation toolbar won't be displayed.",
|
|
13
|
-
viewType = "Type of the view."
|
|
13
|
+
viewType = "Type of the view.",
|
|
14
|
+
calendarColumns = "Sets which columns of the data property will be used to render each characteristic of an event in the calendar."
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Available view types.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KupState } from '../kup-state/kup-state';
|
|
2
|
+
import { KupCalendarViewTypes } from './kup-calendar-declarations';
|
|
3
|
+
export declare class KupCalendarState implements KupState {
|
|
4
|
+
initialDate: string;
|
|
5
|
+
viewType: KupCalendarViewTypes;
|
|
6
|
+
toDebugString(): string;
|
|
7
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { GenericObject } from '../../types/GenericTypes';
|
|
3
3
|
import { KupCalendarColumnsProp, KupCalendarData, KupCalendarDateClickEventPayload, KupCalendarEventClickEventPayload, KupCalendarEventDropEventPayload, KupCalendarViewChangeEventPayload, KupCalendarViewTypes } from './kup-calendar-declarations';
|
|
4
|
+
import { KupStore } from '../kup-state/kup-store';
|
|
5
|
+
import { KupCalendarState } from './kup-calendar-state';
|
|
4
6
|
export declare class KupCalendar {
|
|
5
7
|
/**
|
|
6
8
|
* References the root HTML element of the component (<kup-calendar>).
|
|
7
9
|
*/
|
|
8
10
|
rootElement: HTMLElement;
|
|
11
|
+
state: KupCalendarState;
|
|
12
|
+
private initialDate;
|
|
13
|
+
initWithPersistedState(): void;
|
|
14
|
+
persistState(): void;
|
|
9
15
|
/**
|
|
10
16
|
* Sets the initial date of the calendar. Must be in ISO format (YYYY-MM-DD).
|
|
11
17
|
* @default null
|
|
@@ -48,6 +54,8 @@ export declare class KupCalendar {
|
|
|
48
54
|
* @default KupCalendarViewTypes.MONTH
|
|
49
55
|
*/
|
|
50
56
|
viewType: KupCalendarViewTypes;
|
|
57
|
+
stateId: string;
|
|
58
|
+
store: KupStore;
|
|
51
59
|
private calendar;
|
|
52
60
|
private calendarContainer;
|
|
53
61
|
private kupManager;
|
|
@@ -775,6 +775,8 @@ export namespace Components {
|
|
|
775
775
|
* @param props - Object containing props that will be set to the component.
|
|
776
776
|
*/
|
|
777
777
|
"setProps": (props: GenericObject) => Promise<void>;
|
|
778
|
+
"stateId": string;
|
|
779
|
+
"store": KupStore;
|
|
778
780
|
/**
|
|
779
781
|
* Type of the view.
|
|
780
782
|
* @default KupCalendarViewTypes.MONTH
|
|
@@ -6721,6 +6723,8 @@ declare namespace LocalJSX {
|
|
|
6721
6723
|
* When the navigation change
|
|
6722
6724
|
*/
|
|
6723
6725
|
"onKup-calendar-viewchange"?: (event: KupCalendarCustomEvent<KupCalendarViewChangeEventPayload>) => void;
|
|
6726
|
+
"stateId"?: string;
|
|
6727
|
+
"store"?: KupStore;
|
|
6724
6728
|
/**
|
|
6725
6729
|
* Type of the view.
|
|
6726
6730
|
* @default KupCalendarViewTypes.MONTH
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./p-b0368f88.js";import{at as n,r as t,a as l,h as r}from"./p-b59ea56b.js";import{F as a}from"./p-504fe614.js";import{a as o}from"./p-e3062c19.js";var s;!function(e){e.SIMPLE="simple",e.FULL="full"}(s||(s={}));const i=document.documentElement,u=u=>{u.perPage||(u.perPage=10);const d=Math.ceil(u.max/u.perPage),f=function(e,n){const t=[];for(let l=1;l<=n;l++){const n=l==e.currentPage;t.push({id:l.toString(),selected:n,value:l.toString()})}return t}(u,d),m=function(e){const n=[];let t=e.perPage;if(0===t)return n;for(;t<e.max;){const l=t==e.perPage;n.push({id:t.toString(),selected:l,value:t.toString()}),t*=2}const l=e.max==e.perPage;return n.push({id:e.max.toString(),selected:l,value:e.max.toString()}),n}(u),b={"kup-list":{data:f},"kup-text-field":{label:i.ketchup.language.translate(n.PAGE),helper:i.ketchup.language.translate(n.TOTAL)+`: ${d}`,helperWhenFocused:!0,inputType:"number",max:d,min:1}},h={"kup-list":{data:m},"kup-text-field":{label:i.ketchup.language.translate(t.ROWS)+" / "+i.ketchup.language.translate(n.PAGE),helper:i.ketchup.language.translate(t.TOTAL)+`: ${u.max}`,helperWhenFocused:!0,inputType:"number",max:u.max,min:1}};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(a,{icon:"plus",onClick:u.onLoadMore,label:i.ketchup.language.translate(r.LOAD_MORE),sizing:l.SMALL,styling:o.FLAT,wrapperClass:"load-more-button kup-neutral"}):null,e("kup-combobox",{class:"rows-selector",data:h,initialValue:u.perPage.toString(),"onkup-combobox-change":u.onRowsChange}),e("kup-combobox",{class:"page-selector",data:b,initialValue:u.currentPage.toString(),"onkup-combobox-change":u.onPageChange}),e("div",{class:"arrow-wrapper"},u.mode!==s.SIMPLE?e(a,{icon:"chevron_left",disabled:p(u),onClick:u.onPrevPage,sizing:l.SMALL,styling:o.FLAT,wrapperClass:"kup-neutral prev-page"}):null,u.mode!==s.SIMPLE?e(a,{icon:"chevron_right",disabled:c(u),onClick:u.onNextPage,sizing:l.SMALL,styling:o.FLAT,wrapperClass:"kup-neutral next-page"}):null))};function c(e){return e.currentPage*e.perPage>=e.max}function p(e){return 1==e.currentPage}const d=document.documentElement;function f(e,n,t){if(d.ketchup.math.isNumber(e)){const l=Math.ceil(n/t);let r=e;return r>l&&(r=l),r<1&&(r=1),r}return null}function m(e,n){if(d.ketchup.math.isNumber(e)){let t=e;return t>n&&(t=n),t<1&&(t=1),t}return null}export{u as F,f as p,m as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as o,H as s,d as n}from"./p-b0368f88.js";import{k as r,y as a,g as h,s as l,a2 as c,v as p,h as d,b,e as u,O as x,U as f,aA as g,W as m,E as k}from"./p-b59ea56b.js";import{f as w,p as v,s as y}from"./p-aba86824.js";import{F as _}from"./p-f2213e00.js";import{c as j}from"./p-fd115e9d.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-3afacd1c.js";import{p as P,r as M,F as A}from"./p-998139e0.js";import{F as R}from"./p-7db300e0.js";import"./p-1ee561ba.js";import"./p-504fe614.js";import"./p-e3062c19.js";import"./p-982a5cfc.js";import"./p-0dc3dd14.js";import"./p-3d2f1f12.js";import"./p-c56195a0.js";var I,E;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.lazyLoadRows="When set to true, extra rows will be automatically loaded once the last row enters the viewport.",t.loadMoreLimit="Sets a maximum limit of new records which can be required by the load more functionality.",t.loadMoreMode="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.",t.loadMoreStep="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showLoadMore="If set to true, displays the button to load more records.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(I||(I={})),function(t){t.CONSTANT="constant",t.CONSTANT_INCREMENT="constant_increment",t.PROGRESSIVE_THRESHOLD="progressive_threshold"}(E||(E={}));class O{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1,this.loadMoreLimit=1e3,this.showLoadMore=!1}toDebugString(){return"box state"}}var S,W,D,B,T,$,L,F,H,N=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)},G=function(t,i,e,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!s:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,e):s?s.value=e:i.set(t,e),e};const V=class{constructor(e){t(this,e),this.kupBoxClick=i(this,"kup-box-click",6),this.kupBoxSelected=i(this,"kup-box-selected",6),this.kupAutoBoxSelect=i(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=i(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=i(this,"kup-box-rowactionclick",6),this.kupDidLoad=i(this,"kup-box-didload",6),this.kupDidUnload=i(this,"kup-box-didunload",6),this.kupBoxContextMenu=i(this,"kup-box-contextmenu",6),this.kupLoadMoreClick=i(this,"kup-box-loadmoreclick",6),S.add(this),this.state=new O,this.kupManager=r(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],W.set(this,void 0),D.set(this,[]),B.set(this,0),T.set(this,0),$.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.loadMoreLimit=1e3,this.loadMoreMode=E.PROGRESSIVE_THRESHOLD,this.loadMoreStep=60,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showLoadMore=!1,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage,this.loadMoreLimit=t.loadMoreLimit,this.showLoadMore=t.showLoadMore)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const i=this.selectedRows.reduce(((t,i,e)=>t+(e>0?";":"")+i.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,i)||(this.state.selectedRowsState=i,t=!0),this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)||(this.state.loadMoreLimit=this.loadMoreLimit,t=!0),this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)||(this.state.showLoadMore=this.showLoadMore,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,I,t)}async loadRowActions(t,i){t.actions=i,this.rowActionMenuOpened=t}async refresh(){e(this)}async setProps(t){l(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let i=t;return this.sortBy&&(i=y(i,this.toSortObjectList())),i}toSortObjectList(){return this.sortBy.split("|").map((t=>{const i=t.split(",");return{column:i[0],sortMode:i.length>1?c[i[1]]:c.A}}))}checkScrollOnHover(){this.boxContainer&&(this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer))}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},i=this.visibleColumns;let e=i.length,o=[],s=0;for(;e-- >0;)o.push({column:i[s++].name});t.content=o,this.boxLayout={sections:[t]}}onSortChange(t){let i=p(this.visibleColumns,t.detail.value);this.sortBy=i.name}onGlobalFilterChange({detail:t}){let i="";t&&t.value&&(i=t.value),this.globalFilterValue=i}isSectionExpanded(t,i){return!(!t.id||!i.id)&&this.collapsedSection[i.id]&&this.collapsedSection[i.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,i){let e=null,o=null,s=null,n=null;if(t)for(let i=t.length-1;i>=0;i--){let o=t[i];o.tagName&&(o.tagName.toUpperCase(),o.classList.contains("box-object")&&(e=o),!s&&o["data-row"]&&(s=o["data-row"]))}if(e)if(e.classList.contains("f-cell")){const t=e["kup-get-cell-props"]();o=t.cell,n=t.column,s=t.row}else o=e["data-cell"],s=e["data-row"],n=p(this.visibleColumns,e.dataset.column);return{boxObject:e||null,column:n||null,cell:o||null,originalEvent:i,row:s||null}}clickHandler(t){const i=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return i.row&&(this.multiSelection?this.onSelectionCheckChange(i.row):this.selectedRows=[i.row]),i}contextMenuHandler(t){return this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onSelectionCheckChange(t){var i=-1;for(let e=0;e<this.selectedRows.length;e++)if(this.selectedRows[e].id===t.id){i=e;break}i>=0?(this.selectedRows.splice(i,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,i){if(i.id)if(t.id){if(this.collapsedSection[i.id]){const e=this.collapsedSection[i.id];e[t.id]=!e[t.id]||!e[t.id]}else this.collapsedSection[i.id]={},this.collapsedSection[i.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,i,e){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:i,index:e})}clickFunction(t){try{const i=t.composedPath();for(let t of i)if(this.checkIfElementIsActionMenuIcon(t))return}catch(i){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const i=P(t,this.filteredRows.length,this.currentRowsPerPage);i&&(this.currentPage=i)}handleRowsPerPageChange(t){const i=M(t,this.filteredRows.length);i&&(this.currentRowsPerPage=i,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let i=!1;const e={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let i=0;i<this.data.columns.length;i++){const o=this.data.columns[i];!1!==o.visible&&(e.cell.push(t.cells[o.name]),e.columns.push(o))}for(const i in t.cells)if(t.cells.hasOwnProperty(i)){const o=t.cells[i];if(void 0!==o.cardID&&o.obj)switch(o.obj.p){case"BTN":do{e.button.push({})}while(e.button.length<o.cardID);e.button[o.cardID]={label:o.value};break;case"IMG":do{e.image.push({})}while(e.image.length<o.cardID);e.image[o.cardID]={resource:o.value};break;case"PGB":do{e.progressbar.push({})}while(e.progressbar.length<o.cardID);e.progressbar[o.cardID]={value:o.value};break;default:do{e.text.push("")}while(e.text.length<o.cardID);e.text[o.cardID]=o.value}}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(void 0===s.cardID&&s.obj)switch(i=!1,s.obj.p){case"BTN":for(let t=0;t<e.button.length;t++)if(!Object.keys(e.button[t]).length){e.button[t]={label:s.value},i=!0;break}i||e.button.push({label:s.value});break;case"IMG":for(let t=0;t<e.image.length;t++)if(!Object.keys(e.image[t]).length){e.image[t]={resource:s.value},i=!0;break}i||e.image.push({resource:s.value});break;case"PGB":for(let t=0;t<e.progressbar.length;t++)if(!Object.keys(e.progressbar[t]).length){e.progressbar[t]={value:s.value},i=!0;break}i||e.progressbar.push({value:s.value});break;default:for(let t=0;t<e.text.length;t++)if(""===e.text[t]){e.text[t]=s.value,i=!0;break}i||e.text.push(s.value)}}return o("kup-card",Object.assign({data:e},this.cardData))}renderRow(t){const i=[...this.visibleColumns];let e=null,s=t.layout;s||(s=this.boxLayout);let n=!1;if(s){s.horizontal&&(n=!0);const o=s.sections;let r=o.length,a=0;r>0&&(e=[]);const h={horizontal:n};for(;r-- >0;)e.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(o[a++],h,t,i))}var r=!1;for(let i of this.selectedRows)i.id===t.id&&(r=!0);let a=null;this.multiSelection&&(a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r})));let h=null;if(this.enableRowActions&&!this.swipeDisabled){const i={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let e=null;if(t.actions){const i=t.actions.map(((i,e)=>o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,i,e)},o("div",{class:`icon ${i.icon}`}),o("div",{class:"text"},i.text))));e=o("ul",null,i)}h=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:i},e)))}let l=null;return t.badgeData&&t.badgeData.length>0&&(l=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),o("div",{class:"box-wrapper",style:t.style||{},ref:t=>{t&&N(this,D,"f").push(t)}},o("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n},"data-row":t,ref:t=>this.rowsRefs.push(t)},a,e,l),h)}renderSection(t,i,e,s){let n=null;if(t.sections&&t.sections.length>0){const i=t.sections;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderSection(i[r++],t,e,s))}else if(t.content){const i=t.content;let o=i.length,r=0;for(o>0&&(n=[]);o-- >0;)n.push(this.renderBoxObject({boxObject:i[r++],row:e,visibleColumns:s},!0))}else s.length>0&&(n=this.renderBoxObject({boxObject:{column:s[0].name},row:e,visibleColumns:s}));const r=this.isSectionExpanded(e,t),a=!!t.columns,h={"box-section":!0,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},l=t.style||{};t.dim&&i&&(l.overflow="hidden",i.horizontal&&(l.flex=`0 0 ${t.dim}`,l.maxWidth=t.dim)),a&&(l["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){h["collapse-section"]=!0;const i={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(r?d.COLLAPSE:d.EXPAND),c=o("div",{class:h,style:l},o("div",{class:i},n),o("div",{class:"header",role:"button",onClick:i=>{i.stopPropagation(),this.toggleSectionExpand(e,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const i=t.title?o("h3",null,t.title):null;c=o("div",{class:h,style:l},i,n)}return c}renderBoxObject({boxObject:t,row:i,visibleColumns:e},s){const n={"box-object":!0};let r=null,a=-1;for(let i=0;i<e.length;i++)if(e[i].name===t.column){a=i;break}a>=0?(r=e[a],e.splice(a,1)):s&&(r=this.data.columns.find((i=>i.name===t.column)));const h=i.cells[t.column];let l;return h&&!this.kupManager.objects.isEmptyKupObj(h.obj)&&(n["is-obj"]=!0,this.kupManager.debug.isDebug()&&(l=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";")),o("div",{"data-cell":h,"data-row":i,"data-column":t.column,class:n,style:{},title:l},h&&r?o(z,Object.assign({},{cell:h,column:r,component:this,editable:this.editableData,renderKup:!0,row:i,setSizes:!0,shape:t.shape})):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(d.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let i=0;i<this.kanban.labels.length;i++)t.push({labels:this.kanban.labels[i],nodes:[]});for(let i=0;i<this.rows.length;i++){let e=[];for(let t=0;t<this.kanban.columns.length;t++)try{e.push(this.rows[i].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,u.WARNING)}const o={found:!1,index:null};for(let i=0;i<t.length;i++){let s=t[i].labels,n=!0;for(let t=0;t<s.length;t++)if(e[t]!==s[t]){n=!1;break}if(n){o.found=!0,o.index=i;break}}o.found?t[o.index].nodes.push(this.renderRow(this.rows[i])):t.push({labels:e,nodes:[this.renderRow(this.rows[i])]})}const i=[];for(let e=0;e<t.length;e++){const s=t[e].labels,n={data:[]};for(let t=0;t<s.length;t++)n.data.push({value:s[t],id:s[t]});i.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[e].nodes))}return{jsx:i,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,x.TAP,(t=>{var i;if(this.hold)this.hold=!1;else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];const o=this.clickHandler(e);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:null===(i=o.column)||void 0===i?void 0:i.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}})),this.kupManager.interact.on(this.boxContainer,x.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const i=this.rowsRefs[t],e=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};i&&!this.interactableDrag.includes(i)&&(this.interactableDrag.push(i),this.kupManager.interact.draggable(i,{allowFrom:".box-object",cursorChecker:()=>null},{callback:e},f.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t)return void this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",u.WARNING);const i=this.kupManager.getEventPath(t,this.rootElement),e=this.getEventDetails(i);return{cell:e.cell,column:e.column,id:this.rootElement.id,row:e.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX}));for(let i=0;i<this.rowsRefs.length;i++){const e=this.rowsRefs[i];e&&!this.interactableDrop.includes(e)&&(this.interactableDrop.push(e),this.kupManager.interact.dropzone(e,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?G(this,B,document.querySelector(".header").clientHeight,"f"):G(this,B,0,"f"),document.querySelector(".topbar")&&G(this,B,N(this,B,"f")+document.querySelector(".topbar").clientHeight,"f"),N(this,S,"m",F).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((i=>t.indexOf(i.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");for(let t=0;t<i.length;t++)R(i[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),N(this,S,"m",L).call(this),this.kupManager.debug.logRender(this,!0)}render(){G(this,D,[],"f");const t=!("object"!=typeof this.kanban||null===this.kanban);let i=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let e={label:this.kupManager.language.translate(d.SORT_BY),trailingIcon:!0};i=o("div",{id:"sort-panel"},o("kup-combobox",{data:{"kup-text-field":e,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let e=null;this.globalFilter&&(e=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(k.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let n=null;(this.showLoadMore||!this.lazyLoadRows&&this.pagination)&&(n=o(A,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{N(this,S,"m",H).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let r=null,a={};if(0===this.rows.length)r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(d.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();r=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let i=t.length,e=0;for(r=[];i-- >0;)r.push(this.renderRow(t[e++]))}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},i,e,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};W=new WeakMap,D=new WeakMap,B=new WeakMap,T=new WeakMap,$=new WeakMap,S=new WeakSet,L=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&N(this,W,"f").observe(N(this,D,"f")[N(this,D,"f").length-1])},F=function(){const t={threshold:0,rootMargin:"-"+N(this,B,"f")+"px 0px 0px 0px"};G(this,W,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const i=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=i<this.loadMoreStep?i:this.loadMoreStep,t.target.classList.remove("last-row"),N(this,W,"f").unobserve(t.target)}}))}),t),"f")},H=function(){var t;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(N(this,T,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(N(this,$,"f"),this.loadMoreStep)*Math.min(N(this,T,"f")+1,2)}i>this.loadMoreLimit&&(i=this.loadMoreLimit),this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i}),G(this,$,i,"f"),G(this,T,(t=N(this,T,"f"),++t),"f")},V.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{V as kup_box}
|