@elliemae/pui-app-sdk 3.13.0 → 3.16.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.
- package/dist/cjs/analytics/appdynamics.js +4 -1
- package/dist/cjs/api/auth/index.js +8 -2
- package/dist/cjs/api/helpers.js +7 -1
- package/dist/cjs/api/users/index.js +3 -1
- package/dist/cjs/communication/http-client/index.js +4 -1
- package/dist/cjs/communication/http-client/response-interceptor.js +4 -1
- package/dist/cjs/communication/http-client/retry-axios.js +4 -1
- package/dist/cjs/data/auth/reducer.js +14 -8
- package/dist/cjs/data/breakpoint/index.js +4 -1
- package/dist/cjs/data/store.js +10 -2
- package/dist/cjs/data/wait-message/reducer.js +4 -1
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/sideeffect/error-toast/index.js +3 -1
- package/dist/cjs/sideeffect/wait-message/index.js +6 -2
- package/dist/cjs/utils/app-config/config.js +4 -1
- package/dist/cjs/utils/app-config/index.js +9 -2
- package/dist/cjs/utils/auth/helper.js +4 -1
- package/dist/cjs/utils/auth/index.js +3 -1
- package/dist/cjs/utils/micro-frontend/guest.js +7 -2
- package/dist/cjs/utils/micro-frontend/host.js +8 -2
- package/dist/cjs/utils/micro-frontend/index.js +27 -10
- package/dist/cjs/utils/micro-frontend/ssfguest-adapter.js +9 -2
- package/dist/cjs/utils/redact-pii.js +8 -2
- package/dist/cjs/utils/session.js +14 -4
- package/dist/cjs/utils/testing/index.js +5 -7
- package/dist/cjs/utils/testing/render-with-redux.js +5 -7
- package/dist/cjs/utils/testing/render-with-router-redux.js +10 -9
- package/dist/cjs/utils/testing/render-with-router.js +5 -7
- package/dist/cjs/utils/testing/render-with-state-addons.js +7 -9
- package/dist/cjs/utils/web-storage.js +4 -1
- package/dist/cjs/utils/window.js +8 -2
- package/dist/cjs/view/app-root/hosted-app.js +13 -3
- package/dist/cjs/view/app-root/index.js +21 -19
- package/dist/cjs/view/app-root/stand-alone-app.js +17 -3
- package/dist/cjs/view/app-router.js +2 -5
- package/dist/cjs/view/breakpoint/use-breakpoint.js +9 -5
- package/dist/cjs/view/breakpoint/use-media-query-list.js +3 -1
- package/dist/cjs/view/error-boundary/default-error-template.js +11 -5
- package/dist/cjs/view/error-boundary/index.js +6 -2
- package/dist/cjs/view/error-toast/index.js +2 -5
- package/dist/cjs/view/fetch-host-app-data/index.js +4 -1
- package/dist/cjs/view/fields/autocomplete/index.js +47 -0
- package/dist/cjs/view/fields/check-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box/index.js +3 -6
- package/dist/cjs/view/fields/combo-box-v3/index.js +42 -0
- package/dist/cjs/view/fields/date-input/index.js +3 -6
- package/dist/cjs/view/fields/date-picker/index.js +7 -4
- package/dist/cjs/view/fields/date-range-picker/index.js +10 -9
- package/dist/cjs/view/fields/date-time-picker/index.js +3 -6
- package/dist/cjs/view/fields/form-item-layout/index.js +15 -16
- package/dist/cjs/view/fields/form-layout-block-item/index.js +16 -17
- package/dist/cjs/view/fields/input-mask/index.js +3 -6
- package/dist/cjs/view/fields/input-text/index.js +3 -6
- package/dist/cjs/view/fields/large-text-box/index.js +3 -6
- package/dist/cjs/view/fields/radio/index.js +3 -6
- package/dist/cjs/view/fields/radio-group/index.js +3 -6
- package/dist/cjs/view/fields/text-box/index.js +3 -6
- package/dist/cjs/view/fields/toggle/index.js +3 -6
- package/dist/cjs/view/fields/watch-value.js +25 -3
- package/dist/cjs/view/form/index.js +13 -8
- package/dist/cjs/view/form/personal-info-section.js +54 -47
- package/dist/cjs/view/form/submit-button/index.js +2 -5
- package/dist/cjs/view/live-message/index.js +2 -5
- package/dist/cjs/view/loadable/index.js +8 -10
- package/dist/cjs/view/login/index.js +4 -5
- package/dist/cjs/view/micro-app/app-factory/index.js +9 -3
- package/dist/cjs/view/micro-app/index.js +6 -3
- package/dist/cjs/view/micro-app/resources/manifest.js +10 -3
- package/dist/cjs/view/micro-app/use-app-will-render.js +37 -28
- package/dist/cjs/view/micro-iframe-app/app.js +23 -18
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +22 -15
- package/dist/cjs/view/micro-iframe-app/index.js +2 -5
- package/dist/cjs/view/modals/error/index.js +21 -12
- package/dist/cjs/view/modals/navigation-prompt/index.js +46 -27
- package/dist/cjs/view/modals/session-expiry/customHooks.js +6 -2
- package/dist/cjs/view/modals/session-expiry/index.js +57 -35
- package/dist/cjs/view/modals/wait-message/index.js +26 -27
- package/dist/cjs/view/page.js +15 -3
- package/dist/cjs/view/render-with-delay/index.js +4 -5
- package/dist/cjs/view/render-with-host-data/index.js +2 -5
- package/dist/cjs/view/require-auth.js +12 -6
- package/dist/cjs/view/session-timeout/index.js +15 -14
- package/dist/cjs/view/storybook/decorator.js +5 -7
- package/dist/cjs/view/visually-hidden/index.js +11 -6
- package/dist/esm/analytics/appdynamics.js +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/page-view-event.js +0 -1
- package/dist/esm/analytics/user-session-event.js +0 -1
- package/dist/esm/analytics/user-wait-event.js +0 -1
- package/dist/esm/analytics/web-analytics.js +0 -1
- package/dist/esm/api/auth/index.js +8 -3
- package/dist/esm/api/helpers.js +7 -2
- package/dist/esm/api/users/index.js +3 -2
- package/dist/esm/communication/http-client/index.js +0 -1
- package/dist/esm/communication/http-client/request-interceptor.js +0 -1
- package/dist/esm/communication/http-client/response-interceptor.js +0 -1
- package/dist/esm/communication/http-client/retry-axios.js +0 -1
- package/dist/esm/communication/http-client/retry.js +0 -1
- package/dist/esm/data/auth/actions.js +0 -1
- package/dist/esm/data/auth/reducer.js +10 -8
- package/dist/esm/data/breakpoint/index.js +0 -1
- package/dist/esm/data/error/index.js +0 -1
- package/dist/esm/data/index.js +0 -1
- package/dist/esm/data/live-message/index.js +0 -1
- package/dist/esm/data/logout/actions.js +0 -1
- package/dist/esm/data/navigation-prompt/actions.js +0 -1
- package/dist/esm/data/react-redux.js +0 -1
- package/dist/esm/data/reducers.js +0 -1
- package/dist/esm/data/saga.js +0 -1
- package/dist/esm/data/store.js +6 -2
- package/dist/esm/data/wait-message/actions.js +0 -1
- package/dist/esm/data/wait-message/reducer.js +0 -1
- package/dist/esm/data/webpack-hmr.js +0 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/micro-frontend.js +0 -1
- package/dist/esm/sideeffect/auth/index.js +0 -1
- package/dist/esm/sideeffect/error-toast/index.js +3 -2
- package/dist/esm/sideeffect/wait-message/index.js +6 -3
- package/dist/esm/utils/app-config/config.js +0 -1
- package/dist/esm/utils/app-config/index.js +5 -2
- package/dist/esm/utils/app-host-integration/react.js +0 -1
- package/dist/esm/utils/auth/helper.js +0 -1
- package/dist/esm/utils/auth/index.js +3 -2
- package/dist/esm/utils/await.js +0 -1
- package/dist/esm/utils/constants.js +0 -1
- package/dist/esm/utils/font-size.js +0 -1
- package/dist/esm/utils/guest-with-service.js +0 -1
- package/dist/esm/utils/helpers.js +0 -1
- package/dist/esm/utils/history.js +0 -1
- package/dist/esm/utils/log-records.js +0 -1
- package/dist/esm/utils/micro-frontend/console-logger.js +0 -1
- package/dist/esm/utils/micro-frontend/guest.js +3 -2
- package/dist/esm/utils/micro-frontend/host.js +8 -3
- package/dist/esm/utils/micro-frontend/index.js +23 -10
- package/dist/esm/utils/micro-frontend/ssfguest-adapter.js +5 -2
- package/dist/esm/utils/micro-frontend/types.js +0 -1
- package/dist/esm/utils/redact-pii.js +8 -3
- package/dist/esm/utils/service-worker.js +0 -1
- package/dist/esm/utils/session.js +14 -5
- package/dist/esm/utils/storybook/manager.js +0 -1
- package/dist/esm/utils/storybook/preview.js +0 -1
- package/dist/esm/utils/storybook/theme.js +0 -1
- package/dist/esm/utils/testing/index.js +5 -5
- package/dist/esm/utils/testing/render-with-redux.js +5 -5
- package/dist/esm/utils/testing/render-with-router-redux.js +10 -7
- package/dist/esm/utils/testing/render-with-router.js +5 -5
- package/dist/esm/utils/testing/render-with-state-addons.js +7 -7
- package/dist/esm/utils/types.js +0 -1
- package/dist/esm/utils/url.js +0 -1
- package/dist/esm/utils/web-storage.js +0 -1
- package/dist/esm/utils/window.js +8 -3
- package/dist/esm/view/app-root/hosted-app.js +9 -3
- package/dist/esm/view/app-root/index.js +21 -17
- package/dist/esm/view/app-root/stand-alone-app.js +13 -3
- package/dist/esm/view/app-root/style.js +0 -1
- package/dist/esm/view/app-router.js +2 -3
- package/dist/esm/view/breakpoint/use-breakpoint.js +9 -6
- package/dist/esm/view/breakpoint/use-media-query-list.js +3 -2
- package/dist/esm/view/error-boundary/default-error-template.js +11 -3
- package/dist/esm/view/error-boundary/index.js +2 -2
- package/dist/esm/view/error-toast/index.js +2 -3
- package/dist/esm/view/fetch-host-app-data/index.js +0 -1
- package/dist/esm/view/fetch-host-app-data/store.js +0 -1
- package/dist/esm/view/fields/autocomplete/index.js +27 -0
- package/dist/esm/view/fields/check-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box/index.js +3 -4
- package/dist/esm/view/fields/combo-box-v3/index.js +24 -0
- package/dist/esm/view/fields/connect-form.js +0 -1
- package/dist/esm/view/fields/date-input/index.js +3 -4
- package/dist/esm/view/fields/date-picker/index.js +3 -4
- package/dist/esm/view/fields/date-range-picker/index.js +10 -7
- package/dist/esm/view/fields/date-time-picker/index.js +3 -4
- package/dist/esm/view/fields/form-item-layout/index.js +15 -14
- package/dist/esm/view/fields/form-layout-block-item/index.js +16 -15
- package/dist/esm/view/fields/input-mask/index.js +3 -4
- package/dist/esm/view/fields/input-text/index.js +3 -4
- package/dist/esm/view/fields/large-text-box/index.js +3 -4
- package/dist/esm/view/fields/radio/index.js +3 -4
- package/dist/esm/view/fields/radio-group/index.js +3 -4
- package/dist/esm/view/fields/text-box/index.js +3 -4
- package/dist/esm/view/fields/toggle/index.js +3 -4
- package/dist/esm/view/fields/watch-value.js +21 -3
- package/dist/esm/view/form/index.js +9 -8
- package/dist/esm/view/form/personal-info-section.js +50 -47
- package/dist/esm/view/form/submit-button/index.js +2 -3
- package/dist/esm/view/guest-unload-handlers/index.js +0 -1
- package/dist/esm/view/host-binding-events/index.js +0 -1
- package/dist/esm/view/live-message/index.js +2 -3
- package/dist/esm/view/loadable/index.js +8 -8
- package/dist/esm/view/login/index.js +4 -3
- package/dist/esm/view/message-to-host-app/index.js +0 -1
- package/dist/esm/view/micro-app/app-factory/index.js +9 -4
- package/dist/esm/view/micro-app/const.js +0 -1
- package/dist/esm/view/micro-app/index.js +2 -3
- package/dist/esm/view/micro-app/resources/manifest.js +10 -4
- package/dist/esm/view/micro-app/resources/script.js +0 -1
- package/dist/esm/view/micro-app/resources/style.js +0 -1
- package/dist/esm/view/micro-app/types.js +0 -1
- package/dist/esm/view/micro-app/use-app-will-render.js +37 -29
- package/dist/esm/view/micro-app/utils.js +0 -1
- package/dist/esm/view/micro-iframe-app/app.js +19 -18
- package/dist/esm/view/micro-iframe-app/iframe/const.js +0 -1
- package/dist/esm/view/micro-iframe-app/iframe/index.js +18 -15
- package/dist/esm/view/micro-iframe-app/index.js +2 -3
- package/dist/esm/view/micro-iframe-app/types.js +0 -1
- package/dist/esm/view/micro-iframe-app/use-frame-loaded.js +0 -1
- package/dist/esm/view/modals/error/index.js +21 -10
- package/dist/esm/view/modals/navigation-prompt/index.js +46 -25
- package/dist/esm/view/modals/session-expiry/customHooks.js +6 -3
- package/dist/esm/view/modals/session-expiry/index.js +57 -33
- package/dist/esm/view/modals/wait-message/index.js +26 -25
- package/dist/esm/view/modals/wait-message/use-html-wait-message.js +0 -1
- package/dist/esm/view/modals/wait-message/wait-message-launcher.js +0 -1
- package/dist/esm/view/page.js +11 -3
- package/dist/esm/view/render-with-delay/index.js +4 -3
- package/dist/esm/view/render-with-host-data/index.js +2 -3
- package/dist/esm/view/require-auth.js +8 -6
- package/dist/esm/view/session-timeout/index.js +15 -12
- package/dist/esm/view/storybook/decorator.js +5 -5
- package/dist/esm/view/use-previous.js +0 -1
- package/dist/esm/view/use-window-size-change.js +0 -1
- package/dist/esm/view/visually-hidden/index.js +7 -6
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/view/fields/autocomplete/index.d.ts +13 -0
- package/dist/types/lib/view/fields/autocomplete/index.stories.d.ts +5 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.d.ts +9 -0
- package/dist/types/lib/view/fields/combo-box-v3/index.stories.d.ts +5 -0
- package/package.json +34 -34
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSFormLayoutBlockItem } from "@elliemae/ds-form-layout-blocks";
|
|
4
3
|
import { get } from "react-hook-form";
|
|
5
4
|
import { ConnectForm } from "../connect-form.js";
|
|
@@ -7,19 +6,21 @@ const FormLayoutBlockItem = ({
|
|
|
7
6
|
inputID,
|
|
8
7
|
label,
|
|
9
8
|
...rest
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
}) => /* @__PURE__ */ jsx(ConnectForm, {
|
|
10
|
+
children: ({
|
|
11
|
+
formState: { errors }
|
|
12
|
+
}) => {
|
|
13
|
+
const errorField = get(errors, inputID);
|
|
14
|
+
const hasError = !!errorField;
|
|
15
|
+
const validationMessage = errorField?.message;
|
|
16
|
+
return /* @__PURE__ */ jsx(DSFormLayoutBlockItem, {
|
|
17
|
+
inputID,
|
|
18
|
+
label,
|
|
19
|
+
hasError,
|
|
20
|
+
validationMessage,
|
|
21
|
+
...rest
|
|
22
|
+
});
|
|
23
|
+
}
|
|
23
24
|
});
|
|
24
25
|
export {
|
|
25
26
|
FormLayoutBlockItem
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import {
|
|
4
3
|
DSInputMask,
|
|
5
4
|
MASK_TYPES,
|
|
@@ -15,11 +14,11 @@ const InputMask = ({
|
|
|
15
14
|
onChange: changeHandler,
|
|
16
15
|
onBlur: onBlurHandler,
|
|
17
16
|
...rest
|
|
18
|
-
}) => /* @__PURE__ */
|
|
17
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
19
18
|
name,
|
|
20
19
|
rules,
|
|
21
20
|
defaultValue,
|
|
22
|
-
render: ({ field: { onChange, onBlur, ...props } }) => /* @__PURE__ */
|
|
21
|
+
render: ({ field: { onChange, onBlur, ...props } }) => /* @__PURE__ */ jsx(DSInputMask, {
|
|
23
22
|
...rest,
|
|
24
23
|
...props,
|
|
25
24
|
onChange: (e) => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSInputText } from "@elliemae/ds-controlled-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const InputText = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
defaultValue,
|
|
15
14
|
rules,
|
|
16
|
-
render: ({ field }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSInputText, {
|
|
17
16
|
...rest,
|
|
18
17
|
...field
|
|
19
18
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSLargeInputText } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const LargeTextBox = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
rules,
|
|
15
14
|
defaultValue,
|
|
16
|
-
render: ({ field }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSLargeInputText, {
|
|
17
16
|
...rest,
|
|
18
17
|
...field
|
|
19
18
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSRadio } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,10 +8,10 @@ const Radio = ({
|
|
|
9
8
|
defaultChecked = false,
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
rules,
|
|
15
|
-
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */
|
|
14
|
+
render: ({ field: { onChange, value, ...restProps } }) => /* @__PURE__ */ jsx(DSRadio, {
|
|
16
15
|
...rest,
|
|
17
16
|
...restProps,
|
|
18
17
|
checked: value,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSRadioGroup } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
6
5
|
} from "react-hook-form";
|
|
7
|
-
const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */
|
|
6
|
+
const RadioGroup = ({ name, rules = {}, ...rest }) => /* @__PURE__ */ jsx(Controller, {
|
|
8
7
|
name,
|
|
9
8
|
rules,
|
|
10
|
-
render: ({ field: { value, ...restProps } }) => /* @__PURE__ */
|
|
9
|
+
render: ({ field: { value, ...restProps } }) => /* @__PURE__ */ jsx(DSRadioGroup, {
|
|
11
10
|
...rest,
|
|
12
11
|
...restProps,
|
|
13
12
|
activeValue: value
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSTextBox } from "@elliemae/ds-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const TextBox = ({
|
|
|
9
8
|
defaultValue = "",
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
defaultValue,
|
|
15
14
|
rules,
|
|
16
|
-
render: ({ field }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field }) => /* @__PURE__ */ jsx(DSTextBox, {
|
|
17
16
|
...rest,
|
|
18
17
|
...field
|
|
19
18
|
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { DSControlledToggle } from "@elliemae/ds-controlled-form";
|
|
4
3
|
import {
|
|
5
4
|
Controller
|
|
@@ -9,11 +8,11 @@ const Toggle = ({
|
|
|
9
8
|
defaultValue = false,
|
|
10
9
|
rules = {},
|
|
11
10
|
...rest
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(Controller, {
|
|
13
12
|
name,
|
|
14
13
|
rules,
|
|
15
14
|
defaultValue,
|
|
16
|
-
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */
|
|
15
|
+
render: ({ field: { value, onChange, ...restProps } }) => /* @__PURE__ */ jsx(DSControlledToggle, {
|
|
17
16
|
...rest,
|
|
18
17
|
...restProps,
|
|
19
18
|
checked: value,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import styled from "styled-components";
|
|
4
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
4
|
import { useFormContext } from "react-hook-form";
|
|
@@ -17,7 +16,26 @@ const Div = styled.div`
|
|
|
17
16
|
const WatchValue = ({ name, label }) => {
|
|
18
17
|
const { watch } = useFormContext();
|
|
19
18
|
const data = watch(name, false) || "";
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ jsx(Grid, {
|
|
20
|
+
children: /* @__PURE__ */ jsxs(Section, {
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("h4", {
|
|
23
|
+
children: "Form Data:"
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx(Div, {
|
|
26
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
children: [
|
|
28
|
+
label,
|
|
29
|
+
" : ",
|
|
30
|
+
/* @__PURE__ */ jsx("strong", {
|
|
31
|
+
children: JSON.stringify(data)
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
21
39
|
};
|
|
22
40
|
export {
|
|
23
41
|
WatchValue
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import styled from "styled-components";
|
|
4
3
|
import {
|
|
5
4
|
useForm,
|
|
@@ -22,12 +21,14 @@ const Form = ({
|
|
|
22
21
|
const providerProps = Object.assign(methods, {
|
|
23
22
|
formProps: reactHookFormProps
|
|
24
23
|
});
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
...providerProps
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return /* @__PURE__ */ jsx(FormProvider, {
|
|
25
|
+
...providerProps,
|
|
26
|
+
children: /* @__PURE__ */ jsx(StyledForm, {
|
|
27
|
+
className: classname,
|
|
28
|
+
...formProps,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
31
32
|
};
|
|
32
33
|
export {
|
|
33
34
|
Form
|
|
@@ -1,63 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import moment from "moment";
|
|
4
3
|
import { TextBox } from "../fields/text-box/index.js";
|
|
5
4
|
import { ComboBox } from "../fields/combo-box/index.js";
|
|
6
5
|
import { DateInput } from "../fields/date-input/index.js";
|
|
7
6
|
import { FormLayoutBlockItem } from "../fields/form-layout-block-item/index.js";
|
|
8
|
-
const FirstName = () => /* @__PURE__ */
|
|
7
|
+
const FirstName = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, {
|
|
9
8
|
label: "First Name",
|
|
10
9
|
inputID: "firstname",
|
|
11
|
-
required: true
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
|
|
10
|
+
required: true,
|
|
11
|
+
children: /* @__PURE__ */ jsx(TextBox, {
|
|
12
|
+
id: "firstname",
|
|
13
|
+
name: "firstname",
|
|
14
|
+
rules: {
|
|
15
|
+
required: { value: true, message: "First Name is required" },
|
|
16
|
+
minLength: { value: 2, message: "Minimum 2 characters" },
|
|
17
|
+
maxLength: { value: 50, message: "Maximum 50 characters" }
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
const DOB = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, {
|
|
22
22
|
label: "Date of Birth",
|
|
23
23
|
inputID: "dob",
|
|
24
|
-
required: true
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
|
|
24
|
+
required: true,
|
|
25
|
+
children: /* @__PURE__ */ jsx(DateInput, {
|
|
26
|
+
id: "dob",
|
|
27
|
+
name: "dob",
|
|
28
|
+
rules: {
|
|
29
|
+
required: { value: true, message: "Date of Birth is required" },
|
|
30
|
+
validate: (value) => moment() > value || "Date of Birth can not be greater than current date"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
const State = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, {
|
|
34
35
|
label: "State",
|
|
35
36
|
inputID: "state",
|
|
36
|
-
required: true
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
|
|
37
|
+
required: true,
|
|
38
|
+
children: /* @__PURE__ */ jsx(ComboBox, {
|
|
39
|
+
id: "state",
|
|
40
|
+
name: "state",
|
|
41
|
+
rules: { required: { value: true, message: "State is required" } },
|
|
42
|
+
options: [
|
|
43
|
+
{ value: "ca", label: "California" },
|
|
44
|
+
{ value: "nj", label: "New Jersey" }
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
const MaritalStatus = () => /* @__PURE__ */ jsx(FormLayoutBlockItem, {
|
|
47
49
|
label: "Marital Status",
|
|
48
50
|
inputID: "marital_status",
|
|
49
|
-
required: true
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})
|
|
51
|
+
required: true,
|
|
52
|
+
children: /* @__PURE__ */ jsx(ComboBox, {
|
|
53
|
+
id: "marital_status",
|
|
54
|
+
name: "marital_status",
|
|
55
|
+
rules: {
|
|
56
|
+
required: { value: true, message: "Marital Status is required" }
|
|
57
|
+
},
|
|
58
|
+
options: [
|
|
59
|
+
{ value: "married", label: "Married" },
|
|
60
|
+
{ value: "single", label: "Single" }
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
});
|
|
61
64
|
export {
|
|
62
65
|
DOB,
|
|
63
66
|
FirstName,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useFormContext } from "react-hook-form";
|
|
4
3
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
5
4
|
const FormSubmitButton = ({ ...rest }) => {
|
|
@@ -7,7 +6,7 @@ const FormSubmitButton = ({ ...rest }) => {
|
|
|
7
6
|
formState,
|
|
8
7
|
formProps: { mode }
|
|
9
8
|
} = useFormContext();
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(DSButtonV2, {
|
|
11
10
|
...rest,
|
|
12
11
|
type: "submit",
|
|
13
12
|
disabled: mode !== "onSubmit" && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { LiveMessage as AriaLiveMessage } from "react-aria-live";
|
|
4
3
|
import { useAppSelector } from "../../data/react-redux.js";
|
|
5
4
|
const LiveMessage = () => {
|
|
6
5
|
const message = useAppSelector((state) => state.liveMessage?.message);
|
|
7
6
|
const id = useAppSelector((state) => state.liveMessage?.id);
|
|
8
7
|
const ariaLive = useAppSelector((state) => state.liveMessage?.ariaLive);
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ jsx(AriaLiveMessage, {
|
|
10
9
|
message,
|
|
11
10
|
"aria-live": ariaLive,
|
|
12
11
|
id
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { lazy, Suspense } from "react";
|
|
4
3
|
import { WaitMessageLauncher } from "../modals/wait-message/wait-message-launcher.js";
|
|
5
|
-
const loadable = (importFunc, fallback = /* @__PURE__ */
|
|
4
|
+
const loadable = (importFunc, fallback = /* @__PURE__ */ jsx(WaitMessageLauncher, {})) => {
|
|
6
5
|
const LazyComponent = lazy(importFunc);
|
|
7
|
-
return (props) => /* @__PURE__ */
|
|
8
|
-
fallback
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
return (props) => /* @__PURE__ */ jsx(Suspense, {
|
|
7
|
+
fallback,
|
|
8
|
+
children: /* @__PURE__ */ jsx(LazyComponent, {
|
|
9
|
+
...props
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
loadable
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useState } from "react";
|
|
4
3
|
import { useAppDispatch } from "../../data/react-redux.js";
|
|
5
4
|
import { login } from "../../utils/auth/index.js";
|
|
@@ -20,7 +19,9 @@ const Login = ({
|
|
|
20
19
|
}).catch(() => {
|
|
21
20
|
});
|
|
22
21
|
}, [dispatch, clientId, scope, responseType]);
|
|
23
|
-
return userAuthorized ? /* @__PURE__ */
|
|
22
|
+
return userAuthorized ? /* @__PURE__ */ jsx(Fragment, {
|
|
23
|
+
children
|
|
24
|
+
}) : null;
|
|
24
25
|
};
|
|
25
26
|
export {
|
|
26
27
|
Login
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { persistentStorage } from "../../../utils/web-storage.js";
|
|
3
2
|
import { CMicroAppHost } from "../../../utils/micro-frontend/host.js";
|
|
4
3
|
import { getLogger } from "../../../utils/micro-frontend/index.js";
|
|
@@ -36,7 +35,9 @@ const initApplication = async ({
|
|
|
36
35
|
const app = (window.emui || {})[id] || {};
|
|
37
36
|
const { init } = app;
|
|
38
37
|
if (!init || typeof init !== "function")
|
|
39
|
-
throw new Error(
|
|
38
|
+
throw new Error(
|
|
39
|
+
`Application ${name} with id ${id} doesn't expose init method.`
|
|
40
|
+
);
|
|
40
41
|
const prevState = await persistentStorage.get(`state-${id}`);
|
|
41
42
|
return init({
|
|
42
43
|
host: CMicroAppHost.getInstance(),
|
|
@@ -54,7 +55,9 @@ const mountApp = async ({ id, name }) => {
|
|
|
54
55
|
const app = (window.emui || {})[id] || {};
|
|
55
56
|
const { mount } = app;
|
|
56
57
|
if (!mount || typeof mount !== "function")
|
|
57
|
-
throw new Error(
|
|
58
|
+
throw new Error(
|
|
59
|
+
`Application ${name} with id ${id} doesn't expose mount method.`
|
|
60
|
+
);
|
|
58
61
|
return mount({
|
|
59
62
|
containerId: `${APP_CONTAINER_ID_PREFIX}${id}`,
|
|
60
63
|
hostBreakpoint: getCurrentBreakpoint(),
|
|
@@ -69,7 +72,9 @@ const unmountApp = async ({ id, name }) => {
|
|
|
69
72
|
if (!unmount)
|
|
70
73
|
return null;
|
|
71
74
|
if (typeof unmount !== "function")
|
|
72
|
-
throw new Error(
|
|
75
|
+
throw new Error(
|
|
76
|
+
`unmount failed for application ${name} with id ${id}. unmount is not a valid function`
|
|
77
|
+
);
|
|
73
78
|
const currentState = await unmount({
|
|
74
79
|
containerId: `${APP_CONTAINER_ID_PREFIX}${id}`
|
|
75
80
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { memo } from "react";
|
|
4
3
|
import styled from "styled-components";
|
|
5
4
|
import { APP_CONTAINER_ID_PREFIX } from "./const.js";
|
|
@@ -10,7 +9,7 @@ const Div = styled.div`
|
|
|
10
9
|
`;
|
|
11
10
|
const MicroApp = memo((props) => {
|
|
12
11
|
useAppWillRender(props);
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsx(Div, {
|
|
14
13
|
id: `${APP_CONTAINER_ID_PREFIX}${props.id}`
|
|
15
14
|
});
|
|
16
15
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { getHTTPClient } from "../../../communication/http-client/index.js";
|
|
3
2
|
import { removeDoubleSlash } from "../../../utils/url.js";
|
|
4
3
|
import { getLogger } from "../../../utils/micro-frontend/index.js";
|
|
@@ -9,9 +8,16 @@ const getAppManifest = async ({
|
|
|
9
8
|
manifestPath
|
|
10
9
|
}) => {
|
|
11
10
|
if (!hostUrl || !manifestPath)
|
|
12
|
-
throw new Error(
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
throw new Error(
|
|
12
|
+
"Unable to get app manifest. hostUrl and manifestPath are required."
|
|
13
|
+
);
|
|
14
|
+
const url = new URL(
|
|
15
|
+
`${manifestPath.replace(/\/?$/, "/")}manifest.json`,
|
|
16
|
+
hostUrl
|
|
17
|
+
);
|
|
18
|
+
const response = await getHTTPClient().get(
|
|
19
|
+
removeDoubleSlash(url.href)
|
|
20
|
+
);
|
|
15
21
|
const { headers } = response;
|
|
16
22
|
if (headers["content-type"] && headers["content-type"].includes("application/json"))
|
|
17
23
|
return response.data;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { useRef, useLayoutEffect, useCallback } from "react";
|
|
3
2
|
import { merge } from "lodash";
|
|
4
3
|
import { useDispatch } from "react-redux";
|
|
@@ -24,34 +23,43 @@ const useAppWillRender = ({
|
|
|
24
23
|
}) => {
|
|
25
24
|
const dispatch = useDispatch ? useDispatch() : null;
|
|
26
25
|
const ref = useRef(Promise.resolve());
|
|
27
|
-
const getConfig = useCallback(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
26
|
+
const getConfig = useCallback(
|
|
27
|
+
() => getMicroFrontEndAppConfig({
|
|
28
|
+
id
|
|
29
|
+
}),
|
|
30
|
+
[id]
|
|
31
|
+
);
|
|
32
|
+
const unload = useCallback(
|
|
33
|
+
async (appConfig, loadFailed = false) => {
|
|
34
|
+
await unmountApp(appConfig);
|
|
35
|
+
unloadApp(appConfig);
|
|
36
|
+
if (!loadFailed && onUnloadComplete)
|
|
37
|
+
onUnloadComplete();
|
|
38
|
+
},
|
|
39
|
+
[]
|
|
40
|
+
);
|
|
41
|
+
const load = useCallback(
|
|
42
|
+
async (appConfig) => {
|
|
43
|
+
if (dispatch)
|
|
44
|
+
dispatch(waitMessage.open());
|
|
45
|
+
try {
|
|
46
|
+
if (ref.current)
|
|
47
|
+
await ref.current;
|
|
48
|
+
await loadApp(appConfig);
|
|
49
|
+
await mountApp(appConfig);
|
|
50
|
+
} catch (ex) {
|
|
51
|
+
getLogger().error({
|
|
52
|
+
...logRecords.APP_CONFIG_LOAD_FAILED,
|
|
53
|
+
exception: ex
|
|
54
|
+
});
|
|
55
|
+
await unload(appConfig, true);
|
|
56
|
+
throw ex;
|
|
57
|
+
}
|
|
58
|
+
if (dispatch)
|
|
59
|
+
dispatch(waitMessage.close());
|
|
60
|
+
},
|
|
61
|
+
[dispatch, unload]
|
|
62
|
+
);
|
|
55
63
|
useLayoutEffect(() => {
|
|
56
64
|
if (!documentEle)
|
|
57
65
|
return () => {
|