Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.prod.theming.getConstructableStyle.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/theming/getConstructableStyle.ts"],
"sourcesContent": ["import getEffectiveStyle from \"./getEffectiveStyle.js\";\nimport { attachCustomCSSChange } from \"./CustomStyle.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\nconst constructableStyleMap = new Map>();\n\nattachCustomCSSChange((tag: string) => {\n\tconstructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\n/**\n * Returns (and caches) a constructable style sheet for a web component class\n * Note: Chrome\n * @param ElementClass\n * @returns {*}\n */\nconst getConstructableStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\n\tif (!constructableStyleMap.has(key)) {\n\t\tconst styleContent = getEffectiveStyle(ElementClass);\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(styleContent);\n\t\tconstructableStyleMap.set(key, [style]);\n\t}\n\n\treturn constructableStyleMap.get(key)!;\n};\n\nexport default getConstructableStyle;\n"],
"mappings": "aAAA,OAAOA,MAAuB,yBAC9B,OAAS,yBAAAC,MAA6B,mBAGtC,MAAMC,EAAwB,IAAI,IAElCD,EAAuBE,GAAgB,CACtCD,EAAsB,OAAO,GAAGC,CAAG,SAAS,CAC7C,CAAC,EAQD,MAAMC,EAAyBC,GAAoC,CAElE,MAAMC,EAAM,GADAD,EAAa,YAAY,EAAE,OAAO,CAC5B,UAElB,GAAI,CAACH,EAAsB,IAAII,CAAG,EAAG,CACpC,MAAMC,EAAeP,EAAkBK,CAAY,EAC7CG,EAAQ,IAAI,cAClBA,EAAM,YAAYD,CAAY,EAC9BL,EAAsB,IAAII,EAAK,CAACE,CAAK,CAAC,CACvC,CAEA,OAAON,EAAsB,IAAII,CAAG,CACrC,EAEA,eAAeF",
"names": ["getEffectiveStyle", "attachCustomCSSChange", "constructableStyleMap", "tag", "getConstructableStyle", "ElementClass", "key", "styleContent", "style"]
}