@baloise/ds-core 17.4.0 → 17.4.1-nightly.20250210
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-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-segment-item.js +2 -1
- package/components/index.js +7 -314
- package/components/initialize.js +312 -0
- 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-3e039b9b6b.system.entry.js → p-018deb07d8.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-04f3285b8b.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-ccb73909c6.entry.js → p-0a0f01e1bc.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cbef3146.system.js → p-0c434573.system.js} +1 -1
- package/dist/baloise-design-system/{p-e6b2f1a846.entry.js → p-1a175b1b5a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-824353e256.entry.js → p-1dcd082900.entry.js} +1 -1
- package/dist/baloise-design-system/p-273fb2c2.system.js +1 -1
- package/dist/baloise-design-system/{p-f8c7a05b49.entry.js → p-45bbecb928.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7dbfc01060.system.entry.js → p-46bc8396cc.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-649e542e.system.js → p-540bfa19.system.js} +1 -1
- package/dist/baloise-design-system/{p-c70043bd61.system.entry.js → p-56e49af2a3.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-04e32e17e9.entry.js → p-59a72ef6ce.entry.js} +1 -1
- package/dist/baloise-design-system/{p-1cbe7106ba.system.entry.js → p-660993223b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-75fedb78c3.entry.js → p-6b88e135cc.entry.js} +1 -1
- package/dist/baloise-design-system/{p-242ac835e0.system.entry.js → p-6fc99a7590.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-396641837c.entry.js → p-9568d39ad2.entry.js} +1 -1
- package/dist/baloise-design-system/{p-03470b7c.system.js → p-95ca3337.system.js} +1 -1
- package/dist/baloise-design-system/{p-72a32388f4.system.entry.js → p-97109c937c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-c2f12a9f5c.system.entry.js → p-99236ee57b.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-9fbf3690.system.js +1 -0
- package/dist/baloise-design-system/{p-6267186e70.entry.js → p-a2c60c7b3b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3bc55789.js → p-b0969f74.js} +1 -1
- package/dist/baloise-design-system/{p-78dada2c23.system.entry.js → p-b1111f6968.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-b21f2874.system.js +1 -0
- package/dist/baloise-design-system/{p-a3141b6fbf.system.entry.js → p-b36f679177.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-da6e6695.js → p-b9197366.js} +1 -1
- package/dist/baloise-design-system/{p-c8fae04995.entry.js → p-baa94dab21.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5940d4c2.js → p-c19f5f5b.js} +1 -1
- package/dist/baloise-design-system/{p-823eeecd.system.js → p-c2864cb2.system.js} +1 -1
- package/dist/baloise-design-system/p-c991d944.js +1 -1
- package/dist/baloise-design-system/p-cabce8138a.entry.js +1 -0
- package/dist/baloise-design-system/{p-1277f286b7.system.entry.js → p-d30cff1772.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-6be974c740.entry.js → p-d6c307ff8b.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ca5cbdaf.system.js → p-de3fe0bc.system.js} +1 -1
- package/dist/baloise-design-system/p-e4b50159.js +1 -0
- package/dist/baloise-design-system/p-e91deb7c8b.entry.js +1 -0
- package/dist/baloise-design-system/p-ec5776f5.js +1 -0
- package/dist/baloise-design-system/{p-348f54acd8.entry.js → p-ef546b8c82.entry.js} +1 -1
- package/dist/baloise-design-system/{p-96cdf92a85.system.entry.js → p-f95b96d8c9.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-9eeaac7842.system.entry.js → p-fd091cdfd6.system.entry.js} +1 -1
- package/dist/cjs/app-globals-44d3a5af.js +7 -0
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- 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 +6 -5
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-a8a8d834.js → breakpoints.decorator-9a8fc1fb.js} +1 -1
- package/dist/cjs/{breakpoints.subject-6e379a10.js → breakpoints.subject-4fc4ecff.js} +1 -1
- package/dist/cjs/{app-globals-fa3c14cc.js → global-872cca8d.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-3059001f.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{tokens.esm-793904fc.js → tokens.esm-a2a36863.js} +1 -1
- package/dist/cjs/{window-resize.decorator-8ca25081.js → window-resize.decorator-87f6efc8.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +2 -1
- 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/esm/app-globals-c5ea8144.js +5 -0
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-doc-app.entry.js +229 -0
- 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 +6 -5
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +3 -3
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-a6d3eb5c.js → breakpoints.decorator-bde1163c.js} +1 -1
- package/dist/esm/{breakpoints.subject-02e0dc05.js → breakpoints.subject-ce347502.js} +1 -1
- package/dist/esm/{app-globals-5b18a75c.js → global-181336dc.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-66a526c0.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{tokens.esm-2c058527.js → tokens.esm-252a6225.js} +1 -1
- package/dist/esm/{window-resize.decorator-37add7cf.js → window-resize.decorator-d77cf9df.js} +1 -1
- package/dist/esm-es5/app-globals-c5ea8144.js +1 -0
- 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-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-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-a6d3eb5c.js → breakpoints.decorator-bde1163c.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-02e0dc05.js → breakpoints.subject-ce347502.js} +1 -1
- package/dist/esm-es5/global-181336dc.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-66a526c0.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-37add7cf.js → window-resize.decorator-d77cf9df.js} +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/package.json +7 -7
- package/dist/baloise-design-system/p-36218e79.js +0 -1
- package/dist/baloise-design-system/p-d860cbbe40.entry.js +0 -1
- package/dist/baloise-design-system/p-e2a70f10.system.js +0 -1
- package/dist/esm-es5/app-globals-5b18a75c.js +0 -1
- /package/dist/baloise-design-system/{p-25431930.js → p-e102b19a.js} +0 -0
- /package/dist/baloise-design-system/{p-80a4075f.system.js → p-e1af9f3a.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-2c058527.js → tokens.esm-252a6225.js} +0 -0
|
@@ -30,6 +30,7 @@ const SegmentItem = /*@__PURE__*/ proxyCustomElement(class SegmentItem extends H
|
|
|
30
30
|
const items = this.allAvailableOptions;
|
|
31
31
|
if (items.length > 0) {
|
|
32
32
|
const first = items[0];
|
|
33
|
+
this.checked = false;
|
|
33
34
|
this.isFocusable = first === this.el;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -158,7 +159,7 @@ const SegmentItem = /*@__PURE__*/ proxyCustomElement(class SegmentItem extends H
|
|
|
158
159
|
'aria-describedby': this.ariaForm.messageId,
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
return (h(Host, { key: '
|
|
162
|
+
return (h(Host, { key: '9c8a316a45eb92e889334daef41ab24019ba72f7', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('vertical').class(vertical)), block.modifier('disabled').class(disabled)), block.modifier('checked').class(checked)), block.modifier('invalid').class(invalid)), block.modifier('last').class(this.isLast && !checked)) }, h("button", Object.assign({ key: 'fd4aca93c31ed9e4d4dc519123c1c0b275b3617b', id: id, role: "radio", "aria-checked": checked ? 'true' : 'false' }, buttonAttributes, { class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, buttonBem.class()), buttonBem.modifier('checked').class(checked)), buttonBem.modifier('invalid').class(invalid)), buttonBem.modifier('disabled').class(disabled)), buttonBem.modifier('focused').class(focused)), buttonBem.modifier('vertical').class(vertical)), type: 'button', tabIndex: hasTabindex ? 0 : -1, part: "native", disabled: disabled, ref: el => (this.nativeEl = el) }, this.inheritedAttributes), h("bal-icon", { key: '79bd475f2f7bd6e2f7a5094a6bbaf1f4625bdc00', name: "check", size: "small", class: Object.assign(Object.assign(Object.assign({}, buttonBem.element('icon').class()), buttonBem.element('icon').modifier('animated').class(checked)), buttonBem.element('icon').modifier('vertical').class(vertical)), color: disabled ? 'grey-dark' : invalid ? 'white' : 'primary' }), h("bal-stack", { key: '4ad6ff0fece87c9ffa39c5443021f1256660a38f', space: "x-small", layout: 'horizontal' }, h("bal-content", { key: '7f9a46f875e1aad24b662854d9ba3c7ad0c39416', space: "none" }, h("bal-label", { key: '2ab5398ff57f1caf0ba573f06f753b904c46d0a0', htmlId: `bal-si-${this.internalId}-label` }, label), h("span", { key: 'a75a41afcd08ff615a1e63a50874149219cbd4d8', part: "slot", class: Object.assign({}, buttonBem.element('slot').modifier('hidden').class(!this.hasSlotContent)) }, ' ', h("slot", { key: '4329806b5b8fa0ed5a3d1675c92127a9420b7488', onSlotchange: this.onSlottedItemsChange }))))), h("div", { key: 'c57e910bb8bb70b7ce360c92e737835a2cf3e4dc', class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, indicatorBem.class()), indicatorBem.modifier('animated').class()), indicatorBem.modifier('background').class()), indicatorBem.modifier('disabled').class(disabled)), indicatorBem.modifier('invalid').class(invalid)), indicatorBem.modifier('checked').class(checked)), indicatorBem.modifier('vertical').class(vertical)) })));
|
|
162
163
|
}
|
|
163
164
|
get el() { return this; }
|
|
164
165
|
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,17 +5,16 @@ 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 { w as waitForComponent, g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
12
|
-
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';
|
|
13
|
-
import { d as defaultConfig } from './config.default.js';
|
|
14
|
-
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';
|
|
15
9
|
export { n as newBalOption } from './option.js';
|
|
16
10
|
export { n as newBalStepOption } from './bal-step.util.js';
|
|
17
11
|
export { n as newBalTabOption } from './bal-tab.util.js';
|
|
12
|
+
import { g as getAppRoot, c as componentOnReady } from './helpers.js';
|
|
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,147 +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(options);
|
|
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(options) {
|
|
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.setAttribute('animated', options.animated ? 'true' : 'false');
|
|
297
|
-
if (options.container !== undefined) {
|
|
298
|
-
this.container.setAttribute('container', options.container === true ? '' : options.container);
|
|
299
|
-
}
|
|
300
|
-
this.container.id = containerId;
|
|
301
|
-
}
|
|
302
|
-
document.body.appendChild(this.container);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
async updateQueue() {
|
|
306
|
-
var _a;
|
|
307
|
-
if (this.queue.length < this.queueLimit) {
|
|
308
|
-
const el = this.preQueue.shift();
|
|
309
|
-
if (el && this.container) {
|
|
310
|
-
await waitForComponent(this.container);
|
|
311
|
-
const innerEl = this.container.querySelector('.bal-notices__inner');
|
|
312
|
-
if (innerEl) {
|
|
313
|
-
this.queue.push(el);
|
|
314
|
-
innerEl.insertAdjacentElement('beforeend', el);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
if (this.queue.length === 0) {
|
|
319
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
removeFromQueue(toastId) {
|
|
323
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
324
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
class BalToastController extends BalNoticeController {
|
|
329
|
-
constructor() {
|
|
330
|
-
super({
|
|
331
|
-
tag: 'bal-toast',
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
create(options) {
|
|
335
|
-
return super.create(options);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
const balToastController = new BalToastController();
|
|
339
|
-
|
|
340
|
-
class BalSnackbarController extends BalNoticeController {
|
|
341
|
-
constructor() {
|
|
342
|
-
super({
|
|
343
|
-
tag: 'bal-snackbar',
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
create(options) {
|
|
347
|
-
return super.create(options);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
const balSnackbarController = new BalSnackbarController();
|
|
351
|
-
|
|
352
|
-
// generated by .build/version.js
|
|
353
|
-
const VERSION = '17.4.0';
|
|
354
|
-
|
|
355
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
356
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
357
|
-
win = window;
|
|
358
|
-
}
|
|
359
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
360
|
-
if (platformConfig) {
|
|
361
|
-
setPlatformHelpers(platformConfig);
|
|
362
|
-
}
|
|
363
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
364
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
365
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
366
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
367
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
368
|
-
};
|
|
369
|
-
|
|
370
63
|
const newBalCheckboxOption = (option) => {
|
|
371
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 });
|
|
372
65
|
};
|
|
@@ -484,4 +177,4 @@ const isPlatform = (winOrPlatform, platform) => {
|
|
|
484
177
|
const NewBalOptionValue = newBalOptionValue;
|
|
485
178
|
const NewBalSingleOptionValue = newBalSingleOptionValue;
|
|
486
179
|
|
|
487
|
-
export { BalModalController, BalOrientationSubject,
|
|
180
|
+
export { BalModalController, BalOrientationSubject, NewBalOptionValue, NewBalSingleOptionValue, balModalController, balOrientationSubject, getPlatforms, hasTouchSupport, i18nBalFieldLabel, isBrowser, isPlatform, newBalCheckboxOption, newBalOptionValue, newBalRadioOption, newBalSingleOptionValue };
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
|
+
import { b as balBrowser } from './browser.js';
|
|
3
|
+
import { w as waitForComponent } from './helpers.js';
|
|
4
|
+
import { d as defaultConfig } from './config.default.js';
|
|
5
|
+
|
|
6
|
+
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
7
|
+
const BALOISE_ANIMATION_KEY = 'baloise-animated';
|
|
8
|
+
|
|
9
|
+
class Config {
|
|
10
|
+
constructor() {
|
|
11
|
+
this._componentObservers = [];
|
|
12
|
+
this._observers = [];
|
|
13
|
+
this._config = defaultConfig;
|
|
14
|
+
}
|
|
15
|
+
get locale() {
|
|
16
|
+
return `${this._config.language}-${this._config.region}`;
|
|
17
|
+
}
|
|
18
|
+
get region() {
|
|
19
|
+
return this._config.region;
|
|
20
|
+
}
|
|
21
|
+
set region(region) {
|
|
22
|
+
if (region !== this._config.region) {
|
|
23
|
+
this._config.region = region;
|
|
24
|
+
this._notify();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
get language() {
|
|
28
|
+
return this._config.language;
|
|
29
|
+
}
|
|
30
|
+
set language(language) {
|
|
31
|
+
if (language !== this._config.language) {
|
|
32
|
+
if (this._config.allowedLanguages.includes(language)) {
|
|
33
|
+
this._config.language = language;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this._config.language = this._config.fallbackLanguage;
|
|
37
|
+
}
|
|
38
|
+
this._notify();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
get allowedLanguages() {
|
|
42
|
+
return this._config.allowedLanguages;
|
|
43
|
+
}
|
|
44
|
+
set allowedLanguages(allowedLanguages) {
|
|
45
|
+
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
46
|
+
this._config.allowedLanguages = allowedLanguages;
|
|
47
|
+
this._notify();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
get icons() {
|
|
51
|
+
return this._config.icons;
|
|
52
|
+
}
|
|
53
|
+
set icons(icons) {
|
|
54
|
+
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
55
|
+
this._notify();
|
|
56
|
+
}
|
|
57
|
+
get logger() {
|
|
58
|
+
return this._config.logger;
|
|
59
|
+
}
|
|
60
|
+
set logger(logger) {
|
|
61
|
+
this._config.logger = Object.assign({}, logger);
|
|
62
|
+
this._notify();
|
|
63
|
+
}
|
|
64
|
+
get animated() {
|
|
65
|
+
return this._config.animated;
|
|
66
|
+
}
|
|
67
|
+
set animated(animated) {
|
|
68
|
+
this._config.animated = animated;
|
|
69
|
+
this._notify();
|
|
70
|
+
}
|
|
71
|
+
get httpFormSubmit() {
|
|
72
|
+
return this._config.httpFormSubmit;
|
|
73
|
+
}
|
|
74
|
+
set httpFormSubmit(httpFormSubmit) {
|
|
75
|
+
this._config.httpFormSubmit = httpFormSubmit;
|
|
76
|
+
this._notify();
|
|
77
|
+
}
|
|
78
|
+
attach(observer) {
|
|
79
|
+
const isExist = this._observers.includes(observer);
|
|
80
|
+
if (isExist) {
|
|
81
|
+
return console.log('Subject: Observer has been attached already.');
|
|
82
|
+
}
|
|
83
|
+
this._observers.push(observer);
|
|
84
|
+
observer.configChanged(this._config);
|
|
85
|
+
}
|
|
86
|
+
detach(observer) {
|
|
87
|
+
const observerIndex = this._observers.indexOf(observer);
|
|
88
|
+
if (observerIndex === -1) {
|
|
89
|
+
return console.log('Subject: Nonexistent observer.');
|
|
90
|
+
}
|
|
91
|
+
this._observers.splice(observerIndex, 1);
|
|
92
|
+
}
|
|
93
|
+
attachComponent(observer) {
|
|
94
|
+
const isExist = this._componentObservers.includes(observer);
|
|
95
|
+
if (isExist) {
|
|
96
|
+
return console.log('Subject: Observer has been attached already.');
|
|
97
|
+
}
|
|
98
|
+
this._componentObservers.push(observer);
|
|
99
|
+
observer.configChanged(this._config);
|
|
100
|
+
}
|
|
101
|
+
detachComponent(observer) {
|
|
102
|
+
const observerIndex = this._componentObservers.indexOf(observer);
|
|
103
|
+
if (observerIndex === -1) {
|
|
104
|
+
return console.log('Subject: Nonexistent observer.');
|
|
105
|
+
}
|
|
106
|
+
this._componentObservers.splice(observerIndex, 1);
|
|
107
|
+
}
|
|
108
|
+
toString() {
|
|
109
|
+
return JSON.stringify(this._config);
|
|
110
|
+
}
|
|
111
|
+
reset(config) {
|
|
112
|
+
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
113
|
+
this._notify(false);
|
|
114
|
+
}
|
|
115
|
+
_notify(all = true) {
|
|
116
|
+
for (const observer of this._componentObservers) {
|
|
117
|
+
observer.configChanged(this._config);
|
|
118
|
+
}
|
|
119
|
+
if (all) {
|
|
120
|
+
for (const observer of this._observers) {
|
|
121
|
+
observer.configChanged(this._config);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (balBrowser.hasWindow) {
|
|
125
|
+
saveConfig(window, this._config);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const config = /*@__PURE__*/ new Config();
|
|
130
|
+
const configFromSession = (win) => {
|
|
131
|
+
try {
|
|
132
|
+
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
133
|
+
return configStr !== null ? JSON.parse(configStr) : {};
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
return {};
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const configFromLocalStorage = (win) => {
|
|
140
|
+
try {
|
|
141
|
+
const animated = JSON.parse(win.localStorage.getItem(BALOISE_ANIMATION_KEY));
|
|
142
|
+
if (animated !== null) {
|
|
143
|
+
return {
|
|
144
|
+
animated,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {};
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
return {};
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const saveConfig = (win, c) => {
|
|
154
|
+
try {
|
|
155
|
+
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const setupConfig = (userConfig = {}, win = {}) => {
|
|
163
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
164
|
+
win = window;
|
|
165
|
+
}
|
|
166
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
167
|
+
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) }));
|
|
168
|
+
win.BaloiseDesignSystem.config = config;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
class BalNoticeController {
|
|
172
|
+
constructor(options) {
|
|
173
|
+
this.options = options;
|
|
174
|
+
this.container = null;
|
|
175
|
+
this.queue = [];
|
|
176
|
+
this.preQueue = [];
|
|
177
|
+
this.queueLimit = 5;
|
|
178
|
+
}
|
|
179
|
+
create(options) {
|
|
180
|
+
if (balBrowser.hasDocument) {
|
|
181
|
+
this.setupContainer(options);
|
|
182
|
+
const clone = this.findClone(options);
|
|
183
|
+
if (clone === undefined) {
|
|
184
|
+
const el = document.createElement(this.options.tag);
|
|
185
|
+
Object.assign(el, options);
|
|
186
|
+
el.addEventListener('balClose', ev => {
|
|
187
|
+
this.removeFromQueue(ev.detail);
|
|
188
|
+
});
|
|
189
|
+
this.preQueue.push(el);
|
|
190
|
+
this.updateQueue();
|
|
191
|
+
return el;
|
|
192
|
+
}
|
|
193
|
+
return clone;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
setQueue(queueLimit) {
|
|
197
|
+
this.queueLimit = queueLimit;
|
|
198
|
+
}
|
|
199
|
+
async dismissAll() {
|
|
200
|
+
var _a;
|
|
201
|
+
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
202
|
+
if (elements) {
|
|
203
|
+
const closingQueue = [];
|
|
204
|
+
for (let index = 0; index < elements.length; index++) {
|
|
205
|
+
const el = elements[index];
|
|
206
|
+
if (el.close) {
|
|
207
|
+
closingQueue.push(el.close());
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
await Promise.all(closingQueue);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @deprecated use dismissAll instead
|
|
215
|
+
*/
|
|
216
|
+
async clearAll() {
|
|
217
|
+
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
218
|
+
return this.dismissAll();
|
|
219
|
+
}
|
|
220
|
+
findClone(options) {
|
|
221
|
+
for (let index = 0; index < this.queue.length; index++) {
|
|
222
|
+
const el = this.queue[index];
|
|
223
|
+
if (el.message === options.message && el.color === options.color) {
|
|
224
|
+
return el;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
setupContainer(options) {
|
|
230
|
+
if (balBrowser.hasDocument) {
|
|
231
|
+
const containerId = `${this.options.tag}-container`;
|
|
232
|
+
this.container = document.getElementById(containerId);
|
|
233
|
+
if (this.container)
|
|
234
|
+
return;
|
|
235
|
+
if (!this.container) {
|
|
236
|
+
this.container = document.createElement('bal-notices');
|
|
237
|
+
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
238
|
+
this.container.setAttribute('animated', options.animated ? 'true' : 'false');
|
|
239
|
+
if (options.container !== undefined) {
|
|
240
|
+
this.container.setAttribute('container', options.container === true ? '' : options.container);
|
|
241
|
+
}
|
|
242
|
+
this.container.id = containerId;
|
|
243
|
+
}
|
|
244
|
+
document.body.appendChild(this.container);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
async updateQueue() {
|
|
248
|
+
var _a;
|
|
249
|
+
if (this.queue.length < this.queueLimit) {
|
|
250
|
+
const el = this.preQueue.shift();
|
|
251
|
+
if (el && this.container) {
|
|
252
|
+
await waitForComponent(this.container);
|
|
253
|
+
const innerEl = this.container.querySelector('.bal-notices__inner');
|
|
254
|
+
if (innerEl) {
|
|
255
|
+
this.queue.push(el);
|
|
256
|
+
innerEl.insertAdjacentElement('beforeend', el);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (this.queue.length === 0) {
|
|
261
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
removeFromQueue(toastId) {
|
|
265
|
+
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
266
|
+
setTimeout(() => this.updateQueue(), 0);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
class BalToastController extends BalNoticeController {
|
|
271
|
+
constructor() {
|
|
272
|
+
super({
|
|
273
|
+
tag: 'bal-toast',
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
create(options) {
|
|
277
|
+
return super.create(options);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const balToastController = new BalToastController();
|
|
281
|
+
|
|
282
|
+
class BalSnackbarController extends BalNoticeController {
|
|
283
|
+
constructor() {
|
|
284
|
+
super({
|
|
285
|
+
tag: 'bal-snackbar',
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
create(options) {
|
|
289
|
+
return super.create(options);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
const balSnackbarController = new BalSnackbarController();
|
|
293
|
+
|
|
294
|
+
// generated by .build/version.js
|
|
295
|
+
const VERSION = '17.4.1-nightly.20250210';
|
|
296
|
+
|
|
297
|
+
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
298
|
+
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
299
|
+
win = window;
|
|
300
|
+
}
|
|
301
|
+
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
302
|
+
if (platformConfig) {
|
|
303
|
+
setPlatformHelpers(platformConfig);
|
|
304
|
+
}
|
|
305
|
+
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
306
|
+
win.BaloiseDesignSystem.toastController = balToastController;
|
|
307
|
+
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
308
|
+
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
309
|
+
win.BaloiseDesignSystem.version = VERSION;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export { BalToastController as B, BalSnackbarController as a, balToastController as b, balSnackbarController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
|