@ui5/webcomponents-base 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/renderer/executeTemplate.js +18 -1
- package/dist/resources/bundle.esm.js +8 -8
- package/dist/resources/bundle.esm.js.map +1 -1
- package/hash.txt +1 -1
- package/package.json +2 -2
- package/src/renderer/executeTemplate.js +18 -1
package/hash.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
g/Qs2ySyAS17EF43TarO3rDow/Q=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@buxlabs/amd-to-es6": "0.16.1",
|
|
39
39
|
"@openui5/sap.ui.core": "1.94.0",
|
|
40
|
-
"@ui5/webcomponents-tools": "1.2.
|
|
40
|
+
"@ui5/webcomponents-tools": "1.2.4",
|
|
41
41
|
"chromedriver": "99.0.0",
|
|
42
42
|
"clean-css": "^5.2.2",
|
|
43
43
|
"copy-and-watch": "^0.1.5",
|
|
@@ -9,9 +9,26 @@ import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from "../Cus
|
|
|
9
9
|
* @returns {*}
|
|
10
10
|
*/
|
|
11
11
|
const executeTemplate = (template, component) => {
|
|
12
|
-
const tagsToScope = component
|
|
12
|
+
const tagsToScope = getTagsToScope(component);
|
|
13
13
|
const scope = getCustomElementsScopingSuffix();
|
|
14
14
|
return template(component, tagsToScope, scope);
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Returns all tags, used inside component's template subject to scoping.
|
|
19
|
+
* @param component - the component
|
|
20
|
+
* @returns {Array[]}
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
const getTagsToScope = component => {
|
|
24
|
+
const componentTag = component.constructor.getMetadata().getPureTag();
|
|
25
|
+
const tagsToScope = component.constructor.getUniqueDependencies().map(dep => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);
|
|
26
|
+
|
|
27
|
+
if (shouldScopeCustomElement(componentTag)) {
|
|
28
|
+
tagsToScope.push(componentTag);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return tagsToScope;
|
|
32
|
+
};
|
|
33
|
+
|
|
17
34
|
export default executeTemplate;
|