All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.config.ThemeRoot.js Maven / Gradle / Ivy

"use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as m}from"../InitialConfiguration.js";import{getTheme as a}from"./Theme.js";let t;const n=()=>(t===void 0&&(t=m()),t),d=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(a())}},c=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(c(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,d as setThemeRoot,i as attachCustomThemeStylesToHead};
//# sourceMappingURL=ThemeRoot.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy