@elliemae/pui-app-sdk 5.44.2 → 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 (229) 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 +3 -3
  8. package/build/docs/api/functions/Autocomplete/index.html +3 -3
  9. package/build/docs/api/functions/CheckBox/index.html +3 -3
  10. package/build/docs/api/functions/ComboBox/index.html +3 -3
  11. package/build/docs/api/functions/ComboBoxV3/index.html +3 -3
  12. package/build/docs/api/functions/ConnectForm/index.html +3 -3
  13. package/build/docs/api/functions/DateInput/index.html +3 -3
  14. package/build/docs/api/functions/DatePicker/index.html +3 -3
  15. package/build/docs/api/functions/DateRangePicker/index.html +3 -3
  16. package/build/docs/api/functions/DateTimePicker/index.html +3 -3
  17. package/build/docs/api/functions/Form/index.html +3 -3
  18. package/build/docs/api/functions/FormItemLayout/index.html +3 -3
  19. package/build/docs/api/functions/FormLayoutBlockItem/index.html +3 -3
  20. package/build/docs/api/functions/FormSubmitButton/index.html +3 -3
  21. package/build/docs/api/functions/InputMask/index.html +3 -3
  22. package/build/docs/api/functions/InputText/index.html +3 -3
  23. package/build/docs/api/functions/LargeTextBox/index.html +3 -3
  24. package/build/docs/api/functions/MaskedInputText/index.html +3 -3
  25. package/build/docs/api/functions/Page/index.html +3 -3
  26. package/build/docs/api/functions/Radio/index.html +3 -3
  27. package/build/docs/api/functions/RadioGroup/index.html +3 -3
  28. package/build/docs/api/functions/RegisterService/index.html +3 -3
  29. package/build/docs/api/functions/RenderWithStateAddOns/index.html +3 -3
  30. package/build/docs/api/functions/RequireAuth/index.html +3 -3
  31. package/build/docs/api/functions/SessionTimeout/index.html +3 -3
  32. package/build/docs/api/functions/TextBox/index.html +3 -3
  33. package/build/docs/api/functions/Toggle/index.html +3 -3
  34. package/build/docs/api/functions/authSaga/index.html +3 -3
  35. package/build/docs/api/functions/authorize/index.html +3 -3
  36. package/build/docs/api/functions/buildModuleParams/index.html +3 -3
  37. package/build/docs/api/functions/cleanup/index.html +3 -3
  38. package/build/docs/api/functions/configureStore/index.html +3 -3
  39. package/build/docs/api/functions/createGuestModule/index.html +3 -3
  40. package/build/docs/api/functions/createManager/index.html +3 -3
  41. package/build/docs/api/functions/enableReactAppForHostIntegration/index.html +3 -3
  42. package/build/docs/api/functions/fetchHostAppData/index.html +3 -3
  43. package/build/docs/api/functions/fetchUserSettings/index.html +3 -3
  44. package/build/docs/api/functions/getApiActionCreator/index.html +3 -3
  45. package/build/docs/api/functions/getAppConfig/index.html +3 -3
  46. package/build/docs/api/functions/getAppConfigValue/index.html +3 -3
  47. package/build/docs/api/functions/getAuthHTTPClient/index.html +3 -3
  48. package/build/docs/api/functions/getAuthorizationHeader/index.html +3 -3
  49. package/build/docs/api/functions/getHTTPClient/index.html +3 -3
  50. package/build/docs/api/functions/getHostAppDataByKey/index.html +3 -3
  51. package/build/docs/api/functions/getLogger/index.html +3 -3
  52. package/build/docs/api/functions/getMicroFrontEndAppConfig/index.html +3 -3
  53. package/build/docs/api/functions/getNavigationLinks/index.html +3 -3
  54. package/build/docs/api/functions/getRedirectUrl/index.html +3 -3
  55. package/build/docs/api/functions/getSelectField/index.html +3 -3
  56. package/build/docs/api/functions/getStore/index.html +3 -3
  57. package/build/docs/api/functions/initServiceWorker/index.html +3 -3
  58. package/build/docs/api/functions/isCIBuild/index.html +3 -3
  59. package/build/docs/api/functions/isProd/index.html +3 -3
  60. package/build/docs/api/functions/isUserAuthorized/index.html +3 -3
  61. package/build/docs/api/functions/listenStorageEvents/index.html +3 -3
  62. package/build/docs/api/functions/loadAppConfig/index.html +3 -3
  63. package/build/docs/api/functions/loadable/index.html +3 -3
  64. package/build/docs/api/functions/login/index.html +3 -3
  65. package/build/docs/api/functions/notifyGuestUnloadComplete/index.html +3 -3
  66. package/build/docs/api/functions/onAuthorizationFailure/index.html +3 -3
  67. package/build/docs/api/functions/onGuestUnloadStart/index.html +3 -3
  68. package/build/docs/api/functions/redactPii/index.html +3 -3
  69. package/build/docs/api/functions/removeDoubleSlash/index.html +3 -3
  70. package/build/docs/api/functions/removeStorageEvents/index.html +3 -3
  71. package/build/docs/api/functions/render/index.html +4 -4
  72. package/build/docs/api/functions/renderHook/index.html +3 -3
  73. package/build/docs/api/functions/renderWithHostData/index.html +3 -3
  74. package/build/docs/api/functions/renderWithRedux/index.html +4 -4
  75. package/build/docs/api/functions/renderWithRouter/index.html +3 -3
  76. package/build/docs/api/functions/renderWithRouterRedux/index.html +3 -3
  77. package/build/docs/api/functions/sdkBaseQuery/index.html +3 -3
  78. package/build/docs/api/functions/sendBAEvent/index.html +3 -3
  79. package/build/docs/api/functions/sendMessageToHost/index.html +3 -3
  80. package/build/docs/api/functions/setAppConfig/index.html +3 -3
  81. package/build/docs/api/functions/setAppConfigValue/index.html +3 -3
  82. package/build/docs/api/functions/setHostAppData/index.html +3 -3
  83. package/build/docs/api/functions/setLoginParams/index.html +4 -4
  84. package/build/docs/api/functions/setSessionTimeoutInterval/index.html +27 -0
  85. package/build/docs/api/functions/subscribeToResetSession/index.html +4 -4
  86. package/build/docs/api/functions/subscribeToSessionExpiry/index.html +3 -3
  87. package/build/docs/api/functions/subscribeToSessionExpiryWarning/index.html +3 -3
  88. package/build/docs/api/functions/trackActivity/index.html +3 -3
  89. package/build/docs/api/functions/useAppDispatch/index.html +3 -3
  90. package/build/docs/api/functions/useAppMiddleware/index.html +3 -3
  91. package/build/docs/api/functions/useInjectQuery/index.html +3 -3
  92. package/build/docs/api/functions/useInjectReducer/index.html +3 -3
  93. package/build/docs/api/functions/useInjectSaga/index.html +3 -3
  94. package/build/docs/api/functions/useInjectSideEffect/index.html +3 -3
  95. package/build/docs/api/functions/useMediaQueryList/index.html +3 -3
  96. package/build/docs/api/functions/useStateSelector/index.html +3 -3
  97. package/build/docs/api/functions/useStateSelectorShallow/index.html +3 -3
  98. package/build/docs/api/functions/waitFor/index.html +3 -3
  99. package/build/docs/api/functions/waitForElementToBeRemoved/index.html +3 -3
  100. package/build/docs/api/functions/withAppDecorator/index.html +3 -3
  101. package/build/docs/api/index.html +3 -3
  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/{2856.0700bd2f.js → 2856.5f4708fe.js} +1 -1
  155. package/build/docs/assets/js/{386.60c604cf.js → 386.1ca60f37.js} +2 -2
  156. package/build/docs/assets/js/{3995.097eacab.js → 3995.471cb67b.js} +1 -1
  157. package/build/docs/assets/js/{5e8c322a.c3cc240b.js → 5e8c322a.cd8f81c9.js} +1 -1
  158. package/build/docs/assets/js/{6286.44ea15e4.js → 6286.f26d2403.js} +1 -1
  159. package/build/docs/assets/js/{6779.205be7c8.js → 6779.d05f07c7.js} +1 -1
  160. package/build/docs/assets/js/77982fdd.ab92b1fc.js +1 -0
  161. package/build/docs/assets/js/822e0178.bea29480.js +1 -0
  162. package/build/docs/assets/js/a48fd09c.e36a2228.js +1 -0
  163. package/build/docs/assets/js/fed4ae4f.b3dfb5da.js +1 -0
  164. package/build/docs/assets/js/main.dffe1959.js +2 -0
  165. package/build/docs/assets/js/runtime~main.7c35a17b.js +1 -0
  166. package/build/docs/index.html +2 -2
  167. package/build/docs/sitemap.xml +1 -1
  168. package/build/docs/usage-guide/index.html +2 -2
  169. package/demo/{1896.619ce620.iframe.bundle.js → 1896.b2f22fed.iframe.bundle.js} +1 -1
  170. package/demo/1896.b2f22fed.iframe.bundle.js.br +0 -0
  171. package/demo/{docs/1896.619ce620.iframe.bundle.js.gz → 1896.b2f22fed.iframe.bundle.js.gz} +0 -0
  172. package/demo/docs/{1896.619ce620.iframe.bundle.js → 1896.b2f22fed.iframe.bundle.js} +1 -1
  173. package/demo/docs/1896.b2f22fed.iframe.bundle.js.br +0 -0
  174. package/demo/{1896.619ce620.iframe.bundle.js.gz → docs/1896.b2f22fed.iframe.bundle.js.gz} +0 -0
  175. package/demo/docs/iframe.html +1 -1
  176. package/demo/docs/index.html +1 -1
  177. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js +1 -0
  178. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js.br +0 -0
  179. package/demo/docs/main.4043d77f8baa6730e9c7.manager.bundle.js.gz +0 -0
  180. package/demo/docs/main.d1512ce2.iframe.bundle.js +5 -0
  181. package/demo/docs/main.d1512ce2.iframe.bundle.js.br +0 -0
  182. package/demo/docs/main.d1512ce2.iframe.bundle.js.gz +0 -0
  183. package/demo/docs/project.json +1 -1
  184. package/demo/iframe.html +1 -1
  185. package/demo/index.html +1 -1
  186. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js +1 -0
  187. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js.br +0 -0
  188. package/demo/main.4043d77f8baa6730e9c7.manager.bundle.js.gz +0 -0
  189. package/demo/main.d1512ce2.iframe.bundle.js +5 -0
  190. package/demo/main.d1512ce2.iframe.bundle.js.br +0 -0
  191. package/demo/main.d1512ce2.iframe.bundle.js.gz +0 -0
  192. package/demo/project.json +1 -1
  193. package/dist/cjs/index.js +1 -0
  194. package/dist/cjs/package.json +1 -4
  195. package/dist/cjs/utils/constants.js +12 -0
  196. package/dist/cjs/utils/session-timeout-config.js +12 -1
  197. package/dist/cjs/utils/session.js +14 -0
  198. package/dist/esm/index.js +2 -0
  199. package/dist/esm/package.json +1 -4
  200. package/dist/esm/utils/constants.js +12 -0
  201. package/dist/esm/utils/session-timeout-config.js +12 -1
  202. package/dist/esm/utils/session.js +25 -2
  203. package/dist/types/lib/index.d.ts +1 -1
  204. package/dist/types/lib/utils/constants.d.ts +6 -0
  205. package/dist/types/lib/utils/session-timeout-config.d.ts +4 -0
  206. package/dist/types/lib/utils/session.d.ts +12 -0
  207. package/dist/types/tsconfig.tsbuildinfo +1 -1
  208. package/package.json +2 -2
  209. package/build/docs/assets/js/822e0178.dfd661b8.js +0 -1
  210. package/build/docs/assets/js/a48fd09c.49a10fd0.js +0 -1
  211. package/build/docs/assets/js/fed4ae4f.4cbcd19c.js +0 -1
  212. package/build/docs/assets/js/main.1bebbb71.js +0 -2
  213. package/build/docs/assets/js/runtime~main.995cc93a.js +0 -1
  214. package/demo/1896.619ce620.iframe.bundle.js.br +0 -0
  215. package/demo/docs/1896.619ce620.iframe.bundle.js.br +0 -0
  216. package/demo/docs/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js +0 -1
  217. package/demo/docs/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js.br +0 -0
  218. package/demo/docs/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js.gz +0 -0
  219. package/demo/docs/main.b368484e.iframe.bundle.js +0 -5
  220. package/demo/docs/main.b368484e.iframe.bundle.js.br +0 -0
  221. package/demo/docs/main.b368484e.iframe.bundle.js.gz +0 -0
  222. package/demo/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js +0 -1
  223. package/demo/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js.br +0 -0
  224. package/demo/main.a6b1ae4b10ba95f2bb8e.manager.bundle.js.gz +0 -0
  225. package/demo/main.b368484e.iframe.bundle.js +0 -5
  226. package/demo/main.b368484e.iframe.bundle.js.br +0 -0
  227. package/demo/main.b368484e.iframe.bundle.js.gz +0 -0
  228. /package/build/docs/assets/js/{386.60c604cf.js.LICENSE.txt → 386.1ca60f37.js.LICENSE.txt} +0 -0
  229. /package/build/docs/assets/js/{main.1bebbb71.js.LICENSE.txt → main.dffe1959.js.LICENSE.txt} +0 -0
