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.
{
"version": 3,
"sources": ["../../src/updateShadowRoot.ts"],
"sourcesContent": ["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\tconst renderResult = element.render(); // this is checked before calling updateShadowRoot\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor);\n\n\tctor.renderer(renderResult, shadowRoot, { host: element });\n};\n\nexport default updateShadowRoot;\n"],
"mappings": "aAAA,OAAOA,MAA2B,qCAOlC,MAAMC,EAAoBC,GAAwB,CACjD,MAAMC,EAAOD,EAAQ,YACfE,EAAaF,EAAQ,WACrBG,EAAeH,EAAQ,OAAO,EAEpC,GAAI,CAACE,EAAY,CAChB,QAAQ,KAAK,mCAAmC,EAChD,MACD,CAEAA,EAAW,mBAAqBJ,EAAsBG,CAAI,EAE1DA,EAAK,SAASE,EAAcD,EAAY,CAAE,KAAMF,CAAQ,CAAC,CAC1D,EAEA,eAAeD",
"names": ["getConstructableStyle", "updateShadowRoot", "element", "ctor", "shadowRoot", "renderResult"]
}