@elliemae/pui-app-sdk 6.0.0-next.6 → 6.0.0-next.7

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 (120) hide show
  1. package/dist/cjs/analytics/page-view-event.js +1 -1
  2. package/dist/cjs/api/auth/index.js +4 -2
  3. package/dist/cjs/communication/http-client/response-interceptor.js +1 -1
  4. package/dist/cjs/communication/http-client/retry-axios.js +13 -13
  5. package/dist/cjs/communication/http-client/retry.js +1 -1
  6. package/dist/cjs/sideeffect/error-toast/index.js +1 -1
  7. package/dist/cjs/utils/app-config/index.js +29 -13
  8. package/dist/cjs/utils/app-config/tests/app.config.json +147 -0
  9. package/dist/cjs/utils/auth/helper.js +1 -1
  10. package/dist/cjs/utils/auth/index.js +5 -4
  11. package/dist/cjs/utils/font-size.js +1 -1
  12. package/dist/cjs/utils/micro-frontend/guest.js +8 -7
  13. package/dist/cjs/utils/micro-frontend/host.js +3 -1
  14. package/dist/cjs/utils/micro-frontend/index.js +1 -4
  15. package/dist/cjs/utils/storybook/theme.js +1 -1
  16. package/dist/cjs/utils/window.js +7 -1
  17. package/dist/cjs/view/app-root/hosted-app.js +1 -1
  18. package/dist/cjs/view/app-root/stand-alone-app.js +1 -1
  19. package/dist/cjs/view/error-boundary/index.js +1 -1
  20. package/dist/cjs/view/error-toast/index.js +2 -2
  21. package/dist/cjs/view/fields/combo-box-v3/index.js +8 -2
  22. package/dist/cjs/view/fields/date-time-picker/index.js +5 -1
  23. package/dist/cjs/view/fields/radio/index.js +2 -2
  24. package/dist/cjs/view/fields/radio-group/index.js +7 -1
  25. package/dist/cjs/view/login/index.js +6 -0
  26. package/dist/cjs/view/micro-app/app-factory/index.js +6 -7
  27. package/dist/cjs/view/modals/session-expiry/index.js +15 -3
  28. package/dist/cjs/view/use-window-size-change.js +1 -1
  29. package/dist/cjs/view/wait-message/index.js +2 -1
  30. package/dist/esm/analytics/page-view-event.js +1 -1
  31. package/dist/esm/api/auth/index.js +4 -2
  32. package/dist/esm/communication/http-client/response-interceptor.js +1 -1
  33. package/dist/esm/communication/http-client/retry-axios.js +13 -13
  34. package/dist/esm/communication/http-client/retry.js +1 -1
  35. package/dist/esm/sideeffect/error-toast/index.js +1 -1
  36. package/dist/esm/utils/app-config/index.js +29 -13
  37. package/dist/esm/utils/app-config/tests/app.config.json +147 -0
  38. package/dist/esm/utils/auth/helper.js +1 -1
  39. package/dist/esm/utils/auth/index.js +5 -4
  40. package/dist/esm/utils/font-size.js +1 -1
  41. package/dist/esm/utils/micro-frontend/guest.js +8 -7
  42. package/dist/esm/utils/micro-frontend/host.js +3 -1
  43. package/dist/esm/utils/micro-frontend/index.js +1 -4
  44. package/dist/esm/utils/storybook/theme.js +1 -1
  45. package/dist/esm/utils/window.js +7 -1
  46. package/dist/esm/view/app-root/hosted-app.js +1 -1
  47. package/dist/esm/view/app-root/stand-alone-app.js +1 -1
  48. package/dist/esm/view/error-boundary/index.js +1 -1
  49. package/dist/esm/view/error-toast/index.js +2 -2
  50. package/dist/esm/view/fields/check-box/index.js +3 -1
  51. package/dist/esm/view/fields/combo-box-v3/index.js +8 -2
  52. package/dist/esm/view/fields/date-time-picker/index.js +8 -2
  53. package/dist/esm/view/fields/form-layout-block-item/index.js +3 -1
  54. package/dist/esm/view/fields/radio/index.js +2 -2
  55. package/dist/esm/view/fields/radio-group/index.js +7 -1
  56. package/dist/esm/view/fields/toggle/index.js +3 -1
  57. package/dist/esm/view/login/index.js +7 -1
  58. package/dist/esm/view/micro-app/app-factory/index.js +6 -7
  59. package/dist/esm/view/modals/session-expiry/index.js +16 -4
  60. package/dist/esm/view/use-window-size-change.js +1 -1
  61. package/dist/esm/view/wait-message/index.js +4 -3
  62. package/dist/types/lib/api/auth/index.d.ts +3 -2
  63. package/dist/types/lib/api/helpers.d.ts +1 -1
  64. package/dist/types/lib/communication/http-client/response-interceptor.d.ts +1 -3
  65. package/dist/types/lib/communication/http-client/retry-axios.d.ts +5 -5
  66. package/dist/types/lib/data/reducers.d.ts +1 -3
  67. package/dist/types/lib/data/saga.d.ts +3 -5
  68. package/dist/types/lib/data/store.d.ts +2 -2
  69. package/dist/types/lib/data/wait-message/reducer.d.ts +2 -2
  70. package/dist/types/lib/utils/app-config/config.d.ts +1 -3
  71. package/dist/types/lib/utils/app-config/index.d.ts +1 -0
  72. package/dist/types/lib/utils/app-config/tests/index.test.d.ts +1 -0
  73. package/dist/types/lib/utils/app-host-integration/react.d.ts +2 -2
  74. package/dist/types/lib/utils/guest-with-service.d.ts +1 -3
  75. package/dist/types/lib/utils/micro-frontend/host.d.ts +4 -4
  76. package/dist/types/lib/utils/micro-frontend/types.d.ts +4 -4
  77. package/dist/types/lib/utils/session.d.ts +3 -9
  78. package/dist/types/lib/utils/testing/render-with-state-addons.d.ts +2 -2
  79. package/dist/types/lib/utils/window.d.ts +1 -3
  80. package/dist/types/lib/view/app-root/hosted-app.d.ts +2 -2
  81. package/dist/types/lib/view/app-root/index.d.ts +2 -2
  82. package/dist/types/lib/view/app-root/stand-alone-app.d.ts +2 -2
  83. package/dist/types/lib/view/breakpoint/use-media-query-list.d.ts +1 -1
  84. package/dist/types/lib/view/error-toast/index.d.ts +1 -3
  85. package/dist/types/lib/view/fields/autocomplete/advanced-autocomplete.stories.d.ts +4 -7
  86. package/dist/types/lib/view/fields/autocomplete/async-suggestions-autocomplete.stories.d.ts +4 -7
  87. package/dist/types/lib/view/fields/autocomplete/index.d.ts +4 -5
  88. package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +4 -6
  89. package/dist/types/lib/view/fields/check-box/index.d.ts +2 -2
  90. package/dist/types/lib/view/fields/combo-box/index.d.ts +2 -2
  91. package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +5 -6
  92. package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +1 -1
  93. package/dist/types/lib/view/fields/connect-form.d.ts +3 -2
  94. package/dist/types/lib/view/fields/date-input/index.d.ts +2 -2
  95. package/dist/types/lib/view/fields/date-picker/index.d.ts +2 -2
  96. package/dist/types/lib/view/fields/date-range-picker/index.d.ts +2 -2
  97. package/dist/types/lib/view/fields/date-time-picker/index.d.ts +3 -4
  98. package/dist/types/lib/view/fields/form-item-layout/index.d.ts +2 -2
  99. package/dist/types/lib/view/fields/form-layout-block-item/index.d.ts +2 -7
  100. package/dist/types/lib/view/fields/form-layout-block-item/index.stories.d.ts +1 -1
  101. package/dist/types/lib/view/fields/input-mask/index.d.ts +2 -2
  102. package/dist/types/lib/view/fields/input-text/index.d.ts +2 -3
  103. package/dist/types/lib/view/fields/large-text-box/index.d.ts +2 -2
  104. package/dist/types/lib/view/fields/masked-input-text/index.d.ts +4 -5
  105. package/dist/types/lib/view/fields/radio/index.d.ts +2 -2
  106. package/dist/types/lib/view/fields/radio-group/index.d.ts +4 -3
  107. package/dist/types/lib/view/fields/radio-group/index.stories.d.ts +4 -6
  108. package/dist/types/lib/view/fields/text-box/index.d.ts +2 -2
  109. package/dist/types/lib/view/fields/toggle/index.d.ts +2 -6
  110. package/dist/types/lib/view/fields/toggle/index.stories.d.ts +4 -6
  111. package/dist/types/lib/view/fields/watch-value.d.ts +2 -2
  112. package/dist/types/lib/view/form/index.d.ts +2 -2
  113. package/dist/types/lib/view/form/submit-button/index.d.ts +2 -2
  114. package/dist/types/lib/view/micro-app/resources/manifest.d.ts +1 -1
  115. package/dist/types/lib/view/micro-app/types.d.ts +2 -2
  116. package/dist/types/lib/view/micro-app/utils.d.ts +2 -2
  117. package/dist/types/lib/view/micro-iframe-app/iframe/index.d.ts +2 -2
  118. package/dist/types/lib/view/visually-hidden/index.d.ts +2 -0
  119. package/dist/types/wdio.config.d.ts +2 -0
  120. package/package.json +52 -52
