@elliemae/pui-app-sdk 2.12.3 → 2.13.2
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 +36 -0
- package/dist/cjs/analytics/index.js +15 -13
- package/dist/cjs/analytics/page-view-event.js +16 -19
- package/dist/cjs/analytics/user-session-event.js +13 -14
- package/dist/cjs/analytics/user-wait-event.js +4 -4
- package/dist/cjs/analytics/{ba-event-parameters.js → web-analytics.js} +2 -2
- package/dist/cjs/api/auth/index.js +13 -20
- package/dist/cjs/api/helpers.js +4 -16
- package/dist/cjs/api/users/index.js +4 -5
- package/dist/cjs/communication/http-client/index.js +16 -21
- package/dist/cjs/communication/http-client/retry-axios.js +0 -2
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +5 -6
- package/dist/cjs/data/auth/actions.js +22 -28
- package/dist/cjs/data/breakpoint/index.js +1 -3
- package/dist/cjs/data/live-message/index.js +8 -11
- package/dist/cjs/data/reducers.js +1 -2
- package/dist/cjs/data/store.js +4 -8
- package/dist/cjs/data/wait-message/actions.js +6 -9
- package/dist/cjs/data/wait-message/reducer.js +13 -17
- package/dist/cjs/index.js +21 -15
- package/dist/cjs/route/index.js +23 -12
- package/dist/cjs/route/{usePageView.js → page-view.js} +12 -22
- package/dist/cjs/route/private-route/index.js +9 -10
- package/dist/cjs/sideeffect/auth/index.js +6 -10
- package/dist/cjs/utils/app-config/config.js +3 -14
- package/dist/cjs/utils/app-config/index.js +11 -15
- package/dist/cjs/utils/app-host-integration/react.js +7 -10
- package/dist/cjs/utils/auth/index.js +40 -44
- package/dist/cjs/utils/font-size.js +1 -1
- package/dist/cjs/utils/helpers.js +0 -6
- package/dist/cjs/utils/log-records.js +7 -7
- package/dist/cjs/utils/micro-frontend/guest.js +31 -8
- package/dist/cjs/utils/micro-frontend/host.js +14 -7
- package/dist/cjs/utils/micro-frontend/index.js +2 -4
- package/dist/cjs/utils/redact-pii.js +39 -0
- package/dist/cjs/utils/service-worker.js +2 -5
- package/dist/cjs/utils/session.js +2 -8
- package/dist/cjs/utils/storybook/theme.js +9 -12
- package/dist/cjs/utils/testing/index.js +9 -18
- package/dist/cjs/utils/testing/render-with-redux.js +11 -14
- package/dist/cjs/utils/testing/render-with-router-redux.js +17 -20
- package/dist/cjs/utils/testing/render-with-router.js +13 -16
- package/dist/cjs/utils/testing/render-with-state-addons.js +7 -16
- package/dist/cjs/utils/url.js +0 -8
- package/dist/cjs/utils/web-storage.js +1 -7
- package/dist/cjs/utils/window.js +0 -2
- package/dist/cjs/view/app-root/hosted-app.js +5 -8
- package/dist/cjs/view/app-root/index.js +20 -23
- package/dist/cjs/view/app-root/stand-alone-app.js +5 -8
- package/dist/cjs/view/app-root/style.js +5 -12
- package/dist/cjs/view/error-toast/index.stories.js +22 -31
- package/dist/cjs/view/fetch-host-app-data/store.js +1 -5
- package/dist/cjs/view/fields/check-box/index.js +20 -32
- package/dist/cjs/view/fields/check-box/index.stories.js +20 -24
- package/dist/cjs/view/fields/check-box/set-value.stories.js +17 -21
- package/dist/cjs/view/fields/combo-box/index.js +22 -28
- package/dist/cjs/view/fields/connect-form.js +3 -4
- package/dist/cjs/view/fields/date-input/index.js +15 -21
- package/dist/cjs/view/fields/date-picker/index.js +15 -21
- package/dist/cjs/view/fields/form-item-layout/index.js +16 -20
- package/dist/cjs/view/fields/input-mask/index.js +16 -28
- package/dist/cjs/view/fields/large-text-box/index.js +15 -21
- package/dist/cjs/view/fields/radio/index.js +20 -26
- package/dist/cjs/view/fields/radio/index.stories.js +17 -21
- package/dist/cjs/view/fields/radio/set-value.stories.js +15 -19
- package/dist/cjs/view/fields/radio-group/index.js +16 -22
- package/dist/cjs/view/fields/radio-group/index.stories.js +37 -44
- package/dist/cjs/view/fields/text-box/index.js +15 -21
- package/dist/cjs/view/fields/watch-value.js +4 -5
- package/dist/cjs/view/form/index.js +9 -10
- package/dist/cjs/view/form/index.stories.js +3 -6
- package/dist/cjs/view/form/submit-button/index.js +2 -3
- package/dist/cjs/view/form/usecases.stories.js +3 -6
- package/dist/cjs/view/guest-unload-handlers/index.js +1 -2
- package/dist/cjs/view/header/center-region/index.js +8 -20
- package/dist/cjs/view/header/index.js +8 -11
- package/dist/cjs/view/host-binding-events/index.js +2 -2
- package/dist/cjs/view/live-message/index.stories.js +0 -6
- package/dist/cjs/view/loadable/index.js +1 -2
- package/dist/cjs/view/login/index.js +5 -6
- package/dist/cjs/view/media-breakpoint/index.js +1 -1
- package/dist/cjs/view/message-to-host-app/index.js +1 -2
- package/dist/cjs/view/micro-app/app-factory/index.js +30 -48
- package/dist/cjs/view/micro-app/index.js +1 -1
- package/dist/cjs/view/micro-app/resources/manifest.js +27 -39
- package/dist/cjs/view/micro-app/resources/script.js +22 -35
- package/dist/cjs/view/micro-app/resources/style.js +20 -33
- package/dist/cjs/view/micro-app/use-app-will-render.js +12 -12
- package/dist/cjs/view/micro-app/utils.js +0 -6
- package/dist/cjs/view/micro-iframe-app/app.js +6 -9
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +8 -9
- package/dist/cjs/view/micro-iframe-app/index.js +4 -7
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +5 -12
- package/dist/cjs/view/modals/error/index.js +6 -13
- package/dist/cjs/view/modals/navigation-prompt/index.js +4 -11
- package/dist/cjs/view/modals/session-expiry/customHooks.js +3 -5
- package/dist/cjs/view/modals/session-expiry/index.js +6 -13
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +3 -4
- package/dist/cjs/view/modals/wait-message/index.js +8 -9
- package/dist/cjs/view/modals/wait-message/index.stories.js +4 -5
- package/dist/cjs/view/render-with-delay/index.js +3 -6
- package/dist/cjs/view/render-with-host-data/index.js +0 -2
- package/dist/cjs/view/session-timeout/index.js +0 -2
- package/dist/cjs/view/useMediaBreakpoints/index.js +0 -12
- package/dist/es/analytics/appdynamics.js +18 -0
- package/dist/es/analytics/index.js +14 -13
- package/dist/es/analytics/page-view-event.js +16 -19
- package/dist/es/analytics/user-session-event.js +12 -13
- package/dist/es/analytics/user-wait-event.js +4 -4
- package/dist/es/analytics/{ba-event-parameters.js → web-analytics.js} +2 -2
- package/dist/es/api/auth/index.js +13 -18
- package/dist/es/api/helpers.js +4 -14
- package/dist/es/api/users/index.js +4 -5
- package/dist/es/communication/http-client/index.js +16 -20
- package/dist/es/communication/http-client/retry-axios.js +0 -2
- package/dist/es/communication/http-client/tests/index.test-disable.js +5 -6
- package/dist/es/data/auth/actions.js +22 -28
- package/dist/es/data/breakpoint/index.js +1 -3
- package/dist/es/data/live-message/index.js +8 -11
- package/dist/es/data/reducers.js +1 -2
- package/dist/es/data/store.js +4 -8
- package/dist/es/data/wait-message/actions.js +6 -9
- package/dist/es/data/wait-message/reducer.js +12 -16
- package/dist/es/index.js +4 -1
- package/dist/es/route/index.js +23 -13
- package/dist/es/route/page-view.js +15 -0
- package/dist/es/route/private-route/index.js +9 -10
- package/dist/es/sideeffect/auth/index.js +6 -10
- package/dist/es/utils/app-config/config.js +3 -14
- package/dist/es/utils/app-config/index.js +11 -15
- package/dist/es/utils/app-host-integration/react.js +7 -10
- package/dist/es/utils/auth/index.js +39 -41
- package/dist/es/utils/font-size.js +1 -1
- package/dist/es/utils/helpers.js +0 -3
- package/dist/es/utils/log-records.js +7 -7
- package/dist/es/utils/micro-frontend/guest.js +29 -6
- package/dist/es/utils/micro-frontend/host.js +13 -7
- package/dist/es/utils/micro-frontend/index.js +2 -3
- package/dist/es/utils/redact-pii.js +31 -0
- package/dist/es/utils/service-worker.js +2 -4
- package/dist/es/utils/session.js +2 -8
- package/dist/es/utils/storybook/theme.js +9 -12
- package/dist/es/utils/testing/index.js +9 -12
- package/dist/es/utils/testing/render-with-redux.js +11 -14
- package/dist/es/utils/testing/render-with-router-redux.js +17 -20
- package/dist/es/utils/testing/render-with-router.js +13 -16
- package/dist/es/utils/testing/render-with-state-addons.js +7 -12
- package/dist/es/utils/url.js +0 -4
- package/dist/es/utils/web-storage.js +1 -4
- package/dist/es/utils/window.js +0 -1
- package/dist/es/view/app-root/hosted-app.js +5 -8
- package/dist/es/view/app-root/index.js +20 -23
- package/dist/es/view/app-root/stand-alone-app.js +5 -8
- package/dist/es/view/app-root/style.js +5 -10
- package/dist/es/view/error-toast/index.stories.js +22 -30
- package/dist/es/view/fetch-host-app-data/store.js +1 -5
- package/dist/es/view/fields/check-box/index.js +20 -26
- package/dist/es/view/fields/check-box/index.stories.js +20 -24
- package/dist/es/view/fields/check-box/set-value.stories.js +17 -21
- package/dist/es/view/fields/combo-box/index.js +22 -28
- package/dist/es/view/fields/connect-form.js +3 -4
- package/dist/es/view/fields/date-input/index.js +15 -21
- package/dist/es/view/fields/date-picker/index.js +15 -21
- package/dist/es/view/fields/form-item-layout/index.js +16 -20
- package/dist/es/view/fields/input-mask/index.js +16 -22
- package/dist/es/view/fields/large-text-box/index.js +15 -21
- package/dist/es/view/fields/radio/index.js +20 -26
- package/dist/es/view/fields/radio/index.stories.js +17 -21
- package/dist/es/view/fields/radio/set-value.stories.js +15 -19
- package/dist/es/view/fields/radio-group/index.js +16 -22
- package/dist/es/view/fields/radio-group/index.stories.js +37 -44
- package/dist/es/view/fields/text-box/index.js +15 -21
- package/dist/es/view/fields/watch-value.js +4 -5
- package/dist/es/view/form/index.js +9 -10
- package/dist/es/view/form/index.stories.js +3 -6
- package/dist/es/view/form/submit-button/index.js +2 -3
- package/dist/es/view/form/usecases.stories.js +3 -6
- package/dist/es/view/guest-unload-handlers/index.js +1 -2
- package/dist/es/view/header/center-region/index.js +8 -17
- package/dist/es/view/header/index.js +8 -11
- package/dist/es/view/host-binding-events/index.js +2 -2
- package/dist/es/view/live-message/index.stories.js +0 -1
- package/dist/es/view/loadable/index.js +1 -2
- package/dist/es/view/login/index.js +5 -6
- package/dist/es/view/media-breakpoint/index.js +1 -1
- package/dist/es/view/message-to-host-app/index.js +1 -2
- package/dist/es/view/micro-app/app-factory/index.js +30 -42
- package/dist/es/view/micro-app/index.js +1 -1
- package/dist/es/view/micro-app/resources/manifest.js +26 -31
- package/dist/es/view/micro-app/resources/script.js +21 -31
- package/dist/es/view/micro-app/resources/style.js +20 -30
- package/dist/es/view/micro-app/use-app-will-render.js +12 -12
- package/dist/es/view/micro-app/utils.js +0 -3
- package/dist/es/view/micro-iframe-app/app.js +6 -8
- package/dist/es/view/micro-iframe-app/iframe/index.js +8 -9
- package/dist/es/view/micro-iframe-app/index.js +4 -6
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +5 -9
- package/dist/es/view/modals/error/index.js +6 -8
- package/dist/es/view/modals/navigation-prompt/index.js +4 -5
- package/dist/es/view/modals/session-expiry/customHooks.js +3 -4
- package/dist/es/view/modals/session-expiry/index.js +6 -8
- package/dist/es/view/modals/wait-message/html-wait-message.js +3 -4
- package/dist/es/view/modals/wait-message/index.js +8 -9
- package/dist/es/view/modals/wait-message/index.stories.js +4 -5
- package/dist/es/view/render-with-delay/index.js +3 -5
- package/dist/es/view/render-with-host-data/index.js +0 -1
- package/dist/es/view/session-timeout/index.js +0 -1
- package/dist/es/view/useMediaBreakpoints/index.js +0 -6
- package/dist/types/analytics/appdynamics.d.ts +9 -0
- package/dist/types/analytics/index.d.ts +2 -2
- package/dist/types/analytics/web-analytics.d.ts +8 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/route/page-view.d.ts +1 -0
- package/dist/types/utils/micro-frontend/guest.d.ts +1 -0
- package/dist/types/utils/micro-frontend/host.d.ts +1 -1
- package/dist/types/utils/redact-pii.d.ts +1 -0
- package/dist/types/view/visually-hidden/index.d.ts +1 -1
- package/package.json +7 -3
- package/dist/es/route/usePageView.js +0 -18
- package/dist/public/app.config.json +0 -129
- package/dist/public/assets/index.ad459dcebaa616bff55e77d860405729.svg +0 -1
- package/dist/public/assets/index.dae17c8817fd9c5ab29e7c3a8925a1f4.svg +0 -1
- package/dist/public/assets/logo.0cbd33c5006f8ea6d106f8ab13f6e6dc.svg +0 -1
- package/dist/public/iframe.b3911eaf1a99a53ef7b10a1e1f0bdfc4.html +0 -8
- package/dist/public/index.html +0 -5
- package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js +0 -3
- package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.LICENSE.txt +0 -95
- package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.gz +0 -0
- package/dist/public/js/emuiAppSdk.e28a62497e211b4c6132.js.map +0 -1
- package/dist/types/analytics/ba-event-parameters.d.ts +0 -8
- package/dist/types/route/usePageView.d.ts +0 -1
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import "core-js/modules/esnext.async-iterator.for-each.js";
|
|
2
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
3
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
|
4
1
|
import localforage from 'localforage';
|
|
5
2
|
const STORAGE = 'storage';
|
|
6
3
|
const GET_SESSION_STORAGE = 'getSessionStorage';
|
|
@@ -30,7 +27,7 @@ export const persistentStorage = {
|
|
|
30
27
|
};
|
|
31
28
|
export const listenStorageEvents = () => {
|
|
32
29
|
window.addEventListener(STORAGE, onStorageChange);
|
|
33
|
-
if (isSessionStorageEmpty()) localStorage.setItem(GET_SESSION_STORAGE,
|
|
30
|
+
if (isSessionStorageEmpty()) localStorage.setItem(GET_SESSION_STORAGE, `${Date.now()}`);
|
|
34
31
|
};
|
|
35
32
|
export const removeStorageEvents = () => {
|
|
36
33
|
window.removeEventListener(STORAGE, onStorageChange);
|
package/dist/es/utils/window.js
CHANGED
|
@@ -7,14 +7,11 @@ import { MediaBreakpoint } from "../media-breakpoint/index.js";
|
|
|
7
7
|
import { WindowSize } from "../window-size/index.js";
|
|
8
8
|
import { HTMLWaitMessage } from "../modals/wait-message/html-wait-message.js";
|
|
9
9
|
import GlobalStyle from "./style.js";
|
|
10
|
-
export const HostedApp =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
close: true
|
|
16
|
-
})), children);
|
|
17
|
-
};
|
|
10
|
+
export const HostedApp = ({
|
|
11
|
+
children
|
|
12
|
+
}) => /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})), _HTMLWaitMessage || (_HTMLWaitMessage = /*#__PURE__*/_jsx(HTMLWaitMessage, {
|
|
13
|
+
close: true
|
|
14
|
+
})), children);
|
|
18
15
|
|
|
19
16
|
var _StyledDiv = /*#__PURE__*/_styled("div").withConfig({
|
|
20
17
|
componentId: "sc-njn2ro-0"
|
|
@@ -27,26 +27,23 @@ const AppToRender = props => {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export const AppRoot =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
WaitMessage: WaitMessage
|
|
51
|
-
}, void 0, children)))));
|
|
52
|
-
};
|
|
30
|
+
export const AppRoot = ({
|
|
31
|
+
store,
|
|
32
|
+
history,
|
|
33
|
+
theme = getDefaultTheme(),
|
|
34
|
+
manageSession = false,
|
|
35
|
+
WaitMessage,
|
|
36
|
+
errorTemplate,
|
|
37
|
+
children
|
|
38
|
+
}) => /*#__PURE__*/_jsx2(ErrorBoundary, {
|
|
39
|
+
errorTemplate: errorTemplate
|
|
40
|
+
}, void 0, /*#__PURE__*/_jsx2(Provider, {
|
|
41
|
+
store: store
|
|
42
|
+
}, void 0, /*#__PURE__*/_jsx2(Router, {
|
|
43
|
+
history: history
|
|
44
|
+
}, void 0, /*#__PURE__*/_jsx2(ThemeProvider, {
|
|
45
|
+
theme: theme
|
|
46
|
+
}, void 0, /*#__PURE__*/_jsx2(AppToRender, {
|
|
47
|
+
manageSession: manageSession,
|
|
48
|
+
WaitMessage: WaitMessage
|
|
49
|
+
}, void 0, children)))));
|
|
@@ -11,14 +11,11 @@ import { LiveMessage } from "../live-message/index.js";
|
|
|
11
11
|
import { ErrorToast } from "../error-toast/index.js";
|
|
12
12
|
import { WaitMessage as DefaultWaitMessage } from "../modals/wait-message/index.js";
|
|
13
13
|
import GlobalStyle from "./style.js";
|
|
14
|
-
export const StandAloneApp =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
20
|
-
return /*#__PURE__*/_jsx(LiveAnnouncer, {}, void 0, /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), manageSession && (_SessionTimeout || (_SessionTimeout = /*#__PURE__*/_jsx(SessionTimeout, {}))), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})), _LiveMessage || (_LiveMessage = /*#__PURE__*/_jsx(LiveMessage, {})), WaitMessage || _DefaultWaitMessage || (_DefaultWaitMessage = /*#__PURE__*/_jsx(DefaultWaitMessage, {})), _ErrorToast || (_ErrorToast = /*#__PURE__*/_jsx(ErrorToast, {})), children));
|
|
21
|
-
};
|
|
14
|
+
export const StandAloneApp = ({
|
|
15
|
+
manageSession,
|
|
16
|
+
WaitMessage,
|
|
17
|
+
children
|
|
18
|
+
}) => /*#__PURE__*/_jsx(LiveAnnouncer, {}, void 0, /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), manageSession && (_SessionTimeout || (_SessionTimeout = /*#__PURE__*/_jsx(SessionTimeout, {}))), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})), _LiveMessage || (_LiveMessage = /*#__PURE__*/_jsx(LiveMessage, {})), WaitMessage || _DefaultWaitMessage || (_DefaultWaitMessage = /*#__PURE__*/_jsx(DefaultWaitMessage, {})), _ErrorToast || (_ErrorToast = /*#__PURE__*/_jsx(ErrorToast, {})), children));
|
|
22
19
|
|
|
23
20
|
var _StyledDiv = /*#__PURE__*/_styled("div").withConfig({
|
|
24
21
|
componentId: "sc-1ho9g5n-0"
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
|
|
5
1
|
import { createGlobalStyle } from 'styled-components';
|
|
6
|
-
export default createGlobalStyle([":root{font-size:81.25%;", ";}html,body{height:100%;width:100%;line-height:", ";}body{font-family:", ";background-color:", ";}#app,#app-container,#root,main{height:100%;width:100%;min-height:100%;min-width:100%;}"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, props => props.theme.lineHeights.m, props => props.theme.fonts.default, props => props.theme.colors.neutral['000']);
|
|
2
|
+
export default createGlobalStyle([":root{font-size:81.25%;", ";}html,body{height:100%;width:100%;line-height:", ";}body{font-family:", ";background-color:", ";}#app,#app-container,#root,main{height:100%;width:100%;min-height:100%;min-width:100%;}"], ({
|
|
3
|
+
theme
|
|
4
|
+
}) => theme.media.small`
|
|
5
|
+
font-size: 100%;
|
|
6
|
+
`, props => props.theme.lineHeights.m, props => props.theme.fonts.default, props => props.theme.colors.neutral['000']);
|
|
@@ -2,7 +2,6 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
|
|
3
3
|
var _ErrorToast, _Renderer, _Renderer2;
|
|
4
4
|
|
|
5
|
-
import "core-js/modules/web.dom-collections.iterator.js";
|
|
6
5
|
import { useEffect, useState } from 'react';
|
|
7
6
|
import { ToastType } from '@elliemae/ds-basic/Toast';
|
|
8
7
|
import DSButton from '@elliemae/ds-basic/Button';
|
|
@@ -17,10 +16,9 @@ export default {
|
|
|
17
16
|
Component: ErrorToast
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
const Renderer =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
19
|
+
const Renderer = ({
|
|
20
|
+
Comp
|
|
21
|
+
}) => {
|
|
24
22
|
const [show, setShow] = useState(false);
|
|
25
23
|
useEffect(() => {
|
|
26
24
|
setShow(true);
|
|
@@ -44,20 +42,17 @@ export const BasicError = () => _Renderer || (_Renderer = /*#__PURE__*/_jsx(Rend
|
|
|
44
42
|
Comp: Basic
|
|
45
43
|
})); // Action wrappers for readability
|
|
46
44
|
|
|
47
|
-
const showToast =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
...props
|
|
59
|
-
});
|
|
60
|
-
};
|
|
45
|
+
const showToast = ({
|
|
46
|
+
messageText = 'Toast Message',
|
|
47
|
+
type = ToastType.DEFAULT,
|
|
48
|
+
...props
|
|
49
|
+
}) => error.set({
|
|
50
|
+
type,
|
|
51
|
+
messageText,
|
|
52
|
+
messageTitle: type,
|
|
53
|
+
containerId: 'app-toast',
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
61
56
|
|
|
62
57
|
const successToast = props => showToast({ ...props,
|
|
63
58
|
type: ToastType.SUCCESS
|
|
@@ -75,17 +70,14 @@ const errorToast = props => showToast({ ...props,
|
|
|
75
70
|
type: ToastType.ERROR
|
|
76
71
|
});
|
|
77
72
|
|
|
78
|
-
const ToastButton =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onClick: onClick
|
|
87
|
-
});
|
|
88
|
-
};
|
|
73
|
+
const ToastButton = ({
|
|
74
|
+
labelText,
|
|
75
|
+
onClick
|
|
76
|
+
}) => /*#__PURE__*/_jsx(DSButton, {
|
|
77
|
+
buttonType: "text",
|
|
78
|
+
labelText: labelText,
|
|
79
|
+
onClick: onClick
|
|
80
|
+
});
|
|
89
81
|
|
|
90
82
|
const ToastMultipleTypes = () => {
|
|
91
83
|
const dispatch = useAppDispatch();
|
|
@@ -5,9 +5,5 @@ export const setHostAppData = appData => {
|
|
|
5
5
|
...appData
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
export const getHostAppDataByKey =
|
|
9
|
-
let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
10
|
-
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
11
|
-
return _get(hostAppData, key, defaultValue);
|
|
12
|
-
};
|
|
8
|
+
export const getHostAppDataByKey = (key = '', defaultValue = null) => _get(hostAppData, key, defaultValue);
|
|
13
9
|
export const isHostAppDataExist = () => hostAppData && Object.keys(hostAppData).length > 0;
|
|
@@ -2,31 +2,25 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSCheckbox, { CHECKBOX_VARIANT } from '@elliemae/ds-basic/form/Checkbox';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const CheckBox =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onChange,
|
|
19
|
-
value,
|
|
20
|
-
...restProps
|
|
21
|
-
}
|
|
22
|
-
} = _ref2;
|
|
23
|
-
return /*#__PURE__*/_jsx(DSCheckbox, { ...rest,
|
|
24
|
-
...restProps,
|
|
25
|
-
defaultChecked: defaultChecked,
|
|
26
|
-
checked: value,
|
|
27
|
-
onChange: e => onChange(((e || {}).target || {}).checked)
|
|
28
|
-
});
|
|
5
|
+
export const CheckBox = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultChecked = false,
|
|
8
|
+
rules = {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
11
|
+
name: name,
|
|
12
|
+
rules: rules,
|
|
13
|
+
render: ({
|
|
14
|
+
field: {
|
|
15
|
+
onChange,
|
|
16
|
+
value,
|
|
17
|
+
...restProps
|
|
29
18
|
}
|
|
30
|
-
})
|
|
31
|
-
|
|
19
|
+
}) => /*#__PURE__*/_jsx(DSCheckbox, { ...rest,
|
|
20
|
+
...restProps,
|
|
21
|
+
defaultChecked: defaultChecked,
|
|
22
|
+
checked: value,
|
|
23
|
+
onChange: e => onChange(((e || {}).target || {}).checked)
|
|
24
|
+
})
|
|
25
|
+
});
|
|
32
26
|
export { CHECKBOX_VARIANT };
|
|
@@ -6,32 +6,28 @@ import { ConnectForm } from "../connect-form.js";
|
|
|
6
6
|
import { WatchValue } from "../watch-value.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
|
-
const Template =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref2;
|
|
20
|
-
const errField = get(errors, name);
|
|
21
|
-
const hasError = !!errField; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
9
|
+
const Template = ({
|
|
10
|
+
name,
|
|
11
|
+
...rest
|
|
12
|
+
}) => /*#__PURE__*/_jsx2(Form, {}, void 0, /*#__PURE__*/_jsx2(ConnectForm, {}, void 0, ({
|
|
13
|
+
formState: {
|
|
14
|
+
errors
|
|
15
|
+
}
|
|
16
|
+
}) => {
|
|
17
|
+
const errField = get(errors, name);
|
|
18
|
+
const hasError = !!errField; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
name: name,
|
|
26
|
-
...rest,
|
|
27
|
-
hasError: hasError,
|
|
28
|
-
variant: ctrlVariant
|
|
29
|
-
});
|
|
30
|
-
}), /*#__PURE__*/_jsx(WatchValue, {
|
|
20
|
+
const ctrlVariant = hasError ? CHECKBOX_VARIANT.ERROR : CHECKBOX_VARIANT.DEFAULT;
|
|
21
|
+
return /*#__PURE__*/_jsx(CheckBox, {
|
|
31
22
|
name: name,
|
|
32
|
-
...rest
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
...rest,
|
|
24
|
+
hasError: hasError,
|
|
25
|
+
variant: ctrlVariant
|
|
26
|
+
});
|
|
27
|
+
}), /*#__PURE__*/_jsx(WatchValue, {
|
|
28
|
+
name: name,
|
|
29
|
+
...rest
|
|
30
|
+
}));
|
|
35
31
|
|
|
36
32
|
export default {
|
|
37
33
|
title: 'Components/Form/Controls/CheckBox',
|
|
@@ -26,27 +26,23 @@ const ToggleValue = () => {
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const Template =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
variant: ctrlVariant
|
|
47
|
-
});
|
|
48
|
-
}), _ToggleValue || (_ToggleValue = /*#__PURE__*/_jsx(ToggleValue, {})));
|
|
49
|
-
};
|
|
29
|
+
const Template = ({
|
|
30
|
+
name,
|
|
31
|
+
...rest
|
|
32
|
+
}) => /*#__PURE__*/_jsx(Form, {}, void 0, /*#__PURE__*/_jsx(ConnectForm, {}, void 0, ({
|
|
33
|
+
formState: {
|
|
34
|
+
errors
|
|
35
|
+
}
|
|
36
|
+
}) => {
|
|
37
|
+
const hasError = !!get(errors, name);
|
|
38
|
+
const ctrlVariant = get(errors, name) ? CHECKBOX_VARIANT.ERROR : CHECKBOX_VARIANT.DEFAULT;
|
|
39
|
+
return /*#__PURE__*/_jsx2(CheckBox, {
|
|
40
|
+
name: name,
|
|
41
|
+
...rest,
|
|
42
|
+
hasError: hasError,
|
|
43
|
+
variant: ctrlVariant
|
|
44
|
+
});
|
|
45
|
+
}), _ToggleValue || (_ToggleValue = /*#__PURE__*/_jsx(ToggleValue, {})));
|
|
50
46
|
|
|
51
47
|
export default {
|
|
52
48
|
title: 'Components/Form/Controls/CheckBox'
|
|
@@ -2,32 +2,26 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSComboBox from '@elliemae/ds-basic/form/ComboBox';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const ComboBox =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
field: {
|
|
20
|
-
onChange,
|
|
21
|
-
...props
|
|
22
|
-
}
|
|
23
|
-
} = _ref2;
|
|
24
|
-
return /*#__PURE__*/_jsx(DSComboBox, { ...rest,
|
|
25
|
-
...props,
|
|
26
|
-
onChange: selected => {
|
|
27
|
-
onChange(selected);
|
|
28
|
-
if (changeHandler) changeHandler(selected);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
5
|
+
export const ComboBox = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultValue = '',
|
|
8
|
+
rules = {},
|
|
9
|
+
onChange: changeHandler,
|
|
10
|
+
...rest
|
|
11
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
12
|
+
name: name,
|
|
13
|
+
rules: rules,
|
|
14
|
+
defaultValue: defaultValue,
|
|
15
|
+
render: ({
|
|
16
|
+
field: {
|
|
17
|
+
onChange,
|
|
18
|
+
...props
|
|
31
19
|
}
|
|
32
|
-
})
|
|
33
|
-
|
|
20
|
+
}) => /*#__PURE__*/_jsx(DSComboBox, { ...rest,
|
|
21
|
+
...props,
|
|
22
|
+
onChange: selected => {
|
|
23
|
+
onChange(selected);
|
|
24
|
+
if (changeHandler) changeHandler(selected);
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
});
|
|
@@ -2,24 +2,18 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSDateInput from '@elliemae/ds-basic/form/DateInput';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const DateInput =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return /*#__PURE__*/_jsx(DSDateInput, { ...rest,
|
|
21
|
-
...field
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
5
|
+
export const DateInput = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultValue = '',
|
|
8
|
+
rules = {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
11
|
+
name: name,
|
|
12
|
+
rules: rules,
|
|
13
|
+
defaultValue: defaultValue,
|
|
14
|
+
render: ({
|
|
15
|
+
field
|
|
16
|
+
}) => /*#__PURE__*/_jsx(DSDateInput, { ...rest,
|
|
17
|
+
...field
|
|
18
|
+
})
|
|
19
|
+
});
|
|
@@ -2,24 +2,18 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSDatePicker from '@elliemae/ds-date-picker';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const DatePicker =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return /*#__PURE__*/_jsx(DSDatePicker, { ...rest,
|
|
21
|
-
...field
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
5
|
+
export const DatePicker = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultValue = '',
|
|
8
|
+
rules = {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
11
|
+
name: name,
|
|
12
|
+
defaultValue: defaultValue,
|
|
13
|
+
rules: rules,
|
|
14
|
+
render: ({
|
|
15
|
+
field
|
|
16
|
+
}) => /*#__PURE__*/_jsx(DSDatePicker, { ...rest,
|
|
17
|
+
...field
|
|
18
|
+
})
|
|
19
|
+
});
|
|
@@ -3,25 +3,21 @@ import DSFormItemLayout from '@elliemae/ds-basic/form/FormItem';
|
|
|
3
3
|
import { get } from 'react-hook-form';
|
|
4
4
|
import { ConnectForm } from "../connect-form.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const FormItemLayout =
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export const FormItemLayout = ({
|
|
7
|
+
name,
|
|
8
|
+
...rest
|
|
9
|
+
}) => /*#__PURE__*/_jsx2(ConnectForm, {}, void 0, ({
|
|
10
|
+
formState: {
|
|
11
|
+
errors
|
|
12
|
+
}
|
|
13
|
+
}) => {
|
|
14
|
+
const errorField = get(errors, name);
|
|
15
|
+
const hasError = !!errorField;
|
|
16
|
+
const validationMessage = errorField === null || errorField === void 0 ? void 0 : errorField.message;
|
|
17
|
+
return /*#__PURE__*/_jsx(DSFormItemLayout, {
|
|
18
|
+
name: name,
|
|
19
|
+
hasError: hasError,
|
|
20
|
+
validationMessage: validationMessage,
|
|
9
21
|
...rest
|
|
10
|
-
} = _ref;
|
|
11
|
-
return /*#__PURE__*/_jsx2(ConnectForm, {}, void 0, _ref2 => {
|
|
12
|
-
let {
|
|
13
|
-
formState: {
|
|
14
|
-
errors
|
|
15
|
-
}
|
|
16
|
-
} = _ref2;
|
|
17
|
-
const errorField = get(errors, name);
|
|
18
|
-
const hasError = !!errorField;
|
|
19
|
-
const validationMessage = errorField === null || errorField === void 0 ? void 0 : errorField.message;
|
|
20
|
-
return /*#__PURE__*/_jsx(DSFormItemLayout, {
|
|
21
|
-
name: name,
|
|
22
|
-
hasError: hasError,
|
|
23
|
-
validationMessage: validationMessage,
|
|
24
|
-
...rest
|
|
25
|
-
});
|
|
26
22
|
});
|
|
27
|
-
};
|
|
23
|
+
});
|
|
@@ -2,26 +2,20 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSInputMask, { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-basic/form/InputMask';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const InputMask =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return /*#__PURE__*/_jsx(DSInputMask, { ...rest,
|
|
22
|
-
...field
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
};
|
|
5
|
+
export const InputMask = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultValue = '',
|
|
8
|
+
rules = {},
|
|
9
|
+
mask,
|
|
10
|
+
...rest
|
|
11
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
12
|
+
name: name,
|
|
13
|
+
rules: rules,
|
|
14
|
+
defaultValue: defaultValue,
|
|
15
|
+
render: ({
|
|
16
|
+
field
|
|
17
|
+
}) => /*#__PURE__*/_jsx(DSInputMask, { ...rest,
|
|
18
|
+
...field
|
|
19
|
+
})
|
|
20
|
+
});
|
|
27
21
|
export { MASK_TYPES, MASK_PIPES };
|
|
@@ -2,24 +2,18 @@ import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
import DSLargeInputText from '@elliemae/ds-basic/form/LargeInputText';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const LargeTextBox =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return /*#__PURE__*/_jsx(DSLargeInputText, { ...rest,
|
|
21
|
-
...field
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
5
|
+
export const LargeTextBox = ({
|
|
6
|
+
name,
|
|
7
|
+
defaultValue = '',
|
|
8
|
+
rules = {},
|
|
9
|
+
...rest
|
|
10
|
+
}) => /*#__PURE__*/_jsx2(Controller, {
|
|
11
|
+
name: name,
|
|
12
|
+
rules: rules,
|
|
13
|
+
defaultValue: defaultValue,
|
|
14
|
+
render: ({
|
|
15
|
+
field
|
|
16
|
+
}) => /*#__PURE__*/_jsx(DSLargeInputText, { ...rest,
|
|
17
|
+
...field
|
|
18
|
+
})
|
|
19
|
+
});
|