@sme.up/ketchup 5.0.0 → 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/README.md +1 -1
- package/dist/cjs/{cell-utils-720be0c8.js → cell-utils-d96b2993.js} +4 -4
- package/dist/cjs/{f-button-dbf3cd3a.js → f-button-2b9b99b1.js} +2 -2
- package/dist/cjs/{f-cell-93d984ad.js → f-cell-8351cb84.js} +8 -96
- package/dist/cjs/{f-chip-438213eb.js → f-chip-df59e1b0.js} +3 -3
- package/dist/cjs/{f-image-21865ab7.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-ab119fad.js → index-eb556444.js} +6 -1
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +641 -3331
- package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
- package/dist/cjs/kup-cell.cjs.entry.js +9 -8
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -5
- package/dist/cjs/kup-drawer.cjs.entry.js +8 -5
- package/dist/cjs/kup-echart.cjs.entry.js +210 -60
- package/dist/cjs/kup-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +7 -7
- package/dist/cjs/{kup-manager-09c0c1fc.js → kup-manager-5c03da64.js} +3061 -2642
- package/dist/cjs/kup-nav-bar.cjs.entry.js +6 -6
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +179 -0
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-a60ab5fa.js → utils-e99921c1.js} +4 -38
- package/dist/collection/assets/card.js +30 -30
- package/dist/collection/assets/data-table.js +24 -74
- package/dist/collection/assets/echart.js +481 -0
- package/dist/collection/assets/index.js +87 -79
- package/dist/collection/assets/kupdata.js +29 -41
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/assets/list.js +6 -6
- package/dist/collection/assets/nav-bar.js +4 -4
- package/dist/collection/assets/probe.js +18 -18
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +4 -4
- package/dist/collection/components/kup-box/kup-box.js +9 -9
- package/dist/collection/components/kup-button-list/kup-button-list.js +4 -4
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +20 -20
- 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-chip/kup-chip.js +4 -4
- package/dist/collection/components/kup-combobox/kup-combobox.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +0 -2
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +31 -32
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +112 -159
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +4 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +3 -3
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -14
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +3 -0
- package/dist/collection/components/kup-echart/kup-echart.js +246 -58
- package/dist/collection/components/kup-image/assets/svg/instagram.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/pinterest.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/reddit.svg +1 -0
- package/dist/collection/components/kup-list/kup-list-helper.js +26 -26
- package/dist/collection/components/kup-list/kup-list.css +35 -3
- package/dist/collection/components/kup-list/kup-list.js +52 -44
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -2
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +70 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +382 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -8
- package/dist/collection/components/kup-tree/kup-tree.js +25 -38
- package/dist/collection/f-components/f-paginator/f-paginator.js +6 -6
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +27 -3
- package/dist/collection/managers/kup-data/kup-data-declarations.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data.js +337 -155
- package/dist/collection/managers/kup-dates/kup-dates.js +2 -2
- package/dist/collection/managers/kup-debug/kup-debug.js +7 -6
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
- package/dist/collection/managers/kup-language/kup-language.js +2 -2
- package/dist/collection/managers/kup-manager/kup-manager.js +25 -1
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +161 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +48 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +2 -2
- 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/cell-utils.js +2 -3
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/collection/utils/utils.js +3 -74
- package/dist/esm/{cell-utils-b80ccb8c.js → cell-utils-f4bdbbc8.js} +4 -4
- package/dist/esm/{f-button-9e835467.js → f-button-54a49fd8.js} +2 -2
- package/dist/esm/{f-cell-f8bb2e04.js → f-cell-d5dac50b.js} +8 -95
- package/dist/esm/{f-chip-953c6915.js → f-chip-a3035b4b.js} +3 -3
- package/dist/esm/{f-image-78c5265e.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-78f3699d.js → index-baeab1ac.js} +6 -2
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +5 -5
- package/dist/esm/kup-autocomplete_27.entry.js +625 -3315
- package/dist/esm/kup-calendar.entry.js +8 -8
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +5 -5
- package/dist/esm/kup-dash_2.entry.js +5 -5
- package/dist/esm/kup-drawer.entry.js +8 -5
- package/dist/esm/kup-echart.entry.js +210 -60
- package/dist/esm/kup-field.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +7 -7
- package/dist/esm/{kup-manager-bba62291.js → kup-manager-9316a184.js} +3062 -2642
- package/dist/esm/kup-nav-bar.entry.js +6 -6
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +175 -0
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d1569956.js → utils-f24319a0.js} +5 -37
- package/dist/ketchup/assets/svg/instagram.svg +1 -0
- package/dist/ketchup/assets/svg/pinterest.svg +1 -0
- package/dist/ketchup/assets/svg/reddit.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-09d708c4.entry.js +1 -0
- package/dist/ketchup/p-11e72a8c.entry.js +1 -0
- package/dist/ketchup/p-12773ca8.js +9 -0
- package/dist/ketchup/p-203d6295.entry.js +1 -0
- package/dist/ketchup/p-34748c91.js +1 -0
- package/dist/ketchup/p-34b74425.js +1 -0
- package/dist/ketchup/p-40f97429.js +1 -0
- package/dist/ketchup/p-4173422f.entry.js +1 -0
- package/dist/ketchup/p-41741c28.entry.js +1 -0
- package/dist/ketchup/p-44192f30.entry.js +1 -0
- package/dist/ketchup/{p-ebf4cf56.js → p-44f8da2a.js} +1 -1
- package/dist/ketchup/{p-fa540f82.js → p-4f56932b.js} +1 -1
- package/dist/ketchup/p-669bde31.js +1 -0
- package/dist/ketchup/p-67842f1e.entry.js +1 -0
- package/dist/ketchup/{p-f993f813.js → p-7a74ad17.js} +1 -1
- package/dist/ketchup/p-7ba8fa4a.entry.js +39 -0
- package/dist/ketchup/p-7de0d7e1.js +1 -0
- package/dist/ketchup/p-8418e8fa.entry.js +1 -0
- package/dist/ketchup/p-96bf19aa.entry.js +1 -0
- package/dist/ketchup/p-9a61d8dc.entry.js +1 -0
- package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
- package/dist/ketchup/{p-aa27f9f7.entry.js → p-b6c21223.entry.js} +2 -2
- package/dist/ketchup/p-bb8844bf.entry.js +1 -0
- package/dist/ketchup/p-c58a2a81.entry.js +1 -0
- package/dist/ketchup/p-ca3d585b.entry.js +1 -0
- package/dist/ketchup/p-e6709c26.entry.js +1 -0
- package/dist/ketchup/p-e8e3c9da.entry.js +1 -0
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +2 -1
- 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 -2
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +7 -15
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +3 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +12 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +3 -7
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +2 -2
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -0
- package/dist/types/components.d.ts +249 -28
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +9 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +4 -25
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +63 -27
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +21 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +27 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +61 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +22 -0
- 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/dist/types/utils/utils.d.ts +0 -18
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/dist/collection/managers/kup-data/kup-data-dataset-helper.js +0 -262
- package/dist/collection/managers/kup-data/kup-data-helper.js +0 -61
- package/dist/collection/utils/state-utils.js +0 -9
- package/dist/ketchup/p-0032a782.entry.js +0 -1
- package/dist/ketchup/p-18c4d083.entry.js +0 -1
- package/dist/ketchup/p-199c972e.entry.js +0 -1
- package/dist/ketchup/p-29800a2e.js +0 -1
- package/dist/ketchup/p-34aa8d8a.entry.js +0 -1
- package/dist/ketchup/p-542279e9.entry.js +0 -1
- package/dist/ketchup/p-5b26a7a8.entry.js +0 -39
- package/dist/ketchup/p-5c97e7ab.js +0 -1
- package/dist/ketchup/p-6817ca85.entry.js +0 -1
- package/dist/ketchup/p-76e674ca.entry.js +0 -1
- package/dist/ketchup/p-78aa6f1b.js +0 -1
- package/dist/ketchup/p-842b66aa.entry.js +0 -1
- package/dist/ketchup/p-894981c0.entry.js +0 -143
- package/dist/ketchup/p-8ac2fa75.entry.js +0 -1
- package/dist/ketchup/p-907c9e11.entry.js +0 -1
- package/dist/ketchup/p-9ae9149b.entry.js +0 -1
- package/dist/ketchup/p-b0d1bdd8.js +0 -9
- package/dist/ketchup/p-e1e4c951.entry.js +0 -1
- package/dist/ketchup/p-eba369d9.entry.js +0 -1
- package/dist/ketchup/p-ed0b8666.js +0 -1
- package/dist/types/managers/kup-data/kup-data-dataset-helper.d.ts +0 -42
- package/dist/types/managers/kup-data/kup-data-helper.d.ts +0 -11
- package/dist/types/utils/state-utils.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as t,g as h}from"./p-34b74425.js";import{k as o}from"./p-12773ca8.js";const e=class{constructor(t){i(this,t),this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.kupManager=o(),this.divlist=[]}getObjects(i){let t;return new Promise((h=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),h(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((h=>{this.divlist=[],i.rows.forEach((i=>{let h=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,h.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},h))})),h(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,h=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},h={"--lyo_obj-height":this.defobjsize},t("div",{class:i,style:h},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return h(this)}};e.style=".kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height)/2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height)/3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height)*2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height)*3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-color, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{e as kup_qlik}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as n,m as l,o as u,d as t}from"./p-40f97429.js";import{d as r}from"./p-12773ca8.js";const e=document.documentElement;function f(n,l){if(null!=l&&null!=l.displayedValue)return l.displayedValue;let u=s(l.value,n,l);return null!=l&&(l.displayedValue=u),u}function i(n,l){return null==n?"":(null!=n.displayedValue&&""!=n.displayedValue.trim()||(n.displayedValue=s(n.value,l,null)),n.displayedValue)}function o(n){return e.ketchup.math.numberify(n.obj?n.obj.k:n.value)}function s(n,l,u){let t=null!=l?l.obj:null;return null!=u&&(t=u.obj?u.obj:t),c(n,t,null!=l?l.decimals:null)}function c(t,f,i){return null==t||""==t.trim()?t:e.ketchup.objects.isNumber(f)?n(t,i||-1,f?f.p:""):e.ketchup.objects.isDate(f)&&e.ketchup.dates.isValid(t,r.ISO_DATE)?e.ketchup.dates.format(t):e.ketchup.objects.isTime(f)?l(t,e.ketchup.objects.isTimeWithSeconds(f),f.t+f.p):e.ketchup.objects.isTimestamp(f)?u(t):t}function a(n,l){if(null==n)return null;for(let u of n)if(u.name===l)return u;return null}function m(n,l,u){return p(n.obj,n.value,l.obj,l.value,u)}function p(n,l,u,f,i){const o="A"===i?1:-1;if(null==n||null==u)return o*d(l,f);if(n.t!==u.t||n.p!==u.p){let l=d(n.t,u.t);return 0===l&&(l=d(n.p,u.p)),l*o}let s=l,c=f;if(s==c)return 0;if(""==s)return-1*o;if(""==c)return 1*o;let a=s,m=c;if(e.ketchup.objects.isNumber(n))a=t(s),m=t(c);else if(e.ketchup.objects.isDate(n))a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE));else if(e.ketchup.objects.isTime(n)){let l=e.ketchup.objects.isTimeWithSeconds(n);a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,l?r.ISO_TIME:r.ISO_TIME_WITHOUT_SECONDS))}else e.ketchup.objects.isTimestamp(n)&&(a=e.ketchup.dates.toDate(e.ketchup.dates.format(s,r.ISO_DATE_TIME)),m=e.ketchup.dates.toDate(e.ketchup.dates.format(c,r.ISO_DATE_TIME)));return a>m?1*o:a<m?-1*o:0}function d(n,l){let u=null==n?0:n.length,t=null==l?0:l.length;const r=Math.min(u,t);let e=0;for(;e<r;){const u=n[e],t=l[e];if(u!==t)return u.charCodeAt(0)-t.charCodeAt(0);e++}return u-t}export{i as a,f as b,a as c,p as d,m as e,o as f,c as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),r=u(t,s),c=p(n);i.ael(o,l,r,c),(t.o=t.o||[]).push((()=>i.rel(o,l,r,c)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){le(e)}},f=(e,t)=>4&t?o:e,p=e=>0!=(2&e),d="http://www.w3.org/1999/xlink",h=new WeakMap,m=e=>"sc-"+e.p,y={},$=e=>"object"==(e=typeof e)||"function"===e,w=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&i?r[r.length-1].h+=l:r.push(o?b(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,v);const a=b(e,null);return a.m=t,r.length>0&&(a.$=r),a.g=s,a},b=(e,t)=>({t:0,v:e,h:t,j:null,$:null,m:null,g:null}),g={},v={forEach:(e,t)=>e.map(j).forEach(t),map:(e,t)=>e.map(j).map(t).map(k)},j=e=>({vattrs:e.m,vchildren:e.$,vkey:e.g,vname:e.k,vtag:e.v,vtext:e.h}),k=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),w(e.vtag,t,...e.vchildren||[])}const t=b(e.vtag,e.vtext);return t.m=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.k=e.vname,t},S=(e,t,n,l,o,r)=>{if(n!==l){let c=ne(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=$(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(d,t):e.removeAttribute(t)):(!c||4&r||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(d,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ne(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||y,i=t.m||y;for(l in o)l in i||S(s,l,o[l],void 0,n,t.t);for(l in i)S(s,l,o[l],i[l],n,t.t)},C=(t,l,s)=>{let i,r,c=l.$[s],a=0;if(null!==c.h)i=c.j=o.createTextNode(c.h);else{if(n||(n="svg"===c.v),i=c.j=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.v),n&&"foreignObject"===c.v&&(n=!1),x(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.$)for(a=0;a<c.$.length;++a)r=C(t,c,a),r&&i.appendChild(r);"svg"===c.v?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},L=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=C(null,l,o),r&&(s[o].j=r,c.insertBefore(r,n)))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.j,W(l),s.remove())},R=(e,t)=>e.v===t.v&&e.g===t.g,U=(e,t)=>{const l=t.j=e.j,s=e.$,o=t.$,i=t.v,r=t.h;null===r?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||x(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,a=0,u=t.length-1,f=t[0],p=t[u],d=l.length-1,h=l[0],m=l[d];for(;i<=u&&r<=d;)if(null==f)f=t[++i];else if(null==p)p=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--d];else if(R(f,h))U(f,h),f=t[++i],h=l[++r];else if(R(p,m))U(p,m),p=t[--u],m=l[--d];else if(R(f,m))U(f,m),e.insertBefore(f.j,p.j.nextSibling),f=t[++i],m=l[--d];else if(R(p,h))U(p,h),e.insertBefore(p.j,f.j),p=t[--u],h=l[++r];else{for(c=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===h.g){c=a;break}c>=0?(o=t[c],o.v!==h.v?s=C(t&&t[r],n,c):(U(o,h),t[c]=void 0,s=o.j),h=l[++r]):(s=C(t&&t[r],n,r),h=l[++r]),s&&f.j.parentNode.insertBefore(s,f.j)}i>u?L(e,null==l[d+1]?null:l[d+1].j,n,l,r,d):r>d&&P(t,i,u)})(l,s,t,o):null!==o?(null!==e.h&&(l.textContent=""),L(l,null,t,o,0,o.length-1)):null!==s&&P(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.h!==r&&(l.data=r)},W=e=>{e.m&&e.m.ref&&e.m.ref(null),e.$&&e.$.map(W)},E=e=>Z(e).S,D=(e,t,n)=>{const l=E(e);return{emit:e=>N(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},N=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},T=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return T(e,e.M),de((()=>F(e,t)));e.t|=512},F=(e,t)=>{const n=e.i;let l;return t?(e.t|=256,e.u&&(e.u.map((([e,t])=>B(n,e,t))),e.u=null),l=B(n,"componentWillLoad")):l=B(n,"componentWillUpdate"),l=G(l,(()=>B(n,"componentWillRender"))),G(l,(()=>H(e,n,t)))},H=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.S,l=t.t,s=((e,t)=>{let n=m(t),l=ie.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);q(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>V(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},q=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.C,i=n.L||b(null,null),r=(e=>e&&e.v===g)(l)?l:w(null,null,l);t=s.tagName,o.P&&(r.m=r.m||{},o.P.map((([e,t])=>r.m[t]=s[e]))),r.v=null,r.t|=4,n.L=r,r.j=i.j=s.shadowRoot||s,e=s["s-sc"],U(i,r)})(n,l)}catch(e){le(e,n.S)}return null},V=e=>{const t=e.S,n=e.i,l=e.M;B(n,"componentDidRender"),64&e.t?B(n,"componentDidUpdate"):(e.t|=64,I(t),B(n,"componentDidLoad"),e.R(t),l||z()),e.U(t),e.O&&(e.O(),e.O=void 0),512&e.t&&pe((()=>A(e,!1))),e.t&=-517},_=e=>{{const t=Z(e),n=t.S.isConnected;return n&&2==(18&t.t)&&A(t,!1),n}},z=()=>{I(o.documentElement),pe((()=>N(s,"appload",{detail:{namespace:"ketchup"}})))},B=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){le(e)}},G=(e,t)=>e&&e.then?e.then(t):t(),I=e=>e.classList.add("hydrated"),J=(e,t,n)=>{if(t.W){e.watchers&&(t.D=e.watchers);const l=Object.entries(t.W),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>Z(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=Z(e),o=s.S,i=s.N.get(t),r=s.t,c=s.i;if(n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.N.set(t,n),c)){if(l.D&&128&r){const e=l.D[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){le(e,o)}}))}2==(18&r)&&A(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=Z(this);return n.T.then((()=>n.i[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},K=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),p=o.createElement("style"),d=[];let h,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],p:t[1],W:t[2],A:t[3]};s.W=t[2],s.A=t[3],s.P=[],s.D={};const o=s.p,u=class extends HTMLElement{constructor(e){super(e),te(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?d.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=Z(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.A);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){T(t,t.M=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=oe(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.D=s.watchers,J(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){le(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=m(n);if(!ie.has(t)){const l=()=>{};((e,t,n)=>{let l=ie.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ie.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>A(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=Z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),B(t,"disconnectedCallback")}})()))}componentOnReady(){return Z(this).F}};s.H=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,J(u,s,1)))}))})),p.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",p.setAttribute("data-styles",""),u.insertBefore(p,f?f.nextSibling:u.firstChild),y=!1,d.length?d.map((e=>e.connectedCallback())):i.jmp((()=>h=setTimeout(z,30)))},Q=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},X=e=>i.l=e,Y=new WeakMap,Z=e=>Y.get(e),ee=(e,t)=>Y.set(t.i=e,t),te=(e,t)=>{const n={t:0,S:e,C:t,N:new Map};return n.T=new Promise((e=>n.U=e)),n.F=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.A),Y.set(e,n)},ne=(e,t)=>t in e,le=(e,t)=>(0,console.error)(e,t),se=new Map,oe=e=>{const t=e.p.replace(/-/g,"_"),n=e.H,l=se.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(se.set(n,e),e[t])),le)},ie=new Map,re=[],ce=[],ae=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?pe(fe):i.raf(fe))},ue=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){le(e)}e.length=0},fe=()=>{ue(re),ue(ce),(l=re.length>0)&&i.raf(fe)},pe=e=>r().then(e),de=ae(ce,!0);export{g as H,Q as a,K as b,D as c,_ as f,E as g,w as h,r as p,ee as r,X as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as n,d as t}from"./p-12773ca8.js";const u=document.documentElement;var r;function i(n){if(n)for(let t=0;t<n.length;t++)n[t].id=t.toString()}function e(n){const t={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==n&&(t.second="2-digit"),new Intl.DateTimeFormat(u.ketchup.dates.getLocale()+"-u-hc-h23",t).formatToParts(new Date).map((n=>{switch(n.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return n.value}})).join("")}function c(n,t){return null!=n&&""!=n.trim()&&!!o(h(n,t))}function o(n){return!isNaN(n)}function s(n){return n&&null!=n&&""!=n.trim()||(n="0"),u.ketchup.math.numberify(n)}function a(n){let t="";return"P"==(n=n.toUpperCase())?t=" %":"VE"==n?t=" €":"VL"==n?t=" £":"VV"==n&&(t=" $"),t}function f(n,t,r){if(null==n||isNaN(n))return"";let i=function(n,t){return null==n?"":I(n,t,u.ketchup.dates.getLocale(),!0)}(n,t);return i+=a(r),i}function l(n,t,u){return f(s(n),t,u)}function h(n,t){return d(n,t,m(u.ketchup.dates.getLocale()))}function g(n,t){return d(n,t,".")}function d(n,t,r){if(null==n||""==n.trim())return"";let i=n,e=a(t);""!=e&&(n=n.replace(e,""));let c=null;return c="."==r?/,/g:/\./g,n=n.replace(c,""),"."!=r&&(n=n.replace(/,/g,".")),null==u.ketchup.math.numberify(n)||isNaN(u.ketchup.math.numberify(n))?i:I(s(n),-1,"en-US",!1)}function m(n){return function(n){return Intl.NumberFormat(n).formatToParts(1000.1).find((n=>"decimal"===n.type)).value}(n)}function I(n,t,u,r){return null==n&&(n=0),null!=t&&-1!=t||(t=function(n){if(Math.floor(n)===n)return 0;let t=n.toString().split(".")[1];return t&&t.length?t.length:0}(n)),Number(n).toLocaleString(u,t>-1?{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:r}:{useGrouping:r})}function w(n,t){const r={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(r.second="2-digit"),n.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}function N(n,t){let r=e(t);return u.ketchup.dates.isValid(n,r,!0)}function p(n){return D(n,t.ISO_DATE_TIME,!0)}function D(t,r,i){let c=e(i);return u.ketchup.dates.isValid(t,c)?u.ketchup.dates.format(u.ketchup.dates.normalize(t,n.TIME),r):""}function b(t,r,i){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==r&&(e.second="2-digit"),function(n,t,r,i){if(null==i)return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r);switch(i){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return n}return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}(t,u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIME)),e,i)}function H(t){return u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIMESTAMP)).toLocaleString(u.ketchup.dates.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function V(n,t){if(null==n)return"";const r=new Date;r.setDate(1),r.setMonth(n-1);const i={month:t};return new Intl.DateTimeFormat(u.ketchup.dates.getLocale(),i).format(r)}function j(n){null!=n&&""!=n.trim()||(n=r.LONG);for(var t=[],u=0;u<12;u++)t[u]=V(u+1,n);return t}function M(n,t,u){let r={};if(u)r=t;else for(const u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=n[u]);return r}function k(n,t,u){for(const r in u)t[r]?n[r]=u[r]:n.rootElement[r]=u[r]}!function(n){n.NUMERIC="numeric",n.DIGIT2="2-digit",n.LONG="long",n.SHORT="short",n.NARROW="narrow"}(r||(r={}));export{r as D,p as a,c as b,h as c,s as d,o as e,D as f,M as g,i as h,N as i,j,l as k,w as l,b as m,f as n,H as o,m as p,k as s,g as u}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,f as i,h as a,H as o,g as n}from"./p-34b74425.js";import{k as r}from"./p-12773ca8.js";import{g as e,s as c}from"./p-40f97429.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-7a74ad17.js";import"./p-6c77a36c.js";import"./p-4f56932b.js";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null,this.kupManager=r()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return e(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,h,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return a(o,{"kup-visible":this.visible},a("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{id:l},a("div",{class:"snackbar"},a("div",{class:"snackbar__text"},this.text),this.actionButton||this.closeButton?a("div",{class:"snackbar__buttons"},this.actionButton?a("div",{class:"snackbar__action"},a(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?a("div",{class:"snackbar__close"},a(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:flex-start;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;white-space:nowrap}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;width:100%}.snackbar__close{--kup-button-font-size:11px;margin-left:8px}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,f as i,h as s,H as e,g as o}from"./p-34b74425.js";import{k as a,i as c,j as n,_ as r,F as h,$ as l,o as u,b as p}from"./p-12773ca8.js";import{F as d}from"./p-6c77a36c.js";import{F as b}from"./p-4f56932b.js";import{g as m,s as k}from"./p-40f97429.js";import{c as g}from"./p-97e8ea42.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.display=x.DATATABLE,this.customStyle="",this.data=null,this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null}async getProps(t){return m(this,f,t)}async refresh(){i(this)}async setProps(t){k(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",n.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",n.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",n.ERROR)}else i.push(s("div",{class:"empty"},s(b,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",n.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(r,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${h}],[${l}]`},{dispatcher:this.rootElement,type:u.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:d.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${p.PRIMARY}: var(${p.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as o,g as l}from"./p-34b74425.js";import{k as a,j as h}from"./p-12773ca8.js";import{c as n}from"./p-97e8ea42.js";var u;!function(t){t.customStyle="Custom style of the component.",t.data="Effective data to pass to the component.",t.label="The text of the label. If set to empty or has only white space chars, the label will be removed.",t.labelPos="Sets the label's position, left right or top.",t.showSubmit="Sets whether the submit button must be displayed or not.",t.submitLabel="Sets the submit button's label.",t.submitPos="Sets the submit button's position, top right bottom or left.",t.type="The type of the FLD"}(u||(u={}));const r=class{constructor(s){t(this,s),this.kupChange=i(this,"kup-field-change",6),this.kupSubmit=i(this,"kup-field-submit",6),this.customStyle="",this.data={},this.label="",this.labelPos="left",this.showSubmit=!1,this.submitLabel="",this.submitPos="right",this.type=void 0,this.kupManager=a(),this.currentValue=null,this.previousValue=null,this.onChangeInstance=this.onChange.bind(this),this.onSubmitInstance=this.onSubmit.bind(this)}onChange(t){const{value:i,info:s}=t.detail;this.kupChange.emit({originalEvent:t,oldValue:this.currentValue,value:i,info:s}),this.previousValue=this.currentValue,this.currentValue=i}onSubmit(t){this.kupSubmit.emit({originalEvent:t,oldValue:this.previousValue,value:this.currentValue,info:{obj:t.detail.info&&t.detail.info.obj?t.detail.info.obj:void 0}})}async getCurrentValue(){return this.currentValue}async getProps(t){let i={};if(t)i=u;else for(const t in u)Object.prototype.hasOwnProperty.call(u,t)&&(i[t]=this[t]);return i}async refresh(){s(this)}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(){let t=[],i=null,s=null,l="",a=Object.assign({},this.data);this.label.trim().length&&(l+=" label-"+this.labelPos,i=e("label",{class:"kup-field__label kup-field--"+this.labelPos},this.label)),this.showSubmit&&(l+=" submit-"+this.submitPos,s=e("kup-button",{class:"kup-field__submit",label:this.submitLabel,"onkup-button-click":this.onSubmitInstance}));const u="top"===this.labelPos,r="left"===this.labelPos,p="right"===this.labelPos,b="top"===this.submitPos,c="left"===this.submitPos,m="right"===this.submitPos,f="bottom"===this.submitPos;let d;if((u||b)&&t.push(e("div",{class:"kup-field__top-container"},u&&i?i:null,b&&s?s:null)),r&&i&&t.push(i),c&&s&&t.push(s),void 0===this.type)this.kupManager.debug.logMessage(this,"Type (state) is undefined!",h.WARNING);else switch(this.type.toLowerCase()){case"cmb":d="kup-combobox",a.onKupComboboxChange=this.onChangeInstance;break;case"itx":d="kup-text-field",a.onkupTextFieldChange=this.onChangeInstance;break;case"rad":d="kup-radio",a.onkupRadioChange=this.onChangeInstance}return t.push(e(d,Object.assign({class:"kup-field__component"},a))),p&&i&&t.push(i),(m||f)&&s&&t.push(s),e(o,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:n,class:l},t))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return l(this)}};r.style=":host{display:block;font-size:var(--kup-font-size)}label{color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:1em}.kup-field__component{display:inline-block}.label-top.submit-top label{float:left;margin:auto auto 1em auto}.label-top.submit-top kup-button{float:right;margin:auto auto 1em auto}.label-right label{display:inline-block;margin:auto auto auto 1em}.submit-right kup-button{display:inline-block;margin:auto auto auto 1em}.label-left label{display:inline-block;margin:auto 1em auto auto}.submit-left kup-button{display:inline-block;margin:auto 1em auto auto}.submit-bottom kup-button{display:block;margin:1em auto auto auto}";export{r as kup_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./p-
|
|
1
|
+
import{h as c}from"./p-34b74425.js";import{F as i}from"./p-4f56932b.js";import{a as s,i as e,b as n}from"./p-12773ca8.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${s.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(e.EXPAND)+"/"+l.ketchup.language.translate(e.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(e){let l="chip ",o=[],d="chip__icon chip__icon--leading";return(r||a)&&e.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),e.icon&&o.push(c(i,Object.assign({},{color:a&&e.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:e.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":e.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],e):null,role:"row",title:e.title?e.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:e.id,checked:e.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],e):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],e):null},c("span",{class:"chip__text"},e.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${s.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],e):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{a as F,p as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,a as e}from"./p-
|
|
1
|
+
import{h as t,a as e}from"./p-34b74425.js";import{b as s}from"./p-12773ca8.js";var i;!function(t){t.BAR="bar"}(i||(i={}));const a=a=>{let r,o;a.resource?a.resource.indexOf(".")>-1||a.resource.indexOf("/")>-1||a.resource.indexOf("\\")>-1?(o={"--kup_image_height":a.sizeY?a.sizeY:"auto","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=t("img",{src:a.resource})):(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=function(i){const a={"f-image__icon":!0},r={background:i.color?i.color:`var(${s.ICON})`};if(i.resource.indexOf("--kup")>-1){let t=i.resource.replace("--","");a["kup-icon"]=!0,a[t]=!0}else{const t=e(`./assets/svg/${i.resource}.svg`);r.mask=`url('${t}') no-repeat center`,r.webkitMask=`url('${t}') no-repeat center`}return t("div",{class:a,style:r})}(a)):a.data&&(o={"--kup_image_height":a.sizeY?a.sizeY:"100%","--kup_image_width":a.sizeX?a.sizeX:"100%"},r=function(e){const s=[];let a=0;for(let r=0;r<e.length;r++){let o;e[r].shape||(e[r].shape=i.BAR),e[r].color||(e[r].color="transparent"),e[r].height||(e[r].height="100%"),e[r].width||(e[r].width="100%");const n="step-"+r,c="css-step bottom-aligned",l={backgroundColor:e[r].color,left:a+"%",height:e[r].height,width:e[r].width};a+=parseFloat(e[r].width),o=t("span",{id:n,class:c,style:l}),s.push(o)}return t("div",{class:"f-image__css"},s)}(a.data));const n=[];if(a.badgeData)for(let e=0;e<a.badgeData.length;e++)n.push(t("kup-badge",Object.assign({},a.badgeData[e])));return t("div",Object.assign({class:`f-image ${a.wrapperClass?a.wrapperClass:""} ${a.fit?"kup-fit":""}`},a.dataSet,{id:a.id,style:o,title:a.title,onClick:a.onClick}),r,...n)};export{a as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,a as t}from"./p-34b74425.js";import{a as l}from"./p-12773ca8.js";const i=(t,l)=>e("div",Object.assign({class:`f-text-field ${t.danger?"kup-danger":""} ${t.fullHeight?"kup-full-height":""} ${t.fullWidth?"kup-full-width":""} ${t.info?"kup-info":""} ${t.secondary?"kup-secondary":""} ${t.shaped?"kup-shaped":""} ${t.success?"kup-success":""} ${t.warning?"kup-warning":""} ${t.wrapperClass?t.wrapperClass:""}`},t.dataSet,{id:t.id,title:t.title}),t.leadingLabel||t.trailingLabel?e("div",{class:"mdc-form-field "+(t.leadingLabel?"mdc-form-field--align-end":"")},[d(t),c(t),e("label",null,t.label)]):[d(t),c(t)],l);function d(i){const d=i.textArea||i.outlined;let c,n;if(!i.label||i.leadingLabel||i.trailingLabel||(c=e("label",{class:"mdc-floating-label",htmlFor:"kup-input"},i.label)),i.icon){let d,c="";if(Object.values(l).indexOf(i.icon)>-1)c=i.icon.replace("--","");else{let e=`url('${t(`./assets/svg/${i.icon}.svg`)}') no-repeat center`;d={mask:e,webkitMask:e}}n=e("span",{style:d,onClick:i.onIconClick,class:`mdc-text-field__icon kup-icon action ${c}`})}return e("div",{class:{"is-clearable":i.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":i.disabled,"mdc-text-field--filled":!i.fullWidth&&!d,"mdc-text-field--no-label":!i.label,"mdc-text-field--fullwidth":i.fullWidth,"mdc-text-field--outlined":d,"mdc-text-field--textarea":i.textArea,"mdc-text-field--with-leading-icon":i.icon&&!i.trailingIcon,"mdc-text-field--with-trailing-icon":i.icon&&i.trailingIcon}},i.textArea&&i.maxLength?e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",i.maxLength):void 0,i.trailingIcon?void 0:n,i.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:i.disabled,readOnly:i.readOnly,maxlength:i.maxLength,value:i.value,onBlur:i.onBlur,onClick:i.onClick,onChange:i.onChange,onFocus:i.onFocus,onInput:i.onInput,onKeyDown:i.onKeyDown})):e("input",{type:i.inputType?i.inputType:"text",step:i.step,min:i.min,max:i.max,class:"mdc-text-field__input",disabled:i.disabled,readOnly:i.readOnly,placeholder:i.fullWidth?i.label:void 0,maxlength:i.maxLength,value:i.value,onBlur:i.onBlur,onClick:i.onClick,onChange:i.onChange,onFocus:i.onFocus,onInput:i.onInput,onKeyDown:i.onKeyDown}),i.isClearable?e("span",{class:`mdc-text-field__icon kup-icon ${l.CLEAR.replace("--","")}`,onClick:i.onClearIconClick}):void 0,i.trailingIcon?n:void 0,i.fullWidth||d?void 0:c,d?e("div",{class:"mdc-notched-outline"},e("div",{class:"mdc-notched-outline__leading"}),e("div",{class:"mdc-notched-outline__notch"},c),e("div",{class:"mdc-notched-outline__trailing"})):e("span",{class:"mdc-line-ripple"}))}function c(t){if(!1!==t.helperEnabled){if(t.helper)return e("div",{class:"mdc-text-field-helper-line"},e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!t.helperWhenFocused}},t.helper),t.maxLength&&!t.textArea?e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",t.maxLength.toString()):void 0);if(t.maxLength&&!t.textArea)return e("div",{class:"mdc-text-field-helper-line"},e("div",{class:"mdc-text-field-character-counter"},"'0 / ' + ",t.maxLength))}}export{i as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as h,g as o}from"./p-34b74425.js";import{k as r,K as l,x as n}from"./p-12773ca8.js";import{c as u}from"./p-97e8ea42.js";import{F as c}from"./p-669bde31.js";import{F as a}from"./p-ecb7069b.js";import"./p-a0b1d769.js";import"./p-8c44c3b9.js";var p;!function(t){t.customStyle="Custom style of the component.",t.data="Props of the sub-components.",t.decimals="Defaults at false. When set to true, the component has decimals.",t.disabled="Defaults at false. When set to true, the component is disabled.",t.initialValue="Sets the initial value of the component",t.maxDecimals="when set, the component allows you to enter decimals with a maximum of characters.",t.maxIntegers="When set, the component allows you to enter integer numbers with a maximum of characters.",t.maxLength="When set, the component allows you to enter numbers with a maximum of characters, including decimals.",t.negative="Defaults at false. When set to true, the component has negative number."}(p||(p={}));const m=class{constructor(s){t(this,s),this.kupBlur=i(this,"kup-numericpicker-blur",6),this.kupChange=i(this,"kup-numericpicker-change",6),this.kupClick=i(this,"kup-numericpicker-click",6),this.kupFocus=i(this,"kup-numericpicker-focus",6),this.kupInput=i(this,"kup-numericpicker-input",6),this.kupIconClick=i(this,"kup-numericpicker-iconclick",6),this.kupItemClick=i(this,"kup-numericpicker-itemclick",6),this.kupTextFieldSubmit=i(this,"kup-numericpicker-textfieldsubmit",6),this.kupClearIconClick=i(this,"kup-numericpicker-cleariconclick",6),this.stateSwitcher=!1,this.value="",this.customStyle="",this.data=null,this.decimals=!1,this.disabled=!1,this.initialValue="",this.maxDecimals=null,this.maxIntegers=null,this.maxLength=null,this.negative=!1,this.kupManager=r(),this.textfieldEl=null,this.pickerContainerEl=null,this.pickerEl={value:(new Date).toISOString(),date:new Date},this.clickCb=null}onKupPickerItemClick(t){this.setPickerValueSelected(t),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value}),this.setFocus()}onKupClearIconClick(){this.setPickerValueSelected(""),this.kupChange.emit({comp:this,id:this.rootElement.id,value:this.value}),this.kupClearIconClick.emit({comp:this,id:this.rootElement.id})}onKupBlur(){this.kupBlur.emit({id:this.rootElement.id,value:this.value,comp:this})}onKupChange(t){this.refreshPickerValue(t.target.value,this.kupChange)}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupFocus(){this.kupFocus.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupInput(t){this.refreshPickerValue(t.target.value,this.kupInput,!0)}onkupTextFieldSubmit(t){"Enter"===t.key&&this.refreshPickerValue(t.target.value,this.kupTextFieldSubmit)}onKupIconClick(){this.isPickerOpened()?this.closePicker():this.openPicker(),this.kupIconClick.emit({comp:this,id:this.rootElement.id,value:this.value})}listenKeyup(t){this.isPickerOpened()&&("Escape"===t.key&&this.closePicker(),"Enter"===t.key&&this.setPickerValueSelected())}async getValue(){return this.value}async getProps(t){let i={};if(t)i=p;else for(const t in p)Object.prototype.hasOwnProperty.call(p,t)&&(i[t]=this[t]);return i}async refresh(){s(this)}async setFocus(){null!=this.textfieldEl&&this.textfieldEl.focus()}async setValue(t){this.value=t}refreshPickerValue(t,i,s){let e=this.kupManager.math.numberify(t,!0);if(e){let t=e.toString();const h=t.indexOf(".");let o=h>-1?t.substring(0,h):t,r=h>-1?t.substring(h+1):"";for(this.maxIntegers&&o.length>this.maxIntegers&&(o=o.substring(o.length-this.maxIntegers)),this.maxDecimals&&r.length>this.maxDecimals&&(r=r.substring(0,this.maxDecimals));this.maxLength&&o.length+r.length>this.maxLength;)r.length>1?r=r.substring(0,r.length-1):o.length>1&&(o=o.substring(1));t=h>-1?`${o}.${r}`:o,1!=s&&this.setValue(t),null!=i&&i.emit({id:this.rootElement.id,value:t})}}setPickerValueSelected(t){1!=this.disabled&&(null==t&&(t=this.getPickerValueSelected()),this.closePicker(),null!=t&&this.setValue(t))}getPickerValueSelected(){return this.pickerEl.value}getValueForPickerComponent(){return this.value}openPicker(){const t=this.textfieldEl;this.pickerContainerEl.menuVisible=!0;const i=this.pickerContainerEl.style;i.height="auto",i.minWidth=this.textfieldEl.parentElement.clientWidth+"px",null!=t&&t.classList.add("toggled"),this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)?this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl,this.textfieldEl.parentElement):this.kupManager.dynamicPosition.register(this.pickerContainerEl,this.textfieldEl.parentElement,0,l.AUTO,!0),this.kupManager.dynamicPosition.start(this.pickerContainerEl),this.clickCb||(this.clickCb={cb:()=>{this.closePicker()},el:this.pickerContainerEl}),this.kupManager.addClickCallback(this.clickCb,!0)}closePicker(){if(this.kupManager.removeClickCallback(this.clickCb),!this.isPickerOpened())return;let t=this.textfieldEl;null!=t&&t.classList.remove("toggled"),this.pickerContainerEl.menuVisible=!1,this.kupManager.dynamicPosition.stop(this.pickerContainerEl)}isPickerOpened(){return 1==this.pickerContainerEl.menuVisible}getTextFieldId(){return this.textfieldEl.id}prepTextfield(){this.decimals||this.maxIntegers||(this.maxIntegers=17),!this.decimals||this.maxIntegers||this.maxDecimals||(this.maxIntegers=15,this.maxDecimals=2);const t=this.rootElement.classList.contains("kup-full-height"),i=this.rootElement.classList.contains("kup-full-width"),s=Object.assign({},this.data["kup-text-field"]);return s.icon||(s.icon="calculator"),s.icon&&(s.trailingIcon=!0),e(c,Object.assign({},s,{disabled:this.disabled,fullHeight:t,fullWidth:i,id:this.rootElement.id+"_text-field",value:this.kupManager.math.numbers.toLocaleString(this.value),onBlur:()=>this.onKupBlur(),onChange:t=>this.onKupChange(t),onClearIconClick:()=>this.onKupClearIconClick(),onClick:()=>this.onKupClick(),onFocus:()=>this.onKupFocus(),onIconClick:()=>this.onKupIconClick(),onKeyDown:t=>this.onkupTextFieldSubmit(t),onInput:t=>this.onKupInput(t)}),this.prepPicker())}prepPicker(){return e("kup-card",{ref:t=>this.pickerContainerEl=t,data:{options:{decimals:this.decimals,initialValue:this.value,maxDecimals:this.maxDecimals,maxIntegers:this.maxIntegers,maxLength:this.maxLength,negative:this.negative,resetStatus:!0}},layoutFamily:n.BUILT_IN,layoutNumber:5,sizeX:"300px",sizeY:"auto",isMenu:!0,"onkup-card-click":t=>{null!=t.detail.value&&this.onKupPickerItemClick(t.detail.value)}})}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.value=this.initialValue,this.data||(this.data={"kup-text-field":{}})}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const i=t.querySelector(".f-text-field");i&&(this.textfieldEl=i.querySelector("input"),a(i))}this.kupManager.debug.logRender(this,!0)}render(){return e(h,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},this.prepTextfield()))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.theme.unregister(this),this.pickerContainerEl&&this.pickerContainerEl.remove()}get rootElement(){return o(this)}};m.style=":host{display:block;font-size:var(--kup-font-size)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";export{m as kup_numeric_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as n}from"./p-
|
|
1
|
+
import{h as n}from"./p-34b74425.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-4f56932b.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},type:"button",value:t.checked?"on":"off"},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const p={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},type:"button"},e.trailingIcon?[n("span",{class:p},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:p},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
|