@elliemae/pui-app-sdk 4.7.2 → 4.9.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.
Files changed (67) hide show
  1. package/dist/cjs/analytics/appdynamics.js +4 -0
  2. package/dist/cjs/communication/http-client/index.js +5 -0
  3. package/dist/cjs/communication/http-client/response-interceptor.js +6 -5
  4. package/dist/cjs/communication/http-client/retry-axios.js +11 -0
  5. package/dist/cjs/communication/http-client/retry.js +12 -0
  6. package/dist/cjs/data/auth/reducer.js +4 -0
  7. package/dist/cjs/data/breakpoint/index.js +4 -0
  8. package/dist/cjs/data/store.js +4 -0
  9. package/dist/cjs/data/wait-message/reducer.js +4 -0
  10. package/dist/cjs/index.js +4 -2
  11. package/dist/cjs/utils/app-config/config.js +4 -0
  12. package/dist/cjs/utils/app-config/index.js +4 -0
  13. package/dist/cjs/utils/auth/helper.js +4 -0
  14. package/dist/cjs/utils/auth/index.js +1 -0
  15. package/dist/cjs/utils/constants.js +2 -0
  16. package/dist/cjs/utils/micro-frontend/guest.js +4 -0
  17. package/dist/cjs/utils/micro-frontend/host.js +2 -0
  18. package/dist/cjs/utils/micro-frontend/index.js +4 -0
  19. package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +4 -0
  20. package/dist/cjs/utils/redact-pii.js +3 -0
  21. package/dist/cjs/utils/storybook/cjs/main.js +1 -0
  22. package/dist/cjs/utils/storybook/preview.js +1 -0
  23. package/dist/cjs/utils/storybook/theme.js +8 -5
  24. package/dist/cjs/utils/testing/render-with-redux.js +3 -0
  25. package/dist/cjs/utils/testing/render-with-router-redux.js +3 -0
  26. package/dist/cjs/utils/testing/render-with-router.js +3 -0
  27. package/dist/cjs/utils/web-storage.js +4 -0
  28. package/dist/cjs/view/app-root/hosted-app.js +4 -0
  29. package/dist/cjs/view/app-root/stand-alone-app.js +4 -0
  30. package/dist/cjs/view/error-boundary/index.js +4 -0
  31. package/dist/cjs/view/fetch-host-app-data/index.js +4 -0
  32. package/dist/cjs/view/fields/check-box/index.js +8 -9
  33. package/dist/cjs/view/fields/date-picker/index.js +4 -0
  34. package/dist/cjs/view/fields/watch-value.js +4 -0
  35. package/dist/cjs/view/form/index.js +6 -0
  36. package/dist/cjs/view/form/personal-info-section.js +4 -0
  37. package/dist/cjs/view/micro-app/app-factory/index.js +8 -5
  38. package/dist/cjs/view/micro-app/index.js +4 -0
  39. package/dist/cjs/view/micro-app/use-app-will-render.js +1 -0
  40. package/dist/cjs/view/micro-iframe-app/app.js +4 -0
  41. package/dist/cjs/view/micro-iframe-app/iframe/index.js +4 -0
  42. package/dist/cjs/view/page.js +4 -0
  43. package/dist/cjs/view/require-auth.js +4 -0
  44. package/dist/cjs/view/visually-hidden/index.js +6 -0
  45. package/dist/esm/communication/http-client/index.js +1 -0
  46. package/dist/esm/communication/http-client/response-interceptor.js +2 -5
  47. package/dist/esm/communication/http-client/retry-axios.js +7 -0
  48. package/dist/esm/communication/http-client/retry.js +12 -0
  49. package/dist/esm/index.js +0 -2
  50. package/dist/esm/utils/auth/index.js +1 -0
  51. package/dist/esm/utils/constants.js +2 -0
  52. package/dist/esm/utils/micro-frontend/host.js +2 -0
  53. package/dist/esm/utils/redact-pii.js +3 -0
  54. package/dist/esm/utils/storybook/preview.js +1 -0
  55. package/dist/esm/utils/storybook/theme.js +8 -5
  56. package/dist/esm/utils/testing/render-with-redux.js +3 -0
  57. package/dist/esm/utils/testing/render-with-router-redux.js +3 -0
  58. package/dist/esm/utils/testing/render-with-router.js +3 -0
  59. package/dist/esm/view/fields/check-box/index.js +8 -9
  60. package/dist/esm/view/form/index.js +2 -0
  61. package/dist/esm/view/micro-app/app-factory/index.js +8 -5
  62. package/dist/esm/view/micro-app/use-app-will-render.js +1 -0
  63. package/dist/esm/view/visually-hidden/index.js +2 -0
  64. package/dist/types/lib/data/saga.d.ts +1 -1
  65. package/dist/types/lib/index.d.ts +0 -1
  66. package/dist/types/lib/view/fields/check-box/index.d.ts +2 -1
  67. package/package.json +32 -32
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -56,6 +60,7 @@ const getAuthHTTPClient = ({
56
60
  ...rest
57
61
  } = {}) => getHTTPClient({
58
62
  baseURL,
63
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
59
64
  headers: { ...headers, Authorization: (0, import_helper.getAuthorizationHeader)() },
60
65
  ...rest
61
66
  });
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -41,12 +45,9 @@ const handleFailure = (error) => {
41
45
  if (status === HTTP_UNAUTHORIZED && unAuthorizedFailureHandler && typeof unAuthorizedFailureHandler === "function") {
42
46
  return unAuthorizedFailureHandler(error).then((authorizationHeader) => {
43
47
  const { config } = error;
44
- if (!config)
48
+ if (!config?.headers)
45
49
  throw error;
46
- config.headers = {
47
- ...config.headers,
48
- Authorization: authorizationHeader
49
- };
50
+ config.headers["Authorization"] = authorizationHeader;
50
51
  return new Promise((resolve, reject) => {
51
52
  import_axios.default.request(config).then(resolve).catch(reject);
52
53
  });
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -84,6 +88,13 @@ const onError = (err) => {
84
88
  ];
85
89
  config.noResponseRetries = config.noResponseRetries === void 0 || config.noResponseRetries === null ? 2 : config.noResponseRetries;
86
90
  const retryRanges = [
91
+ // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
92
+ // 1xx - Retry (Informational, request still processing)
93
+ // 2xx - Do not retry (Success)
94
+ // 3xx - Do not retry (Redirect)
95
+ // 4xx - Do not retry (Client errors)
96
+ // 429 - Retry ("Too Many Requests")
97
+ // 5xx - Retry (Server errors)
87
98
  [100, 199],
88
99
  [429, 429],
89
100
  [500, 599]
@@ -24,16 +24,28 @@ __export(retry_exports, {
24
24
  module.exports = __toCommonJS(retry_exports);
25
25
  var import_retry_axios = require("./retry-axios.js");
26
26
  const getRaxConfig = (httpClient) => ({
27
+ // Retry 3 times on requests that return a response (500, etc) before giving up. Defaults to 3.
27
28
  retry: 3,
29
+ // Retry twice on errors that don't return a response (ENOTFOUND, ETIMEDOUT, etc).
28
30
  noResponseRetries: 2,
31
+ // Milliseconds to delay at first. Defaults to 100.
29
32
  retryDelay: 100,
33
+ // HTTP methods to automatically retry. Defaults to:
34
+ // ['GET', 'HEAD', 'OPTIONS', 'DELETE', 'PUT']
30
35
  httpMethodsToRetry: ["GET", "HEAD", "OPTIONS", "DELETE", "PUT"],
36
+ // The response status codes to retry. Supports a double
37
+ // array with a list of ranges. Defaults to:
38
+ // [[100, 199], [429, 429], [500, 599]]
31
39
  statusCodesToRetry: [
32
40
  [100, 199],
33
41
  [429, 429],
34
42
  [500, 599]
35
43
  ],
44
+ // If you are using a non static instance of Axios you need
45
+ // to pass that instance here (const ax = axios.create())
36
46
  instance: httpClient,
47
+ // You can detect when a retry is happening, and figure out how many
48
+ // retry attempts have been made
37
49
  onRetryAttempt: (err) => {
38
50
  const cfg = (0, import_retry_axios.getConfig)(err);
39
51
  if (cfg && cfg.currentRetryAttempt)
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
package/dist/cjs/index.js CHANGED
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
19
19
  };
20
20
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
22
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
27
  mod
24
28
  ));
@@ -83,7 +87,6 @@ __export(lib_exports, {
83
87
  getStore: () => import_store3.getStore,
84
88
  globalConstants: () => import_constants.default,
85
89
  history: () => import_history.browserHistory,
86
- initSBManager: () => import_manager.initSBManager,
87
90
  initServiceWorker: () => import_service_worker.initServiceWorker,
88
91
  isCIBuild: () => import_helpers.isCIBuild,
89
92
  isProd: () => import_helpers.isProd,
@@ -169,7 +172,6 @@ var import_render_with_state_addons = require("./utils/testing/render-with-state
169
172
  var import_helpers2 = require("./api/helpers.js");
170
173
  var import_users = require("./api/users/index.js");
171
174
  var import_decorator = require("./view/storybook/decorator.js");
172
- var import_manager = require("./utils/storybook/manager.js");
173
175
  var import_autocomplete = require("./view/fields/autocomplete/index.js");
174
176
  var import_error_toast = require("./view/error-toast/index.js");
175
177
  var import_navigation_prompt = require("./view/modals/navigation-prompt/index.js");
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -49,6 +49,7 @@ const navigateToLoginPage = ({
49
49
  redirectUri,
50
50
  idpErrorCode,
51
51
  scope,
52
+ // eslint-disable-next-line camelcase
52
53
  responseType
53
54
  }) => {
54
55
  const idpHost = (0, import_config.getAppConfigValue)(IDP_ENDPOINT_CONFIG_KEY, "");
@@ -31,7 +31,9 @@ var constants_default = {
31
31
  };
32
32
  const SESSION_TIMEOUT_INTERVAL = {
33
33
  WARN: 12 * 60 * 1e3,
34
+ // 12 mins
34
35
  EXPIRY: 15 * 60 * 1e3
36
+ // 15 mins
35
37
  };
36
38
  const Themes = {
37
39
  EM: "em",
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -97,6 +97,7 @@ class CMicroAppHost {
97
97
  publish(message, data) {
98
98
  return (0, import_pubsub_js.publish)(message, data);
99
99
  }
100
+ // eslint-disable-next-line @typescript-eslint/ban-types
100
101
  subscribe(message, func) {
101
102
  return (0, import_pubsub_js.subscribe)(message, func);
102
103
  }
@@ -163,6 +164,7 @@ class CMicroAppHost {
163
164
  sendBAEvent(data) {
164
165
  (0, import_analytics.sendBAEvent)({ data, self: true });
165
166
  }
167
+ // eslint-disable-next-line @typescript-eslint/require-await
166
168
  async getObject(name) {
167
169
  return this.scriptingObjects[name];
168
170
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -35,8 +35,11 @@ const piiPatterns = {
35
35
  ipAddress: /(\d{1,3}(\.\d{1,3}){3}|[0-9A-F]{4}(:[0-9A-F]{4}){5}(::|(:0000)+))/gi,
36
36
  usSocialSecurityNumber: /\b\d{3}[ -.]\d{2}[ -.]\d{4}\b/g,
37
37
  emailAddress: /([a-z0-9_\-.+]+)@\w+(\.\w+)*/gi,
38
+ // username: /(user( ?name)?|login): \S+/gi,
38
39
  password: /(pass(word|phrase)?|secret): \S+/gi,
39
40
  credentials: /(login( cred(ential)?s| info(rmation)?)?|cred(ential)?s) ?:\s*\S+\s+\/?\s*\S+/gi
41
+ // digits: /\b\d{4,}\b/g,
42
+ // url: /([^\s:/?#]+):\/\/([^/?#\s]*)([^?#\s]*)(\?([^#\s]*))?(#([^\s]*))?/g,
40
43
  };
41
44
  const replacer = (key, value) => {
42
45
  if (!key || typeof value !== "string" || key === "correlationId")
@@ -28,6 +28,7 @@ const baseConfig = {
28
28
  features: {
29
29
  fastRefresh: true,
30
30
  storyStoreV7: true
31
+ // babelModeV7: true,
31
32
  },
32
33
  reactOptions: {
33
34
  fastRefresh: true,
@@ -38,6 +38,7 @@ const getParameters = (storyBookTheme) => ({
38
38
  actions: { argTypesRegex: "^on.*" },
39
39
  controls: { hideNoControlsWarning: true },
40
40
  docs: {
41
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
41
42
  theme: (0, import_theme.createTheme)(storyBookTheme)
42
43
  },
43
44
  options: {
@@ -26,8 +26,11 @@ const createTheme = ({
26
26
  base = "light",
27
27
  brandTitle = "Platform UI Components",
28
28
  ...rest
29
- }) => (0, import_create.create)({
30
- base,
31
- brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
32
- ...rest
33
- });
29
+ }) => (
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
31
+ (0, import_create.create)({
32
+ base,
33
+ brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
34
+ ...rest
35
+ })
36
+ );
@@ -31,5 +31,8 @@ const renderWithRedux = (ui, {
31
31
  store = (0, import_store.createAppStore)(initialState, import_history.browserHistory)
32
32
  } = {}) => ({
33
33
  ...(0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_redux.Provider, { store, children: ui })),
34
+ // adding `store` to the returned utilities to allow us
35
+ // to reference it in our tests (just try to avoid using
36
+ // this to test implementation details).
34
37
  store
35
38
  });
@@ -37,5 +37,8 @@ const renderWithRouterRedux = (ui, {
37
37
  ...(0, import_react.render)(
38
38
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_redux.Provider, { store, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_app_router.AppRouter, { history, children: ui }) })
39
39
  ),
40
+ // adding `store` to the returned utilities to allow us
41
+ // to reference it in our tests (just try to avoid using
42
+ // this to test implementation details).
40
43
  store
41
44
  });
@@ -32,6 +32,9 @@ const renderWithRouter = (ui, {
32
32
  const renderResult = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_app_router.AppRouter, { history, children: ui }));
33
33
  return {
34
34
  ...renderResult,
35
+ // adding `history` to the returned utilities to allow us
36
+ // to reference it in our tests (just try to avoid using
37
+ // this to test implementation details).
35
38
  history
36
39
  };
37
40
  };
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -24,18 +24,17 @@ module.exports = __toCommonJS(check_box_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_ds_controlled_form = require("@elliemae/ds-controlled-form");
26
26
  var import_react_hook_form = require("react-hook-form");
27
- const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
27
+ const CheckBox = ({
28
+ name,
29
+ defaultValue,
30
+ rules = {},
31
+ ...rest
32
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
28
33
  import_react_hook_form.Controller,
29
34
  {
30
35
  name,
31
36
  rules,
32
- render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
33
- import_ds_controlled_form.DSControlledCheckbox,
34
- {
35
- ...rest,
36
- ...restProps,
37
- checked: value
38
- }
39
- )
37
+ defaultValue,
38
+ render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_controlled_form.DSControlledCheckbox, { ...rest, ...restProps, checked: Boolean(value) })
40
39
  }
41
40
  );
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -35,6 +39,7 @@ const StyledForm = import_styled_components.default.form`
35
39
  height: 100%;
36
40
  `;
37
41
  const Form = ({
42
+ /* eslint-disable indent */
38
43
  classname,
39
44
  reactHookFormProps = { mode: "onBlur" },
40
45
  children,
@@ -45,6 +50,7 @@ const Form = ({
45
50
  if (onSubmit)
46
51
  formProps.onSubmit = methods.handleSubmit(onSubmit);
47
52
  const providerProps = Object.assign(methods, {
53
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
48
54
  formProps: reactHookFormProps
49
55
  });
50
56
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_hook_form.FormProvider, { ...providerProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledForm, { className: classname, ...formProps, children }) });
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -111,11 +111,14 @@ const addAppToActiveAppList = (id, elementIds) => {
111
111
  host.activeGuests[id] = getRef && getRef() || {};
112
112
  return Promise.resolve();
113
113
  };
114
- const waitAndInitApplication = (appConfig, requests) => Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
115
- const logRecord = import_log_records.logRecords.APP_INIT_FAILED(appConfig.id, err.message);
116
- (0, import_micro_frontend.getLogger)().error({ ...logRecord, exception: err });
117
- throw new Error(logRecord.msg);
118
- });
114
+ const waitAndInitApplication = (appConfig, requests) => (
115
+ // wait for all assets to get downloaded
116
+ Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
117
+ const logRecord = import_log_records.logRecords.APP_INIT_FAILED(appConfig.id, err.message);
118
+ (0, import_micro_frontend.getLogger)().error({ ...logRecord, exception: err });
119
+ throw new Error(logRecord.msg);
120
+ })
121
+ );
119
122
  const removeAssetsFromDOM = (id, documentEle = document) => {
120
123
  const host = import_host.CMicroAppHost.getInstance();
121
124
  if (host)
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -51,6 +51,7 @@ const useAppWillRender = ({
51
51
  if (!loadFailed && onUnloadComplete)
52
52
  onUnloadComplete();
53
53
  },
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
54
55
  []
55
56
  );
56
57
  const load = (0, import_react.useCallback)(
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -43,5 +47,7 @@ const Span = import_styled_components.default.span`
43
47
  word-wrap: normal;
44
48
  `;
45
49
  const VisuallyHidden = (0, import_react.forwardRef)(
50
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
51
+ // @ts-ignore
46
52
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Span, { ref, ...props })
47
53
  );
@@ -26,6 +26,7 @@ const getAuthHTTPClient = ({
26
26
  ...rest
27
27
  } = {}) => getHTTPClient({
28
28
  baseURL,
29
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
29
30
  headers: { ...headers, Authorization: getAuthorizationHeader() },
30
31
  ...rest
31
32
  });
@@ -10,12 +10,9 @@ const handleFailure = (error) => {
10
10
  if (status === HTTP_UNAUTHORIZED && unAuthorizedFailureHandler && typeof unAuthorizedFailureHandler === "function") {
11
11
  return unAuthorizedFailureHandler(error).then((authorizationHeader) => {
12
12
  const { config } = error;
13
- if (!config)
13
+ if (!config?.headers)
14
14
  throw error;
15
- config.headers = {
16
- ...config.headers,
17
- Authorization: authorizationHeader
18
- };
15
+ config.headers["Authorization"] = authorizationHeader;
19
16
  return new Promise((resolve, reject) => {
20
17
  axios.request(config).then(resolve).catch(reject);
21
18
  });
@@ -53,6 +53,13 @@ const onError = (err) => {
53
53
  ];
54
54
  config.noResponseRetries = config.noResponseRetries === void 0 || config.noResponseRetries === null ? 2 : config.noResponseRetries;
55
55
  const retryRanges = [
56
+ // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
57
+ // 1xx - Retry (Informational, request still processing)
58
+ // 2xx - Do not retry (Success)
59
+ // 3xx - Do not retry (Redirect)
60
+ // 4xx - Do not retry (Client errors)
61
+ // 429 - Retry ("Too Many Requests")
62
+ // 5xx - Retry (Server errors)
56
63
  [100, 199],
57
64
  [429, 429],
58
65
  [500, 599]
@@ -3,16 +3,28 @@ import {
3
3
  getConfig
4
4
  } from "./retry-axios.js";
5
5
  const getRaxConfig = (httpClient) => ({
6
+ // Retry 3 times on requests that return a response (500, etc) before giving up. Defaults to 3.
6
7
  retry: 3,
8
+ // Retry twice on errors that don't return a response (ENOTFOUND, ETIMEDOUT, etc).
7
9
  noResponseRetries: 2,
10
+ // Milliseconds to delay at first. Defaults to 100.
8
11
  retryDelay: 100,
12
+ // HTTP methods to automatically retry. Defaults to:
13
+ // ['GET', 'HEAD', 'OPTIONS', 'DELETE', 'PUT']
9
14
  httpMethodsToRetry: ["GET", "HEAD", "OPTIONS", "DELETE", "PUT"],
15
+ // The response status codes to retry. Supports a double
16
+ // array with a list of ranges. Defaults to:
17
+ // [[100, 199], [429, 429], [500, 599]]
10
18
  statusCodesToRetry: [
11
19
  [100, 199],
12
20
  [429, 429],
13
21
  [500, 599]
14
22
  ],
23
+ // If you are using a non static instance of Axios you need
24
+ // to pass that instance here (const ax = axios.create())
15
25
  instance: httpClient,
26
+ // You can detect when a retry is happening, and figure out how many
27
+ // retry attempts have been made
16
28
  onRetryAttempt: (err) => {
17
29
  const cfg = getConfig(err);
18
30
  if (cfg && cfg.currentRetryAttempt)
package/dist/esm/index.js CHANGED
@@ -71,7 +71,6 @@ import { RenderWithStateAddOns } from "./utils/testing/render-with-state-addons.
71
71
  import { getApiActionCreator, getSelectField } from "./api/helpers.js";
72
72
  import { getUser } from "./api/users/index.js";
73
73
  import { withAppDecorator } from "./view/storybook/decorator.js";
74
- import { initSBManager } from "./utils/storybook/manager.js";
75
74
  import { Autocomplete } from "./view/fields/autocomplete/index.js";
76
75
  import { ErrorToast } from "./view/error-toast/index.js";
77
76
  import { NavigationPrompt } from "./view/modals/navigation-prompt/index.js";
@@ -167,7 +166,6 @@ export {
167
166
  getStore,
168
167
  default2 as globalConstants,
169
168
  browserHistory as history,
170
- initSBManager,
171
169
  initServiceWorker,
172
170
  isCIBuild,
173
171
  isProd,
@@ -25,6 +25,7 @@ const navigateToLoginPage = ({
25
25
  redirectUri,
26
26
  idpErrorCode,
27
27
  scope,
28
+ // eslint-disable-next-line camelcase
28
29
  responseType
29
30
  }) => {
30
31
  const idpHost = getAppConfigValue(IDP_ENDPOINT_CONFIG_KEY, "");
@@ -4,7 +4,9 @@ var constants_default = {
4
4
  };
5
5
  const SESSION_TIMEOUT_INTERVAL = {
6
6
  WARN: 12 * 60 * 1e3,
7
+ // 12 mins
7
8
  EXPIRY: 15 * 60 * 1e3
9
+ // 15 mins
8
10
  };
9
11
  const Themes = {
10
12
  EM: "em",
@@ -81,6 +81,7 @@ class CMicroAppHost {
81
81
  publish(message, data) {
82
82
  return publish(message, data);
83
83
  }
84
+ // eslint-disable-next-line @typescript-eslint/ban-types
84
85
  subscribe(message, func) {
85
86
  return subscribe(message, func);
86
87
  }
@@ -147,6 +148,7 @@ class CMicroAppHost {
147
148
  sendBAEvent(data) {
148
149
  sendBAEvent({ data, self: true });
149
150
  }
151
+ // eslint-disable-next-line @typescript-eslint/require-await
150
152
  async getObject(name) {
151
153
  return this.scriptingObjects[name];
152
154
  }
@@ -12,8 +12,11 @@ const piiPatterns = {
12
12
  ipAddress: /(\d{1,3}(\.\d{1,3}){3}|[0-9A-F]{4}(:[0-9A-F]{4}){5}(::|(:0000)+))/gi,
13
13
  usSocialSecurityNumber: /\b\d{3}[ -.]\d{2}[ -.]\d{4}\b/g,
14
14
  emailAddress: /([a-z0-9_\-.+]+)@\w+(\.\w+)*/gi,
15
+ // username: /(user( ?name)?|login): \S+/gi,
15
16
  password: /(pass(word|phrase)?|secret): \S+/gi,
16
17
  credentials: /(login( cred(ential)?s| info(rmation)?)?|cred(ential)?s) ?:\s*\S+\s+\/?\s*\S+/gi
18
+ // digits: /\b\d{4,}\b/g,
19
+ // url: /([^\s:/?#]+):\/\/([^/?#\s]*)([^?#\s]*)(\?([^#\s]*))?(#([^\s]*))?/g,
17
20
  };
18
21
  const replacer = (key, value) => {
19
22
  if (!key || typeof value !== "string" || key === "correlationId")
@@ -13,6 +13,7 @@ const getParameters = (storyBookTheme) => ({
13
13
  actions: { argTypesRegex: "^on.*" },
14
14
  controls: { hideNoControlsWarning: true },
15
15
  docs: {
16
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
16
17
  theme: createTheme(storyBookTheme)
17
18
  },
18
19
  options: {
@@ -3,11 +3,14 @@ const createTheme = ({
3
3
  base = "light",
4
4
  brandTitle = "Platform UI Components",
5
5
  ...rest
6
- }) => create({
7
- base,
8
- brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
9
- ...rest
10
- });
6
+ }) => (
7
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call
8
+ create({
9
+ base,
10
+ brandTitle: `${brandTitle} ${process.env.STORYBOOK_VERSION || ""}`,
11
+ ...rest
12
+ })
13
+ );
11
14
  export {
12
15
  createTheme
13
16
  };
@@ -8,6 +8,9 @@ const renderWithRedux = (ui, {
8
8
  store = createAppStore(initialState, browserHistory)
9
9
  } = {}) => ({
10
10
  ...render(/* @__PURE__ */ jsx(Provider, { store, children: ui })),
11
+ // adding `store` to the returned utilities to allow us
12
+ // to reference it in our tests (just try to avoid using
13
+ // this to test implementation details).
11
14
  store
12
15
  });
13
16
  export {
@@ -14,6 +14,9 @@ const renderWithRouterRedux = (ui, {
14
14
  ...render(
15
15
  /* @__PURE__ */ jsx(Provider, { store, children: /* @__PURE__ */ jsx(AppRouter, { history, children: ui }) })
16
16
  ),
17
+ // adding `store` to the returned utilities to allow us
18
+ // to reference it in our tests (just try to avoid using
19
+ // this to test implementation details).
17
20
  store
18
21
  });
19
22
  export {
@@ -9,6 +9,9 @@ const renderWithRouter = (ui, {
9
9
  const renderResult = render(/* @__PURE__ */ jsx(AppRouter, { history, children: ui }));
10
10
  return {
11
11
  ...renderResult,
12
+ // adding `history` to the returned utilities to allow us
13
+ // to reference it in our tests (just try to avoid using
14
+ // this to test implementation details).
12
15
  history
13
16
  };
14
17
  };
@@ -3,19 +3,18 @@ import { DSControlledCheckbox } from "@elliemae/ds-controlled-form";
3
3
  import {
4
4
  Controller
5
5
  } from "react-hook-form";
6
- const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ jsx(
6
+ const CheckBox = ({
7
+ name,
8
+ defaultValue,
9
+ rules = {},
10
+ ...rest
11
+ }) => /* @__PURE__ */ jsx(
7
12
  Controller,
8
13
  {
9
14
  name,
10
15
  rules,
11
- render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ jsx(
12
- DSControlledCheckbox,
13
- {
14
- ...rest,
15
- ...restProps,
16
- checked: value
17
- }
18
- )
16
+ defaultValue,
17
+ render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ jsx(DSControlledCheckbox, { ...rest, ...restProps, checked: Boolean(value) })
19
18
  }
20
19
  );
21
20
  export {
@@ -9,6 +9,7 @@ const StyledForm = styled.form`
9
9
  height: 100%;
10
10
  `;
11
11
  const Form = ({
12
+ /* eslint-disable indent */
12
13
  classname,
13
14
  reactHookFormProps = { mode: "onBlur" },
14
15
  children,
@@ -19,6 +20,7 @@ const Form = ({
19
20
  if (onSubmit)
20
21
  formProps.onSubmit = methods.handleSubmit(onSubmit);
21
22
  const providerProps = Object.assign(methods, {
23
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
22
24
  formProps: reactHookFormProps
23
25
  });
24
26
  return /* @__PURE__ */ jsx(FormProvider, { ...providerProps, children: /* @__PURE__ */ jsx(StyledForm, { className: classname, ...formProps, children }) });
@@ -98,11 +98,14 @@ const addAppToActiveAppList = (id, elementIds) => {
98
98
  host.activeGuests[id] = getRef && getRef() || {};
99
99
  return Promise.resolve();
100
100
  };
101
- const waitAndInitApplication = (appConfig, requests) => Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
102
- const logRecord = logRecords.APP_INIT_FAILED(appConfig.id, err.message);
103
- getLogger().error({ ...logRecord, exception: err });
104
- throw new Error(logRecord.msg);
105
- });
101
+ const waitAndInitApplication = (appConfig, requests) => (
102
+ // wait for all assets to get downloaded
103
+ Promise.all(requests).then(addAppToActiveAppList.bind(null, appConfig.id)).then(initApplication.bind(null, appConfig)).catch((err) => {
104
+ const logRecord = logRecords.APP_INIT_FAILED(appConfig.id, err.message);
105
+ getLogger().error({ ...logRecord, exception: err });
106
+ throw new Error(logRecord.msg);
107
+ })
108
+ );
106
109
  const removeAssetsFromDOM = (id, documentEle = document) => {
107
110
  const host = CMicroAppHost.getInstance();
108
111
  if (host)
@@ -36,6 +36,7 @@ const useAppWillRender = ({
36
36
  if (!loadFailed && onUnloadComplete)
37
37
  onUnloadComplete();
38
38
  },
39
+ // eslint-disable-next-line react-hooks/exhaustive-deps
39
40
  []
40
41
  );
41
42
  const load = useCallback(
@@ -14,6 +14,8 @@ const Span = styled.span`
14
14
  word-wrap: normal;
15
15
  `;
16
16
  const VisuallyHidden = forwardRef(
17
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
18
+ // @ts-ignore
17
19
  (props, ref) => /* @__PURE__ */ jsx(Span, { ref, ...props })
18
20
  );
19
21
  export {
@@ -5,7 +5,7 @@ export declare const AllowedModes: {
5
5
  OnceTillUnmount: string;
6
6
  };
7
7
  type Keys = keyof typeof AllowedModes;
8
- export type AllowedModeValues = typeof AllowedModes[Keys];
8
+ export type AllowedModeValues = (typeof AllowedModes)[Keys];
9
9
  export type SagaDescription = {
10
10
  mode?: AllowedModeValues;
11
11
  saga: Saga;
@@ -42,7 +42,6 @@ export { RenderWithStateAddOns } from './utils/testing/render-with-state-addons.
42
42
  export { getApiActionCreator, getSelectField } from './api/helpers.js';
43
43
  export { getUser as fetchUserSettings } from './api/users/index.js';
44
44
  export { withAppDecorator } from './view/storybook/decorator.js';
45
- export { initSBManager } from './utils/storybook/manager.js';
46
45
  export { Autocomplete } from './view/fields/autocomplete/index.js';
47
46
  export { ErrorToast } from './view/error-toast/index.js';
48
47
  export { NavigationPrompt } from './view/modals/navigation-prompt/index.js';
@@ -2,8 +2,9 @@
2
2
  import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
3
3
  export type CheckBoxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
4
4
  name: string;
5
+ defaultValue?: boolean;
5
6
  label: string;
6
7
  rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs'>;
7
8
  [x: string]: any;
8
9
  };
9
- export declare const CheckBox: ({ name, rules, ...rest }: CheckBoxProps) => JSX.Element;
10
+ export declare const CheckBox: ({ name, defaultValue, rules, ...rest }: CheckBoxProps) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "4.7.2",
3
+ "version": "4.9.0",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",
@@ -111,50 +111,50 @@
111
111
  "indent": 4
112
112
  },
113
113
  "peerDependencies": {
114
- "@elliemae/app-react-dependencies": "^4.2.0",
115
- "@elliemae/ds-basic": "^3.11.3",
116
- "@elliemae/ds-button": "^3.11.3",
117
- "@elliemae/ds-controlled-form": "^3.11.3",
118
- "@elliemae/ds-date-picker": "^3.11.3",
119
- "@elliemae/ds-date-range-picker": "^3.11.3",
120
- "@elliemae/ds-dialog": "^3.11.3",
121
- "@elliemae/ds-form": "^3.11.3",
122
- "@elliemae/ds-form-layout-blocks": "^3.11.3",
123
- "@elliemae/ds-grid": "^3.11.3",
124
- "@elliemae/ds-loading-indicator": "^3.11.3",
125
- "@elliemae/ds-modal": "^3.11.3",
126
- "@elliemae/ds-popperjs": "^3.11.3",
127
- "@elliemae/ds-toast": "^3.11.3",
114
+ "@elliemae/app-react-dependencies": "^4.3.0",
115
+ "@elliemae/ds-basic": "^3.12.1",
116
+ "@elliemae/ds-button": "^3.12.1",
117
+ "@elliemae/ds-controlled-form": "^3.12.1",
118
+ "@elliemae/ds-date-picker": "^3.12.1",
119
+ "@elliemae/ds-date-range-picker": "^3.12.1",
120
+ "@elliemae/ds-dialog": "^3.12.1",
121
+ "@elliemae/ds-form": "^3.12.1",
122
+ "@elliemae/ds-form-layout-blocks": "^3.12.1",
123
+ "@elliemae/ds-grid": "^3.12.1",
124
+ "@elliemae/ds-loading-indicator": "^3.12.1",
125
+ "@elliemae/ds-modal": "^3.12.1",
126
+ "@elliemae/ds-popperjs": "^3.12.1",
127
+ "@elliemae/ds-toast": "^3.12.1",
128
128
  "@elliemae/em-ssf-guest": "^1.11.2",
129
129
  "@elliemae/pui-diagnostics": "^2.7.5",
130
130
  "@elliemae/pui-micro-frontend-base": "^1.14.0",
131
- "@elliemae/pui-scripting-object": "^1.17.0",
131
+ "@elliemae/pui-scripting-object": "^1.18.0",
132
132
  "@elliemae/pui-theme": "^2.6.0",
133
133
  "@elliemae/pui-user-monitoring": "^1.18.1"
134
134
  },
135
135
  "devDependencies": {
136
- "@elliemae/app-react-dependencies": "~4.2.0",
136
+ "@elliemae/app-react-dependencies": "~4.3.0",
137
137
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.6.0",
138
- "@elliemae/ds-basic": "~3.11.3",
139
- "@elliemae/ds-button": "~3.11.3",
140
- "@elliemae/ds-controlled-form": "~3.11.3",
141
- "@elliemae/ds-date-picker": "~3.11.3",
142
- "@elliemae/ds-date-range-picker": "~3.11.3",
143
- "@elliemae/ds-dialog": "~3.11.3",
144
- "@elliemae/ds-form": "~3.11.3",
145
- "@elliemae/ds-form-layout-blocks": "~3.11.3",
146
- "@elliemae/ds-grid": "~3.11.3",
147
- "@elliemae/ds-loading-indicator": "~3.11.3",
148
- "@elliemae/ds-modal": "~3.11.3",
149
- "@elliemae/ds-popperjs": "~3.11.3",
150
- "@elliemae/ds-toast": "~3.11.3",
138
+ "@elliemae/ds-basic": "~3.12.1",
139
+ "@elliemae/ds-button": "~3.12.1",
140
+ "@elliemae/ds-controlled-form": "~3.12.1",
141
+ "@elliemae/ds-date-picker": "~3.12.1",
142
+ "@elliemae/ds-date-range-picker": "~3.12.1",
143
+ "@elliemae/ds-dialog": "~3.12.1",
144
+ "@elliemae/ds-form": "~3.12.1",
145
+ "@elliemae/ds-form-layout-blocks": "~3.12.1",
146
+ "@elliemae/ds-grid": "~3.12.1",
147
+ "@elliemae/ds-loading-indicator": "~3.12.1",
148
+ "@elliemae/ds-modal": "~3.12.1",
149
+ "@elliemae/ds-popperjs": "~3.12.1",
150
+ "@elliemae/ds-toast": "~3.12.1",
151
151
  "@elliemae/em-ssf-guest": "~1.11.2",
152
- "@elliemae/pui-cli": "~7.21.0",
152
+ "@elliemae/pui-cli": "~7.23.0",
153
153
  "@elliemae/pui-diagnostics": "~2.7.5",
154
154
  "@elliemae/pui-doc-gen": "~1.4.1",
155
155
  "@elliemae/pui-e2e-test-sdk": "~7.7.1",
156
156
  "@elliemae/pui-micro-frontend-base": "~1.14.0",
157
- "@elliemae/pui-scripting-object": "~1.17.0",
157
+ "@elliemae/pui-scripting-object": "~1.18.0",
158
158
  "@elliemae/pui-theme": "~2.6.0",
159
159
  "@elliemae/pui-user-monitoring": "~1.18.1"
160
160
  }