@elliemae/pui-app-sdk 3.0.0-beta.27 → 3.0.0-beta.28

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 (230) hide show
  1. package/dist/cjs/analytics/appdynamics.js +15 -1
  2. package/dist/cjs/analytics/index.js +15 -1
  3. package/dist/cjs/analytics/web-analytics.js +15 -1
  4. package/dist/cjs/communication/http-client/index.js +42 -9
  5. package/dist/cjs/data/reducers.js +17 -4
  6. package/dist/cjs/package.json +7 -1
  7. package/dist/cjs/sideeffect/auth/index.js +21 -6
  8. package/dist/cjs/sideeffect/error-toast/index.js +19 -3
  9. package/dist/cjs/sideeffect/wait-message/index.js +21 -6
  10. package/dist/cjs/utils/auth/index.js +21 -6
  11. package/dist/cjs/utils/service-worker.js +2 -3
  12. package/dist/cjs/utils/storybook/theme.js +39 -9
  13. package/dist/cjs/utils/testing/index.js +15 -1
  14. package/dist/cjs/utils/testing/render-with-redux.js +20 -4
  15. package/dist/cjs/utils/testing/render-with-router-redux.js +22 -6
  16. package/dist/cjs/utils/testing/render-with-router.js +19 -3
  17. package/dist/cjs/utils/testing/render-with-state-addons.js +39 -10
  18. package/dist/cjs/view/app-root/index.js +15 -5
  19. package/dist/cjs/view/app-router.js +33 -4
  20. package/dist/cjs/view/error-boundary/index.js +19 -3
  21. package/dist/cjs/view/error-toast/index.js +19 -9
  22. package/dist/cjs/view/fetch-host-app-data/store.js +15 -1
  23. package/dist/cjs/view/fields/check-box/index.js +42 -9
  24. package/dist/cjs/view/fields/combo-box/index.js +54 -18
  25. package/dist/cjs/view/fields/connect-form.js +15 -3
  26. package/dist/cjs/view/fields/date-input/index.js +44 -15
  27. package/dist/cjs/view/fields/date-picker/index.js +44 -15
  28. package/dist/cjs/view/fields/form-item-layout/index.js +41 -13
  29. package/dist/cjs/view/fields/form-layout-block-item/index.js +46 -16
  30. package/dist/cjs/view/fields/input-mask/index.js +43 -15
  31. package/dist/cjs/view/fields/large-text-box/index.js +44 -15
  32. package/dist/cjs/view/fields/radio/index.js +53 -17
  33. package/dist/cjs/view/fields/radio-group/index.js +43 -10
  34. package/dist/cjs/view/fields/text-box/index.js +44 -15
  35. package/dist/cjs/view/form/index.js +17 -6
  36. package/dist/cjs/view/form/submit-button/index.js +33 -4
  37. package/dist/cjs/view/loadable/index.js +15 -3
  38. package/dist/cjs/view/micro-app/app-factory/index.js +18 -1
  39. package/dist/cjs/view/micro-app/use-app-will-render.js +19 -3
  40. package/dist/cjs/view/micro-iframe-app/app.js +39 -10
  41. package/dist/cjs/view/micro-iframe-app/iframe/index.js +21 -4
  42. package/dist/cjs/view/micro-iframe-app/index.js +33 -4
  43. package/dist/cjs/view/modals/wait-message/index.js +41 -9
  44. package/dist/cjs/view/visually-hidden/index.js +17 -4
  45. package/dist/esm/analytics/appdynamics.js +34 -0
  46. package/dist/esm/analytics/index.js +43 -0
  47. package/dist/{es → esm}/analytics/page-view-event.js +0 -0
  48. package/dist/{es → esm}/analytics/user-session-event.js +0 -0
  49. package/dist/{es → esm}/analytics/user-wait-event.js +0 -0
  50. package/dist/esm/analytics/web-analytics.js +30 -0
  51. package/dist/{es → esm}/api/auth/index.js +0 -0
  52. package/dist/{es → esm}/api/helpers.js +0 -0
  53. package/dist/{es → esm}/api/users/index.js +0 -0
  54. package/dist/{es → esm}/api/users/users.json +0 -0
  55. package/dist/{es → esm}/app.config.json +0 -0
  56. package/dist/esm/communication/http-client/index.js +70 -0
  57. package/dist/{es → esm}/communication/http-client/request-interceptor.js +0 -0
  58. package/dist/{es → esm}/communication/http-client/response-interceptor.js +0 -0
  59. package/dist/{es → esm}/communication/http-client/retry-axios.js +0 -0
  60. package/dist/{es → esm}/communication/http-client/retry.js +0 -0
  61. package/dist/{es → esm}/data/auth/actions.js +0 -0
  62. package/dist/{es → esm}/data/auth/reducer.js +0 -0
  63. package/dist/{es → esm}/data/breakpoint/index.js +0 -0
  64. package/dist/{es → esm}/data/error/index.js +0 -0
  65. package/dist/{es → esm}/data/index.js +0 -0
  66. package/dist/{es → esm}/data/live-message/index.js +0 -0
  67. package/dist/{es → esm}/data/logout/actions.js +0 -0
  68. package/dist/{es → esm}/data/navigation-prompt/actions.js +0 -0
  69. package/dist/{es → esm}/data/react-redux.js +0 -0
  70. package/dist/esm/data/reducers.js +33 -0
  71. package/dist/{es → esm}/data/saga.js +0 -0
  72. package/dist/{es → esm}/data/store.js +0 -0
  73. package/dist/{es → esm}/data/wait-message/actions.js +0 -0
  74. package/dist/{es → esm}/data/wait-message/reducer.js +0 -0
  75. package/dist/{es → esm}/data/webpack-hmr.js +0 -0
  76. package/dist/{es → esm}/index.js +0 -0
  77. package/dist/{es → esm}/index.pug +0 -0
  78. package/dist/{es → esm}/micro-frontend.js +0 -0
  79. package/dist/esm/package.json +7 -0
  80. package/dist/esm/sideeffect/auth/index.js +64 -0
  81. package/dist/esm/sideeffect/error-toast/index.js +43 -0
  82. package/dist/esm/sideeffect/wait-message/index.js +55 -0
  83. package/dist/{es → esm}/typings/custom.d.js +0 -0
  84. package/dist/{es → esm}/typings/elliemae.d.js +0 -0
  85. package/dist/{es → esm}/typings/styled.d.js +0 -0
  86. package/dist/{es → esm}/typings/thirdparty.d.js +0 -0
  87. package/dist/{es → esm}/utils/app-config/config.js +0 -0
  88. package/dist/{es → esm}/utils/app-config/index.js +0 -0
  89. package/dist/{es → esm}/utils/app-host-integration/react.js +0 -0
  90. package/dist/{es → esm}/utils/auth/helper.js +0 -0
  91. package/dist/{es → esm}/utils/auth/index.js +23 -6
  92. package/dist/{es → esm}/utils/await.js +0 -0
  93. package/dist/{es → esm}/utils/constants.js +0 -0
  94. package/dist/{es → esm}/utils/font-size.js +0 -0
  95. package/dist/{es → esm}/utils/guest-with-service.js +0 -0
  96. package/dist/{es → esm}/utils/helpers.js +0 -0
  97. package/dist/{es → esm}/utils/history.js +0 -0
  98. package/dist/{es → esm}/utils/log-records.js +0 -0
  99. package/dist/{es → esm}/utils/micro-frontend/console-logger.js +0 -0
  100. package/dist/{es → esm}/utils/micro-frontend/guest.js +0 -0
  101. package/dist/{es → esm}/utils/micro-frontend/host.js +0 -0
  102. package/dist/{es → esm}/utils/micro-frontend/index.js +0 -0
  103. package/dist/{es → esm}/utils/micro-frontend/types.js +0 -0
  104. package/dist/{es → esm}/utils/redact-pii.js +0 -0
  105. package/dist/{es → esm}/utils/service-worker.js +2 -3
  106. package/dist/{es → esm}/utils/session.js +0 -0
  107. package/dist/{es → esm}/utils/storybook/manager.js +0 -0
  108. package/dist/{es → esm}/utils/storybook/preview.js +0 -0
  109. package/dist/esm/utils/storybook/theme.js +45 -0
  110. package/dist/esm/utils/testing/index.js +38 -0
  111. package/dist/esm/utils/testing/render-with-redux.js +35 -0
  112. package/dist/esm/utils/testing/render-with-router-redux.js +41 -0
  113. package/dist/esm/utils/testing/render-with-router.js +37 -0
  114. package/dist/esm/utils/testing/render-with-state-addons.js +69 -0
  115. package/dist/{es → esm}/utils/types.js +0 -0
  116. package/dist/{es → esm}/utils/url.js +0 -0
  117. package/dist/{es → esm}/utils/web-storage.js +0 -0
  118. package/dist/{es → esm}/utils/window.js +0 -0
  119. package/dist/{es → esm}/view/app-root/hosted-app.js +0 -0
  120. package/dist/{es → esm}/view/app-root/index.js +17 -5
  121. package/dist/{es → esm}/view/app-root/stand-alone-app.js +0 -0
  122. package/dist/{es → esm}/view/app-root/style.js +0 -0
  123. package/dist/esm/view/app-router.js +50 -0
  124. package/dist/{es → esm}/view/breakpoint/use-breakpoint.js +0 -0
  125. package/dist/{es → esm}/view/breakpoint/use-media-query-list.js +0 -0
  126. package/dist/{es → esm}/view/error-boundary/default-error-template.js +0 -0
  127. package/dist/esm/view/error-boundary/index.js +54 -0
  128. package/dist/esm/view/error-toast/index.js +42 -0
  129. package/dist/{es → esm}/view/fetch-host-app-data/index.js +0 -0
  130. package/dist/esm/view/fetch-host-app-data/store.js +28 -0
  131. package/dist/esm/view/fields/check-box/index.js +52 -0
  132. package/dist/esm/view/fields/combo-box/index.js +64 -0
  133. package/dist/esm/view/fields/connect-form.js +24 -0
  134. package/dist/esm/view/fields/date-input/index.js +53 -0
  135. package/dist/esm/view/fields/date-picker/index.js +53 -0
  136. package/dist/esm/view/fields/form-item-layout/index.js +50 -0
  137. package/dist/esm/view/fields/form-layout-block-item/index.js +57 -0
  138. package/dist/esm/view/fields/input-mask/index.js +59 -0
  139. package/dist/esm/view/fields/large-text-box/index.js +53 -0
  140. package/dist/esm/view/fields/radio/index.js +62 -0
  141. package/dist/esm/view/fields/radio-group/index.js +52 -0
  142. package/dist/esm/view/fields/text-box/index.js +53 -0
  143. package/dist/{es → esm}/view/fields/watch-value.js +0 -0
  144. package/dist/esm/view/form/index.js +46 -0
  145. package/dist/{es → esm}/view/form/personal-info-section.js +0 -0
  146. package/dist/esm/view/form/submit-button/index.js +48 -0
  147. package/dist/{es → esm}/view/guest-unload-handlers/index.js +0 -0
  148. package/dist/{es → esm}/view/host-binding-events/index.js +0 -0
  149. package/dist/{es → esm}/view/intro.stories.mdx +0 -0
  150. package/dist/{es → esm}/view/live-message/index.js +0 -0
  151. package/dist/esm/view/loadable/index.js +28 -0
  152. package/dist/{es → esm}/view/login/index.js +0 -0
  153. package/dist/{es → esm}/view/message-to-host-app/index.js +0 -0
  154. package/dist/{es → esm}/view/micro-app/app-factory/index.js +20 -1
  155. package/dist/{es → esm}/view/micro-app/const.js +0 -0
  156. package/dist/{es → esm}/view/micro-app/index.js +0 -0
  157. package/dist/{es → esm}/view/micro-app/resources/manifest.js +0 -0
  158. package/dist/{es → esm}/view/micro-app/resources/script.js +0 -0
  159. package/dist/{es → esm}/view/micro-app/resources/style.js +0 -0
  160. package/dist/{es → esm}/view/micro-app/types.js +0 -0
  161. package/dist/{es → esm}/view/micro-app/use-app-will-render.js +21 -3
  162. package/dist/{es → esm}/view/micro-app/utils.js +0 -0
  163. package/dist/esm/view/micro-iframe-app/app.js +58 -0
  164. package/dist/{es → esm}/view/micro-iframe-app/iframe/const.js +0 -0
  165. package/dist/{es → esm}/view/micro-iframe-app/iframe/index.html +0 -0
  166. package/dist/esm/view/micro-iframe-app/iframe/index.js +54 -0
  167. package/dist/esm/view/micro-iframe-app/index.js +57 -0
  168. package/dist/{es → esm}/view/micro-iframe-app/types.js +0 -0
  169. package/dist/{es → esm}/view/micro-iframe-app/use-frame-loaded.js +0 -0
  170. package/dist/{es → esm}/view/modals/error/index.js +0 -0
  171. package/dist/{es → esm}/view/modals/navigation-prompt/index.js +0 -0
  172. package/dist/{es → esm}/view/modals/session-expiry/customHooks.js +0 -0
  173. package/dist/{es → esm}/view/modals/session-expiry/index.js +0 -0
  174. package/dist/esm/view/modals/wait-message/index.js +69 -0
  175. package/dist/{es → esm}/view/modals/wait-message/use-html-wait-message.js +0 -0
  176. package/dist/{es → esm}/view/modals/wait-message/wait-message-launcher.js +0 -0
  177. package/dist/{es → esm}/view/page.js +0 -0
  178. package/dist/{es → esm}/view/render-with-delay/index.js +0 -0
  179. package/dist/{es → esm}/view/render-with-host-data/index.js +0 -0
  180. package/dist/{es → esm}/view/require-auth.js +0 -0
  181. package/dist/{es → esm}/view/session-timeout/index.js +0 -0
  182. package/dist/{es → esm}/view/storybook/decorator.js +0 -0
  183. package/dist/{es → esm}/view/use-previous.js +0 -0
  184. package/dist/{es → esm}/view/use-window-size-change.js +0 -0
  185. package/dist/esm/view/visually-hidden/index.js +37 -0
  186. package/dist/types/data/store.d.ts +2 -2
  187. package/dist/types/utils/testing/render-with-redux.d.ts +3 -3
  188. package/dist/types/utils/testing/render-with-router-redux.d.ts +3 -3
  189. package/dist/types/utils/testing/render-with-router.d.ts +1 -1
  190. package/dist/types/view/fields/input-mask/index.d.ts +1 -1
  191. package/package.json +39 -39
  192. package/dist/es/analytics/appdynamics.js +0 -18
  193. package/dist/es/analytics/index.js +0 -27
  194. package/dist/es/analytics/web-analytics.js +0 -14
  195. package/dist/es/communication/http-client/index.js +0 -35
  196. package/dist/es/data/reducers.js +0 -18
  197. package/dist/es/package.json +0 -1
  198. package/dist/es/sideeffect/auth/index.js +0 -47
  199. package/dist/es/sideeffect/error-toast/index.js +0 -25
  200. package/dist/es/sideeffect/wait-message/index.js +0 -38
  201. package/dist/es/utils/storybook/theme.js +0 -13
  202. package/dist/es/utils/testing/index.js +0 -22
  203. package/dist/es/utils/testing/render-with-redux.js +0 -17
  204. package/dist/es/utils/testing/render-with-router-redux.js +0 -23
  205. package/dist/es/utils/testing/render-with-router.js +0 -19
  206. package/dist/es/utils/testing/render-with-state-addons.js +0 -38
  207. package/dist/es/view/app-router.js +0 -19
  208. package/dist/es/view/error-boundary/index.js +0 -36
  209. package/dist/es/view/error-toast/index.js +0 -30
  210. package/dist/es/view/fetch-host-app-data/store.js +0 -12
  211. package/dist/es/view/fields/check-box/index.js +0 -17
  212. package/dist/es/view/fields/combo-box/index.js +0 -26
  213. package/dist/es/view/fields/connect-form.js +0 -10
  214. package/dist/es/view/fields/date-input/index.js +0 -22
  215. package/dist/es/view/fields/date-picker/index.js +0 -22
  216. package/dist/es/view/fields/form-item-layout/index.js +0 -20
  217. package/dist/es/view/fields/form-layout-block-item/index.js +0 -25
  218. package/dist/es/view/fields/input-mask/index.js +0 -29
  219. package/dist/es/view/fields/large-text-box/index.js +0 -22
  220. package/dist/es/view/fields/radio/index.js +0 -24
  221. package/dist/es/view/fields/radio-group/index.js +0 -17
  222. package/dist/es/view/fields/text-box/index.js +0 -22
  223. package/dist/es/view/form/index.js +0 -33
  224. package/dist/es/view/form/submit-button/index.js +0 -17
  225. package/dist/es/view/loadable/index.js +0 -14
  226. package/dist/es/view/micro-iframe-app/app.js +0 -27
  227. package/dist/es/view/micro-iframe-app/iframe/index.js +0 -35
  228. package/dist/es/view/micro-iframe-app/index.js +0 -26
  229. package/dist/es/view/modals/wait-message/index.js +0 -35
  230. package/dist/es/view/visually-hidden/index.js +0 -22
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import {
3
- DefaultErrorTemplate
4
- } from "./default-error-template.js";
5
- import { getLogger } from "../../utils/micro-frontend/index.js";
6
- import { logRecords } from "../../utils/log-records.js";
7
- class ErrorBoundary extends React.Component {
8
- constructor(props) {
9
- super(props);
10
- this.state = { error: null, errorInfo: null };
11
- }
12
- componentDidCatch(error, errorInfo) {
13
- this.setState({
14
- error,
15
- errorInfo
16
- });
17
- const logger = getLogger();
18
- if (logger)
19
- logger.error({
20
- ...logRecords.UNHANDLED_ERROR,
21
- exception: error
22
- });
23
- }
24
- render() {
25
- const { children, errorTemplate } = this.props;
26
- const ErrorTemplate = errorTemplate || DefaultErrorTemplate;
27
- const { error, errorInfo } = this.state;
28
- return errorInfo ? /* @__PURE__ */ React.createElement(ErrorTemplate, {
29
- error,
30
- errorInfo
31
- }) : children;
32
- }
33
- }
34
- export {
35
- ErrorBoundary
36
- };
@@ -1,30 +0,0 @@
1
- import * as React from "react";
2
- import { useEffect, memo } from "react";
3
- import { ToastPosition, ToastType, DSToast, toast } from "@elliemae/ds-toast";
4
- import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
5
- import { actions as error } from "../../data/error/index.js";
6
- const ErrorToast = memo((props) => {
7
- const storeError = useAppSelector((state) => state?.error);
8
- const dispatch = useAppDispatch();
9
- useEffect(() => {
10
- if (storeError && (storeError?.description || storeError?.messageText)) {
11
- const toastProps = {
12
- position: ToastPosition.TOP_RIGHT,
13
- messageTitle: "Error",
14
- type: ToastType.ERROR,
15
- ...props,
16
- ...storeError
17
- };
18
- const messageText = toastProps.description || toastProps.messageText;
19
- if (messageText)
20
- toast({ messageText, ...toastProps });
21
- dispatch(error.clear());
22
- }
23
- }, [storeError, props, dispatch]);
24
- return /* @__PURE__ */ React.createElement(DSToast, {
25
- ...props
26
- });
27
- });
28
- export {
29
- ErrorToast
30
- };
@@ -1,12 +0,0 @@
1
- import { get } from "lodash";
2
- let hostAppData = {};
3
- const setHostAppData = (appData) => {
4
- hostAppData = { ...hostAppData, ...appData };
5
- };
6
- const getHostAppDataByKey = (key = "", defaultValue = null) => get(hostAppData, key, defaultValue);
7
- const isHostAppDataExist = () => hostAppData && Object.keys(hostAppData).length > 0;
8
- export {
9
- getHostAppDataByKey,
10
- isHostAppDataExist,
11
- setHostAppData
12
- };
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import { DSControlledCheckbox } from "@elliemae/ds-controlled-form";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const CheckBox = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ React.createElement(Controller, {
7
- name,
8
- rules,
9
- render: ({ field: { value = false, ...restProps } }) => /* @__PURE__ */ React.createElement(DSControlledCheckbox, {
10
- ...rest,
11
- ...restProps,
12
- checked: value
13
- })
14
- });
15
- export {
16
- CheckBox
17
- };
@@ -1,26 +0,0 @@
1
- import * as React from "react";
2
- import { DSComboBox } from "@elliemae/ds-form/ComboBox";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const ComboBox = ({
7
- name,
8
- defaultValue = "",
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- rules,
14
- defaultValue,
15
- render: ({ field: { onChange, ...props } }) => /* @__PURE__ */ React.createElement(DSComboBox, {
16
- ...rest,
17
- ...props,
18
- onChange: (selected) => {
19
- const { value = selected } = selected;
20
- onChange(value);
21
- }
22
- })
23
- });
24
- export {
25
- ComboBox
26
- };
@@ -1,10 +0,0 @@
1
- import { useFormContext } from "react-hook-form";
2
- const ConnectForm = ({ children }) => {
3
- const methods = useFormContext();
4
- return children({
5
- ...methods
6
- });
7
- };
8
- export {
9
- ConnectForm
10
- };
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { DSDateInput } from "@elliemae/ds-form/DateInput";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const DateInput = ({
7
- name,
8
- defaultValue = "",
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- rules,
14
- defaultValue,
15
- render: ({ field }) => /* @__PURE__ */ React.createElement(DSDateInput, {
16
- ...rest,
17
- ...field
18
- })
19
- });
20
- export {
21
- DateInput
22
- };
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { DSDatePicker } from "@elliemae/ds-date-picker";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const DatePicker = ({
7
- name,
8
- defaultValue = "",
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- defaultValue,
14
- rules,
15
- render: ({ field }) => /* @__PURE__ */ React.createElement(DSDatePicker, {
16
- ...rest,
17
- ...field
18
- })
19
- });
20
- export {
21
- DatePicker
22
- };
@@ -1,20 +0,0 @@
1
- import * as React from "react";
2
- import { DSFormItemLayout } from "@elliemae/ds-form/FormItem";
3
- import { get } from "react-hook-form";
4
- import { ConnectForm } from "../connect-form.js";
5
- const FormItemLayout = ({ name, ...rest }) => /* @__PURE__ */ React.createElement(ConnectForm, null, ({
6
- formState: { errors }
7
- }) => {
8
- const errorField = get(errors, name);
9
- const hasError = !!errorField;
10
- const validationMessage = errorField?.message;
11
- return /* @__PURE__ */ React.createElement(DSFormItemLayout, {
12
- name,
13
- hasError,
14
- validationMessage,
15
- ...rest
16
- });
17
- });
18
- export {
19
- FormItemLayout
20
- };
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
- import { DSFormLayoutBlockItem } from "@elliemae/ds-form-layout-blocks";
3
- import { get } from "react-hook-form";
4
- import { ConnectForm } from "../connect-form.js";
5
- const FormLayoutBlockItem = ({
6
- inputID,
7
- label,
8
- ...rest
9
- }) => /* @__PURE__ */ React.createElement(ConnectForm, null, ({
10
- formState: { errors }
11
- }) => {
12
- const errorField = get(errors, inputID);
13
- const hasError = !!errorField;
14
- const validationMessage = errorField?.message;
15
- return /* @__PURE__ */ React.createElement(DSFormLayoutBlockItem, {
16
- inputID,
17
- label,
18
- hasError,
19
- validationMessage,
20
- ...rest
21
- });
22
- });
23
- export {
24
- FormLayoutBlockItem
25
- };
@@ -1,29 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- DSInputMask,
4
- MASK_TYPES,
5
- MASK_PIPES
6
- } from "@elliemae/ds-form/InputMask";
7
- import {
8
- Controller
9
- } from "react-hook-form";
10
- const InputMask = ({
11
- name,
12
- defaultValue = "",
13
- rules = {},
14
- mask,
15
- ...rest
16
- }) => /* @__PURE__ */ React.createElement(Controller, {
17
- name,
18
- rules,
19
- defaultValue,
20
- render: ({ field }) => /* @__PURE__ */ React.createElement(DSInputMask, {
21
- ...rest,
22
- ...field
23
- })
24
- });
25
- export {
26
- InputMask,
27
- MASK_PIPES,
28
- MASK_TYPES
29
- };
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { DSLargeInputText } from "@elliemae/ds-form/LargeInputText";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const LargeTextBox = ({
7
- name,
8
- defaultValue = "",
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- rules,
14
- defaultValue,
15
- render: ({ field }) => /* @__PURE__ */ React.createElement(DSLargeInputText, {
16
- ...rest,
17
- ...field
18
- })
19
- });
20
- export {
21
- LargeTextBox
22
- };
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import { DSRadio } from "@elliemae/ds-form/Radio";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const Radio = ({
7
- name,
8
- defaultChecked = false,
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- rules,
14
- render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ React.createElement(DSRadio, {
15
- ...rest,
16
- ...restProps,
17
- checked: value,
18
- defaultChecked,
19
- onChange: (e) => onChange(((e || {}).target || {}).checked)
20
- })
21
- });
22
- export {
23
- Radio
24
- };
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import { DSRadioGroup } from "@elliemae/ds-form/RadioGroup";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ React.createElement(Controller, {
7
- name,
8
- rules,
9
- render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ React.createElement(DSRadioGroup, {
10
- ...rest,
11
- ...restProps,
12
- activeValue: value
13
- })
14
- });
15
- export {
16
- RadioGroup
17
- };
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { DSTextBox } from "@elliemae/ds-form/TextBox";
3
- import {
4
- Controller
5
- } from "react-hook-form";
6
- const TextBox = ({
7
- name,
8
- defaultValue = "",
9
- rules = {},
10
- ...rest
11
- }) => /* @__PURE__ */ React.createElement(Controller, {
12
- name,
13
- defaultValue,
14
- rules,
15
- render: ({ field }) => /* @__PURE__ */ React.createElement(DSTextBox, {
16
- ...rest,
17
- ...field
18
- })
19
- });
20
- export {
21
- TextBox
22
- };
@@ -1,33 +0,0 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import {
4
- useForm,
5
- FormProvider
6
- } from "react-hook-form";
7
- const StyledForm = styled.form`
8
- width: 100%;
9
- height: 100%;
10
- `;
11
- const Form = ({
12
- classname,
13
- reactHookFormProps = { mode: "onBlur" },
14
- children,
15
- onSubmit
16
- }) => {
17
- const methods = useForm(reactHookFormProps);
18
- const formProps = {};
19
- if (onSubmit)
20
- formProps.onSubmit = methods.handleSubmit(onSubmit);
21
- const providerProps = Object.assign(methods, {
22
- formProps: reactHookFormProps
23
- });
24
- return /* @__PURE__ */ React.createElement(FormProvider, {
25
- ...providerProps
26
- }, /* @__PURE__ */ React.createElement(StyledForm, {
27
- className: classname,
28
- ...formProps
29
- }, children));
30
- };
31
- export {
32
- Form
33
- };
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import { useFormContext } from "react-hook-form";
3
- import { DSButtonV2 } from "@elliemae/ds-button";
4
- const FormSubmitButton = ({ ...rest }) => {
5
- const {
6
- formState,
7
- formProps: { mode }
8
- } = useFormContext();
9
- return /* @__PURE__ */ React.createElement(DSButtonV2, {
10
- ...rest,
11
- type: "submit",
12
- disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
13
- });
14
- };
15
- export {
16
- FormSubmitButton
17
- };
@@ -1,14 +0,0 @@
1
- import * as React from "react";
2
- import { lazy, Suspense } from "react";
3
- import { WaitMessageLauncher } from "../modals/wait-message/wait-message-launcher.js";
4
- const loadable = (importFunc, fallback = /* @__PURE__ */ React.createElement(WaitMessageLauncher, null)) => {
5
- const LazyComponent = lazy(importFunc);
6
- return (props) => /* @__PURE__ */ React.createElement(Suspense, {
7
- fallback
8
- }, /* @__PURE__ */ React.createElement(LazyComponent, {
9
- ...props
10
- }));
11
- };
12
- export {
13
- loadable
14
- };
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
- import { memo, useState } from "react";
3
- import frameHtml from "file-loader?name=iframe.[contenthash].[ext]!./iframe/index.html";
4
- import { IFrame } from "./iframe/index.js";
5
- import { useFrameLoaded } from "./use-frame-loaded.js";
6
- import {
7
- useAppWillRender
8
- } from "../micro-app/use-app-will-render.js";
9
- const App = memo(({ id, dispose, onUnloadComplete, ...rest }) => {
10
- const [documentEle, setDocumentEle] = useState(null);
11
- useFrameLoaded({ id, documentEle, ...rest });
12
- useAppWillRender({
13
- id,
14
- documentEle: dispose ? null : documentEle,
15
- onUnloadComplete,
16
- ...rest
17
- });
18
- return /* @__PURE__ */ React.createElement(IFrame, {
19
- id,
20
- src: frameHtml,
21
- ...rest,
22
- onFrameReady: setDocumentEle
23
- });
24
- });
25
- export {
26
- App
27
- };
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import { memo, useRef } from "react";
3
- import styled from "styled-components";
4
- import { IFRAME_CONTAINER_ID_PREFIX } from "./const.js";
5
- const Div = styled.div`
6
- display: flex;
7
- width: 100%;
8
- height: 100%;
9
- flex-direction: column;
10
- overflow: hidden;
11
- `;
12
- const Iframe = styled.iframe`
13
- flex-grow: 1;
14
- border: none;
15
- margin: 0;
16
- padding: 0;
17
- display: block;
18
- height: 100%;
19
- `;
20
- const IFrame = memo(({ id, name: title, src, sandbox, onFrameReady }) => {
21
- const frameRef = useRef(null);
22
- const sandboxProps = sandbox ? { sandbox } : {};
23
- return /* @__PURE__ */ React.createElement(Div, null, /* @__PURE__ */ React.createElement(Iframe, {
24
- id: `${IFRAME_CONTAINER_ID_PREFIX}${id}`,
25
- ref: frameRef,
26
- title,
27
- src,
28
- scrolling: "no",
29
- ...sandboxProps,
30
- onLoad: () => frameRef?.current?.contentDocument && onFrameReady(frameRef.current.contentDocument)
31
- }));
32
- });
33
- export {
34
- IFrame
35
- };
@@ -1,26 +0,0 @@
1
- import * as React from "react";
2
- import { useEffect, useState, memo } from "react";
3
- import { usePrevious } from "../use-previous.js";
4
- import { App } from "./app.js";
5
- const MicroIFrameApp = memo(({ entityId = null, ...rest }) => {
6
- const [disposePrevApp, setDisposePrevApp] = useState(false);
7
- const [appKey, setAppKey] = useState(Date.now());
8
- const prevEntityId = usePrevious(entityId);
9
- useEffect(() => {
10
- if (prevEntityId !== entityId && prevEntityId) {
11
- setDisposePrevApp(true);
12
- }
13
- }, [entityId]);
14
- return /* @__PURE__ */ React.createElement(App, {
15
- ...rest,
16
- key: appKey,
17
- dispose: disposePrevApp,
18
- onUnloadComplete: () => {
19
- setAppKey(Date.now());
20
- setDisposePrevApp(false);
21
- }
22
- });
23
- });
24
- export {
25
- MicroIFrameApp
26
- };
@@ -1,35 +0,0 @@
1
- import * as React from "react";
2
- import { memo, useEffect } from "react";
3
- import { DSLoadingIndicator } from "@elliemae/ds-loading-indicator";
4
- import { useAppSelector } from "../../../data/react-redux.js";
5
- import { useHTMLWaitMessage } from "./use-html-wait-message.js";
6
- import {
7
- waitStartEvent,
8
- waitEndEvent
9
- } from "../../../analytics/user-wait-event.js";
10
- const WaitMessage = memo(({
11
- size = "m",
12
- style = { color: "white", fontSize: "1.25rem" },
13
- ...rest
14
- }) => {
15
- const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
16
- const message = useAppSelector((state) => state.waitMessage?.message);
17
- useEffect(() => {
18
- if (isOpen)
19
- waitStartEvent();
20
- else
21
- waitEndEvent();
22
- }, [isOpen]);
23
- useHTMLWaitMessage(isOpen !== null);
24
- return /* @__PURE__ */ React.createElement(DSLoadingIndicator, {
25
- id: "em-loading",
26
- size,
27
- style,
28
- ...rest,
29
- loading: isOpen,
30
- message
31
- });
32
- });
33
- export {
34
- WaitMessage
35
- };
@@ -1,22 +0,0 @@
1
- import * as React from "react";
2
- import { forwardRef } from "react";
3
- import styled from "styled-components";
4
- const Span = styled.span`
5
- border: 0;
6
- clip: rect(0 0 0 0);
7
- height: 1px;
8
- margin: -1px;
9
- overflow: hidden;
10
- padding: 0;
11
- position: absolute;
12
- width: 1px;
13
- white-space: nowrap;
14
- word-wrap: normal;
15
- `;
16
- const VisuallyHidden = forwardRef((props, ref) => /* @__PURE__ */ React.createElement(Span, {
17
- ref,
18
- ...props
19
- }));
20
- export {
21
- VisuallyHidden
22
- };