@baloise/ds-core 16.2.1-nightly.20240708 → 16.2.1-nightly.20240710
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/initialize.js +1 -1
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
- package/dist/baloise-design-system/{p-1319d974f8.system.entry.js → p-1e803a4cd6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a8c1167cd0.system.entry.js → p-21658e982e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-cd8c8563a4.entry.js → p-27291e0c90.entry.js} +1 -1
- package/dist/baloise-design-system/{p-920bcd1308.system.entry.js → p-2b7f751089.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-30646fc574.entry.js → p-3504cb83ed.entry.js} +1 -1
- package/dist/baloise-design-system/{p-328785e634.entry.js → p-3cf47c72b8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-49269d144a.entry.js → p-43e3e4710f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-81cedb1b7c.entry.js → p-482a7327d3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-7a83b0fdc2.system.entry.js → p-499c5ea05c.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5a8ccb7204.entry.js → p-499d4982ff.entry.js} +1 -1
- package/dist/baloise-design-system/{p-66083ebb.js → p-4b518635.js} +1 -1
- package/dist/baloise-design-system/{p-b64407d47c.entry.js → p-4bc5b9ea11.entry.js} +1 -1
- package/dist/baloise-design-system/p-54f81c32.js +1 -1
- package/dist/baloise-design-system/{p-fd6b56a850.system.entry.js → p-6d554e463a.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-7291766c.system.js +1 -1
- package/dist/baloise-design-system/{p-9b1567e660.entry.js → p-7fd548857f.entry.js} +1 -1
- package/dist/baloise-design-system/{p-fc2a5225.system.js → p-82525d39.system.js} +1 -1
- package/dist/baloise-design-system/{p-ea3c629698.entry.js → p-8507b79dfa.entry.js} +1 -1
- package/dist/baloise-design-system/{p-215dddc8e7.system.entry.js → p-91c223cb38.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-00634c6eab.system.entry.js → p-9c92e8dc80.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-72316f1f.system.js → p-9f1dc117.system.js} +1 -1
- package/dist/baloise-design-system/{p-1a76488943.system.entry.js → p-a5ab055cf6.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-a18b431580.entry.js → p-afed952563.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ce84782648.system.entry.js → p-bdada93cd5.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d8eddc44b4.system.entry.js → p-c294427dc4.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-862804ce.system.js → p-c4710941.system.js} +1 -1
- package/dist/baloise-design-system/{p-0780eed815.system.entry.js → p-cc585674be.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b17ed6ef72.system.entry.js → p-cce760a266.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-acddb283be.entry.js → p-cd1a4c6bd8.entry.js} +1 -1
- package/dist/baloise-design-system/{p-511dc34096.entry.js → p-db893550d3.entry.js} +1 -1
- package/dist/baloise-design-system/{p-e2bc8bf7e6.system.entry.js → p-dba20c9b7e.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-80b26be4.js → p-eebb2cea.js} +1 -1
- package/dist/baloise-design-system/{p-42cc562c24.entry.js → p-f07900b4f9.entry.js} +1 -1
- 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-hint_3.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-popover_2.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +3 -3
- 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/{breakpoints.decorator-6eadbe7d.js → breakpoints.decorator-78039314.js} +1 -1
- package/dist/cjs/{breakpoints.subject-bda664e0.js → breakpoints.subject-6a391a7d.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-2a19d091.js +1 -1
- package/dist/cjs/{tokens.esm-01bf4763.js → tokens.esm-bb99d47c.js} +1 -1
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +3 -3
- package/dist/esm/bal-datepicker.entry.js +3 -3
- package/dist/esm/bal-hint_3.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-popover_2.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +3 -3
- 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/{breakpoints.decorator-ab68f24c.js → breakpoints.decorator-acfed051.js} +1 -1
- package/dist/esm/{breakpoints.subject-586cdeea.js → breakpoints.subject-3da61eea.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-e216cfe4.js +1 -1
- package/dist/esm/{tokens.esm-0254a200.js → tokens.esm-f6c3ee57.js} +1 -1
- 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-hint_3.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-popover_2.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.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/{breakpoints.decorator-ab68f24c.js → breakpoints.decorator-acfed051.js} +1 -1
- package/dist/esm-es5/{breakpoints.subject-586cdeea.js → breakpoints.subject-3da61eea.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-e216cfe4.js +1 -1
- package/package.json +7 -7
- /package/dist/baloise-design-system/{p-3b57c7cc.js → p-1e816790.js} +0 -0
- /package/dist/baloise-design-system/{p-63dbcead.system.js → p-37b1b516.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-0254a200.js → tokens.esm-f6c3ee57.js} +0 -0
package/dist/esm-es5/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter,__extends,__generator}from"tslib";export{F as FileUploadRejectionReason}from"./bal-file-upload.type-2a70f4ec.js";export{B as BalDate,i as i18nBalDate}from"./date-38a0b208.js";export{i as i18nBalClose}from"./bal-close.i18n-f2daa707.js";export{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";export{i as i18nBalTimeInput}from"./bal-time-input.i18n-157c7092.js";export{i as i18nBalInputStepper}from"./bal-input-stepper.i18n-aaa4a009.js";export{i as i18nBalLabel}from"./bal-label.i18n-4212be56.js";export{a as BalSnackbarController,B as BalToastController,c as balSnackbarController,b as balToastController,i as initialize,i as initializeBaloiseDesignSystem,s as setupConfig}from"./initialize-e216cfe4.js";export{n as newBalOption}from"./option-37cb0282.js";export{n as newBalStepOption}from"./bal-step.util-3905ad56.js";export{n as newBalTabOption}from"./bal-tab.util-933315fe.js";import{g as getAppRoot,c as componentOnReady}from"./helpers-c201154e.js";export{c as componentOnReady,e as deepReady,g as getAppRoot,i as isDescendant,s as shallowReady,f as wait,b as waitAfterFramePaint,d as waitAfterIdleCallback,w as waitForComponent,a as waitForDesignSystem}from"./helpers-c201154e.js";export{s as scrollToFirstInvalidField}from"./form-fb8dd9f5.js";export{B as BalScrollHandler}from"./scroll-e341d95b.js";import{b as balBrowser}from"./browser-a8073d92.js";export{b as balBrowser}from"./browser-a8073d92.js";import{b as balDevice}from"./device-8c6d2881.js";export{B as BalDevice,b as balDevice}from"./device-8c6d2881.js";export{I as INVALID_VALUE}from"./mask-util-71edc2b8.js";import{g as getOverlays,a as getOverlay}from"./overlays-9d49a4a5.js";import{B as BalWindowResizeListener,b as balBreakpoints}from"./breakpoints.subject-
|
|
1
|
+
import{__awaiter,__extends,__generator}from"tslib";export{F as FileUploadRejectionReason}from"./bal-file-upload.type-2a70f4ec.js";export{B as BalDate,i as i18nBalDate}from"./date-38a0b208.js";export{i as i18nBalClose}from"./bal-close.i18n-f2daa707.js";export{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";export{i as i18nBalTimeInput}from"./bal-time-input.i18n-157c7092.js";export{i as i18nBalInputStepper}from"./bal-input-stepper.i18n-aaa4a009.js";export{i as i18nBalLabel}from"./bal-label.i18n-4212be56.js";export{a as BalSnackbarController,B as BalToastController,c as balSnackbarController,b as balToastController,i as initialize,i as initializeBaloiseDesignSystem,s as setupConfig}from"./initialize-e216cfe4.js";export{n as newBalOption}from"./option-37cb0282.js";export{n as newBalStepOption}from"./bal-step.util-3905ad56.js";export{n as newBalTabOption}from"./bal-tab.util-933315fe.js";import{g as getAppRoot,c as componentOnReady}from"./helpers-c201154e.js";export{c as componentOnReady,e as deepReady,g as getAppRoot,i as isDescendant,s as shallowReady,f as wait,b as waitAfterFramePaint,d as waitAfterIdleCallback,w as waitForComponent,a as waitForDesignSystem}from"./helpers-c201154e.js";export{s as scrollToFirstInvalidField}from"./form-fb8dd9f5.js";export{B as BalScrollHandler}from"./scroll-e341d95b.js";import{b as balBrowser}from"./browser-a8073d92.js";export{b as balBrowser}from"./browser-a8073d92.js";import{b as balDevice}from"./device-8c6d2881.js";export{B as BalDevice,b as balDevice}from"./device-8c6d2881.js";export{I as INVALID_VALUE}from"./mask-util-71edc2b8.js";import{g as getOverlays,a as getOverlay}from"./overlays-9d49a4a5.js";import{B as BalWindowResizeListener,b as balBreakpoints}from"./breakpoints.subject-3da61eea.js";export{c as BalBreakpointSubject,d as BalBreakpointsUtil,a as balBreakpointSubject,b as balBreakpoints}from"./breakpoints.subject-3da61eea.js";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-6ac6c9bd.js";export{d as defaultConfig}from"./config.default-7efdc82d.js";import{S as Subject}from"./listener-04842ae9.js";export{B as BalSwipeSubject}from"./swipe.subject-f1d64e8d.js";import"./index.esm-83b1f9c4.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./index-b6003bc7.js";import"./icons.constant-a7885631.js";import"./tokens.esm-f6c3ee57.js";import"./log-dfd1c19f.js";var i18nBalFieldLabel={de:{optional:" (optional)"},en:{optional:" (optional)"},fr:{optional:" (optionnel)"},it:{optional:" (opzionale)"},nl:{optional:" (optioneel)"},es:{optional:" (opcional)"},pl:{optional:" (opcjonalnie)"},pt:{optional:" (opcional)"},sv:{optional:" (frivillig)"},fi:{optional:" (valinnainen)"}};var newBalCheckboxOption=function(e){return Object.assign(Object.assign({interface:"checkbox",labelHidden:false,flat:false,disabled:false,readonly:false,required:false,nonSubmit:false,invalid:false,checked:false},e),{label:"",html:e.label})};var newBalRadioOption=function(e){return Object.assign(Object.assign({interface:"radio",labelHidden:false,flat:false,disabled:false,readonly:false,required:false,nonSubmit:false,invisible:false,invalid:false},e),{label:"",html:e.label})};var newBalOptionValue=function(e,a,t,o){if(t===void 0){t=false}return{value:e,label:a,disabled:t,data:o}};var newBalSingleOptionValue=function(e,a,t){if(a===void 0){a=false}return newBalOptionValue(e,e,a,t)};var BalOrientationSubject=function(e){__extends(a,e);function a(){var a=e.call(this,(function(e){return e.orientationListener(a.state)}))||this;a.listener=new BalWindowResizeListener;a.state=balDevice.orientation.toObject();a.listener.connect();a.listener.add((function(){var e=balDevice.orientation.toObject();if(!a.isEqual(e)){a.state=e;a.notify(undefined)}}));return a}a.prototype.attach=function(a){e.prototype.attach.call(this,a);a.orientationListener(this.state)};a.prototype.isEqual=function(e){return e.landscape===this.state.landscape&&e.portrait===this.state.portrait};return a}(Subject);var balOrientationSubject=new BalOrientationSubject;var BalModalController=function(){function e(){this.tag="bal-modal"}e.prototype.create=function(e){var a=this;if(typeof customElements!=="undefined"&&balBrowser.hasDocument){return customElements.whenDefined(this.tag).then((function(){var t=document.createElement(a.tag);Object.assign(t,e);getAppRoot(document).appendChild(t);return new Promise((function(e){return componentOnReady(t,e)}))}))}return Promise.resolve()};e.prototype.dismissAll=function(e,a){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){switch(o.label){case 0:if(!balBrowser.hasDocument)return[3,2];t=getOverlays(document,this.tag);return[4,Promise.all(t.map((function(t){return t.dismiss(e,a)})))];case 1:o.sent();o.label=2;case 2:return[2]}}))}))};e.prototype.dismiss=function(e,a,t){if(balBrowser.hasDocument){var o=getOverlay(document,this.tag,t);if(!o){return Promise.reject("overlay does not exist")}return o.dismiss(e,a)}return Promise.resolve(false)};e.prototype.getTop=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(balBrowser.hasDocument){return[2,getOverlay(document,this.tag)]}return[2]}))}))};return e}();var balModalController=new BalModalController;var hasTouchSupport=function(){return balDevice.hasTouchScreen};var isBrowser=function(e){if(e==="Safari"){return balBrowser.isSafari}return false};var getPlatforms=function(e){return balBreakpoints.detect()};var isPlatform=function(e,a){if(typeof e==="string"){a=e}if(a){return balBreakpoints.detect().includes(a)}return false};var NewBalOptionValue=newBalOptionValue;var NewBalSingleOptionValue=newBalSingleOptionValue;export{BalModalController,BalOrientationSubject,NewBalOptionValue,NewBalSingleOptionValue,balModalController,balOrientationSubject,getPlatforms,hasTouchSupport,i18nBalFieldLabel,isBrowser,isPlatform,newBalCheckboxOption,newBalOptionValue,newBalRadioOption,newBalSingleOptionValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter,__extends,__generator}from"tslib";import{a as setPlatformHelpers}from"./index-b6003bc7.js";import{b as balBrowser}from"./browser-a8073d92.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";var BalNoticeController=function(){function t(t){this.options=t;this.container=null;this.queue=[];this.preQueue=[];this.queueLimit=5}t.prototype.create=function(t){var i=this;if(balBrowser.hasDocument){this.setupContainer();var e=this.findClone(t);if(e===undefined){var n=document.createElement(this.options.tag);Object.assign(n,t);n.addEventListener("balClose",(function(t){i.removeFromQueue(t.detail)}));this.preQueue.push(n);this.updateQueue();return n}return e}};t.prototype.setQueue=function(t){this.queueLimit=t};t.prototype.dismissAll=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e,n,r;return __generator(this,(function(s){switch(s.label){case 0:i=(t=this.container)===null||t===void 0?void 0:t.querySelectorAll(this.options.tag);if(!i)return[3,2];e=[];for(n=0;n<i.length;n++){r=i[n];if(r.close){e.push(r.close())}}return[4,Promise.all(e)];case 1:s.sent();s.label=2;case 2:return[2]}}))}))};t.prototype.clearAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){console.warn("[DEPRECATED] - use dismissAll() instead");return[2,this.dismissAll()]}))}))};t.prototype.findClone=function(t){for(var i=0;i<this.queue.length;i++){var e=this.queue[i];if(e.message===t.message&&e.color===t.color){return e}}return undefined};t.prototype.setupContainer=function(){if(balBrowser.hasDocument){var t="".concat(this.options.tag,"-container");this.container=document.getElementById(t);if(this.container)return;if(!this.container){this.container=document.createElement("bal-notices");this.container.setAttribute("interface",this.options.tag.replace("bal-",""));this.container.id=t}document.body.appendChild(this.container)}};t.prototype.updateQueue=function(){var t;if(this.queue.length<this.queueLimit){var i=this.preQueue.shift();if(i&&this.container){this.queue.push(i);this.container.insertAdjacentElement("beforeend",i)}}if(this.queue.length===0){(t=this.container)===null||t===void 0?void 0:t.remove()}};t.prototype.removeFromQueue=function(t){var i=this;this.queue=this.queue.filter((function(i){return i.id!==t}));setTimeout((function(){return i.updateQueue()}),0)};return t}();var BalToastController=function(t){__extends(i,t);function i(){return t.call(this,{tag:"bal-toast"})||this}i.prototype.create=function(i){return t.prototype.create.call(this,i)};return i}(BalNoticeController);var balToastController=new BalToastController;var BalSnackbarController=function(t){__extends(i,t);function i(){return t.call(this,{tag:"bal-snackbar"})||this}i.prototype.create=function(i){return t.prototype.create.call(this,i)};return i}(BalNoticeController);var balSnackbarController=new BalSnackbarController;var BALOISE_SESSION_KEY="baloise-persist-config";var Config=function(){function t(){this._componentObservers=[];this._observers=[];this._config=defaultConfig}Object.defineProperty(t.prototype,"locale",{get:function(){return"".concat(this._config.language,"-").concat(this._config.region)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"region",{get:function(){return this._config.region},set:function(t){if(t!==this._config.region){this._config.region=t;this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"language",{get:function(){return this._config.language},set:function(t){if(t!==this._config.language){if(this._config.allowedLanguages.includes(t)){this._config.language=t}else{this._config.language=this._config.fallbackLanguage}this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowedLanguages",{get:function(){return this._config.allowedLanguages},set:function(t){if(t!==this._config.allowedLanguages){this._config.allowedLanguages=t;this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"icons",{get:function(){return this._config.icons},set:function(t){this._config.icons=Object.assign(Object.assign({},this._config.icons),t);this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"logger",{get:function(){return this._config.logger},set:function(t){this._config.logger=Object.assign({},t);this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"animated",{get:function(){return this._config.animated},set:function(t){this._config.animated=t;this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"httpFormSubmit",{get:function(){return this._config.httpFormSubmit},set:function(t){this._config.httpFormSubmit=t;this._notify()},enumerable:false,configurable:true});t.prototype.attach=function(t){var i=this._observers.includes(t);if(i){return console.log("Subject: Observer has been attached already.")}this._observers.push(t);t.configChanged(this._config)};t.prototype.detach=function(t){var i=this._observers.indexOf(t);if(i===-1){return console.log("Subject: Nonexistent observer.")}this._observers.splice(i,1)};t.prototype.attachComponent=function(t){var i=this._componentObservers.includes(t);if(i){return console.log("Subject: Observer has been attached already.")}this._componentObservers.push(t);t.configChanged(this._config)};t.prototype.detachComponent=function(t){var i=this._componentObservers.indexOf(t);if(i===-1){return console.log("Subject: Nonexistent observer.")}this._componentObservers.splice(i,1)};t.prototype.toString=function(){return JSON.stringify(this._config)};t.prototype.reset=function(t){this._config=Object.assign(Object.assign(Object.assign({},this._config),t),{icons:Object.assign(Object.assign({},this._config.icons),t.icons)});this._notify(false)};t.prototype._notify=function(t){if(t===void 0){t=true}for(var i=0,e=this._componentObservers;i<e.length;i++){var n=e[i];n.configChanged(this._config)}if(t){for(var r=0,s=this._observers;r<s.length;r++){var n=s[r];n.configChanged(this._config)}}if(balBrowser.hasWindow){saveConfig(window,this._config)}};return t}();var config=new Config;var configFromSession=function(t){try{var i=t.sessionStorage.getItem(BALOISE_SESSION_KEY);return i!==null?JSON.parse(i):{}}catch(t){return{}}};var saveConfig=function(t,i){try{t.sessionStorage.setItem(BALOISE_SESSION_KEY,JSON.stringify(i))}catch(t){return}};var setupConfig=function(t,i){if(t===void 0){t={}}if(i===void 0){i={}}if(Object.keys(i).length===0&&balBrowser.hasWindow){i=window}i.BaloiseDesignSystem=i.BaloiseDesignSystem||{};config.reset(Object.assign(Object.assign(Object.assign({},configFromSession(i)),t),{icons:Object.assign(Object.assign({},configFromSession(i).icons),t.icons)}));i.BaloiseDesignSystem.config=config};var VERSION="16.2.1-nightly.
|
|
1
|
+
import{__awaiter,__extends,__generator}from"tslib";import{a as setPlatformHelpers}from"./index-b6003bc7.js";import{b as balBrowser}from"./browser-a8073d92.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";var BalNoticeController=function(){function t(t){this.options=t;this.container=null;this.queue=[];this.preQueue=[];this.queueLimit=5}t.prototype.create=function(t){var i=this;if(balBrowser.hasDocument){this.setupContainer();var e=this.findClone(t);if(e===undefined){var n=document.createElement(this.options.tag);Object.assign(n,t);n.addEventListener("balClose",(function(t){i.removeFromQueue(t.detail)}));this.preQueue.push(n);this.updateQueue();return n}return e}};t.prototype.setQueue=function(t){this.queueLimit=t};t.prototype.dismissAll=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e,n,r;return __generator(this,(function(s){switch(s.label){case 0:i=(t=this.container)===null||t===void 0?void 0:t.querySelectorAll(this.options.tag);if(!i)return[3,2];e=[];for(n=0;n<i.length;n++){r=i[n];if(r.close){e.push(r.close())}}return[4,Promise.all(e)];case 1:s.sent();s.label=2;case 2:return[2]}}))}))};t.prototype.clearAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){console.warn("[DEPRECATED] - use dismissAll() instead");return[2,this.dismissAll()]}))}))};t.prototype.findClone=function(t){for(var i=0;i<this.queue.length;i++){var e=this.queue[i];if(e.message===t.message&&e.color===t.color){return e}}return undefined};t.prototype.setupContainer=function(){if(balBrowser.hasDocument){var t="".concat(this.options.tag,"-container");this.container=document.getElementById(t);if(this.container)return;if(!this.container){this.container=document.createElement("bal-notices");this.container.setAttribute("interface",this.options.tag.replace("bal-",""));this.container.id=t}document.body.appendChild(this.container)}};t.prototype.updateQueue=function(){var t;if(this.queue.length<this.queueLimit){var i=this.preQueue.shift();if(i&&this.container){this.queue.push(i);this.container.insertAdjacentElement("beforeend",i)}}if(this.queue.length===0){(t=this.container)===null||t===void 0?void 0:t.remove()}};t.prototype.removeFromQueue=function(t){var i=this;this.queue=this.queue.filter((function(i){return i.id!==t}));setTimeout((function(){return i.updateQueue()}),0)};return t}();var BalToastController=function(t){__extends(i,t);function i(){return t.call(this,{tag:"bal-toast"})||this}i.prototype.create=function(i){return t.prototype.create.call(this,i)};return i}(BalNoticeController);var balToastController=new BalToastController;var BalSnackbarController=function(t){__extends(i,t);function i(){return t.call(this,{tag:"bal-snackbar"})||this}i.prototype.create=function(i){return t.prototype.create.call(this,i)};return i}(BalNoticeController);var balSnackbarController=new BalSnackbarController;var BALOISE_SESSION_KEY="baloise-persist-config";var Config=function(){function t(){this._componentObservers=[];this._observers=[];this._config=defaultConfig}Object.defineProperty(t.prototype,"locale",{get:function(){return"".concat(this._config.language,"-").concat(this._config.region)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"region",{get:function(){return this._config.region},set:function(t){if(t!==this._config.region){this._config.region=t;this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"language",{get:function(){return this._config.language},set:function(t){if(t!==this._config.language){if(this._config.allowedLanguages.includes(t)){this._config.language=t}else{this._config.language=this._config.fallbackLanguage}this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowedLanguages",{get:function(){return this._config.allowedLanguages},set:function(t){if(t!==this._config.allowedLanguages){this._config.allowedLanguages=t;this._notify()}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"icons",{get:function(){return this._config.icons},set:function(t){this._config.icons=Object.assign(Object.assign({},this._config.icons),t);this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"logger",{get:function(){return this._config.logger},set:function(t){this._config.logger=Object.assign({},t);this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"animated",{get:function(){return this._config.animated},set:function(t){this._config.animated=t;this._notify()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"httpFormSubmit",{get:function(){return this._config.httpFormSubmit},set:function(t){this._config.httpFormSubmit=t;this._notify()},enumerable:false,configurable:true});t.prototype.attach=function(t){var i=this._observers.includes(t);if(i){return console.log("Subject: Observer has been attached already.")}this._observers.push(t);t.configChanged(this._config)};t.prototype.detach=function(t){var i=this._observers.indexOf(t);if(i===-1){return console.log("Subject: Nonexistent observer.")}this._observers.splice(i,1)};t.prototype.attachComponent=function(t){var i=this._componentObservers.includes(t);if(i){return console.log("Subject: Observer has been attached already.")}this._componentObservers.push(t);t.configChanged(this._config)};t.prototype.detachComponent=function(t){var i=this._componentObservers.indexOf(t);if(i===-1){return console.log("Subject: Nonexistent observer.")}this._componentObservers.splice(i,1)};t.prototype.toString=function(){return JSON.stringify(this._config)};t.prototype.reset=function(t){this._config=Object.assign(Object.assign(Object.assign({},this._config),t),{icons:Object.assign(Object.assign({},this._config.icons),t.icons)});this._notify(false)};t.prototype._notify=function(t){if(t===void 0){t=true}for(var i=0,e=this._componentObservers;i<e.length;i++){var n=e[i];n.configChanged(this._config)}if(t){for(var r=0,s=this._observers;r<s.length;r++){var n=s[r];n.configChanged(this._config)}}if(balBrowser.hasWindow){saveConfig(window,this._config)}};return t}();var config=new Config;var configFromSession=function(t){try{var i=t.sessionStorage.getItem(BALOISE_SESSION_KEY);return i!==null?JSON.parse(i):{}}catch(t){return{}}};var saveConfig=function(t,i){try{t.sessionStorage.setItem(BALOISE_SESSION_KEY,JSON.stringify(i))}catch(t){return}};var setupConfig=function(t,i){if(t===void 0){t={}}if(i===void 0){i={}}if(Object.keys(i).length===0&&balBrowser.hasWindow){i=window}i.BaloiseDesignSystem=i.BaloiseDesignSystem||{};config.reset(Object.assign(Object.assign(Object.assign({},configFromSession(i)),t),{icons:Object.assign(Object.assign({},configFromSession(i).icons),t.icons)}));i.BaloiseDesignSystem.config=config};var VERSION="16.2.1-nightly.20240710";var initializeBaloiseDesignSystem=function(t,i,e){if(t===void 0){t={}}if(i===void 0){i=undefined}if(e===void 0){e={}}if(Object.keys(e).length===0&&balBrowser.hasWindow){e=window}e.BaloiseDesignSystem=e.BaloiseDesignSystem||{};if(i){setPlatformHelpers(i)}setupConfig(Object.assign(Object.assign({},t),i),e);e.BaloiseDesignSystem.toastController=balToastController;e.BaloiseDesignSystem.snackbarController=balSnackbarController;e.BaloiseDesignSystem.initialize=function(){return setupConfig(e.BaloiseDesignSystem.config,e)};e.BaloiseDesignSystem.version=VERSION};export{BalToastController as B,BalSnackbarController as a,balToastController as b,balSnackbarController as c,initializeBaloiseDesignSystem as i,setupConfig as s};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baloise/ds-core",
|
|
3
|
-
"version": "16.2.1-nightly.
|
|
3
|
+
"version": "16.2.1-nightly.20240710",
|
|
4
4
|
"description": "The Baloise Design-System is an open source project for styling awesome web applications that follow the Baloise corporate styling guidelines.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"bubu": "vitest --ui"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@baloise/ds-styles": "16.2.1-nightly.
|
|
32
|
-
"@baloise/ds-icons": "16.2.1-nightly.
|
|
31
|
+
"@baloise/ds-styles": "16.2.1-nightly.20240710",
|
|
32
|
+
"@baloise/ds-icons": "16.2.1-nightly.20240710",
|
|
33
33
|
"@baloise/web-app-utils": "3.11.2",
|
|
34
34
|
"@floating-ui/dom": "~1.6.3",
|
|
35
35
|
"@popperjs/core": "~2.11.4",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"@baloise/output-target-react": "0.0.0",
|
|
55
55
|
"@baloise/output-target-vue": "0.0.0",
|
|
56
56
|
"@baloise/output-target-web": "0.0.0",
|
|
57
|
-
"@baloise/ds-css": "16.2.1-nightly.
|
|
58
|
-
"@baloise/ds-maps": "16.2.1-nightly.
|
|
59
|
-
"@baloise/ds-brand-icons": "16.2.1-nightly.
|
|
60
|
-
"@baloise/ds-favicons": "16.2.1-nightly.
|
|
57
|
+
"@baloise/ds-css": "16.2.1-nightly.20240710",
|
|
58
|
+
"@baloise/ds-maps": "16.2.1-nightly.20240710",
|
|
59
|
+
"@baloise/ds-brand-icons": "16.2.1-nightly.20240710",
|
|
60
|
+
"@baloise/ds-favicons": "16.2.1-nightly.20240710"
|
|
61
61
|
},
|
|
62
62
|
"sideEffects": false
|
|
63
63
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|