@baloise/ds-core 0.0.5-snapshot.18- → 0.0.5

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.
Files changed (134) hide show
  1. package/components/bal-app.js +85 -1
  2. package/components/index.js +282 -5
  3. package/components/tokens.esm.js +1 -1
  4. package/dist/cjs/{global-e99d827b.js → app-globals-96247350.js} +4 -2
  5. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  6. package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
  7. package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
  8. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  9. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  10. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  11. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  12. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  13. package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
  14. package/dist/cjs/bal-progress-bar.cjs.entry.js +3 -3
  15. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  16. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  17. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  18. package/dist/cjs/{breakpoints.decorator-d23cb3cb.js → breakpoints.decorator-317b79eb.js} +1 -1
  19. package/dist/cjs/{breakpoints.subject-10b97f68.js → breakpoints.subject-d01efdb0.js} +1 -1
  20. package/dist/cjs/design-system-components.cjs.js +2 -3
  21. package/dist/cjs/index.cjs.js +2 -2
  22. package/dist/cjs/initialize-9c752efa.js +1 -1
  23. package/dist/cjs/loader.cjs.js +2 -3
  24. package/dist/cjs/{tokens.esm-50b082a1.js → tokens.esm-49773ac1.js} +1 -1
  25. package/dist/collection/collection-manifest.json +1 -2
  26. package/dist/collection/utils/constants/version.constant.js +1 -1
  27. package/dist/design-system-components/design-system-components.esm.js +1 -1
  28. package/dist/design-system-components/design-system-components.js +1 -1
  29. package/dist/design-system-components/index.esm.js +1 -1
  30. package/dist/design-system-components/{p-2f9422afeb.entry.js → p-0685d79c20.entry.js} +1 -1
  31. package/dist/design-system-components/{p-3af4aa5dd2.system.entry.js → p-1063c5cdc0.system.entry.js} +1 -1
  32. package/dist/design-system-components/{p-051f8a1a.system.js → p-14bd447f.system.js} +1 -1
  33. package/dist/design-system-components/{p-be273124.system.js → p-16910f58.system.js} +1 -1
  34. package/dist/design-system-components/{p-83bfae67.system.js → p-17391ff3.system.js} +1 -1
  35. package/dist/design-system-components/p-238f1f34.js +1 -0
  36. package/dist/design-system-components/{p-e8777baf.system.js → p-2b79fb51.system.js} +1 -1
  37. package/dist/design-system-components/{p-a34056a1.js → p-2cc957ce.js} +1 -1
  38. package/dist/design-system-components/{p-f8b769af7e.system.entry.js → p-356f5cfef3.system.entry.js} +1 -1
  39. package/dist/design-system-components/{p-dc7d48da1d.system.entry.js → p-3865f038de.system.entry.js} +1 -1
  40. package/dist/design-system-components/{p-0f2af7bbc3.entry.js → p-3c8c5b6dd2.entry.js} +1 -1
  41. package/dist/design-system-components/{p-8aa81eeb6e.entry.js → p-458253ab5b.entry.js} +1 -1
  42. package/dist/design-system-components/{p-5e870a5808.entry.js → p-464c925d97.entry.js} +1 -1
  43. package/dist/design-system-components/p-50f12cb1.system.js +1 -1
  44. package/dist/design-system-components/{p-40ca690a4d.entry.js → p-55a5a05ad3.entry.js} +1 -1
  45. package/dist/design-system-components/{p-091eab19.js → p-5650ce58.js} +1 -1
  46. package/dist/design-system-components/{p-db72f1b8ca.system.entry.js → p-5ee8262d62.system.entry.js} +1 -1
  47. package/dist/design-system-components/p-66904dc1.js +1 -1
  48. package/dist/design-system-components/p-75c02a9ff4.entry.js +1 -0
  49. package/dist/design-system-components/{p-e62988c618.system.entry.js → p-7653dae772.system.entry.js} +1 -1
  50. package/dist/design-system-components/{p-5514046282.entry.js → p-77c0fa3e01.entry.js} +1 -1
  51. package/dist/design-system-components/{p-9acf9fbb7a.system.entry.js → p-7b57f1bf7a.system.entry.js} +1 -1
  52. package/dist/design-system-components/{p-558e787f00.system.entry.js → p-7e2faa5297.system.entry.js} +1 -1
  53. package/dist/design-system-components/{p-0aca601913.system.entry.js → p-81a1bd545f.system.entry.js} +1 -1
  54. package/dist/design-system-components/{p-888d7ea6b2.entry.js → p-97b3918054.entry.js} +1 -1
  55. package/dist/design-system-components/{p-06e3c9ed5f.entry.js → p-97dbfd519a.entry.js} +1 -1
  56. package/dist/design-system-components/p-9f5e39e1.system.js +1 -0
  57. package/dist/design-system-components/{p-4bcddd59a7.system.entry.js → p-a2e1502c7f.system.entry.js} +1 -1
  58. package/dist/design-system-components/{p-eb819e6392.system.entry.js → p-adb6bc44ef.system.entry.js} +1 -1
  59. package/dist/design-system-components/{p-eaf0e36655.entry.js → p-b293bf1ba0.entry.js} +1 -1
  60. package/dist/design-system-components/{p-b910a8a15e.system.entry.js → p-b5ff90d62d.system.entry.js} +1 -1
  61. package/dist/design-system-components/{p-0d891840cf.system.entry.js → p-c835e3cce4.system.entry.js} +1 -1
  62. package/dist/design-system-components/{p-ee0bad20fe.entry.js → p-c994b45363.entry.js} +1 -1
  63. package/dist/design-system-components/{p-2aba64dc98.entry.js → p-d1ebb10fc2.entry.js} +1 -1
  64. package/dist/design-system-components/{p-297c5e29ef.system.entry.js → p-d3c37b705b.system.entry.js} +1 -1
  65. package/dist/design-system-components/{p-9536385c66.entry.js → p-ed0e733640.entry.js} +1 -1
  66. package/dist/esm/{global-648bb593.js → app-globals-04db8eba.js} +4 -2
  67. package/dist/esm/bal-carousel_2.entry.js +3 -3
  68. package/dist/esm/bal-datepicker.entry.js +3 -3
  69. package/dist/esm/bal-hint_3.entry.js +3 -3
  70. package/dist/esm/bal-list_8.entry.js +3 -3
  71. package/dist/esm/bal-logo.entry.js +3 -3
  72. package/dist/esm/bal-nav_8.entry.js +3 -3
  73. package/dist/esm/bal-navbar_5.entry.js +3 -3
  74. package/dist/esm/bal-pagination.entry.js +3 -3
  75. package/dist/esm/bal-popover_2.entry.js +3 -3
  76. package/dist/esm/bal-progress-bar.entry.js +3 -3
  77. package/dist/esm/bal-shape.entry.js +1 -1
  78. package/dist/esm/bal-steps.entry.js +3 -3
  79. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  80. package/dist/esm/{breakpoints.decorator-52930576.js → breakpoints.decorator-4c9411f6.js} +1 -1
  81. package/dist/esm/{breakpoints.subject-599ebb15.js → breakpoints.subject-b9035870.js} +1 -1
  82. package/dist/esm/design-system-components.js +2 -3
  83. package/dist/esm/index.js +3 -3
  84. package/dist/esm/initialize-ff8054a2.js +1 -1
  85. package/dist/esm/loader.js +2 -3
  86. package/dist/esm/{tokens.esm-71e6a725.js → tokens.esm-09a5bc3a.js} +1 -1
  87. package/dist/esm-es5/app-globals-04db8eba.js +1 -0
  88. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  89. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  90. package/dist/esm-es5/bal-hint_3.entry.js +1 -1
  91. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  92. package/dist/esm-es5/bal-logo.entry.js +1 -1
  93. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  94. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  95. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  96. package/dist/esm-es5/bal-popover_2.entry.js +1 -1
  97. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  98. package/dist/esm-es5/bal-shape.entry.js +1 -1
  99. package/dist/esm-es5/bal-steps.entry.js +1 -1
  100. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  101. package/dist/esm-es5/breakpoints.decorator-4c9411f6.js +1 -0
  102. package/dist/esm-es5/{breakpoints.subject-599ebb15.js → breakpoints.subject-b9035870.js} +1 -1
  103. package/dist/esm-es5/design-system-components.js +1 -1
  104. package/dist/esm-es5/index.js +1 -1
  105. package/dist/esm-es5/initialize-ff8054a2.js +1 -1
  106. package/dist/esm-es5/loader.js +1 -1
  107. package/dist/types/components.d.ts +0 -37
  108. package/package.json +7 -7
  109. package/components/bal-app2.js +0 -87
  110. package/components/bal-doc-app.d.ts +0 -11
  111. package/components/bal-doc-app.js +0 -260
  112. package/components/initialize.js +0 -281
  113. package/dist/cjs/app-globals-96827f05.js +0 -7
  114. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
  115. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  116. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -229
  117. package/dist/design-system-components/p-01ebb73de9.entry.js +0 -1
  118. package/dist/design-system-components/p-2cf6aee410.entry.js +0 -1
  119. package/dist/design-system-components/p-787f9258.system.js +0 -1
  120. package/dist/design-system-components/p-adff9a327e.system.entry.js +0 -1
  121. package/dist/design-system-components/p-bafa7b4e.js +0 -1
  122. package/dist/design-system-components/p-bfbc64f2.js +0 -1
  123. package/dist/design-system-components/p-fc586c6a.system.js +0 -1
  124. package/dist/esm/app-globals-46c15307.js +0 -5
  125. package/dist/esm/bal-doc-app.entry.js +0 -227
  126. package/dist/esm-es5/app-globals-46c15307.js +0 -1
  127. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  128. package/dist/esm-es5/breakpoints.decorator-52930576.js +0 -1
  129. package/dist/esm-es5/global-648bb593.js +0 -1
  130. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  131. package/dist/types/home/runner/work/ds-playground/ds-playground/packages/core/.stencil/packages/icons/src/index.d.ts +0 -81
  132. /package/dist/design-system-components/{p-0492b758.system.js → p-dab8ac06.system.js} +0 -0
  133. /package/dist/design-system-components/{p-117c1161.js → p-e33303db.js} +0 -0
  134. /package/dist/esm-es5/{tokens.esm-71e6a725.js → tokens.esm-09a5bc3a.js} +0 -0
