@baloise/ds-core 17.2.0 → 17.2.1-nightly.20241218
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/components/all.d.ts +2 -0
- package/components/all.js +3 -0
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-carousel2.js +1 -1
- package/components/bal-close2.js +1 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-date.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-input-date2.js +2 -2
- package/components/bal-list-item-accordion-body2.js +3 -3
- package/components/bal-pagination2.js +4 -4
- package/components/bal-segment.js +1 -1
- package/components/bal-stage-image.js +1 -1
- package/components/bal-tabs2.js +12 -14
- package/components/index.js +5 -304
- package/components/initialize.js +303 -0
- package/components/mutation.decorator.js +11 -13
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-eee34b1983.entry.js → p-012d9e742e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-799a292492.entry.js → p-04979ee232.entry.js} +1 -1
- package/dist/baloise-design-system/p-153e72207a.entry.js +1 -0
- package/dist/baloise-design-system/{p-cc4dc17721.system.entry.js → p-18fbeec32d.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-aebb3198c4.system.entry.js → p-1cb1fb71d4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c045d5a57c.system.entry.js → p-20d7a74311.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fd88b00c71.system.entry.js → p-2b2b1b7c93.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8e244ba61a.entry.js → p-2cdc626e3f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e3a563de25.system.entry.js → p-374ce10b98.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9f83acd71d.entry.js → p-39ad885d73.entry.js} +1 -1
- package/dist/baloise-design-system/{p-749fe3de.system.js → p-3cb1982c.system.js} +1 -1
- package/dist/baloise-design-system/p-3d1747bc.system.js +1 -0
- package/dist/baloise-design-system/{p-73efab2c3a.system.entry.js → p-42be32ba07.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-512a273a.js → p-4794d9aa.js} +1 -1
- package/dist/baloise-design-system/{p-d8fb982e61.system.entry.js → p-482fbfe677.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-4c8470249b.system.entry.js → p-5409f91b36.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a7cf23072c.entry.js → p-5633d2268f.entry.js} +1 -1
- package/dist/baloise-design-system/p-576c7123.system.js +1 -0
- package/dist/baloise-design-system/{p-88be14c716.entry.js → p-5bbc6e33c0.entry.js} +1 -1
- package/dist/baloise-design-system/p-605cf17f30.entry.js +1 -0
- package/dist/baloise-design-system/{p-01cdb12b31.entry.js → p-63793834ec.entry.js} +1 -1
- package/dist/baloise-design-system/p-65b542bd.system.js +1 -1
- package/dist/baloise-design-system/{p-34b1a9a33b.entry.js → p-6a7e9ecb47.entry.js} +1 -1
- package/dist/baloise-design-system/{p-246e9e2585.system.entry.js → p-6b6a1e6e73.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fb2a9f7542.system.entry.js → p-6da66e2b7e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5361e8255f.system.entry.js → p-7234f01079.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-749056f366.entry.js → p-775960260a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-992c49c23e.system.entry.js → p-7d63b70a40.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a68d21a21e.system.entry.js → p-83e1a5e2d8.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c412a7d9f5.system.entry.js → p-85f853f154.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-38eaad35.js → p-87e8a649.js} +1 -1
- package/dist/baloise-design-system/{p-3c4bbee680.system.entry.js → p-8ef7318b76.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-92a6c4407c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-9d3f7645.system.js → p-9ef02421.system.js} +1 -1
- package/dist/baloise-design-system/{p-737eb79c75.entry.js → p-a04605e550.entry.js} +1 -1
- package/dist/baloise-design-system/p-a24e650e.js +1 -0
- package/dist/baloise-design-system/p-a29f60e9.js +1 -0
- package/dist/baloise-design-system/{p-13e7a8817c.entry.js → p-a3d18d6e5c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b86876e144.entry.js → p-a6556b9bd0.entry.js} +1 -1
- package/dist/baloise-design-system/{p-30679d51bd.system.entry.js → p-ab64213bd1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c72669019f.system.entry.js → p-af956b48a1.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8b8019c57c.entry.js → p-b715c1e68e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-56f5e6d1.system.js → p-b79e4ef5.system.js} +1 -1
- package/dist/baloise-design-system/{p-55d6475b.js → p-b97dcbd9.js} +1 -1
- package/dist/baloise-design-system/{p-ba38ccde00.entry.js → p-ba0a53db6c.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d1c71ad702.entry.js → p-c2c0d017b8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-be6d3bde8f.entry.js → p-c486a8a8ed.entry.js} +1 -1
- package/dist/baloise-design-system/{p-de13d5c0.system.js → p-c4a29e1f.system.js} +1 -1
- package/dist/baloise-design-system/{p-faaf77375f.system.entry.js → p-c6ee7ff820.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-ce674dca.js +1 -0
- package/dist/baloise-design-system/{p-4023b8977a.entry.js → p-cec4d35c92.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34c50dfa1e.entry.js → p-dc032a0d49.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ccee08eae1.system.entry.js → p-dc0b713dcb.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e3167218.js +1 -1
- package/dist/baloise-design-system/p-fabf47dd.system.js +1 -0
- package/dist/baloise-design-system/{p-b5152365.system.js → p-fdfe6d28.system.js} +1 -1
- package/dist/cjs/app-globals-d0a40f5b.js +7 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-close.cjs.entry.js +1 -1
- package/dist/cjs/bal-date-calendar_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-date.cjs.entry.js +1 -1
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- package/dist/cjs/bal-field_5.cjs.entry.js +1 -1
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +6 -6
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +4 -4
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +7 -7
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/bal-segment_2.cjs.entry.js +5 -5
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +4 -4
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +16 -18
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-8bde2bcf.js → breakpoints.decorator-1bb047c8.js} +1 -1
- package/dist/cjs/{breakpoints.subject-15687772.js → breakpoints.subject-28b3d733.js} +1 -1
- package/dist/cjs/{app-globals-661b320a.js → global-9176b6c7.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-6421e1c1.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{mutation.decorator-d2ce6c1a.js → mutation.decorator-5ac1e198.js} +10 -12
- package/dist/cjs/{tokens.esm-bdae5d02.js → tokens.esm-635228ac.js} +1 -1
- package/dist/cjs/{window-resize.decorator-e1fbbe1f.js → window-resize.decorator-d77f1ae8.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +3 -3
- package/dist/collection/components/bal-close/bal-close.js +4 -4
- package/dist/collection/components/bal-date/bal-date-calendar/bal-date-calendar.js +1 -1
- package/dist/collection/components/bal-date/bal-date.js +3 -3
- package/dist/collection/components/bal-input/bal-input-date/bal-input-date.js +4 -4
- package/dist/collection/components/bal-list/bal-list-item-accordion-body/bal-list-item-accordion-body.js +3 -3
- package/dist/collection/components/bal-pagination/bal-pagination.js +6 -6
- package/dist/collection/components/bal-segment/bal-segment.js +1 -1
- package/dist/collection/components/bal-stage/bal-stage-image/bal-stage-image.js +1 -1
- package/dist/collection/components/bal-tabs/bal-tabs.js +12 -14
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +1 -0
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +229 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/mutation/mutation.subject.js +11 -13
- package/dist/esm/app-globals-10882328.js +5 -0
- package/dist/esm/bal-carousel_2.entry.js +5 -5
- package/dist/esm/bal-checkbox_2.entry.js +1 -1
- package/dist/esm/bal-close.entry.js +1 -1
- package/dist/esm/bal-date-calendar_2.entry.js +3 -3
- package/dist/esm/bal-date.entry.js +1 -1
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-field_5.entry.js +1 -1
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +6 -6
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +4 -4
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +7 -7
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-radio_2.entry.js +1 -1
- package/dist/esm/bal-segment_2.entry.js +5 -5
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +4 -4
- package/dist/esm/bal-tab-item_2.entry.js +16 -18
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-7623ded8.js → breakpoints.decorator-67df716d.js} +1 -1
- package/dist/esm/{breakpoints.subject-ac2d9287.js → breakpoints.subject-23d0b623.js} +1 -1
- package/dist/esm/{app-globals-665b5c71.js → global-7dca4c85.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-b9912138.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{mutation.decorator-985cc0a1.js → mutation.decorator-74831883.js} +11 -13
- package/dist/esm/{tokens.esm-44ff650d.js → tokens.esm-6e260a83.js} +1 -1
- package/dist/esm/{window-resize.decorator-ab11c379.js → window-resize.decorator-69b08b6f.js} +1 -1
- package/dist/esm-es5/app-globals-10882328.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/bal-close.entry.js +1 -1
- package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
- package/dist/esm-es5/bal-date.entry.js +1 -1
- package/dist/esm-es5/bal-doc-app.entry.js +1 -0
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-radio_2.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-stage_6.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/{breakpoints.decorator-7623ded8.js → breakpoints.decorator-67df716d.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-ac2d9287.js → breakpoints.subject-23d0b623.js} +1 -1
- package/dist/esm-es5/global-7dca4c85.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-b9912138.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mutation.decorator-74831883.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-ab11c379.js → window-resize.decorator-69b08b6f.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +1 -2
- package/dist/types/components/bal-close/bal-close.d.ts +1 -2
- package/dist/types/components/bal-date/bal-date-calendar/bal-date-calendar.d.ts +1 -1
- package/dist/types/components/bal-date/bal-date.d.ts +1 -2
- package/dist/types/components/bal-input/bal-input-date/bal-input-date.d.ts +1 -1
- package/dist/types/components/bal-list/bal-list-item-accordion-body/bal-list-item-accordion-body.d.ts +1 -1
- package/dist/types/components/bal-pagination/bal-pagination.d.ts +1 -2
- package/dist/types/components/bal-segment/bal-segment.d.ts +1 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +44 -7
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
- package/package.json +7 -7
- package/dist/baloise-design-system/p-12a557557c.entry.js +0 -1
- package/dist/baloise-design-system/p-51380295.system.js +0 -1
- package/dist/baloise-design-system/p-738ca720.system.js +0 -1
- package/dist/baloise-design-system/p-950bd476.js +0 -1
- package/dist/baloise-design-system/p-e563e447.js +0 -1
- package/dist/esm-es5/app-globals-665b5c71.js +0 -1
- package/dist/esm-es5/mutation.decorator-985cc0a1.js +0 -1
- /package/dist/baloise-design-system/{p-69313d59.system.js → p-677e8807.system.js} +0 -0
- /package/dist/baloise-design-system/{p-18a74018.js → p-e5a54078.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-44ff650d.js → tokens.esm-6e260a83.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as a,h as e,H as i,g as s}from"./p-2539ba43.js";import{a as n}from"./p-dd5e13d1.js";import{_ as b,a as o}from"./p-43c9f5e9.js";import{a as l}from"./p-00b37ea2.js";import{n as r,f as _,t as d,j as h,o as c,p as v,l as m,q as p,i as u,b as f}from"./p-33101c54.js";import{B as g}from"./p-ae86d0a0.js";import{L as x}from"./p-b77e3348.js";import{n as w}from"./p-f3f5ce4f.js";import{s as y}from"./p-63b52c0f.js";import{b as j}from"./p-a65354df.js";import{a as O}from"./p-0e361394.js";import{L as k}from"./p-af4c6af2.js";import{b as L}from"./p-b97dcbd9.js";import{L as $}from"./p-ce674dca.js";import{L as A}from"./p-4794d9aa.js";import{L as z}from"./p-95a4f1be.js";import{L as T}from"./p-69e7c8d6.js";import"./p-9a3d9e17.js";import"./p-166d571e.js";import"./p-4573c419.js";import"./p-2229e98e.js";import"./p-aafb6696.js";import"./p-96216bd1.js";import"./p-acf222fd.js";import"./p-e5a54078.js";const C=class{constructor(e){t(this,e),this.balNavigate=a(this,"balNavigate",7),this.inheritAttributes={},this.tabPanelID="bal-tab-panel-id-"+E++,this.isActive=!1,this.active=!1,this.value="",this.label="",this.href="",this.target="_self",this.bubble=!1,this.disabled=!1,this.invisible=!1,this.prevent=!1,this.icon=void 0,this.noPanel=!1,this.aria=void 0,this.subLabel="",this.svg=""}componentWillLoad(){this.inheritAttributes=n(this.el)}async getOptions(){return this.options}async setActive(t){this.isActive=t}get options(){return{tabPanelID:this.tabPanelID,value:this.value,icon:this.icon,label:this.label,href:this.href,target:this.target,active:this.active,disabled:this.disabled,invisible:this.invisible,bubble:this.bubble,passed:!1,prevent:this.prevent,navigate:this.balNavigate,trackingData:this.inheritAttributes,noPanel:this.noPanel,aria:this.aria,subLabel:this.subLabel,svg:this.svg}}render(){const t=!this.noPanel,a=!this.isActive||this.noPanel;return e(i,{key:"73cd7faf737780486e58b71b4c51508e0311e277",id:this.tabPanelID,class:{"bal-tab-item":!0,"bal-tab-item--active":this.isActive},role:t?"tabpanel":void 0,"aria-label":t?this.label:void 0,"aria-hidden":a?"true":"false",tabindex:a?"-1":void 0,hidden:!!a||void 0},e("slot",{key:"d533d087306ee17ba5b78c9b756db6cf923ef1a5"}))}get el(){return s(this)}};let E=0;const F=({items:t,value:a,onSelectTab:i})=>{const s=g.block("tabs").element("select");return e("bal-select",{class:Object.assign({},s.class()),value:a,onBalChange:a=>(a=>{const e=t.filter((t=>t.value===a.detail));if(e.length>0){const t=e[0];""!==t.href&&void 0!==t.href&&j.hasWindow&&window.open(t.href,t.target),i(a,t)}})(a)},t.filter((t=>!t.disabled&&!t.invisible)).map((t=>e("bal-select-option",{key:t.value,label:t.label,value:t.value},t.label))))},I=({item:t,inverted:a,accordion:i,isAccordionOpen:s,isMobile:n,hasBubble:b})=>{const o=g.block("tabs").element("nav").element("item").element("icon");let l=t.disabled?"grey":"primary";return a&&(l=t.disabled?"primary-light":"white"),e("span",{class:Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("active").class(t.active)),o.modifier("disabled").class(t.disabled)),o.modifier("display-svg").class(void 0!==t.svg))},e("bal-icon",t.svg?{svg:t.svg,size:"large",color:"auto"}:{size:n||i?"small":"",name:i?"nav-go-down":t.icon,color:l,turn:i&&!0===s&&t.active}),b?e("bal-badge",{class:Object.assign({},o.element("bubble").class()),size:"small"},t.bubble):"")},S=({item:t,inverted:a,hasBubble:i,isVertical:s,context:n})=>{const b=g.block("tabs").element("nav").element("item").element("label");return e("span",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("inverted").class(a)),b.modifier("active").class(t.active)),b.modifier("disabled").class(t.disabled)),b.modifier("vertical").class(s)),b.modifier(`context-${n}`).class(void 0!==n)),b.modifier("with-svg").class(t.svg&&t.svg.length>0)),"data-testid":"bal-tabs-item-label"},t.label,t.subLabel&&e("span",{class:b.element("sub-label").class()},t.subLabel),i?e("bal-badge",{class:Object.assign({},b.element("bubble").class()),size:"small"},t.bubble):"")},B=t=>"string"==typeof t?t.replace(/([a-z])([0-9])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():"",D=({item:t,tabsId:a,isFirst:i,isLast:s,isMobile:n,isVertical:b,accordion:o,isAccordionOpen:l,isLinkList:r,inverted:_,expanded:d,spaceless:h,clickable:c,iconPosition:v,context:m,onSelectTab:p,hasSubLabelInGroup:u,dimInactiveElements:f})=>{var x;const w=g.block("tabs").element("nav").element("item");if(t.invisible)return;const y=!1!==t.bubble,j=void 0!==t.icon,O=j&&y&&"horizontal"!==v&&!o||n&&j&&y&&!b&&!o,k=o&&y||o&&n&&j&&y&&!b,L=!j&&y&&!o||y&&!n&&"horizontal"===v&&!o||y&&b&&!o,$=void 0===t.href||""===t.href,A=$?"button":"a",z=$?{type:"button",role:"tab","aria-controls":(null===(x=t.aria)||void 0===x?void 0:x.controls)||t.tabPanelID||void 0,"aria-expanded":t.active?"true":"false","aria-disabled":`${t.disabled}`,"aria-label":t.label}:{href:t.href,target:t.target};return r||(z.tabindex=t.active?"0":"-1"),e(A,Object.assign({id:`${a}-button-${B(t.value)}`,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},w.class()),w.modifier("active").class(t.active)),w.modifier("disabled").class(t.disabled)),w.modifier("clickable").class(c)),w.modifier("accordion").class(o)),w.modifier("inverted").class(_)),w.modifier("expanded").class(d)),w.modifier("spaceless").class(h)),w.modifier("first").class(i)),w.modifier("last").class(s)),w.modifier("passed").class(t.passed)),w.modifier("vertical").class(b)),w.modifier(`context-${m}`).class(void 0!==m)),w.modifier(`icon-position-${v}`).class("horizontal"!==v)),w.modifier("display-svg").class(t.svg&&t.svg.length>0)),w.modifier("group-has-sub-label").class(u)),w.modifier("dim-inactive-elements").class(f)),{"bal-focusable":!t.disabled&&!t.invisible}),draggable:!1,"data-tabs":a,"data-label":t.label,"data-value":t.value,"data-index":t.index,"data-testid":"bal-tabs-item","aria-selected":$?t.active?"true":"false":void 0},z,{onClick:a=>p(a,t)}),t.icon||t.svg?e(I,{accordion:!1,item:t,isMobile:n,hasBubble:O,inverted:_}):"",e(S,{item:t,isMobile:n,isVertical:b,hasBubble:L,inverted:_,context:m}),o&&!t.href?e(I,{accordion:o,isAccordionOpen:l,item:t,isMobile:n,hasBubble:k,inverted:_}):"")},P=({items:t,tabsId:a,hasCarousel:i,isVertical:s,inNavbar:n,isMobile:b,isTouch:o,lineActive:l,isLinkList:r,border:_,accordion:d,isAccordionOpen:h,inverted:c,clickable:v,animated:m,spaceless:p,expanded:u,verticalColSize:f,iconPosition:x,context:w,onSelectTab:j,dimInactiveElements:O})=>{const k=g.block("tabs").element("nav"),L=t.filter((t=>!t.invisible)),$=n&&!o,A=t.some((t=>t.subLabel&&t.subLabel.length>0)),z=({item:t,index:i})=>e(D,{item:t,isLinkList:r,tabsId:a,isFirst:0===i,isLast:i===L.length-1,isMobile:b,isVertical:s,iconPosition:x,spaceless:p,inverted:c,accordion:d,isAccordionOpen:h,context:w,expanded:u,clickable:v&&!t.disabled,onSelectTab:j,hasSubLabelInGroup:A,dimInactiveElements:O});return e("div",{id:`${a}-nav`,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k.class()),k.modifier("full-height").class($)),k.modifier("border").class(_)),k.modifier("animated").class(m)),k.modifier("vertical").class(s)),k.modifier("expanded").class(u&&!s)),k.modifier(`vertical-col-${f}`).class(s))},i?e("bal-carousel",{id:`${a}-carousel`,class:Object.assign({},k.element("carousel").class()),htmlRole:"tablist",fullHeight:$,border:_,inverted:c,controls:"small","items-per-view":"auto",steps:3,onBalChange:y},L.map(((t,a)=>e("bal-carousel-item",{htmlRole:"",class:Object.assign(Object.assign({},k.element("carousel").element("item").class()),k.element("carousel").element("item").modifier("expanded").class(u))},e(z,{item:t,index:a})))),e("div",{id:`${a}-line`,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k.element("line").class()),k.element("line").modifier("active").class(l)),k.element("line").modifier("inverted").class(c)),k.element("line").modifier("animated").class(m)),k.element("line").modifier("vertical").class(s))})):L.map(((t,a)=>e(z,{item:t,index:a}))),i?"":e("div",{id:`${a}-border`,class:Object.assign(Object.assign(Object.assign({},k.element("border").class()),k.element("border").modifier("inverted").class(c)),k.element("border").modifier("vertical").class(s))}),i?"":e("div",{id:`${a}-line`,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k.element("line").class()),k.element("line").modifier("active").class(l)),k.element("line").modifier("inverted").class(c)),k.element("line").modifier("animated").class(m)),k.element("line").modifier("vertical").class(s))}))},V=class{constructor(e){t(this,e),this.balChange=a(this,"balChange",7),this.balWillAnimate=a(this,"balWillAnimate",7),this.balDidAnimate=a(this,"balDidAnimate",7),this.tabsId="bal-tabs-"+M++,this.mutationObserverActive=!0,this.getOptions=()=>this.options.length>0?[...this.options.map(w)]:Promise.all(this.items.map((t=>t.getOptions()))),this.updateStore=t=>{l(this.store,t)?!this.optionalTabSelection&&!this.accordion&&void 0===this.value&&this.store.length>0&&(this.value=this.store[0].value):this.store=t},this.setActiveItem=()=>{const t=this.store.filter((t=>t.active));t.length>0&&(this.value=t[0].value)},this.setActiveContent=()=>{0===this.options.length&&this.items.forEach((t=>t.setActive(this.isTabActive(t))))},this.getLineSize=(t,a)=>{if(t){if(this.isVertical())return t.clientHeight;{const e=t.clientWidth;return this.expanded?e:e-(a.left+a.right)}}return 0},this.getOffset=(t,a)=>{if(this.isVertical()){if(t.offsetTop)return t.offsetTop}else{if(t.offsetLeft)return this.expanded?t.offsetLeft:t.offsetLeft+a.left;const e=t.closest("bal-carousel-item");if(e)return this.expanded?e.offsetLeft:e.offsetLeft+a.left}return 0},this.animateLine=async()=>{this.shouldAnimate()&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),r((async()=>{await _(this.el,!0),this.currentRaf=r((async()=>{const t=this.getTargetElement(this.value);if(!t)return;if("_blank"===t.getAttribute("target"))return;const a=O(t),e=this.getLineSize(t,a),i=this.getOffset(t,a),s=this.getLineElement();if(s){const t=this.isVertical();this.balWillAnimate.emit(this.value);const a=d(s,300);if(t)s.style.setProperty("transform",`translateY(${i}px)`),s.style.setProperty("min-height",`${e}px`),s.style.setProperty("height",`${e}px`),s.style.removeProperty("min-width"),s.style.removeProperty("width");else{s.style.setProperty("transform",`translateX(${i}px)`),s.style.setProperty("min-width",`${e}px`),s.style.setProperty("width",`${e}px`),s.style.removeProperty("min-height"),s.style.removeProperty("height");const t=this.getBorderElement(),n=this.getCarouselElement();t&&n&&t.style.setProperty("width",`${n.clientWidth}px`),await a,this.balDidAnimate.emit(this.value)}}}))})))},this.toggleAccordionState=(t=!1)=>{this.accordion&&(this.isAccordionOpen?this.collapseAccordion(t):this.expandAccordion(t))},this.expandAccordion=(t=!1)=>{this.isAccordionOpen=!0;const{contentEl:a,contentElWrapper:e}=this;t||void 0===a||void 0===e?this.accordionState=4:4!==this.accordionState&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?r((()=>{this.accordionState=8,this.currentRaf=r((async()=>{const t=e.offsetHeight,i=d(a,300);a.style.setProperty("max-height",`${t}px`),this.balWillAnimate.emit(this.value),await i,this.accordionState=4,a.style.removeProperty("max-height"),this.balDidAnimate.emit(this.value)}))})):(this.accordionState=4,this.balWillAnimate.emit(this.value),this.balDidAnimate.emit(this.value)))},this.collapseAccordion=(t=!1)=>{this.isAccordionOpen=!1;const{contentEl:a}=this;t||void 0===a?this.accordionState=1:1!==this.accordionState&&(void 0!==this.currentRaf&&cancelAnimationFrame(this.currentRaf),this.shouldAnimate()?this.currentRaf=r((async()=>{a.style.setProperty("max-height",`${a.offsetHeight}px`),r((async()=>{const t=d(a,300);this.accordionState=2,this.balWillAnimate.emit(this.value),await t,this.accordionState=1,a.style.removeProperty("max-height"),this.balDidAnimate.emit(this.value)}))})):(this.accordionState=1,this.balWillAnimate.emit(this.value),this.balDidAnimate.emit(this.value)))},this.shouldAnimate=()=>"undefined"!=typeof window&&this.animated,this.onOptionChange=h((()=>this.onOptionChangeInternal()),100),this.onOptionChangeInternal=async()=>{try{const t=await this.getOptions();this.updateStore(t),this.setActiveItem(),this.setActiveContent(),this.animateLine()}catch(t){console.warn("[WARN] - Could not read tab options")}},this.onSelectTab=async(t,a)=>{(a.prevent||a.disabled||!this.clickable)&&y(t),!a.disabled&&this.clickable&&(this.accordion&&(a.value===this.value?this.toggleAccordionState():this.expandAccordion()),a.navigate&&a.navigate.emit(t),a.value!==this.value&&(this.balChange.emit(a.value),await this.select(a),await this.focus(a)))},this.isAccordionOpen=!1,this.accordionState=1,this.isNavbarOpen=!1,this.inNavbar=!1,this.inNavbarLight=!1,this.isLargestContentfulPaintDone=!1,this.isMobile=L.isMobile,this.isTablet=L.isTablet,this.store=[],this.animated=!0,this.float="left",this.fullwidth=!1,this.accordion=!1,this.overflow=!0,this.options=[],this.context=void 0,this.iconPosition="horizontal",this.expanded=!1,this.spaceless=!1,this.clickable=!0,this.border=!1,this.inverted=!1,this.optionalTabSelection=!1,this.debounce=0,this.vertical=!1,this.verticalColSize="one-third",this.selectOnMobile=!1,this.value=void 0,this.dimInactiveElements=!1}createLogger(t){this.log=t}async optionChanged(){this.onOptionChange(),this.mutationObserverActive=void 0===this.options}debounceChanged(){this.balChange=c(this.balChange,this.debounce)}async valueChanged(t,a){t!==a&&this.onOptionChange()}connectedCallback(){if(this.inNavbar=v("bal-navbar",this.el),this.inNavbar){const t=this.el.closest("bal-navbar");t&&(this.inNavbarLight=t.light)}this.debounceChanged(),this.mutationObserverActive=void 0===this.options||this.options.length<1,this.accordion&&(v("bal-nav-menu-bar",this.el)?this.isAccordionOpen=!1:void 0!==this.value&&this.value.length>0?this.expandAccordion(!0):this.collapseAccordion(!0))}componentDidLoad(){this.onOptionChange(),m((()=>{this.isLargestContentfulPaintDone=!0}))}mutationListener(){this.onOptionChange()}breakpointListener(t){this.isMobile=t.mobile,this.isTablet=t.tablet,this.animateLine()}resizeListener(){this.animateLine()}listenToWillAnimate(t){p(t,this.el,(()=>this.animateLine()))}listenToDidAnimate(t){p(t,this.el,(()=>this.animateLine())),this.isUsedInNavbar(t)}listenToKeyDown(t){this.isTabList&&(!1!==this.vertical?"ArrowDown"===t.code?this.tabListSelectNext(t):"ArrowUp"===t.code&&this.tabListSelectPrevious(t):"ArrowRight"===t.code?this.tabListSelectNext(t):"ArrowLeft"===t.code&&this.tabListSelectPrevious(t))}isUsedInNavbar(t){const a=t.target.closest("bal-navbar"),e=t.target;a&&u(a,this.el)&&(this.isNavbarOpen=e)}async configChanged(t){this.animated=t.animated}async select(t){this.value=t.value}async getOptionByValue(t){return this.store.find((a=>a.value===t))}async renderLine(){this.animateLine()}async closeAccordion(){this.isAccordionOpen&&this.collapseAccordion()}get isTabList(){return 0===this.store.filter((t=>!!t.href)).length}get items(){return Array.from(this.el.querySelectorAll(`#${this.tabsId} > bal-tab-item`))}isTabActive(t){return t.value===this.value}isTabVisible(t){return!t.hidden}parseVertical(){return"true"===this.vertical||""===this.vertical||"false"!==this.vertical&&void 0!==this.vertical&&("mobile"===this.vertical?this.isMobile:"tablet"===this.vertical?this.isTablet||this.isMobile:this.vertical)}isVertical(){return this.parseVertical()||(this.isMobile||this.isTablet)&&this.inNavbar}getTargetElement(t){return Array.from(this.el.querySelectorAll(`[data-tabs="${this.tabsId}"]`)).filter((a=>a.getAttribute("data-value")==t))[0]}getLineElement(){return this.el.querySelector(`#${this.tabsId}-line`)}getBorderElement(){return this.el.querySelector(`#${this.tabsId}-border`)}getCarouselElement(){return this.el.querySelector(`#${this.tabsId}-carousel`)}findNextTab(t=!1){const a=this.store.findIndex((t=>this.isTabActive(t)));let e=this.store.map(((t,a)=>({index:a,visible:!t.hidden&&!t.disabled})));t&&(e=e.reverse());const i=e.filter((t=>t.visible)).map((t=>t.index)),s=t?(t,e)=>t<a||e>=t?t:e:(t,e)=>t>a||e<=t?t:e,n=i.reduce(((t,a)=>s(t,a)),a);return this.store[n]}findPreviousTab(){return this.findNextTab(!0)}tabListSelectNext(t){const a=this.findNextTab();a&&this.onSelectTab(t,a)}tabListSelectPrevious(t){const a=this.findPreviousTab();a&&this.onSelectTab(t,a)}async focus(t){if(await f(),null!==this.el.querySelector("button.bal-focused")){const a=this.el.querySelector(`#${this.tabsId}-button-${B(t.value)}`);a&&a.focus({preventScroll:!0})}}render(){const t=g.block("tabs"),a=this.isMobile,s=a||this.isTablet,n=this.inNavbar&&!s&&!this.inNavbarLight||!this.inNavbar&&this.inverted,b=this.isVertical(),o=this.isLargestContentfulPaintDone&&!b&&this.overflow&&!this.expanded,l=this.isLargestContentfulPaintDone&&a&&this.selectOnMobile,r=this.store.map((t=>Object.assign(Object.assign({},t),{active:t.value===this.value}))),_=4===this.accordionState||8===this.accordionState?"content expanded":"content",d=void 0!==this.value&&!!this.store.find((t=>t.value===this.value)),h=!this.isTabList;return e(i,{key:"dfe8fd6f11b4d884bf8e7605653b637526412382",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("navbar").class(this.inNavbar)),t.modifier("vertical").class(b)),t.modifier("fullwidth").class(this.expanded||this.fullwidth)),t.modifier("accordion").class(this.accordion)),t.modifier("animated").class(this.animated)),t.modifier("expanding").class(8===this.accordionState)),t.modifier("expanded").class(4===this.accordionState)),t.modifier("collapsing").class(2===this.accordionState)),t.modifier("collapsed").class(1===this.accordionState)),"data-value":this.store.filter((t=>this.isTabActive(t))).map((t=>t.value)).join(","),"data-label":this.store.filter((t=>this.isTabActive(t))).map((t=>t.label)).join(",")},l?e(F,{value:this.value,items:r,onSelectTab:this.onSelectTab}):e(P,{items:r,isLinkList:h,tabsId:this.tabsId,clickable:this.clickable,accordion:this.accordion,isAccordionOpen:this.isAccordionOpen,lineActive:d,inverted:n,animated:this.animated,context:this.context,border:this.border,spaceless:this.spaceless,expanded:this.expanded,isMobile:a,isTouch:s,isVertical:b,inNavbar:this.inNavbar,hasCarousel:o,iconPosition:this.iconPosition,verticalColSize:this.verticalColSize,onSelectTab:this.onSelectTab,dimInactiveElements:this.dimInactiveElements}),e("div",{key:"0aac73b494d835402ac6654a6a281593917c355a",part:_,ref:t=>this.contentEl=t,class:Object.assign({},t.element("tabs").element("content").class())},e("div",{key:"77c68b5ce4d763f99bacff6e8395f9cd4c03e430",id:this.tabsId,class:Object.assign({},t.element("tabs").element("content").element("wrapper").class()),ref:t=>this.contentElWrapper=t},e("slot",{key:"822c8efa61f9e44fc42e6f8ba31b5286967d7181"}))))}get el(){return s(this)}static get watchers(){return{options:["optionChanged"],debounce:["debounceChanged"],value:["valueChanged"]}}};b([x("bal-tabs"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],V.prototype,"createLogger",null),b([$({tags:["bal-tabs","bal-tab-item"]}),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],V.prototype,"mutationListener",null),b([A(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],V.prototype,"breakpointListener",null),b([z(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],V.prototype,"resizeListener",null),b([k("balWillAnimate",{target:"window"}),o("design:type",Function),o("design:paramtypes",[UIEvent]),o("design:returntype",void 0)],V.prototype,"listenToWillAnimate",null),b([k("balDidAnimate",{target:"window"}),o("design:type",Function),o("design:paramtypes",[UIEvent]),o("design:returntype",void 0)],V.prototype,"listenToDidAnimate",null),b([k("keydown"),o("design:type",Function),o("design:paramtypes",[KeyboardEvent]),o("design:returntype",void 0)],V.prototype,"listenToKeyDown",null),b([T(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],V.prototype,"configChanged",null);let M=0;V.style="@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}.bal-tabs__nav{display:block;position:relative;-webkit-overflow-scrolling:touch;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (min-width: 769px),print{.bal-tabs__nav--vertical-col-one-quarter{-ms-flex:none;flex:none;width:25%}.bal-tabs__nav--vertical-col-one-third{-ms-flex:none;flex:none;width:33.3333%}.bal-tabs__nav--vertical-col-half{-ms-flex:none;flex:none;width:33.3333%}.bal-tabs__nav--vertical-col-two-thirds{-ms-flex:none;flex:none;width:66.6666%}.bal-tabs__nav--vertical-col-three-quarters{-ms-flex:none;flex:none;width:75%}.bal-tabs__nav--vertical-col-full{-ms-flex:none;flex:none;width:100%}}.bal-tabs__nav--vertical{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.bal-tabs__nav--full-height{height:100%}.bal-tabs__nav--expanded{display:-ms-flexbox;display:flex}.bal-tabs__nav__carousel__item--expanded{-ms-flex:1;flex:1;width:5rem;min-width:5rem}.bal-tabs__nav__border{position:absolute;background:var(--bal-tabs-tab-nav-border-background);border-radius:var(--bal-tabs-tab-nav-border-radius);height:var(--bal-border-width-normal);left:1px;right:1px;bottom:0}.bal-tabs__nav__border--vertical{width:var(--bal-border-width-normal);height:100%;top:0;right:auto}.bal-tabs__nav__border--inverted{background:var(--bal-tabs-tab-nav-border-background-inverted)}.bal-tabs__nav__line{position:absolute;background:var(--bal-tabs-tab-nav-line-background);border-radius:var(--bal-tabs-tab-nav-line-radius);left:1px;z-index:1}.bal-tabs__nav__line:not(.bal-tabs__nav__line--vertical){bottom:0;min-width:5rem}.bal-tabs__nav__line--vertical{top:0;min-height:2.5rem}.bal-tabs__nav__line:not(.bal-tabs__nav__line--vertical).bal-tabs__nav__line--active{height:var(--bal-border-width-normal)}.bal-tabs__nav__line--vertical.bal-tabs__nav__line--active{width:var(--bal-border-width-normal)}.bal-tabs__nav__line--animated{will-change:min-width,width,min-height,height,transform;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-tabs__nav__line--inverted{background:var(--bal-tabs-tab-nav-line-background-inverted)}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}.bal-tabs__nav__item{display:-ms-flexbox;display:flex;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-preferred-size:1rem;flex-basis:1rem;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;cursor:default;gap:.5rem;padding:.25rem .75rem;border-radius:var(--bal-tabs-tab-button-radius);min-width:3rem;min-height:3rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none;background-color:rgba(0,0,0,0);border:unset}@media screen and (min-width: 769px),print{.bal-tabs__nav__item{-ms-flex-direction:row;flex-direction:row;min-height:3.5rem}}@media screen and (max-width: 768px){.bal-tabs__nav__item--group-has-sub-label{height:5rem}}.bal-tabs__nav__item--dim-inactive-elements:not(.bal-tabs__nav__item--active){opacity:.6}.bal-tabs__nav__item--display-svg{-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 768px){.bal-tabs__nav__item--display-svg:not(.bal-tabs__nav__item--display-svg.bal-tabs__nav__item--active){-ms-flex:0 0 auto;flex:0 0 auto;min-width:3rem;width:6rem;padding:.25rem}}.bal-tabs__nav__item--accordion{-ms-flex-direction:row;flex-direction:row}.bal-tabs__nav__item--hidden{display:none !important;visibility:hidden !important}.bal-tabs__nav__item--expanded{-ms-flex:1;flex:1;width:5rem;min-width:5rem}.bal-tabs__nav__item--icon-position-vertical{-ms-flex-direction:column;flex-direction:column}.bal-tabs__nav__item--clickable{cursor:pointer;pointer-events:all}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):hover .bal-tabs__nav__item__label{color:var(--bal-tabs-tab-button-label-text-color-hover)}.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):hover-display-svg) svg,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):hover-display-svg) g,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):hover-display-svg) path,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):hover-display-svg) circle{fill:var(--bal-tabs-tab-button-icon-text-color-hover)}}.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):active .bal-tabs__nav__item__label{color:var(--bal-tabs-tab-button-label-text-color-active)}.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):active-display-svg) svg,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):active-display-svg) g,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):active-display-svg) path,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled):active-display-svg) circle{fill:var(--bal-tabs-tab-button-icon-text-color-active)}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:hover .bal-tabs__nav__item__label{color:var(--bal-tabs-tab-button-label-text-color-inverted-hover)}.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:hover-display-svg) svg,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:hover-display-svg) g,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:hover-display-svg) path,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:hover-display-svg) circle{fill:var(--bal-tabs-tab-button-icon-text-color-inverted-hover)}}.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:active .bal-tabs__nav__item__label{color:var(--bal-tabs-tab-button-label-text-color-inverted-active)}.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:active-display-svg) svg,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:active-display-svg) g,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:active-display-svg) path,.bal-tabs__nav__item__icon:not(.bal-tabs__nav__item:not(.bal-tabs__nav__item--disabled).bal-tabs__nav__item--inverted:active-display-svg) circle{fill:var(--bal-tabs-tab-button-icon-text-color-inverted-active)}.bal-tabs__nav__item--vertical{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;min-height:2.5rem;padding:.5rem 1rem}.bal-tabs__nav__item--spaceless.bal-tabs__nav__item--first{padding-left:0}.bal-tabs__nav__item--spaceless.bal-tabs__nav__item--last{padding-right:0}.bal-tabs__nav__item--context-meta{min-height:3rem;height:3rem}.bal-tabs__nav__item--context-navigation{min-height:3rem;height:3rem}@media screen and (min-width: 1024px){.bal-tabs__nav__item--context-navigation{min-height:4rem;height:4rem}}@media screen and (min-width: 1280px){.bal-tabs__nav__item--context-navigation{min-height:4rem;height:4rem}}@media screen and (min-width: 1440px){.bal-tabs__nav__item--context-navigation{min-height:5rem;height:5rem}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}.bal-tabs__nav__item__icon{position:relative}.bal-tabs__nav__item__icon__bubble{position:absolute;right:-0.75rem;top:-0.25rem}@media screen and (min-width: 769px),print{.bal-tabs__nav__item__icon__bubble{right:-0.625rem;top:-0.25rem}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}.bal-tabs__nav__item__label{display:block;position:relative;font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold);font-size:var(--bal-text-size-normal);line-height:var(--bal-body-line-height);text-align:center;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--bal-tabs-tab-label-text-color)}.bal-tabs__nav__item__label--with-svg{text-align:left;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media screen and (max-width: 768px){.bal-tabs__nav__item__label--with-svg:not(.bal-tabs__nav__item__label--active){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0}}.bal-tabs__nav__item__label--disabled{color:var(--bal-tabs-tab-label-text-color-disabled)}.bal-tabs__nav__item__label--inverted{font-family:var(--bal-font-family-text);color:var(--bal-tabs-tab-label-text-color-inverted)}.bal-tabs__nav__item__label--inverted.bal-tabs__nav__item__label--disabled{color:var(--bal-tabs-tab-label-text-color-inverted-disabled)}.bal-tabs__nav__item__label--inverted{font-weight:var(--bal-font-weight-regular);letter-spacing:.1085px}.bal-tabs__nav__item__label--inverted.bal-tabs__nav__item__label--active{font-weight:var(--bal-font-weight-bold);letter-spacing:0}.bal-tabs__nav__item__label__bubble{position:absolute;right:-0.5rem;top:-0.5rem}.bal-tabs__nav__item__label--vertical{text-align:left;width:auto;white-space:normal}.bal-tabs__nav__item__label--context-meta{font-size:var(--bal-text-size-small)}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow-inset) !important;box-shadow:var(--bal-focus-shadow-inset) !important}}@media (hover: hover)and (pointer: fine){.bal-tabs__nav__item.bal-focused.bal-tabs__nav__item--inverted{-webkit-box-shadow:var(--bal-focus-shadow-inverted-inset) !important;box-shadow:var(--bal-focus-shadow-inverted-inset) !important}}:root{--bal-tabs-tab-nav-border-background:var(--bal-color-border);--bal-tabs-tab-nav-border-background-inverted:var(--bal-color-border-inverted);--bal-tabs-tab-nav-line-background:var(--bal-color-border-primary);--bal-tabs-tab-nav-line-background-inverted:var(--bal-color-border-inverted);--bal-tabs-tab-button-radius:var(--bal-radius-normal);--bal-tabs-tab-nav-border-radius:var(--bal-radius-rounded);--bal-tabs-tab-nav-line-radius:var(--bal-radius-rounded);--bal-tabs-tab-button-label-text-color-hover:var(--bal-color-light-blue-5);--bal-tabs-tab-button-icon-text-color-hover:var(--bal-color-light-blue-5);--bal-tabs-tab-button-label-text-color-active:var(--bal-color-primary-6);--bal-tabs-tab-button-icon-text-color-active:var(--bal-color-primary-6);--bal-tabs-tab-button-label-text-color-inverted-hover:var(--bal-color-light-blue-2);--bal-tabs-tab-button-icon-text-color-inverted-hover:var(--bal-color-light-blue-2);--bal-tabs-tab-button-label-text-color-inverted-active:var(--bal-color-text-info);--bal-tabs-tab-button-icon-text-color-inverted-active:var(--bal-color-text-info);--bal-tabs-tab-label-text-color:var(--bal-color-text-primary);--bal-tabs-tab-label-text-color-disabled:var(--bal-color-text-grey);--bal-tabs-tab-label-text-color-inverted:var(--bal-color-text-white);--bal-tabs-tab-label-text-color-inverted-disabled:var(--bal-color-text-primary-light)}.bal-tabs{display:block;min-width:0}.bal-tabs--fullwidth{width:100%}.bal-tabs--vertical{display:block}@media screen and (min-width: 769px),print{.bal-tabs--vertical{display:-ms-flexbox;display:flex}}@media screen and (min-width: 769px),print{.bal-tabs--navbar{height:100%}}.bal-tab-item{width:100%;display:none}.bal-tab-item--active{display:block}.bal-tabs__tabs__content{width:100%}.bal-tabs--animated{-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-tabs--animated .bal-tabs__tabs__content{-webkit-transition:max-height var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:max-height var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-tabs--accordion .bal-tabs__tabs__content{overflow:hidden;will-change:max-height}.bal-tabs--accordion.bal-tabs--collapsing .bal-tabs__tabs__content{max-height:0 !important}.bal-tabs--accordion.bal-tabs--collapsed .bal-tabs__tabs__content{display:none}.bal-tabs--accordion.bal-tabs--expanding .bal-tabs__tabs__content{max-height:0}@media (prefers-reduced-motion: reduce){.bal-tabs--accordion .bal-tabs,.bal-tabs--accordion .bal-tabs__tabs__content{-webkit-transition:none !important;transition:none !important}}";export{C as bal_tab_item,V as bal_tabs}
|
package/dist/baloise-design-system/{p-cc4dc17721.system.entry.js → p-18fbeec32d.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function a(t){try{u(n.next(t))}catch(t){s(t)}}function o(t){try{u(n["throw"](t))}catch(t){s(t)}}function u(t){t.done?e(t.value):r(t.value).then(a,o)}u((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(t){return function(i){return u([t,i])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=i.call(t,e)}catch(t){o=[6,t];r=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-802216cd.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-8949aa8b.system.js","./p-bf139fe5.system.js","./p-4d807f18.system.js","./p-6e5745c8.system.js","./p-579855c6.system.js","./p-ee3c7a38.system.js","./p-d97dc6a8.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-145d5c4e.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js"],(function(t){"use strict";var i,e,n,r,s,a,o,u,c,h,f,d,l,p,v,b,_,y,g,m;return{setters:[function(t){i=t.r;e=t.c;n=t.h;r=t.H;s=t.g},function(t){a=t._;o=t.a},function(t){u=t.B;c=t.i},function(t){h=t.B},function(t){f=t.L},function(t){d=t.i},function(t){l=t.s},function(t){p=t.o},function(t){v=t.d},function(t){b=t.b},function(t){_=t.L},function(t){y=t.d},function(t){g=t.d},function(t){m=t.L},function(){},function(){},function(){}],execute:function(){var w=":root{--bal-date-popup-z-index:var(--bal-z-index-tooltip);--bal-date-popup-shadow:var(--bal-shadow-normal);--bal-date-popup-radius:var(--bal-radius-normal)}:root{--bal-z-index-tooltip:1300}.bal-date{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-date__icon--clickable{cursor:pointer}.bal-date__popup{display:none;width:-webkit-max-content;width:-moz-max-content;width:max-content;position:absolute;top:0;left:0;z-index:var(--bal-date-popup-z-index);-webkit-box-shadow:var(--bal-date-popup-shadow);box-shadow:var(--bal-date-popup-shadow);border-radius:var(--bal-date-popup-radius)}.bal-date__popup--visible{display:block}";var j=w;var k=t("bal_date",function(){function t(t){var n=this;i(this,t);this.balInput=e(this,"balInput",7);this.balChange=e(this,"balChange",7);this.balWillAnimate=e(this,"balWillAnimate",7);this.balDidAnimate=e(this,"balDidAnimate",7);this.balBlur=e(this,"balBlur",7);this.balFocus=e(this,"balFocus",7);this.balInputClick=e(this,"balInputClick",7);this.balIconClick=e(this,"balIconClick",7);this.balPopoverPrepare=e(this,"balPopoverPrepare",7);this.inputId="bal-da-".concat(x++);this.inheritedAttributes={};this.onIconClick=function(t){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.triggerIcon)return[3,2];return[4,this.toggle()];case 1:t.sent();return[3,4];case 2:return[4,this.open()];case 3:t.sent();t.label=4;case 4:return[2]}}))}))};this.onInputClick=function(t){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!!this.triggerIcon)return[3,2];return[4,this.open()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};this.onCalendarChange=function(t){l(t);n.value=t.detail;n.balChange.emit(n.value);if(n.closeOnSelect){n.close()}};this.onInputInput=function(t){l(t);n.balInput.emit(t.detail);if(t.detail){var i=u.fromAnyFormat(t.detail);if(i.isValid){n.calendarValue=i.toISODate()}}};this.onInputChange=function(t){l(t);n.value=t.detail;n.balChange.emit(n.value)};this.onInputFocus=function(t){l(t);n.balFocus.emit(t.detail)};this.onInputBlur=function(t){l(t);n.balBlur.emit(t.detail)};this.onKeyPress=function(t){return __awaiter(n,[t],void 0,(function(t){var i=t.detail;return __generator(this,(function(t){switch(t.label){case 0:if(!(y(i)&&!this.triggerIcon))return[3,4];if(!this.isExpanded)return[3,2];return[4,this.close()];case 1:t.sent();return[3,4];case 2:return[4,this.open()];case 3:t.sent();t.label=4;case 4:return[2]}}))}))};this.isExpanded=false;this.language=g.language;this.calendarValue=undefined;this.ariaForm=v;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.freeSolo=false;this.placeholder=undefined;this.triggerIcon=false;this.closeOnSelect=true;this.autocomplete="off";this.value=undefined;this.min=undefined;this.max=undefined;this.minYearProp=undefined;this.maxYearProp=undefined;this.defaultDate=undefined;this.allowedDates=undefined;this.allowInvalidValue=false;this.debounce=0;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(){this.calendarValue=this.value};t.prototype.debounceChanged=function(){this.balChange=p(this.balChange,this.debounce)};t.prototype.connectedCallback=function(){this.valueChanged()};t.prototype.componentWillLoad=function(){this.inheritedAttributes=d(this.el,["aria-label","tabindex","title"])};t.prototype.listenToKeydown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.isExpanded&&(t.key==="Escape"||t.key==="Esc")))return[3,2];t.preventDefault();return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnKeyup=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(t.key==="Tab"&&!this.el.contains(document.activeElement)&&this.isExpanded))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnclick=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.isExpanded&&!this.el.contains(t.target)))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnPopoverPrepare=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.inputId!==t.detail))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.language=t.language;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.expand()]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.collapse()]}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.isExpanded){return[2,this.collapse()]}else{return[2,this.expand()]}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=u.fromISO(t);if(i.isValid){this.value=i.toISODate();this.calendarValue=this.value}return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.inputEl)===null||t===void 0?void 0:t.setFocus();return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.inputEl)===null||t===void 0?void 0:t.setBlur();return[2]}))}))};t.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){return[2,(t=this.inputEl)===null||t===void 0?void 0:t.getInputElement()]}))}))};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){this.ariaForm=Object.assign({},t);(i=this.inputEl)===null||i===void 0?void 0:i.setAriaForm(t);return[2]}))}))};t.prototype.expand=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(e){switch(e.label){case 0:if(!(this.referenceEl&&this.floatingEl))return[3,2];return[4,b.load()];case 1:t=e.sent();this.balPopoverPrepare.emit(this.inputId);this.balWillAnimate.emit();this.isExpanded=true;this.popupCleanup=t.autoUpdate(this.referenceEl,this.floatingEl,(function(){i.updatePosition(i.referenceEl,i.floatingEl)}));e.label=2;case 2:return[2,this.isExpanded]}}))}))};t.prototype.collapse=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.floatingEl){this.balWillAnimate.emit();this.isExpanded=false;if(this.popupCleanup){this.popupCleanup()}this.balDidAnimate.emit()}return[2,this.isExpanded]}))}))};t.prototype.updatePosition=function(t,i){return __awaiter(this,void 0,void 0,(function(){var e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:return[4,b.load()];case 1:e=r.sent();e.computePosition(t,i,{placement:"bottom-start",middleware:[e.offset(4),e.flip({crossAxis:false})]}).then((function(t){var e=t.x,r=t.y;Object.assign(i.style,{left:"".concat(e,"px"),top:"".concat(r,"px")});n.balDidAnimate.emit()}));return[2]}}))}))};t.prototype.render=function(){var t=this;var i=h.block("date");var e=i.element("icon");var s=i.element("popup");return n(r,{key:"71ecc523323aea5b610663af71761730cafdf72d",id:this.inputId,class:Object.assign({},i.class())},n("bal-input-group",{key:"fac9940b61f22766e728f2025491f1d743b65a04",invalid:this.invalid,readonly:this.readonly,disabled:this.disabled,ref:function(i){return t.referenceEl=i}},n("bal-input-date",Object.assign({key:"9ff8ef04e188c3492419029967aedbb47f6cd80d",name:this.name,required:this.required,placeholder:this.placeholder,value:this.value,min:this.min,max:this.max,invalid:this.invalid,readonly:this.readonly,disabled:this.disabled,allowInvalidValue:this.allowInvalidValue,autocomplete:this.autocomplete,onClick:this.onInputClick,onBalInput:this.onInputInput,onBalChange:this.onInputChange,onBalFocus:this.onInputFocus,onBalBlur:this.onInputBlur,onBalKeyPress:this.onKeyPress,ref:function(i){return t.inputEl=i}},this.inheritedAttributes)),!this.freeSolo?n("bal-icon",{name:"date",role:"button",tabindex:-1,class:Object.assign(Object.assign({},e.class()),e.modifier("clickable").class(!this.disabled&&!this.readonly)),"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",onClick:this.onIconClick,"aria-label":c[this.language].toggleDatepicker,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false"}):""),n("div",{key:"a693f4ce01308178268a00e31ef08a052d1972b2",role:"dialog",class:Object.assign(Object.assign({},s.class()),s.modifier("visible").class(this.isExpanded)),ref:function(i){return t.floatingEl=i},"aria-hidden":"".concat(this.isExpanded!==true),"aria-presented":"".concat(this.isExpanded===true)},n("bal-date-calendar",{key:"8ac00879f736c54cb7662cd9811c44cdc80859ff",value:this.calendarValue,min:this.min,max:this.max,minYearProp:this.minYearProp,maxYearProp:this.maxYearProp,defaultDate:this.defaultDate,allowedDates:this.allowedDates,onBalChange:this.onCalendarChange})))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],debounce:["debounceChanged"]}},enumerable:false,configurable:true});return t}());a([f("bal-date"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],k.prototype,"createLogger",null);a([_("keydown",{target:"window"}),o("design:type",Function),o("design:paramtypes",[KeyboardEvent]),o("design:returntype",Promise)],k.prototype,"listenToKeydown",null);a([_("keyup",{target:"window"}),o("design:type",Function),o("design:paramtypes",[KeyboardEvent]),o("design:returntype",Promise)],k.prototype,"listenOnKeyup",null);a([_("click",{target:"document"}),o("design:type",Function),o("design:paramtypes",[UIEvent]),o("design:returntype",Promise)],k.prototype,"listenOnclick",null);a([_("balPopoverPrepare",{target:"document"}),o("design:type",Function),o("design:paramtypes",[CustomEvent]),o("design:returntype",Promise)],k.prototype,"listenOnPopoverPrepare",null);a([m(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],k.prototype,"configChanged",null);var x=0;k.style=j}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function a(t){try{u(n.next(t))}catch(t){s(t)}}function o(t){try{u(n["throw"](t))}catch(t){s(t)}}function u(t){t.done?e(t.value):r(t.value).then(a,o)}u((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(t){return function(i){return u([t,i])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=i.call(t,e)}catch(t){o=[6,t];r=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-802216cd.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-8949aa8b.system.js","./p-bf139fe5.system.js","./p-4d807f18.system.js","./p-6e5745c8.system.js","./p-579855c6.system.js","./p-ee3c7a38.system.js","./p-d97dc6a8.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-145d5c4e.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js"],(function(t){"use strict";var i,e,n,r,s,a,o,u,c,h,f,d,l,p,v,b,_,y,g,m;return{setters:[function(t){i=t.r;e=t.c;n=t.h;r=t.H;s=t.g},function(t){a=t._;o=t.a},function(t){u=t.B;c=t.i},function(t){h=t.B},function(t){f=t.L},function(t){d=t.i},function(t){l=t.s},function(t){p=t.o},function(t){v=t.d},function(t){b=t.b},function(t){_=t.L},function(t){y=t.d},function(t){g=t.d},function(t){m=t.L},function(){},function(){},function(){}],execute:function(){var w=":root{--bal-date-popup-z-index:var(--bal-z-index-tooltip);--bal-date-popup-shadow:var(--bal-shadow-normal);--bal-date-popup-radius:var(--bal-radius-normal)}:root{--bal-z-index-tooltip:1300}.bal-date{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-date__icon--clickable{cursor:pointer}.bal-date__popup{display:none;width:-webkit-max-content;width:-moz-max-content;width:max-content;position:absolute;top:0;left:0;z-index:var(--bal-date-popup-z-index);-webkit-box-shadow:var(--bal-date-popup-shadow);box-shadow:var(--bal-date-popup-shadow);border-radius:var(--bal-date-popup-radius)}.bal-date__popup--visible{display:block}";var j=w;var k=t("bal_date",function(){function t(t){var n=this;i(this,t);this.balInput=e(this,"balInput",7);this.balChange=e(this,"balChange",7);this.balWillAnimate=e(this,"balWillAnimate",7);this.balDidAnimate=e(this,"balDidAnimate",7);this.balBlur=e(this,"balBlur",7);this.balFocus=e(this,"balFocus",7);this.balInputClick=e(this,"balInputClick",7);this.balIconClick=e(this,"balIconClick",7);this.balPopoverPrepare=e(this,"balPopoverPrepare",7);this.inputId="bal-da-".concat(x++);this.inheritedAttributes={};this.onIconClick=function(t){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.triggerIcon)return[3,2];return[4,this.toggle()];case 1:t.sent();return[3,4];case 2:return[4,this.open()];case 3:t.sent();t.label=4;case 4:return[2]}}))}))};this.onInputClick=function(t){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!!this.triggerIcon)return[3,2];return[4,this.open()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};this.onCalendarChange=function(t){l(t);n.value=t.detail;n.balChange.emit(n.value);if(n.closeOnSelect){n.close()}};this.onInputInput=function(t){l(t);n.balInput.emit(t.detail);if(t.detail){var i=u.fromAnyFormat(t.detail);if(i.isValid){n.calendarValue=i.toISODate()}}};this.onInputChange=function(t){l(t);n.value=t.detail;n.balChange.emit(n.value)};this.onInputFocus=function(t){l(t);n.balFocus.emit(t.detail)};this.onInputBlur=function(t){l(t);n.balBlur.emit(t.detail)};this.onKeyPress=function(t){return __awaiter(n,[t],void 0,(function(t){var i=t.detail;return __generator(this,(function(t){switch(t.label){case 0:if(!(y(i)&&!this.triggerIcon))return[3,4];if(!this.isExpanded)return[3,2];return[4,this.close()];case 1:t.sent();return[3,4];case 2:return[4,this.open()];case 3:t.sent();t.label=4;case 4:return[2]}}))}))};this.isExpanded=false;this.language=g.language;this.calendarValue=undefined;this.ariaForm=v;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.freeSolo=false;this.placeholder=undefined;this.triggerIcon=false;this.closeOnSelect=true;this.autocomplete="off";this.value=undefined;this.min=undefined;this.max=undefined;this.minYearProp=undefined;this.maxYearProp=undefined;this.defaultDate=undefined;this.allowedDates=undefined;this.allowInvalidValue=false;this.debounce=0;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(){this.calendarValue=this.value};t.prototype.debounceChanged=function(){this.balChange=p(this.balChange,this.debounce)};t.prototype.connectedCallback=function(){this.valueChanged()};t.prototype.componentWillLoad=function(){this.inheritedAttributes=d(this.el,["aria-label","tabindex","title"])};t.prototype.listenToKeydown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.isExpanded&&(t.key==="Escape"||t.key==="Esc")))return[3,2];t.preventDefault();return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnKeyup=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(t.key==="Tab"&&!this.el.contains(document.activeElement)&&this.isExpanded))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnclick=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.isExpanded&&!this.el.contains(t.target)))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.listenOnPopoverPrepare=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!(this.inputId!==t.detail))return[3,2];return[4,this.close()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.language=t.language;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.expand()]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.collapse()]}))}))};t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.isExpanded){return[2,this.collapse()]}else{return[2,this.expand()]}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){i=u.fromISO(t);if(i.isValid){this.value=i.toISODate();this.calendarValue=this.value}return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.inputEl)===null||t===void 0?void 0:t.setFocus();return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.inputEl)===null||t===void 0?void 0:t.setBlur();return[2]}))}))};t.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){return[2,(t=this.inputEl)===null||t===void 0?void 0:t.getInputElement()]}))}))};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(e){this.ariaForm=Object.assign({},t);(i=this.inputEl)===null||i===void 0?void 0:i.setAriaForm(t);return[2]}))}))};t.prototype.expand=function(){return __awaiter(this,void 0,void 0,(function(){var t;var i=this;return __generator(this,(function(e){switch(e.label){case 0:if(!(this.referenceEl&&this.floatingEl))return[3,2];return[4,b.load()];case 1:t=e.sent();this.balPopoverPrepare.emit(this.inputId);this.balWillAnimate.emit();this.isExpanded=true;this.popupCleanup=t.autoUpdate(this.referenceEl,this.floatingEl,(function(){i.updatePosition(i.referenceEl,i.floatingEl)}));e.label=2;case 2:return[2,this.isExpanded]}}))}))};t.prototype.collapse=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.floatingEl){this.balWillAnimate.emit();this.isExpanded=false;if(this.popupCleanup){this.popupCleanup()}this.balDidAnimate.emit()}return[2,this.isExpanded]}))}))};t.prototype.updatePosition=function(t,i){return __awaiter(this,void 0,void 0,(function(){var e;var n=this;return __generator(this,(function(r){switch(r.label){case 0:return[4,b.load()];case 1:e=r.sent();e.computePosition(t,i,{placement:"bottom-start",middleware:[e.offset(4),e.flip({crossAxis:false})]}).then((function(t){var e=t.x,r=t.y;Object.assign(i.style,{left:"".concat(e,"px"),top:"".concat(r,"px")});n.balDidAnimate.emit()}));return[2]}}))}))};t.prototype.render=function(){var t=this;var i=h.block("date");var e=i.element("icon");var s=i.element("popup");return n(r,{key:"0cff526d6fd1f6855de72ec6b8515a0cd7132f71",id:this.inputId,class:Object.assign({},i.class())},n("bal-input-group",{key:"e7309e15124f27a90a977cccb8ee7b03052ce450",invalid:this.invalid,readonly:this.readonly,disabled:this.disabled,ref:function(i){return t.referenceEl=i}},n("bal-input-date",Object.assign({key:"6e344882e69619d3cc26bdb29601f417de5cf4fe",name:this.name,required:this.required,placeholder:this.placeholder,value:this.value,min:this.min,max:this.max,invalid:this.invalid,readonly:this.readonly,disabled:this.disabled,allowInvalidValue:this.allowInvalidValue,autocomplete:this.autocomplete,onClick:this.onInputClick,onBalInput:this.onInputInput,onBalChange:this.onInputChange,onBalFocus:this.onInputFocus,onBalBlur:this.onInputBlur,onBalKeyPress:this.onKeyPress,ref:function(i){return t.inputEl=i}},this.inheritedAttributes)),!this.freeSolo?n("bal-icon",{name:"date",role:"button",tabindex:-1,class:Object.assign(Object.assign({},e.class()),e.modifier("clickable").class(!this.disabled&&!this.readonly)),"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",onClick:this.onIconClick,"aria-label":c[this.language].toggleDatepicker,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false"}):""),n("div",{key:"4de1fda8322aa577c9f178f8183f0584591bb280",role:"dialog",class:Object.assign(Object.assign({},s.class()),s.modifier("visible").class(this.isExpanded)),ref:function(i){return t.floatingEl=i},"aria-hidden":"".concat(this.isExpanded!==true),"aria-presented":"".concat(this.isExpanded===true)},n("bal-date-calendar",{key:"c29fae49306412def5c835457c17224f93d4144d",value:this.calendarValue,min:this.min,max:this.max,minYearProp:this.minYearProp,maxYearProp:this.maxYearProp,defaultDate:this.defaultDate,allowedDates:this.allowedDates,onBalChange:this.onCalendarChange})))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],debounce:["debounceChanged"]}},enumerable:false,configurable:true});return t}());a([f("bal-date"),o("design:type",Function),o("design:paramtypes",[Function]),o("design:returntype",void 0)],k.prototype,"createLogger",null);a([_("keydown",{target:"window"}),o("design:type",Function),o("design:paramtypes",[KeyboardEvent]),o("design:returntype",Promise)],k.prototype,"listenToKeydown",null);a([_("keyup",{target:"window"}),o("design:type",Function),o("design:paramtypes",[KeyboardEvent]),o("design:returntype",Promise)],k.prototype,"listenOnKeyup",null);a([_("click",{target:"document"}),o("design:type",Function),o("design:paramtypes",[UIEvent]),o("design:returntype",Promise)],k.prototype,"listenOnclick",null);a([_("balPopoverPrepare",{target:"document"}),o("design:type",Function),o("design:paramtypes",[CustomEvent]),o("design:returntype",Promise)],k.prototype,"listenOnPopoverPrepare",null);a([m(),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],k.prototype,"configChanged",null);var x=0;k.style=j}}}));
|
package/dist/baloise-design-system/{p-aebb3198c4.system.entry.js → p-1cb1fb71d4.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o["throw"](e))}catch(e){r(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,s)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-6b45db53.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-23bdd8dc.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js"],(function(e){"use strict";var t,n,o,i,r,a,s,c,u,l;return{setters:[function(e){t=e.r;n=e.h;o=e.H;i=e.g},function(e){r=e._;a=e.a},function(e){s=e.B},function(e){c=e.i},function(e){u=e.d},function(e){l=e.L},function(){},function(){},function(){},function(){}],execute:function(){var b="@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active),.bal-close__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-close-background:transparent;--bal-close-background-focus-visible:var(--bal-form-field-control-background);--bal-close-background-focus-inverted-focus-visible:var(--bal-form-field-control-background);--bal-close-border-radius:var(--bal-radius-rounded)}.bal-close{position:static;display:inline-block}.bal-close__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:var(--bal-close-background);border:none;border-radius:var(--bal-close-border-radius);cursor:pointer;pointer-events:auto;display:inline-block;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;outline:none;position:relative;vertical-align:top;padding:.313rem}@media (hover: hover)and (pointer: fine){.bal-close__button:hover{background:rgba(0,7,57,.1)}}@media (hover: hover)and (pointer: fine){.bal-close__button:focus-visible:not(:active){background:var(--bal-close-background-focus-visible)}}.bal-close__button:active{background:rgba(0,7,57,.3)}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:hover{background:rgba(255,255,255,.3)}}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active){background:var(--bal-close-background-focus-inverted-focus-visible)}}.bal-close__button--inverted:active{background:rgba(255,255,255,.5)}.bal-close__button--size-small{padding:.25rem}.bal-close__button--size-medium{padding:.531rem}";var f=b;var d=e("bal_close",function(){function e(e){t(this,e);this.language=u.language;this.region=u.region;this.size="";this.inverted=false}e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=e.language;this.region=e.region;return[2]}))}))};e.prototype.render=function(){var e=s.block("close");var t=e.element("button");var i=t.element("icon");var r=c[this.language].close;return n(o,{key:"
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o["throw"](e))}catch(e){r(e)}}function c(e){e.done?n(e.value):i(e.value).then(a,s)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-db0895e2.system.js","./p-6b45db53.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-23bdd8dc.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-145d5c4e.system.js"],(function(e){"use strict";var t,n,o,i,r,a,s,c,u,l;return{setters:[function(e){t=e.r;n=e.h;o=e.H;i=e.g},function(e){r=e._;a=e.a},function(e){s=e.B},function(e){c=e.i},function(e){u=e.d},function(e){l=e.L},function(){},function(){},function(){},function(){}],execute:function(){var b="@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active),.bal-close__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-close-background:transparent;--bal-close-background-focus-visible:var(--bal-form-field-control-background);--bal-close-background-focus-inverted-focus-visible:var(--bal-form-field-control-background);--bal-close-border-radius:var(--bal-radius-rounded)}.bal-close{position:static;display:inline-block}.bal-close__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:var(--bal-close-background);border:none;border-radius:var(--bal-close-border-radius);cursor:pointer;pointer-events:auto;display:inline-block;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;outline:none;position:relative;vertical-align:top;padding:.313rem}@media (hover: hover)and (pointer: fine){.bal-close__button:hover{background:rgba(0,7,57,.1)}}@media (hover: hover)and (pointer: fine){.bal-close__button:focus-visible:not(:active){background:var(--bal-close-background-focus-visible)}}.bal-close__button:active{background:rgba(0,7,57,.3)}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:hover{background:rgba(255,255,255,.3)}}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active){background:var(--bal-close-background-focus-inverted-focus-visible)}}.bal-close__button--inverted:active{background:rgba(255,255,255,.5)}.bal-close__button--size-small{padding:.25rem}.bal-close__button--size-medium{padding:.531rem}";var f=b;var d=e("bal_close",function(){function e(e){t(this,e);this.language=u.language;this.region=u.region;this.size="";this.inverted=false}e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=e.language;this.region=e.region;return[2]}))}))};e.prototype.render=function(){var e=s.block("close");var t=e.element("button");var i=t.element("icon");var r=c[this.language].close;return n(o,{key:"9ae168e3f5e98e623d888abab7cbc88a6274cde0",class:Object.assign({},e.class())},n("button",{key:"7969304603871177f81ef7a1b1c78e58f1d32c38",type:"button","aria-label":r,title:r,tabindex:"0",class:Object.assign(Object.assign(Object.assign({},t.class()),t.modifier("inverted").class(this.inverted)),t.modifier("size-".concat(this.size)).class(this.size!=="")),"data-testid":"bal-close"},n("bal-icon",{key:"c83093000ff43d5f99676914a52ef4c8977fb61c",name:"close",size:this.size==="small"?"x-small":this.size==="medium"?"medium":"small",inverted:this.inverted,class:Object.assign({},i.class())})))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());r([l(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],d.prototype,"configChanged",null);d.style=f}}}));
|
package/dist/baloise-design-system/{p-c045d5a57c.system.entry.js → p-20d7a74311.system.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,i,n){function a(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{o(n.next(t))}catch(t){r(t)}}function l(t){try{o(n["throw"](t))}catch(t){r(t)}}function o(t){t.done?i(t.value):a(t.value).then(s,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return o([t,e])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(n=1,a&&(r=l[0]&2?a["return"]:l[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,l[1])).done)return r;if(a=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;a=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t];a=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,a=e.length,r;n<a;n++){if(r||!(n in e)){if(!r)r=Array.prototype.slice.call(e,0,n);r[n]=e[n]}}return t.concat(r||Array.prototype.slice.call(e))};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-fa6b5cde.system.js","./p-6913b916.system.js","./p-802216cd.system.js","./p-23bdd8dc.system.js","./p-4d807f18.system.js","./p-db0895e2.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-d1ec4d6e.system.js","./p-8949aa8b.system.js","./p-bf139fe5.system.js","./p-6e5745c8.system.js","./p-ee3c7a38.system.js","./p-ba579059.system.js","./p-5f26e92f.system.js","./p-2880433e.system.js","./p-145d5c4e.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-a898208e.system.js","./p-ec9a7cf5.system.js","./p-eecefb0a.system.js"],(function(t){"use strict";var e,i,n,a,r,s,l,o,u,c,d,f,h,b,v,_,m,g,p,y,w,x,j,k,O,C,D;return{setters:[function(t){e=t.h;i=t.r;n=t.c;a=t.H;r=t.g},function(t){s=t._;l=t.a},function(t){o=t.l},function(t){u=t.l},function(t){c=t.B;d=t.i;f=t.d},function(t){h=t.L},function(t){b=t.b;v=t.p},function(t){_=t.B},function(t){m=t.d},function(t){g=t.L},function(t){p=t.L},function(t){y=t.i},function(t){w=t.m;x=t.c;j=t.d},function(t){k=t.d},function(t){O=t.L},function(t){C=t.N},function(t){D=t.I},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){function z(t,e){if(e<1||t<0){return undefined}return new Date(t,e,0).getDate()}function A(t,e,i){return"".concat(i,"-").concat(o("".concat(e),2,"0"),"-").concat(o("".concat(t),2,"0"))}function M(){var t=new Date;return"".concat(t.getFullYear(),"-").concat(o("".concat(t.getMonth()+1),2,"0"),"-").concat(o("".concat(t.getDate()),2,"0"))}function P(t,e,i,n,a){var r=[];var s=z(t,e);var l=L(t,e);if(s!==undefined&&l){var o=M();var d=c.fromISO(i);var f=c.fromISO(n);var h=function(t){if(u(a)){return false}return!a(t)};for(var b=1;b<=s;b++){var v=A(b,e,t);r.push({day:b,month:e,year:t,isoDate:v,fullDate:c.fromISO(v).toFormat(),today:o===v,disabled:d.isAfter(v)||f.isBefore(v)||h(v)})}}return r}function S(t,e){if(e<1||t<0){return 1}var i=new Date(t,e-1,1);var n=i.getDay();return n===0?7:n}function K(t){if(["en","de","fr","it","nl","es","pl","pt","sv","fi"].includes(t)){return t}return"de"}function V(t,e,i){var n=[];var a=new Date;var r=a.getFullYear();for(var s=e;s<=i;s++){n.push({value:s,label:"".concat(s),disabled:false,today:r===s,selected:t===s})}return n}function F(t,e,i,n,a){var r=K(t);var s=c.infoMonths({format:"long",locale:r});var l=c.fromISO(i);var o=new Date;var u=o.getFullYear();var d=o.getMonth()+1;var f=0;if(n&&e!==undefined){var h=c.fromISO(n);if(h.isValid){if(e>h.year){f=0}else{f=h.month||f}}}var b=12;if(a&&e!==undefined){var v=c.fromISO(a);if(v.isValid){if(e<v.year){b=12}else{b=v.month||b}}}return s.map((function(t,i){var n=i+1;return{label:t,value:n,today:n===d&&e===u,selected:n===l.month&&e===l.year,disabled:n<f||n>b}}))}function I(t){var e=K(t);var i=c.infoWeekdays({format:"short",locale:e});var n=c.infoWeekdays({format:"long",locale:e});return i.map((function(t,e){return{ariaLabel:n[e],textContent:t}}))}function L(t,e){if(e<1||e>12||t<0){return undefined}return new Date(t,e-1,1)}var T=function(t){var i=t.name,n=t.isVisible,a=t.girdHeight,r=t.list,s=t.onSelect,l=t.ref;var o=_.block("date-calendar");var u=o.element("body");var c=u.element("list");return e("ul",{class:Object.assign(Object.assign(Object.assign({},c.class()),c.modifier(i).class()),c.modifier("visible").class(n)),"aria-hidden":n?"false":"true",style:{height:"".concat(a-2-8-8,"px")},ref:function(t){return l?l(t):undefined}},r.map((function(t){return e("li",{key:t.value,id:"".concat(i,"-").concat(t.value)},e("button",{class:Object.assign(Object.assign(Object.assign(Object.assign({},c.element("item").class()),c.element("item").modifier("today").class(t.today)),c.element("item").modifier("selected").class(t.selected)),c.element("item").modifier("disabled").class(t.disabled)),disabled:t.disabled,tabIndex:-1,onClick:function(){if(!t.disabled){s(t)}}},t.label))})))};var E=function(t){var i=t.isVisible,n=t.ref,a=t.grid,r=t.weekdays,s=t.selectedDate,l=t.firstDayOfWeek,o=t.onSelectDay;var u=_.block("date-calendar");var c=u.element("body");var d=c.element("grid");return e("div",{role:"grid",class:Object.assign(Object.assign({},d.class()),d.modifier("visible").class(i)),"aria-hidden":i?"false":"true",ref:function(t){return n(t)}},e("div",{role:"row",class:Object.assign({},d.element("head").class())},r.map((function(t){return e("span",{key:t.textContent,role:"columnheader","aria-label":t.ariaLabel,title:t.ariaLabel},t.textContent)}))),e("div",{role:"row",class:Object.assign({},d.element("body").class()),style:{"--bal-date-first-week-day":"".concat(l)}},a.map((function(t){return e("bal-date-calendar-cell",Object.assign({key:t.isoDate},t,{selected:t.isoDate===s,onBalSelectDay:function(t){var e=t.detail;return o(e)}}))}))))};var H=function(t){var i=t.language,n=t.onClickSelectMonthAndYear,a=t.monthFullNames,r=t.month,s=t.year,l=t.isCalendarVisible,o=t.isListVisible,u=t.onClickPreviousMonth,c=t.onClickNextMonth;var f=_.block("date-calendar");var h=f.element("nav");var b=d[i].nextMonth;var v=d[i].previousMonth;var m=d[i].selectMonth;return e("div",{class:Object.assign({},h.class())},e("div",{class:Object.assign({},h.modifier("start").class())},e("button",{title:m,"aria-label":m,tabIndex:-1,"data-test":"change-year-month",onClick:n},e("span",null,a[r-1]," ",s),e("bal-icon",{name:"caret-up",color:"primary",size:"small",turn:l}))),e("div",{class:Object.assign({},h.modifier("end").class()),style:{display:o?"none":"flex"}},e("button",{title:v,"aria-label":v,onClick:u,tabIndex:-1,"data-test":"previous-month"},e("bal-icon",{name:"caret-left",color:"primary",size:"small"})),e("button",{title:b,"aria-label":b,onClick:c,tabIndex:-1,"data-test":"next-month"},e("bal-icon",{name:"caret-right",color:"primary",size:"small"}))))};var N=':host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;background:var(--bal-color-white);border-radius:var(--bal-radius-normal)}.bal-date-calendar__nav{display:-ms-flexbox;display:flex;width:calc(100% - 1rem);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:.5rem;gap:.5rem}.bal-date-calendar__nav--start>button{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav--end{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;min-height:2rem;min-width:2rem;padding:.25rem;border-radius:var(--bal-button-radius);font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__nav button--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__nav button--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body{display:block}.bal-date-calendar__body__grid{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:.5rem;height:0;padding-top:0;padding-bottom:0;visibility:hidden}.bal-date-calendar__body__grid--visible{height:auto;padding-top:.5rem;padding-bottom:.5rem;visibility:visible}.bal-date-calendar__body__grid__head{position:relative;display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-date-calendar__body__grid__head::after{position:absolute;content:"";height:2px;width:calc(100% + 1rem);bottom:0;left:-0.5rem;right:-0.5rem;background:var(--bal-color-border)}.bal-date-calendar__body__grid__head span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:2rem;width:2rem;font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold);font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-wrap:nowrap}.bal-date-calendar__body__grid__body{display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:.5rem}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell{width:2rem;height:2rem;text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell:first-child{grid-column:var(--bal-date-first-week-day)}.bal-date-calendar__body__list{display:none;list-style:none;margin:0;padding:0;-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:calc(100% - 1rem);overflow-y:auto;max-height:18rem;position:relative;padding:.5rem;border-top:2px solid var(--bal-color-border)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:100%}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body__list--visible{display:grid}.bal-date-calendar__body__list--year{grid-template-columns:repeat(4, 1fr)}.bal-date-calendar__body__list--month{grid-template-columns:repeat(2, 1fr)}.bal-date-calendar-cell{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:2rem;height:2rem}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar-cell--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar-cell--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}';var R=N;var Y=t("bal_date_calendar",function(){function t(t){var e=this;i(this,t);this.balChange=n(this,"balChange",7);this.oldMin="";this.oldMax="";this.onSelectDay=function(t){e.valueChanged(t,e.selectedDate);e.balChange.emit(e.selectedDate)};this.onClickNextMonth=function(){var t=e.year;var i=e.month+1;if(i>12){i=1;t=t+1}e.generateGridByMonthAndYear(i,t)};this.onClickPreviousMonth=function(){var t=e.year;var i=e.month-1;if(i<1){i=12;t=t-1}e.generateGridByMonthAndYear(i,t)};this.onClickSelectMonthAndYear=function(){return __awaiter(e,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.updateSelections();if(!(this.isCalendarVisible===true))return[3,2];this.isCalendarVisible=false;this.isYearListVisible=true;this.isMonthListVisible=false;return[4,b()];case 1:i.sent();if(this.yearListEl){t=this.yearListEl.querySelector("#year-".concat(this.year));if(t){e=26+8+4;this.yearListEl.scrollTop=t.offsetTop-e*2}else{this.yearListEl.scrollTop=0}}return[3,3];case 2:this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;i.label=3;case 3:return[2]}}))}))};this.onClickYear=function(t){e.isYearListVisible=false;e.isMonthListVisible=true;e.generateGridByMonthAndYear(e.month,t);e.months=F(e.language,t,e.selectedDate,e.min,e.max)};this.onClickMonth=function(t){e.isYearListVisible=false;e.isMonthListVisible=false;e.isCalendarVisible=true;e.generateGridByMonthAndYear(t,e.year)};this.selectedDate="";this.monthFullNames=[];this.weekdays=[];this.months=[];this.years=[];this.calendarGrid=[];this.firstDayOfWeek=0;this.month=0;this.year=0;this.language=m.language;this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;this.value=undefined;this.defaultDate=undefined;this.allowedDates=undefined;this.min=undefined;this.max=undefined;this.minYearProp=undefined;this.maxYearProp=undefined}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){if(t!==e){var i=c.fromISO(t);if(!i.isValid){this.generateGridByDefaultDate();this.selectedDate=""}else{this.generateGridByDate(i);this.selectedDate=i.toISODate()}this.updateSelections()}};t.prototype.rangePropChanged=function(){this.updateSelections();this.generateGrid()};t.prototype.yearRangePropChanged=function(){this.updateSelections()};t.prototype.connectedCallback=function(){this.generateGridByDefaultDate();this.valueChanged(this.value,undefined)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.monthFullNames=c.infoMonths({format:"long",locale:this.language});this.weekdays=I(this.language);this.updateSelections();return[2]}))}))};t.prototype.swipeListener=function(t){var e=t.left,i=t.right;if(e){this.onClickNextMonth()}else if(i){this.onClickPreviousMonth()}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.minYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e-100;if(this.min){var n=c.fromISO(this.min);return n.year||i}else{return i}}return this.minYearProp},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.maxYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e+50;if(this.max){var n=c.fromISO(this.max);return n.year||i}else{return i}}return this.maxYearProp},enumerable:false,configurable:true});t.prototype.updateSelections=function(){this.years=V(this.year,this.minYear,this.maxYear);this.months=F(this.language,this.year,this.selectedDate,this.min,this.max)};t.prototype.generateGrid=function(){var t=c.fromISO(this.value);if(t.isValid){this.generateGridByDate(t)}else{this.generateGridByDefaultDate()}};t.prototype.generateGridByDate=function(t){if(t.year!==undefined&&t.month!==undefined){this.generateGridByMonthAndYear(t.month,t.year)}};t.prototype.generateGridByDefaultDate=function(){var t=c.fromISO(this.defaultDate);if(t.isValid){this.generateGridByDate(t)}else{var e=new Date;this.month=e.getMonth()+1;this.year=e.getFullYear();this.calendarGrid=P(this.year,this.month,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(this.year,this.month)}};t.prototype.generateGridByMonthAndYear=function(t,e){if(this.month!==t||this.year!==e||this.oldMin!==this.min||this.oldMax!==this.max){this.calendarGrid=P(e,t,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(e,t)}this.month=t;this.year=e;this.oldMin=this.min;this.oldMax=this.max};t.prototype.render=function(){var t=this;var i;var n=((i=this.gridEl)===null||i===void 0?void 0:i.clientHeight)||0;var r=_.block("date-calendar");var s=r.element("body");var l=r.element("foot");return e(a,{key:"248e291f860cdb55eb13cce3afa9fd453efd9bb1",class:Object.assign({},r.class())},e(H,{key:"b22fb7f5d3459b29b1bc7ad10925f797964a1bf2",language:this.language,monthFullNames:this.monthFullNames,month:this.month,year:this.year,isCalendarVisible:this.isCalendarVisible,isListVisible:this.isMonthListVisible||this.isYearListVisible,onClickSelectMonthAndYear:this.onClickSelectMonthAndYear,onClickPreviousMonth:this.onClickPreviousMonth,onClickNextMonth:this.onClickNextMonth}),e("div",{key:"e7348e9fe457bd309ecf8645ae1af0138d6ea156",class:Object.assign({},s.class())},e(E,{key:"87bab404d1e8777b818c4d4df0d49092b29e96ff",isVisible:this.isCalendarVisible,grid:this.calendarGrid,weekdays:this.weekdays,firstDayOfWeek:this.firstDayOfWeek,selectedDate:this.selectedDate,ref:function(e){return t.gridEl=e},onSelectDay:function(e){return t.onSelectDay(e)}}),e(T,{key:"106142481bd53e6d24e91ef0245fe336704c0578",name:"year",isVisible:this.isYearListVisible,girdHeight:n,list:this.years,ref:function(e){return t.yearListEl=e},onSelect:function(e){return t.onClickYear(e.value)}}),e(T,{key:"9341dbb8c0f7ce5713a9cbdb5e4a22d3db83b43a",name:"month",isVisible:this.isMonthListVisible,girdHeight:n,list:this.months,onSelect:function(e){return t.onClickMonth(e.value)}})),e("div",{key:"5e74571cea6b858964554f3065eb40092535f1dd",class:Object.assign({},l.class())},e("slot",{key:"c3cc4f4f43d40b095ad03fe23a8645282e658765"})))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],min:["rangePropChanged"],max:["rangePropChanged"],minYearProp:["yearRangePropChanged"],maxYearProp:["yearRangePropChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-date-calendar"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],Y.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],Y.prototype,"configChanged",null);s([p({mobileOnly:true}),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],Y.prototype,"swipeListener",null);Y.style=R;var B=function(){function t(t){this._options=t;this._position=0;this._positionEnd=0;this._isRangeSelection=false;if(t.component&&t.component.nativeInput){this._position=t.component.nativeInput.selectionStart||0;this._positionEnd=t.component.nativeInput.selectionEnd||0;this._isRangeSelection=this._position!==this._positionEnd}}Object.defineProperty(t.prototype,"isRangeSelection",{get:function(){return this._isRangeSelection},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){if(this._options.isBackspace&&this._position>0){return this._position-1}return this._position},set:function(t){var e=t<0?0:t>this._options.mask.maxLength?this._options.mask.maxLength:t;this._position=e},enumerable:false,configurable:true});t.prototype.toStart=function(){this.value=0};t.prototype.toEnd=function(){var t=this.getTarget();if(t){this.value=t.value.length}};t.prototype.next=function(t){if(t===void 0){t=1}var e=this._position+t;if(e<=this._options.mask.maxLength){this._position=e}return this._position};t.prototype.previous=function(t){if(t===void 0){t=1}var e=this._position-t;if(e>=0){this._position=e}else{this._position=0}return this._position};t.prototype.submit=function(){var t=this.getTarget();if(t&&t.selectionStart!==this._position&&t.selectionEnd!==this._position){t.selectionStart=this._position;t.selectionEnd=this._position}};t.prototype.getTarget=function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined};return t}();var J=function(){function t(t){this._options=t;this._value="";if(this._options.component&&this._options.component.nativeInput){this._value=this._options.component.nativeInput.value}this.position=new B(this._options);this.component=this._options.component}Object.defineProperty(t.prototype,"target",{get:function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focused",{get:function(){return this._options.component.focused},enumerable:false,configurable:true});t.prototype.isValueEmpty=function(){return this.value===""||this.value===undefined||this.value===null};t.prototype.preventDefault=function(){if(this._options.event.preventDefault){this._options.event.preventDefault()}};t.prototype.stopPropagation=function(){this.preventDefault();if(this._options.event.stopPropagation){this._options.event.stopPropagation()}};t.prototype.submit=function(){return __awaiter(this,arguments,void 0,(function(t,e){if(t===void 0){t="input"}return __generator(this,(function(i){if(this.target){this.target.value=this.value;if(t!=="blur"&&t!=="tab"){this.position.submit()}if(this._options.component){if(t==="input"||t==="tab"){this._options.component.balInput.emit(this.value)}if((t==="change"||t==="blur")&&e!==undefined){if(w(this._options.component.value,e)){this._options.component.value=e;this._options.component.balChange.emit(e)}}}}return[2]}))}))};return t}();var G=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"clipboardData",{get:function(){var t;return(t=this._options.event.clipboardData)===null||t===void 0?void 0:t.getData("text")},enumerable:false,configurable:true});return e}(J);var W=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"key",{get:function(){return this._options.event.key},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCtrlOrCommandKey",{get:function(){return this._options.event.metaKey||this._options.event.ctrlKey},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBackspaceKey",{get:function(){return this._options.event.key==="Backspace"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isTabKey",{get:function(){return this._options.event.key==="Tab"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isWhiteSpaceKey",{get:function(){return this._options.event.key===" "},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDeleteKey",{get:function(){return this._options.event.key==="Delete"||this._options.event.key==="Del"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNumberKey",{get:function(){return e.NUMBER_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNavigationKey",{get:function(){return e.NAVIGATION_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSelectAllCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="a"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCopyCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="c"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isPasteCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="v"},enumerable:false,configurable:true});e.prototype.getCharAt=function(t){if(t===void 0){t=this.position.value}return this.value.charAt(t)};e.prototype.getCharAtBackspacePosition=function(){return this.getCharAt(this.position.value-1)};e.prototype.setChar=function(t,e){if(t===void 0){t=this._options.event.key}if(e===void 0){e=this.position.value}this.value=this.value.substring(0,e)+t+this.value.substring(e+1)};return e}(J);q.NUMBER_KEYS=["0","1","2","3","4","5","6","7","8","9"];q.NAVIGATION_KEYS=["Home","End","ArrowLeft","Left","ArrowRight","Right","Tab","Enter","Esc","Escape"];var U=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"locale",{get:function(){return this._options.event.locale},enumerable:false,configurable:true});return e}(J);var Q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var X=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"newValue",{get:function(){return this._options.event.newValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._options.event.oldValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"didValueChange",{get:function(){return this.newValue!==this.oldValue},enumerable:false,configurable:true});return e}(J);var Z=function(){function t(t){this._isSeparator=false;this._allowedKeys=[];this._locale="de-CH";this._from=t.from||0;this._to=t.to||0;this._isSeparator=t.isSeparator===undefined?false:t.isSeparator;this._mask=t.mask||"_";this._allowedKeys=t.allowedKeys?t.allowedKeys:this.allowedKeys;this._format=t.format}t.prototype.format=function(t){if(this._format){return this._format(t.replace(this.mask,""),this._locale,this.mask)}return t};Object.defineProperty(t.prototype,"isSeparator",{get:function(){return this._isSeparator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"to",{get:function(){return this._to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"from",{get:function(){return this._from},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"mask",{get:function(){if(typeof this._mask==="function"){return this._mask(this._locale)}return this._mask},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowedKeys",{get:function(){return this._allowedKeys},enumerable:false,configurable:true});t.prototype.onI18nChange=function(t){this._locale=t};t.prototype.getValueOfTheBlock=function(t){return t.slice(this._from,this._to)};t.prototype.isTouched=function(t){var e=this;var i=this.getValueOfTheBlock(t);return!i.split("").every((function(t){return t===e.mask}))};t.prototype.verifyAllowedKeyHits=function(t){if(this.isSeparator&&t===this.mask){return true}else if(this.allowedKeys.indexOf(t)>=0){return true}else{return false}};return t}();var $=function(){function t(t){if(t===void 0){t=[]}this._list=t}Object.defineProperty(t.prototype,"lastPosition",{get:function(){return this._list[this._list.length-1].to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"list",{get:function(){return this._list},set:function(t){this._list=t},enumerable:false,configurable:true});t.prototype.clone=function(){return new t(__spreadArray([],this._list,true))};t.prototype.findByIndex=function(t,e){if(e===void 0){e=this.list}return e.find((function(e){return e.from<=t&&t<e.to}))};t.prototype.getPlaceholderMask=function(){var t=[];this.list.forEach((function(e){var i=e.to-e.from;for(var n=0;n<i;n++){t.push(e.mask)}}));return t.join("")};t.prototype.getRawValueWithoutMaskByContext=function(t){return this.getRawValueWithoutMask(t.value)};t.prototype.getRawValueWithoutMask=function(t){if(t){var e=[];var i=t.split("");for(var n=0;n<i.length;n++){var a=i[n];var r=this.findByIndex(n);if(r&&!r.isSeparator){e.push(a.replace(r.mask,""))}else{e.push(a)}}e=e.filter((function(t){return t}));var s=this.list.filter((function(t){return t.isSeparator})).length;if(s===e.length){return""}return e.join("")}return""};t.prototype.formatBlocks=function(t,e){var i="".concat(t);for(var n=0;n<this.list.length;n++){var a=this.list[n];if(e!==n&&!a.isSeparator&&a.isTouched(i)){var r=a.getValueOfTheBlock(i);var s=a.format(r);i=i.substring(0,a.from)+s+i.substring(a.to)}}return i};t.prototype.getBlockIndexFromPosition=function(t){var e=this.list.reduce((function(t,e){return t+e.to-e.from}),0);if(t===e){return this.list.length-1}var i=this.list.findIndex((function(e){return e.from<=t&&t<e.to}));return i<0?undefined:Math.min(e,i)};t.prototype.verifyCallOfNextSeparator=function(t,e){if(this.list.length-1>e){var i=this.list[e+1];if(i.isSeparator&&i.mask===t){return true}}return false};return t}();var tt=function(){function t(t){if(t===void 0){t=[]}this.inputMode="text";this.locale="de-CH";this.blocks=new $(t)}t.prototype.onLocaleChange=function(t,e,i){if(t.target){var n=t.value;var a=n.split("");for(var r=0;r<a.length;r++){var s=a[r];var l=this.blocks.findByIndex(r);var o=i.findByIndex(r);if(l&&o){if(l.isSeparator){a[r]=l.mask}else if(s===o.mask){a[r]=l.mask}}}t.value=a.join("")}};t.prototype.onFocus=function(t){};t.prototype.onBlur=function(t){};t.prototype.onChange=function(t){t.submit("change",this.onParseValue(t.value))};t.prototype.onNavigationDown=function(t,e,i){};t.prototype.onSelectAll=function(t,e,i){};t.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";t.value=n;t.position.toEnd()};t.prototype.onBlockChange=function(t,e,i){t.setChar();t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onBackspaceDown=function(t,e,i){t.position.previous();if(!e.isSeparator){t.setChar(e.mask);var n=this.blocks.list[i-1];if(t.position.value===e.from&&n&&n.isSeparator){t.position.previous()}}};t.prototype.onDeleteDown=function(t,e,i){t.setChar(e.mask);t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onValueChanged=function(t){var e=this.onFormatValue(t.newValue);var i=t.focused&&e===""?this.blocks.getPlaceholderMask():e;t.value=i;t.position.toEnd()};t.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){return t.trim()}return t||""};t.prototype.onFormatValue=function(t){if(t){return t.trim()}return t||""};t.prototype.toParsedValue=function(t){return this.onParseValue(t)};t.prototype.toFormattedValue=function(t){return this.onFormatValue(t)};t.prototype.fireI18nChange=function(t){var e=this.blocks.clone();var i="".concat(t.locale);this.locale=t.locale;this.blocks.list.forEach((function(e){return e.onI18nChange(t.locale)}));this.onLocaleChange(t,i,e)};t.prototype.fireValueChanged=function(t){if(t.didValueChange){this.onValueChanged(t)}};t.prototype.firePaste=function(t){var e=this.blocks.getBlockIndexFromPosition(t.position.value);if(e!==undefined){var i=this.blocks.list[e];this.onPaste(t,i,e);this.onChange(t)}};t.prototype.fireClick=function(t){var e=this.blocks.getPlaceholderMask();if(e===t.value){t.position.toStart()}};t.prototype.fireFocus=function(t){if(t.target&&t.isValueEmpty()){this.resetInputValueWithMask(t)}this.onFocus(t)};t.prototype.fireBlur=function(t){if(t.target){if(this.isValueEmptyMask(t)){this.emptyInputValue(t)}else{this.onBlur(t);t.submit("blur",this.onParseValue(t.value,{allowInvalidValue:t.component.allowInvalidValue}))}}};t.prototype.fireKeyDown=function(t){var e=t.isBackspaceKey?Math.max(0,t.position.value-1):t.position.value;var i=this.blocks.getBlockIndexFromPosition(e);if(e>=this.blocks.lastPosition&&!t.isNavigationKey&&!t.isSelectAllCommand){t.preventDefault();t.stopPropagation();return}if(i!==undefined&&!t.position.isRangeSelection){var n=this.blocks.list[i];if(t.isNavigationKey){this.onNavigationDown(t,n,i)}else if(t.isSelectAllCommand){this.onSelectAll(t,n,i)}else if(t.isCopyCommand);else if(t.isPasteCommand);else if(t.isBackspaceKey){t.preventDefault();this.onBackspaceDown(t,n,i)}else if(t.isDeleteKey){t.preventDefault();this.onDeleteDown(t,n,i)}else if(t.isWhiteSpaceKey){t.preventDefault();var a=t.value[t.position.value];if(a==="."){t.stopPropagation();var r=t.value;t.value=r.substring(0,t.position.value)+"_"+r.substring(t.position.value+1)}}else if(n.verifyAllowedKeyHits(t.key)){t.preventDefault();this.onBlockChange(t,n,i)}else if(this.blocks.verifyCallOfNextSeparator(t.key,i)){t.preventDefault();var s=this.blocks.list[i];if(t.position.value>s.from){var l=this.blocks.list[i+1];var r=t.value;var o=n.getValueOfTheBlock(r);var u=n.format(o);t.value=r.substring(0,n.from)+u+r.substring(n.to);t.position.value=l.to}}var c=this.blocks.getBlockIndexFromPosition(t.position.value);if(c&&!t.isBackspaceKey){var d=this.blocks.formatBlocks(t.value,c);var f=t.position.value;t.value=d;t.position.value=f}}else{if(!t.isTabKey){t.preventDefault()}if(t.isBackspaceKey||t.isDeleteKey){this.resetInputValueWithMask(t)}else if(this.blocks.list[0].verifyAllowedKeyHits(t.key)){this.onBlockChange(t,this.blocks.list[0],0)}}};t.prototype.resetInputValueWithMask=function(t){t.value=this.blocks.getPlaceholderMask();t.position.toStart()};t.prototype.isValueEmptyMask=function(t){var e=this.blocks.getPlaceholderMask();return e===t.value};t.prototype.emptyInputValue=function(t){t.value="";t.submit("blur",t.value)};return t}();var et=function(t){__extends(e,t);function e(){var e=t.call(this,[new Z({from:0,to:2,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.dayMask[t.split("-")[0]]||e.dayMask["de"]}}),new Z({from:2,to:3,mask:function(t){return f(t)},isSeparator:true}),new Z({from:3,to:5,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.monthMask[t.split("-")[0]]||e.monthMask["de"]}}),new Z({from:5,to:6,mask:function(t){return f(t)},isSeparator:true}),new Z({from:6,to:10,allowedKeys:__spreadArray([],C,true),mask:function(t){return e.yearMask[t.split("-")[0]]||e.yearMask["de"]}})])||this;e.maxLength=10;e.minLength=10;e.inputMode="decimal";e.dayMask={de:"T",en:"D",fr:"J",it:"G",nl:"D",es:"D",pl:"D",pt:"D",sv:"D",fi:"M"};e.monthMask={de:"M",en:"M",fr:"M",it:"M",nl:"M",es:"M",pl:"M",pt:"M",sv:"M",fi:"K"};e.yearMask={de:"J",en:"Y",fr:"A",it:"A",nl:"J",es:"A",pl:"R",pt:"A",sv:"Å",fi:"V"};return e}e.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){var i=c.fromAnyFormat(this.blocks.getRawValueWithoutMask(t));if(i.isValid){return i.toISODate()}else if(e&&e.allowInvalidValue){return D}}return""};e.prototype.onFormatValue=function(t){if(t){var e=c.fromISO(t);if(e.isValid){return e.toFormat()}}return""};e.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";var a=c.fromAnyFormat(n);if(a.isValid){t.value=a.toFormat();t.position.toEnd()}};e.prototype.onBlur=function(t){var e=this.blocks.getRawValueWithoutMaskByContext(t);var i=c.fromAnyFormat(e);if(i.isValid){var n=i.toFormat();if(n!==t.value){t.value=n}}else if(t.component.allowInvalidValue){if(e!==t.value){t.value=e}}};return e}(tt);var it=function(){function t(t){this.mask=t}Object.defineProperty(t.prototype,"attributes",{get:function(){return{inputMode:this.mask.inputMode,maxLength:this.mask.maxLength,minLength:this.mask.minLength,type:"text",autoCapitalize:"off",autoCorrect:"off",spellcheck:false}},enumerable:false,configurable:true});t.prototype.bindComponent=function(t){this.component=t};t.prototype.bindComponentDidLoad=function(){if(this.component&&this.component.nativeInput){this.component.nativeInput.value=this.component.value||""}this.bindValueChanged(this.component.value,undefined)};t.prototype.bindConfigChanged=function(t){var e=this,i=e.component,n=e.mask;var a=new U({component:i,mask:n,event:{locale:"".concat(t.language,"-").concat(t.region)}});this.mask.fireI18nChange(a);a.submit()};t.prototype.bindValueChanged=function(t,e){var i=this,n=i.component,a=i.mask;var r=new X({component:n,mask:a,event:{newValue:t,oldValue:e}});this.mask.fireValueChanged(r);r.submit("blur")};t.prototype.bindKeyDown=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new q({event:t,component:i,mask:n});this.mask.fireKeyDown(a);var r=t.key==="Tab";a.submit(r?"tab":"input");i.balKeyPress.emit(t)}};t.prototype.bindFocus=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=true;var a=new W({event:t,component:i,mask:n});this.mask.fireFocus(a);a.submit();i.balFocus.emit(t)}};t.prototype.bindBlur=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=false;var a=new W({event:t,component:i,mask:n});this.mask.fireBlur(a);a.submit("blur");i.balBlur.emit(t)}};t.prototype.bindPaste=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new G({event:t,component:i,mask:n});this.mask.firePaste(a);a.submit()}};t.prototype.bindFormReset=function(t){var e=this;var i=t.target;if(i&&(i===this.component.el||i.contains(this.component.el))){this.component.value=this.component.initialValue;this.component.inputValue=this.component.initialValue;clearTimeout(this.resetHandlerTimer);this.resetHandlerTimer=setTimeout((function(){if(e.component.nativeInput){e.component.nativeInput.value=e.mask.toFormattedValue(e.component.value||"")}}))}};t.prototype.bindClick=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new Q({event:t,component:i,mask:n});this.mask.fireClick(a);a.submit()}};t.prototype.bindHostClick=function(t){if(!this.isComponentAccessible){t.preventDefault();t.stopPropagation()}};t.prototype.bindGlobalClick=function(t){if(!this.isComponentAccessible){if(t.target&&t.target===this.component.el){t.preventDefault();t.stopPropagation()}}};Object.defineProperty(t.prototype,"isComponentAccessible",{get:function(){return!this.component.disabled&&!this.component.readonly},enumerable:false,configurable:true});return t}();var nt=".bal-input-date{display:block;width:100%;-ms-flex:1;flex:1}.bal-input-date input:not(:-moz-placeholder-shown){letter-spacing:.4px}.bal-input-date input:not(:-ms-input-placeholder){letter-spacing:.4px}.bal-input-date input:not(:placeholder-shown){letter-spacing:.4px}.bal-input-date__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}";var at=nt;var rt=t("bal_input_date",function(){function t(t){i(this,t);this.balKeyPress=n(this,"balKeyPress",7);this.balChange=n(this,"balChange",7);this.balInput=n(this,"balInput",7);this.balBlur=n(this,"balBlur",7);this.balFocus=n(this,"balFocus",7);this.inputId="bal-i-date-".concat(st++);this.inheritedAttributes={};this.maskAdapter=new it(new et);this.inputValue=this.value;this.initialValue=this.value||"";this.focused=false;this.isGrouped=false;this.ariaForm=k;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.placeholder=undefined;this.clickable=false;this.min=undefined;this.max=undefined;this.autocomplete="off";this.hasIconRight=false;this.value=undefined;this.autoInvalidOff=false;this.allowInvalidValue=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){this.maskAdapter.bindValueChanged(t,e)};t.prototype.connectedCallback=function(){this.maskAdapter.bindComponent(this);this.isGrouped=v("bal-input-group",this.el)};t.prototype.componentDidLoad=function(){this.maskAdapter.bindComponentDidLoad()};t.prototype.componentWillRender=function(){this.inheritedAttributes=y(this.el,["aria-label","tabindex","title"])};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.maskAdapter.bindConfigChanged(t);return[2]}))}))};t.prototype.resetHandler=function(t){this.maskAdapter.bindFormReset(t)};t.prototype.listenOnClick=function(t){this.maskAdapter.bindGlobalClick(t)};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){x(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){j(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.render=function(){var t=this;var i=_.block("input-date");var n=i.element("native");return e(a,{key:"c19d0b61364480bbcb5067bf0c5d68b83dab6fa7",onClick:function(e){return t.maskAdapter.bindHostClick(e)},class:Object.assign({},i.class())},e("input",Object.assign({key:"e8cbf0a3372a06823953459eeb754f2c22fc0b22",class:{input:true,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid,"is-clickable":this.clickable&&!(this.disabled||this.readonly),"bal-focusable":!this.disabled,"has-icon-right":this.hasIconRight},"data-testid":"bal-date-input",ref:function(e){return t.nativeInput=e},id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,required:this.required,disabled:this.disabled,readonly:this.readonly,autoComplete:this.autocomplete},this.maskAdapter.attributes,this.inheritedAttributes,{placeholder:this.placeholder,value:this.inputValue,onKeyDown:function(e){return t.maskAdapter.bindKeyDown(e)},onClick:function(e){return t.maskAdapter.bindClick(e)},onFocus:function(e){return t.maskAdapter.bindFocus(e)},onBlur:function(e){return t.maskAdapter.bindBlur(e)},onPaste:function(e){return t.maskAdapter.bindPaste(e)}})),e("input",{key:"b6acc3e893caf68b4823addac74e4cea27fdc98b",type:"date",class:Object.assign({},n.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-input-date"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],rt.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],rt.prototype,"configChanged",null);s([O("reset",{capture:true,target:"document"}),l("design:type",Function),l("design:paramtypes",[UIEvent]),l("design:returntype",void 0)],rt.prototype,"resetHandler",null);s([O("click",{capture:true,target:"document"}),l("design:type",Function),l("design:paramtypes",[MouseEvent]),l("design:returntype",void 0)],rt.prototype,"listenOnClick",null);var st=0;rt.style=at}}}));
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(t,e,i,n){function a(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function s(t){try{o(n.next(t))}catch(t){r(t)}}function l(t){try{o(n["throw"](t))}catch(t){r(t)}}function o(t){t.done?i(t.value):a(t.value).then(s,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(t){return function(e){return o([t,e])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(n=1,a&&(r=l[0]&2?a["return"]:l[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,l[1])).done)return r;if(a=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;a=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=e.call(t,i)}catch(t){l=[6,t];a=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,a=e.length,r;n<a;n++){if(r||!(n in e)){if(!r)r=Array.prototype.slice.call(e,0,n);r[n]=e[n]}}return t.concat(r||Array.prototype.slice.call(e))};System.register(["./p-d67f7321.system.js","./p-6dbef894.system.js","./p-fa6b5cde.system.js","./p-6913b916.system.js","./p-802216cd.system.js","./p-23bdd8dc.system.js","./p-4d807f18.system.js","./p-db0895e2.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-d1ec4d6e.system.js","./p-8949aa8b.system.js","./p-bf139fe5.system.js","./p-6e5745c8.system.js","./p-ee3c7a38.system.js","./p-ba579059.system.js","./p-5f26e92f.system.js","./p-2880433e.system.js","./p-145d5c4e.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js","./p-a898208e.system.js","./p-ec9a7cf5.system.js","./p-eecefb0a.system.js"],(function(t){"use strict";var e,i,n,a,r,s,l,o,u,c,d,f,h,b,v,_,m,g,p,y,w,x,j,k,O,C,D;return{setters:[function(t){e=t.h;i=t.r;n=t.c;a=t.H;r=t.g},function(t){s=t._;l=t.a},function(t){o=t.l},function(t){u=t.l},function(t){c=t.B;d=t.i;f=t.d},function(t){h=t.L},function(t){b=t.b;v=t.p},function(t){_=t.B},function(t){m=t.d},function(t){g=t.L},function(t){p=t.L},function(t){y=t.i},function(t){w=t.m;x=t.c;j=t.d},function(t){k=t.d},function(t){O=t.L},function(t){C=t.N},function(t){D=t.I},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){function z(t,e){if(e<1||t<0){return undefined}return new Date(t,e,0).getDate()}function A(t,e,i){return"".concat(i,"-").concat(o("".concat(e),2,"0"),"-").concat(o("".concat(t),2,"0"))}function M(){var t=new Date;return"".concat(t.getFullYear(),"-").concat(o("".concat(t.getMonth()+1),2,"0"),"-").concat(o("".concat(t.getDate()),2,"0"))}function P(t,e,i,n,a){var r=[];var s=z(t,e);var l=L(t,e);if(s!==undefined&&l){var o=M();var d=c.fromISO(i);var f=c.fromISO(n);var h=function(t){if(u(a)){return false}return!a(t)};for(var b=1;b<=s;b++){var v=A(b,e,t);r.push({day:b,month:e,year:t,isoDate:v,fullDate:c.fromISO(v).toFormat(),today:o===v,disabled:d.isAfter(v)||f.isBefore(v)||h(v)})}}return r}function S(t,e){if(e<1||t<0){return 1}var i=new Date(t,e-1,1);var n=i.getDay();return n===0?7:n}function K(t){if(["en","de","fr","it","nl","es","pl","pt","sv","fi"].includes(t)){return t}return"de"}function V(t,e,i){var n=[];var a=new Date;var r=a.getFullYear();for(var s=e;s<=i;s++){n.push({value:s,label:"".concat(s),disabled:false,today:r===s,selected:t===s})}return n}function F(t,e,i,n,a){var r=K(t);var s=c.infoMonths({format:"long",locale:r});var l=c.fromISO(i);var o=new Date;var u=o.getFullYear();var d=o.getMonth()+1;var f=0;if(n&&e!==undefined){var h=c.fromISO(n);if(h.isValid){if(e>h.year){f=0}else{f=h.month||f}}}var b=12;if(a&&e!==undefined){var v=c.fromISO(a);if(v.isValid){if(e<v.year){b=12}else{b=v.month||b}}}return s.map((function(t,i){var n=i+1;return{label:t,value:n,today:n===d&&e===u,selected:n===l.month&&e===l.year,disabled:n<f||n>b}}))}function I(t){var e=K(t);var i=c.infoWeekdays({format:"short",locale:e});var n=c.infoWeekdays({format:"long",locale:e});return i.map((function(t,e){return{ariaLabel:n[e],textContent:t}}))}function L(t,e){if(e<1||e>12||t<0){return undefined}return new Date(t,e-1,1)}var T=function(t){var i=t.name,n=t.isVisible,a=t.girdHeight,r=t.list,s=t.onSelect,l=t.ref;var o=_.block("date-calendar");var u=o.element("body");var c=u.element("list");return e("ul",{class:Object.assign(Object.assign(Object.assign({},c.class()),c.modifier(i).class()),c.modifier("visible").class(n)),"aria-hidden":n?"false":"true",style:{height:"".concat(a-2-8-8,"px")},ref:function(t){return l?l(t):undefined}},r.map((function(t){return e("li",{key:t.value,id:"".concat(i,"-").concat(t.value)},e("button",{class:Object.assign(Object.assign(Object.assign(Object.assign({},c.element("item").class()),c.element("item").modifier("today").class(t.today)),c.element("item").modifier("selected").class(t.selected)),c.element("item").modifier("disabled").class(t.disabled)),disabled:t.disabled,tabIndex:-1,onClick:function(){if(!t.disabled){s(t)}}},t.label))})))};var E=function(t){var i=t.isVisible,n=t.ref,a=t.grid,r=t.weekdays,s=t.selectedDate,l=t.firstDayOfWeek,o=t.onSelectDay;var u=_.block("date-calendar");var c=u.element("body");var d=c.element("grid");return e("div",{role:"grid",class:Object.assign(Object.assign({},d.class()),d.modifier("visible").class(i)),"aria-hidden":i?"false":"true",ref:function(t){return n(t)}},e("div",{role:"row",class:Object.assign({},d.element("head").class())},r.map((function(t){return e("span",{key:t.textContent,role:"columnheader","aria-label":t.ariaLabel,title:t.ariaLabel},t.textContent)}))),e("div",{role:"row",class:Object.assign({},d.element("body").class()),style:{"--bal-date-first-week-day":"".concat(l)}},a.map((function(t){return e("bal-date-calendar-cell",Object.assign({key:t.isoDate},t,{selected:t.isoDate===s,onBalSelectDay:function(t){var e=t.detail;return o(e)}}))}))))};var H=function(t){var i=t.language,n=t.onClickSelectMonthAndYear,a=t.monthFullNames,r=t.month,s=t.year,l=t.isCalendarVisible,o=t.isListVisible,u=t.onClickPreviousMonth,c=t.onClickNextMonth;var f=_.block("date-calendar");var h=f.element("nav");var b=d[i].nextMonth;var v=d[i].previousMonth;var m=d[i].selectMonth;return e("div",{class:Object.assign({},h.class())},e("div",{class:Object.assign({},h.modifier("start").class())},e("button",{title:m,"aria-label":m,tabIndex:-1,"data-test":"change-year-month",onClick:n},e("span",null,a[r-1]," ",s),e("bal-icon",{name:"caret-up",color:"primary",size:"small",turn:l}))),e("div",{class:Object.assign({},h.modifier("end").class()),style:{display:o?"none":"flex"}},e("button",{title:v,"aria-label":v,onClick:u,tabIndex:-1,"data-test":"previous-month"},e("bal-icon",{name:"caret-left",color:"primary",size:"small"})),e("button",{title:b,"aria-label":b,onClick:c,tabIndex:-1,"data-test":"next-month"},e("bal-icon",{name:"caret-right",color:"primary",size:"small"}))))};var N=':host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{--bal-date-first-week-day:0;--bal-date-calendar-background:var(--bal-color-red-3)}:host{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;background:var(--bal-color-white);border-radius:var(--bal-radius-normal)}.bal-date-calendar__nav{display:-ms-flexbox;display:flex;width:calc(100% - 1rem);-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:.5rem;gap:.5rem}.bal-date-calendar__nav--start>button{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav--end{display:-ms-flexbox;display:flex;gap:.5rem}.bal-date-calendar__nav button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;min-height:2rem;min-width:2rem;padding:.25rem;border-radius:var(--bal-button-radius);font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__nav button:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__nav button--today:not(.bal-date-calendar__nav button--selected):not(.bal-date-calendar__nav button--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__nav button--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__nav button--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body{display:block}.bal-date-calendar__body__grid{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding:.5rem;height:0;padding-top:0;padding-bottom:0;visibility:hidden}.bal-date-calendar__body__grid--visible{height:auto;padding-top:.5rem;padding-bottom:.5rem;visibility:visible}.bal-date-calendar__body__grid__head{position:relative;display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.bal-date-calendar__body__grid__head::after{position:absolute;content:"";height:2px;width:calc(100% + 1rem);bottom:0;left:-0.5rem;right:-0.5rem;background:var(--bal-color-border)}.bal-date-calendar__body__grid__head span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:2rem;width:2rem;font-family:var(--bal-font-family-title);font-weight:var(--bal-font-weight-bold);font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-wrap:nowrap}.bal-date-calendar__body__grid__body{display:grid;grid-template-columns:repeat(7, 1fr);-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:.5rem}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell{width:2rem;height:2rem;text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.bal-date-calendar__body__grid__body>.bal-date-calendar-cell:first-child{grid-column:var(--bal-date-first-week-day)}.bal-date-calendar__body__list{display:none;list-style:none;margin:0;padding:0;-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem;width:calc(100% - 1rem);overflow-y:auto;max-height:18rem;position:relative;padding:.5rem;border-top:2px solid var(--bal-color-border)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:100%}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--today:not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected):not(.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar__body__list .bal-date-calendar__body__list__item--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}.bal-date-calendar__body__list--visible{display:grid}.bal-date-calendar__body__list--year{grid-template-columns:repeat(4, 1fr)}.bal-date-calendar__body__list--month{grid-template-columns:repeat(2, 1fr)}.bal-date-calendar-cell{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:var(--bal-radius-normal);font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular);color:var(--bal-color-text-primary);border:none;background:rgba(0,0,0,0);text-align:center;font-size:var(--bal-text-size-normal);line-height:var(--bal-line-height-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;outline:none;width:2rem;height:2rem}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{background:var(--bal-color-light-blue-1)}}.bal-date-calendar-cell:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{background:var(--bal-color-light-blue-2)}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled){color:var(--bal-color-light-blue-3);font-weight:var(--bal-font-weight-bold)}@media (hover: hover)and (pointer: fine){.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):hover{color:var(--bal-color-text-primary)}}.bal-date-calendar-cell--today:not(.bal-date-calendar-cell--selected):not(.bal-date-calendar-cell--disabled):active{color:var(--bal-color-text-primary)}.bal-date-calendar-cell--selected{background:var(--bal-color-primary);color:var(--bal-color-text-white);font-weight:var(--bal-font-weight-bold)}.bal-date-calendar-cell--disabled{cursor:default;background:rgba(0,0,0,0);color:var(--bal-color-text-grey-light)}';var R=N;var Y=t("bal_date_calendar",function(){function t(t){var e=this;i(this,t);this.balChange=n(this,"balChange",7);this.oldMin="";this.oldMax="";this.onSelectDay=function(t){e.valueChanged(t,e.selectedDate);e.balChange.emit(e.selectedDate)};this.onClickNextMonth=function(){var t=e.year;var i=e.month+1;if(i>12){i=1;t=t+1}e.generateGridByMonthAndYear(i,t)};this.onClickPreviousMonth=function(){var t=e.year;var i=e.month-1;if(i<1){i=12;t=t-1}e.generateGridByMonthAndYear(i,t)};this.onClickSelectMonthAndYear=function(){return __awaiter(e,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.updateSelections();if(!(this.isCalendarVisible===true))return[3,2];this.isCalendarVisible=false;this.isYearListVisible=true;this.isMonthListVisible=false;return[4,b()];case 1:i.sent();if(this.yearListEl){t=this.yearListEl.querySelector("#year-".concat(this.year));if(t){e=26+8+4;this.yearListEl.scrollTop=t.offsetTop-e*2}else{this.yearListEl.scrollTop=0}}return[3,3];case 2:this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;i.label=3;case 3:return[2]}}))}))};this.onClickYear=function(t){e.isYearListVisible=false;e.isMonthListVisible=true;e.generateGridByMonthAndYear(e.month,t);e.months=F(e.language,t,e.selectedDate,e.min,e.max)};this.onClickMonth=function(t){e.isYearListVisible=false;e.isMonthListVisible=false;e.isCalendarVisible=true;e.generateGridByMonthAndYear(t,e.year)};this.selectedDate="";this.monthFullNames=[];this.weekdays=[];this.months=[];this.years=[];this.calendarGrid=[];this.firstDayOfWeek=0;this.month=0;this.year=0;this.language=m.language;this.isCalendarVisible=true;this.isYearListVisible=false;this.isMonthListVisible=false;this.value=undefined;this.defaultDate=undefined;this.allowedDates=undefined;this.min=undefined;this.max=undefined;this.minYearProp=undefined;this.maxYearProp=undefined}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){if(t!==e){var i=c.fromISO(t);if(!i.isValid){this.generateGridByDefaultDate();this.selectedDate=""}else{this.generateGridByDate(i);this.selectedDate=i.toISODate()}this.updateSelections()}};t.prototype.rangePropChanged=function(){this.updateSelections();this.generateGrid()};t.prototype.yearRangePropChanged=function(){this.updateSelections()};t.prototype.connectedCallback=function(){this.generateGridByDefaultDate();this.valueChanged(this.value,undefined)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.monthFullNames=c.infoMonths({format:"long",locale:this.language});this.weekdays=I(this.language);this.updateSelections();return[2]}))}))};t.prototype.swipeListener=function(t){var e=t.left,i=t.right;if(e){this.onClickNextMonth()}else if(i){this.onClickPreviousMonth()}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.minYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e-100;if(this.min){var n=c.fromISO(this.min);return n.year||i}else{return i}}return this.minYearProp},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.maxYearProp===undefined){var t=new Date;var e=t.getFullYear();var i=e+50;if(this.max){var n=c.fromISO(this.max);return n.year||i}else{return i}}return this.maxYearProp},enumerable:false,configurable:true});t.prototype.updateSelections=function(){this.years=V(this.year,this.minYear,this.maxYear);this.months=F(this.language,this.year,this.selectedDate,this.min,this.max)};t.prototype.generateGrid=function(){var t=c.fromISO(this.value);if(t.isValid){this.generateGridByDate(t)}else{this.generateGridByDefaultDate()}};t.prototype.generateGridByDate=function(t){if(t.year!==undefined&&t.month!==undefined){this.generateGridByMonthAndYear(t.month,t.year)}};t.prototype.generateGridByDefaultDate=function(){var t=c.fromISO(this.defaultDate);if(t.isValid){this.generateGridByDate(t)}else{var e=new Date;this.month=e.getMonth()+1;this.year=e.getFullYear();this.calendarGrid=P(this.year,this.month,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(this.year,this.month)}};t.prototype.generateGridByMonthAndYear=function(t,e){if(this.month!==t||this.year!==e||this.oldMin!==this.min||this.oldMax!==this.max){this.calendarGrid=P(e,t,this.min,this.max,this.allowedDates);this.firstDayOfWeek=S(e,t)}this.month=t;this.year=e;this.oldMin=this.min;this.oldMax=this.max};t.prototype.render=function(){var t=this;var i;var n=((i=this.gridEl)===null||i===void 0?void 0:i.clientHeight)||0;var r=_.block("date-calendar");var s=r.element("body");var l=r.element("foot");return e(a,{key:"e6348fe5b0ddab2253f7c79cb41a16fd93fe9a63",class:Object.assign({},r.class())},e(H,{key:"fc808b662835df468fe53a659cfdb048a2ce2325",language:this.language,monthFullNames:this.monthFullNames,month:this.month,year:this.year,isCalendarVisible:this.isCalendarVisible,isListVisible:this.isMonthListVisible||this.isYearListVisible,onClickSelectMonthAndYear:this.onClickSelectMonthAndYear,onClickPreviousMonth:this.onClickPreviousMonth,onClickNextMonth:this.onClickNextMonth}),e("div",{key:"14a071d6e691964876d2a832a9d2a7b20e2b5139",class:Object.assign({},s.class())},e(E,{key:"d7d81606a5bcf10637f48ad9d5f095cac4851c60",isVisible:this.isCalendarVisible,grid:this.calendarGrid,weekdays:this.weekdays,firstDayOfWeek:this.firstDayOfWeek,selectedDate:this.selectedDate,ref:function(e){return t.gridEl=e},onSelectDay:function(e){return t.onSelectDay(e)}}),e(T,{key:"3804356a689232d66ecbac4ad02c152a7e11739f",name:"year",isVisible:this.isYearListVisible,girdHeight:n,list:this.years,ref:function(e){return t.yearListEl=e},onSelect:function(e){return t.onClickYear(e.value)}}),e(T,{key:"2721e28b96097dfb3f824c6ef085657c56c89342",name:"month",isVisible:this.isMonthListVisible,girdHeight:n,list:this.months,onSelect:function(e){return t.onClickMonth(e.value)}})),e("div",{key:"da53c2e514df3bf5d4890a16fdc5738e55366f31",class:Object.assign({},l.class())},e("slot",{key:"6b75be6d0ad833854a0eade0d014ee26b05bc868"})))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"],min:["rangePropChanged"],max:["rangePropChanged"],minYearProp:["yearRangePropChanged"],maxYearProp:["yearRangePropChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-date-calendar"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],Y.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],Y.prototype,"configChanged",null);s([p({mobileOnly:true}),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],Y.prototype,"swipeListener",null);Y.style=R;var B=function(){function t(t){this._options=t;this._position=0;this._positionEnd=0;this._isRangeSelection=false;if(t.component&&t.component.nativeInput){this._position=t.component.nativeInput.selectionStart||0;this._positionEnd=t.component.nativeInput.selectionEnd||0;this._isRangeSelection=this._position!==this._positionEnd}}Object.defineProperty(t.prototype,"isRangeSelection",{get:function(){return this._isRangeSelection},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){if(this._options.isBackspace&&this._position>0){return this._position-1}return this._position},set:function(t){var e=t<0?0:t>this._options.mask.maxLength?this._options.mask.maxLength:t;this._position=e},enumerable:false,configurable:true});t.prototype.toStart=function(){this.value=0};t.prototype.toEnd=function(){var t=this.getTarget();if(t){this.value=t.value.length}};t.prototype.next=function(t){if(t===void 0){t=1}var e=this._position+t;if(e<=this._options.mask.maxLength){this._position=e}return this._position};t.prototype.previous=function(t){if(t===void 0){t=1}var e=this._position-t;if(e>=0){this._position=e}else{this._position=0}return this._position};t.prototype.submit=function(){var t=this.getTarget();if(t&&t.selectionStart!==this._position&&t.selectionEnd!==this._position){t.selectionStart=this._position;t.selectionEnd=this._position}};t.prototype.getTarget=function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined};return t}();var J=function(){function t(t){this._options=t;this._value="";if(this._options.component&&this._options.component.nativeInput){this._value=this._options.component.nativeInput.value}this.position=new B(this._options);this.component=this._options.component}Object.defineProperty(t.prototype,"target",{get:function(){if(this._options.component&&this._options.component.nativeInput){return this._options.component.nativeInput}return undefined},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focused",{get:function(){return this._options.component.focused},enumerable:false,configurable:true});t.prototype.isValueEmpty=function(){return this.value===""||this.value===undefined||this.value===null};t.prototype.preventDefault=function(){if(this._options.event.preventDefault){this._options.event.preventDefault()}};t.prototype.stopPropagation=function(){this.preventDefault();if(this._options.event.stopPropagation){this._options.event.stopPropagation()}};t.prototype.submit=function(){return __awaiter(this,arguments,void 0,(function(t,e){if(t===void 0){t="input"}return __generator(this,(function(i){if(this.target){this.target.value=this.value;if(t!=="blur"&&t!=="tab"){this.position.submit()}if(this._options.component){if(t==="input"||t==="tab"){this._options.component.balInput.emit(this.value)}if((t==="change"||t==="blur")&&e!==undefined){if(w(this._options.component.value,e)){this._options.component.value=e;this._options.component.balChange.emit(e)}}}}return[2]}))}))};return t}();var G=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"clipboardData",{get:function(){var t;return(t=this._options.event.clipboardData)===null||t===void 0?void 0:t.getData("text")},enumerable:false,configurable:true});return e}(J);var W=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"key",{get:function(){return this._options.event.key},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCtrlOrCommandKey",{get:function(){return this._options.event.metaKey||this._options.event.ctrlKey},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBackspaceKey",{get:function(){return this._options.event.key==="Backspace"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isTabKey",{get:function(){return this._options.event.key==="Tab"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isWhiteSpaceKey",{get:function(){return this._options.event.key===" "},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDeleteKey",{get:function(){return this._options.event.key==="Delete"||this._options.event.key==="Del"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNumberKey",{get:function(){return e.NUMBER_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isNavigationKey",{get:function(){return e.NAVIGATION_KEYS.includes(this._options.event.key)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSelectAllCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="a"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isCopyCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="c"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isPasteCommand",{get:function(){return(this._options.event.ctrlKey||this._options.event.metaKey)&&this.key==="v"},enumerable:false,configurable:true});e.prototype.getCharAt=function(t){if(t===void 0){t=this.position.value}return this.value.charAt(t)};e.prototype.getCharAtBackspacePosition=function(){return this.getCharAt(this.position.value-1)};e.prototype.setChar=function(t,e){if(t===void 0){t=this._options.event.key}if(e===void 0){e=this.position.value}this.value=this.value.substring(0,e)+t+this.value.substring(e+1)};return e}(J);q.NUMBER_KEYS=["0","1","2","3","4","5","6","7","8","9"];q.NAVIGATION_KEYS=["Home","End","ArrowLeft","Left","ArrowRight","Right","Tab","Enter","Esc","Escape"];var U=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"locale",{get:function(){return this._options.event.locale},enumerable:false,configurable:true});return e}(J);var Q=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(J);var X=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"newValue",{get:function(){return this._options.event.newValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._options.event.oldValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"didValueChange",{get:function(){return this.newValue!==this.oldValue},enumerable:false,configurable:true});return e}(J);var Z=function(){function t(t){this._isSeparator=false;this._allowedKeys=[];this._locale="de-CH";this._from=t.from||0;this._to=t.to||0;this._isSeparator=t.isSeparator===undefined?false:t.isSeparator;this._mask=t.mask||"_";this._allowedKeys=t.allowedKeys?t.allowedKeys:this.allowedKeys;this._format=t.format}t.prototype.format=function(t){if(this._format){return this._format(t.replace(this.mask,""),this._locale,this.mask)}return t};Object.defineProperty(t.prototype,"isSeparator",{get:function(){return this._isSeparator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"to",{get:function(){return this._to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"from",{get:function(){return this._from},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"mask",{get:function(){if(typeof this._mask==="function"){return this._mask(this._locale)}return this._mask},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowedKeys",{get:function(){return this._allowedKeys},enumerable:false,configurable:true});t.prototype.onI18nChange=function(t){this._locale=t};t.prototype.getValueOfTheBlock=function(t){return t.slice(this._from,this._to)};t.prototype.isTouched=function(t){var e=this;var i=this.getValueOfTheBlock(t);return!i.split("").every((function(t){return t===e.mask}))};t.prototype.verifyAllowedKeyHits=function(t){if(this.isSeparator&&t===this.mask){return true}else if(this.allowedKeys.indexOf(t)>=0){return true}else{return false}};return t}();var $=function(){function t(t){if(t===void 0){t=[]}this._list=t}Object.defineProperty(t.prototype,"lastPosition",{get:function(){return this._list[this._list.length-1].to},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"list",{get:function(){return this._list},set:function(t){this._list=t},enumerable:false,configurable:true});t.prototype.clone=function(){return new t(__spreadArray([],this._list,true))};t.prototype.findByIndex=function(t,e){if(e===void 0){e=this.list}return e.find((function(e){return e.from<=t&&t<e.to}))};t.prototype.getPlaceholderMask=function(){var t=[];this.list.forEach((function(e){var i=e.to-e.from;for(var n=0;n<i;n++){t.push(e.mask)}}));return t.join("")};t.prototype.getRawValueWithoutMaskByContext=function(t){return this.getRawValueWithoutMask(t.value)};t.prototype.getRawValueWithoutMask=function(t){if(t){var e=[];var i=t.split("");for(var n=0;n<i.length;n++){var a=i[n];var r=this.findByIndex(n);if(r&&!r.isSeparator){e.push(a.replace(r.mask,""))}else{e.push(a)}}e=e.filter((function(t){return t}));var s=this.list.filter((function(t){return t.isSeparator})).length;if(s===e.length){return""}return e.join("")}return""};t.prototype.formatBlocks=function(t,e){var i="".concat(t);for(var n=0;n<this.list.length;n++){var a=this.list[n];if(e!==n&&!a.isSeparator&&a.isTouched(i)){var r=a.getValueOfTheBlock(i);var s=a.format(r);i=i.substring(0,a.from)+s+i.substring(a.to)}}return i};t.prototype.getBlockIndexFromPosition=function(t){var e=this.list.reduce((function(t,e){return t+e.to-e.from}),0);if(t===e){return this.list.length-1}var i=this.list.findIndex((function(e){return e.from<=t&&t<e.to}));return i<0?undefined:Math.min(e,i)};t.prototype.verifyCallOfNextSeparator=function(t,e){if(this.list.length-1>e){var i=this.list[e+1];if(i.isSeparator&&i.mask===t){return true}}return false};return t}();var tt=function(){function t(t){if(t===void 0){t=[]}this.inputMode="text";this.locale="de-CH";this.blocks=new $(t)}t.prototype.onLocaleChange=function(t,e,i){if(t.target){var n=t.value;var a=n.split("");for(var r=0;r<a.length;r++){var s=a[r];var l=this.blocks.findByIndex(r);var o=i.findByIndex(r);if(l&&o){if(l.isSeparator){a[r]=l.mask}else if(s===o.mask){a[r]=l.mask}}}t.value=a.join("")}};t.prototype.onFocus=function(t){};t.prototype.onBlur=function(t){};t.prototype.onChange=function(t){t.submit("change",this.onParseValue(t.value))};t.prototype.onNavigationDown=function(t,e,i){};t.prototype.onSelectAll=function(t,e,i){};t.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";t.value=n;t.position.toEnd()};t.prototype.onBlockChange=function(t,e,i){t.setChar();t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onBackspaceDown=function(t,e,i){t.position.previous();if(!e.isSeparator){t.setChar(e.mask);var n=this.blocks.list[i-1];if(t.position.value===e.from&&n&&n.isSeparator){t.position.previous()}}};t.prototype.onDeleteDown=function(t,e,i){t.setChar(e.mask);t.position.next();var n=this.blocks.list[i+1];if(t.position.value===e.to&&n&&n.isSeparator){t.position.next()}};t.prototype.onValueChanged=function(t){var e=this.onFormatValue(t.newValue);var i=t.focused&&e===""?this.blocks.getPlaceholderMask():e;t.value=i;t.position.toEnd()};t.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){return t.trim()}return t||""};t.prototype.onFormatValue=function(t){if(t){return t.trim()}return t||""};t.prototype.toParsedValue=function(t){return this.onParseValue(t)};t.prototype.toFormattedValue=function(t){return this.onFormatValue(t)};t.prototype.fireI18nChange=function(t){var e=this.blocks.clone();var i="".concat(t.locale);this.locale=t.locale;this.blocks.list.forEach((function(e){return e.onI18nChange(t.locale)}));this.onLocaleChange(t,i,e)};t.prototype.fireValueChanged=function(t){if(t.didValueChange){this.onValueChanged(t)}};t.prototype.firePaste=function(t){var e=this.blocks.getBlockIndexFromPosition(t.position.value);if(e!==undefined){var i=this.blocks.list[e];this.onPaste(t,i,e);this.onChange(t)}};t.prototype.fireClick=function(t){var e=this.blocks.getPlaceholderMask();if(e===t.value){t.position.toStart()}};t.prototype.fireFocus=function(t){if(t.target&&t.isValueEmpty()){this.resetInputValueWithMask(t)}this.onFocus(t)};t.prototype.fireBlur=function(t){if(t.target){if(this.isValueEmptyMask(t)){this.emptyInputValue(t)}else{this.onBlur(t);t.submit("blur",this.onParseValue(t.value,{allowInvalidValue:t.component.allowInvalidValue}))}}};t.prototype.fireKeyDown=function(t){var e=t.isBackspaceKey?Math.max(0,t.position.value-1):t.position.value;var i=this.blocks.getBlockIndexFromPosition(e);if(e>=this.blocks.lastPosition&&!t.isNavigationKey&&!t.isSelectAllCommand){t.preventDefault();t.stopPropagation();return}if(i!==undefined&&!t.position.isRangeSelection){var n=this.blocks.list[i];if(t.isNavigationKey){this.onNavigationDown(t,n,i)}else if(t.isSelectAllCommand){this.onSelectAll(t,n,i)}else if(t.isCopyCommand);else if(t.isPasteCommand);else if(t.isBackspaceKey){t.preventDefault();this.onBackspaceDown(t,n,i)}else if(t.isDeleteKey){t.preventDefault();this.onDeleteDown(t,n,i)}else if(t.isWhiteSpaceKey){t.preventDefault();var a=t.value[t.position.value];if(a==="."){t.stopPropagation();var r=t.value;t.value=r.substring(0,t.position.value)+"_"+r.substring(t.position.value+1)}}else if(n.verifyAllowedKeyHits(t.key)){t.preventDefault();this.onBlockChange(t,n,i)}else if(this.blocks.verifyCallOfNextSeparator(t.key,i)){t.preventDefault();var s=this.blocks.list[i];if(t.position.value>s.from){var l=this.blocks.list[i+1];var r=t.value;var o=n.getValueOfTheBlock(r);var u=n.format(o);t.value=r.substring(0,n.from)+u+r.substring(n.to);t.position.value=l.to}}var c=this.blocks.getBlockIndexFromPosition(t.position.value);if(c&&!t.isBackspaceKey){var d=this.blocks.formatBlocks(t.value,c);var f=t.position.value;t.value=d;t.position.value=f}}else{if(!t.isTabKey){t.preventDefault()}if(t.isBackspaceKey||t.isDeleteKey){this.resetInputValueWithMask(t)}else if(this.blocks.list[0].verifyAllowedKeyHits(t.key)){this.onBlockChange(t,this.blocks.list[0],0)}}};t.prototype.resetInputValueWithMask=function(t){t.value=this.blocks.getPlaceholderMask();t.position.toStart()};t.prototype.isValueEmptyMask=function(t){var e=this.blocks.getPlaceholderMask();return e===t.value};t.prototype.emptyInputValue=function(t){t.value="";t.submit("blur",t.value)};return t}();var et=function(t){__extends(e,t);function e(){var e=t.call(this,[new Z({from:0,to:2,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.dayMask[t.split("-")[0]]||e.dayMask["de"]}}),new Z({from:2,to:3,mask:function(t){return f(t)},isSeparator:true}),new Z({from:3,to:5,allowedKeys:__spreadArray([],C,true),format:function(t,e,i){if(Number.isNaN(parseInt(t,10))){return"".concat(i).concat(i)}return t.padStart(2,"0")},mask:function(t){return e.monthMask[t.split("-")[0]]||e.monthMask["de"]}}),new Z({from:5,to:6,mask:function(t){return f(t)},isSeparator:true}),new Z({from:6,to:10,allowedKeys:__spreadArray([],C,true),mask:function(t){return e.yearMask[t.split("-")[0]]||e.yearMask["de"]}})])||this;e.maxLength=10;e.minLength=10;e.inputMode="decimal";e.dayMask={de:"T",en:"D",fr:"J",it:"G",nl:"D",es:"D",pl:"D",pt:"D",sv:"D",fi:"M"};e.monthMask={de:"M",en:"M",fr:"M",it:"M",nl:"M",es:"M",pl:"M",pt:"M",sv:"M",fi:"K"};e.yearMask={de:"J",en:"Y",fr:"A",it:"A",nl:"J",es:"A",pl:"R",pt:"A",sv:"Å",fi:"V"};return e}e.prototype.onParseValue=function(t,e){if(e===void 0){e={allowInvalidValue:false}}if(t){var i=c.fromAnyFormat(this.blocks.getRawValueWithoutMask(t));if(i.isValid){return i.toISODate()}else if(e&&e.allowInvalidValue){return D}}return""};e.prototype.onFormatValue=function(t){if(t){var e=c.fromISO(t);if(e.isValid){return e.toFormat()}}return""};e.prototype.onPaste=function(t,e,i){var n=t.clipboardData||"";var a=c.fromAnyFormat(n);if(a.isValid){t.value=a.toFormat();t.position.toEnd()}};e.prototype.onBlur=function(t){var e=this.blocks.getRawValueWithoutMaskByContext(t);var i=c.fromAnyFormat(e);if(i.isValid){var n=i.toFormat();if(n!==t.value){t.value=n}}else if(t.component.allowInvalidValue){if(e!==t.value){t.value=e}}};return e}(tt);var it=function(){function t(t){this.mask=t}Object.defineProperty(t.prototype,"attributes",{get:function(){return{inputMode:this.mask.inputMode,maxLength:this.mask.maxLength,minLength:this.mask.minLength,type:"text",autoCapitalize:"off",autoCorrect:"off",spellcheck:false}},enumerable:false,configurable:true});t.prototype.bindComponent=function(t){this.component=t};t.prototype.bindComponentDidLoad=function(){if(this.component&&this.component.nativeInput){this.component.nativeInput.value=this.component.value||""}this.bindValueChanged(this.component.value,undefined)};t.prototype.bindConfigChanged=function(t){var e=this,i=e.component,n=e.mask;var a=new U({component:i,mask:n,event:{locale:"".concat(t.language,"-").concat(t.region)}});this.mask.fireI18nChange(a);a.submit()};t.prototype.bindValueChanged=function(t,e){var i=this,n=i.component,a=i.mask;var r=new X({component:n,mask:a,event:{newValue:t,oldValue:e}});this.mask.fireValueChanged(r);r.submit("blur")};t.prototype.bindKeyDown=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new q({event:t,component:i,mask:n});this.mask.fireKeyDown(a);var r=t.key==="Tab";a.submit(r?"tab":"input");i.balKeyPress.emit(t)}};t.prototype.bindFocus=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=true;var a=new W({event:t,component:i,mask:n});this.mask.fireFocus(a);a.submit();i.balFocus.emit(t)}};t.prototype.bindBlur=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;i.focused=false;var a=new W({event:t,component:i,mask:n});this.mask.fireBlur(a);a.submit("blur");i.balBlur.emit(t)}};t.prototype.bindPaste=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new G({event:t,component:i,mask:n});this.mask.firePaste(a);a.submit()}};t.prototype.bindFormReset=function(t){var e=this;var i=t.target;if(i&&(i===this.component.el||i.contains(this.component.el))){this.component.value=this.component.initialValue;this.component.inputValue=this.component.initialValue;clearTimeout(this.resetHandlerTimer);this.resetHandlerTimer=setTimeout((function(){if(e.component.nativeInput){e.component.nativeInput.value=e.mask.toFormattedValue(e.component.value||"")}}))}};t.prototype.bindClick=function(t){if(this.isComponentAccessible){var e=this,i=e.component,n=e.mask;var a=new Q({event:t,component:i,mask:n});this.mask.fireClick(a);a.submit()}};t.prototype.bindHostClick=function(t){if(!this.isComponentAccessible){t.preventDefault();t.stopPropagation()}};t.prototype.bindGlobalClick=function(t){if(!this.isComponentAccessible){if(t.target&&t.target===this.component.el){t.preventDefault();t.stopPropagation()}}};Object.defineProperty(t.prototype,"isComponentAccessible",{get:function(){return!this.component.disabled&&!this.component.readonly},enumerable:false,configurable:true});return t}();var nt=".bal-input-date{display:block;width:100%;-ms-flex:1;flex:1}.bal-input-date input:not(:-moz-placeholder-shown){letter-spacing:.4px}.bal-input-date input:not(:-ms-input-placeholder){letter-spacing:.4px}.bal-input-date input:not(:placeholder-shown){letter-spacing:.4px}.bal-input-date__native{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}";var at=nt;var rt=t("bal_input_date",function(){function t(t){i(this,t);this.balKeyPress=n(this,"balKeyPress",7);this.balChange=n(this,"balChange",7);this.balInput=n(this,"balInput",7);this.balBlur=n(this,"balBlur",7);this.balFocus=n(this,"balFocus",7);this.inputId="bal-i-date-".concat(st++);this.inheritedAttributes={};this.maskAdapter=new it(new et);this.inputValue=this.value;this.initialValue=this.value||"";this.focused=false;this.isGrouped=false;this.ariaForm=k;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.placeholder=undefined;this.clickable=false;this.min=undefined;this.max=undefined;this.autocomplete="off";this.hasIconRight=false;this.value=undefined;this.autoInvalidOff=false;this.allowInvalidValue=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.valueChanged=function(t,e){this.maskAdapter.bindValueChanged(t,e)};t.prototype.connectedCallback=function(){this.maskAdapter.bindComponent(this);this.isGrouped=v("bal-input-group",this.el)};t.prototype.componentDidLoad=function(){this.maskAdapter.bindComponentDidLoad()};t.prototype.componentWillRender=function(){this.inheritedAttributes=y(this.el,["aria-label","tabindex","title"])};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.maskAdapter.bindConfigChanged(t);return[2]}))}))};t.prototype.resetHandler=function(t){this.maskAdapter.bindFormReset(t)};t.prototype.listenOnClick=function(t){this.maskAdapter.bindGlobalClick(t)};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){x(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){j(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.render=function(){var t=this;var i=_.block("input-date");var n=i.element("native");return e(a,{key:"14148968dbe8593f608bb83cb80431c1af6c10cb",onClick:function(e){return t.maskAdapter.bindHostClick(e)},class:Object.assign({},i.class())},e("input",Object.assign({key:"7a9307a111eb7eaca7d043e6102220f83ed407ef",class:{input:true,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid,"is-clickable":this.clickable&&!(this.disabled||this.readonly),"bal-focusable":!this.disabled,"has-icon-right":this.hasIconRight},"data-testid":"bal-date-input",ref:function(e){return t.nativeInput=e},id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,required:this.required,disabled:this.disabled,readonly:this.readonly,autoComplete:this.autocomplete},this.maskAdapter.attributes,this.inheritedAttributes,{placeholder:this.placeholder,value:this.inputValue,onKeyDown:function(e){return t.maskAdapter.bindKeyDown(e)},onClick:function(e){return t.maskAdapter.bindClick(e)},onFocus:function(e){return t.maskAdapter.bindFocus(e)},onBlur:function(e){return t.maskAdapter.bindBlur(e)},onPaste:function(e){return t.maskAdapter.bindPaste(e)}})),e("input",{key:"23e89b524f1cd68f76461720e386034d1872689a",type:"date",class:Object.assign({},n.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return t}());s([h("bal-input-date"),l("design:type",Function),l("design:paramtypes",[Function]),l("design:returntype",void 0)],rt.prototype,"createLogger",null);s([g(),l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],rt.prototype,"configChanged",null);s([O("reset",{capture:true,target:"document"}),l("design:type",Function),l("design:paramtypes",[UIEvent]),l("design:returntype",void 0)],rt.prototype,"resetHandler",null);s([O("click",{capture:true,target:"document"}),l("design:type",Function),l("design:paramtypes",[MouseEvent]),l("design:returntype",void 0)],rt.prototype,"listenOnClick",null);var st=0;rt.style=at}}}));
|