@@ -25,7 +25,7 @@ var import_index = require("./index.js");
25
25
  const getWindow = () => {
26
26
  try {
27
27
  window.top?.document;
28
- return window.top || window.self;
28
+ return window.top ?? window.self;
29
29
  } catch (e) {
30
30
  return window.self;
31
31
  }
@@ -25,14 +25,16 @@ __export(auth_exports, {
25
25
  module.exports = __toCommonJS(auth_exports);
26
26
  var import_http_client = require("../../communication/http-client/index.js");
27
27
  const getToken = async ({
28
+ idpCode,
28
29
  clientId,
29
- redirectUri,
30
- idpCode
30
+ scope,
31
+ redirectUri
31
32
  }) => {
32
33
  const params = new URLSearchParams();
33
34
  params.append("grant_type", "authorization_code");
34
35
  params.append("client_id", clientId);
35
36
  params.append("redirect_uri", redirectUri);
37
+ params.append("scope", scope);
36
38
  params.append("code", idpCode);
37
39
  const { data } = await (0, import_http_client.getHTTPClient)().post(
38
40
  "/oauth2/v1/token",
@@ -41,7 +41,7 @@ const onAuthorizationFailure = (callback) => {
41
41
  };
42
42
  const handleSuccess = (response) => response;
43
43
  const handleFailure = (error) => {
44
- const { status } = (error || {}).response || {};
44
+ const { status } = error?.response ?? {};
45
45
  if (status === HTTP_UNAUTHORIZED && unAuthorizedFailureHandler && typeof unAuthorizedFailureHandler === "function") {
46
46
  return unAuthorizedFailureHandler(error).then((authorizationHeader) => {
47
47
  const { config } = error;
@@ -45,13 +45,13 @@ const shouldRetryRequest = (err) => {
45
45
  if (!config || config.retry === 0) {
46
46
  return false;
47
47
  }
48
- if (!err.response && (config.currentRetryAttempt || 0) >= config.noResponseRetries) {
48
+ if (!err.response && (config.currentRetryAttempt ?? 0) >= config.noResponseRetries) {
49
49
  return false;
50
50
  }
51
51
  if (!err.config.method || config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) {
52
52
  return false;
53
53
  }
54
- if (err.response && err.response.status) {
54
+ if (err.response?.status) {
55
55
  let isInRange = false;
56
56
  for (const [min, max] of config.statusCodesToRetry) {
57
57
  const { status } = err.response;
@@ -64,7 +64,7 @@ const shouldRetryRequest = (err) => {
64
64
  return false;
65
65
  }
66
66
  }
67
- config.currentRetryAttempt = config.currentRetryAttempt || 0;
67
+ config.currentRetryAttempt = config.currentRetryAttempt ?? 0;
68
68
  if (config.currentRetryAttempt >= config.retry) {
69
69
  return false;
70
70
  }
@@ -74,19 +74,19 @@ const onError = (err) => {
74
74
  if (!err.config) {
75
75
  return Promise.reject(err);
76
76
  }
77
- const config = err.config.retryConfig || {};
78
- config.currentRetryAttempt = config.currentRetryAttempt || 0;
79
- config.retry = config.retry === void 0 || config.retry === null ? 3 : config.retry;
80
- config.retryDelay = config.retryDelay || 100;
81
- config.instance = config.instance || import_axios.default;
82
- config.httpMethodsToRetry = config.httpMethodsToRetry || [
77
+ const config = err.config.retryConfig ?? {};
78
+ config.currentRetryAttempt = config.currentRetryAttempt ?? 0;
79
+ config.retry = config.retry ?? 3;
80
+ config.retryDelay = config.retryDelay ?? 100;
81
+ config.instance = config.instance ?? import_axios.default;
82
+ config.httpMethodsToRetry = config.httpMethodsToRetry ?? [
83
83
  "GET",
84
84
  "HEAD",
85
85
  "PUT",
86
86
  "OPTIONS",
87
87
  "DELETE"
88
88
  ];
89
- config.noResponseRetries = config.noResponseRetries === void 0 || config.noResponseRetries === null ? 2 : config.noResponseRetries;
89
+ config.noResponseRetries = config.noResponseRetries ?? 2;
90
90
  const retryRanges = [
91
91
  // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
92
92
  // 1xx - Retry (Informational, request still processing)
@@ -99,9 +99,9 @@ const onError = (err) => {
99
99
  [429, 429],
100
100
  [500, 599]
101
101
  ];
102
- config.statusCodesToRetry = config.statusCodesToRetry || retryRanges;
102
+ config.statusCodesToRetry = config.statusCodesToRetry ?? retryRanges;
103
103
  err.config.retryConfig = config;
104
- const shouldRetryFn = config.shouldRetry || shouldRetryRequest;
104
+ const shouldRetryFn = config.shouldRetry ?? shouldRetryRequest;
105
105
  if (!shouldRetryFn(err)) {
106
106
  return Promise.reject(err);
107
107
  }
@@ -118,7 +118,7 @@ const attach = (instance) => {
118
118
  return instance?.interceptors?.response ? instance.interceptors.response.use(onFulfilled, onError) : null;
119
119
  };
120
120
  const getConfig = (err) => {
121
- if (err && err.config) {
121
+ if (err?.config) {
122
122
  return err.config.retryConfig;
123
123
  }
124
124
  return null;
@@ -48,7 +48,7 @@ const getRaxConfig = (httpClient) => ({
48
48
  // retry attempts have been made
49
49
  onRetryAttempt: (err) => {
50
50
  const cfg = (0, import_retry_axios.getConfig)(err);
51
- if (cfg && cfg.currentRetryAttempt)
51
+ if (cfg?.currentRetryAttempt)
52
52
  console.log(`Retry attempt #${cfg.currentRetryAttempt}`);
53
53
  }
54
54
  });
@@ -32,7 +32,7 @@ function* openErrorToast(action) {
32
32
  import_guest.CMicroAppGuest.getInstance.bind(import_guest.CMicroAppGuest)
33
33
  );
34
34
  const host = yield (0, import_effects.call)(microApp.getHost.bind(microApp));
35
- const message = action?.payload?.description || action?.payload?.messageText;
35
+ const message = action?.payload?.description ?? action?.payload?.messageText;
36
36
  if (host && message)
37
37
  yield (0, import_effects.call)(host.openErrorBanner.bind(host), message);
38
38
  } catch (ex) {
@@ -28,15 +28,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var app_config_exports = {};
30
30
  __export(app_config_exports, {
31
+ getAppConfigValue: () => import_config2.getAppConfigValue,
31
32
  loadAppConfig: () => loadAppConfig
32
33
  });
33
34
  module.exports = __toCommonJS(app_config_exports);
34
35
  var import_lodash = __toESM(require("lodash"));
35
- var import_http_client = require("../../communication/http-client/index.js");
36
36
  var import_config = require("./config.js");
37
37
  var import_appdynamics = require("../../analytics/appdynamics.js");
38
38
  var import_web_analytics = require("../../analytics/web-analytics.js");
39
39
  var import_window = require("../window.js");
40
+ var import_config2 = require("./config.js");
40
41
  const parseAppConfig = (data) => {
41
42
  const { activeEnv } = data;
42
43
  const activeEnvConfig = data.env[activeEnv] || {};
@@ -47,15 +48,30 @@ const parseAppConfig = (data) => {
47
48
  (0, import_appdynamics.setAppDynamicsUserData)({ envName: activeEnv });
48
49
  (0, import_web_analytics.updateBAEventParameters)({ envName: activeEnv });
49
50
  };
50
- const loadAppConfig = (configPath = (0, import_window.getAssetPath)()) => new Promise((resolve, reject) => {
51
- (0, import_http_client.getHTTPClient)({ baseURL: configPath }).get("app.config.json").then(({ data }) => {
52
- parseAppConfig(data);
53
- resolve();
54
- }).catch((err) => {
55
- reject(
56
- new Error(
57
- `Unable to load application configurtion file. ${err.Message}`
58
- )
59
- );
60
- });
61
- });
51
+ const getUnVersionedPath = (path) => path.replace(/\d+\.\d+/, "latest");
52
+ const loadAppConfig = async (configPath = (0, import_window.getAssetPath)()) => {
53
+ const appConfigUrl = `${configPath.replace(/\/?$/, "/")}app.config.json`;
54
+ const unversionedConfigPath = getUnVersionedPath(configPath);
55
+ try {
56
+ const response = await fetch(appConfigUrl);
57
+ if (!response.ok) {
58
+ if (configPath !== unversionedConfigPath) {
59
+ await loadAppConfig(unversionedConfigPath);
60
+ return;
61
+ }
62
+ const message = `App Config is not found at ${appConfigUrl}`;
63
+ throw new Error(message);
64
+ }
65
+ const appConfig = await response.json();
66
+ parseAppConfig(appConfig);
67
+ } catch (ex) {
68
+ if (configPath !== unversionedConfigPath) {
69
+ await loadAppConfig(unversionedConfigPath);
70
+ return;
71
+ }
72
+ if (ex?.message?.includes(`Unexpected token`)) {
73
+ throw new Error(`App config file at ${appConfigUrl} is not a valid JSON`);
74
+ }
75
+ throw ex;
76
+ }
77
+ };
@@ -0,0 +1,147 @@
1
+ {
2
+ "appId": "loanapp",
3
+ "activeEnv": "localhost",
4
+ "googleTagManager": true,
5
+ "sessionTimeoutWarnInterval": "7200000",
6
+ "sessionTimeoutInterval": "9000000",
7
+ "serviceEndpoints": {
8
+ "api": "",
9
+ "idp": "https://int.idp.ellielabs.com",
10
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
11
+ },
12
+ "env": {
13
+ "localhost": {
14
+ "serviceEndpoints": {
15
+ "api": "",
16
+ "idp": "https://int.idp.ellielabs.com",
17
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
18
+ }
19
+ },
20
+ "dev": {
21
+ "serviceEndpoints": {
22
+ "api": "https://dev.api.puiservice.rd.elliemae.io",
23
+ "idp": "https://int.idp.ellielabs.com",
24
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
25
+ }
26
+ },
27
+ "dev2": {
28
+ "serviceEndpoints": {
29
+ "api": "https://int.api.ellielabs.com",
30
+ "idp": "https://int.idp.ellielabs.com",
31
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
32
+ }
33
+ },
34
+ "qa": {
35
+ "serviceEndpoints": {
36
+ "api": "https://dev.api.puiservice.rd.elliemae.io",
37
+ "idp": "https://int.idp.ellielabs.com",
38
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
39
+ }
40
+ },
41
+ "qa2": {
42
+ "serviceEndpoints": {
43
+ "api": "https://int.api.ellielabs.com",
44
+ "idp": "https://int.idp.ellielabs.com",
45
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
46
+ }
47
+ },
48
+ "qa3": {
49
+ "serviceEndpoints": {
50
+ "api": "https://int.api.ellielabs.com",
51
+ "idp": "https://int.idp.ellielabs.com",
52
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
53
+ }
54
+ },
55
+ "int": {
56
+ "serviceEndpoints": {
57
+ "api": "https://dev.api.puiservice.rd.elliemae.io",
58
+ "idp": "https://int.idp.ellielabs.com",
59
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
60
+ }
61
+ },
62
+ "peg-osb1": {
63
+ "serviceEndpoints": {
64
+ "api": "https://encompass-peg-api.elliemae.com",
65
+ "idp": "https://peg.idp.ellielabs.com/authorize",
66
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
67
+ }
68
+ },
69
+ "peg-osb2": {
70
+ "serviceEndpoints": {
71
+ "api": "https://encompass-peg2-api.elliemae.com",
72
+ "idp": "https://peg.idp.ellielabs.com/authorize",
73
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
74
+ }
75
+ },
76
+ "peg": {
77
+ "serviceEndpoints": {
78
+ "api": "https://peg2-west.api.ellielabs.com",
79
+ "idp": "https://peg.idp.ellielabs.com/authorize",
80
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
81
+ }
82
+ },
83
+ "peg-oapi-west": {
84
+ "serviceEndpoints": {
85
+ "api": "https://peg2-west.api.ellielabs.com",
86
+ "idp": "https://peg.idp.ellielabs.com/authorize",
87
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
88
+ }
89
+ },
90
+ "peg-oapi-east": {
91
+ "serviceEndpoints": {
92
+ "api": "https://peg2-east.api.ellielabs.com",
93
+ "idp": "https://peg.idp.ellielabs.com/authorize",
94
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
95
+ }
96
+ },
97
+ "peg2-oapi-east": {
98
+ "serviceEndpoints": {
99
+ "api": "https://peg2-east.api.ellielabs.com",
100
+ "idp": "https://peg.idp.ellielabs.com/authorize",
101
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
102
+ }
103
+ },
104
+ "peg3": {
105
+ "serviceEndpoints": {
106
+ "api": "https://pel1.api.ellielabs.com",
107
+ "idp": "https://peg3.idp.ellielabs.com/authorize",
108
+ "logger": "https://int.api.puidiagnostics.rd.elliemae.io/v1/logging"
109
+ }
110
+ },
111
+ "stage": {
112
+ "serviceEndpoints": {
113
+ "api": "https://stg.api.elliemae.com",
114
+ "idp": "https://stg.idp.elliemae.com/authorize",
115
+ "logger": "https://stg.api.puidiagnostics.ellielabs.com/v1/logging"
116
+ }
117
+ },
118
+ "beta": {
119
+ "serviceEndpoints": {
120
+ "api": "https://concept.api.elliemae.com",
121
+ "idp": "https://concept.idp.elliemae.com/authorize",
122
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
123
+ }
124
+ },
125
+ "demo": {
126
+ "serviceEndpoints": {
127
+ "api": "https://concept.api.elliemae.com",
128
+ "idp": "https://concept.idp.elliemae.com/authorize",
129
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
130
+ }
131
+ },
132
+ "epc": {
133
+ "serviceEndpoints": {
134
+ "api": "https://concept.api.elliemae.com",
135
+ "idp": "https://concept.idp.elliemae.com/authorize",
136
+ "logger": "https://concept.api.puidiagnostics.elliemae.com/v1/logging"
137
+ }
138
+ },
139
+ "prod": {
140
+ "serviceEndpoints": {
141
+ "api": "https://api.elliemae.com",
142
+ "idp": "https://idp.elliemae.com/authorize",
143
+ "logger": "https://api.puidiagnostics.ellieservices.com/v1/logging"
144
+ }
145
+ }
146
+ }
147
+ }
@@ -33,7 +33,7 @@ __export(helper_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(helper_exports);
35
35
  var import_constants = __toESM(require("../constants.js"));
36
- const getAuthorizationHeader = () => sessionStorage.getItem(import_constants.default.AUTHORIZATION) || "";
36
+ const getAuthorizationHeader = () => sessionStorage.getItem(import_constants.default.AUTHORIZATION) ?? "";
37
37
  const setAuthorizationHeader = (token) => {
38
38
  sessionStorage.setItem(import_constants.default.AUTHORIZATION, token);
39
39
  };
@@ -39,8 +39,8 @@ const IDP_ENDPOINT_CONFIG_KEY = "serviceEndpoints.idp";
39
39
  const isUserAuthorized = () => !!(0, import_helper.getAuthorizationHeader)();
40
40
  const getIDPInfoFromUrl = () => {
41
41
  const currentUrl = new URL(window.location.href);
42
- const idpCode = currentUrl.searchParams.get("code") || "";
43
- const idpErrorCode = currentUrl.searchParams.get("error_code") || "";
42
+ const idpCode = currentUrl.searchParams.get("code") ?? "";
43
+ const idpErrorCode = currentUrl.searchParams.get("error_code") ?? "";
44
44
  currentUrl.search = "";
45
45
  return { idpCode, idpErrorCode, redirectUri: currentUrl.href };
46
46
  };
@@ -112,8 +112,9 @@ const authorize = async ({
112
112
  try {
113
113
  const { tokenType, accessToken } = await (0, import_auth.getToken)({
114
114
  idpCode,
115
- redirectUri,
116
- clientId
115
+ clientId,
116
+ scope,
117
+ redirectUri
117
118
  });
118
119
  const authorizationToken = `${tokenType} ${accessToken}`;
119
120
  (0, import_helper.setAuthorizationHeader)(authorizationToken);
@@ -22,6 +22,6 @@ __export(font_size_exports, {
22
22
  remToPx: () => remToPx
23
23
  });
24
24
  module.exports = __toCommonJS(font_size_exports);
25
- const docFontSize = document && document.documentElement ? getComputedStyle(document.documentElement).fontSize : "16";
25
+ const docFontSize = document?.documentElement ? getComputedStyle(document.documentElement).fontSize : "16";
26
26
  const remToPx = (rem) => rem * parseFloat(docFontSize);
27
27
  const pxToRem = (px) => `${px / parseFloat(docFontSize)}rem`;
@@ -62,16 +62,16 @@ class CMicroAppGuest {
62
62
  onGetRef;
63
63
  constructor(params) {
64
64
  this.containerId = "app-container";
65
- this.appId = window.emui?.appId || (0, import_config.getAppConfigValue)("appId");
65
+ this.appId = window.emui?.appId ?? (0, import_config.getAppConfigValue)("appId");
66
66
  this.props = {
67
67
  host: null,
68
68
  hostUrl: null,
69
69
  prevState: null,
70
- history: params?.history || import_history2.browserHistory,
70
+ history: params?.history ?? import_history2.browserHistory,
71
71
  theme: (0, import_pui_theme.getDefaultTheme)(),
72
72
  manifestPath: "./latest"
73
73
  };
74
- this.logger = params?.logger || import_console_logger.logger;
74
+ this.logger = params?.logger ?? import_console_logger.logger;
75
75
  this.onInit = params?.onInit;
76
76
  this.onMount = params?.onMount;
77
77
  this.onUnmount = params?.onUnmount;
@@ -121,7 +121,7 @@ class CMicroAppGuest {
121
121
  let host = null;
122
122
  if (window.parent !== window) {
123
123
  if (!isCrossDomain()) {
124
- host = window.parent?.emui?.MicroAppHost || null;
124
+ host = window.parent?.emui?.MicroAppHost ?? null;
125
125
  }
126
126
  if (!host) {
127
127
  const ssfAdapter = new import_ssfguest_adapter.SSFGuestAdapter();
@@ -134,7 +134,7 @@ class CMicroAppGuest {
134
134
  }
135
135
  async init(options) {
136
136
  this.props = import_lodash.default.merge(this.props, options);
137
- this.props.history = options?.history || this.props.history;
137
+ this.props.history = options?.history ?? this.props.history;
138
138
  if (!this.props.host) {
139
139
  const host = await this.getSSFAdapter();
140
140
  if (host)
@@ -142,8 +142,8 @@ class CMicroAppGuest {
142
142
  }
143
143
  __webpack_public_path__ = __webpack_public_path__.replace(/\/?$/, "/");
144
144
  return (0, import_app_config.loadAppConfig)().then(() => {
145
- const instanceId = this.getSessionStorageItem("instanceId") || "";
146
- const userId = this.getSessionStorageItem("userId") || "";
145
+ const instanceId = this.getSessionStorageItem("instanceId") ?? "";
146
+ const userId = this.getSessionStorageItem("userId") ?? "";
147
147
  (0, import_web_analytics.updateBAEventParameters)({ appId: this.appId, instanceId, userId });
148
148
  (0, import_appdynamics.setAppDynamicsUserData)({ appId: this.appId, instanceId, userId });
149
149
  if (this.onInit)
@@ -166,6 +166,7 @@ class CMicroAppGuest {
166
166
  getRef() {
167
167
  return this.onGetRef ? this.onGetRef() : null;
168
168
  }
169
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
169
170
  navigate(url, state) {
170
171
  if (url)
171
172
  this.props.history.push(url, state);
@@ -45,11 +45,12 @@ class CMicroAppHost {
45
45
  activeGuests;
46
46
  onInit;
47
47
  onRenewSessionTimer;
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
49
  scriptingObjects;
49
50
  constructor(params) {
50
51
  this.appId = (0, import_config.getAppConfigValue)("appId");
51
52
  this.onInit = params?.onInit;
52
- this.logger = params?.logger || import_console_logger.logger;
53
+ this.logger = params?.logger ?? import_console_logger.logger;
53
54
  this.onRenewSessionTimer = params?.onRenewSessionTimer;
54
55
  this.props = {
55
56
  systemVersion: params?.version ?? "latest",
@@ -112,6 +113,7 @@ class CMicroAppHost {
112
113
  unsubscribe(token) {
113
114
  (0, import_pubsub_js.unsubscribe)(token);
114
115
  }
116
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
115
117
  navigate(url, state) {
116
118
  if (url)
117
119
  this.props.history.push(url, state);
@@ -55,10 +55,7 @@ const isProduction = (mode) => {
55
55
  const getVersionedPath = (path) => {
56
56
  const { systemVersion } = import_host.CMicroAppHost.getInstance().getProps();
57
57
  const majorMinorVersion = systemVersion.match(/^(?:\d+\.\d+)*/g);
58
- return path.replace(
59
- /{SYSTEM_VERSION}/,
60
- majorMinorVersion && majorMinorVersion[0] || "latest"
61
- );
58
+ return path.replace(/{SYSTEM_VERSION}/, majorMinorVersion?.[0] ?? "latest");
62
59
  };
63
60
  const getMicroFrontEndAppConfig = (appInfo) => {
64
61
  const microFEAppConfig = (0, import_config.getAppConfigValue)(
@@ -28,6 +28,6 @@ const createTheme = ({
28
28
  ...rest
29
29
  }) => (0, import_create.create)({
30
30
  base,
31
- brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
31
+ brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION ?? ""}`,
32
32
  ...rest
33
33
  });
@@ -53,4 +53,10 @@ const getCurrentBreakpoint = () => {
53
53
  return "medium";
54
54
  return "large";
55
55
  };
56
- const getAssetPath = () => window?.emui?._ASSET_PATH || "latest/";
56
+ const getAssetPath = () => {
57
+ const assetPath = window?.emui?._ASSET_PATH || "latest/";
58
+ if (!window.emui?.version)
59
+ return assetPath;
60
+ const majorMinorVersion = window.emui?.version.match(/^(?:\d+\.\d+)*/g);
61
+ return majorMinorVersion?.[0] ? assetPath.replace("latest/", `${majorMinorVersion[0]}/`) : assetPath;
62
+ };
@@ -48,7 +48,7 @@ const HostedApp = ({ WaitMessage, children }) => {
48
48
  (0, import_use_window_size_change.useWindowSizeChange)();
49
49
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Div, { children: [
50
50
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.default, {}),
51
- WaitMessage || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message.WaitMessage, {}),
51
+ WaitMessage ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message.WaitMessage, {}),
52
52
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error_toast.ErrorToast, {}),
53
53
  children
54
54
  ] });
@@ -55,7 +55,7 @@ const StandAloneApp = ({
55
55
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.default, {}),
56
56
  manageSession && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_session_timeout.SessionTimeout, {}),
57
57
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_live_message.LiveMessage, {}),
58
- WaitMessage || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message.WaitMessage, {}),
58
+ WaitMessage ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_wait_message.WaitMessage, {}),
59
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error_toast.ErrorToast, {}),
60
60
  children
61
61
  ] }) });
@@ -56,7 +56,7 @@ class ErrorBoundary extends import_react.default.Component {
56
56
  }
57
57
  render() {
58
58
  const { children, errorTemplate } = this.props;
59
- const ErrorTemplate = errorTemplate || import_default_error_template.DefaultErrorTemplate;
59
+ const ErrorTemplate = errorTemplate ?? import_default_error_template.DefaultErrorTemplate;
60
60
  const { error, errorInfo } = this.state;
61
61
  return errorInfo ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorTemplate, { error, errorInfo }) : children;
62
62
  }
@@ -30,7 +30,7 @@ const ErrorToast = (0, import_react.memo)((props) => {
30
30
  const storeError = (0, import_react2.useAppSelector)((state) => state?.error);
31
31
  const dispatch = (0, import_react2.useAppDispatch)();
32
32
  (0, import_react.useEffect)(() => {
33
- if (storeError && (storeError?.description || storeError?.messageText)) {
33
+ if (storeError && (storeError?.description ?? storeError?.messageText)) {
34
34
  const toastProps = {
35
35
  position: import_ds_toast.ToastPosition.TOP_RIGHT,
36
36
  messageTitle: "Error",
@@ -38,7 +38,7 @@ const ErrorToast = (0, import_react.memo)((props) => {
38
38
  ...props,
39
39
  ...storeError
40
40
  };
41
- const messageText = toastProps.description || toastProps.messageText;
41
+ const messageText = toastProps.description ?? toastProps.messageText;
42
42
  if (messageText)
43
43
  (0, import_ds_toast.toast)({ messageText, ...toastProps });
44
44
  dispatch(import_error.actions.clear());
@@ -30,6 +30,7 @@ const ComboBoxV3 = ({
30
30
  // @ts-ignore
31
31
  defaultValue = "",
32
32
  rules = {},
33
+ clearable = true,
33
34
  filteredOptions = null,
34
35
  ...rest
35
36
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -38,14 +39,19 @@ const ComboBoxV3 = ({
38
39
  name,
39
40
  rules,
40
41
  defaultValue,
41
- render: ({ field: { onChange, value, ...props } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ render: ({
43
+ field: { onChange, value, ...props },
44
+ fieldState: { error }
45
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
46
  import_ds_controlled_form.DSComboBox,
43
47
  {
44
48
  ...props,
45
49
  ...rest,
50
+ hasError: !!error,
46
51
  filteredOptions,
47
52
  selectedValues: value,
48
- onChange
53
+ onChange,
54
+ isNonClearable: !clearable
49
55
  }
50
56
  )
51
57
  }
@@ -90,9 +90,13 @@ const DateTimePicker = ({
90
90
  name,
91
91
  defaultValue,
92
92
  rules,
93
- render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ render: ({
94
+ field: { value, onChange, ...restProps },
95
+ fieldState: { error }
96
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
97
  import_ds_controlled_form.DSControlledDateTimePicker,
95
98
  {
99
+ hasError: !!error,
96
100
  ...restProps,
97
101
  type,
98
102
  ...getConfig(value, onChange)[type],
@@ -34,14 +34,14 @@ const Radio = ({
34
34
  {
35
35
  name,
36
36
  rules,
37
+ defaultValue: defaultChecked,
37
38
  render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
38
39
  import_ds_form.DSRadio,
39
40
  {
40
41
  ...rest,
41
42
  ...restProps,
42
43
  checked: value,
43
- defaultChecked,
44
- onChange: (e) => onChange(((e || {}).target || {}).checked)
44
+ onChange: (e) => onChange(e?.target?.checked)
45
45
  }
46
46
  )
47
47
  }
@@ -24,11 +24,17 @@ module.exports = __toCommonJS(radio_group_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_ds_form = require("@elliemae/ds-form");
26
26
  var import_react_hook_form = require("react-hook-form");
27
- const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
27
+ const RadioGroup = ({
28
+ name,
29
+ rules = {},
30
+ defaultValue,
31
+ ...rest
32
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
33
  import_react_hook_form.Controller,
29
34
  {
30
35
  name,
31
36
  rules,
37
+ defaultValue,
32
38
  render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSRadioGroup, { ...rest, ...restProps, activeValue: value })
33
39
  }
34
40
  );
@@ -34,12 +34,18 @@ const Login = ({
34
34
  }) => {
35
35
  const [userAuthorized, setUserAuthorized] = (0, import_react.useState)(false);
36
36
  const dispatch = (0, import_react2.useAppDispatch)();
37
+ const ref = (0, import_react.useRef)(false);
37
38
  (0, import_react.useEffect)(() => {
39
+ if (ref.current)
40
+ return;
41
+ ref.current = true;
38
42
  (0, import_auth.login)({ clientId, scope, responseType }).then(({ authorized }) => {
39
43
  if (authorized)
40
44
  setUserAuthorized(true);
41
45
  dispatch({ type: import_actions.LOGIN_SUCCESS });
42
46
  }).catch(() => {
47
+ }).finally(() => {
48
+ ref.current = false;
43
49
  });
44
50
  }, [dispatch, clientId, scope, responseType]);
45
51
  return userAuthorized ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }) : null;