@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.
- package/dist/cjs/analytics/appdynamics.js +15 -1
- package/dist/cjs/analytics/index.js +15 -1
- package/dist/cjs/analytics/web-analytics.js +15 -1
- package/dist/cjs/communication/http-client/index.js +42 -9
- package/dist/cjs/data/reducers.js +17 -4
- package/dist/cjs/package.json +7 -1
- package/dist/cjs/sideeffect/auth/index.js +21 -6
- package/dist/cjs/sideeffect/error-toast/index.js +19 -3
- package/dist/cjs/sideeffect/wait-message/index.js +21 -6
- package/dist/cjs/utils/auth/index.js +21 -6
- package/dist/cjs/utils/service-worker.js +2 -3
- package/dist/cjs/utils/storybook/theme.js +39 -9
- package/dist/cjs/utils/testing/index.js +15 -1
- package/dist/cjs/utils/testing/render-with-redux.js +20 -4
- package/dist/cjs/utils/testing/render-with-router-redux.js +22 -6
- package/dist/cjs/utils/testing/render-with-router.js +19 -3
- package/dist/cjs/utils/testing/render-with-state-addons.js +39 -10
- package/dist/cjs/view/app-root/index.js +15 -5
- package/dist/cjs/view/app-router.js +33 -4
- package/dist/cjs/view/error-boundary/index.js +19 -3
- package/dist/cjs/view/error-toast/index.js +19 -9
- package/dist/cjs/view/fetch-host-app-data/store.js +15 -1
- package/dist/cjs/view/fields/check-box/index.js +42 -9
- package/dist/cjs/view/fields/combo-box/index.js +54 -18
- package/dist/cjs/view/fields/connect-form.js +15 -3
- package/dist/cjs/view/fields/date-input/index.js +44 -15
- package/dist/cjs/view/fields/date-picker/index.js +44 -15
- package/dist/cjs/view/fields/form-item-layout/index.js +41 -13
- package/dist/cjs/view/fields/form-layout-block-item/index.js +46 -16
- package/dist/cjs/view/fields/input-mask/index.js +43 -15
- package/dist/cjs/view/fields/large-text-box/index.js +44 -15
- package/dist/cjs/view/fields/radio/index.js +53 -17
- package/dist/cjs/view/fields/radio-group/index.js +43 -10
- package/dist/cjs/view/fields/text-box/index.js +44 -15
- package/dist/cjs/view/form/index.js +17 -6
- package/dist/cjs/view/form/submit-button/index.js +33 -4
- package/dist/cjs/view/loadable/index.js +15 -3
- package/dist/cjs/view/micro-app/app-factory/index.js +18 -1
- package/dist/cjs/view/micro-app/use-app-will-render.js +19 -3
- package/dist/cjs/view/micro-iframe-app/app.js +39 -10
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +21 -4
- package/dist/cjs/view/micro-iframe-app/index.js +33 -4
- package/dist/cjs/view/modals/wait-message/index.js +41 -9
- package/dist/cjs/view/visually-hidden/index.js +17 -4
- package/dist/esm/analytics/appdynamics.js +34 -0
- package/dist/esm/analytics/index.js +43 -0
- package/dist/{es → esm}/analytics/page-view-event.js +0 -0
- package/dist/{es → esm}/analytics/user-session-event.js +0 -0
- package/dist/{es → esm}/analytics/user-wait-event.js +0 -0
- package/dist/esm/analytics/web-analytics.js +30 -0
- package/dist/{es → esm}/api/auth/index.js +0 -0
- package/dist/{es → esm}/api/helpers.js +0 -0
- package/dist/{es → esm}/api/users/index.js +0 -0
- package/dist/{es → esm}/api/users/users.json +0 -0
- package/dist/{es → esm}/app.config.json +0 -0
- package/dist/esm/communication/http-client/index.js +70 -0
- package/dist/{es → esm}/communication/http-client/request-interceptor.js +0 -0
- package/dist/{es → esm}/communication/http-client/response-interceptor.js +0 -0
- package/dist/{es → esm}/communication/http-client/retry-axios.js +0 -0
- package/dist/{es → esm}/communication/http-client/retry.js +0 -0
- package/dist/{es → esm}/data/auth/actions.js +0 -0
- package/dist/{es → esm}/data/auth/reducer.js +0 -0
- package/dist/{es → esm}/data/breakpoint/index.js +0 -0
- package/dist/{es → esm}/data/error/index.js +0 -0
- package/dist/{es → esm}/data/index.js +0 -0
- package/dist/{es → esm}/data/live-message/index.js +0 -0
- package/dist/{es → esm}/data/logout/actions.js +0 -0
- package/dist/{es → esm}/data/navigation-prompt/actions.js +0 -0
- package/dist/{es → esm}/data/react-redux.js +0 -0
- package/dist/esm/data/reducers.js +33 -0
- package/dist/{es → esm}/data/saga.js +0 -0
- package/dist/{es → esm}/data/store.js +0 -0
- package/dist/{es → esm}/data/wait-message/actions.js +0 -0
- package/dist/{es → esm}/data/wait-message/reducer.js +0 -0
- package/dist/{es → esm}/data/webpack-hmr.js +0 -0
- package/dist/{es → esm}/index.js +0 -0
- package/dist/{es → esm}/index.pug +0 -0
- package/dist/{es → esm}/micro-frontend.js +0 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/sideeffect/auth/index.js +64 -0
- package/dist/esm/sideeffect/error-toast/index.js +43 -0
- package/dist/esm/sideeffect/wait-message/index.js +55 -0
- package/dist/{es → esm}/typings/custom.d.js +0 -0
- package/dist/{es → esm}/typings/elliemae.d.js +0 -0
- package/dist/{es → esm}/typings/styled.d.js +0 -0
- package/dist/{es → esm}/typings/thirdparty.d.js +0 -0
- package/dist/{es → esm}/utils/app-config/config.js +0 -0
- package/dist/{es → esm}/utils/app-config/index.js +0 -0
- package/dist/{es → esm}/utils/app-host-integration/react.js +0 -0
- package/dist/{es → esm}/utils/auth/helper.js +0 -0
- package/dist/{es → esm}/utils/auth/index.js +23 -6
- package/dist/{es → esm}/utils/await.js +0 -0
- package/dist/{es → esm}/utils/constants.js +0 -0
- package/dist/{es → esm}/utils/font-size.js +0 -0
- package/dist/{es → esm}/utils/guest-with-service.js +0 -0
- package/dist/{es → esm}/utils/helpers.js +0 -0
- package/dist/{es → esm}/utils/history.js +0 -0
- package/dist/{es → esm}/utils/log-records.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/console-logger.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/guest.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/host.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/index.js +0 -0
- package/dist/{es → esm}/utils/micro-frontend/types.js +0 -0
- package/dist/{es → esm}/utils/redact-pii.js +0 -0
- package/dist/{es → esm}/utils/service-worker.js +2 -3
- package/dist/{es → esm}/utils/session.js +0 -0
- package/dist/{es → esm}/utils/storybook/manager.js +0 -0
- package/dist/{es → esm}/utils/storybook/preview.js +0 -0
- package/dist/esm/utils/storybook/theme.js +45 -0
- package/dist/esm/utils/testing/index.js +38 -0
- package/dist/esm/utils/testing/render-with-redux.js +35 -0
- package/dist/esm/utils/testing/render-with-router-redux.js +41 -0
- package/dist/esm/utils/testing/render-with-router.js +37 -0
- package/dist/esm/utils/testing/render-with-state-addons.js +69 -0
- package/dist/{es → esm}/utils/types.js +0 -0
- package/dist/{es → esm}/utils/url.js +0 -0
- package/dist/{es → esm}/utils/web-storage.js +0 -0
- package/dist/{es → esm}/utils/window.js +0 -0
- package/dist/{es → esm}/view/app-root/hosted-app.js +0 -0
- package/dist/{es → esm}/view/app-root/index.js +17 -5
- package/dist/{es → esm}/view/app-root/stand-alone-app.js +0 -0
- package/dist/{es → esm}/view/app-root/style.js +0 -0
- package/dist/esm/view/app-router.js +50 -0
- package/dist/{es → esm}/view/breakpoint/use-breakpoint.js +0 -0
- package/dist/{es → esm}/view/breakpoint/use-media-query-list.js +0 -0
- package/dist/{es → esm}/view/error-boundary/default-error-template.js +0 -0
- package/dist/esm/view/error-boundary/index.js +54 -0
- package/dist/esm/view/error-toast/index.js +42 -0
- package/dist/{es → esm}/view/fetch-host-app-data/index.js +0 -0
- package/dist/esm/view/fetch-host-app-data/store.js +28 -0
- package/dist/esm/view/fields/check-box/index.js +52 -0
- package/dist/esm/view/fields/combo-box/index.js +64 -0
- package/dist/esm/view/fields/connect-form.js +24 -0
- package/dist/esm/view/fields/date-input/index.js +53 -0
- package/dist/esm/view/fields/date-picker/index.js +53 -0
- package/dist/esm/view/fields/form-item-layout/index.js +50 -0
- package/dist/esm/view/fields/form-layout-block-item/index.js +57 -0
- package/dist/esm/view/fields/input-mask/index.js +59 -0
- package/dist/esm/view/fields/large-text-box/index.js +53 -0
- package/dist/esm/view/fields/radio/index.js +62 -0
- package/dist/esm/view/fields/radio-group/index.js +52 -0
- package/dist/esm/view/fields/text-box/index.js +53 -0
- package/dist/{es → esm}/view/fields/watch-value.js +0 -0
- package/dist/esm/view/form/index.js +46 -0
- package/dist/{es → esm}/view/form/personal-info-section.js +0 -0
- package/dist/esm/view/form/submit-button/index.js +48 -0
- package/dist/{es → esm}/view/guest-unload-handlers/index.js +0 -0
- package/dist/{es → esm}/view/host-binding-events/index.js +0 -0
- package/dist/{es → esm}/view/intro.stories.mdx +0 -0
- package/dist/{es → esm}/view/live-message/index.js +0 -0
- package/dist/esm/view/loadable/index.js +28 -0
- package/dist/{es → esm}/view/login/index.js +0 -0
- package/dist/{es → esm}/view/message-to-host-app/index.js +0 -0
- package/dist/{es → esm}/view/micro-app/app-factory/index.js +20 -1
- package/dist/{es → esm}/view/micro-app/const.js +0 -0
- package/dist/{es → esm}/view/micro-app/index.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/manifest.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/script.js +0 -0
- package/dist/{es → esm}/view/micro-app/resources/style.js +0 -0
- package/dist/{es → esm}/view/micro-app/types.js +0 -0
- package/dist/{es → esm}/view/micro-app/use-app-will-render.js +21 -3
- package/dist/{es → esm}/view/micro-app/utils.js +0 -0
- package/dist/esm/view/micro-iframe-app/app.js +58 -0
- package/dist/{es → esm}/view/micro-iframe-app/iframe/const.js +0 -0
- package/dist/{es → esm}/view/micro-iframe-app/iframe/index.html +0 -0
- package/dist/esm/view/micro-iframe-app/iframe/index.js +54 -0
- package/dist/esm/view/micro-iframe-app/index.js +57 -0
- package/dist/{es → esm}/view/micro-iframe-app/types.js +0 -0
- package/dist/{es → esm}/view/micro-iframe-app/use-frame-loaded.js +0 -0
- package/dist/{es → esm}/view/modals/error/index.js +0 -0
- package/dist/{es → esm}/view/modals/navigation-prompt/index.js +0 -0
- package/dist/{es → esm}/view/modals/session-expiry/customHooks.js +0 -0
- package/dist/{es → esm}/view/modals/session-expiry/index.js +0 -0
- package/dist/esm/view/modals/wait-message/index.js +69 -0
- package/dist/{es → esm}/view/modals/wait-message/use-html-wait-message.js +0 -0
- package/dist/{es → esm}/view/modals/wait-message/wait-message-launcher.js +0 -0
- package/dist/{es → esm}/view/page.js +0 -0
- package/dist/{es → esm}/view/render-with-delay/index.js +0 -0
- package/dist/{es → esm}/view/render-with-host-data/index.js +0 -0
- package/dist/{es → esm}/view/require-auth.js +0 -0
- package/dist/{es → esm}/view/session-timeout/index.js +0 -0
- package/dist/{es → esm}/view/storybook/decorator.js +0 -0
- package/dist/{es → esm}/view/use-previous.js +0 -0
- package/dist/{es → esm}/view/use-window-size-change.js +0 -0
- package/dist/esm/view/visually-hidden/index.js +37 -0
- package/dist/types/data/store.d.ts +2 -2
- package/dist/types/utils/testing/render-with-redux.d.ts +3 -3
- package/dist/types/utils/testing/render-with-router-redux.d.ts +3 -3
- package/dist/types/utils/testing/render-with-router.d.ts +1 -1
- package/dist/types/view/fields/input-mask/index.d.ts +1 -1
- package/package.json +39 -39
- package/dist/es/analytics/appdynamics.js +0 -18
- package/dist/es/analytics/index.js +0 -27
- package/dist/es/analytics/web-analytics.js +0 -14
- package/dist/es/communication/http-client/index.js +0 -35
- package/dist/es/data/reducers.js +0 -18
- package/dist/es/package.json +0 -1
- package/dist/es/sideeffect/auth/index.js +0 -47
- package/dist/es/sideeffect/error-toast/index.js +0 -25
- package/dist/es/sideeffect/wait-message/index.js +0 -38
- package/dist/es/utils/storybook/theme.js +0 -13
- package/dist/es/utils/testing/index.js +0 -22
- package/dist/es/utils/testing/render-with-redux.js +0 -17
- package/dist/es/utils/testing/render-with-router-redux.js +0 -23
- package/dist/es/utils/testing/render-with-router.js +0 -19
- package/dist/es/utils/testing/render-with-state-addons.js +0 -38
- package/dist/es/view/app-router.js +0 -19
- package/dist/es/view/error-boundary/index.js +0 -36
- package/dist/es/view/error-toast/index.js +0 -30
- package/dist/es/view/fetch-host-app-data/store.js +0 -12
- package/dist/es/view/fields/check-box/index.js +0 -17
- package/dist/es/view/fields/combo-box/index.js +0 -26
- package/dist/es/view/fields/connect-form.js +0 -10
- package/dist/es/view/fields/date-input/index.js +0 -22
- package/dist/es/view/fields/date-picker/index.js +0 -22
- package/dist/es/view/fields/form-item-layout/index.js +0 -20
- package/dist/es/view/fields/form-layout-block-item/index.js +0 -25
- package/dist/es/view/fields/input-mask/index.js +0 -29
- package/dist/es/view/fields/large-text-box/index.js +0 -22
- package/dist/es/view/fields/radio/index.js +0 -24
- package/dist/es/view/fields/radio-group/index.js +0 -17
- package/dist/es/view/fields/text-box/index.js +0 -22
- package/dist/es/view/form/index.js +0 -33
- package/dist/es/view/form/submit-button/index.js +0 -17
- package/dist/es/view/loadable/index.js +0 -14
- package/dist/es/view/micro-iframe-app/app.js +0 -27
- package/dist/es/view/micro-iframe-app/iframe/index.js +0 -35
- package/dist/es/view/micro-iframe-app/index.js +0 -26
- package/dist/es/view/modals/wait-message/index.js +0 -35
- 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,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
|
-
};
|