(ElementClass: typeof UI5Element)
| 11 | }); |
| 12 | |
| 13 | const getEffectiveStyle = (ElementClass: typeof UI5Element) => { |
| 14 | const tag = ElementClass.getMetadata().getTag(); |
| 15 | const key = `${tag}_normal`; |
| 16 | const openUI5Enablement = getFeature<typeof OpenUI5Enablement>("OpenUI5Enablement"); |
| 17 | |
| 18 | if (!effectiveStyleMap.has(key)) { |
| 19 | let busyIndicatorStyles = ""; |
| 20 | |
| 21 | if (openUI5Enablement) { |
| 22 | busyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles()); |
| 23 | } |
| 24 | |
| 25 | const customStyle = getCustomCSS(tag) || ""; |
| 26 | const builtInStyles = getStylesString(ElementClass.styles); |
| 27 | |
| 28 | const effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`; |
| 29 | effectiveStyleMap.set(key, effectiveStyle); |
| 30 | } |
| 31 | |
| 32 | return effectiveStyleMap.get(key)!; // The key is guaranteed to exist |
| 33 | }; |
| 34 | |
| 35 | export default getEffectiveStyle; |
no test coverage detected
searching dependent graphs…