@ui5/webcomponents-base 0.31.18 → 0.31.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "0.31.18",
3
+ "version": "0.31.22",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "lit-html": "^1.0.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@ui5/webcomponents-tools": "0.31.18",
30
+ "@ui5/webcomponents-tools": "0.31.22",
31
31
  "array-uniq": "^2.0.0",
32
32
  "chromedriver": "88.0.0",
33
33
  "copy-and-watch": "^0.1.4",
@@ -1,6 +1,7 @@
1
1
  import updateShadowRoot from "./updateShadowRoot.js";
2
2
  import { renderFinished } from "./Render.js";
3
3
  import getEffectiveContentDensity from "./util/getEffectiveContentDensity.js";
4
+ import { getEffectiveScopingSuffixForTag } from "./CustomElementsScope.js";
4
5
 
5
6
  /**
6
7
  *
@@ -71,10 +72,24 @@ class StaticAreaItem extends HTMLElement {
71
72
  getStableDomRef(refName) {
72
73
  return this.shadowRoot.querySelector(`[data-ui5-stable=${refName}]`);
73
74
  }
74
- }
75
75
 
76
- if (!customElements.get("ui5-static-area-item")) {
77
- customElements.define("ui5-static-area-item", StaticAreaItem);
76
+ static getTag() {
77
+ const pureTag = "ui5-static-area-item";
78
+ const suffix = getEffectiveScopingSuffixForTag(pureTag);
79
+ if (!suffix) {
80
+ return pureTag;
81
+ }
82
+
83
+ return `${pureTag}-${suffix}`;
84
+ }
85
+
86
+ static createInstance() {
87
+ if (!customElements.get(StaticAreaItem.getTag())) {
88
+ customElements.define(StaticAreaItem.getTag(), StaticAreaItem);
89
+ }
90
+
91
+ return document.createElement(this.getTag());
92
+ }
78
93
  }
79
94
 
80
95
  export default StaticAreaItem;
package/src/UI5Element.js CHANGED
@@ -3,7 +3,7 @@ import { boot } from "./Boot.js";
3
3
  import UI5ElementMetadata from "./UI5ElementMetadata.js";
4
4
  import EventProvider from "./EventProvider.js";
5
5
  import getSingletonElementInstance from "./util/getSingletonElementInstance.js";
6
- import "./StaticAreaItem.js";
6
+ import StaticAreaItem from "./StaticAreaItem.js";
7
7
  import updateShadowRoot from "./updateShadowRoot.js";
8
8
  import { renderDeferred, renderImmediately, cancelRender } from "./Render.js";
9
9
  import { registerTag, isTagRegistered, recordTagRegistrationFailure } from "./CustomElementsRegistry.js";
@@ -795,7 +795,7 @@ class UI5Element extends HTMLElement {
795
795
  }
796
796
 
797
797
  if (!this.staticAreaItem) {
798
- this.staticAreaItem = document.createElement("ui5-static-area-item");
798
+ this.staticAreaItem = StaticAreaItem.createInstance();
799
799
  this.staticAreaItem.setOwnerElement(this);
800
800
  }
801
801
  if (!this.staticAreaItem.parentElement) {
package/src/i18nBundle.js CHANGED
@@ -39,7 +39,6 @@ const getI18nBundle = packageName => {
39
39
  if (I18nBundleInstances.has(packageName)) {
40
40
  return I18nBundleInstances.get(packageName);
41
41
  }
42
-
43
42
  const i18nBundle = new I18nBundle(packageName);
44
43
  I18nBundleInstances.set(packageName, i18nBundle);
45
44
  return i18nBundle;