@elliemae/pui-app-sdk 5.45.0 → 5.46.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 (211) 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 +2 -2
  48. package/build/docs/api/functions/getAuthorizationHeader/index.html +2 -2
  49. package/build/docs/api/functions/getHTTPClient/index.html +2 -2
  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/77982fdd.ab92b1fc.js +1 -0
  155. package/build/docs/assets/js/{main.eb628dfd.js → main.dffe1959.js} +2 -2
  156. package/build/docs/assets/js/{runtime~main.d66bc46a.js → runtime~main.7c35a17b.js} +1 -1
  157. package/build/docs/index.html +2 -2
  158. package/build/docs/usage-guide/index.html +2 -2
  159. package/demo/{1896.11783677.iframe.bundle.js → 1896.b2f22fed.iframe.bundle.js} +1 -1
  160. package/demo/1896.b2f22fed.iframe.bundle.js.br +0 -0
  161. package/demo/{docs/1896.11783677.iframe.bundle.js.gz → 1896.b2f22fed.iframe.bundle.js.gz} +0 -0
  162. package/demo/docs/{1896.11783677.iframe.bundle.js → 1896.b2f22fed.iframe.bundle.js} +1 -1
  163. package/demo/docs/1896.b2f22fed.iframe.bundle.js.br +0 -0
  164. package/demo/{1896.11783677.iframe.bundle.js.gz → docs/1896.b2f22fed.iframe.bundle.js.gz} +0 -0
  165. package/demo/docs/iframe.html +1 -1
  166. package/demo/docs/index.html +1 -1
  167. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js +1 -0
  168. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js.br +0 -0
  169. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js.gz +0 -0
  170. package/demo/docs/main.d1512ce2.iframe.bundle.js +5 -0
  171. package/demo/docs/main.d1512ce2.iframe.bundle.js.br +0 -0
  172. package/demo/docs/main.d1512ce2.iframe.bundle.js.gz +0 -0
  173. package/demo/docs/project.json +1 -1
  174. package/demo/iframe.html +1 -1
  175. package/demo/index.html +1 -1
  176. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js +1 -0
  177. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js.br +0 -0
  178. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js.gz +0 -0
  179. package/demo/main.d1512ce2.iframe.bundle.js +5 -0
  180. package/demo/main.d1512ce2.iframe.bundle.js.br +0 -0
  181. package/demo/main.d1512ce2.iframe.bundle.js.gz +0 -0
  182. package/demo/project.json +1 -1
  183. package/dist/cjs/package.json +1 -4
  184. package/dist/cjs/utils/constants.js +12 -0
  185. package/dist/cjs/utils/session-timeout-config.js +10 -6
  186. package/dist/cjs/utils/session.js +11 -2
  187. package/dist/esm/package.json +1 -4
  188. package/dist/esm/utils/constants.js +12 -0
  189. package/dist/esm/utils/session-timeout-config.js +10 -6
  190. package/dist/esm/utils/session.js +21 -4
  191. package/dist/types/lib/utils/constants.d.ts +6 -0
  192. package/dist/types/lib/utils/session-timeout-config.d.ts +4 -1
  193. package/dist/types/lib/utils/session.d.ts +9 -2
  194. package/dist/types/tsconfig.tsbuildinfo +1 -1
  195. package/package.json +2 -2
  196. package/build/docs/assets/js/77982fdd.daa51d7d.js +0 -1
  197. package/demo/1896.11783677.iframe.bundle.js.br +0 -0
  198. package/demo/docs/1896.11783677.iframe.bundle.js.br +0 -0
  199. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js +0 -1
  200. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js.br +0 -0
  201. package/demo/docs/main.7fe19f1fb477a0b9fcce.manager.bundle.js.gz +0 -0
  202. package/demo/docs/main.ccc2d540.iframe.bundle.js +0 -5
  203. package/demo/docs/main.ccc2d540.iframe.bundle.js.br +0 -0
  204. package/demo/docs/main.ccc2d540.iframe.bundle.js.gz +0 -0
  205. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js +0 -1
  206. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js.br +0 -0
  207. package/demo/main.7fe19f1fb477a0b9fcce.manager.bundle.js.gz +0 -0
  208. package/demo/main.ccc2d540.iframe.bundle.js +0 -5
  209. package/demo/main.ccc2d540.iframe.bundle.js.br +0 -0
  210. package/demo/main.ccc2d540.iframe.bundle.js.gz +0 -0
  211. /package/build/docs/assets/js/{main.eb628dfd.js.LICENSE.txt → main.dffe1959.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":1786491336743,"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"}}}
@@ -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.";
@@ -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) => {
@@ -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
  };
@@ -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) => {
@@ -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.";
@@ -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