genesys-spark 4.154.2 → 4.154.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.
Files changed (2) hide show
  1. package/dist/index.js +27 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,13 +1,16 @@
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.
1
+ const DOMAIN_LIST = [
2
+ ".inindca.com",
3
+ ".dev-pure.cloud",
4
+ ".inintca.com",
5
+ ".test-pure.cloud",
6
+ ".mypurecloud.com",
7
+ ".mypurecloud.com.au",
8
+ ".mypurecloud.de",
9
+ ".mypurecloud.ie",
10
+ ".mypurecloud.jp",
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
11
14
  ];
12
15
  function getComponentAssetsOrigin() {
13
16
  return getAssetsOrigin();
@@ -16,20 +19,24 @@ function getChartComponentAssetsOrigin() {
16
19
  return getAssetsOrigin();
17
20
  }
18
21
  function getAssetsOrigin() {
19
- const matchedDomain = getRegionDomain();
20
- return `https://app.${matchedDomain || DEFAULT_DOMAIN}`;
22
+ const regionDomain = getRegionDomain();
23
+ return `https://${regionDomain}`;
21
24
  }
22
25
  function getFontOrigin() {
23
26
  return getComponentAssetsOrigin();
24
27
  }
25
28
  function getRegionDomain() {
26
- const pageHost = window.location.hostname;
27
- if (pageHost.endsWith(".pure.cloud")) {
28
- return pageHost.split(".").slice(-3).join(".");
29
- }
30
- return NON_STANDARD_DOMAINS.find(
31
- (regionDomain) => pageHost.endsWith(regionDomain)
29
+ const hostname = window.location.hostname;
30
+ const matchedDomain = DOMAIN_LIST.some(
31
+ (regionDomain) => hostname.endsWith(regionDomain)
32
32
  );
33
+ if (matchedDomain) {
34
+ if (hostname.startsWith("app.") || hostname.startsWith("app-regional.")) {
35
+ return hostname;
36
+ }
37
+ return hostname.replace(/^([^.]+)/, "app");
38
+ }
39
+ return "app.mypurecloud.com";
33
40
  }
34
41
 
35
42
  var __defProp = Object.defineProperty;
@@ -215,8 +222,8 @@ var intl = /*#__PURE__*/Object.freeze({
215
222
  relativeTimeFormat: relativeTimeFormat
216
223
  });
217
224
 
218
- const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.2-683/genesys-webcomponents/";
219
- const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.2-683/chart/genesys-chart-webcomponents/";
225
+ const COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.4-686/genesys-webcomponents/";
226
+ const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.4-686/chart/genesys-chart-webcomponents/";
220
227
  function loadSparkFonts(opts) {
221
228
  const fontOrigin = getFontOrigin();
222
229
  const flareFonts = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesys-spark",
3
- "version": "4.154.2",
3
+ "version": "4.154.4",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",