package/demo/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1784931104289,"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"}}}
package/dist/cjs/index.js CHANGED
@@ -137,6 +137,7 @@ __export(index_exports, {
137
137
  setAppConfigValue: () => import_config.setAppConfigValue,
138
138
  setHostAppData: () => import_store2.setHostAppData,
139
139
  setLoginParams: () => import_loginParams.setLoginParams,
140
+ setSessionTimeoutInterval: () => import_session.setSessionTimeoutInterval,
140
141
  startSideEffect: () => import_listenerMiddleware.startSideEffect,
141
142
  subscribeToResetSession: () => import_session.subscribeToResetSession,
142
143
  subscribeToSessionExpiry: () => import_session.subscribeToSessionExpiry,
@@ -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.";
@@ -21,17 +21,28 @@ __export(session_timeout_config_exports, {
21
21
  getSessionExpiryIntervalMs: () => getSessionExpiryIntervalMs,
22
22
  getSessionTimeoutMs: () => getSessionTimeoutMs,
23
23
  getSessionWarnIntervalMs: () => getSessionWarnIntervalMs,
24
- resetSessionTimeoutCache: () => resetSessionTimeoutCache
24
+ resetSessionTimeoutCache: () => resetSessionTimeoutCache,
25
+ setSessionTimeoutCache: () => setSessionTimeoutCache
25
26
  });
26
27
  module.exports = __toCommonJS(session_timeout_config_exports);
27
28
  var import_config = require("./app-config/config.js");
28
29
  var import_constants = require("./constants.js");
29
30
  let cachedWarnIntervalMs;
30
31
  let cachedExpiryIntervalMs;
32
+ const minutesToMs = (minutes) => minutes * 6e4;
31
33
  const resetSessionTimeoutCache = () => {
32
34
  cachedWarnIntervalMs = void 0;
33
35
  cachedExpiryIntervalMs = void 0;
34
36
  };
37
+ const setSessionTimeoutCache = ({
38
+ sessionExpiryInterval,
39
+ sessionWarnInterval
40
+ }) => {
41
+ cachedWarnIntervalMs = minutesToMs(
42
+ sessionExpiryInterval - sessionWarnInterval
43
+ );
44
+ cachedExpiryIntervalMs = minutesToMs(sessionExpiryInterval);
45
+ };
35
46
  const getSessionTimeoutMs = (key, fallback) => {
36
47
  const value = (0, import_config.getAppConfigValue)(key);
37
48
  if (value == null || value === "") return fallback;
@@ -22,6 +22,7 @@ __export(session_exports, {
22
22
  initSessionMonitoring: () => initSessionMonitoring,
23
23
  renewSession: () => renewSession,
24
24
  resetUserIdleTime: () => resetUserIdleTime,
25
+ setSessionTimeoutInterval: () => setSessionTimeoutInterval,
25
26
  stopSessionMonitoring: () => stopSessionMonitoring,
26
27
  subscribeToResetSession: () => subscribeToResetSession,
27
28
  subscribeToSessionExpiry: () => subscribeToSessionExpiry,
@@ -71,6 +72,19 @@ const resetUserIdleTime = (resetWarningModal = false) => {
71
72
  if (!enforceIdleThresholds(resetWarningModal === true)) return;
72
73
  markUserActive(resetWarningModal);
73
74
  };
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 });
86
+ resetUserIdleTime(true);
87
+ };
74
88
  const renewSession = async (explicit = false) => {
75
89
  if (!enforceIdleThresholds(explicit === true)) return;
76
90
  const loginParams = (0, import_loginParams.getLoginParams)();
package/dist/esm/index.js CHANGED
@@ -55,6 +55,7 @@ import {
55
55
  subscribeToSessionExpiryWarning,
56
56
  subscribeToSessionExpiry,
57
57
  subscribeToResetSession,
58
+ setSessionTimeoutInterval,
58
59
  resetUserIdleTime,
59
60
  trackActivity
60
61
  } from "./utils/session.js";
@@ -261,6 +262,7 @@ export {
261
262
  setAppConfigValue,
262
263
  setHostAppData,
263
264
  setLoginParams,
265
+ setSessionTimeoutInterval,
264
266
  startSideEffect,
265
267
  subscribeToResetSession,
266
268
  subscribeToSessionExpiry,
@@ -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,10 +2,20 @@ 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 minutesToMs = (minutes) => minutes * 6e4;
5
6
  const resetSessionTimeoutCache = () => {
6
7
  cachedWarnIntervalMs = void 0;
7
8
  cachedExpiryIntervalMs = void 0;
8
9
  };
10
+ const setSessionTimeoutCache = ({
11
+ sessionExpiryInterval,
12
+ sessionWarnInterval
13
+ }) => {
14
+ cachedWarnIntervalMs = minutesToMs(
15
+ sessionExpiryInterval - sessionWarnInterval
16
+ );
17
+ cachedExpiryIntervalMs = minutesToMs(sessionExpiryInterval);
18
+ };
9
19
  const getSessionTimeoutMs = (key, fallback) => {
10
20
  const value = getAppConfigValue(key);
11
21
  if (value == null || value === "") return fallback;
@@ -36,5 +46,6 @@ export {
36
46
  getSessionExpiryIntervalMs,
37
47
  getSessionTimeoutMs,
38
48
  getSessionWarnIntervalMs,
39
- resetSessionTimeoutCache
49
+ resetSessionTimeoutCache,
50
+ setSessionTimeoutCache
40
51
  };
@@ -5,12 +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
- resetSessionTimeoutCache
21
+ resetSessionTimeoutCache,
22
+ setSessionTimeoutCache
14
23
  } from "./session-timeout-config.js";
15
24
  let lastUserActivityTimeStamp = Date.now();
16
25
  const warnListeners = [];
@@ -44,6 +53,19 @@ const resetUserIdleTime = (resetWarningModal = false) => {
44
53
  if (!enforceIdleThresholds(resetWarningModal === true)) return;
45
54
  markUserActive(resetWarningModal);
46
55
  };
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 });
67
+ resetUserIdleTime(true);
68
+ };
47
69
  const renewSession = async (explicit = false) => {
48
70
  if (!enforceIdleThresholds(explicit === true)) return;
49
71
  const loginParams = getLoginParams();
@@ -168,6 +190,7 @@ export {
168
190
  initSessionMonitoring,
169
191
  renewSession,
170
192
  resetUserIdleTime,
193
+ setSessionTimeoutInterval,
171
194
  stopSessionMonitoring,
172
195
  subscribeToResetSession,
173
196
  subscribeToSessionExpiry,
@@ -26,7 +26,7 @@ export { ACTIONS as NavigationPromptActions } from './data/navigation-prompt/act
26
26
  export { loadable } from './view/loadable/index.js';
27
27
  export { WaitMessage } from './view/wait-message/index.js';
28
28
  export { SessionTimeout } from './view/session-timeout/index.js';
29
- export { subscribeToSessionExpiryWarning, subscribeToSessionExpiry, subscribeToResetSession, resetUserIdleTime, trackActivity, } from './utils/session.js';
29
+ export { subscribeToSessionExpiryWarning, subscribeToSessionExpiry, subscribeToResetSession, setSessionTimeoutInterval, resetUserIdleTime, trackActivity, } from './utils/session.js';
30
30
  export { waitMessage as waitMessageAction } from './data/wait-message/actions.js';
31
31
  export { initServiceWorker } from './utils/service-worker.js';
32
32
  export { CMicroAppGuest, CMicroAppGuest as CMicroApp, } from './utils/micro-frontend/guest.js';
@@ -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,5 +1,9 @@
1
1
  type SessionTimeoutKey = 'sessionTimeoutWarnInterval' | 'sessionTimeoutInterval';
2
2
  export declare const resetSessionTimeoutCache: () => void;
3
+ export declare const setSessionTimeoutCache: ({ sessionExpiryInterval, sessionWarnInterval, }: {
4
+ sessionExpiryInterval: number;
5
+ sessionWarnInterval: number;
6
+ }) => void;
3
7
  export declare const getSessionTimeoutMs: (key: SessionTimeoutKey, fallback: number) => number;
4
8
  export declare const getSessionWarnIntervalMs: () => number;
5
9
  export declare const getSessionExpiryIntervalMs: () => number;
@@ -16,6 +16,18 @@ type LISTENER = {
16
16
  * listeners so the warning modal can close. Only for explicit user actions.
17
17
  */
18
18
  export declare const resetUserIdleTime: ResetUserIdleTimeFn;
19
+ /**
20
+ * Allows developers to provide a custom value for session expiry.
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
26
+ */
27
+ export declare const setSessionTimeoutInterval: ({ sessionExpiryInterval, sessionWarnInterval, }: {
28
+ sessionExpiryInterval: number;
29
+ sessionWarnInterval: number;
30
+ }) => void;
19
31
  /**
20
32
  * Extends the PSS (Encompass) session via token introspection and resets idle.
21
33
  * @param {boolean} [explicit=false] - Pass true for deliberate user actions