@@ -1,281 +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
- attach(observer) {
70
- const isExist = this._observers.includes(observer);
71
- if (isExist) {
72
- return console.log('Subject: Observer has been attached already.');
73
- }
74
- this._observers.push(observer);
75
- observer.configChanged(this._config);
76
- }
77
- detach(observer) {
78
- const observerIndex = this._observers.indexOf(observer);
79
- if (observerIndex === -1) {
80
- return console.log('Subject: Nonexistent observer.');
81
- }
82
- this._observers.splice(observerIndex, 1);
83
- }
84
- attachComponent(observer) {
85
- const isExist = this._componentObservers.includes(observer);
86
- if (isExist) {
87
- return console.log('Subject: Observer has been attached already.');
88
- }
89
- this._componentObservers.push(observer);
90
- observer.configChanged(this._config);
91
- }
92
- detachComponent(observer) {
93
- const observerIndex = this._componentObservers.indexOf(observer);
94
- if (observerIndex === -1) {
95
- return console.log('Subject: Nonexistent observer.');
96
- }
97
- this._componentObservers.splice(observerIndex, 1);
98
- }
99
- toString() {
100
- return JSON.stringify(this._config);
101
- }
102
- reset(config) {
103
- this._config = Object.assign(Object.assign(Object.assign({}, this._config), config), { icons: Object.assign(Object.assign({}, this._config.icons), config.icons) });
104
- this._notify(false);
105
- }
106
- _notify(all = true) {
107
- for (const observer of this._componentObservers) {
108
- observer.configChanged(this._config);
109
- }
110
- if (all) {
111
- for (const observer of this._observers) {
112
- observer.configChanged(this._config);
113
- }
114
- }
115
- if (balBrowser.hasWindow) {
116
- saveConfig(window, this._config);
117
- }
118
- }
119
- }
120
- const config = /*@__PURE__*/ new Config();
121
- const configFromSession = (win) => {
122
- try {
123
- const configStr = win.sessionStorage.getItem(BALOISE_SESSION_KEY);
124
- return configStr !== null ? JSON.parse(configStr) : {};
125
- }
126
- catch (e) {
127
- return {};
128
- }
129
- };
130
- const saveConfig = (win, c) => {
131
- try {
132
- win.sessionStorage.setItem(BALOISE_SESSION_KEY, JSON.stringify(c));
133
- }
134
- catch (e) {
135
- return;
136
- }
137
- };
138
-
139
- const setupConfig = (userConfig = {}, win = {}) => {
140
- if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
141
- win = window;
142
- }
143
- win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
144
- config.reset(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), userConfig), { icons: Object.assign(Object.assign({}, configFromSession(win).icons), userConfig.icons) }));
145
- win.BaloiseDesignSystem.config = config;
146
- };
147
-
148
- class BalNoticeController {
149
- constructor(options) {
150
- this.options = options;
151
- this.container = null;
152
- this.queue = [];
153
- this.preQueue = [];
154
- this.queueLimit = 5;
155
- }
156
- create(options) {
157
- if (balBrowser.hasDocument) {
158
- this.setupContainer();
159
- const clone = this.findClone(options);
160
- if (clone === undefined) {
161
- const el = document.createElement(this.options.tag);
162
- Object.assign(el, options);
163
- el.addEventListener('balClose', ev => {
164
- this.removeFromQueue(ev.detail);
165
- });
166
- this.preQueue.push(el);
167
- this.updateQueue();
168
- return el;
169
- }
170
- return clone;
171
- }
172
- }
173
- setQueue(queueLimit) {
174
- this.queueLimit = queueLimit;
175
- }
176
- async dismissAll() {
177
- var _a;
178
- const elements = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.options.tag);
179
- if (elements) {
180
- const closingQueue = [];
181
- for (let index = 0; index < elements.length; index++) {
182
- const el = elements[index];
183
- if (el.close) {
184
- closingQueue.push(el.close());
185
- }
186
- }
187
- await Promise.all(closingQueue);
188
- }
189
- }
190
- /**
191
- * @deprecated use dismissAll instead
192
- */
193
- async clearAll() {
194
- console.warn('[DEPRECATED] - use dismissAll() instead');
195
- return this.dismissAll();
196
- }
197
- findClone(options) {
198
- for (let index = 0; index < this.queue.length; index++) {
199
- const el = this.queue[index];
200
- if (el.message === options.message && el.color === options.color) {
201
- return el;
202
- }
203
- }
204
- return undefined;
205
- }
206
- setupContainer() {
207
- if (balBrowser.hasDocument) {
208
- const containerId = `${this.options.tag}-container`;
209
- this.container = document.getElementById(containerId);
210
- if (this.container)
211
- return;
212
- if (!this.container) {
213
- this.container = document.createElement('bal-notices');
214
- this.container.setAttribute('interface', this.options.tag.replace('bal-', ''));
215
- this.container.id = containerId;
216
- }
217
- document.body.appendChild(this.container);
218
- }
219
- }
220
- updateQueue() {
221
- var _a;
222
- if (this.queue.length < this.queueLimit) {
223
- const el = this.preQueue.shift();
224
- if (el && this.container) {
225
- this.queue.push(el);
226
- this.container.insertAdjacentElement('beforeend', el);
227
- }
228
- }
229
- if (this.queue.length === 0) {
230
- (_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
231
- }
232
- }
233
- removeFromQueue(toastId) {
234
- this.queue = this.queue.filter(el => el.id !== toastId);
235
- setTimeout(() => this.updateQueue(), 0);
236
- }
237
- }
238
-
239
- class BalToastController extends BalNoticeController {
240
- constructor() {
241
- super({
242
- tag: 'bal-toast',
243
- });
244
- }
245
- create(options) {
246
- return super.create(options);
247
- }
248
- }
249
- const balToastController = new BalToastController();
250
-
251
- class BalSnackbarController extends BalNoticeController {
252
- constructor() {
253
- super({
254
- tag: 'bal-snackbar',
255
- });
256
- }
257
- create(options) {
258
- return super.create(options);
259
- }
260
- }
261
- const balSnackbarController = new BalSnackbarController();
262
-
263
- // generated by .build/version.js
264
- const VERSION = 'BAL_DEV_VERSION';
265
-
266
- const initializeBaloiseDesignSystem = (userConfig = {}, platformConfig = undefined, win = {}) => {
267
- if (Object.keys(win).length === 0 && balBrowser.hasWindow) {
268
- win = window;
269
- }
270
- win.BaloiseDesignSystem = win.BaloiseDesignSystem || {};
271
- if (platformConfig) {
272
- setPlatformHelpers(platformConfig);
273
- }
274
- setupConfig(Object.assign(Object.assign({}, userConfig), platformConfig), win);
275
- win.BaloiseDesignSystem.toastController = balToastController;
276
- win.BaloiseDesignSystem.snackbarController = balSnackbarController;
277
- win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win);
278
- win.BaloiseDesignSystem.version = VERSION;
279
- };
280
-
281
- export { BalToastController as B, BalSnackbarController as a, balToastController as b, balSnackbarController as c, initializeBaloiseDesignSystem as i, setupConfig as s };
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- const globalImport = require('./global-e99d827b.js');
4
-
5
- const globalScripts = globalImport.globalScript;
6
-
7
- exports.globalScripts = globalScripts;