genesys-spark 4.50.0 → 4.51.0
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/dist/index.js +14 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -106,21 +106,18 @@ function checkAndLoadFonts(fonts) {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
function getClosestElement(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (node instanceof ShadowRoot) {
|
|
114
|
-
return getClosestElement(node.host, selector);
|
|
115
|
-
}
|
|
116
|
-
if (node instanceof HTMLElement) {
|
|
117
|
-
if (node.matches(selector)) {
|
|
118
|
-
return node;
|
|
119
|
-
} else {
|
|
120
|
-
return getClosestElement(node.parentNode, selector);
|
|
109
|
+
function getClosestElement(baseElement, selector) {
|
|
110
|
+
function closest(element) {
|
|
111
|
+
if (!element || element === document || element === window) {
|
|
112
|
+
return null;
|
|
121
113
|
}
|
|
114
|
+
if (element.assignedSlot) {
|
|
115
|
+
element = element.assignedSlot;
|
|
116
|
+
}
|
|
117
|
+
const found = element.closest(selector);
|
|
118
|
+
return found ? found : closest(element.getRootNode().host);
|
|
122
119
|
}
|
|
123
|
-
return
|
|
120
|
+
return closest(baseElement);
|
|
124
121
|
}
|
|
125
122
|
|
|
126
123
|
function dateTimeFormat(localeOrOptions, options) {
|
|
@@ -161,7 +158,8 @@ function determineDisplayLocale(element = document.body) {
|
|
|
161
158
|
}
|
|
162
159
|
}
|
|
163
160
|
function browserHasRegionData(localeString) {
|
|
164
|
-
|
|
161
|
+
var _a;
|
|
162
|
+
return localeString.length == 2 && ((_a = navigator.language) == null ? void 0 : _a.startsWith(`${localeString}-`));
|
|
165
163
|
}
|
|
166
164
|
function getFormat(locale) {
|
|
167
165
|
const date = /* @__PURE__ */ new Date("July 5, 2000 15:00:00 UTC+00:00");
|
|
@@ -198,8 +196,8 @@ var intl = /*#__PURE__*/Object.freeze({
|
|
|
198
196
|
relativeTimeFormat: relativeTimeFormat
|
|
199
197
|
});
|
|
200
198
|
|
|
201
|
-
const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.
|
|
202
|
-
const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.
|
|
199
|
+
const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.51.0-210/genesys-webcomponents/";
|
|
200
|
+
const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.51.0-210/chart/genesys-chart-webcomponents/";
|
|
203
201
|
function loadSparkFonts() {
|
|
204
202
|
const fontOrigin = getFontOrigin();
|
|
205
203
|
const FONTS = {
|