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

package.dist.theming.getConstructableStyle.js.map Maven / Gradle / Ivy

{"version":3,"file":"getConstructableStyle.js","sourceRoot":"","sources":["../../src/theming/getConstructableStyle.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEtE,qBAAqB,CAAC,CAAC,GAAW,EAAE,EAAE;IACrC,qBAAqB,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,kFAAkF;AAClI,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,CAAC,YAA+B,EAAE,EAAE;IACjE,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;IAE5B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACpC,MAAM,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAChC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","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"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy