@elliemae/pui-app-sdk 5.45.0 → 5.47.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 (225) hide show
  1. package/build/docs/404.html +2 -2
  2. package/build/docs/api/classes/Analytics/index.html +2 -2
  3. package/build/docs/api/classes/CMicroAppGuest/index.html +2 -2
  4. package/build/docs/api/classes/CMicroAppHost/index.html +2 -2
  5. package/build/docs/api/classes/ErrorBoundary/index.html +2 -2
  6. package/build/docs/api/classes/GuestModule/index.html +2 -2
  7. package/build/docs/api/functions/AppRoot/index.html +2 -2
  8. package/build/docs/api/functions/Autocomplete/index.html +2 -2
  9. package/build/docs/api/functions/CheckBox/index.html +2 -2
  10. package/build/docs/api/functions/ComboBox/index.html +2 -2
  11. package/build/docs/api/functions/ComboBoxV3/index.html +2 -2
  12. package/build/docs/api/functions/ConnectForm/index.html +2 -2
  13. package/build/docs/api/functions/DateInput/index.html +2 -2
  14. package/build/docs/api/functions/DatePicker/index.html +2 -2
  15. package/build/docs/api/functions/DateRangePicker/index.html +2 -2
  16. package/build/docs/api/functions/DateTimePicker/index.html +2 -2
  17. package/build/docs/api/functions/Form/index.html +2 -2
  18. package/build/docs/api/functions/FormItemLayout/index.html +2 -2
  19. package/build/docs/api/functions/FormLayoutBlockItem/index.html +2 -2
  20. package/build/docs/api/functions/FormSubmitButton/index.html +2 -2
  21. package/build/docs/api/functions/InputMask/index.html +2 -2
  22. package/build/docs/api/functions/InputText/index.html +2 -2
  23. package/build/docs/api/functions/LargeTextBox/index.html +2 -2
  24. package/build/docs/api/functions/MaskedInputText/index.html +2 -2
  25. package/build/docs/api/functions/Page/index.html +2 -2
  26. package/build/docs/api/functions/Radio/index.html +2 -2
  27. package/build/docs/api/functions/RadioGroup/index.html +2 -2
  28. package/build/docs/api/functions/RegisterService/index.html +2 -2
  29. package/build/docs/api/functions/RenderWithStateAddOns/index.html +2 -2
  30. package/build/docs/api/functions/RequireAuth/index.html +2 -2
  31. package/build/docs/api/functions/SessionTimeout/index.html +2 -2
  32. package/build/docs/api/functions/TextBox/index.html +2 -2
  33. package/build/docs/api/functions/Toggle/index.html +2 -2
  34. package/build/docs/api/functions/authSaga/index.html +2 -2
  35. package/build/docs/api/functions/authorize/index.html +2 -2
  36. package/build/docs/api/functions/buildModuleParams/index.html +2 -2
  37. package/build/docs/api/functions/cleanup/index.html +2 -2
  38. package/build/docs/api/functions/configureStore/index.html +2 -2
  39. package/build/docs/api/functions/createGuestModule/index.html +2 -2
  40. package/build/docs/api/functions/createManager/index.html +2 -2
  41. package/build/docs/api/functions/enableReactAppForHostIntegration/index.html +2 -2
  42. package/build/docs/api/functions/fetchHostAppData/index.html +2 -2
  43. package/build/docs/api/functions/fetchUserSettings/index.html +2 -2
  44. package/build/docs/api/functions/getApiActionCreator/index.html +2 -2
  45. package/build/docs/api/functions/getAppConfig/index.html +2 -2
  46. package/build/docs/api/functions/getAppConfigValue/index.html +2 -2
  47. package/build/docs/api/functions/getAuthHTTPClient/index.html +4 -4
  48. package/build/docs/api/functions/getAuthorizationHeader/index.html +2 -2
  49. package/build/docs/api/functions/getHTTPClient/index.html +4 -4
  50. package/build/docs/api/functions/getHostAppDataByKey/index.html +2 -2
  51. package/build/docs/api/functions/getLogger/index.html +2 -2
  52. package/build/docs/api/functions/getMicroFrontEndAppConfig/index.html +2 -2
  53. package/build/docs/api/functions/getNavigationLinks/index.html +2 -2
  54. package/build/docs/api/functions/getRedirectUrl/index.html +2 -2
  55. package/build/docs/api/functions/getSelectField/index.html +2 -2
  56. package/build/docs/api/functions/getStore/index.html +2 -2
  57. package/build/docs/api/functions/initServiceWorker/index.html +2 -2
  58. package/build/docs/api/functions/isCIBuild/index.html +2 -2
  59. package/build/docs/api/functions/isProd/index.html +2 -2
  60. package/build/docs/api/functions/isUserAuthorized/index.html +2 -2
  61. package/build/docs/api/functions/listenStorageEvents/index.html +2 -2
  62. package/build/docs/api/functions/loadAppConfig/index.html +2 -2
  63. package/build/docs/api/functions/loadable/index.html +2 -2
  64. package/build/docs/api/functions/login/index.html +2 -2
  65. package/build/docs/api/functions/notifyGuestUnloadComplete/index.html +2 -2
  66. package/build/docs/api/functions/onAuthorizationFailure/index.html +2 -2
  67. package/build/docs/api/functions/onGuestUnloadStart/index.html +2 -2
  68. package/build/docs/api/functions/redactPii/index.html +2 -2
  69. package/build/docs/api/functions/removeDoubleSlash/index.html +2 -2
  70. package/build/docs/api/functions/removeStorageEvents/index.html +2 -2
  71. package/build/docs/api/functions/render/index.html +2 -2
  72. package/build/docs/api/functions/renderHook/index.html +2 -2
  73. package/build/docs/api/functions/renderWithHostData/index.html +2 -2
  74. package/build/docs/api/functions/renderWithRedux/index.html +2 -2
  75. package/build/docs/api/functions/renderWithRouter/index.html +2 -2
  76. package/build/docs/api/functions/renderWithRouterRedux/index.html +2 -2
  77. package/build/docs/api/functions/sdkBaseQuery/index.html +2 -2
  78. package/build/docs/api/functions/sendBAEvent/index.html +2 -2
  79. package/build/docs/api/functions/sendMessageToHost/index.html +2 -2
  80. package/build/docs/api/functions/setAppConfig/index.html +2 -2
  81. package/build/docs/api/functions/setAppConfigValue/index.html +2 -2
  82. package/build/docs/api/functions/setHostAppData/index.html +2 -2
  83. package/build/docs/api/functions/setLoginParams/index.html +2 -2
  84. package/build/docs/api/functions/setSessionTimeoutInterval/index.html +10 -7
  85. package/build/docs/api/functions/subscribeToResetSession/index.html +2 -2
  86. package/build/docs/api/functions/subscribeToSessionExpiry/index.html +2 -2
  87. package/build/docs/api/functions/subscribeToSessionExpiryWarning/index.html +2 -2
  88. package/build/docs/api/functions/trackActivity/index.html +2 -2
  89. package/build/docs/api/functions/useAppDispatch/index.html +2 -2
  90. package/build/docs/api/functions/useAppMiddleware/index.html +2 -2
  91. package/build/docs/api/functions/useInjectQuery/index.html +2 -2
  92. package/build/docs/api/functions/useInjectReducer/index.html +2 -2
  93. package/build/docs/api/functions/useInjectSaga/index.html +2 -2
  94. package/build/docs/api/functions/useInjectSideEffect/index.html +2 -2
  95. package/build/docs/api/functions/useMediaQueryList/index.html +2 -2
  96. package/build/docs/api/functions/useStateSelector/index.html +2 -2
  97. package/build/docs/api/functions/useStateSelectorShallow/index.html +2 -2
  98. package/build/docs/api/functions/waitFor/index.html +2 -2
  99. package/build/docs/api/functions/waitForElementToBeRemoved/index.html +2 -2
  100. package/build/docs/api/functions/withAppDecorator/index.html +2 -2
  101. package/build/docs/api/index.html +2 -2
  102. package/build/docs/api/interfaces/AppConfig/index.html +2 -2
  103. package/build/docs/api/interfaces/GuestProps/index.html +2 -2
  104. package/build/docs/api/interfaces/UseStateSelectorOptions/index.html +2 -2
  105. package/build/docs/api/type-aliases/AppDispatch/index.html +2 -2
  106. package/build/docs/api/type-aliases/AppStore/index.html +2 -2
  107. package/build/docs/api/type-aliases/Await/index.html +2 -2
  108. package/build/docs/api/type-aliases/EMUI/index.html +2 -2
  109. package/build/docs/api/type-aliases/HostOptions/index.html +2 -2
  110. package/build/docs/api/type-aliases/HostProvidedParams/index.html +2 -2
  111. package/build/docs/api/type-aliases/ModuleOverrides/index.html +2 -2
  112. package/build/docs/api/type-aliases/OnHostInitCallback/index.html +2 -2
  113. package/build/docs/api/type-aliases/OnInitCallback/index.html +2 -2
  114. package/build/docs/api/type-aliases/OnMountCallback/index.html +2 -2
  115. package/build/docs/api/type-aliases/OnUnMountCallback/index.html +2 -2
  116. package/build/docs/api/type-aliases/RootState/index.html +2 -2
  117. package/build/docs/api/type-aliases/SelectStateFieldFunction/index.html +2 -2
  118. package/build/docs/api/variables/ErrorToast/index.html +2 -2
  119. package/build/docs/api/variables/FormPropsContext/index.html +2 -2
  120. package/build/docs/api/variables/GuestMicroApp/index.html +2 -2
  121. package/build/docs/api/variables/MASK_PIPES/index.html +2 -2
  122. package/build/docs/api/variables/MASK_TYPES/index.html +2 -2
  123. package/build/docs/api/variables/MicroApp/index.html +2 -2
  124. package/build/docs/api/variables/MicroIFrameApp/index.html +2 -2
  125. package/build/docs/api/variables/NavigationPrompt/index.html +2 -2
  126. package/build/docs/api/variables/NavigationPromptActions/index.html +2 -2
  127. package/build/docs/api/variables/Themes/index.html +2 -2
  128. package/build/docs/api/variables/VisuallyHidden/index.html +2 -2
  129. package/build/docs/api/variables/WaitMessage/index.html +2 -2
  130. package/build/docs/api/variables/act/index.html +2 -2
  131. package/build/docs/api/variables/ariaLive/index.html +2 -2
  132. package/build/docs/api/variables/auth/index.html +2 -2
  133. package/build/docs/api/variables/authReducer/index.html +2 -2
  134. package/build/docs/api/variables/clearSideEffects/index.html +2 -2
  135. package/build/docs/api/variables/createSideEffect/index.html +2 -2
  136. package/build/docs/api/variables/decorators/index.html +2 -2
  137. package/build/docs/api/variables/endSession/index.html +2 -2
  138. package/build/docs/api/variables/error/index.html +2 -2
  139. package/build/docs/api/variables/errorMiddleware/index.html +2 -2
  140. package/build/docs/api/variables/fireEvent/index.html +2 -2
  141. package/build/docs/api/variables/globalConstants/index.html +2 -2
  142. package/build/docs/api/variables/history/index.html +2 -2
  143. package/build/docs/api/variables/httpClientProps/index.html +2 -2
  144. package/build/docs/api/variables/logout/index.html +2 -2
  145. package/build/docs/api/variables/memoryHistory/index.html +2 -2
  146. package/build/docs/api/variables/removeSideEffect/index.html +2 -2
  147. package/build/docs/api/variables/resetUserIdleTime/index.html +2 -2
  148. package/build/docs/api/variables/screen/index.html +2 -2
  149. package/build/docs/api/variables/startSideEffect/index.html +2 -2
  150. package/build/docs/api/variables/updateBAEventParameters/index.html +2 -2
  151. package/build/docs/api/variables/useAppSelector/index.html +2 -2
  152. package/build/docs/api/variables/waitMessageAction/index.html +2 -2
  153. package/build/docs/api/variables/within/index.html +2 -2
  154. package/build/docs/assets/js/04ee7372.96ded94a.js +1 -0
  155. package/build/docs/assets/js/{3204d46b.c17c7438.js → 3204d46b.1407c7c7.js} +1 -1
  156. package/build/docs/assets/js/77982fdd.ab92b1fc.js +1 -0
  157. package/build/docs/assets/js/{aeb9810c.513b7113.js → aeb9810c.eccdb1f8.js} +1 -1
  158. package/build/docs/assets/js/{main.eb628dfd.js → main.a55b3e06.js} +2 -2
  159. package/build/docs/assets/js/{runtime~main.d66bc46a.js → runtime~main.066f0308.js} +1 -1
  160. package/build/docs/index.html +2 -2
  161. package/build/docs/usage-guide/index.html +6 -4
  162. package/demo/{1896.11783677.iframe.bundle.js → 1896.28d0a909.iframe.bundle.js} +1 -1
  163. package/demo/1896.28d0a909.iframe.bundle.js.br +0 -0
  164. package/demo/{docs/1896.11783677.iframe.bundle.js.gz → 1896.28d0a909.iframe.bundle.js.gz} +0 -0
  165. package/demo/docs/{1896.11783677.iframe.bundle.js → 1896.28d0a909.iframe.bundle.js} +1 -1
  166. package/demo/docs/1896.28d0a909.iframe.bundle.js.br +0 -0
  167. package/demo/{1896.11783677.iframe.bundle.js.gz → docs/1896.28d0a909.iframe.bundle.js.gz} +0 -0
  168. package/demo/docs/iframe.html +1 -1
  169. package/demo/docs/index.html +1 -1
  170. package/demo/docs/main.3d27acca6f453a527b4e.manager.bundle.js +1 -0
  171. package/demo/docs/main.3d27acca6f453a527b4e.manager.bundle.js.br +0 -0
  172. package/demo/docs/main.3d27acca6f453a527b4e.manager.bundle.js.gz +0 -0
  173. package/demo/docs/main.b110520b.iframe.bundle.js +5 -0
  174. package/demo/docs/main.b110520b.iframe.bundle.js.br +0 -0
  175. package/demo/docs/main.b110520b.iframe.bundle.js.gz +0 -0
  176. package/demo/docs/project.json +1 -1
  177. package/demo/iframe.html +1 -1
  178. package/demo/index.html +1 -1
  179. package/demo/main.3d27acca6f453a527b4e.manager.bundle.js +1 -0
  180. package/demo/main.3d27acca6f453a527b4e.manager.bundle.js.br +0 -0
  181. package/demo/main.3d27acca6f453a527b4e.manager.bundle.js.gz +0 -0
  182. package/demo/main.b110520b.iframe.bundle.js +5 -0
  183. package/demo/main.b110520b.iframe.bundle.js.br +0 -0
  184. package/demo/main.b110520b.iframe.bundle.js.gz +0 -0
  185. package/demo/project.json +1 -1
  186. package/dist/cjs/communication/http-client/index.js +5 -6
  187. package/dist/cjs/communication/http-client/request-interceptor.js +14 -5
  188. package/dist/cjs/package.json +1 -4
  189. package/dist/cjs/utils/constants.js +12 -0
  190. package/dist/cjs/utils/logrocket.js +4 -0
  191. package/dist/cjs/utils/session-timeout-config.js +10 -6
  192. package/dist/cjs/utils/session.js +11 -2
  193. package/dist/esm/communication/http-client/index.js +6 -7
  194. package/dist/esm/communication/http-client/request-interceptor.js +17 -5
  195. package/dist/esm/package.json +1 -4
  196. package/dist/esm/utils/constants.js +12 -0
  197. package/dist/esm/utils/logrocket.js +4 -0
  198. package/dist/esm/utils/session-timeout-config.js +10 -6
  199. package/dist/esm/utils/session.js +21 -4
  200. package/dist/types/lib/communication/http-client/index.d.ts +2 -2
  201. package/dist/types/lib/communication/http-client/request-interceptor.d.ts +2 -2
  202. package/dist/types/lib/communication/http-client/tests/session-header.test.d.ts +1 -0
  203. package/dist/types/lib/utils/constants.d.ts +6 -0
  204. package/dist/types/lib/utils/logrocket.d.ts +2 -0
  205. package/dist/types/lib/utils/session-timeout-config.d.ts +4 -1
  206. package/dist/types/lib/utils/session.d.ts +9 -2
  207. package/dist/types/tsconfig.tsbuildinfo +1 -1
  208. package/package.json +2 -2
  209. package/build/docs/assets/js/04ee7372.53a92701.js +0 -1
  210. package/build/docs/assets/js/77982fdd.daa51d7d.js +0 -1
  211. package/demo/1896.11783677.iframe.bundle.js.br +0 -0
  212. package/demo/docs/1896.11783677.iframe.bundle.js.br +0 -0
  213. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js +0 -1
  214. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js.br +0 -0
  215. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js.gz +0 -0
  216. package/demo/docs/main.ccc2d540.iframe.bundle.js +0 -5
  217. package/demo/docs/main.ccc2d540.iframe.bundle.js.br +0 -0
  218. package/demo/docs/main.ccc2d540.iframe.bundle.js.gz +0 -0
  219. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js +0 -1
  220. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js.br +0 -0
  221. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js.gz +0 -0
  222. package/demo/main.ccc2d540.iframe.bundle.js +0 -5
  223. package/demo/main.ccc2d540.iframe.bundle.js.br +0 -0
  224. package/demo/main.ccc2d540.iframe.bundle.js.gz +0 -0
  225. /package/build/docs/assets/js/{main.eb628dfd.js.LICENSE.txt → main.a55b3e06.js.LICENSE.txt} +0 -0
package/demo/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1785432043950,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"pnpm","version":"8.15.9"},"typescriptOptions":{"check":false,"checkOptions":{},"reactDocgen":false,"reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true,"compilerOptions":{"allowSyntheticDefaultImports":false,"esModuleInterop":false}}},"features":{"fastRefresh":true,"storyStoreV7":true},"language":"javascript","storybookPackages":{},"framework":{"options":{"fastRefresh":true,"strictMode":true,"legacyRootApi":true}},"addons":{"@storybook/addon-docs":{"options":{"sourceLoaderOptions":{"injectStoryParameters":false}},"version":"6.5.16"},"@storybook/addon-essentials":{"options":{"docs":false},"version":"6.5.16"},"@storybook/addon-storysource":{"version":"6.5.16"},"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-events":{"version":"6.2.9"},"@storybook/addon-interactions":{"version":"6.5.16"},"@storybook/addon-a11y":{"version":"6.5.16"},"storybook-addon-turbo-build":{"options":{"optimizationLevel":2,"esbuildMinifyOptions":{"target":"es2022"}},"version":"1.1.0"}}}
1
+ {"generatedAt":1786572218304,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"pnpm","version":"8.15.9"},"typescriptOptions":{"check":false,"checkOptions":{},"reactDocgen":false,"reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true,"compilerOptions":{"allowSyntheticDefaultImports":false,"esModuleInterop":false}}},"features":{"fastRefresh":true,"storyStoreV7":true},"language":"javascript","storybookPackages":{},"framework":{"options":{"fastRefresh":true,"strictMode":true,"legacyRootApi":true}},"addons":{"@storybook/addon-docs":{"options":{"sourceLoaderOptions":{"injectStoryParameters":false}},"version":"6.5.16"},"@storybook/addon-essentials":{"options":{"docs":false},"version":"6.5.16"},"@storybook/addon-storysource":{"version":"6.5.16"},"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-events":{"version":"6.2.9"},"@storybook/addon-interactions":{"version":"6.5.16"},"@storybook/addon-a11y":{"version":"6.5.16"},"storybook-addon-turbo-build":{"options":{"optimizationLevel":2,"esbuildMinifyOptions":{"target":"es2022"}},"version":"1.1.0"}}}
@@ -39,29 +39,28 @@ var import_helper = require("../../utils/auth/helper.js");
39
39
  var import_retry = __toESM(require("./retry.js"));
40
40
  var import_request_interceptor = require("./request-interceptor.js");
41
41
  var import_response_interceptor = require("./response-interceptor.js");
42
- var import_logrocket = require("../../utils/logrocket.js");
43
42
  const REQUEST_TIMEOUT = 2 * 60 * 1e3;
44
43
  const getHTTPClient = ({
45
44
  baseURL = (0, import_config.getAppConfigValue)("serviceEndpoints.api", ""),
46
45
  headers = {},
47
- sendLogRocketSessionHeader = false
46
+ sendLogRocketSessionHeader = true
48
47
  } = {}) => {
49
- const logRocketSessionUrl = (0, import_logrocket.getLogRocket)()?.sessionURL || "";
50
48
  const client = import_axios.default.create({
51
49
  baseURL,
52
- headers: sendLogRocketSessionHeader && logRocketSessionUrl ? { ...headers, "X-LogRocket-URL": logRocketSessionUrl } : headers
50
+ headers
53
51
  });
54
52
  if (client?.defaults?.timeout) client.defaults.timeout = REQUEST_TIMEOUT;
55
53
  (0, import_retry.default)(client);
56
54
  const { request, response } = client?.interceptors || {};
57
- if (request) request.use(import_request_interceptor.requestInterceptor);
55
+ if (request)
56
+ request.use((0, import_request_interceptor.createRequestInterceptor)(sendLogRocketSessionHeader));
58
57
  if (response) response.use(import_response_interceptor.handleSuccess, import_response_interceptor.handleFailure);
59
58
  return client;
60
59
  };
61
60
  const getAuthHTTPClient = ({
62
61
  baseURL,
63
62
  headers = {},
64
- sendLogRocketSessionHeader = false,
63
+ sendLogRocketSessionHeader = true,
65
64
  ...rest
66
65
  } = {}) => getHTTPClient({
67
66
  baseURL,
@@ -18,11 +18,20 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var request_interceptor_exports = {};
20
20
  __export(request_interceptor_exports, {
21
- requestInterceptor: () => requestInterceptor
21
+ createRequestInterceptor: () => createRequestInterceptor
22
22
  });
23
23
  module.exports = __toCommonJS(request_interceptor_exports);
24
+ var import_logrocket = require("../../utils/logrocket.js");
24
25
  var import_props = require("./props.js");
25
- const requestInterceptor = (config) => {
26
- import_props.httpClientProps.resetUserIdleTime();
27
- return config;
28
- };
26
+ function createRequestInterceptor(sendLogRocketSessionHeader = true) {
27
+ return (config) => {
28
+ import_props.httpClientProps.resetUserIdleTime();
29
+ if (sendLogRocketSessionHeader) {
30
+ const sessionLink = (0, import_logrocket.getLogRocketSessionLink)();
31
+ if (sessionLink) {
32
+ config.headers.set(import_logrocket.APP_SESSION_LINK_HEADER, sessionLink);
33
+ }
34
+ }
35
+ return config;
36
+ };
37
+ }
@@ -3,8 +3,5 @@
3
3
  "sideEffects": [
4
4
  "*.css",
5
5
  "*.html"
6
- ],
7
- "publishConfig": {
8
- "access": "public"
9
- }
6
+ ]
10
7
  }
@@ -18,11 +18,17 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var constants_exports = {};
20
20
  __export(constants_exports, {
21
+ DEFAULT_SESSION_WARN: () => DEFAULT_SESSION_WARN,
21
22
  HOST_WINDOW_BREAKPOINT_CHANGED: () => HOST_WINDOW_BREAKPOINT_CHANGED,
22
23
  HOST_WINDOW_RESIZED: () => HOST_WINDOW_RESIZED,
24
+ MAX_SESSION_TIMEOUT: () => MAX_SESSION_TIMEOUT,
25
+ MIN_SESSION_TIMEOUT: () => MIN_SESSION_TIMEOUT,
26
+ SESSION_EXPIRY_GREATER_THAN_MAX_ERROR: () => SESSION_EXPIRY_GREATER_THAN_MAX_ERROR,
27
+ SESSION_EXPIRY_LESS_THAN_MIN_ERROR: () => SESSION_EXPIRY_LESS_THAN_MIN_ERROR,
23
28
  SESSION_RENEWAL_INTERVAL: () => SESSION_RENEWAL_INTERVAL,
24
29
  SESSION_TIMEOUT_INTERVAL: () => SESSION_TIMEOUT_INTERVAL,
25
30
  Themes: () => Themes,
31
+ WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR: () => WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR,
26
32
  default: () => constants_default
27
33
  });
28
34
  module.exports = __toCommonJS(constants_exports);
@@ -43,3 +49,9 @@ const Themes = {
43
49
  const HOST_WINDOW_RESIZED = "HOST_WINDOW_RESIZED";
44
50
  const HOST_WINDOW_BREAKPOINT_CHANGED = "HOST_WINDOW_BREAKPOINT_CHANGED";
45
51
  const SESSION_RENEWAL_INTERVAL = 6e4;
52
+ const MIN_SESSION_TIMEOUT = 15;
53
+ const MAX_SESSION_TIMEOUT = 60;
54
+ const DEFAULT_SESSION_WARN = 3;
55
+ const SESSION_EXPIRY_LESS_THAN_MIN_ERROR = `Session timeout interval must be at least ${MIN_SESSION_TIMEOUT} minutes.`;
56
+ const SESSION_EXPIRY_GREATER_THAN_MAX_ERROR = `Session timeout interval can not exceed ${MAX_SESSION_TIMEOUT} minutes.`;
57
+ const WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR = "Session warning interval must be less than session timeout interval.";
@@ -18,7 +18,9 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var logrocket_exports = {};
20
20
  __export(logrocket_exports, {
21
+ APP_SESSION_LINK_HEADER: () => APP_SESSION_LINK_HEADER,
21
22
  getLogRocket: () => getLogRocket,
23
+ getLogRocketSessionLink: () => getLogRocketSessionLink,
22
24
  lrIdentify: () => lrIdentify,
23
25
  lrTrack: () => lrTrack,
24
26
  resetLrIdentity: () => import_pui_analytics_so.resetLrIdentity
@@ -26,6 +28,8 @@ __export(logrocket_exports, {
26
28
  module.exports = __toCommonJS(logrocket_exports);
27
29
  var import_pui_analytics_so = require("@elliemae/pui-analytics-so");
28
30
  const getLogRocket = () => window.emui?.logRocket;
31
+ const APP_SESSION_LINK_HEADER = "X-ICE-AppSessionLink";
32
+ const getLogRocketSessionLink = () => getLogRocket()?.sessionURL || "";
29
33
  const cleanupData = (data) => {
30
34
  const cleanedData = {};
31
35
  Object.entries(data).forEach(([key, value]) => {
@@ -22,22 +22,26 @@ __export(session_timeout_config_exports, {
22
22
  getSessionTimeoutMs: () => getSessionTimeoutMs,
23
23
  getSessionWarnIntervalMs: () => getSessionWarnIntervalMs,
24
24
  resetSessionTimeoutCache: () => resetSessionTimeoutCache,
25
- setSessionTimeoutCacheInMS: () => setSessionTimeoutCacheInMS
25
+ setSessionTimeoutCache: () => setSessionTimeoutCache
26
26
  });
27
27
  module.exports = __toCommonJS(session_timeout_config_exports);
28
28
  var import_config = require("./app-config/config.js");
29
29
  var import_constants = require("./constants.js");
30
30
  let cachedWarnIntervalMs;
31
31
  let cachedExpiryIntervalMs;
32
- const THREE_MINUTES_IN_MS = 18e4;
33
- const calculateWaringInterval = (timeoutInterval) => timeoutInterval - THREE_MINUTES_IN_MS;
32
+ const minutesToMs = (minutes) => minutes * 6e4;
34
33
  const resetSessionTimeoutCache = () => {
35
34
  cachedWarnIntervalMs = void 0;
36
35
  cachedExpiryIntervalMs = void 0;
37
36
  };
38
- const setSessionTimeoutCacheInMS = (sessionExpiryInterval) => {
39
- cachedWarnIntervalMs = calculateWaringInterval(sessionExpiryInterval);
40
- cachedExpiryIntervalMs = sessionExpiryInterval;
37
+ const setSessionTimeoutCache = ({
38
+ sessionExpiryInterval,
39
+ sessionWarnInterval
40
+ }) => {
41
+ cachedWarnIntervalMs = minutesToMs(
42
+ sessionExpiryInterval - sessionWarnInterval
43
+ );
44
+ cachedExpiryIntervalMs = minutesToMs(sessionExpiryInterval);
41
45
  };
42
46
  const getSessionTimeoutMs = (key, fallback) => {
43
47
  const value = (0, import_config.getAppConfigValue)(key);
@@ -72,8 +72,17 @@ const resetUserIdleTime = (resetWarningModal = false) => {
72
72
  if (!enforceIdleThresholds(resetWarningModal === true)) return;
73
73
  markUserActive(resetWarningModal);
74
74
  };
75
- const setSessionTimeoutInterval = (sessionExpiryInterval) => {
76
- (0, import_session_timeout_config.setSessionTimeoutCacheInMS)(sessionExpiryInterval);
75
+ const setSessionTimeoutInterval = ({
76
+ sessionExpiryInterval = import_constants.MIN_SESSION_TIMEOUT,
77
+ sessionWarnInterval = import_constants.DEFAULT_SESSION_WARN
78
+ }) => {
79
+ if (sessionExpiryInterval < import_constants.MIN_SESSION_TIMEOUT)
80
+ throw new Error(import_constants.SESSION_EXPIRY_LESS_THAN_MIN_ERROR);
81
+ if (sessionExpiryInterval > import_constants.MAX_SESSION_TIMEOUT)
82
+ throw new Error(import_constants.SESSION_EXPIRY_GREATER_THAN_MAX_ERROR);
83
+ if (sessionWarnInterval >= sessionExpiryInterval)
84
+ throw new Error(import_constants.WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR);
85
+ (0, import_session_timeout_config.setSessionTimeoutCache)({ sessionExpiryInterval, sessionWarnInterval });
77
86
  resetUserIdleTime(true);
78
87
  };
79
88
  const renewSession = async (explicit = false) => {
@@ -2,31 +2,30 @@ import axios from "axios";
2
2
  import { getAppConfigValue } from "../../utils/app-config/config.js";
3
3
  import { getAuthorizationHeader } from "../../utils/auth/helper.js";
4
4
  import setupRetry from "./retry.js";
5
- import { requestInterceptor } from "./request-interceptor.js";
5
+ import { createRequestInterceptor } from "./request-interceptor.js";
6
6
  import { handleSuccess, handleFailure } from "./response-interceptor.js";
7
- import { getLogRocket } from "../../utils/logrocket.js";
8
7
  const REQUEST_TIMEOUT = 2 * 60 * 1e3;
9
8
  const getHTTPClient = ({
10
9
  baseURL = getAppConfigValue("serviceEndpoints.api", ""),
11
10
  headers = {},
12
- sendLogRocketSessionHeader = false
11
+ sendLogRocketSessionHeader = true
13
12
  } = {}) => {
14
- const logRocketSessionUrl = getLogRocket()?.sessionURL || "";
15
13
  const client = axios.create({
16
14
  baseURL,
17
- headers: sendLogRocketSessionHeader && logRocketSessionUrl ? { ...headers, "X-LogRocket-URL": logRocketSessionUrl } : headers
15
+ headers
18
16
  });
19
17
  if (client?.defaults?.timeout) client.defaults.timeout = REQUEST_TIMEOUT;
20
18
  setupRetry(client);
21
19
  const { request, response } = client?.interceptors || {};
22
- if (request) request.use(requestInterceptor);
20
+ if (request)
21
+ request.use(createRequestInterceptor(sendLogRocketSessionHeader));
23
22
  if (response) response.use(handleSuccess, handleFailure);
24
23
  return client;
25
24
  };
26
25
  const getAuthHTTPClient = ({
27
26
  baseURL,
28
27
  headers = {},
29
- sendLogRocketSessionHeader = false,
28
+ sendLogRocketSessionHeader = true,
30
29
  ...rest
31
30
  } = {}) => getHTTPClient({
32
31
  baseURL,
@@ -1,8 +1,20 @@
1
+ import {
2
+ APP_SESSION_LINK_HEADER,
3
+ getLogRocketSessionLink
4
+ } from "../../utils/logrocket.js";
1
5
  import { httpClientProps } from "./props.js";
2
- const requestInterceptor = (config) => {
3
- httpClientProps.resetUserIdleTime();
4
- return config;
5
- };
6
+ function createRequestInterceptor(sendLogRocketSessionHeader = true) {
7
+ return (config) => {
8
+ httpClientProps.resetUserIdleTime();
9
+ if (sendLogRocketSessionHeader) {
10
+ const sessionLink = getLogRocketSessionLink();
11
+ if (sessionLink) {
12
+ config.headers.set(APP_SESSION_LINK_HEADER, sessionLink);
13
+ }
14
+ }
15
+ return config;
16
+ };
17
+ }
6
18
  export {
7
- requestInterceptor
19
+ createRequestInterceptor
8
20
  };
@@ -3,8 +3,5 @@
3
3
  "sideEffects": [
4
4
  "*.css",
5
5
  "*.html"
6
- ],
7
- "publishConfig": {
8
- "access": "public"
9
- }
6
+ ]
10
7
  }
@@ -15,11 +15,23 @@ const Themes = {
15
15
  const HOST_WINDOW_RESIZED = "HOST_WINDOW_RESIZED";
16
16
  const HOST_WINDOW_BREAKPOINT_CHANGED = "HOST_WINDOW_BREAKPOINT_CHANGED";
17
17
  const SESSION_RENEWAL_INTERVAL = 6e4;
18
+ const MIN_SESSION_TIMEOUT = 15;
19
+ const MAX_SESSION_TIMEOUT = 60;
20
+ const DEFAULT_SESSION_WARN = 3;
21
+ const SESSION_EXPIRY_LESS_THAN_MIN_ERROR = `Session timeout interval must be at least ${MIN_SESSION_TIMEOUT} minutes.`;
22
+ const SESSION_EXPIRY_GREATER_THAN_MAX_ERROR = `Session timeout interval can not exceed ${MAX_SESSION_TIMEOUT} minutes.`;
23
+ const WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR = "Session warning interval must be less than session timeout interval.";
18
24
  export {
25
+ DEFAULT_SESSION_WARN,
19
26
  HOST_WINDOW_BREAKPOINT_CHANGED,
20
27
  HOST_WINDOW_RESIZED,
28
+ MAX_SESSION_TIMEOUT,
29
+ MIN_SESSION_TIMEOUT,
30
+ SESSION_EXPIRY_GREATER_THAN_MAX_ERROR,
31
+ SESSION_EXPIRY_LESS_THAN_MIN_ERROR,
21
32
  SESSION_RENEWAL_INTERVAL,
22
33
  SESSION_TIMEOUT_INTERVAL,
23
34
  Themes,
35
+ WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR,
24
36
  constants_default as default
25
37
  };
@@ -4,6 +4,8 @@ import {
4
4
  resetLrIdentity
5
5
  } from "@elliemae/pui-analytics-so";
6
6
  const getLogRocket = () => window.emui?.logRocket;
7
+ const APP_SESSION_LINK_HEADER = "X-ICE-AppSessionLink";
8
+ const getLogRocketSessionLink = () => getLogRocket()?.sessionURL || "";
7
9
  const cleanupData = (data) => {
8
10
  const cleanedData = {};
9
11
  Object.entries(data).forEach(([key, value]) => {
@@ -22,7 +24,9 @@ const lrTrack = (event, eventEx = {}) => {
22
24
  lrTrackGuarded(event, eventEx);
23
25
  };
24
26
  export {
27
+ APP_SESSION_LINK_HEADER,
25
28
  getLogRocket,
29
+ getLogRocketSessionLink,
26
30
  lrIdentify,
27
31
  lrTrack,
28
32
  resetLrIdentity
@@ -2,15 +2,19 @@ import { getAppConfigValue } from "./app-config/config.js";
2
2
  import { SESSION_TIMEOUT_INTERVAL } from "./constants.js";
3
3
  let cachedWarnIntervalMs;
4
4
  let cachedExpiryIntervalMs;
5
- const THREE_MINUTES_IN_MS = 18e4;
6
- const calculateWaringInterval = (timeoutInterval) => timeoutInterval - THREE_MINUTES_IN_MS;
5
+ const minutesToMs = (minutes) => minutes * 6e4;
7
6
  const resetSessionTimeoutCache = () => {
8
7
  cachedWarnIntervalMs = void 0;
9
8
  cachedExpiryIntervalMs = void 0;
10
9
  };
11
- const setSessionTimeoutCacheInMS = (sessionExpiryInterval) => {
12
- cachedWarnIntervalMs = calculateWaringInterval(sessionExpiryInterval);
13
- cachedExpiryIntervalMs = sessionExpiryInterval;
10
+ const setSessionTimeoutCache = ({
11
+ sessionExpiryInterval,
12
+ sessionWarnInterval
13
+ }) => {
14
+ cachedWarnIntervalMs = minutesToMs(
15
+ sessionExpiryInterval - sessionWarnInterval
16
+ );
17
+ cachedExpiryIntervalMs = minutesToMs(sessionExpiryInterval);
14
18
  };
15
19
  const getSessionTimeoutMs = (key, fallback) => {
16
20
  const value = getAppConfigValue(key);
@@ -43,5 +47,5 @@ export {
43
47
  getSessionTimeoutMs,
44
48
  getSessionWarnIntervalMs,
45
49
  resetSessionTimeoutCache,
46
- setSessionTimeoutCacheInMS
50
+ setSessionTimeoutCache
47
51
  };
@@ -5,13 +5,21 @@ import { introspectToken } from "../api/auth/index.js";
5
5
  import { getLogger } from "./logger.js";
6
6
  import { logRecords } from "./log-records.js";
7
7
  import { endSession } from "./auth/index.js";
8
- import { SESSION_RENEWAL_INTERVAL } from "./constants.js";
8
+ import {
9
+ DEFAULT_SESSION_WARN,
10
+ MIN_SESSION_TIMEOUT,
11
+ MAX_SESSION_TIMEOUT,
12
+ SESSION_RENEWAL_INTERVAL,
13
+ SESSION_EXPIRY_GREATER_THAN_MAX_ERROR,
14
+ SESSION_EXPIRY_LESS_THAN_MIN_ERROR,
15
+ WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR
16
+ } from "./constants.js";
9
17
  import { subscribeToPageWake } from "./page-wake.js";
10
18
  import {
11
19
  getSessionWarnIntervalMs,
12
20
  getSessionExpiryIntervalMs,
13
21
  resetSessionTimeoutCache,
14
- setSessionTimeoutCacheInMS
22
+ setSessionTimeoutCache
15
23
  } from "./session-timeout-config.js";
16
24
  let lastUserActivityTimeStamp = Date.now();
17
25
  const warnListeners = [];
@@ -45,8 +53,17 @@ const resetUserIdleTime = (resetWarningModal = false) => {
45
53
  if (!enforceIdleThresholds(resetWarningModal === true)) return;
46
54
  markUserActive(resetWarningModal);
47
55
  };
48
- const setSessionTimeoutInterval = (sessionExpiryInterval) => {
49
- setSessionTimeoutCacheInMS(sessionExpiryInterval);
56
+ const setSessionTimeoutInterval = ({
57
+ sessionExpiryInterval = MIN_SESSION_TIMEOUT,
58
+ sessionWarnInterval = DEFAULT_SESSION_WARN
59
+ }) => {
60
+ if (sessionExpiryInterval < MIN_SESSION_TIMEOUT)
61
+ throw new Error(SESSION_EXPIRY_LESS_THAN_MIN_ERROR);
62
+ if (sessionExpiryInterval > MAX_SESSION_TIMEOUT)
63
+ throw new Error(SESSION_EXPIRY_GREATER_THAN_MAX_ERROR);
64
+ if (sessionWarnInterval >= sessionExpiryInterval)
65
+ throw new Error(WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR);
66
+ setSessionTimeoutCache({ sessionExpiryInterval, sessionWarnInterval });
50
67
  resetUserIdleTime(true);
51
68
  };
52
69
  const renewSession = async (explicit = false) => {
@@ -11,7 +11,7 @@ export { getAuthorizationHeader };
11
11
  * @param config - Configuration options
12
12
  * @param config.baseURL - Base URL for API requests (defaults to app config value)
13
13
  * @param config.headers - Custom headers to include in requests
14
- * @param config.sendLogRocketSessionHeader - Include LogRocket session URL in headers
14
+ * @param config.sendLogRocketSessionHeader - Attach `X-ICE-AppSessionLink` when LogRocket session URL is available (default `true`)
15
15
  * @returns Configured Axios instance
16
16
  * @example
17
17
  * ```typescript
@@ -33,7 +33,7 @@ export declare const getHTTPClient: ({ baseURL, headers, sendLogRocketSessionHea
33
33
  * @param config - Configuration options
34
34
  * @param config.baseURL - Base URL for API requests (defaults to app config value)
35
35
  * @param config.headers - Custom headers to include in requests
36
- * @param config.sendLogRocketSessionHeader - Include LogRocket session URL in headers
36
+ * @param config.sendLogRocketSessionHeader - Attach `X-ICE-AppSessionLink` when LogRocket session URL is available (default `true`)
37
37
  * @param config.rest
38
38
  * @returns Configured Axios instance with auth headers
39
39
  * @example
@@ -1,2 +1,2 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- export declare const requestInterceptor: (config: AxiosRequestConfig) => AxiosRequestConfig<any>;
1
+ import { InternalAxiosRequestConfig } from 'axios';
2
+ export declare function createRequestInterceptor(sendLogRocketSessionHeader?: boolean): (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig<any>;
@@ -14,3 +14,9 @@ export declare const Themes: {
14
14
  export declare const HOST_WINDOW_RESIZED = "HOST_WINDOW_RESIZED";
15
15
  export declare const HOST_WINDOW_BREAKPOINT_CHANGED = "HOST_WINDOW_BREAKPOINT_CHANGED";
16
16
  export declare const SESSION_RENEWAL_INTERVAL = 60000;
17
+ export declare const MIN_SESSION_TIMEOUT = 15;
18
+ export declare const MAX_SESSION_TIMEOUT = 60;
19
+ export declare const DEFAULT_SESSION_WARN = 3;
20
+ export declare const SESSION_EXPIRY_LESS_THAN_MIN_ERROR = "Session timeout interval must be at least 15 minutes.";
21
+ export declare const SESSION_EXPIRY_GREATER_THAN_MAX_ERROR = "Session timeout interval can not exceed 60 minutes.";
22
+ export declare const WARN_INTERVAL_NOT_LESS_THAN_EXPIRY_ERROR = "Session warning interval must be less than session timeout interval.";
@@ -2,6 +2,8 @@ import type LogRocket from 'logrocket';
2
2
  import { resetLrIdentity } from '@elliemae/pui-analytics-so';
3
3
  export { resetLrIdentity };
4
4
  export declare const getLogRocket: () => typeof LogRocket | undefined;
5
+ export declare const APP_SESSION_LINK_HEADER = "X-ICE-AppSessionLink";
6
+ export declare const getLogRocketSessionLink: () => string;
5
7
  /**
6
8
  * Send user identification events to LogRocket.
7
9
  * Also marks analytics-so as identified so its internal
@@ -1,6 +1,9 @@
1
1
  type SessionTimeoutKey = 'sessionTimeoutWarnInterval' | 'sessionTimeoutInterval';
2
2
  export declare const resetSessionTimeoutCache: () => void;
3
- export declare const setSessionTimeoutCacheInMS: (sessionExpiryInterval: number) => void;
3
+ export declare const setSessionTimeoutCache: ({ sessionExpiryInterval, sessionWarnInterval, }: {
4
+ sessionExpiryInterval: number;
5
+ sessionWarnInterval: number;
6
+ }) => void;
4
7
  export declare const getSessionTimeoutMs: (key: SessionTimeoutKey, fallback: number) => number;
5
8
  export declare const getSessionWarnIntervalMs: () => number;
6
9
  export declare const getSessionExpiryIntervalMs: () => number;
@@ -18,9 +18,16 @@ type LISTENER = {
18
18
  export declare const resetUserIdleTime: ResetUserIdleTimeFn;
19
19
  /**
20
20
  * Allows developers to provide a custom value for session expiry.
21
- * @param sessionExpiryInterval Custom session expiry value.
21
+ * @param {object} Customize session timeout warn and expiry intervals
22
+ * @param Customize.sessionExpiryInterval
23
+ * @param sessionExpiryInterval Custom session expiry value in minutes
24
+ * @param sessionWarnInterval Custom session warning value in minutes
25
+ * @param Customize.sessionWarnInterval
22
26
  */
23
- export declare const setSessionTimeoutInterval: (sessionExpiryInterval: number) => void;
27
+ export declare const setSessionTimeoutInterval: ({ sessionExpiryInterval, sessionWarnInterval, }: {
28
+ sessionExpiryInterval: number;
29
+ sessionWarnInterval: number;
30
+ }) => void;
24
31
  /**
25
32
  * Extends the PSS (Encompass) session via token introspection and resets idle.
26
33
  * @param {boolean} [explicit=false] - Pass true for deliberate user actions