genesys-spark 4.154.2-beta.0 → 4.154.3
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 +20 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
".
|
|
4
|
-
"
|
|
5
|
-
".
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
".pure.cloud",
|
|
12
|
-
".maximus-pure.cloud"
|
|
13
|
-
// 'use2.us-gov-pure.cloud', Assets are not currently deployed to FedRAMP and should fallback to the default domain
|
|
1
|
+
const DEFAULT_DOMAIN = "mypurecloud.com";
|
|
2
|
+
const NON_STANDARD_DOMAINS = [
|
|
3
|
+
"inindca.com",
|
|
4
|
+
"inintca.com",
|
|
5
|
+
"mypurecloud.com.au",
|
|
6
|
+
"mypurecloud.com",
|
|
7
|
+
"mypurecloud.de",
|
|
8
|
+
"mypurecloud.ie",
|
|
9
|
+
"mypurecloud.jp"
|
|
10
|
+
// 'use2.us-gov-pure.cloud', Assets are not currently deployed to FedRAMP. It should fall back to the default domain.
|
|
14
11
|
];
|
|
15
12
|
function getComponentAssetsOrigin() {
|
|
16
13
|
return getAssetsOrigin();
|
|
@@ -19,24 +16,20 @@ function getChartComponentAssetsOrigin() {
|
|
|
19
16
|
return getAssetsOrigin();
|
|
20
17
|
}
|
|
21
18
|
function getAssetsOrigin() {
|
|
22
|
-
const
|
|
23
|
-
return `https
|
|
19
|
+
const matchedDomain = getRegionDomain();
|
|
20
|
+
return `https://app.${matchedDomain || DEFAULT_DOMAIN}`;
|
|
24
21
|
}
|
|
25
22
|
function getFontOrigin() {
|
|
26
23
|
return getComponentAssetsOrigin();
|
|
27
24
|
}
|
|
28
25
|
function getRegionDomain() {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
);
|
|
33
|
-
if (matchedDomain) {
|
|
34
|
-
if (hostname.startsWith("app.") || hostname.startsWith("app-regional.")) {
|
|
35
|
-
return hostname;
|
|
36
|
-
}
|
|
37
|
-
return hostname.replace(/^([^.]+)/, "app");
|
|
26
|
+
const pageHost = window.location.hostname;
|
|
27
|
+
if (pageHost.endsWith(".pure.cloud")) {
|
|
28
|
+
return pageHost.split(".").slice(-3).join(".");
|
|
38
29
|
}
|
|
39
|
-
return
|
|
30
|
+
return NON_STANDARD_DOMAINS.find(
|
|
31
|
+
(regionDomain) => pageHost.endsWith(regionDomain)
|
|
32
|
+
);
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
var __defProp = Object.defineProperty;
|
|
@@ -222,8 +215,8 @@ var intl = /*#__PURE__*/Object.freeze({
|
|
|
222
215
|
relativeTimeFormat: relativeTimeFormat
|
|
223
216
|
});
|
|
224
217
|
|
|
225
|
-
const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.
|
|
226
|
-
const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.
|
|
218
|
+
const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.3-684/genesys-webcomponents/";
|
|
219
|
+
const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.3-684/chart/genesys-chart-webcomponents/";
|
|
227
220
|
function loadSparkFonts(opts) {
|
|
228
221
|
const fontOrigin = getFontOrigin();
|
|
229
222
|
const flareFonts = {
|