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.
Files changed (2) hide show
  1. package/dist/index.js +20 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,16 +1,13 @@
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
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 regionDomain = getRegionDomain();
23
- return `https://${regionDomain}`;
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 hostname = window.location.hostname;
30
- const matchedDomain = DOMAIN_LIST.some(
31
- (regionDomain) => hostname.endsWith(regionDomain)
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 "app.mypurecloud.com";
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.2-beta.0-2/genesys-webcomponents/";
226
- const CHART_COMPONENT_ASSET_PREFIX = "/spark-components/build-assets/4.154.2-beta.0-2/chart/genesys-chart-webcomponents/";
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesys-spark",
3
- "version": "4.154.2-beta.0",
3
+ "version": "4.154.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",