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.getEffectiveStyle.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/theming/getEffectiveStyle.ts"],
"sourcesContent": ["import { getCustomCSS, attachCustomCSSChange } from \"./CustomStyle.js\";\nimport getStylesString from \"./getStylesString.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\n\nconst effectiveStyleMap = new Map();\n\nattachCustomCSSChange((tag: string) => {\n\teffectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\nconst getEffectiveStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\tconst openUI5Enablement = getFeature(\"OpenUI5Enablement\");\n\n\tif (!effectiveStyleMap.has(key)) {\n\t\tlet busyIndicatorStyles = \"\";\n\n\t\tif (openUI5Enablement) {\n\t\t\tbusyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());\n\t\t}\n\n\t\tconst customStyle = getCustomCSS(tag) || \"\";\n\t\tconst builtInStyles = getStylesString(ElementClass.styles);\n\n\t\tconst effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`;\n\t\teffectiveStyleMap.set(key, effectiveStyle);\n\t}\n\n\treturn effectiveStyleMap.get(key)!; // The key is guaranteed to exist\n};\n\nexport default getEffectiveStyle;\n"],
"mappings": "aAAA,OAAS,gBAAAA,EAAc,yBAAAC,MAA6B,mBACpD,OAAOC,MAAqB,uBAC5B,OAAS,cAAAC,MAAkB,yBAI3B,MAAMC,EAAoB,IAAI,IAE9BH,EAAuBI,GAAgB,CACtCD,EAAkB,OAAO,GAAGC,CAAG,SAAS,CACzC,CAAC,EAED,MAAMC,EAAqBC,GAAoC,CAC9D,MAAMF,EAAME,EAAa,YAAY,EAAE,OAAO,EACxCC,EAAM,GAAGH,CAAG,UACZI,EAAoBN,EAAqC,mBAAmB,EAElF,GAAI,CAACC,EAAkB,IAAII,CAAG,EAAG,CAChC,IAAIE,EAAsB,GAEtBD,IACHC,EAAsBR,EAAgBO,EAAkB,uBAAuB,CAAC,GAGjF,MAAME,EAAcX,EAAaK,CAAG,GAAK,GAGnCO,EAAiB,GAFDV,EAAgBK,EAAa,MAAM,CAElB,IAAII,CAAW,IAAID,CAAmB,GAC7EN,EAAkB,IAAII,EAAKI,CAAc,CAC1C,CAEA,OAAOR,EAAkB,IAAII,CAAG,CACjC,EAEA,eAAeF",
"names": ["getCustomCSS", "attachCustomCSSChange", "getStylesString", "getFeature", "effectiveStyleMap", "tag", "getEffectiveStyle", "ElementClass", "key", "openUI5Enablement", "busyIndicatorStyles", "customStyle", "effectiveStyle"]
}