@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.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/{cell-utils-5b16c180.js → cell-utils-153fb565.js} +2 -2
- package/dist/cjs/{f-button-3b9f32af.js → f-button-8f07d095.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-c08ad501.js} +8 -96
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-aa8d9253.js} +3 -3
- package/dist/cjs/{f-image-08a3d340.js → f-image-42025f08.js} +2 -2
- package/dist/cjs/f-text-field-b6300c8a.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +455 -3068
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-echart.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-4227f0a2.js → kup-manager-04dc9671.js} +8391 -332
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +3 -3
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-a201de8b.js} +1 -1
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/form-editor.js +338 -0
- package/dist/collection/assets/index.js +12 -0
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +2 -2
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +44 -12
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +75 -13
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +28 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +3 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +2 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-55b4278f.js} +2 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-ea5059eb.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-d767085a.js} +8 -95
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-e99f71a0.js} +3 -3
- package/dist/esm/{f-image-de331954.js → f-image-7bea0647.js} +2 -2
- package/dist/esm/f-text-field-662a1d4b.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +439 -3052
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-echart.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form-editor.entry.js +400 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-0ab94726.js → kup-manager-25d71df2.js} +8391 -332
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +3 -3
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-35c7a90d.js → utils-e4ea8310.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-67c64257.entry.js → p-04a941d9.entry.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-12e5c8b7.entry.js} +1 -1
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-1e727a6c.entry.js} +1 -1
- package/dist/ketchup/{p-24df4f29.entry.js → p-2d322313.entry.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/p-38dbf4b3.entry.js +1 -0
- package/dist/ketchup/{p-5d190cf5.js → p-3b867a04.js} +1 -1
- package/dist/ketchup/{p-3813281b.entry.js → p-3e4a0ce7.entry.js} +1 -1
- package/dist/ketchup/{p-f9c41e20.entry.js → p-423f8dd0.entry.js} +1 -1
- package/dist/ketchup/p-44ffd4c9.js +30 -0
- package/dist/ketchup/{p-33073f4a.js → p-52aaf54a.js} +1 -1
- package/dist/ketchup/p-5969f1e8.entry.js +9 -0
- package/dist/ketchup/p-65c045fa.entry.js +1 -0
- package/dist/ketchup/{p-8f735633.entry.js → p-700b2d70.entry.js} +1 -1
- package/dist/ketchup/{p-68fc1428.entry.js → p-72ce09e3.entry.js} +1 -1
- package/dist/ketchup/p-76cffe8d.js +1 -0
- package/dist/ketchup/{p-96101f09.entry.js → p-787615f8.entry.js} +1 -1
- package/dist/ketchup/p-8bd00b7f.entry.js +1 -0
- package/dist/ketchup/p-937cd436.js +1 -0
- package/dist/ketchup/{p-3445be1e.entry.js → p-95754af8.entry.js} +1 -1
- package/dist/ketchup/{p-d7af8156.entry.js → p-9a3c41c2.entry.js} +1 -1
- package/dist/ketchup/p-a341d44c.entry.js +1 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-af8dad7a.entry.js} +1 -1
- package/dist/ketchup/{p-0751aaf6.entry.js → p-dacd04a5.entry.js} +1 -1
- package/dist/ketchup/{p-10c8d755.js → p-dae6ef38.js} +1 -1
- package/dist/ketchup/{p-c314b1e6.js → p-e20d4661.js} +1 -1
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/ketchup/{p-4081f5f7.entry.js → p-f4fbf6df.entry.js} +1 -1
- package/dist/ketchup/p-ffa8ad2d.js +1 -0
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
- package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -1
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -1
- package/dist/types/components.d.ts +196 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +12 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +2 -0
- package/package.json +4 -3
- package/CHANGELOG.md +0 -5
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- package/dist/ketchup/p-ee33cbe9.js +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as o,g as n}from"./p-34b74425.js";import{F as r}from"./p-3b867a04.js";import{k as a,i as c,m as h,j as l}from"./p-44ffd4c9.js";import{g as d,s as p}from"./p-dae6ef38.js";import{c as u}from"./p-97e8ea42.js";import"./p-6c77a36c.js";import"./p-ffa8ad2d.js";var m,f,g;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the component."}(m||(m={})),function(t){t.Components="1",t.Sections="2"}(f||(f={})),function(t){t.Loaded="Loaded",t.Reset="Reset",t.Save="Save",t.Components="Components",t.Sections="Sections",t.Column="Column"}(g||(g={}));const y=class{constructor(s){t(this,s),this.kupSave=i(this,"kup-formeditor-save",6),this.resetInternalData=!1,this.customStyle="",this.data=null,this.kupManager=a(),this.dragType=f.Components,this.internalData=null,this.internalDataBackup=null}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return d(this,m,t)}async refresh(){s(this)}async setProps(t){p(this,m,t)}buildHeader(){const t={icon:"cancel",label:g.Reset,secondary:!0,onClick:()=>{this.resetData()}},i={icon:"save",label:g.Save,onClick:()=>this.onKupSave()};return e("div",{class:"header"},e("kup-radio",{data:[{label:g.Components,value:f.Components,checked:this.dragType==f.Components},{label:g.Sections,value:f.Sections,checked:this.dragType==f.Sections}],"onKup-radio-change":t=>{this.dragType=t.detail.value,this.resetData(this.internalData)}}),e(r,Object.assign({},t)),e(r,Object.assign({},i)))}buildForm(t,i){return t?e("div",{class:{form:!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout,"form-dropzone":t&&this.dragType==f.Sections&&null!=t.sections&&t.sections.length>0},ref:s=>{s&&(s.kupData={parent:i,form:t})}},t.sections.map((i=>this.buildSection(i,t)))):e("div",null,this.kupManager.language.translate(c.EMPTY_DATA))}buildSectionHeader(t,i){const s={icon:"add",slim:!0,onClick:()=>{t.sections||(t.sections=[]);const i={id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout,components:[]};t.components&&(t.components.forEach((t=>i.components.push(t))),t.components.splice(0)),t.sections.push(i),this.resetData(this.internalData)}},o={icon:"remove",slim:!0,secondary:!0,onClick:()=>{const s=i.sections.indexOf(t);i.sections.splice(s,1),this.resetData(this.internalData)}};return e("div",{class:"section-header"},e("div",null,t.id," ",t.dim?"("+t.dim+")":void 0," -"," ",t.layout),e("div",null,e("div",{class:"section-header-actions"},e("kup-switch",{checked:t.loaded,label:g.Loaded,"onKup-switch-change":i=>{t.loaded="on"==i.detail.value}}),e("kup-switch",{checked:"column"==t.layout,label:g.Column,"onKup-switch-change":i=>{t.layout="on"==i.detail.value?"column":"row",this.resetData(this.internalData)}}),e(r,Object.assign({},s)),e(r,Object.assign({},o)),t.components&&t.components.length>0?e("kup-image",{resource:"widgets",sizeX:"24px",sizeY:"24px"}):void 0)))}buildSection(t,i){const s={section:!0,"section-draggable":this.dragType==f.Sections,"section-dropzone":!t.sections||0==t.sections.length||this.dragType==f.Sections},o={"section-body":!0,"layout-column":t&&"column"==t.layout,"layout-row":t&&"row"==t.layout};let n={};if(t.sections){let i="";t.sections.forEach((t=>{i+=t.dim?t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim:" 1fr"})),"column"==t.layout&&(n.gridTemplateRows=i),"row"==t.layout&&(n.gridTemplateColumns=i)}return e("div",{class:s,ref:s=>{s&&(s.kupData={parent:i,section:t})}},this.dragType==f.Sections?this.buildSectionHeader(t,i):void 0,e("div",{class:o,style:n},this.dragType==f.Components&&t.components?t.components.map((i=>"SCH"==i.type?this.buildForm(i,t):e("div",{class:"component component-draggable",ref:s=>{s&&(s.kupData={section:t,componnent:i})}},i.id," - ",i.type,e("kup-switch",{checked:i.loaded,label:g.Loaded,"onKup-switch-change":t=>{i.loaded="on"==t.detail.value}})))):void 0,t.sections?t.sections.map((i=>this.buildSection(i,t))):void 0))}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".component-draggable").forEach((i=>t.push(i))),this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i))),t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,h.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,l.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,null,null,{drop:t=>{t.currentTarget.appendChild(t.relatedTarget),this.dropped(t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,l.ERROR)}}dropped(t,i){if(this.dragType==f.Components){const s=i.kupData.section.components.indexOf(i.kupData.componnent);i.kupData.section.components.splice(s,1),t.kupData.section.components.push(i.kupData.componnent),i.kupData.section=t.kupData.section}else if(this.dragType==f.Sections){const s=i.kupData.parent.sections.indexOf(i.kupData.section);if(i.kupData.parent.sections.splice(s,1),t.kupData.form)t.kupData.form.sections||(t.kupData.form.sections=[]),t.kupData.form.sections.push(i.kupData.section),i.kupData.parent=t.kupData.form;else if(t.kupData.section){if(t.kupData.section.sections||(t.kupData.section.sections=[]),t.kupData.section.components&&t.kupData.section.components.length>0){const i={id:t.kupData.section.id+"1",loaded:t.kupData.section.loaded,layout:t.kupData.section.layout,components:[]};t.kupData.section.components.forEach((t=>i.components.push(t))),t.kupData.section.components.splice(0),t.kupData.section.sections.push(i)}t.kupData.section.sections.push(i.kupData.section),i.kupData.parent=t.kupData.section}this.resetData(this.internalData)}}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(".component-draggable"))),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),this.didRenderInteractables()}render(){return e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},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%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;grid-gap:0.5em}.form-dropzone{padding:1em;border:1px solid var(--kup-primary-color)}.section{display:flex;flex-direction:column}.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);min-height:100px}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.component{height:fit-content;padding:1em;margin:0.5em}.component-draggable{border:1px solid var(--kup-secondary-color)}.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_form_editor}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as i,h as s,H as e,g as o}from"./p-
|
|
1
|
+
import{r as t,f as i,h as s,H as e,g as o}from"./p-34b74425.js";import{k as a,i as c,j as n,_ as r,F as h,$ as l,o as u,b as p}from"./p-44ffd4c9.js";import{F as d}from"./p-6c77a36c.js";import{F as b}from"./p-ffa8ad2d.js";import{g as m,s as k}from"./p-dae6ef38.js";import{c as f}from"./p-97e8ea42.js";var g,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(g||(g={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.display=x.DATATABLE,this.customStyle="",this.data=null,this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null}async getProps(t){return m(this,g,t)}async refresh(){i(this)}async setProps(t){k(this,g,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",n.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",n.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",n.ERROR)}else i.push(s("div",{class:"empty"},s(b,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",n.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(r,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${h}],[${l}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:f},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:d.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${p.PRIMARY}: var(${p.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-
|
|
1
|
+
import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-34b74425.js";import{k as s,j as o}from"./p-44ffd4c9.js";import{g as d,s as r}from"./p-dae6ef38.js";import{c}from"./p-97e8ea42.js";const u=class{constructor(i){t(this,i),this.dashClick=n(this,"kup-dash-click",6),this.active=!1,this.fontsize="",this.layout="1",this.index=0,this.kupManager=s()}onDshClickHandler(){this.dashClick.emit({id:this.index})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){let t=null;switch(this.layout){case"2":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value-int"},i("slot",{name:"value-int"})),i("div",{class:"value-dec"},i("slot",{name:"value-dec"})),i("div",{class:"unit"},i("slot",{name:"unit"})));break;case"3":t=i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"})));break;case"4":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value-and-unit"},i("div",{class:"value-int"},i("slot",{name:"value-int"})),i("div",{class:"value-dec"},i("slot",{name:"value-dec"})),i("div",{class:"unit"},i("slot",{name:"unit"}))),i("div",null),i("div",{class:"descr"},i("slot",{name:"descr"})));break;case"5":t=i("div",null,i("div",null,i("div",{class:"descr"},i("slot",{name:"descr"})),i("div",{class:"value"},i("slot",{name:"value"}))),i("div",{class:"icon"},i("slot",{name:"icon"})));break;case"6":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"}))));break;case"7":t=i("div",null,i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"}))),i("div",{class:"icon"},i("slot",{name:"icon"})));break;case"8":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"})));break;default:t=i("div",null,i("div",{class:"descr"},i("slot",{name:"descr"})),i("div",{class:"value"},i("slot",{name:"value"})))}return i("div",{id:"dash",class:this.active?"with-dyn":"",style:{fontSize:this.fontsize},onClick:()=>this.onDshClickHandler()},i("div",{id:"content",class:`layout-${this.layout} `},t))}get rootElement(){return a(this)}};var g;u.style="#dash{color:var(--kup-text-color);font-size:2vw;display:flex;align-items:center;justify-content:center;position:relative;text-align:center;position:relative;word-break:normal}#dash.with-dyn{cursor:pointer}#dash #content .icon{margin:auto;font-size:90%}#dash #content.layout-1,#dash #content.layout-3{text-align:center}#dash #content.layout-1 .descr,#dash #content.layout-3 .descr{font-size:70%;width:100%}#dash #content.layout-1 .value,#dash #content.layout-3 .value{font-size:220%}#dash #content.layout-2>div{display:flex}#dash #content.layout-2>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-2>div .value-int{font-size:250%}#dash #content.layout-2>div .value-dec,#dash #content.layout-2>div .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-2>div .value-dec{margin-left:2%}#dash #content.layout-2>div .unit{margin-left:4%}#dash #content.layout-4>div{display:grid;grid-template-columns:2fr 5fr}#dash #content.layout-4>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-4>div .value-and-unit{display:flex}#dash #content.layout-4>div .value-and-unit .value-int{font-size:250%}#dash #content.layout-4>div .value-and-unit .value-dec,#dash #content.layout-4>div .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-4>div .value-and-unit .value-dec{margin-left:2%}#dash #content.layout-4>div .value-and-unit .unit{margin-left:4%}#dash #content.layout-4>div .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}#dash #content.layout-5>div,#dash #content.layout-7>div{display:flex}#dash #content.layout-5>div .icon,#dash #content.layout-7>div .icon{font-size:150%;margin:auto;margin-left:10%}#dash #content.layout-5>div .value,#dash #content.layout-7>div .value{font-size:200%}#dash #content.layout-5>div .descr,#dash #content.layout-7>div .descr{text-align:right;font-size:65%;width:100%;min-width:max-content}#dash #content.layout-6>div{display:flex;justify-content:space-between}#dash #content.layout-6>div .icon{font-size:150%;margin-right:10%}#dash #content.layout-6>div .value{font-size:220%;text-align:right}#dash #content.layout-6>div .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}#dash #content.layout-8>div{display:flex;align-items:center}#dash #content.layout-8>div .icon{margin-right:4%;font-size:75%}#dash #content.layout-8>div .value{margin:0 10%;font-size:250%}#dash #content.layout-8>div .descr{font-size:60%;text-align:left}",function(t){t.columns="The number of columns displayed by the grid, the default behavior is 12.",t.customStyle="Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",t.singleLine="When set to true, forces the content on a single line."}(g||(g={}));const p=class{constructor(n){t(this,n),this.columns=12,this.customStyle="",this.singleLine=!1,this.kupManager=s()}async getProps(t){return d(this,g,t)}async refresh(){e(this)}async setProps(t){r(this,g,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t=this.rootElement.children;if(!t||0===t.length)return void this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",o.WARNING);const n=[];for(let a=0;a<t.length;a++){let e=null;if(this.singleLine)e=i("slot",{name:`${a}`});else{let n=1;t[a].span&&(n=t[a].span),e=i("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},i("slot",{name:`${a}`}))}n.push(e)}const a={};return this.columns&&12!==this.columns&&(a["--kup_grid_columns"]=this.columns),i(l,{style:a},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:c},i("div",{class:this.singleLine?"flex-layout":"layout-grid"},i("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};p.style=":host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}";export{u as kup_dash,p as kup_grid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,a as t}from"./p-34b74425.js";import{a as l}from"./p-44ffd4c9.js";const i=(t,l)=>e("div",Object.assign({class:`f-text-field ${t.danger?"kup-danger":""} ${t.fullHeight?"kup-full-height":""} ${t.fullWidth?"kup-full-width":""} ${t.info?"kup-info":""} ${t.secondary?"kup-secondary":""} ${t.shaped?"kup-shaped":""} ${t.success?"kup-success":""} ${t.warning?"kup-warning":""} ${t.wrapperClass?t.wrapperClass:""}`},t.dataSet,{id:t.id,title:t.title}),t.leadingLabel||t.trailingLabel?e("div",{class:"mdc-form-field "+(t.leadingLabel?"mdc-form-field--align-end":"")},[d(t),c(t),e("label",null,t.label)]):[d(t),c(t)],l);function d(i){const d=i.textArea||i.outlined;let c,n;if(!i.label||i.leadingLabel||i.trailingLabel||(c=e("label",{class:"mdc-floating-label",htmlFor:"kup-input"},i.label)),i.icon){let d,c="";if(Object.values(l).indexOf(i.icon)>-1)c=i.icon.replace("--","");else{let e=`url('${t(`./assets/svg/${i.icon}.svg`)}') no-repeat center`;d={mask:e,webkitMask:e}}n=e("span",{style:d,onClick:i.onIconClick,class:`mdc-text-field__icon kup-icon action ${c}`})}return e("div",{class:{"is-clearable":i.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":i.disabled,"mdc-text-field--filled":!i.fullWidth&&!d,"mdc-text-field--no-label":!i.label,"mdc-text-field--fullwidth":i.fullWidth,"mdc-text-field--outlined":d,"mdc-text-field--textarea":i.textArea,"mdc-text-field--with-leading-icon":i.icon&&!i.trailingIcon,"mdc-text-field--with-trailing-icon":i.icon&&i.trailingIcon}},i.textArea&&i.maxLength?e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",i.maxLength):void 0,i.trailingIcon?void 0:n,i.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:i.disabled,readOnly:i.readOnly,maxlength:i.maxLength,value:i.value,onBlur:i.onBlur,onClick:i.onClick,onChange:i.onChange,onFocus:i.onFocus,onInput:i.onInput,onKeyDown:i.onKeyDown})):e("input",{type:i.inputType?i.inputType:"text",step:i.step,min:i.min,max:i.max,class:"mdc-text-field__input",disabled:i.disabled,readOnly:i.readOnly,placeholder:i.fullWidth?i.label:void 0,maxlength:i.maxLength,value:i.value,onBlur:i.onBlur,onClick:i.onClick,onChange:i.onChange,onFocus:i.onFocus,onInput:i.onInput,onKeyDown:i.onKeyDown}),i.isClearable?e("span",{class:`mdc-text-field__icon kup-icon ${l.CLEAR.replace("--","")}`,onClick:i.onClearIconClick}):void 0,i.trailingIcon?n:void 0,i.fullWidth||d?void 0:c,d?e("div",{class:"mdc-notched-outline"},e("div",{class:"mdc-notched-outline__leading"}),e("div",{class:"mdc-notched-outline__notch"},c),e("div",{class:"mdc-notched-outline__trailing"})):e("span",{class:"mdc-line-ripple"}))}function c(t){if(!1!==t.helperEnabled){if(t.helper)return e("div",{class:"mdc-text-field-helper-line"},e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!t.helperWhenFocused}},t.helper),t.maxLength&&!t.textArea?e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",t.maxLength.toString()):void 0);if(t.maxLength&&!t.textArea)return e("div",{class:"mdc-text-field-helper-line"},e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",t.maxLength))}}export{i as F}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as n,f as i,h as r,H as e,g as o,a}from"./p-
|
|
1
|
+
import{r as t,c as n,f as i,h as r,H as e,g as o,a}from"./p-34b74425.js";import{k as s,j as u,b as l,u as h}from"./p-44ffd4c9.js";import{g as f,s as c}from"./p-dae6ef38.js";import{c as v}from"./p-97e8ea42.js";import{c as d}from"./p-52aaf54a.js";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as h,g as o}from"./p-34b74425.js";import{k as r,K as l,x as n}from"./p-44ffd4c9.js";import{c as u}from"./p-97e8ea42.js";import{F as c}from"./p-76cffe8d.js";import{F as a}from"./p-ecb7069b.js";import"./p-a0b1d769.js";import"./p-8c44c3b9.js";var p;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(p||(p={}));const m=class{constructor(s){t(this,s),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1,this.kupManager=r(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){let i={};if(t)i=p;else for(const t in p)Object.prototype.hasOwnProperty.call(p,t)&&(i[t]=this[t]);return i}async refresh(){s(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,s){let e=this.kupManager.math.numberify(t,!0);if(e){let t=e.toString();const h=t.indexOf(".");let o=h>-1?t.substring(0,h):t,r=h>-1?t.substring(h+1):"";for(this.maxIntegers&&o.length>this.maxIntegers&&(o=o.substring(o.length-this.maxIntegers)),this.maxDecimals&&r.length>this.maxDecimals&&(r=r.substring(0,this.maxDecimals));this.maxLength&&o.length+r.length>this.maxLength;)r.length>1?r=r.substring(0,r.length-1):o.length>1&&(o=o.substring(1));t=h>-1?`${o}.${r}`:o,1!=s&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),s=Object.assign({},this.data["kup-text-field"]);return s.icon||(s.icon="calculator"),s.icon&&(s.trailingIcon=!0),e(c,Object.assign({},s,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return e("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:n.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),a(i))}this.kupManager.debug.logRender(this,!0)}render(){return e(h,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return o(this)}};m.style=":host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,b as c}from"./p-44ffd4c9.js";import{h as t}from"./p-34b74425.js";import{b as n}from"./p-52aaf54a.js";import{F as r}from"./p-76cffe8d.js";import{d as a}from"./p-dae6ef38.js";import{F as s}from"./p-ffa8ad2d.js";import{F as o}from"./p-e20d4661.js";const i=[e.DATA_TABLE,e.TREE];var u,l,p,b,d;!function(e){e.CLICK="kup-cell-click",e.ICON_CLICK="kup-cell-iconclick",e.INPUT="kup-cell-input",e.UPDATE="kup-cell-update"}(u||(u={})),function(e){e.DENSE="dense",e.MEDIUM="medium",e.NONE="",e.WIDE="wide"}(l||(l={})),function(e){e.BG_DANGER="danger-bg",e.BG_GREEN="green-bg",e.BG_GREY="grey-bg",e.BG_ORANGE="orange-bg",e.BG_PURPLE="purple-bg",e.BG_SUCCESS="success-bg",e.BG_TEAL="teal-bg",e.BG_WARNING="warning-bg",e.C_BG_DANGER="c-danger-bg",e.C_BG_GREEN="c-green-bg",e.C_BG_GREY="c-grey-bg",e.C_BG_ORANGE="c-orange-bg",e.C_BG_PURPLE="c-purple-bg",e.C_BG_SUCCESS="c-success-bg",e.C_BG_TEAL="c-teal-bg",e.C_BG_WARNING="c-warning-bg",e.C_CENTERED="c-centered",e.C_FITTED="c-fitted",e.C_PADDED="c-padded",e.C_PADDED_HOR="c-padded-hor",e.C_PADDED_VER="c-padded-ver",e.C_ROUND="c-round",e.C_RIGHT_ALIGNED="c-right-aligned",e.C_SHAPED="c-shaped",e.C_TEXT_VERTICAL="c-vertical-text",e.CLICKABLE="clickable",e.HOVER_DISPLAY="display-on-hover",e.HOVER_EXPAND="expand-on-hover",e.HOVER_REDUCE="reduce-on-hover",e.INDICATOR_TOPRIGHT="top-right-indicator",e.LINK="link",e.MONOSPACE="monospace",e.OBJ="obj",e.SHAPED="shaped",e.TEXT_DANGER="danger-text",e.TEXT_INFO="info-text",e.TEXT_PRIMARY="primary-text",e.TEXT_PURPLE="purple-text",e.TEXT_SECONDARY="secondary-text",e.TEXT_STRONG="strong-text",e.TEXT_SUCCESS="success-text",e.TEXT_WARNING="warning-text",e.UNDERLINED="underlined"}(p||(p={})),function(e){e.AUTOCOMPLETE="ACP",e.BUTTON_LIST="BTN",e.CHART="GRA",e.CHECKBOX="CHK",e.CHIP="CHI",e.COLOR_PICKER="CLP",e.COMBOBOX="CMB",e.EDITOR="EDT",e.GAUGE="GAU",e.IMAGE="IMG",e.KNOB="KNB",e.PROGRESS_BAR="PGB",e.RADIO="RAD",e.RATING="RTG",e.TEXT_FIELD="ITX"}(b||(b={})),function(e){e.AUTOCOMPLETE="autocomplete",e.BAR="bar",e.BUTTON="button",e.BUTTON_LIST="button-list",e.CHART="chart",e.CHECKBOX="checkbox",e.CHIP="chips",e.COLOR_PICKER="color-picker",e.COMBOBOX="combobox",e.DATE="date",e.DATETIME="datetime",e.EDITOR="editor",e.GAUGE="gauge",e.ICON="icon",e.IMAGE="image",e.KNOB="knob",e.LINK="link",e.NUMBER="number",e.PROGRESS_BAR="progress-bar",e.RADIO="radio",e.RATING="rating",e.STRING="string",e.TIME="time"}(d||(d={}));const k=[d.AUTOCOMPLETE,d.CHECKBOX,d.COLOR_PICKER,d.COMBOBOX,d.DATE,d.NUMBER,d.RATING,d.STRING,d.TIME],g=[d.BAR,d.BUTTON,d.BUTTON_LIST,d.CHART,d.CHIP,d.COLOR_PICKER,d.GAUGE,d.KNOB,d.PROGRESS_BAR,d.RADIO,d.RATING],h=e=>{const c={"data-indeterminate":!!e.indeterminate},n={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return t("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),t("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},t("div",{class:n},t("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},c,{value:e.checked?"on":"off"})),t("div",{class:"checkbox__background",onClick:e.onChange},t("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},t("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),t("div",{class:"checkbox__mixedmark"}))),e.label?t("label",null,e.label):void 0))},f=document.documentElement,m=l=>{const m=l.cell,j=l.column,v=l.row,w=l.shape?l.shape:m.shape?m.shape:j.shape?j.shape:null,O=!f.ketchup.objects.isEmptyKupObj(m.obj),_=!(!m.isEditable||!l.editable),y=l.previousValue!==m.value?m.value:"",C=function(e,c){const t=e.obj;if(c)switch(c.toUpperCase()){case b.AUTOCOMPLETE:return d.AUTOCOMPLETE;case b.BUTTON_LIST:return d.BUTTON_LIST;case b.CHART:return d.CHART;case b.CHECKBOX:return d.CHECKBOX;case b.CHIP:return d.CHIP;case b.COLOR_PICKER:return d.COLOR_PICKER;case b.COMBOBOX:return d.COMBOBOX;case b.EDITOR:return d.EDITOR;case b.GAUGE:return d.GAUGE;case b.IMAGE:return d.IMAGE;case b.KNOB:return d.KNOB;case b.PROGRESS_BAR:return d.PROGRESS_BAR;case b.RADIO:return d.RADIO;case b.RATING:return d.RATING;case b.TEXT_FIELD:return d.STRING}return f.ketchup.objects.isBar(t)?d.BAR:f.ketchup.objects.isButton(t)?d.BUTTON:f.ketchup.objects.isChart(t)?d.CHART:f.ketchup.objects.isCheckbox(t)?d.CHECKBOX:f.ketchup.objects.isColor(t)?d.COLOR_PICKER:f.ketchup.objects.isIcon(t)?d.ICON:f.ketchup.objects.isImage(t)?d.IMAGE:f.ketchup.objects.isLink(t)?d.LINK:f.ketchup.objects.isProgressBar(t)?d.PROGRESS_BAR:f.ketchup.objects.isRadio(t)?d.RADIO:f.ketchup.objects.isKupObjList(t)?d.CHIP:f.ketchup.objects.isNumber(t)?d.NUMBER:f.ketchup.objects.isDate(t)?d.DATE:f.ketchup.objects.isTimestamp(t)?d.DATETIME:f.ketchup.objects.isTime(t)?d.TIME:f.ketchup.objects.isVoCodver(t)?d.ICON:d.STRING}(m,w),$=Object.assign({},m.data);let T=m.cssClass?m.cssClass:j.cssClass?j.cssClass:"";const z={"f-cell":!0,[p.OBJ]:!!O,[C+"-cell"]:!0,[l.wrapperClass]:!!l.wrapperClass,[l.density]:!(!l.density||C===d.BAR),[T]:!!T};let B=y;_&&k.includes(C)?B=function(e,c,n,s,o){switch(e){case d.AUTOCOMPLETE:return t("kup-autocomplete",Object.assign({},n.data,{class:"kup-full-width","onkup-autocomplete-change":c=>x(c,o,e,u.UPDATE),"onkup-autocomplete-input":c=>x(c,o,e,u.INPUT),"onkup-autocomplete-iconclick":c=>x(c,o,e,u.ICON_CLICK)}));case d.CHECKBOX:return i.includes(o.component.rootElement.tagName)&&(c[p.C_CENTERED]=!0),t(h,Object.assign({},n.data,{onChange:c=>x(c,o,e,u.UPDATE)}));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n.data,{class:"kup-full-width",disabled:!1,"onkup-colorpicker-change":c=>x(c,o,e,u.UPDATE)}));case d.COMBOBOX:return t("kup-combobox",Object.assign({},n.data,{class:"kup-full-width","onkup-combobox-change":c=>x(c,o,e,u.UPDATE),"onkup-combobox-input":c=>x(c,o,e,u.INPUT),"onkup-combobox-iconclick":c=>x(c,o,e,u.ICON_CLICK)}));case d.DATE:return t("kup-date-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-datepicker-change":c=>x(c,o,e,u.UPDATE),"onkup-datepicker-input":c=>x(c,o,e,u.INPUT)}));case d.RATING:return t("kup-rating",Object.assign({},n.data,{disabled:!1,"onkup-rating-click":c=>x(c,o,e,u.UPDATE)}));case d.TIME:return t("kup-time-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-timepicker-change":c=>x(c,o,e,u.UPDATE),"onkup-timepicker-input":c=>x(c,o,e,u.INPUT)}));case d.NUMBER:c[p.C_RIGHT_ALIGNED]=!0;case d.STRING:return t(r,Object.assign({},n.data,{icon:n.icon?n.icon:s.icon?s.icon:null,fullWidth:!0,inputType:e===d.NUMBER?"number":null,value:e===d.NUMBER?a(n.value).toString():n.value,onChange:c=>x(c,o,e,u.UPDATE),onInput:c=>x(c,o,e,u.INPUT),onIconClick:c=>x(c,o,e,u.ICON_CLICK)}))}}(C,z,m,j,l):m.data&&g.includes(C)?(l.setSizes&&function(e,c,t){switch(e){case d.BAR:c.sizeY||(c.sizeY="26px");break;case d.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case d.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case d.CHIP:case d.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(C,$,m),B=l.renderKup?function(e,c,n,r,l,b,k){switch(e){case d.BAR:return n.data?t("div",{style:{height:n.sizeY,width:"100%"}},t(s,Object.assign({},n))):t("kup-image",Object.assign({},n));case d.BUTTON:return i.includes(k.component.rootElement.tagName)&&(c[p.C_CENTERED]=!0),t("kup-button",Object.assign({},n,{"onkup-button-click":c=>x(c,k,e,u.CLICK)}));case d.BUTTON_LIST:return i.includes(k.component.rootElement.tagName)&&(c[p.C_CENTERED]=!0),n["data-storage"]={cell:r,row:l,column:b},t("kup-button-list",Object.assign({},n));case d.CHART:return i.includes(k.component.rootElement.tagName)&&(c[p.C_CENTERED]=!0),t("kup-chart",Object.assign({},n));case d.CHIP:return t(o,Object.assign({},n));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n,{class:"kup-full-width",disabled:!0}));case d.GAUGE:return t("kup-gauge",Object.assign({value:a(r.value),"width-component":"280px"},n));case d.KNOB:case d.PROGRESS_BAR:return t("kup-progress-bar",Object.assign({},n));case d.RADIO:return i.includes(k.component.rootElement.tagName)&&(c[p.C_CENTERED]=!0),n.disabled=l.readOnly,t("kup-radio",Object.assign({},n));case d.RATING:return t("kup-rating",Object.assign({},n,{disabled:!0}))}}(C,z,$,m,v,j,l):t("span",{class:"cell-"+C+" placeholder"})):(l.setSizes&&function(c,t,n,r){switch(c){case d.CHECKBOX:case d.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),n.style?n.style.height||(n.style.minHeight=t.sizeY):n.style={minHeight:t.sizeY};break;case d.IMAGE:r.component.rootElement.tagName===e.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}(C,$,m,l),B=function(e,c,r,o,u,l,b){switch(e){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.DATETIME:case d.TIME:if(r&&""!=r){const e=n(l,u);return t("div",{class:"f-cell__text"},e)}return r;case d.CHECKBOX:return i.includes(b.component.rootElement.tagName)&&(o[p.C_CENTERED]=!0),t(s,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case d.EDITOR:return t("div",{innerHTML:u.value});case d.ICON:case d.IMAGE:return i.includes(b.component.rootElement.tagName)&&(o[p.C_CENTERED]=!0),c.badgeData&&(o[p.C_PADDED]=!0),t(s,Object.assign({},c));case d.LINK:return t("a",{href:r,target:"_blank"},u.value);case d.NUMBER:if(r&&""!=r){const e=a(u.value),c=n(l,u);return e<0&&(o[p.TEXT_DANGER]=!0),i.includes(b.component.rootElement.tagName)&&(o[p.C_RIGHT_ALIGNED]=!0),t("div",{class:"f-cell__text"},c)}return t("div",{class:"f-cell__text"},r);default:return t("div",{class:"f-cell__text"},r)}}(C,$,B,z,m,j,l));let H=null;!_&&(j.icon||m.icon)&&B&&(H=t(s,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:m.icon?m.icon:j.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let I=null;f.ketchup.debug.isDebug()&&O?I=m.obj.t+"; "+m.obj.p+"; "+m.obj.k+";":null!=m.title&&""!=m.title.trim()&&(I=m.title);let F=null;if(m.info){const e=Object.assign({},m.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),F=t(s,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return t("div",{class:z,style:m.style},t("div",{class:"f-cell__content",style:m.styleContent,title:I},l.indents,F,H,B))};function x(e,c,t,r){const a=c.cell,s=c.column,o=c.component,i=c.row;let l="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(r===u.UPDATE){switch(t){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.TIME:a.data&&(a.data.initialValue=l);break;case d.CHECKBOX:l="on"===l?"0":"1",a.data&&(a.data.checked="0"!==l)}a.obj&&(a.obj.k=l.toString()),a.value=l.toString(),a.displayedValue=null,a.displayedValue=n(s,a)}if(o&&o.rootElement){const c=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:o,id:o.rootElement.id,cell:a,column:s,event:e,row:i,type:t}});o.rootElement.dispatchEvent(c);try{o.refresh()}catch(e){}}}export{m as F,h as a,l as b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as o,H as s,g as r}from"./p-
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as s,g as r}from"./p-34b74425.js";import{k as h}from"./p-44ffd4c9.js";import{g as a,s as n}from"./p-dae6ef38.js";import{c as p}from"./p-97e8ea42.js";var f;!function(t){t.customStyle="Custom style of the component.",t.placeholderAttrs="Html attributes of the picture before the component enters the viewport.",t.resourceAttrs="Html attributes of the picture after the component enters the viewport."}(f||(f={}));var l,c,d,m,u,w,b=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},k=function(t,e,i,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 e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i};const v=class{constructor(i){t(this,i),this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6),this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6),this.isInViewport=!1,this.customStyle="",this.placeholderAttrs={},this.resourceAttrs={},this.threshold=.25,l.set(this,null),c.set(this,h()),d.set(this,null),m.set(this,null),u.set(this,!1),w.set(this,null)}async getProps(t){return a(this,f,t)}async refresh(){i(this)}async setProps(t){n(this,f,t)}setObserver(){k(this,l,new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.isInViewport=!0,b(this,l,"f").unobserve(this.rootElement))}))}),{threshold:this.threshold}),"f")}componentWillLoad(){b(this,c,"f").debug.logLoad(this,!1),b(this,c,"f").theme.register(this),this.setObserver()}componentDidLoad(){b(this,c,"f").debug.logLoad(this,!0)}componentWillRender(){b(this,c,"f").debug.logRender(this,!1)}componentDidRender(){b(this,c,"f").debug.logRender(this,!0)}render(){return this.isInViewport&&!b(this,u,"f")&&k(this,u,!0,"f"),o(s,null,o("style",null,b(this,c,"f").theme.setKupStyle(this.rootElement)),o("div",{id:p,ref:t=>{k(this,w,t,"f")}},o("img",Object.assign({},this.placeholderAttrs,{class:"placeholder",ref:t=>k(this,d,t,"f"),onLoad:()=>{b(this,d,"f").naturalWidth>b(this,d,"f").naturalHeight?b(this,w,"f").classList.add("horizontal"):b(this,w,"f").classList.add("vertical"),b(this,l,"f").observe(this.rootElement),b(this,d,"f").classList.add("placeholder--loaded"),this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),b(this,u,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>k(this,m,t,"f"),onLoad:()=>{b(this,d,"f").classList.add("placeholder--fade-out"),b(this,m,"f").classList.add("resource--fade-in"),this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){b(this,c,"f").theme.unregister(this),b(this,l,"f").unobserve(this.rootElement)}get rootElement(){return r(this)}};l=new WeakMap,c=new WeakMap,d=new WeakMap,m=new WeakMap,u=new WeakMap,w=new WeakMap,v.style=":host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-color)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";export{v as kup_photo_frame}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as s,h as i,H as h,g as a}from"./p-
|
|
1
|
+
import{r as t,c as e,f as s,h as i,H as h,g as a}from"./p-34b74425.js";import{k as o}from"./p-44ffd4c9.js";import{g as n,s as l}from"./p-dae6ef38.js";import{c as r}from"./p-97e8ea42.js";var p,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(p||(p={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(s){t(this,s),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,p,t)}async getComponent(){return this.lazyComponent}async refresh(){s(this)}async setProps(t){l(this,p,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,s=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),s+=" kup-loaded"):this.showPlaceholder&&(t=e,s+=" kup-to-be-loaded"),i(h,{class:s},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:r},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};d.style=":host{--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );display:block;height:100%;width:100%;position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:100%;width:100%}#kup-component kup-data-table{min-width:100%}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,f as i,h as a,H as o,g as n}from"./p-34b74425.js";import{k as r}from"./p-44ffd4c9.js";import{g as e,s as c}from"./p-dae6ef38.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-3b867a04.js";import"./p-6c77a36c.js";import"./p-ffa8ad2d.js";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null,this.kupManager=r()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return e(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,h,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return a(o,{"kup-visible":this.visible},a("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{id:l},a("div",{class:"snackbar"},a("div",{class:"snackbar__text"},this.text),this.actionButton||this.closeButton?a("div",{class:"snackbar__buttons"},this.actionButton?a("div",{class:"snackbar__action"},a(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?a("div",{class:"snackbar__close"},a(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:flex-start;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;white-space:nowrap}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:100%}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as a,f as o,h as t,H as n,g as i}from"./p-
|
|
1
|
+
import{r,c as a,f as o,h as t,H as n,g as i}from"./p-34b74425.js";import{k as s}from"./p-44ffd4c9.js";import{g as p,s as e}from"./p-dae6ef38.js";import{c as b}from"./p-97e8ea42.js";var v,l;!function(r){r.customStyle="Custom style of the component.",r.image="Image displayed by the nav bar, uses the kup-image component's props.",r.label="Text displayed by the nav bar.",r.showMenuButton="When true, the menu button will be displayed on the left of the nav bar.",r.styling="Defines the style of the nav bar"}(v||(v={})),function(r){r.SHORT="short",r.STANDARD="standard"}(l||(l={}));const u=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.customStyle="",this.styling=l.STANDARD,this.kupManager=s()}async getProps(r){return p(this,v,r)}async refresh(){o(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(r){e(this,v,r)}content(){const r=Array.prototype.slice.call(this.rootElement.children,0),a=[],o=[];for(let n=0;n<r.length;n++)"left"===r[n].slot?a.push(t("slot",{name:"left"})):o.push(t("slot",{name:"right"}));return[a.length?t("section",{class:"nav-bar__section nav-bar__section--align-start"},a):null,o.length?t("section",{class:"nav-bar__section nav-bar__section--align-end",role:"toolbar"},o):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.resize.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return t(n,{class:"header"},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:b},t("header",{class:`nav-bar nav-bar--${this.styling.toLowerCase()} `},t("div",{class:"nav-bar__row"},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.resize.unobserve(this.rootElement),this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_padding:var(--kup-navbar-padding, 8px 12px);--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup-navbar-background-color);box-shadow:var(--kup_navbar_box_shadow);box-sizing:border-box;color:var(--kup-navbar-color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-primary-color:var(--kup-navbar-color);--kup-textfield-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}";export{u as kup_nav_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,g as h}from"./p-
|
|
1
|
+
import{r as i,h as t,g as h}from"./p-34b74425.js";import{k as o}from"./p-44ffd4c9.js";const e=class{constructor(t){i(this,t),this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.kupManager=o(),this.divlist=[]}getObjects(i){let t;return new Promise((h=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),h(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((h=>{this.divlist=[],i.rows.forEach((i=>{let h=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,h.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},h))})),h(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,h=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},h={"--lyo_obj-height":this.defobjsize},t("div",{class:i,style:h},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return h(this)}};e.style=".kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height)/2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height)/3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height)*2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height)*3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-color, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{e as kup_qlik}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,d as t}from"./p-
|
|
1
|
+
import{e as n,d as t}from"./p-44ffd4c9.js";const u=document.documentElement;var r;function i(n){if(n)for(let t=0;t<n.length;t++)n[t].id=t.toString()}function e(n){const t={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==n&&(t.second="2-digit"),new Intl.DateTimeFormat(u.ketchup.dates.getLocale()+"-u-hc-h23",t).formatToParts(new Date).map((n=>{switch(n.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return n.value}})).join("")}function c(n,t){return null!=n&&""!=n.trim()&&!!o(h(n,t))}function o(n){return!isNaN(n)}function s(n){return n&&null!=n&&""!=n.trim()||(n="0"),u.ketchup.math.numberify(n)}function a(n){let t="";return"P"==(n=n.toUpperCase())?t=" %":"VE"==n?t=" €":"VL"==n?t=" £":"VV"==n&&(t=" $"),t}function f(n,t,r){if(null==n||isNaN(n))return"";let i=function(n,t){return null==n?"":I(n,t,u.ketchup.dates.getLocale(),!0)}(n,t);return i+=a(r),i}function l(n,t,u){return f(s(n),t,u)}function h(n,t){return g(n,t,m(u.ketchup.dates.getLocale()))}function d(n,t){return g(n,t,".")}function g(n,t,r){if(null==n||""==n.trim())return"";let i=n,e=a(t);""!=e&&(n=n.replace(e,""));let c=null;return c="."==r?/,/g:/\./g,n=n.replace(c,""),"."!=r&&(n=n.replace(/,/g,".")),null==u.ketchup.math.numberify(n)||isNaN(u.ketchup.math.numberify(n))?i:I(s(n),-1,"en-US",!1)}function m(n){return function(n){return Intl.NumberFormat(n).formatToParts(1000.1).find((n=>"decimal"===n.type)).value}(n)}function I(n,t,u,r){return null==n&&(n=0),null!=t&&-1!=t||(t=function(n){if(Math.floor(n)===n)return 0;let t=n.toString().split(".")[1];return t&&t.length?t.length:0}(n)),Number(n).toLocaleString(u,t>-1?{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:r}:{useGrouping:r})}function w(n,t){const r={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(r.second="2-digit"),n.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}function N(n,t){let r=e(t);return u.ketchup.dates.isValid(n,r,!0)}function p(n){return D(n,t.ISO_DATE_TIME,!0)}function D(t,r,i){let c=e(i);return u.ketchup.dates.isValid(t,c)?u.ketchup.dates.format(u.ketchup.dates.normalize(t,n.TIME),r):""}function b(t,r,i){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==r&&(e.second="2-digit"),function(n,t,r,i){if(null==i)return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r);switch(i){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return n}return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}(t,u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIME)),e,i)}function H(t){return u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIMESTAMP)).toLocaleString(u.ketchup.dates.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function V(n,t){if(null==n)return"";const r=new Date;r.setDate(1),r.setMonth(n-1);const i={month:t};return new Intl.DateTimeFormat(u.ketchup.dates.getLocale(),i).format(r)}function j(n){null!=n&&""!=n.trim()||(n=r.LONG);for(var t=[],u=0;u<12;u++)t[u]=V(u+1,n);return t}function M(n,t,u){let r={};if(u)r=t;else for(const u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=n[u]);return r}function k(n,t,u){for(const r in u)t[r]?n[r]=u[r]:n.rootElement[r]=u[r]}!function(n){n.NUMERIC="numeric",n.DIGIT2="2-digit",n.LONG="long",n.SHORT="short",n.NARROW="narrow"}(r||(r={}));export{r as D,p as a,c as b,h as c,s as d,o as e,D as f,M as g,i as h,N as i,j,l as k,w as l,b as m,f as n,H as o,m as p,k as s,d as u}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./p-
|
|
1
|
+
import{h as c}from"./p-34b74425.js";import{F as i}from"./p-ffa8ad2d.js";import{a as s,i as e,b as n}from"./p-44ffd4c9.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${s.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(e.EXPAND)+"/"+l.ketchup.language.translate(e.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(e){let l="chip ",o=[],d="chip__icon chip__icon--leading";return(r||a)&&e.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),e.icon&&o.push(c(i,Object.assign({},{color:a&&e.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:e.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":e.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],e):null,role:"row",title:e.title?e.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:e.id,checked:e.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],e):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],e):null},c("span",{class:"chip__text"},e.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${s.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],e):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{a as F,p as a}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import{_ as t,a as n,b as i,c as e,d as r}from"./p-a0b1d769.js";import{M as u,a as s}from"./p-8c44c3b9.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2016 Google Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
|
14
|
+
* all copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
* THE SOFTWARE.
|
|
23
|
+
*/var o=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),c=function(){function i(i,e){for(var r=[],u=2;u<arguments.length;u++)r[u-2]=arguments[u];this.root=i,this.initialize.apply(this,t([],n(r))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return i.attachTo=function(t){return new i(t,new o({}))},i.prototype.initialize=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n]},i.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},i.prototype.initialSyncWithDOM=function(){},i.prototype.destroy=function(){this.foundation.destroy()},i.prototype.listen=function(t,n,i){this.root.addEventListener(t,n,i)},i.prototype.unlisten=function(t,n,i){this.root.removeEventListener(t,n,i)},i.prototype.emit=function(t,n,i){var e;void 0===i&&(i=!1),"function"==typeof CustomEvent?e=new CustomEvent(t,{bubbles:i,detail:n}):(e=document.createEvent("CustomEvent")).initCustomEvent(t,i,!1,n),this.root.dispatchEvent(e)},i}();
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2016 Google Inc.
|
|
27
|
+
*
|
|
28
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
29
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
30
|
+
* in the Software without restriction, including without limitation the rights
|
|
31
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
32
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
33
|
+
* furnished to do so, subject to the following conditions:
|
|
34
|
+
*
|
|
35
|
+
* The above copyright notice and this permission notice shall be included in
|
|
36
|
+
* all copies or substantial portions of the Software.
|
|
37
|
+
*
|
|
38
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
39
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
40
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
41
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
42
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
44
|
+
* THE SOFTWARE.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @license
|
|
48
|
+
* Copyright 2019 Google Inc.
|
|
49
|
+
*
|
|
50
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
51
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
52
|
+
* in the Software without restriction, including without limitation the rights
|
|
53
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
54
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
55
|
+
* furnished to do so, subject to the following conditions:
|
|
56
|
+
*
|
|
57
|
+
* The above copyright notice and this permission notice shall be included in
|
|
58
|
+
* all copies or substantial portions of the Software.
|
|
59
|
+
*
|
|
60
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
61
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
62
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
63
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
64
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
65
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
66
|
+
* THE SOFTWARE.
|
|
67
|
+
*/
|
|
68
|
+
function f(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var n=!1;try{var i={get passive(){return n=!0,!1}},e=function(){};t.document.addEventListener("test",e,i),t.document.removeEventListener("test",e,i)}catch(t){n=!1}return n}
|
|
69
|
+
/**
|
|
70
|
+
* @license
|
|
71
|
+
* Copyright 2018 Google Inc.
|
|
72
|
+
*
|
|
73
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
74
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
75
|
+
* in the Software without restriction, including without limitation the rights
|
|
76
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
77
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
78
|
+
* furnished to do so, subject to the following conditions:
|
|
79
|
+
*
|
|
80
|
+
* The above copyright notice and this permission notice shall be included in
|
|
81
|
+
* all copies or substantial portions of the Software.
|
|
82
|
+
*
|
|
83
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
84
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
85
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
86
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
87
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
88
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
89
|
+
* THE SOFTWARE.
|
|
90
|
+
*/(t)&&{passive:!0}}
|
|
91
|
+
/**
|
|
92
|
+
* @license
|
|
93
|
+
* Copyright 2016 Google Inc.
|
|
94
|
+
*
|
|
95
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
96
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
97
|
+
* in the Software without restriction, including without limitation the rights
|
|
98
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
99
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
100
|
+
* furnished to do so, subject to the following conditions:
|
|
101
|
+
*
|
|
102
|
+
* The above copyright notice and this permission notice shall be included in
|
|
103
|
+
* all copies or substantial portions of the Software.
|
|
104
|
+
*
|
|
105
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
106
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
107
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
108
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
109
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
110
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
111
|
+
* THE SOFTWARE.
|
|
112
|
+
*/
|
|
113
|
+
var a={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},h=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(t){var i=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.float=function(t){var i=n.cssClasses,e=i.LABEL_FLOAT_ABOVE,r=i.LABEL_SHAKE;t?this.adapter.addClass(e):(this.adapter.removeClass(e),this.adapter.removeClass(r))},n.prototype.setRequired=function(t){var i=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.handleShakeAnimationEnd=function(){this.adapter.removeClass(n.cssClasses.LABEL_SHAKE)},n}(o),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},n.prototype.shake=function(t){this.foundation.shake(t)},n.prototype.float=function(t){this.foundation.float(t)},n.prototype.setRequired=function(t){this.foundation.setRequired(t)},n.prototype.getWidth=function(){return this.foundation.getWidth()},n.prototype.getDefaultFoundation=function(){var t=this;return new h({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},getWidth:function(){return function(t){if(null!==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}(t.root)},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)}})},n}(c),d={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},b=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(d.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(d.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(d.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&n&&(this.adapter.removeClass(d.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING))},n}(o),g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},n.prototype.activate=function(){this.foundation.activate()},n.prototype.deactivate=function(){this.foundation.deactivate()},n.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},n.prototype.getDefaultFoundation=function(){var t=this;return new b({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setStyle:function(n,i){return t.root.style.setProperty(n,i)},registerEventHandler:function(n,i){return t.listen(n,i)},deregisterEventHandler:function(n,i){return t.unlisten(n,i)}})},n}(c),m={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},v={NOTCH_ELEMENT_PADDING:8},O={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},E=function(t){function n(i){return t.call(this,e(e({},n.defaultAdapter),i))||this}return i(n,t),Object.defineProperty(n,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(t){var i=n.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=v.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(i)},n.prototype.closeNotch=function(){this.adapter.removeClass(n.cssClasses.OUTLINE_NOTCHED),this.adapter.removeNotchWidthProperty()},n}(o),p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(m.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+h.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(O.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(O.NO_LABEL)},n.prototype.notch=function(t){this.foundation.notch(t)},n.prototype.closeNotch=function(){this.foundation.closeNotch()},n.prototype.getDefaultFoundation=function(){var t=this;return new E({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},setNotchWidthProperty:function(n){t.notchElement.style.setProperty("width",n+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}})},n}(c),I={ROOT:"mdc-text-field-character-counter"},C={ROOT_SELECTOR:"."+I.ROOT},L=function(t){function n(i){return t.call(this,e(e({},n.defaultAdapter),i))||this}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return C},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),n.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},n}(o),A=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new L({setContent:function(n){t.root.textContent=n}})},n}(c),x={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},T={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},w=["pattern","min","max","required","step","minlength","maxlength"],R=["color","date","datetime-local","month","range","time","week"],j=["mousedown","touchstart"],N=["click","keydown"],y=function(t){function n(i,r){void 0===r&&(r={});var u=t.call(this,e(e({},n.defaultAdapter),i))||this;return u.isFocused=!1,u.receivedUserInput=!1,u.valid=!0,u.useNativeValidation=!0,u.validateOnValueChange=!0,u.helperText=r.helperText,u.characterCounter=r.characterCounter,u.leadingIcon=r.leadingIcon,u.trailingIcon=r.trailingIcon,u.inputFocusHandler=function(){u.activateFocus()},u.inputBlurHandler=function(){u.deactivateFocus()},u.inputInputHandler=function(){u.handleInput()},u.setPointerXOffset=function(t){u.setTransformOrigin(t)},u.textFieldInteractionHandler=function(){u.handleTextFieldInteraction()},u.validationAttributeChangeHandler=function(t){u.handleValidationAttributeChange(t)},u}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return R.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t,n,i,e;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var u=r(j),s=u.next();!s.done;s=u.next())this.adapter.registerInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=r(N),c=o.next();!c.done;c=o.next())this.adapter.registerTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){i={error:t}}finally{try{c&&!c.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,n,i,e;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var u=r(j),s=u.next();!s.done;s=u.next())this.adapter.deregisterInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=r(N),c=o.next();!c.done;c=o.next())this.adapter.deregisterTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){i={error:t}}finally{try{c&&!c.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var n=this;t.some((function(t){return w.indexOf(t)>-1&&(n.styleValidity(!0),n.adapter.setLabelRequired(n.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var n=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var n=t.touches,i=n?n[0]:t,e=i.target.getBoundingClientRect();this.adapter.setLineRippleTransformOrigin(i.clientX-e.left)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var n=this.isValid();this.styleValidity(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var n=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var n=this.getNativeInput().maxLength;if(-1===n)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,n)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var i=n.cssClasses.INVALID;if(t?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var e=this.helperText.isVisible(),r=this.helperText.getId();e&&r?this.adapter.setInputAttr(x.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(x.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var i=n.cssClasses.FOCUSED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.styleDisabled=function(t){var i=n.cssClasses,e=i.DISABLED,r=i.INVALID;t?(this.adapter.addClass(e),this.adapter.removeClass(r)):this.adapter.removeClass(e),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var i=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(i):this.adapter.removeClass(i)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(o),H={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},F={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+H.ROOT},S=function(t){function n(i){return t.call(this,e(e({},n.defaultAdapter),i))||this}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),n.prototype.getId=function(){return this.adapter.getAttr("id")},n.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(F.ARIA_HIDDEN)},n.prototype.setContent=function(t){this.adapter.setContent(t)},n.prototype.isPersistent=function(){return this.adapter.hasClass(H.HELPER_TEXT_PERSISTENT)},n.prototype.setPersistent=function(t){t?this.adapter.addClass(H.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(H.HELPER_TEXT_PERSISTENT)},n.prototype.isValidation=function(){return this.adapter.hasClass(H.HELPER_TEXT_VALIDATION_MSG)},n.prototype.setValidation=function(t){t?this.adapter.addClass(H.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(H.HELPER_TEXT_VALIDATION_MSG)},n.prototype.showToScreenReader=function(){this.adapter.removeAttr(F.ARIA_HIDDEN)},n.prototype.setValidity=function(t){var n=this.adapter.hasClass(H.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(H.HELPER_TEXT_VALIDATION_MSG)&&!t;i?(this.showToScreenReader(),"alert"===this.adapter.getAttr(F.ROLE)?this.refreshAlertRole():this.adapter.setAttr(F.ROLE,"alert")):this.adapter.removeAttr(F.ROLE),n||i||this.hide()},n.prototype.hide=function(){this.adapter.setAttr(F.ARIA_HIDDEN,"true")},n.prototype.refreshAlertRole=function(){var t=this;this.adapter.removeAttr(F.ROLE),requestAnimationFrame((function(){t.adapter.setAttr(F.ROLE,"alert")}))},n}(o),D=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new S({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n}})},n}(c),P={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},B={ROOT:"mdc-text-field__icon"},k=["click","keydown"],V=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.savedTabIndex=null,r.interactionHandler=function(t){r.handleInteraction(t)},r}return i(n,t),Object.defineProperty(n,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var i=r(k),e=i.next();!e.done;e=i.next())this.adapter.registerInteractionHandler(e.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},n.prototype.destroy=function(){var t,n;try{for(var i=r(k),e=i.next();!e.done;e=i.next())this.adapter.deregisterInteractionHandler(e.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},n.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",P.ICON_ROLE)))},n.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},n.prototype.setContent=function(t){this.adapter.setContent(t)},n.prototype.handleInteraction=function(t){("click"===t.type||"Enter"===t.key||13===t.keyCode)&&(t.preventDefault(),this.adapter.notifyIconAction())},n}(o),W=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},Object.defineProperty(n.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),n.prototype.getDefaultFoundation=function(){var t=this;return new V({getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)},notifyIconAction:function(){return t.emit(V.strings.ICON_EVENT,{},!0)}})},n}(c),U=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},n.prototype.initialize=function(t,n,i,e,r,s,o){void 0===t&&(t=function(t,n){return new u(t,n)}),void 0===n&&(n=function(t){return new g(t)}),void 0===i&&(i=function(t){return new D(t)}),void 0===e&&(e=function(t){return new A(t)}),void 0===r&&(r=function(t){return new W(t)}),void 0===s&&(s=function(t){return new l(t)}),void 0===o&&(o=function(t){return new p(t)}),this.input=this.root.querySelector(x.INPUT_SELECTOR);var c=this.root.querySelector(x.LABEL_SELECTOR);this.label=c?s(c):null;var f=this.root.querySelector(x.LINE_RIPPLE_SELECTOR);this.lineRipple=f?n(f):null;var a=this.root.querySelector(x.OUTLINE_SELECTOR);this.outline=a?o(a):null;var h=S.strings,d=this.root.nextElementSibling,b=d&&d.classList.contains(T.HELPER_LINE),m=b&&d&&d.querySelector(h.ROOT_SELECTOR);this.helperText=m?i(m):null;var v=L.strings,O=this.root.querySelector(v.ROOT_SELECTOR);!O&&b&&d&&(O=d.querySelector(v.ROOT_SELECTOR)),this.characterCounter=O?e(O):null;var E=this.root.querySelector(x.LEADING_ICON_SELECTOR);this.leadingIcon=E?r(E):null;var I=this.root.querySelector(x.TRAILING_ICON_SELECTOR);this.trailingIcon=I?r(I):null,this.prefix=this.root.querySelector(x.PREFIX_SELECTOR),this.suffix=this.root.querySelector(x.SUFFIX_SELECTOR),this.ripple=this.createRipple(t)},n.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple&&this.lineRipple.destroy(),this.helperText&&this.helperText.destroy(),this.characterCounter&&this.characterCounter.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.trailingIcon&&this.trailingIcon.destroy(),this.label&&this.label.destroy(),this.outline&&this.outline.destroy(),t.prototype.destroy.call(this)},n.prototype.initialSyncWithDOM=function(){this.disabled=this.input.disabled},Object.defineProperty(n.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this.input.required},set:function(t){this.input.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pattern",{get:function(){return this.input.pattern},set:function(t){this.input.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minLength",{get:function(){return this.input.minLength},set:function(t){this.input.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this.input.maxLength},set:function(t){t<0?this.input.removeAttribute("maxLength"):this.input.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this.input.min},set:function(t){this.input.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this.input.max},set:function(t){this.input.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"step",{get:function(){return this.input.step},set:function(t){this.input.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"prefixText",{get:function(){return this.prefix?this.prefix.textContent:null},set:function(t){this.prefix&&(this.prefix.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"suffixText",{get:function(){return this.suffix?this.suffix.textContent:null},set:function(t){this.suffix&&(this.suffix.textContent=t)},enumerable:!1,configurable:!0}),n.prototype.focus=function(){this.input.focus()},n.prototype.layout=function(){this.foundation.notchOutline(this.foundation.shouldFloat)},n.prototype.getDefaultFoundation=function(){var t=e(e(e(e(e({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods());return new y(t,this.getFoundationMap())},n.prototype.getRootAdapterMethods=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=new MutationObserver((function(t){return n(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return i.observe(t.input,{attributes:!0}),i},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},n.prototype.getInputAdapterMethods=function(){var t=this;return{getNativeInput:function(){return t.input},setInputAttr:function(n,i){t.input.setAttribute(n,i)},removeInputAttr:function(n){t.input.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input},registerInputInteractionHandler:function(n,i){t.input.addEventListener(n,i,f())},deregisterInputInteractionHandler:function(n,i){t.input.removeEventListener(n,i,f())}}},n.prototype.getLabelAdapterMethods=function(){var t=this;return{floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},hasLabel:function(){return Boolean(t.label)},shakeLabel:function(n){t.label&&t.label.shake(n)},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},n.prototype.getLineRippleAdapterMethods=function(){var t=this;return{activateLineRipple:function(){t.lineRipple&&t.lineRipple.activate()},deactivateLineRipple:function(){t.lineRipple&&t.lineRipple.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)}}},n.prototype.getOutlineAdapterMethods=function(){var t=this;return{closeOutline:function(){t.outline&&t.outline.closeNotch()},hasOutline:function(){return Boolean(t.outline)},notchOutline:function(n){t.outline&&t.outline.notch(n)}}},n.prototype.getFoundationMap=function(){return{characterCounter:this.characterCounter?this.characterCounter.foundationForTextField:void 0,helperText:this.helperText?this.helperText.foundationForTextField:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForTextField:void 0,trailingIcon:this.trailingIcon?this.trailingIcon.foundationForTextField:void 0}},n.prototype.createRipple=function(t){var n=this,i=this.root.classList.contains(T.TEXTAREA),r=this.root.classList.contains(T.OUTLINED);if(i||r)return null;var o=e(e({},u.createAdapter(this)),{isSurfaceActive:function(){return((t=n.input).matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,":active");var t},registerInteractionHandler:function(t,i){n.input.addEventListener(t,i,f())},deregisterInteractionHandler:function(t,i){n.input.removeEventListener(t,i,f())}});return t(this.root,new s(o))},n}(c),q={ROOT:"mdc-form-field"},G={LABEL_SELECTOR:".mdc-form-field > label"},M=function(t){function n(i){var r=t.call(this,e(e({},n.defaultAdapter),i))||this;return r.click=function(){r.handleClick()},r}return i(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},n.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},n}(o),X=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.attachTo=function(t){return new n(t)},n.prototype.labelEl=function(){return this.root.querySelector(M.strings.LABEL_SELECTOR)},n.prototype.getDefaultFoundation=function(){var t=this;return new M({activateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.activate()},deactivateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.deactivate()},deregisterInteractionHandler:function(n,i){var e=t.labelEl();e&&e.removeEventListener(n,i)},registerInteractionHandler:function(n,i){var e=t.labelEl();e&&e.addEventListener(n,i)}})},n}(c);
|
|
114
|
+
/**
|
|
115
|
+
* @license
|
|
116
|
+
* Copyright 2016 Google Inc.
|
|
117
|
+
*
|
|
118
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
119
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
120
|
+
* in the Software without restriction, including without limitation the rights
|
|
121
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
122
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
123
|
+
* furnished to do so, subject to the following conditions:
|
|
124
|
+
*
|
|
125
|
+
* The above copyright notice and this permission notice shall be included in
|
|
126
|
+
* all copies or substantial portions of the Software.
|
|
127
|
+
*
|
|
128
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
129
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
130
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
131
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
132
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
133
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
134
|
+
* THE SOFTWARE.
|
|
135
|
+
*/function K(t){const n=new U(t.querySelector(".mdc-text-field")),i=t.querySelector(".mdc-form-field"),e=t.querySelector(".mdc-text-field-helper-text"),r=t.querySelector(".mdc-text-field-character-counter"),u=t.querySelector(".mdc-text-field-icon");if(i){const t=X.attachTo(i);t&&(t.input=n)}e&&new D(e),r&&new A(r),u&&new W(u)}export{K as F}
|