@sme.up/ketchup 5.2.0-SNAPSHOT → 5.2.1-SNAPSHOT
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-d96b2993.js} +2 -2
- package/dist/cjs/{f-button-3b9f32af.js → f-button-2b9b99b1.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-8351cb84.js} +8 -96
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-df59e1b0.js} +3 -3
- package/dist/cjs/{f-image-08a3d340.js → f-image-12bab3b5.js} +2 -2
- package/dist/cjs/f-text-field-e7c35b5b.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 +365 -3041
- 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 +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- 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-5c03da64.js} +373 -160
- 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 +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-e99921c1.js} +1 -1
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/collection-manifest.json +2 -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-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +34 -5
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- 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/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +12 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -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 +1 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-f4bdbbc8.js} +2 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-54a49fd8.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-d5dac50b.js} +8 -95
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-a3035b4b.js} +3 -3
- package/dist/esm/{f-image-de331954.js → f-image-d32465e3.js} +2 -2
- package/dist/esm/f-text-field-c25cc63f.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 +349 -3025
- 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 +3 -3
- package/dist/esm/kup-echart.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- 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-9316a184.js} +373 -160
- 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 +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-35c7a90d.js → utils-f24319a0.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3813281b.entry.js → p-09d708c4.entry.js} +1 -1
- package/dist/ketchup/{p-4081f5f7.entry.js → p-11e72a8c.entry.js} +1 -1
- package/dist/ketchup/p-12773ca8.js +9 -0
- package/dist/ketchup/{p-0751aaf6.entry.js → p-203d6295.entry.js} +1 -1
- package/dist/ketchup/{p-33073f4a.js → p-34748c91.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/{p-10c8d755.js → p-40f97429.js} +1 -1
- package/dist/ketchup/{p-3aab1f0d.entry.js → p-4173422f.entry.js} +1 -1
- package/dist/ketchup/{p-8f735633.entry.js → p-41741c28.entry.js} +1 -1
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-44192f30.entry.js} +1 -1
- package/dist/ketchup/{p-c314b1e6.js → p-44f8da2a.js} +1 -1
- package/dist/ketchup/p-4f56932b.js +1 -0
- package/dist/ketchup/p-669bde31.js +1 -0
- package/dist/ketchup/p-67842f1e.entry.js +1 -0
- package/dist/ketchup/{p-5d190cf5.js → p-7a74ad17.js} +1 -1
- package/dist/ketchup/{p-96101f09.entry.js → p-7ba8fa4a.entry.js} +1 -1
- package/dist/ketchup/p-7de0d7e1.js +1 -0
- package/dist/ketchup/{p-f9c41e20.entry.js → p-8418e8fa.entry.js} +1 -1
- package/dist/ketchup/p-96bf19aa.entry.js +1 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-9a61d8dc.entry.js} +1 -1
- package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
- package/dist/ketchup/{p-24df4f29.entry.js → p-b6c21223.entry.js} +1 -1
- package/dist/ketchup/{p-68fc1428.entry.js → p-bb8844bf.entry.js} +1 -1
- package/dist/ketchup/{p-67c64257.entry.js → p-c58a2a81.entry.js} +1 -1
- package/dist/ketchup/{p-3445be1e.entry.js → p-ca3d585b.entry.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-e6709c26.entry.js} +1 -1
- package/dist/ketchup/{p-d7af8156.entry.js → p-e8e3c9da.entry.js} +1 -1
- package/dist/ketchup/p-ecb7069b.js +135 -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.d.ts +4 -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.d.ts +144 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +10 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +2 -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 +1 -0
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/dist/ketchup/p-2d4f19f4.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
|
@@ -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-12773ca8.js";import{g as d,s as r}from"./p-40f97429.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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as i}from"./p-
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-34b74425.js";import{b as l}from"./p-34748c91.js";import{k as h}from"./p-12773ca8.js";import{p as e}from"./p-40f97429.js";const o=class{constructor(i){s(this,i),this.dashClick=t(this,"kup-dash-click",7),this.layout="1",this.fontsize="",this.active=!1,this.columnsNumber=1,this.fullWidth=!0,this.horizontal=!1,this.iconColor=[],this.valueColor=[],this.textColor=[],this.kupManager=h()}render(){let s=[];var t=0;return this.data.rows.forEach((h=>{let o="",r="",d="",c="",a="",n="",p={color:this.textColor[t]},v={color:this.valueColor[t]};if(o=this.data.columns[0]?i("div",{slot:"icon"},i("icon",{class:h.cells[this.data.columns[0].name].obj.k,style:{color:this.iconColor[t]}})):i("div",{slot:"icon"}),r=this.data.columns[1]?i("div",{slot:"unit",style:v},h.cells[this.data.columns[1].name].obj.k," "):i("div",{slot:"unit"}),d=this.data.columns[2]?i("div",{slot:"descr",style:p},h.cells[this.data.columns[2].name].obj.k):i("div",{slot:"descr"}),this.data.columns[3]){let s=this.data.columns[3];s.obj=h.cells[this.data.columns[3].name].obj;let t=l(s,h.cells[this.data.columns[3].name]);c=i("div",{slot:"value",style:v},t)}else c=i("div",{slot:"value"});if(this.data.columns[5]){let s=this.data.columns[5];s.obj=h.cells[this.data.columns[5].name].obj;let t=l(s,h.cells[this.data.columns[5].name]);this.data.columns[6]&&h.cells[this.data.columns[6].name].obj.k&&(t+=e(this.kupManager.dates.getLocale())),a=i("div",{slot:"value-int",style:v},t)}else a=i("div",{slot:"value-int"});n=this.data.columns[6]?i("div",{slot:"value-dec",style:v},h.cells[this.data.columns[6].name].obj.k):i("div",{slot:"value-dec"});const u=i("kup-dash",{layout:this.layout,fontsize:this.fontsize,index:t,active:this.active,slot:String(t)},o,r,d,c,a,n);s.push(u),t++})),i("div",null,i("link",{href:"https://cdn.materialdesignicons.com/4.5.95/css/materialdesignicons.min.css",rel:"stylesheet",type:"text/css"}),i("kup-grid",{columns:this.columnsNumber,singleLine:this.horizontal,class:this.fullWidth?"kup-full-width":""},s))}};o.style=".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";export{o as kup_dash_list}
|
|
@@ -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-12773ca8.js";import{g as a,s as n}from"./p-40f97429.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 o,c as r,f as c,h as i,H as a,g as n}from"./p-
|
|
1
|
+
import{r as o,c as r,f as c,h as i,H as a,g as n}from"./p-34b74425.js";import{k as t,b as e,a as d}from"./p-12773ca8.js";import{g as p,s}from"./p-40f97429.js";import{F as l}from"./p-4f56932b.js";import{c as u}from"./p-97e8ea42.js";import{M as _}from"./p-8c44c3b9.js";import"./p-a0b1d769.js";var k;!function(o){o.customStyle="Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",o.data="Data of the accordion.",o.ripple="When enabled displays Material's ripple effect on item headers."}(k||(k={}));const h=class{constructor(c){o(this,c),this.kupAccordionItemSelected=r(this,"kup-accordion-itemselected",6),this.selectedItems=[],this.customStyle="",this.data=null,this.ripple=!0,this.kupManager=t(),this.slotsNames=[]}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const r=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(r)for(let o=0;o<r.length;o++)_.attachTo(r[o])}}async collapseAll(){const o=[];for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r].name;!this.isItemExpandible(c)&&this.isItemSelected(c)&&o.push(c)}this.selectedItems=o}async expandAll(){const o=[];for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r].name;this.isItemExpandible(c)&&o.push(c)}this.selectedItems=o}async getProps(o){return p(this,k,o)}async refresh(){c(this)}async setProps(o){s(this,k,o)}async toggleItem(o){const r=this.isItemExpandible(o),c=[...this.selectedItems];c.includes(o)?c.splice(c.indexOf(o),1):c.push(o),this.selectedItems=c,r||this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[],r=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<r.length;o++)this.slotsNames.push(r[o].slot);for(let r=0;r<this.data.columns.length;r++){const c=this.data.columns[r],a=c.name,n=this.isItemSelected(a),t=this.isItemExpandible(a),p={"accordion-item__content":!0,"accordion-item__content--selected":!!n};o.push(i("div",{class:"accordion-item"},i("div",{title:c.title,class:{"accordion-item__header":!0,"accordion-item__header--selected":!(t||!n),"accordion-item__header--expanded":!(!t||!n),"mdc-ripple-surface":!!this.ripple},onClick:()=>this.toggleItem(a)},c.icon?i(l,{color:`var(${e.ICON})`,resource:c.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,i("span",{class:"accordion-item__text"},c.title),t?i("span",{class:`accordion-item__dropdown kup-icon ${d.DROPDOWN.replace("--","")}`}):null),i("div",{class:p},i("slot",{name:c.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple(),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const r=o.querySelectorAll(".mdc-ripple-surface");if(r)for(let o=0;o<r.length;o++)_.attachTo(r[o])}this.kupManager.debug.logRender(this,!0)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return i(a,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:u},i("div",{class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}static get watchers(){return{ripple:["applyRipple"]}}};h.style=":host{--kup_accordion_background_color:var(\n --kup-accordion-background-color,\n var(--kup-background-color)\n );--kup_accordion_border:var(\n --kup-accordion-border,\n 1px solid var(--kup-border-color)\n );--kup_accordion_border_radius:var(--kup-accordion-border-radius, 4px);--kup-accordion_dropdown_icon_color:var(\n --kup-accordion-dropdown-icon-color,\n var(--kup-icon-color)\n );--kup_accordion_font_family:var(\n --kup-accordion-font-family,\n var(--kup-font-family)\n );--kup_accordion_font_size:var(\n --kup-accordion-font-size,\n var(--kup-font-size)\n );--kup_accordion_hover_background_color:var(\n --kup-accordion-hover-background-color,\n var(--kup-hover-background-color)\n );--kup_accordion_hover_color:var(\n --kup-accordion-hover-color,\n var(--kup-hover-color)\n );--kup_accordion_padding:var(--kup-accordion-padding, 1em 1.5em);--kup_accordion_primary_color:var(\n --kup-accordion-primary-color,\n var(--kup-primary-color)\n );--kup_accordion_primary_color_rgb:var(\n --kup-accordion-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_accordion_text_color:var(\n --kup-accordion-text-color,\n var(--kup-text-color)\n );--kup_accordion_text_on_primary_color:var(\n --kup-accordion-text-on-primary-color,\n var(--kup-text-on-primary-color)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{background-color:var(--kup_accordion_background_color);border-bottom:var(--kup_accordion_border);border-radius:var(--kup_accordion_border_radius);border-top:var(--kup_accordion_border);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-left:var(--kup_accordion_border);border-right:var(--kup_accordion_border);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:not(:first-of-type){border-top:var(--kup_accordion_border)}.accordion-item__header{align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%}.accordion-item__header:hover:not(.accordion-item__header--selected){color:var(--kup_accordion_hover_color);background-color:var(--kup_accordion_hover_background_color)}.accordion-item__header--expanded{color:var(--kup_accordion_hover_color);background-color:var(--kup_accordion_hover_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__header--selected{background-color:rgba(var(--kup_accordion_primary_color_rgb), 0.175)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup-accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{animation:fade-in 0.25s ease-out;display:none}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color);--kup-accordion-primary-color-rgb:var(--kup-danger-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color);--kup-accordion-primary-color-rgb:var(--kup-success-color-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color);--kup-accordion-primary-color-rgb:var(--kup-warning-color-rgb);--kup-accordion-text-on-primary-color:white}";export{h as kup_accordion}
|
|
@@ -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-12773ca8.js";import{g as n,s as l}from"./p-40f97429.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 v=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)}};v.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{v as kup_lazy}
|
|
@@ -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}
|
|
@@ -25,3 +25,10 @@ export declare function create3(component: KupCard): VNode;
|
|
|
25
25
|
* @returns {VNode} 4th built-in layout virtual node.
|
|
26
26
|
*/
|
|
27
27
|
export declare function create4(component: KupCard): VNode;
|
|
28
|
+
/**
|
|
29
|
+
* 5th built-in layout, numeric picker.
|
|
30
|
+
* This layout is rendered after the render cycle completes.
|
|
31
|
+
* @param {KupCard} component - Card component.
|
|
32
|
+
* @returns {VNode} 4th built-in layout virtual node.
|
|
33
|
+
*/
|
|
34
|
+
export declare function create5(component: KupCard): VNode;
|
|
@@ -102,6 +102,31 @@ export interface KupCardBuiltInClockData {
|
|
|
102
102
|
export interface KupCardBuiltInClock extends HTMLElement {
|
|
103
103
|
kupData: KupCardBuiltInClockData;
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Options of the built-in numeric.
|
|
107
|
+
*/
|
|
108
|
+
export interface KupCardBuiltInNumericOptions {
|
|
109
|
+
decimals?: boolean;
|
|
110
|
+
initialValue?: string | KupObj;
|
|
111
|
+
maxDecimals?: number;
|
|
112
|
+
maxIntegers?: number;
|
|
113
|
+
maxLength?: number;
|
|
114
|
+
negative?: boolean;
|
|
115
|
+
resetStatus: boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Data prop of the built-in numeric.
|
|
119
|
+
*/
|
|
120
|
+
export interface KupCardBuiltInNumericData {
|
|
121
|
+
localeValue?: string;
|
|
122
|
+
value: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Html element of the built-in numeric
|
|
126
|
+
*/
|
|
127
|
+
export interface KupCardBuiltInNumeric extends HTMLElement {
|
|
128
|
+
kupData: KupCardBuiltInNumericData;
|
|
129
|
+
}
|
|
105
130
|
/**
|
|
106
131
|
* Data prop of the kup-card component.
|
|
107
132
|
*/
|
|
@@ -119,7 +144,7 @@ export interface KupCardData {
|
|
|
119
144
|
image?: GenericObject[];
|
|
120
145
|
list?: GenericObject[];
|
|
121
146
|
object?: KupObj[];
|
|
122
|
-
options?: KupCardBuiltInCalendarOptions | KupCardBuiltInClockOptions | KupCardColumnDropMenuOptions | KupCardColorPickerOptions;
|
|
147
|
+
options?: KupCardBuiltInCalendarOptions | KupCardBuiltInClockOptions | KupCardColumnDropMenuOptions | KupCardColorPickerOptions | KupCardBuiltInNumericOptions;
|
|
123
148
|
progressbar?: GenericObject[];
|
|
124
149
|
switch?: GenericObject[];
|
|
125
150
|
tabbar?: GenericObject[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GenericObject, KupEventPayload } from '../../types/GenericTypes';
|
|
2
2
|
import { KupObj } from '../../managers/kup-objects/kup-objects-declarations';
|
|
3
|
+
import type { PointerEvent } from '@interactjs/types/index';
|
|
3
4
|
import { KupCardEventPayload } from '../kup-card/kup-card-declarations';
|
|
4
5
|
import { KupDataCell, KupDataColumn, KupDataRow, KupDataRowAction } from '../../managers/kup-data/kup-data-declarations';
|
|
5
6
|
/**
|
|
@@ -182,6 +183,7 @@ export interface KupDatatableEventHandlerDetails {
|
|
|
182
183
|
column: KupDataColumn;
|
|
183
184
|
filterRemove: HTMLElement;
|
|
184
185
|
isGroupRow: boolean;
|
|
186
|
+
originalEvent: PointerEvent;
|
|
185
187
|
row: KupDataRow;
|
|
186
188
|
td: HTMLElement;
|
|
187
189
|
textfield: HTMLElement;
|
|
@@ -403,6 +403,10 @@ export declare class KupDataTable {
|
|
|
403
403
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
404
404
|
*/
|
|
405
405
|
getProps(descriptions?: boolean): Promise<GenericObject>;
|
|
406
|
+
/**
|
|
407
|
+
* This method will get the selected rows of the component.
|
|
408
|
+
*/
|
|
409
|
+
getSelectedRows(): Promise<Array<KupDataTableRow>>;
|
|
406
410
|
/**
|
|
407
411
|
* Hides the given column.
|
|
408
412
|
* @param {KupDataColumn} column - Column to hide.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KupEventPayload } from '../../types/GenericTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Props of the kup-numeric-picker component.
|
|
4
|
+
* Used to export every prop in an object.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum KupNumericPickerProps {
|
|
7
|
+
customStyle = "Custom style of the component.",
|
|
8
|
+
data = "Props of the sub-components.",
|
|
9
|
+
decimals = "Defaults at false. When set to true, the component has decimals.",
|
|
10
|
+
disabled = "Defaults at false. When set to true, the component is disabled.",
|
|
11
|
+
initialValue = "Sets the initial value of the component",
|
|
12
|
+
maxDecimals = "when set, the component allows you to enter decimals with a maximum of characters.",
|
|
13
|
+
maxIntegers = "When set, the component allows you to enter integer numbers with a maximum of characters.",
|
|
14
|
+
maxLength = "When set, the component allows you to enter numbers with a maximum of characters, including decimals.",
|
|
15
|
+
negative = "Defaults at false. When set to true, the component has negative number."
|
|
16
|
+
}
|
|
17
|
+
export interface KupNumericPickerEventPayload extends KupEventPayload {
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { EventEmitter, VNode } from '../../stencil-public-runtime';
|
|
2
|
+
import type { GenericObject, KupEventPayload } from '../../types/GenericTypes';
|
|
3
|
+
import { KupNumericPickerEventPayload } from './kup-numeric-picker-declarations';
|
|
4
|
+
export declare class KupNumericPicker {
|
|
5
|
+
rootElement: HTMLElement;
|
|
6
|
+
stateSwitcher: boolean;
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* Custom style of the component.
|
|
10
|
+
* @default ""
|
|
11
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
12
|
+
*/
|
|
13
|
+
customStyle: string;
|
|
14
|
+
/**
|
|
15
|
+
* Props of the sub-components.
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
data: Object;
|
|
19
|
+
/**
|
|
20
|
+
* Defaults at false. When set to true, the component has decimals.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
decimals: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Defaults at false. When set to true, the component is disabled.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the initial value of the component
|
|
31
|
+
* @default ""
|
|
32
|
+
*/
|
|
33
|
+
initialValue: string;
|
|
34
|
+
/**
|
|
35
|
+
* when set, the component allows you to enter decimals with a maximum of characters.
|
|
36
|
+
* @default null
|
|
37
|
+
*/
|
|
38
|
+
maxDecimals: number;
|
|
39
|
+
/**
|
|
40
|
+
* When set, the component allows you to enter integer numbers with a maximum of characters.
|
|
41
|
+
* @default null
|
|
42
|
+
*/
|
|
43
|
+
maxIntegers: number;
|
|
44
|
+
/**
|
|
45
|
+
* When set, the component allows you to enter numbers with a maximum of characters, including decimals.
|
|
46
|
+
* @default null
|
|
47
|
+
*/
|
|
48
|
+
maxLength: number;
|
|
49
|
+
/**
|
|
50
|
+
* Defaults at false. When set to true, the component has negative number.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
negative: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Instance of the KupManager class.
|
|
56
|
+
*/
|
|
57
|
+
private kupManager;
|
|
58
|
+
private textfieldEl;
|
|
59
|
+
private pickerContainerEl;
|
|
60
|
+
private pickerEl;
|
|
61
|
+
private clickCb;
|
|
62
|
+
kupBlur: EventEmitter<KupNumericPickerEventPayload>;
|
|
63
|
+
kupChange: EventEmitter<KupNumericPickerEventPayload>;
|
|
64
|
+
kupClick: EventEmitter<KupNumericPickerEventPayload>;
|
|
65
|
+
kupFocus: EventEmitter<KupNumericPickerEventPayload>;
|
|
66
|
+
kupInput: EventEmitter<KupNumericPickerEventPayload>;
|
|
67
|
+
kupIconClick: EventEmitter<KupNumericPickerEventPayload>;
|
|
68
|
+
kupItemClick: EventEmitter<KupNumericPickerEventPayload>;
|
|
69
|
+
kupTextFieldSubmit: EventEmitter<KupNumericPickerEventPayload>;
|
|
70
|
+
kupClearIconClick: EventEmitter<KupEventPayload>;
|
|
71
|
+
onKupPickerItemClick(value: string): void;
|
|
72
|
+
onKupClearIconClick(): void;
|
|
73
|
+
onKupBlur(): void;
|
|
74
|
+
onKupChange(e: InputEvent): void;
|
|
75
|
+
onKupClick(): void;
|
|
76
|
+
onKupFocus(): void;
|
|
77
|
+
onKupInput(e: InputEvent): void;
|
|
78
|
+
onkupTextFieldSubmit(e: KeyboardEvent): void;
|
|
79
|
+
onKupIconClick(): void;
|
|
80
|
+
listenKeyup(e: KeyboardEvent): void;
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves the component's value.
|
|
83
|
+
* @returns {string} Value of the component.
|
|
84
|
+
*/
|
|
85
|
+
getValue(): Promise<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Used to retrieve component's props values.
|
|
88
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
89
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
90
|
+
*/
|
|
91
|
+
getProps(descriptions?: boolean): Promise<GenericObject>;
|
|
92
|
+
/**
|
|
93
|
+
* This method is used to trigger a new render of the component.
|
|
94
|
+
*/
|
|
95
|
+
refresh(): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Sets the focus to the component.
|
|
98
|
+
*/
|
|
99
|
+
setFocus(): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Sets the component's value.
|
|
102
|
+
* @param {string} value - Value to be set.
|
|
103
|
+
*/
|
|
104
|
+
setValue(value: string): Promise<void>;
|
|
105
|
+
refreshPickerValue(eventDetailValue: string, eventToRaise: EventEmitter, isOnInputEvent?: boolean): void;
|
|
106
|
+
setPickerValueSelected(newValue?: string): void;
|
|
107
|
+
getPickerValueSelected(): string;
|
|
108
|
+
getValueForPickerComponent(): string;
|
|
109
|
+
openPicker(): void;
|
|
110
|
+
closePicker(): void;
|
|
111
|
+
isPickerOpened(): boolean;
|
|
112
|
+
getTextFieldId(): string;
|
|
113
|
+
prepTextfield(): VNode;
|
|
114
|
+
prepPicker(): any;
|
|
115
|
+
componentWillLoad(): void;
|
|
116
|
+
componentDidLoad(): void;
|
|
117
|
+
componentWillRender(): void;
|
|
118
|
+
componentDidRender(): void;
|
|
119
|
+
render(): any;
|
|
120
|
+
disconnectedCallback(): void;
|
|
121
|
+
}
|