@baloise/ds-core 17.2.2 → 17.2.4-nightly.20250110
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/array.js +1 -1856
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-carousel-item.js +5 -5
- package/components/bal-carousel.js +5 -10
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-footer.js +44 -41
- package/components/bal-stage-image.js +4 -4
- package/components/bal-tabs2.js +3 -2
- package/components/index.js +5 -304
- package/components/index4.js +1642 -342
- package/components/index5.js +558 -0
- package/components/initialize.js +303 -0
- package/components/swiper.util.js +25 -5
- 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-fea450f617.entry.js → p-005e59f2fa.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3921f381.system.js → p-078a321b.system.js} +1 -1
- package/dist/baloise-design-system/p-079850e6.system.js +1 -0
- package/dist/baloise-design-system/{p-552a2c2dbe.entry.js → p-09f166e439.entry.js} +1 -1
- package/dist/baloise-design-system/p-0b8169c8.js +1 -0
- package/dist/baloise-design-system/p-0e323fe0.system.js +1 -1
- package/dist/baloise-design-system/{p-3928dcab54.entry.js → p-18ce5177f9.entry.js} +1 -1
- package/dist/baloise-design-system/p-1c191e7d.js +1 -0
- package/dist/baloise-design-system/{p-71a30669ba.system.entry.js → p-32c7867b78.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3ab7fdddee.entry.js → p-41b642c279.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3a93f5710e.system.entry.js → p-498c20ac2a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d42f0351.system.js → p-51525b5c.system.js} +1 -1
- package/dist/baloise-design-system/{p-b0cdf73dcc.system.entry.js → p-5443d162c3.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-5458b9f311.entry.js +1 -0
- package/dist/baloise-design-system/p-5622c208.system.js +1 -0
- package/dist/baloise-design-system/p-58d2a0b5.system.js +1 -0
- package/dist/baloise-design-system/p-5fc399662d.entry.js +1 -0
- package/dist/baloise-design-system/{p-7d1e18d645.system.entry.js → p-65ac2fe908.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e393d63f5a.system.entry.js → p-6f27b46312.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-73bec757.js +1 -0
- package/dist/baloise-design-system/{p-589e41e466.entry.js → p-76dc963d9e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5071d817.system.js → p-80bc0176.system.js} +1 -1
- package/dist/baloise-design-system/p-8c24fdcf6c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-08b52f4a0b.system.entry.js → p-95841191a5.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-96122c3e5b.entry.js +1 -0
- package/dist/baloise-design-system/{p-aa26b71b.system.js → p-9774b1a2.system.js} +1 -1
- package/dist/baloise-design-system/p-9a0181713e.system.entry.js +1 -0
- package/dist/baloise-design-system/p-9ad648deea.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-251565c4.js → p-9f38fc6a.js} +1 -1
- package/dist/baloise-design-system/{p-48bb3dae67.system.entry.js → p-9f6ff86758.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-379b877373.entry.js → p-a140d6e536.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fbb3f0576d.system.entry.js → p-a93895b492.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-04ecae6997.system.entry.js → p-a9b3c1313a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-8805022d10.entry.js → p-aef86c79cb.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bcf4265372.system.entry.js → p-b0ee2bdad4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-83ccf6e2e2.system.entry.js → p-bbd99edd27.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d12639bf.js → p-c0827274.js} +1 -1
- package/dist/baloise-design-system/p-c0e04c2072.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-1b281c808f.entry.js → p-c586b08110.entry.js} +1 -1
- package/dist/baloise-design-system/{p-455872a1.system.js → p-c9b8e360.system.js} +1 -1
- package/dist/baloise-design-system/{p-99a5ad67c2.entry.js → p-cd4c5a26fb.entry.js} +1 -1
- package/dist/baloise-design-system/{p-35115c32f2.system.entry.js → p-d184d75fbd.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-699a918f.js → p-db39e917.js} +1 -1
- package/dist/baloise-design-system/p-e53217f8.js +1 -1
- package/dist/baloise-design-system/p-e9445f4362.entry.js +1 -0
- package/dist/baloise-design-system/{p-29b008f003.entry.js → p-eb9380818c.entry.js} +1 -1
- package/dist/baloise-design-system/p-f7f06d0340.entry.js +1 -0
- package/dist/baloise-design-system/{p-9bba4874f6.entry.js → p-fddf7f3071.entry.js} +1 -1
- package/dist/cjs/app-globals-25e25924.js +7 -0
- package/dist/cjs/bal-app.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +17 -20
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- package/dist/cjs/bal-footer.cjs.entry.js +37 -10
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-stage_6.cjs.entry.js +3 -3
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +7 -6
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-fb08c6d2.js → breakpoints.decorator-46e2af14.js} +1 -1
- package/dist/cjs/{breakpoints.subject-0db232c6.js → breakpoints.subject-33e8e8b4.js} +1 -1
- package/dist/cjs/{app-globals-a3f2765f.js → global-85ebe098.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-367b85e5.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{swiper.util-2c1a9dd3.js → swiper.util-abdf50f1.js} +25 -5
- package/dist/cjs/{tokens.esm-5afdc559.js → tokens.esm-274c6a7d.js} +1 -1
- package/dist/cjs/{window-resize.decorator-46199538.js → window-resize.decorator-c92820b6.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-app/bal-app.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel-item/bal-carousel-item.js +5 -5
- package/dist/collection/components/bal-carousel/bal-carousel.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +4 -9
- package/dist/collection/components/bal-footer/bal-footer.css +1 -1
- package/dist/collection/components/bal-footer/bal-footer.i18n.js +32 -0
- package/dist/collection/components/bal-footer/bal-footer.js +4 -9
- package/dist/collection/components/bal-stage/bal-stage-image/bal-stage-image.js +4 -4
- package/dist/collection/components/bal-tabs/bal-tabs.js +3 -2
- 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 +247 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/swiper/swiper.util.js +25 -5
- package/dist/esm/app-globals-83570026.js +5 -0
- package/dist/esm/bal-app.entry.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +17 -20
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-footer.entry.js +37 -10
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-stage_6.entry.js +3 -3
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +7 -6
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-ba81f8bc.js → breakpoints.decorator-27d35f52.js} +1 -1
- package/dist/esm/{breakpoints.subject-fe3d9635.js → breakpoints.subject-10396a8b.js} +1 -1
- package/dist/esm/{app-globals-92fef8fd.js → global-88c7b04e.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-22c1bebc.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{swiper.util-3e090584.js → swiper.util-0589b550.js} +25 -5
- package/dist/esm/{tokens.esm-7af7e766.js → tokens.esm-071cad4e.js} +1 -1
- package/dist/esm/{window-resize.decorator-e4edf10d.js → window-resize.decorator-96bfb011.js} +1 -1
- package/dist/esm-es5/app-globals-83570026.js +1 -0
- package/dist/esm-es5/bal-app.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-doc-app.entry.js +1 -0
- package/dist/esm-es5/bal-footer.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-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-27d35f52.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-fe3d9635.js → breakpoints.subject-10396a8b.js} +1 -1
- package/dist/esm-es5/global-88c7b04e.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-22c1bebc.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/swiper.util-0589b550.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-e4edf10d.js → window-resize.decorator-96bfb011.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel-item/bal-carousel-item.d.ts +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +1 -2
- package/dist/types/components/bal-footer/bal-footer.d.ts +0 -1
- package/dist/types/components/bal-footer/bal-footer.i18n.d.ts +5 -0
- package/dist/types/components/bal-stage/bal-stage-image/bal-stage-image.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 +37 -0
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
- package/dist/types/utils/swiper/swiper.util.d.ts +2 -1
- package/package.json +7 -7
- package/dist/baloise-design-system/p-05986dc964.entry.js +0 -1
- package/dist/baloise-design-system/p-1050501432.entry.js +0 -1
- package/dist/baloise-design-system/p-12ff7815.js +0 -1
- package/dist/baloise-design-system/p-26ee09df4f.entry.js +0 -1
- package/dist/baloise-design-system/p-2ee0b73b2a.system.entry.js +0 -1
- package/dist/baloise-design-system/p-345ec2f4.system.js +0 -1
- package/dist/baloise-design-system/p-4d67c12e48.system.entry.js +0 -1
- package/dist/baloise-design-system/p-68e05bd5.js +0 -1
- package/dist/baloise-design-system/p-70f7b546.system.js +0 -1
- package/dist/baloise-design-system/p-b7f9f79521.system.entry.js +0 -1
- package/dist/baloise-design-system/p-bfde7642ba.entry.js +0 -1
- package/dist/esm-es5/app-globals-92fef8fd.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-ba81f8bc.js +0 -1
- package/dist/esm-es5/swiper.util-3e090584.js +0 -1
- /package/dist/baloise-design-system/{p-c69b8ae2.js → p-734e49a8.js} +0 -0
- /package/dist/baloise-design-system/{p-376e5378.system.js → p-c657dfd5.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-7af7e766.js → tokens.esm-071cad4e.js} +0 -0
package/components/bal-footer.js
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as __decorate, a as __metadata } from './tslib.es6.js';
|
|
3
|
-
import './array.js';
|
|
4
3
|
import './index4.js';
|
|
4
|
+
import './index5.js';
|
|
5
5
|
import { c as commonjsGlobal } from './_commonjsHelpers.js';
|
|
6
6
|
import { B as BEM } from './bem.js';
|
|
7
7
|
import { L as Logger } from './log.js';
|
|
8
8
|
import { p as rIC } from './helpers.js';
|
|
9
|
-
import {
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$6 } from './bal-icon2.js';
|
|
13
|
-
import { d as defineCustomElement$5 } from './bal-input-group2.js';
|
|
14
|
-
import { d as defineCustomElement$4 } from './bal-logo2.js';
|
|
15
|
-
import { d as defineCustomElement$3 } from './bal-option2.js';
|
|
16
|
-
import { d as defineCustomElement$2 } from './bal-stack2.js';
|
|
9
|
+
import { d as defineCustomElement$4 } from './bal-icon2.js';
|
|
10
|
+
import { d as defineCustomElement$3 } from './bal-input-group2.js';
|
|
11
|
+
import { d as defineCustomElement$2 } from './bal-logo2.js';
|
|
17
12
|
import { e as updateBalLanguage } from './config.utils.js';
|
|
18
13
|
import { d as defaultConfig } from './config.default.js';
|
|
19
14
|
import { L as ListenToConfig } from './config.decorator.js';
|
|
@@ -206,7 +201,40 @@ const loadSocialMediaLinks = (lang, region = 'CH') => {
|
|
|
206
201
|
.then(res => res);
|
|
207
202
|
};
|
|
208
203
|
|
|
209
|
-
const
|
|
204
|
+
const i18nBalFooter = {
|
|
205
|
+
en: {
|
|
206
|
+
name: 'English',
|
|
207
|
+
},
|
|
208
|
+
fr: {
|
|
209
|
+
name: 'Français',
|
|
210
|
+
},
|
|
211
|
+
it: {
|
|
212
|
+
name: 'Italiano',
|
|
213
|
+
},
|
|
214
|
+
nl: {
|
|
215
|
+
name: 'Nederlands',
|
|
216
|
+
},
|
|
217
|
+
es: {
|
|
218
|
+
name: 'Español',
|
|
219
|
+
},
|
|
220
|
+
pt: {
|
|
221
|
+
name: 'Português',
|
|
222
|
+
},
|
|
223
|
+
sv: {
|
|
224
|
+
name: 'Svenska',
|
|
225
|
+
},
|
|
226
|
+
fi: {
|
|
227
|
+
name: 'Suomi',
|
|
228
|
+
},
|
|
229
|
+
de: {
|
|
230
|
+
name: 'Deutsch',
|
|
231
|
+
},
|
|
232
|
+
pl: {
|
|
233
|
+
name: 'Polski',
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
const balFooterCss = ":root{--bal-footer-font-family:var(--bal-font-family-text);--bal-footer-background:var(--bal-color-primary);--bal-footer-color:var(--bal-color-text-white);--bal-footer-language-color-hover:var(--bal-color-light-blue-2);--bal-footer-language-background-hover:var(--bal-color-light-blue-2);--bal-footer-language-color-active:var(--bal-color-light-blue-3);--bal-footer-language-background-active:var(--bal-color-light-blue-3)}.bal-footer{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;position:static;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.bal-footer__slot{color:var(--bal-footer-color)}.bal-footer__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-large)}@media screen and (min-width: 769px),print{.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}@media screen and (min-width: 1024px){.bal-footer__inner{padding-top:var(--bal-space-large);padding-bottom:var(--bal-space-large)}}.bal-footer__inner__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--bal-space-large)}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper{gap:var(--bal-space-medium-tablet)}}.bal-footer__inner__wrapper__header-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-direction:row;flex-direction:row}.bal-footer__inner__wrapper__header-container__language{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__list{min-width:105%;right:0 !important;left:auto !important}.bal-footer__inner__wrapper__header-container__language bal-icon,.bal-footer__inner__wrapper__header-container__language .input{cursor:pointer;min-width:auto !important}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear{position:absolute;left:0}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language .bal-dropdown__rear circle{fill:var(--bal-color-white)}.bal-footer__inner__wrapper__header-container__language .bal-dropdown__native{background:rgba(0,0,0,0);color:var(--bal-color-white);border:none;font-weight:var(--bal-font-weight-bold);cursor:pointer;padding-left:1.5rem}.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__rear circle{fill:var(--bal-footer-language-background-hover)}.bal-footer__inner__wrapper__header-container__language:hover .input,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__native,.bal-footer__inner__wrapper__header-container__language:hover .bal-dropdown__root__content{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear svg,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear g,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear path,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__rear circle{fill:var(--bal-footer-language-background-active)}.bal-footer__inner__wrapper__header-container__language:active .input,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__native,.bal-footer__inner__wrapper__header-container__language:active .bal-dropdown__root__content{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group{background:rgba(0,0,0,0);border:none;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group:hover{background:rgba(0,0,0,0) !important}.bal-footer__inner__wrapper__header-container__language__wrapper .bal-input-group bal-dropdown{min-width:5rem}.bal-footer__inner__wrapper__header-container__logo{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bal-footer__inner__wrapper__links-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width: 769px),print{.bal-footer__inner__wrapper__links-container{-ms-flex-direction:column;flex-direction:column}}@media screen and (min-width: 1024px){.bal-footer__inner__wrapper__links-container{-ms-flex-direction:row;flex-direction:row}}.bal-footer__inner__wrapper__links-container__legal-links{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop)}.bal-footer__inner__wrapper__links-container__legal-links a{font-size:var(--bal-text-size-small) !important}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__legal-links{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;gap:var(--bal-space-normal)}}.bal-footer__inner__wrapper__links-container__social-media-links{-ms-flex-align:center;align-items:center;gap:var(--bal-space-large-desktop);padding:var(--bal-space-normal) var(--bal-space-normal) var(--bal-space-normal) 0}@media screen and (min-width: 769px)and (max-width: 1023px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large)}}@media screen and (max-width: 768px){.bal-footer__inner__wrapper__links-container__social-media-links{padding-bottom:var(--bal-space-large);-ms-flex-pack:center;justify-content:center;width:100%;padding:var(--bal-space-normal) 0 var(--bal-space-normal) 0}}";
|
|
210
238
|
const BalFooterStyle0 = balFooterCss;
|
|
211
239
|
|
|
212
240
|
const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement {
|
|
@@ -293,21 +321,16 @@ const Footer = /*@__PURE__*/ proxyCustomElement(class Footer extends HTMLElement
|
|
|
293
321
|
const elLogo = elHeaderContainer.element('logo');
|
|
294
322
|
const elLanguage = elHeaderContainer.element('language');
|
|
295
323
|
const elWrapper = elLanguage.element('wrapper');
|
|
296
|
-
elLanguage.element('icon');
|
|
297
324
|
const elLegalLinks = elLinksContainer.element('legal-links');
|
|
298
325
|
const elSocialMediaLinks = elLinksContainer.element('social-media-links');
|
|
299
|
-
return (h(Host, { key: '
|
|
326
|
+
return (h(Host, { key: 'd9fcf2b0c58a8c8b2ec81256a94a5555281f275e', class: Object.assign({}, block.class()) }, h("footer", { key: '24691e174da80b7b0837d6ef7093abf1e0671207', class: Object.assign({}, elInner.class()) }, h("div", { key: '80a0395ec6f83fed9b67687f9f0169550e1e8a6e', class: Object.assign({}, elInnerWrapper.class()) }, h("div", { key: '1d5656c103792e725267aee630f5c89717cddcd4', class: Object.assign(Object.assign({ container: true }, elContainer.class()), elHeaderContainer.class()) }, h("div", { key: '91d7235ce53fb56712375194709d70d32a40aad3', class: Object.assign({}, elLogo.class()) }, h("bal-logo", { key: '9f20c92b2fca4660daec9d5faa74303e4027c81e', color: "white" })), h("div", { key: 'e395ba338e3dcd7fffd8f07d6ba3ab0e26d5cb85', class: Object.assign({}, elLanguage.class()), style: {
|
|
300
327
|
display: this.hideLanguageSelection || this.allowedLanguages.length <= 1 ? 'none' : 'flex',
|
|
301
|
-
} }, h("div", { key: '
|
|
302
|
-
var _a;
|
|
303
|
-
stopEventBubbling(el);
|
|
304
|
-
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.open();
|
|
305
|
-
} }), h("bal-dropdown", { key: '23540be5a9fddcc7c1e5368dfa4858ab1da720f5', ref: el => (this.selectEl = el), value: this.language, onBalChange: event => this.changeLanguage(event.detail), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("bal-option", { key: language, label: language.toLocaleUpperCase(), value: language }, language.toLocaleUpperCase())))))))), h("div", { key: '2580651725f59eb95ff734f9499f80635580ecd9', class: Object.assign({}, elSlot.class()) }, h("slot", { key: 'f6fef80d09d9d7213c975957b917019ce3299d73' })), h("div", { key: 'eefbce7897b7935f18b61e53d4dc19ded1806bc7', class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { key: '0eee61cb3cbdaaf2af5c135ef472b9579e77b1a9', class: Object.assign({}, elSocialMediaLinks.class()), style: {
|
|
328
|
+
} }, h("div", { key: 'dfc805fd51ea9b5625de046a94129df428e7d2d0', class: Object.assign({}, elWrapper.class()) }, h("bal-input-group", { key: '0d203884c1f437669690a70df96fc703427f751b' }, h("bal-icon", { key: '9551ba6bc1fc1b36d67542fe40d841dee78d3daa', class: 'bal-dropdown__rear', name: "web", color: "white" }), h("select", { key: '721a9a291639d6d4357f179b302870cf6f2852af', id: "bubu", class: 'bal-dropdown__native', onChange: event => this.changeLanguage(event.target.value), "data-testid": "bal-footer-language" }, this.allowedLanguages.map(language => (h("option", { key: language, value: language, selected: language === this.language }, language.toLocaleUpperCase() + ' - ' + i18nBalFooter[language].name)))))))), h("div", { key: '26575b69cba20d83a8124bca1697b9cc7ee38246', class: Object.assign({}, elSlot.class()) }, h("slot", { key: '48e62b90d62825693e73b522ed454da7846457d2' })), h("div", { key: '8fdf21a11da23eb1489c95d21f6726ab53136ffc', class: Object.assign(Object.assign({ container: true }, elContainer.class()), elLinksContainer.class()) }, h("div", { key: '591b9f51cb1ff3d4dee431daaca23ad38bcbac7e', class: Object.assign({}, elSocialMediaLinks.class()), style: {
|
|
306
329
|
display: !this.showSocialMedia ? 'none' : 'flex',
|
|
307
330
|
} }, this.socialMediaLinks.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
|
|
308
331
|
'link': true,
|
|
309
332
|
'is-inverted': true,
|
|
310
|
-
} }, h("bal-icon", { name: link.label.toLowerCase() }))))), h("div", { key: '
|
|
333
|
+
} }, h("bal-icon", { name: link.label.toLowerCase() }))))), h("div", { key: '6496b1f14bedc754c4ba873c6ead58e1476c76ff', class: Object.assign({}, elLegalLinks.class()), style: { display: this.hideLinks ? 'none' : 'flex' } }, this.links.map(link => (h("a", { key: link.link, href: link.link, target: "_blank", class: {
|
|
311
334
|
'link': true,
|
|
312
335
|
'is-light': true,
|
|
313
336
|
} }, link.label)))))))));
|
|
@@ -341,44 +364,24 @@ function defineCustomElement$1() {
|
|
|
341
364
|
if (typeof customElements === "undefined") {
|
|
342
365
|
return;
|
|
343
366
|
}
|
|
344
|
-
const components = ["bal-footer", "bal-
|
|
367
|
+
const components = ["bal-footer", "bal-icon", "bal-input-group", "bal-logo"];
|
|
345
368
|
components.forEach(tagName => { switch (tagName) {
|
|
346
369
|
case "bal-footer":
|
|
347
370
|
if (!customElements.get(tagName)) {
|
|
348
371
|
customElements.define(tagName, Footer);
|
|
349
372
|
}
|
|
350
373
|
break;
|
|
351
|
-
case "bal-checkbox":
|
|
352
|
-
if (!customElements.get(tagName)) {
|
|
353
|
-
defineCustomElement$8();
|
|
354
|
-
}
|
|
355
|
-
break;
|
|
356
|
-
case "bal-dropdown":
|
|
357
|
-
if (!customElements.get(tagName)) {
|
|
358
|
-
defineCustomElement$7();
|
|
359
|
-
}
|
|
360
|
-
break;
|
|
361
374
|
case "bal-icon":
|
|
362
|
-
if (!customElements.get(tagName)) {
|
|
363
|
-
defineCustomElement$6();
|
|
364
|
-
}
|
|
365
|
-
break;
|
|
366
|
-
case "bal-input-group":
|
|
367
|
-
if (!customElements.get(tagName)) {
|
|
368
|
-
defineCustomElement$5();
|
|
369
|
-
}
|
|
370
|
-
break;
|
|
371
|
-
case "bal-logo":
|
|
372
375
|
if (!customElements.get(tagName)) {
|
|
373
376
|
defineCustomElement$4();
|
|
374
377
|
}
|
|
375
378
|
break;
|
|
376
|
-
case "bal-
|
|
379
|
+
case "bal-input-group":
|
|
377
380
|
if (!customElements.get(tagName)) {
|
|
378
381
|
defineCustomElement$3();
|
|
379
382
|
}
|
|
380
383
|
break;
|
|
381
|
-
case "bal-
|
|
384
|
+
case "bal-logo":
|
|
382
385
|
if (!customElements.get(tagName)) {
|
|
383
386
|
defineCustomElement$2();
|
|
384
387
|
}
|
|
@@ -8,13 +8,13 @@ const StageImage = /*@__PURE__*/ proxyCustomElement(class StageImage extends HTM
|
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.imageInheritAttributes = {};
|
|
11
|
-
this.
|
|
11
|
+
this.isOnLoadEventDone = false;
|
|
12
12
|
this.srcSet = undefined;
|
|
13
13
|
this.fallback = undefined;
|
|
14
14
|
}
|
|
15
15
|
componentDidLoad() {
|
|
16
16
|
rOnLoad(() => {
|
|
17
|
-
this.
|
|
17
|
+
this.isOnLoadEventDone = true;
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
componentWillLoad() {
|
|
@@ -23,13 +23,13 @@ const StageImage = /*@__PURE__*/ proxyCustomElement(class StageImage extends HTM
|
|
|
23
23
|
render() {
|
|
24
24
|
const block = BEM.block('stage-image');
|
|
25
25
|
const imageSrc = this.fallback ? this.fallback : this.srcSet.split(',')[0];
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '9fd029b0b8b95896c661566bdef677b4e8bddd78', class: Object.assign({}, block.class()) }, this.isOnLoadEventDone ? (h("img", Object.assign({ src: imageSrc, srcset: this.srcSet, sizes: "100vw" }, this.imageInheritAttributes))) : ('')));
|
|
27
27
|
}
|
|
28
28
|
get el() { return this; }
|
|
29
29
|
}, [0, "bal-stage-image", {
|
|
30
30
|
"srcSet": [1, "src-set"],
|
|
31
31
|
"fallback": [1],
|
|
32
|
-
"
|
|
32
|
+
"isOnLoadEventDone": [32]
|
|
33
33
|
}]);
|
|
34
34
|
function defineCustomElement$1() {
|
|
35
35
|
if (typeof customElements === "undefined") {
|
package/components/bal-tabs2.js
CHANGED
|
@@ -429,6 +429,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
429
429
|
this.updateSwiper();
|
|
430
430
|
}
|
|
431
431
|
componentDidLoad() {
|
|
432
|
+
this.swiper.componentDidLoad();
|
|
432
433
|
this.onOptionChange();
|
|
433
434
|
rOnLoad(() => {
|
|
434
435
|
this.enableLineRender = true;
|
|
@@ -712,9 +713,9 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
712
713
|
.filter(t => this.isTabActive(t))
|
|
713
714
|
.map(t => t.label)
|
|
714
715
|
.join(',');
|
|
715
|
-
return (h(Host, { key: '
|
|
716
|
+
return (h(Host, { key: 'dcc4d98f0313e3ce2652590c48ef6e71a953ce67', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('navbar').class(this.inNavbar)), block.modifier('vertical').class(isVertical)), block.modifier('fullwidth').class(this.expanded || this.fullwidth)), block.modifier('accordion').class(this.accordion)), block.modifier('animated').class(this.animated)), block.modifier('expanding').class(this.accordionState === 8 /* AccordionState.Expanding */)), block.modifier('expanded').class(this.accordionState === 4 /* AccordionState.Expanded */)), block.modifier('collapsing').class(this.accordionState === 2 /* AccordionState.Collapsing */)), block.modifier('collapsed').class(this.accordionState === 1 /* AccordionState.Collapsed */)), "data-value": dataValue, "data-label": dataLabel }, isSelect ? (h(TabSelect, { value: this.value, items: tabs, onSelectTab: this.onSelectTab })) : (h(TabNav, { swiper: this.swiper, items: tabs, isLinkList: isLinkList, tabsId: this.tabsId, clickable: this.clickable, accordion: this.accordion, isAccordionOpen: this.isAccordionOpen, lineActive: valueExists, lineHidden: !this.enableLineRender, inverted: isInverted, animated: this.animated, context: this.context, border: hasBorder, spaceless: this.spaceless, expanded: this.expanded, isMobile: isMobile, isTouch: isTouch, isVertical: isVertical, inNavbar: this.inNavbar, iconPosition: this.iconPosition, showSwiperControls: !this.isVertical(), verticalColSize: this.verticalColSize, onSelectTab: this.onSelectTab, dimInactiveElements: this.dimInactiveElements })), h("div", { key: 'd5481e5593ebf83618b226ff27ddf583cf3cc653', part: contentPart, class: Object.assign(Object.assign(Object.assign({}, contentEl.class()), contentEl.modifier('vertical').class(this.isVertical())), contentEl
|
|
716
717
|
.modifier('hidden')
|
|
717
|
-
.class(this.context === 'meta' || this.context === 'navbar' || this.context === 'navigation')) }, h("div", { key: '
|
|
718
|
+
.class(this.context === 'meta' || this.context === 'navbar' || this.context === 'navigation')) }, h("div", { key: 'b4053d5ff5e3191a0eeac1f12bae0f9b1fb98688', id: this.tabsId, class: Object.assign({}, contentEl.element('wrapper').class()) }, h("slot", { key: 'fd8457eae65ec8cccd8ba821b3ec91794d242107' })))));
|
|
718
719
|
}
|
|
719
720
|
get el() { return this; }
|
|
720
721
|
static get watchers() { return {
|
package/components/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
2
|
export { F as FileUploadRejectionReason } from './bal-file-upload.type.js';
|
|
4
3
|
export { i as i18nBalDate } from './bal-date.i18n.js';
|
|
@@ -6,10 +5,7 @@ export { i as i18nBalClose } from './bal-close.i18n.js';
|
|
|
6
5
|
export { i as i18nBalTimeInput } from './bal-time-input.i18n.js';
|
|
7
6
|
export { i as i18nBalInputStepper } from './bal-input-stepper.i18n.js';
|
|
8
7
|
export { i as i18nBalLabel } from './bal-label.i18n.js';
|
|
9
|
-
|
|
10
|
-
export { b as balBrowser } from './browser.js';
|
|
11
|
-
import { d as defaultConfig } from './config.default.js';
|
|
12
|
-
export { d as defaultConfig } from './config.default.js';
|
|
8
|
+
export { a as BalSnackbarController, B as BalToastController, c as balSnackbarController, b as balToastController, i as initialize, i as initializeBaloiseDesignSystem, s as setupConfig } from './initialize.js';
|
|
13
9
|
export { n as newBalOption } from './option.js';
|
|
14
10
|
export { n as newBalStepOption } from './bal-step.util.js';
|
|
15
11
|
export { n as newBalTabOption } from './bal-tab.util.js';
|
|
@@ -17,6 +13,8 @@ import { g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
|
17
13
|
export { c as componentOnReady, h as deepReady, g as getAppRoot, j as isDescendant, s as shallowReady, i as wait, b as waitAfterFramePaint, d as waitAfterIdleCallback, e as waitAfterLargestContentfulPaintCallback, w as waitForComponent, a as waitForDesignSystem, f as waitOnLoadEventCallback } from './helpers.js';
|
|
18
14
|
export { s as scrollToFirstInvalidField } from './form.js';
|
|
19
15
|
export { B as BalScrollHandler } from './scroll.js';
|
|
16
|
+
import { b as balBrowser } from './browser.js';
|
|
17
|
+
export { b as balBrowser } from './browser.js';
|
|
20
18
|
import { b as balDevice } from './device.js';
|
|
21
19
|
export { B as BalDevice, b as balDevice } from './device.js';
|
|
22
20
|
export { I as INVALID_VALUE } from './mask-util.js';
|
|
@@ -24,175 +22,11 @@ import { g as getOverlays, a as getOverlay } from './overlays.js';
|
|
|
24
22
|
import { B as BalWindowResizeListener, b as balBreakpoints } from './breakpoints.subject.js';
|
|
25
23
|
export { c as BalBreakpointSubject, d as BalBreakpointsUtil, a as balBreakpointSubject, b as balBreakpoints } from './breakpoints.subject.js';
|
|
26
24
|
export { a as attachToConfig, d as detachFromConfig, o as onBalConfigChange, u as updateBalAllowedLanguages, b as updateBalAnimated, c as updateBalIcons, e as updateBalLanguage, f as updateBalRegion, g as useBalConfig } from './config.utils.js';
|
|
25
|
+
export { d as defaultConfig } from './config.default.js';
|
|
27
26
|
import { S as Subject } from './listener.js';
|
|
28
27
|
export { B as BalSwipeSubject } from './swipe.subject.js';
|
|
29
28
|
export { B as BalDate } from './date.js';
|
|
30
29
|
|
|
31
|
-
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
32
|
-
const BALOISE_ANIMATION_KEY = 'baloise-animated';
|
|
33
|
-
|
|
34
|
-
class Config {
|
|
35
|
-
constructor() {
|
|
36
|
-
this._componentObservers = [];
|
|
37
|
-
this._observers = [];
|
|
38
|
-
this._config = defaultConfig;
|
|
39
|
-
}
|
|
40
|
-
get locale() {
|
|
41
|
-
return `${this._config.language}-${this._config.region}`;
|
|
42
|
-
}
|
|
43
|
-
get region() {
|
|
44
|
-
return this._config.region;
|
|
45
|
-
}
|
|
46
|
-
set region(region) {
|
|
47
|
-
if (region !== this._config.region) {
|
|
48
|
-
this._config.region = region;
|
|
49
|
-
this._notify();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
get language() {
|
|
53
|
-
return this._config.language;
|
|
54
|
-
}
|
|
55
|
-
set language(language) {
|
|
56
|
-
if (language !== this._config.language) {
|
|
57
|
-
if (this._config.allowedLanguages.includes(language)) {
|
|
58
|
-
this._config.language = language;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this._config.language = this._config.fallbackLanguage;
|
|
62
|
-
}
|
|
63
|
-
this._notify();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
get allowedLanguages() {
|
|
67
|
-
return this._config.allowedLanguages;
|
|
68
|
-
}
|
|
69
|
-
set allowedLanguages(allowedLanguages) {
|
|
70
|
-
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
71
|
-
this._config.allowedLanguages = allowedLanguages;
|
|
72
|
-
this._notify();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
get icons() {
|
|
76
|
-
return this._config.icons;
|
|
77
|
-
}
|
|
78
|
-
set icons(icons) {
|
|
79
|
-
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
80
|
-
this._notify();
|
|
81
|
-
}
|
|
82
|
-
get logger() {
|
|
83
|
-
return this._config.logger;
|
|
84
|
-
}
|
|
85
|
-
set logger(logger) {
|
|
86
|
-
this._config.logger = Object.assign({}, logger);
|
|
87
|
-
this._notify();
|
|
88
|
-
}
|
|
89
|
-
get animated() {
|
|
90
|
-
return this._config.animated;
|
|
91
|
-
}
|
|
92
|
-
set animated(animated) {
|
|
93
|
-
this._config.animated = animated;
|
|
94
|
-
this._notify();
|
|
95
|
-
}
|
|
96
|
-
get httpFormSubmit() {
|
|
97
|
-
return this._config.httpFormSubmit;
|
|
98
|
-
}
|
|
99
|
-
set httpFormSubmit(httpFormSubmit) {
|
|
100
|
-
this._config.httpFormSubmit = httpFormSubmit;
|
|
101
|
-
this._notify();
|
|
102
|
-
}
|
|
103
|
-
attach(observer) {
|
|
104
|
-
const isExist = this._observers.includes(observer);
|
|
105
|
-
if (isExist) {
|
|
106
|
-
return console.log('Subject: Observer has been attached already.');
|
|
107
|
-
}
|
|
108
|
-
this._observers.push(observer);
|
|
109
|
-
observer.configChanged(this._config);
|
|
110
|
-
}
|
|
111
|
-
detach(observer) {
|
|
112
|
-
const observerIndex = this._observers.indexOf(observer);
|
|
113
|
-
if (observerIndex === -1) {
|
|
114
|
-
return console.log('Subject: Nonexistent observer.');
|
|
115
|
-
}
|
|
116
|
-
this._observers.splice(observerIndex, 1);
|
|
117
|
-
}
|
|
118
|
-
attachComponent(observer) {
|
|
119
|
-
const isExist = this._componentObservers.includes(observer);
|
|
120
|
-
if (isExist) {
|
|
121
|
-
return console.log('Subject: Observer has been attached already.');
|
|
122
|
-
}
|
|
123
|
-
this._componentObservers.push(observer);
|
|
124
|
-
observer.configChanged(this._config);
|
|
125
|
-
}
|
|
126
|
-
detachComponent(observer) {
|
|
127
|
-
const observerIndex = this._componentObservers.indexOf(observer);
|
|
128
|
-
if (observerIndex === -1) {
|
|
129
|
-
return console.log('Subject: Nonexistent observer.');
|
|
130
|
-
}
|
|
131
|
-
this._componentObservers.splice(observerIndex, 1);
|
|
132
|
-
}
|
|
133
|
-
toString() {
|
|
134
|
-
return JSON.stringify(this._config);
|
|
135
|
-
}
|
|
136
|
-
reset(config) {
|
|
137
|
-
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
138
|
-
this._notify(false);
|
|
139
|
-
}
|
|
140
|
-
_notify(all = true) {
|
|
141
|
-
for (const observer of this._componentObservers) {
|
|
142
|
-
observer.configChanged(this._config);
|
|
143
|
-
}
|
|
144
|
-
if (all) {
|
|
145
|
-
for (const observer of this._observers) {
|
|
146
|
-
observer.configChanged(this._config);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (balBrowser.hasWindow) {
|
|
150
|
-
saveConfig(window, this._config);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const config = /*@__PURE__*/ new Config();
|
|
155
|
-
const configFromSession = (win) => {
|
|
156
|
-
try {
|
|
157
|
-
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
158
|
-
return configStr !== null ? JSON.parse(configStr) : {};
|
|
159
|
-
}
|
|
160
|
-
catch (e) {
|
|
161
|
-
return {};
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
const configFromLocalStorage = (win) => {
|
|
165
|
-
try {
|
|
166
|
-
const animated = JSON.parse(win.localStorage.getItem(BALOISE_ANIMATION_KEY));
|
|
167
|
-
if (animated !== null) {
|
|
168
|
-
return {
|
|
169
|
-
animated,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return {};
|
|
173
|
-
}
|
|
174
|
-
catch (e) {
|
|
175
|
-
return {};
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const saveConfig = (win, c) => {
|
|
179
|
-
try {
|
|
180
|
-
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
181
|
-
}
|
|
182
|
-
catch (e) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const setupConfig = (userConfig = {}, win = {}) => {
|
|
188
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
189
|
-
win = window;
|
|
190
|
-
}
|
|
191
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
192
|
-
config.reset(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), configFromLocalStorage(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
|
|
193
|
-
win.BaloiseDesignSystem.config = config;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
30
|
const i18nBalFieldLabel = {
|
|
197
31
|
de: {
|
|
198
32
|
optional: ' (optional)',
|
|
@@ -226,139 +60,6 @@ const i18nBalFieldLabel = {
|
|
|
226
60
|
},
|
|
227
61
|
};
|
|
228
62
|
|
|
229
|
-
class BalNoticeController {
|
|
230
|
-
constructor(options) {
|
|
231
|
-
this.options = options;
|
|
232
|
-
this.container = null;
|
|
233
|
-
this.queue = [];
|
|
234
|
-
this.preQueue = [];
|
|
235
|
-
this.queueLimit = 5;
|
|
236
|
-
}
|
|
237
|
-
create(options) {
|
|
238
|
-
if (balBrowser.hasDocument) {
|
|
239
|
-
this.setupContainer();
|
|
240
|
-
const clone = this.findClone(options);
|
|
241
|
-
if (clone === undefined) {
|
|
242
|
-
const el = document.createElement(this.options.tag);
|
|
243
|
-
Object.assign(el, options);
|
|
244
|
-
el.addEventListener('balClose', ev => {
|
|
245
|
-
this.removeFromQueue(ev.detail);
|
|
246
|
-
});
|
|
247
|
-
this.preQueue.push(el);
|
|
248
|
-
this.updateQueue();
|
|
249
|
-
return el;
|
|
250
|
-
}
|
|
251
|
-
return clone;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
setQueue(queueLimit) {
|
|
255
|
-
this.queueLimit = queueLimit;
|
|
256
|
-
}
|
|
257
|
-
async dismissAll() {
|
|
258
|
-
var _a;
|
|
259
|
-
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
260
|
-
if (elements) {
|
|
261
|
-
const closingQueue = [];
|
|
262
|
-
for (let index = 0; index < elements.length; index++) {
|
|
263
|
-
const el = elements[index];
|
|
264
|
-
if (el.close) {
|
|
265
|
-
closingQueue.push(el.close());
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
await Promise.all(closingQueue);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @deprecated use dismissAll instead
|
|
273
|
-
*/
|
|
274
|
-
async clearAll() {
|
|
275
|
-
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
276
|
-
return this.dismissAll();
|
|
277
|
-
}
|
|
278
|
-
findClone(options) {
|
|
279
|
-
for (let index = 0; index < this.queue.length; index++) {
|
|
280
|
-
const el = this.queue[index];
|
|
281
|
-
if (el.message === options.message && el.color === options.color) {
|
|
282
|
-
return el;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return undefined;
|
|
286
|
-
}
|
|
287
|
-
setupContainer() {
|
|
288
|
-
if (balBrowser.hasDocument) {
|
|
289
|
-
const containerId = `${this.options.tag}-container`;
|
|
290
|
-
this.container = document.getElementById(containerId);
|
|
291
|
-
if (this.container)
|
|
292
|
-
return;
|
|
293
|
-
if (!this.container) {
|
|
294
|
-
this.container = document.createElement('bal-notices');
|
|
295
|
-
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
296
|
-
this.container.id = containerId;
|
|
297
|
-
}
|
|
298
|
-
document.body.appendChild(this.container);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
updateQueue() {
|
|
302
|
-
var _a;
|
|
303
|
-
if (this.queue.length < this.queueLimit) {
|
|
304
|
-
const el = this.preQueue.shift();
|
|
305
|
-
if (el && this.container) {
|
|
306
|
-
this.queue.push(el);
|
|
307
|
-
this.container.insertAdjacentElement('beforeend', el);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
if (this.queue.length === 0) {
|
|
311
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
removeFromQueue(toastId) {
|
|
315
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
316
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
class BalToastController extends BalNoticeController {
|
|
321
|
-
constructor() {
|
|
322
|
-
super({
|
|
323
|
-
tag: 'bal-toast',
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
create(options) {
|
|
327
|
-
return super.create(options);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
const balToastController = new BalToastController();
|
|
331
|
-
|
|
332
|
-
class BalSnackbarController extends BalNoticeController {
|
|
333
|
-
constructor() {
|
|
334
|
-
super({
|
|
335
|
-
tag: 'bal-snackbar',
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
create(options) {
|
|
339
|
-
return super.create(options);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
const balSnackbarController = new BalSnackbarController();
|
|
343
|
-
|
|
344
|
-
// generated by .build/version.js
|
|
345
|
-
const VERSION = '17.2.2';
|
|
346
|
-
|
|
347
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
348
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
349
|
-
win = window;
|
|
350
|
-
}
|
|
351
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
352
|
-
if (platformConfig) {
|
|
353
|
-
setPlatformHelpers(platformConfig);
|
|
354
|
-
}
|
|
355
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
356
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
357
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
358
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
359
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
360
|
-
};
|
|
361
|
-
|
|
362
63
|
const newBalCheckboxOption = (option) => {
|
|
363
64
|
return Object.assign(Object.assign({ interface: 'checkbox', labelHidden: false, flat: false, disabled: false, readonly: false, required: false, nonSubmit: false, invalid: false, checked: false }, option), { label: '', html: option.label });
|
|
364
65
|
};
|
|
@@ -476,4 +177,4 @@ const isPlatform = (winOrPlatform, platform) => {
|
|
|
476
177
|
const NewBalOptionValue = newBalOptionValue;
|
|
477
178
|
const NewBalSingleOptionValue = newBalSingleOptionValue;
|
|
478
179
|
|
|
479
|
-
export { BalModalController, BalOrientationSubject,
|
|
180
|
+
export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
|