@sme.up/ketchup 7.4.2 → 8.0.0
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/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
- package/dist/cjs/{f-button-daddd700.js → f-button-49b2c37c.js} +1 -1
- package/dist/cjs/{f-cell-3682fad4.js → f-cell-9a6bc55c.js} +4 -4
- package/dist/cjs/{f-chip-9d540d94.js → f-chip-dee84122.js} +2 -2
- package/dist/cjs/{f-image-7b42d149.js → f-image-27f965ff.js} +4 -4
- package/dist/cjs/{f-paginator-utils-1baeba0f.js → f-paginator-utils-4a30189d.js} +2 -2
- package/dist/cjs/{f-text-field-a6ed2d22.js → f-text-field-04a663b4.js} +1 -1
- package/dist/cjs/{f-text-field-mdc-85997738.js → f-text-field-mdc-0e22f3e3.js} +2 -2
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +814 -819
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +7 -10
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +25 -8
- package/dist/cjs/kup-family-tree.cjs.entry.js +8 -19
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-10351449.js → kup-manager-2ff5d258.js} +80 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +1127 -218
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-card/kup-card.css +4 -8
- package/dist/collection/components/kup-chip/kup-chip.js +4 -3
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +0 -3
- package/dist/collection/components/kup-data-table/kup-data-table.css +3 -6
- package/dist/collection/components/kup-data-table/kup-data-table.js +6 -20
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
- package/dist/collection/components/kup-echart/kup-echart.js +23 -8
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
- package/dist/collection/components/kup-image/kup-image.js +28 -0
- package/dist/collection/components/kup-list/kup-list.css +1 -1
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +5 -2
- package/dist/collection/components/kup-planner/kup-planner.css +6 -3
- package/dist/collection/components/kup-planner/kup-planner.js +347 -65
- package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
- package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
- package/dist/collection/components/kup-tree/kup-tree.js +66 -67
- package/dist/collection/f-components/f-image/f-image.js +3 -3
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +18 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/kup-autocomplete2.js +228 -151
- package/dist/components/kup-dashboard.js +0 -3
- package/dist/components/kup-echart2.js +24 -7
- package/dist/components/kup-family-tree.js +5 -16
- package/dist/components/kup-planner.js +1127 -219
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- 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-tree.js +1 -1
- package/dist/esm/{component-b1bedf1d.js → component-120651a0.js} +1 -1
- package/dist/esm/{f-button-8d15b5a0.js → f-button-744cf1f6.js} +1 -1
- package/dist/esm/{f-cell-7b706e57.js → f-cell-b319c869.js} +4 -4
- package/dist/esm/{f-chip-c671fe90.js → f-chip-7e3e4180.js} +2 -2
- package/dist/esm/{f-image-21451b15.js → f-image-098c26ce.js} +4 -4
- package/dist/esm/{f-paginator-utils-92bbf277.js → f-paginator-utils-674cb2ae.js} +2 -2
- package/dist/esm/{f-text-field-0bb2d109.js → f-text-field-c38ef113.js} +1 -1
- package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +814 -819
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +7 -10
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +25 -8
- package/dist/esm/kup-family-tree.entry.js +8 -19
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-6145d980.js → kup-manager-b41eb2a8.js} +80 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +1128 -219
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-439ac105.entry.js → p-0b0b61cb.entry.js} +1 -1
- package/dist/ketchup/p-0b91f5f8.entry.js +1 -0
- package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
- package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
- package/dist/ketchup/{p-32517a99.entry.js → p-395e1960.entry.js} +1 -1
- package/dist/ketchup/{p-76bf53df.entry.js → p-3b41aca7.entry.js} +1 -1
- package/dist/ketchup/{p-4d039705.entry.js → p-3efe7f43.entry.js} +1 -1
- package/dist/ketchup/{p-a641780a.entry.js → p-4325d965.entry.js} +1 -1
- package/dist/ketchup/{p-2915a66a.entry.js → p-4ae2ca6f.entry.js} +1 -1
- package/dist/ketchup/{p-e4975ffa.entry.js → p-5ce2b4fc.entry.js} +1 -1
- package/dist/ketchup/p-5d398e42.js +1 -0
- package/dist/ketchup/{p-7cfdce27.js → p-77e3d537.js} +1 -1
- package/dist/ketchup/p-7f59211b.js +1 -0
- package/dist/ketchup/p-940a5feb.js +30 -0
- package/dist/ketchup/{p-826c91d7.js → p-9700eb32.js} +1 -1
- package/dist/ketchup/p-a7e19620.entry.js +39 -0
- package/dist/ketchup/p-a877a87b.entry.js +9 -0
- package/dist/ketchup/p-a9b7533b.entry.js +25 -0
- package/dist/ketchup/{p-89ac80c1.entry.js → p-af82131e.entry.js} +1 -1
- package/dist/ketchup/{p-da37c417.entry.js → p-b032f47d.entry.js} +1 -1
- package/dist/ketchup/{p-0c1cbf8b.entry.js → p-b244f5ca.entry.js} +1 -1
- package/dist/ketchup/{p-2a2dc2a8.entry.js → p-bb17c1ba.entry.js} +1 -1
- package/dist/ketchup/{p-0c9b7c80.entry.js → p-bd42562d.entry.js} +1 -1
- package/dist/ketchup/{p-849ad5d8.entry.js → p-c8b7790a.entry.js} +1 -1
- package/dist/ketchup/{p-c022824e.entry.js → p-c968e93d.entry.js} +1 -1
- package/dist/ketchup/{p-1242366a.entry.js → p-d739710a.entry.js} +1 -1
- package/dist/ketchup/{p-ae4fffe0.js → p-d98fdb9b.js} +1 -1
- package/dist/ketchup/{p-c222d070.entry.js → p-da891093.entry.js} +1 -1
- package/dist/ketchup/{p-281cff81.entry.js → p-df316daf.entry.js} +1 -1
- package/dist/ketchup/{p-d87fb5ff.entry.js → p-e02b5141.entry.js} +1 -1
- package/dist/ketchup/{p-ea16ddc0.js → p-e714f4dc.js} +1 -1
- package/dist/ketchup/{p-c4d9e3e2.js → p-ef614656.js} +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
- package/dist/types/components/kup-image/kup-image.d.ts +2 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +18 -3
- package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
- package/dist/types/components.d.ts +39 -4
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +8 -20
- package/dist/ketchup/p-02a26d59.entry.js +0 -9
- package/dist/ketchup/p-462475ac.entry.js +0 -10
- package/dist/ketchup/p-5292ef67.js +0 -30
- package/dist/ketchup/p-79b0730b.js +0 -15
- package/dist/ketchup/p-9f00ad0f.js +0 -1
- package/dist/ketchup/p-be61dd36.entry.js +0 -39
- package/dist/ketchup/p-e83e70e2.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-d4ece435.js";import{F as r}from"./p-
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-d4ece435.js";import{F as r}from"./p-77e3d537.js";import{F as a}from"./p-c26975bf.js";import{F as h}from"./p-e714f4dc.js";import{F as c}from"./p-27a56c87.js";import{k as l,g as d,s as u,aw as m,l as p,W as f,c as g}from"./p-940a5feb.js";import{c as x}from"./p-97e8ea42.js";import"./p-6c77a36c.js";import"./p-5d398e42.js";import"./p-7f59211b.js";import"./p-10d84b1b.js";var b;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component.",t.enableDesign="When set to true, the component is in design mode and it is draggable."}(b||(b={}));const y=class{constructor(s){t(this,s),this.kupSave=i(this,"kup-dashboard-save",6),this.kupManager=l(),this.internalData=null,this.internalDataBackup=null,this.resetInternalData=!1,this.customStyle="",this.data=null,this.enableDesign=!1}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return d(this,b,t)}async refresh(){s(this)}async setProps(t){u(this,b,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"===t?i:3&i|8).toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(m.RESET),secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:this.kupManager.language.translate(m.SAVE),onClick:()=>this.onKupSave()};return e("div",{class:"header"},this.enableDesign?e(r,Object.assign({},t)):void 0,this.enableDesign?e(r,Object.assign({},i)):void 0)}buildForm(t,i){return t?e("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":this.enableDesign&&t&&null!=t.sections&&t.sections.length>0},style:this.getGridStyle(t),ref:s=>{s&&(s.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):e("div",null,this.kupManager.language.translate(p.EMPTY_DATA))}buildSectionHeader(t,i){const s={value:t.dim,label:this.kupManager.language.translate(m.DIMENSION),onChange:i=>{const{target:s}=i;t.dim=s.value,this.refresh()}},o={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]),t.sections.push({id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout}),this.resetData(this.internalData)}},n={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const s=i.sections.indexOf(t);i.sections.splice(s,1),this.resetData(this.internalData)}},c={checked:t.loaded,label:this.kupManager.language.translate(m.LOADED),onChange:()=>{t.loaded=!t.loaded,this.refresh()}},l={checked:"column"==t.layout,label:this.kupManager.language.translate(m.VERTICAL),onChange:()=>{t.layout="column"==t.layout?"row":"column",this.refresh()}};return e("div",{class:"section-header"},e("div",null,t.id," - ",t.layout),e("div",null,e("div",{class:"section-header-actions"},e(h,Object.assign({},s)),e(a,Object.assign({},c)),e(a,Object.assign({},l)),e(r,Object.assign({},o)),e(r,Object.assign({},n)))))}buildSection(t,i){const s={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};return e("div",{class:{section:!0,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign},ref:s=>{s&&(s.kupData={parent:i,section:t})}},this.enableDesign?this.buildSectionHeader(t,i):void 0,e("div",{class:s,style:this.getGridStyle(t)},this.enableDesign||!t.loaded||t.sections&&0!=t.sections.length?void 0:e("slot",{name:t.id}),t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):void 0))}calcSectionPosition(t,i,s,e,o){let n=e;for(let e=0;e<o.length;e++){const r=o[e].getBoundingClientRect();if(s&&t<r.y){n=e;break}if(!s&&i<r.x){n=e;break}}return n}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,f.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder(),this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,s){if(s.kupData.form){const e=this.calcSectionPosition(t,i,"column"==s.kupData.form.layout,s.kupData.form.sections.length,s.children);this.setSectionPlaceHolder(s,e)}else if(s.kupData.section){const e=this.calcSectionPosition(t,i,"column"==s.kupData.section.layout,s.kupData.section.sections.length,s.lastElementChild.children);this.setSectionPlaceHolder(s.lastElementChild,e)}}dropped(t,i,s){const e=s.kupData.parent.sections.indexOf(s.kupData.section);if(s.kupData.parent.sections.splice(e,1),i.kupData.form){i.kupData.form.sections||(i.kupData.form.sections=[]);const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.form.layout,i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||0==i.kupData.section.sections.length){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null,s.kupData.section.dim=null,i.kupData.section.id=this.buildGuid(),i.kupData.section.sections=[],i.kupData.section.sections.push(t)}const e=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,"column"==i.kupData.section.layout,i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(e,0,s.kupData.section),s.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let s="";t.sections.forEach((t=>{s+=this.enableDesign||!t.dim?" 1fr":t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim})),"column"==t.layout&&(i.gridTemplateRows=s),"row"==t.layout&&(i.gridTemplateColumns=s)}return i}setSectionPlaceHolder(t,i){const s=document.createElement("div");s.className="section-placeholder",t.insertBefore(s,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");t&&t.parentElement.removeChild(t)}resetData(t=null){t&&(this.internalDataBackup=t),this.resetInternalData=!0,setTimeout((()=>{this.internalDataBackup&&(this.internalData=this.internalDataBackup,this.internalDataBackup=null),this.resetInternalData=!1}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable"))),this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.resetInternalData?(this.internalData=null,this.unregisterInteractables()):this.internalData||(this.internalData=JSON.parse(JSON.stringify(this.data)))}componentDidRender(){this.kupManager.debug.logRender(this,!0);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");i&&i.forEach((t=>{c(t)}))}this.didRenderInteractables()}render(){return e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables(),this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{data:["dataChanged"]}}};y.style=":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";export{y as kup_dashboard}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-d4ece435.js";import{k as s,g as p,s as d}from"./p-
|
|
1
|
+
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-d4ece435.js";import{k as s,g as p,s as d}from"./p-940a5feb.js";import{c as n}from"./p-97e8ea42.js";const c="drawer";var u;!function(r){r.customStyle="Custom style of the component.",r.opened="Defaults at false. When set to true, the drawer appears."}(u||(u={}));const l=class{constructor(t){r(this,t),this.kupDrawerClose=o(this,"kup-drawer-close",6),this.kupDrawerOpen=o(this,"kup-drawer-open",6),this.kupDrawerReady=o(this,"kup-drawer-ready",6),this.kupManager=s(),this.opened=!1,this.customStyle=""}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(r){return p(this,u,r)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){t(this)}async setProps(r){d(this,u,r)}async toggle(){this.opened?this.close():this.open()}content(){const r=[],o=Array.prototype.slice.call(this.rootElement.children,0),t=[];for(let t=0;t<o.length;t++)r.push(e("slot",null));return t.push(e("div",{class:`${c}__content`},r)),t}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{"kup-opened":this.opened},e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{class:"backdrop",onClick:r=>{r.preventDefault(),r.stopPropagation()},onPointerDown:r=>{r.preventDefault(),r.stopPropagation(),this.close()},onTouchStart:r=>{r.preventDefault(),r.stopPropagation()}}),e("div",{id:n},e("div",{class:c},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};l.style=":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{l as kup_drawer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as s,h as i,H as e,g as h}from"./p-d4ece435.js";import{k as o,d as n,g as r,s as l,W as a,l as c}from"./p-
|
|
1
|
+
import{r as t,f as s,h as i,H as e,g as h}from"./p-d4ece435.js";import{k as o,d as n,g as r,s as l,W as a,l as c}from"./p-940a5feb.js";import{c as d}from"./p-97e8ea42.js";import{F as p}from"./p-d98fdb9b.js";import"./p-c26975bf.js";import"./p-e714f4dc.js";import"./p-5d398e42.js";import"./p-ef614656.js";var m;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the cell.",t.density="The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.",t.dragEnabled="When set to true, the component is draggable."}(m||(m={}));const u=class{constructor(s){t(this,s),this.kupManager=o(),this.customStyle="",this.data=null,this.density=n.NONE,this.dragEnabled=!1}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)<0&&(this.data.cssClass+=` ${i}`)}this.refresh()}async getProps(t){return r(this,m,t)}async refresh(){s(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(i,"g"),""))}this.refresh()}}async setProps(t){l(this,m,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});this.kupManager.interact.draggable(this.rootElement.shadowRoot.querySelector("#"+d),{cursorChecker:()=>null},{callback:t},a.BADGE)}}generateColumn(){return{name:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:"KUPCELL",title:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:this.kupManager.language.translate(c.EMPTY_OBJECT)}}generateRow(){const t=this.generateColumn(),s={cells:{}};return s.cells[t.name]=this.data,s}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return i(e,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:d},i(p,Object.assign({},t))))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};u.style=":host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";export{u as kup_cell}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,a as e}from"./p-d4ece435.js";import{b as s}from"./p-940a5feb.js";var i;!function(t){t.BAR="bar"}(i||(i={}));const a=a=>{let n,o;a.resource?a.resource.indexOf(".")>-1||a.resource.indexOf("/")>-1||a.resource.indexOf("\\")>-1?(o={"--kup_image_height":a.sizeY?a.sizeY:"auto","--kup_image_width":a.sizeX?a.sizeX:"100%"},n=function(e){return t("img",{onLoad:e.onLoad,src:e.resource})}(a)):(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},n=function(i){const a={"f-image__icon":!0},n={background:i.color?i.color:`var(${s.ICON})`};if(i.resource.indexOf("--kup")>-1){let t=i.resource.replace("--","");a["kup-icon"]=!0,a[t]=!0}else{const t=e(`./assets/svg/${i.resource}.svg`);n.mask=`url('${t}') no-repeat center`,n.webkitMask=`url('${t}') no-repeat center`}return t("div",{class:a,style:n})}(a)):a.data&&(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},n=function(e){const s=[];let a=0;for(let n=0;n<e.length;n++){let o;e[n].shape||(e[n].shape=i.BAR),e[n].color||(e[n].color="transparent"),e[n].height||(e[n].height="100%"),e[n].width||(e[n].width="100%");const r="step-"+n,c="css-step bottom-aligned",l={backgroundColor:e[n].color,left:a+"%",height:e[n].height,width:e[n].width};a+=parseFloat(e[n].width),o=t("span",{id:r,class:c,style:l}),s.push(o)}return t("div",{class:"f-image__css"},s)}(a.data));const r=[];if(a.badgeData)for(let e=0;e<a.badgeData.length;e++)r.push(t("kup-badge",Object.assign({},a.badgeData[e])));return t("div",Object.assign({class:`f-image ${a.wrapperClass?a.wrapperClass:""} ${a.fit?"kup-fit":""}`},a.dataSet,{id:a.id,style:o,title:a.title,onClick:a.onClick}),n,...r)};export{a as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as n}from"./p-d4ece435.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-
|
|
1
|
+
import{h as n}from"./p-d4ece435.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-5d398e42.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{type:t.buttonType?t.buttonType:"button",class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},value:t.checked?"on":"off","aria-label":t.title},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const a={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{type:e.buttonType?e.buttonType:"button",class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},"aria-label":e.title},e.trailingIcon?[n("span",{class:a},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:a},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(n,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])},r(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var t=function(){return t=Object.assign||function(r){for(var n,t=1,o=arguments.length;t<o;t++)for(var e in n=arguments[t])Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e]);return r},t.apply(this,arguments)};function o(r){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&r[n],o=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function e(r,n){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var o,e,i=t.call(r),f=[];try{for(;(void 0===n||n-- >0)&&!(o=i.next()).done;)f.push(o.value)}catch(r){e={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return f}function i(r,n,t){if(t||2===arguments.length)for(var o,e=0,i=n.length;e<i;e++)!o&&e in n||(o||(o=Array.prototype.slice.call(n,0,e)),o[e]=n[e]);return r.concat(o||Array.prototype.slice.call(n))}export{n as _,t as a,o as b,i as c,e as d}
|