@baloise/ds-core 16.5.1-nightly.20240927 → 16.5.2
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 +0 -2
- package/components/all.js +0 -3
- package/components/bal-app.js +85 -1
- package/components/bal-dropdown.js +1 -709
- package/components/bal-dropdown2.js +711 -0
- package/components/bal-field.js +1 -1
- package/components/bal-footer.js +19 -36
- package/components/bal-input-stepper.js +1 -1
- package/components/bal-number-input.js +1 -1
- package/components/bal-option.js +1 -166
- package/components/bal-option2.js +168 -0
- package/components/bal-segment-item.js +1 -3
- package/components/bal-segment.js +1 -1
- package/components/bal-select2.js +1 -1
- package/components/index.esm.js +1 -1
- package/components/index.js +289 -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-f959646a.system.js → p-013b4c72.system.js} +1 -1
- package/dist/baloise-design-system/{p-c5ba2e36.system.js → p-0159015a.system.js} +1 -1
- package/dist/baloise-design-system/{p-36b7c38fa1.entry.js → p-091501deda.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fde209f66f.system.entry.js → p-09356ff71d.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-0f611b4158.system.entry.js +1 -0
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-df4b9876a4.system.entry.js → p-17d7090151.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-0f427281.js → p-18fd198d.js} +1 -1
- package/dist/baloise-design-system/{p-cf05663493.entry.js → p-1c482e78f9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-edc5661186.system.entry.js → p-29fd381412.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d1b917b084.entry.js → p-2d27ba7364.entry.js} +1 -1
- package/dist/baloise-design-system/{p-46534d4555.entry.js → p-4521c9fe51.entry.js} +1 -1
- package/dist/baloise-design-system/{p-253e5b276f.system.entry.js → p-4c5ff3ff4d.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-4d6b2b921e.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-0f26aa2c.js → p-4f93ac4c.js} +1 -1
- package/dist/baloise-design-system/{p-449ffc7a7e.entry.js → p-50b18f1f90.entry.js} +1 -1
- package/dist/baloise-design-system/{p-2512a879.system.js → p-54e7b850.system.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-52730cae.system.js → p-565102df.system.js} +1 -1
- package/dist/baloise-design-system/{p-d30aa4dfc4.entry.js → p-63e42239c4.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b1a50f45f7.system.entry.js → p-6af7f275bd.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-7873fe20d4.entry.js +1 -0
- package/dist/baloise-design-system/{p-f9998b5483.system.entry.js → p-7d9523a50b.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-16b50b08e4.entry.js → p-8152631cd8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e3d9eaa013.entry.js → p-85007714f1.entry.js} +1 -1
- package/dist/baloise-design-system/{p-03c27a3e84.system.entry.js → p-8b3d1b6c65.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3907bef0a7.entry.js → p-8b7837e749.entry.js} +1 -1
- package/dist/baloise-design-system/{p-72675b8981.entry.js → p-8c982fbdba.entry.js} +1 -1
- package/dist/baloise-design-system/p-8da6d9dae1.entry.js +1 -0
- package/dist/baloise-design-system/{p-90385518b4.system.entry.js → p-8f85de0594.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-34cf5e92.js → p-92084992.js} +1 -1
- package/dist/baloise-design-system/{p-2e8508812d.system.entry.js → p-950dd794aa.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-98bb021545.entry.js +1 -0
- package/dist/baloise-design-system/{p-f15d2421.system.js → p-9b9660ff.system.js} +1 -1
- package/dist/baloise-design-system/{p-9796da477a.entry.js → p-a79d0901e9.entry.js} +1 -1
- package/dist/baloise-design-system/{p-80c7fc0bbd.system.entry.js → p-ae48180076.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fa6bb0e799.entry.js → p-b53b401a5a.entry.js} +1 -1
- package/dist/baloise-design-system/{p-48755a2e78.system.entry.js → p-bb7de7bbee.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -0
- package/dist/baloise-design-system/{p-e45eb6121d.system.entry.js → p-e088800e47.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e78a6409.js +1 -0
- package/dist/baloise-design-system/{p-4f5a843360.entry.js → p-f81abc1e5e.entry.js} +1 -1
- package/dist/baloise-design-system/{p-90c45a9b29.system.entry.js → p-fbc7eb7481.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-dd6fc2d3da.system.entry.js → p-ff40f6ac1e.system.entry.js} +1 -1
- package/dist/cjs/{global-2562a984.js → app-globals-ae3a8623.js} +4 -2
- package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
- package/dist/cjs/bal-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/bal-field_5.cjs.entry.js +1 -1
- package/dist/cjs/bal-footer.cjs.entry.js +5 -4
- 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 -8
- 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 +2 -3
- package/dist/cjs/{breakpoints.decorator-18394651.js → breakpoints.decorator-9356577d.js} +1 -1
- package/dist/cjs/{breakpoints.subject-8797b37c.js → breakpoints.subject-c2e9ac3e.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -3
- package/dist/cjs/{tokens.esm-c91b09dd.js → tokens.esm-615d9347.js} +1 -1
- package/dist/cjs/{window-resize.decorator-443e0b4c.js → window-resize.decorator-c6dcf1a0.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/bal-dropdown/bal-dropdown.css +1 -1
- package/dist/collection/components/bal-field/bal-field.js +1 -1
- package/dist/collection/components/bal-footer/bal-footer.css +1 -1
- package/dist/collection/components/bal-footer/bal-footer.js +3 -2
- package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +1 -3
- package/dist/collection/components/bal-segment/bal-segment.js +4 -4
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/{global-63f4bcec.js → app-globals-b0dd0fc4.js} +4 -2
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +3 -3
- package/dist/esm/bal-dropdown.entry.js +1 -1
- package/dist/esm/bal-field_5.entry.js +1 -1
- package/dist/esm/bal-footer.entry.js +5 -4
- 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 -8
- 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 +2 -3
- package/dist/esm/{breakpoints.decorator-40d2a7a3.js → breakpoints.decorator-c78a656a.js} +1 -1
- package/dist/esm/{breakpoints.subject-25149587.js → breakpoints.subject-aee81353.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/loader.js +2 -3
- package/dist/esm/{tokens.esm-30f4a24f.js → tokens.esm-6e01fd26.js} +1 -1
- package/dist/esm/{window-resize.decorator-6ca8515e.js → window-resize.decorator-bcb73df5.js} +1 -1
- package/dist/esm-es5/app-globals-b0dd0fc4.js +1 -0
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-datepicker.entry.js +1 -1
- package/dist/esm-es5/bal-dropdown.entry.js +1 -1
- package/dist/esm-es5/bal-field_5.entry.js +1 -1
- 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-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-c78a656a.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-25149587.js → breakpoints.subject-aee81353.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-e216cfe4.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{window-resize.decorator-6ca8515e.js → window-resize.decorator-bcb73df5.js} +1 -1
- package/dist/types/components/bal-segment/bal-segment.interfaces.d.ts +1 -1
- package/dist/types/components.d.ts +0 -37
- package/package.json +7 -7
- package/components/bal-app2.js +0 -87
- package/components/bal-doc-app.d.ts +0 -11
- package/components/bal-doc-app.js +0 -260
- package/components/initialize.js +0 -288
- package/dist/baloise-design-system/p-2e498736fc.system.entry.js +0 -1
- package/dist/baloise-design-system/p-360068a4.system.js +0 -1
- package/dist/baloise-design-system/p-4ff656dd48.entry.js +0 -1
- package/dist/baloise-design-system/p-6d1b6215.js +0 -1
- package/dist/baloise-design-system/p-6f180001ab.entry.js +0 -1
- package/dist/baloise-design-system/p-7291766c.system.js +0 -1
- package/dist/baloise-design-system/p-7cc52e4a3b.system.entry.js +0 -1
- package/dist/baloise-design-system/p-98247ff53f.system.entry.js +0 -1
- package/dist/baloise-design-system/p-c00e0f64c8.entry.js +0 -1
- package/dist/baloise-design-system/p-e8ffddeb.js +0 -1
- package/dist/baloise-design-system/p-f685f59888.entry.js +0 -1
- package/dist/cjs/app-globals-5fd73c0c.js +0 -7
- package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
- package/dist/esm/app-globals-970bab17.js +0 -5
- package/dist/esm/bal-doc-app.entry.js +0 -227
- package/dist/esm-es5/app-globals-970bab17.js +0 -1
- package/dist/esm-es5/bal-doc-app.entry.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-40d2a7a3.js +0 -1
- package/dist/esm-es5/global-63f4bcec.js +0 -1
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
- /package/dist/baloise-design-system/{p-59a2e0dd.system.js → p-29937768.system.js} +0 -0
- /package/dist/baloise-design-system/{p-4e6dcc58.js → p-941f70cf.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-30f4a24f.js → tokens.esm-6e01fd26.js} +0 -0
package/components/initialize.js
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import { setPlatformHelpers } from '@stencil/core/internal/client';
|
|
2
|
-
import { b as balBrowser } from './browser.js';
|
|
3
|
-
import { d as defaultConfig } from './config.default.js';
|
|
4
|
-
|
|
5
|
-
const BALOISE_SESSION_KEY = 'baloise-persist-config';
|
|
6
|
-
|
|
7
|
-
class Config {
|
|
8
|
-
constructor() {
|
|
9
|
-
this._componentObservers = [];
|
|
10
|
-
this._observers = [];
|
|
11
|
-
this._config = defaultConfig;
|
|
12
|
-
}
|
|
13
|
-
get locale() {
|
|
14
|
-
return `${this._config.language}-${this._config.region}`;
|
|
15
|
-
}
|
|
16
|
-
get region() {
|
|
17
|
-
return this._config.region;
|
|
18
|
-
}
|
|
19
|
-
set region(region) {
|
|
20
|
-
if (region !== this._config.region) {
|
|
21
|
-
this._config.region = region;
|
|
22
|
-
this._notify();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
get language() {
|
|
26
|
-
return this._config.language;
|
|
27
|
-
}
|
|
28
|
-
set language(language) {
|
|
29
|
-
if (language !== this._config.language) {
|
|
30
|
-
if (this._config.allowedLanguages.includes(language)) {
|
|
31
|
-
this._config.language = language;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this._config.language = this._config.fallbackLanguage;
|
|
35
|
-
}
|
|
36
|
-
this._notify();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
get allowedLanguages() {
|
|
40
|
-
return this._config.allowedLanguages;
|
|
41
|
-
}
|
|
42
|
-
set allowedLanguages(allowedLanguages) {
|
|
43
|
-
if (allowedLanguages !== this._config.allowedLanguages) {
|
|
44
|
-
this._config.allowedLanguages = allowedLanguages;
|
|
45
|
-
this._notify();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
get icons() {
|
|
49
|
-
return this._config.icons;
|
|
50
|
-
}
|
|
51
|
-
set icons(icons) {
|
|
52
|
-
this._config.icons = Object.assign(Object.assign({}, this._config.icons), icons);
|
|
53
|
-
this._notify();
|
|
54
|
-
}
|
|
55
|
-
get logger() {
|
|
56
|
-
return this._config.logger;
|
|
57
|
-
}
|
|
58
|
-
set logger(logger) {
|
|
59
|
-
this._config.logger = Object.assign({}, logger);
|
|
60
|
-
this._notify();
|
|
61
|
-
}
|
|
62
|
-
get animated() {
|
|
63
|
-
return this._config.animated;
|
|
64
|
-
}
|
|
65
|
-
set animated(animated) {
|
|
66
|
-
this._config.animated = animated;
|
|
67
|
-
this._notify();
|
|
68
|
-
}
|
|
69
|
-
get httpFormSubmit() {
|
|
70
|
-
return this._config.httpFormSubmit;
|
|
71
|
-
}
|
|
72
|
-
set httpFormSubmit(httpFormSubmit) {
|
|
73
|
-
this._config.httpFormSubmit = httpFormSubmit;
|
|
74
|
-
this._notify();
|
|
75
|
-
}
|
|
76
|
-
attach(observer) {
|
|
77
|
-
const isExist = this._observers.includes(observer);
|
|
78
|
-
if (isExist) {
|
|
79
|
-
return console.log('Subject: Observer has been attached already.');
|
|
80
|
-
}
|
|
81
|
-
this._observers.push(observer);
|
|
82
|
-
observer.configChanged(this._config);
|
|
83
|
-
}
|
|
84
|
-
detach(observer) {
|
|
85
|
-
const observerIndex = this._observers.indexOf(observer);
|
|
86
|
-
if (observerIndex === -1) {
|
|
87
|
-
return console.log('Subject: Nonexistent observer.');
|
|
88
|
-
}
|
|
89
|
-
this._observers.splice(observerIndex, 1);
|
|
90
|
-
}
|
|
91
|
-
attachComponent(observer) {
|
|
92
|
-
const isExist = this._componentObservers.includes(observer);
|
|
93
|
-
if (isExist) {
|
|
94
|
-
return console.log('Subject: Observer has been attached already.');
|
|
95
|
-
}
|
|
96
|
-
this._componentObservers.push(observer);
|
|
97
|
-
observer.configChanged(this._config);
|
|
98
|
-
}
|
|
99
|
-
detachComponent(observer) {
|
|
100
|
-
const observerIndex = this._componentObservers.indexOf(observer);
|
|
101
|
-
if (observerIndex === -1) {
|
|
102
|
-
return console.log('Subject: Nonexistent observer.');
|
|
103
|
-
}
|
|
104
|
-
this._componentObservers.splice(observerIndex, 1);
|
|
105
|
-
}
|
|
106
|
-
toString() {
|
|
107
|
-
return JSON.stringify(this._config);
|
|
108
|
-
}
|
|
109
|
-
reset(config) {
|
|
110
|
-
this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
|
|
111
|
-
this._notify(false);
|
|
112
|
-
}
|
|
113
|
-
_notify(all = true) {
|
|
114
|
-
for (const observer of this._componentObservers) {
|
|
115
|
-
observer.configChanged(this._config);
|
|
116
|
-
}
|
|
117
|
-
if (all) {
|
|
118
|
-
for (const observer of this._observers) {
|
|
119
|
-
observer.configChanged(this._config);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (balBrowser.hasWindow) {
|
|
123
|
-
saveConfig(window, this._config);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
const config = /*@__PURE__*/ new Config();
|
|
128
|
-
const configFromSession = (win) => {
|
|
129
|
-
try {
|
|
130
|
-
const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
|
|
131
|
-
return configStr !== null ? JSON.parse(configStr) : {};
|
|
132
|
-
}
|
|
133
|
-
catch (e) {
|
|
134
|
-
return {};
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
const saveConfig = (win, c) => {
|
|
138
|
-
try {
|
|
139
|
-
win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
|
|
140
|
-
}
|
|
141
|
-
catch (e) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const setupConfig = (userConfig = {}, win = {}) => {
|
|
147
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
148
|
-
win = window;
|
|
149
|
-
}
|
|
150
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
151
|
-
config.reset(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
|
|
152
|
-
win.BaloiseDesignSystem.config = config;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
class BalNoticeController {
|
|
156
|
-
constructor(options) {
|
|
157
|
-
this.options = options;
|
|
158
|
-
this.container = null;
|
|
159
|
-
this.queue = [];
|
|
160
|
-
this.preQueue = [];
|
|
161
|
-
this.queueLimit = 5;
|
|
162
|
-
}
|
|
163
|
-
create(options) {
|
|
164
|
-
if (balBrowser.hasDocument) {
|
|
165
|
-
this.setupContainer();
|
|
166
|
-
const clone = this.findClone(options);
|
|
167
|
-
if (clone === undefined) {
|
|
168
|
-
const el = document.createElement(this.options.tag);
|
|
169
|
-
Object.assign(el, options);
|
|
170
|
-
el.addEventListener('balClose', ev => {
|
|
171
|
-
this.removeFromQueue(ev.detail);
|
|
172
|
-
});
|
|
173
|
-
this.preQueue.push(el);
|
|
174
|
-
this.updateQueue();
|
|
175
|
-
return el;
|
|
176
|
-
}
|
|
177
|
-
return clone;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
setQueue(queueLimit) {
|
|
181
|
-
this.queueLimit = queueLimit;
|
|
182
|
-
}
|
|
183
|
-
async dismissAll() {
|
|
184
|
-
var _a;
|
|
185
|
-
const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
|
|
186
|
-
if (elements) {
|
|
187
|
-
const closingQueue = [];
|
|
188
|
-
for (let index = 0; index < elements.length; index++) {
|
|
189
|
-
const el = elements[index];
|
|
190
|
-
if (el.close) {
|
|
191
|
-
closingQueue.push(el.close());
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
await Promise.all(closingQueue);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* @deprecated use dismissAll instead
|
|
199
|
-
*/
|
|
200
|
-
async clearAll() {
|
|
201
|
-
console.warn('[DEPRECATED] - use dismissAll() instead');
|
|
202
|
-
return this.dismissAll();
|
|
203
|
-
}
|
|
204
|
-
findClone(options) {
|
|
205
|
-
for (let index = 0; index < this.queue.length; index++) {
|
|
206
|
-
const el = this.queue[index];
|
|
207
|
-
if (el.message === options.message && el.color === options.color) {
|
|
208
|
-
return el;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return undefined;
|
|
212
|
-
}
|
|
213
|
-
setupContainer() {
|
|
214
|
-
if (balBrowser.hasDocument) {
|
|
215
|
-
const containerId = `${this.options.tag}-container`;
|
|
216
|
-
this.container = document.getElementById(containerId);
|
|
217
|
-
if (this.container)
|
|
218
|
-
return;
|
|
219
|
-
if (!this.container) {
|
|
220
|
-
this.container = document.createElement('bal-notices');
|
|
221
|
-
this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
|
|
222
|
-
this.container.id = containerId;
|
|
223
|
-
}
|
|
224
|
-
document.body.appendChild(this.container);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
updateQueue() {
|
|
228
|
-
var _a;
|
|
229
|
-
if (this.queue.length < this.queueLimit) {
|
|
230
|
-
const el = this.preQueue.shift();
|
|
231
|
-
if (el && this.container) {
|
|
232
|
-
this.queue.push(el);
|
|
233
|
-
this.container.insertAdjacentElement('beforeend', el);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (this.queue.length === 0) {
|
|
237
|
-
(_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
removeFromQueue(toastId) {
|
|
241
|
-
this.queue = this.queue.filter(el => el.id !== toastId);
|
|
242
|
-
setTimeout(() => this.updateQueue(), 0);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
class BalToastController extends BalNoticeController {
|
|
247
|
-
constructor() {
|
|
248
|
-
super({
|
|
249
|
-
tag: 'bal-toast',
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
create(options) {
|
|
253
|
-
return super.create(options);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
const balToastController = new BalToastController();
|
|
257
|
-
|
|
258
|
-
class BalSnackbarController extends BalNoticeController {
|
|
259
|
-
constructor() {
|
|
260
|
-
super({
|
|
261
|
-
tag: 'bal-snackbar',
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
create(options) {
|
|
265
|
-
return super.create(options);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const balSnackbarController = new BalSnackbarController();
|
|
269
|
-
|
|
270
|
-
// generated by .build/version.js
|
|
271
|
-
const VERSION = '16.5.1-nightly.20240927';
|
|
272
|
-
|
|
273
|
-
const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
|
|
274
|
-
if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
|
|
275
|
-
win = window;
|
|
276
|
-
}
|
|
277
|
-
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
|
|
278
|
-
if (platformConfig) {
|
|
279
|
-
setPlatformHelpers(platformConfig);
|
|
280
|
-
}
|
|
281
|
-
setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
|
|
282
|
-
win.BaloiseDesignSystem.toastController = balToastController;
|
|
283
|
-
win.BaloiseDesignSystem.snackbarController = balSnackbarController;
|
|
284
|
-
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
|
|
285
|
-
win.BaloiseDesignSystem.version = VERSION;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
export { BalToastController as B, BalSnackbarController as a, balToastController as b, balSnackbarController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,a,n,r){function t(e){return e instanceof n?e:new n((function(a){a(e)}))}return new(n||(n=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r["throw"](e))}catch(e){i(e)}}function c(e){e.done?n(e.value):t(e.value).then(o,l)}c((r=r.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,t,i,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(e){return function(a){return c([e,a])}}function c(l){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,l[0]&&(n=0)),n)try{if(r=1,t&&(i=l[0]&2?t["return"]:l[0]?t["throw"]||((i=t["return"])&&i.call(t),0):t.next)&&!(i=i.call(t,l[1])).done)return i;if(t=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;t=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1];i=l;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(l);break}if(i[2])n.ops.pop();n.trys.pop();continue}l=a.call(e,n)}catch(e){l=[6,e];t=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-456fc561.system.js","./p-6dbef894.system.js","./p-5c0b0099.system.js","./p-db0895e2.system.js","./p-23bdd8dc.system.js","./p-8954495d.system.js","./p-7957c3c0.system.js","./p-145d5c4e.system.js","./p-bb6304d0.system.js","./p-0177e3a0.system.js","./p-6913b916.system.js","./p-2880433e.system.js","./p-a1f6e944.system.js","./p-b3f2c626.system.js"],(function(e){"use strict";var a,n,r,t,i,o,l,c,s,_,p,f,u,b,d;return{setters:[function(e){a=e.r;n=e.h;r=e.H},function(e){t=e._;i=e.a},function(e){o=e.l;l=e.a;c=e.L},function(e){s=e.B},function(e){_=e.L},function(e){p=e.k},function(e){f=e.s},function(e){u=e.e},function(e){b=e.d},function(e){d=e.L},function(){},function(){},function(){},function(){}],execute:function(){var g=":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__inner{position:relative;font-family:var(--bal-footer-font-family);background-color:var(--bal-footer-background);color:var(--bal-footer-color);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,.bal-footer__inner p{color:var(--bal-footer-color)}.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-icon,.bal-footer__inner__wrapper__header-container__language .input{cursor:pointer}.bal-footer__inner__wrapper__header-container__language:hover bal-icon svg,.bal-footer__inner__wrapper__header-container__language:hover bal-icon g,.bal-footer__inner__wrapper__header-container__language:hover bal-icon path,.bal-footer__inner__wrapper__header-container__language:hover bal-icon circle{fill:var(--bal-footer-language-background-hover)}.bal-footer__inner__wrapper__header-container__language:hover .input{color:var(--bal-footer-language-color-hover)}.bal-footer__inner__wrapper__header-container__language:active bal-icon svg,.bal-footer__inner__wrapper__header-container__language:active bal-icon g,.bal-footer__inner__wrapper__header-container__language:active bal-icon path,.bal-footer__inner__wrapper__header-container__language:active bal-icon circle{fill:var(--bal-footer-language-background-active)}.bal-footer__inner__wrapper__header-container__language:active .input{color:var(--bal-footer-language-color-active)}.bal-footer__inner__wrapper__header-container__language__wrapper{width:5rem}.bal-footer__inner__wrapper__header-container__language__wrapper bal-input-group{background:rgba(0,0,0,0);border:none}.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-icon{min-width:.75rem !important}.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}}";var h=g;var m=e("bal_footer",function(){function e(e){a(this,e);this.links=[];this.socialMediaLinks=[];this.language=b.language;this.region=b.region;this.allowedLanguages=b.allowedLanguages;this.hideLinks=false;this.showSocialMedia=false;this.hideLanguageSelection=false}e.prototype.createLogger=function(e){this.log=e};e.prototype.connectedCallback=function(){this.updateFooterLinks();this.updateSocialMediaLinks()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){if(this.language!==e.language||this.region!==e.region){this.language=e.language;this.region=e.region;this.allowedLanguages=e.allowedLanguages;this.updateFooterLinks();this.updateSocialMediaLinks()}return[2]}))}))};e.prototype.changeLanguage=function(e){u(e)};e.prototype.updateFooterLinks=function(){var e=this;if(!this.hideLinks&&(this.region==="CH"||this.region==="DE")){var a=this.region;p((function(){o(new c(e.language),a).then((function(a){return e.links=a}))}))}};e.prototype.updateSocialMediaLinks=function(){var e=this;if(this.showSocialMedia&&(this.region==="CH"||this.region==="DE")){var a=this.region;p((function(){l(new c(e.language),a).then((function(a){return e.socialMediaLinks=a}))}))}};e.prototype.render=function(){var e=this;var a=s.block("footer");var t=a.element("inner");var i=t.element("wrapper");var o=i.element("container");var l=i.element("links-container");var c=i.element("header-container");var _=c.element("logo");var p=c.element("language");var u=p.element("wrapper");var b=p.element("icon");var d=l.element("legal-links");var g=l.element("social-media-links");return n(r,{class:Object.assign({},a.class())},n("footer",{class:Object.assign({},t.class())},n("div",{class:Object.assign({},i.class())},n("div",{class:Object.assign(Object.assign({container:true},o.class()),c.class())},n("div",{class:Object.assign({},_.class())},n("bal-logo",{color:"white"})),n("div",{class:Object.assign({},p.class()),style:{display:this.hideLanguageSelection||this.allowedLanguages.length<=1?"none":"flex"}},n("div",{class:Object.assign({},u.class())},n("bal-input-group",null,n("bal-icon",{class:Object.assign({},b.class()),name:"web",color:"white",onClick:function(a){var n;f(a);(n=e.selectEl)===null||n===void 0?void 0:n.open()}}),n("bal-select",{ref:function(a){return e.selectEl=a},value:this.language,onBalChange:function(a){return e.changeLanguage(a.detail)},"data-testid":"bal-footer-language"},this.allowedLanguages.map((function(e){return n("bal-select-option",{key:e,label:e.toLocaleUpperCase(),value:e},e.toLocaleUpperCase())}))))))),n("slot",null),n("div",{class:Object.assign(Object.assign({container:true},o.class()),l.class())},n("div",{class:Object.assign({},g.class()),style:{display:!this.showSocialMedia?"none":"flex"}},this.socialMediaLinks.map((function(e){return n("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-inverted":true}},n("bal-icon",{name:e.label.toLowerCase()}))}))),n("div",{class:Object.assign({},d.class()),style:{display:this.hideLinks?"none":"flex"}},this.links.map((function(e){return n("a",{key:e.link,href:e.link,target:"_blank",class:{link:true,"is-light":true}},e.label)})))))))};return e}());t([_("bal-footer"),i("design:type",Function),i("design:paramtypes",[Function]),i("design:returntype",void 0)],m.prototype,"createLogger",null);t([d(),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],m.prototype,"configChanged",null);m.style=h}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-f959646a.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.g}],execute:function(){var s=t("g",e)}}}));
|