@elliemae/pui-app-sdk 2.8.3 → 2.11.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/base-data.js +22 -0
- package/dist/cjs/analytics/index.js +37 -0
- package/dist/cjs/analytics/user-session.js +31 -17
- package/dist/cjs/analytics/user-wait.js +13 -5
- package/dist/cjs/api/auth/index.js +16 -13
- package/dist/cjs/api/helpers.js +17 -3
- package/dist/cjs/api/users/index.js +4 -3
- package/dist/cjs/communication/http-client/index.js +21 -16
- package/dist/cjs/communication/http-client/response-interceptor.js +2 -3
- package/dist/cjs/communication/http-client/tests/index.test-disable.js +6 -5
- package/dist/cjs/data/auth/actions.js +28 -22
- package/dist/cjs/data/breakpoint/index.js +3 -1
- package/dist/cjs/data/live-message/index.js +11 -8
- package/dist/cjs/data/reducers.js +2 -1
- package/dist/cjs/data/store.js +8 -4
- package/dist/cjs/data/wait-message/actions.js +9 -6
- package/dist/cjs/data/wait-message/reducer.js +17 -13
- package/dist/cjs/index.js +18 -1
- package/dist/cjs/route/index.js +9 -6
- package/dist/cjs/route/private-route/index.js +10 -9
- package/dist/cjs/sideeffect/auth/index.js +10 -6
- package/dist/cjs/utils/app-config/config.js +21 -4
- package/dist/cjs/utils/app-config/index.js +17 -13
- package/dist/cjs/utils/app-host-integration/react.js +10 -7
- package/dist/cjs/utils/auth/index.js +34 -33
- package/dist/cjs/utils/micro-frontend/guest.js +10 -7
- package/dist/cjs/utils/micro-frontend/host.js +12 -1
- package/dist/cjs/utils/micro-frontend/index.js +2 -4
- package/dist/cjs/utils/service-worker.js +2 -1
- package/dist/cjs/utils/session.js +13 -5
- package/dist/cjs/utils/storybook/theme.js +12 -9
- package/dist/cjs/utils/testing/index.js +18 -9
- package/dist/cjs/utils/testing/render-with-redux.js +14 -11
- package/dist/cjs/utils/testing/render-with-router-redux.js +20 -17
- package/dist/cjs/utils/testing/render-with-router.js +16 -13
- package/dist/cjs/utils/testing/render-with-state-addons.js +14 -7
- package/dist/cjs/utils/web-storage.js +6 -0
- package/dist/cjs/view/app-root/hosted-app.js +8 -5
- package/dist/cjs/view/app-root/index.js +23 -20
- package/dist/cjs/view/app-root/stand-alone-app.js +8 -5
- package/dist/cjs/view/app-root/style.js +6 -3
- package/dist/cjs/view/error-toast/index.stories.js +29 -22
- package/dist/cjs/view/fetch-host-app-data/index.js +2 -2
- package/dist/cjs/view/fetch-host-app-data/store.js +8 -2
- package/dist/cjs/view/fields/check-box/index.js +28 -20
- package/dist/cjs/view/fields/check-box/index.stories.js +24 -20
- package/dist/cjs/view/fields/check-box/set-value.stories.js +21 -17
- package/dist/cjs/view/fields/combo-box/index.js +28 -22
- package/dist/cjs/view/fields/connect-form.js +4 -3
- package/dist/cjs/view/fields/date-input/index.js +21 -15
- package/dist/cjs/view/fields/date-input/index.stories.js +1 -1
- package/dist/cjs/view/fields/date-picker/index.js +21 -15
- package/dist/cjs/view/fields/date-picker/index.stories.js +1 -1
- package/dist/cjs/view/fields/form-item-layout/index.js +20 -16
- package/dist/cjs/view/fields/input-mask/index.js +24 -16
- package/dist/cjs/view/fields/large-text-box/index.js +21 -15
- package/dist/cjs/view/fields/radio/index.js +26 -20
- package/dist/cjs/view/fields/radio/index.stories.js +21 -17
- package/dist/cjs/view/fields/radio/set-value.stories.js +19 -15
- package/dist/cjs/view/fields/radio-group/index.js +22 -16
- package/dist/cjs/view/fields/radio-group/index.stories.js +44 -37
- package/dist/cjs/view/fields/text-box/index.js +21 -15
- package/dist/cjs/view/fields/watch-value.js +5 -4
- package/dist/cjs/view/form/index.js +10 -9
- package/dist/cjs/view/form/index.stories.js +6 -3
- package/dist/cjs/view/form/submit-button/index.js +3 -2
- package/dist/cjs/view/form/usecases.stories.js +6 -3
- package/dist/cjs/view/guest-unload-handlers/index.js +2 -1
- package/dist/cjs/view/header/center-region/index.js +18 -8
- package/dist/cjs/view/header/index.js +11 -8
- package/dist/cjs/view/live-message/index.stories.js +2 -0
- package/dist/cjs/view/loadable/index.js +2 -1
- package/dist/cjs/view/login/index.js +6 -5
- package/dist/cjs/view/message-to-host-app/index.js +2 -1
- package/dist/cjs/view/micro-app/app-factory/index.js +39 -23
- package/dist/cjs/view/micro-app/resources/manifest.js +29 -16
- package/dist/cjs/view/micro-app/resources/script.js +29 -22
- package/dist/cjs/view/micro-app/resources/style.js +27 -20
- package/dist/cjs/view/micro-app/use-app-will-render.js +13 -10
- package/dist/cjs/view/micro-app/utils.js +6 -0
- package/dist/cjs/view/micro-iframe-app/app.js +7 -6
- package/dist/cjs/view/micro-iframe-app/iframe/index.js +8 -7
- package/dist/cjs/view/micro-iframe-app/index.js +5 -4
- package/dist/cjs/view/micro-iframe-app/use-frame-loaded.js +5 -4
- package/dist/cjs/view/modals/error/index.js +9 -6
- package/dist/cjs/view/modals/navigation-prompt/index.js +7 -4
- package/dist/cjs/view/modals/session-expiry/customHooks.js +7 -3
- package/dist/cjs/view/modals/session-expiry/index.js +8 -5
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +4 -3
- package/dist/cjs/view/modals/wait-message/index.js +9 -8
- package/dist/cjs/view/modals/wait-message/index.stories.js +5 -4
- package/dist/cjs/view/render-with-delay/index.js +4 -3
- package/dist/cjs/view/useMediaBreakpoints/index.js +10 -0
- package/dist/es/analytics/base-data.js +10 -0
- package/dist/es/analytics/index.js +28 -0
- package/dist/es/analytics/user-session.js +30 -17
- package/dist/es/analytics/user-wait.js +12 -5
- package/dist/es/api/auth/index.js +16 -13
- package/dist/es/api/helpers.js +13 -3
- package/dist/es/api/users/index.js +4 -3
- package/dist/es/communication/http-client/index.js +20 -16
- package/dist/es/communication/http-client/response-interceptor.js +2 -3
- package/dist/es/communication/http-client/tests/index.test-disable.js +6 -5
- package/dist/es/data/auth/actions.js +28 -22
- package/dist/es/data/breakpoint/index.js +3 -1
- package/dist/es/data/live-message/index.js +11 -8
- package/dist/es/data/reducers.js +2 -1
- package/dist/es/data/store.js +8 -4
- package/dist/es/data/wait-message/actions.js +9 -6
- package/dist/es/data/wait-message/reducer.js +16 -12
- package/dist/es/index.js +3 -1
- package/dist/es/route/index.js +7 -6
- package/dist/es/route/private-route/index.js +10 -9
- package/dist/es/sideeffect/auth/index.js +10 -6
- package/dist/es/utils/app-config/config.js +18 -4
- package/dist/es/utils/app-config/index.js +17 -13
- package/dist/es/utils/app-host-integration/react.js +10 -7
- package/dist/es/utils/auth/index.js +34 -33
- package/dist/es/utils/micro-frontend/guest.js +9 -6
- package/dist/es/utils/micro-frontend/host.js +11 -1
- package/dist/es/utils/micro-frontend/index.js +2 -2
- package/dist/es/utils/service-worker.js +2 -1
- package/dist/es/utils/session.js +14 -5
- package/dist/es/utils/storybook/theme.js +12 -9
- package/dist/es/utils/testing/index.js +12 -9
- package/dist/es/utils/testing/render-with-redux.js +14 -11
- package/dist/es/utils/testing/render-with-router-redux.js +20 -17
- package/dist/es/utils/testing/render-with-router.js +16 -13
- package/dist/es/utils/testing/render-with-state-addons.js +11 -7
- package/dist/es/utils/web-storage.js +3 -0
- package/dist/es/view/app-root/hosted-app.js +8 -5
- package/dist/es/view/app-root/index.js +23 -20
- package/dist/es/view/app-root/stand-alone-app.js +8 -5
- package/dist/es/view/app-root/style.js +6 -3
- package/dist/es/view/error-toast/index.stories.js +29 -22
- package/dist/es/view/fetch-host-app-data/index.js +2 -2
- package/dist/es/view/fetch-host-app-data/store.js +6 -2
- package/dist/es/view/fields/check-box/index.js +26 -20
- package/dist/es/view/fields/check-box/index.stories.js +24 -20
- package/dist/es/view/fields/check-box/set-value.stories.js +21 -17
- package/dist/es/view/fields/combo-box/index.js +28 -22
- package/dist/es/view/fields/connect-form.js +4 -3
- package/dist/es/view/fields/date-input/index.js +21 -15
- package/dist/es/view/fields/date-input/index.stories.js +1 -1
- package/dist/es/view/fields/date-picker/index.js +21 -15
- package/dist/es/view/fields/date-picker/index.stories.js +1 -1
- package/dist/es/view/fields/form-item-layout/index.js +20 -16
- package/dist/es/view/fields/input-mask/index.js +22 -16
- package/dist/es/view/fields/large-text-box/index.js +21 -15
- package/dist/es/view/fields/radio/index.js +26 -20
- package/dist/es/view/fields/radio/index.stories.js +21 -17
- package/dist/es/view/fields/radio/set-value.stories.js +19 -15
- package/dist/es/view/fields/radio-group/index.js +22 -16
- package/dist/es/view/fields/radio-group/index.stories.js +44 -37
- package/dist/es/view/fields/text-box/index.js +21 -15
- package/dist/es/view/fields/watch-value.js +5 -4
- package/dist/es/view/form/index.js +10 -9
- package/dist/es/view/form/index.stories.js +6 -3
- package/dist/es/view/form/submit-button/index.js +3 -2
- package/dist/es/view/form/usecases.stories.js +6 -3
- package/dist/es/view/guest-unload-handlers/index.js +2 -1
- package/dist/es/view/header/center-region/index.js +16 -8
- package/dist/es/view/header/index.js +11 -8
- package/dist/es/view/loadable/index.js +2 -1
- package/dist/es/view/login/index.js +6 -5
- package/dist/es/view/message-to-host-app/index.js +2 -1
- package/dist/es/view/micro-app/app-factory/index.js +33 -23
- package/dist/es/view/micro-app/resources/manifest.js +25 -15
- package/dist/es/view/micro-app/resources/script.js +28 -21
- package/dist/es/view/micro-app/resources/style.js +27 -20
- package/dist/es/view/micro-app/use-app-will-render.js +12 -9
- package/dist/es/view/micro-app/utils.js +3 -0
- package/dist/es/view/micro-iframe-app/app.js +7 -6
- package/dist/es/view/micro-iframe-app/iframe/index.js +8 -7
- package/dist/es/view/micro-iframe-app/index.js +5 -4
- package/dist/es/view/micro-iframe-app/use-frame-loaded.js +5 -4
- package/dist/es/view/modals/error/index.js +7 -6
- package/dist/es/view/modals/navigation-prompt/index.js +5 -4
- package/dist/es/view/modals/session-expiry/customHooks.js +2 -1
- package/dist/es/view/modals/session-expiry/index.js +6 -5
- package/dist/es/view/modals/wait-message/html-wait-message.js +4 -3
- package/dist/es/view/modals/wait-message/index.js +9 -8
- package/dist/es/view/modals/wait-message/index.stories.js +5 -4
- package/dist/es/view/render-with-delay/index.js +4 -3
- package/dist/es/view/useMediaBreakpoints/index.js +5 -0
- package/dist/public/assets/index.ad459dcebaa616bff55e77d860405729.svg +1 -0
- package/dist/public/assets/index.dae17c8817fd9c5ab29e7c3a8925a1f4.svg +1 -0
- package/dist/public/assets/logo.0cbd33c5006f8ea6d106f8ab13f6e6dc.svg +1 -0
- package/dist/public/index.html +1 -1
- package/dist/public/js/emuiAppSdk.bdec42736fbd0fbcbe9a.js +3 -0
- package/dist/public/js/{emuiAppSdk.555dc403d2552c23928a.js.LICENSE.txt → emuiAppSdk.bdec42736fbd0fbcbe9a.js.LICENSE.txt} +0 -9
- package/dist/public/js/emuiAppSdk.bdec42736fbd0fbcbe9a.js.gz +0 -0
- package/dist/public/js/emuiAppSdk.bdec42736fbd0fbcbe9a.js.map +1 -0
- package/dist/types/analytics/base-data.d.ts +8 -0
- package/dist/types/analytics/index.d.ts +5 -0
- package/dist/types/analytics/user-session.d.ts +1 -4
- package/dist/types/communication/http-client/index.d.ts +2 -2
- package/dist/types/communication/http-client/request-interceptor.d.ts +1 -1
- package/dist/types/communication/http-client/response-interceptor.d.ts +1 -1
- package/dist/types/communication/http-client/retry-axios.d.ts +5 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/utils/micro-frontend/host.d.ts +3 -2
- package/dist/types/utils/window.d.ts +3 -3
- package/dist/types/view/fields/date-input/index.d.ts +1 -2
- package/dist/types/view/fields/date-picker/index.d.ts +1 -2
- package/dist/types/view/visually-hidden/index.d.ts +1 -1
- package/package.json +17 -17
- package/dist/cjs/analytics/utils.js +0 -13
- package/dist/cjs/data/tests/store.test.js +0 -32
- package/dist/es/analytics/utils.js +0 -4
- package/dist/es/data/tests/store.test.js +0 -32
- package/dist/public/assets/index.0944904d91ed62aebf865bc6461471aa.svg +0 -4
- package/dist/public/assets/index.4c19242eb7de64399b205c842bf3185c.svg +0 -5
- package/dist/public/assets/logo.6799a57c45dd9c96b44e2bac6c4ee12c.svg +0 -2
- package/dist/public/js/emuiAppSdk.555dc403d2552c23928a.js +0 -3
- package/dist/public/js/emuiAppSdk.555dc403d2552c23928a.js.gz +0 -0
- package/dist/public/js/emuiAppSdk.555dc403d2552c23928a.js.map +0 -1
- package/dist/types/analytics/utils.d.ts +0 -4
|
@@ -21,11 +21,14 @@ var _style = _interopRequireDefault(require("./style.js"));
|
|
|
21
21
|
|
|
22
22
|
var _GlobalStyle, _MediaBreakpoint, _WindowSize, _HTMLWaitMessage;
|
|
23
23
|
|
|
24
|
-
const HostedApp =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})),
|
|
24
|
+
const HostedApp = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
children
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/(0, _jsx2.default)(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/(0, _jsx2.default)(_style.default, {})), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/(0, _jsx2.default)(_index.MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/(0, _jsx2.default)(_index2.WindowSize, {})), _HTMLWaitMessage || (_HTMLWaitMessage = /*#__PURE__*/(0, _jsx2.default)(_htmlWaitMessage.HTMLWaitMessage, {
|
|
29
|
+
close: true
|
|
30
|
+
})), children);
|
|
31
|
+
};
|
|
29
32
|
|
|
30
33
|
exports.HostedApp = HostedApp;
|
|
31
34
|
|
|
@@ -48,25 +48,28 @@ const AppToRender = props => {
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
const AppRoot =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, void 0, /*#__PURE__*/(0, _jsx3.default)(
|
|
64
|
-
|
|
65
|
-
}, void 0, /*#__PURE__*/(0, _jsx3.default)(
|
|
66
|
-
|
|
67
|
-
}, void 0, /*#__PURE__*/(0, _jsx3.default)(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
const AppRoot = _ref => {
|
|
52
|
+
let {
|
|
53
|
+
store,
|
|
54
|
+
history,
|
|
55
|
+
theme = (0, _puiTheme.getDefaultTheme)(),
|
|
56
|
+
manageSession = false,
|
|
57
|
+
WaitMessage,
|
|
58
|
+
errorTemplate,
|
|
59
|
+
children
|
|
60
|
+
} = _ref;
|
|
61
|
+
return /*#__PURE__*/(0, _jsx3.default)(_index4.ErrorBoundary, {
|
|
62
|
+
errorTemplate: errorTemplate
|
|
63
|
+
}, void 0, /*#__PURE__*/(0, _jsx3.default)(_reactRedux.Provider, {
|
|
64
|
+
store: store
|
|
65
|
+
}, void 0, /*#__PURE__*/(0, _jsx3.default)(_reactRouterDom.Router, {
|
|
66
|
+
history: history
|
|
67
|
+
}, void 0, /*#__PURE__*/(0, _jsx3.default)(_styledComponents.ThemeProvider, {
|
|
68
|
+
theme: theme
|
|
69
|
+
}, void 0, /*#__PURE__*/(0, _jsx3.default)(AppToRender, {
|
|
70
|
+
manageSession: manageSession,
|
|
71
|
+
WaitMessage: WaitMessage
|
|
72
|
+
}, void 0, children)))));
|
|
73
|
+
};
|
|
71
74
|
|
|
72
75
|
exports.AppRoot = AppRoot;
|
|
@@ -29,11 +29,14 @@ var _style = _interopRequireDefault(require("./style.js"));
|
|
|
29
29
|
|
|
30
30
|
var _GlobalStyle, _SessionTimeout, _MediaBreakpoint, _WindowSize, _LiveMessage, _DefaultWaitMessage, _ErrorToast;
|
|
31
31
|
|
|
32
|
-
const StandAloneApp =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const StandAloneApp = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
manageSession,
|
|
35
|
+
WaitMessage,
|
|
36
|
+
children
|
|
37
|
+
} = _ref;
|
|
38
|
+
return /*#__PURE__*/(0, _jsx2.default)(_reactAriaLive.LiveAnnouncer, {}, void 0, /*#__PURE__*/(0, _jsx2.default)(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/(0, _jsx2.default)(_style.default, {})), manageSession && (_SessionTimeout || (_SessionTimeout = /*#__PURE__*/(0, _jsx2.default)(_index3.SessionTimeout, {}))), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/(0, _jsx2.default)(_index.MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/(0, _jsx2.default)(_index2.WindowSize, {})), _LiveMessage || (_LiveMessage = /*#__PURE__*/(0, _jsx2.default)(_index4.LiveMessage, {})), WaitMessage || _DefaultWaitMessage || (_DefaultWaitMessage = /*#__PURE__*/(0, _jsx2.default)(_index6.WaitMessage, {})), _ErrorToast || (_ErrorToast = /*#__PURE__*/(0, _jsx2.default)(_index5.ErrorToast, {})), children));
|
|
39
|
+
};
|
|
37
40
|
|
|
38
41
|
exports.StandAloneApp = StandAloneApp;
|
|
39
42
|
|
|
@@ -13,8 +13,11 @@ var _styledComponents = require("styled-components");
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var _default = (0, _styledComponents.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%;}"],
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
var _default = (0, _styledComponents.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%;}"], _ref => {
|
|
17
|
+
let {
|
|
18
|
+
theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return theme.media.small(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: 100%;\n "])));
|
|
21
|
+
}, props => props.theme.lineHeights.m, props => props.theme.fonts.default, props => props.theme.colors.neutral['000']);
|
|
19
22
|
|
|
20
23
|
exports.default = _default;
|
|
@@ -33,9 +33,10 @@ var _default = {
|
|
|
33
33
|
};
|
|
34
34
|
exports.default = _default;
|
|
35
35
|
|
|
36
|
-
const Renderer =
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const Renderer = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
Comp
|
|
39
|
+
} = _ref;
|
|
39
40
|
const [show, setShow] = (0, _react.useState)(false);
|
|
40
41
|
(0, _react.useEffect)(() => {
|
|
41
42
|
setShow(true);
|
|
@@ -62,17 +63,20 @@ const BasicError = () => _Renderer || (_Renderer = /*#__PURE__*/(0, _jsx3.defaul
|
|
|
62
63
|
|
|
63
64
|
exports.BasicError = BasicError;
|
|
64
65
|
|
|
65
|
-
const showToast =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
const showToast = _ref2 => {
|
|
67
|
+
let {
|
|
68
|
+
messageText = 'Toast Message',
|
|
69
|
+
type = _Toast.ToastType.DEFAULT,
|
|
70
|
+
...props
|
|
71
|
+
} = _ref2;
|
|
72
|
+
return _index.error.set({
|
|
73
|
+
type,
|
|
74
|
+
messageText,
|
|
75
|
+
messageTitle: type,
|
|
76
|
+
containerId: 'app-toast',
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
};
|
|
76
80
|
|
|
77
81
|
const successToast = props => showToast({ ...props,
|
|
78
82
|
type: _Toast.ToastType.SUCCESS
|
|
@@ -90,14 +94,17 @@ const errorToast = props => showToast({ ...props,
|
|
|
90
94
|
type: _Toast.ToastType.ERROR
|
|
91
95
|
});
|
|
92
96
|
|
|
93
|
-
const ToastButton =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
const ToastButton = _ref3 => {
|
|
98
|
+
let {
|
|
99
|
+
labelText,
|
|
100
|
+
onClick
|
|
101
|
+
} = _ref3;
|
|
102
|
+
return /*#__PURE__*/(0, _jsx3.default)(_Button.default, {
|
|
103
|
+
buttonType: "text",
|
|
104
|
+
labelText: labelText,
|
|
105
|
+
onClick: onClick
|
|
106
|
+
});
|
|
107
|
+
};
|
|
101
108
|
|
|
102
109
|
const ToastMultipleTypes = () => {
|
|
103
110
|
const dispatch = (0, _reactRedux.useAppDispatch)();
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.fetchHostAppData = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
11
11
|
|
|
12
12
|
var _store = require("./store.js");
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ var _index2 = require("../host-binding-events/index.js");
|
|
|
18
18
|
const fetchHostAppData = (hostedAppUrl, guestAppId) => {
|
|
19
19
|
const isDataExist = (0, _store.isHostAppDataExist)();
|
|
20
20
|
return new Promise(resolve => {
|
|
21
|
-
if (!
|
|
21
|
+
if (!(0, _isEmpty2.default)(isDataExist)) {
|
|
22
22
|
resolve();
|
|
23
23
|
} else {
|
|
24
24
|
(0, _index.sendMessageToHost)({
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.setHostAppData = exports.isHostAppDataExist = exports.getHostAppDataByKey = void 0;
|
|
7
9
|
|
|
8
|
-
var
|
|
10
|
+
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
9
11
|
|
|
10
12
|
let hostAppData = {};
|
|
11
13
|
|
|
@@ -17,7 +19,11 @@ const setHostAppData = appData => {
|
|
|
17
19
|
|
|
18
20
|
exports.setHostAppData = setHostAppData;
|
|
19
21
|
|
|
20
|
-
const getHostAppDataByKey =
|
|
22
|
+
const getHostAppDataByKey = function () {
|
|
23
|
+
let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
24
|
+
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
25
|
+
return (0, _get2.default)(hostAppData, key, defaultValue);
|
|
26
|
+
};
|
|
21
27
|
|
|
22
28
|
exports.getHostAppDataByKey = getHostAppDataByKey;
|
|
23
29
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
4
4
|
|
|
5
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
6
|
+
|
|
5
7
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
6
8
|
|
|
7
9
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -29,26 +31,32 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
31
|
|
|
30
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
33
|
|
|
32
|
-
const CheckBox =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
const CheckBox = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
name,
|
|
37
|
+
defaultChecked = false,
|
|
38
|
+
rules = {},
|
|
39
|
+
...rest
|
|
40
|
+
} = _ref;
|
|
41
|
+
return /*#__PURE__*/(0, _jsx3.default)(_reactHookForm.Controller, {
|
|
42
|
+
name: name,
|
|
43
|
+
rules: rules,
|
|
44
|
+
render: _ref2 => {
|
|
45
|
+
let {
|
|
46
|
+
field: {
|
|
47
|
+
onChange,
|
|
48
|
+
value,
|
|
49
|
+
...restProps
|
|
50
|
+
}
|
|
51
|
+
} = _ref2;
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Checkbox.default, { ...rest,
|
|
53
|
+
...restProps,
|
|
54
|
+
defaultChecked: defaultChecked,
|
|
55
|
+
checked: value,
|
|
56
|
+
onChange: e => onChange(((e || {}).target || {}).checked)
|
|
57
|
+
});
|
|
45
58
|
}
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
defaultChecked: defaultChecked,
|
|
49
|
-
checked: value,
|
|
50
|
-
onChange: e => onChange(((e || {}).target || {}).checked)
|
|
51
|
-
})
|
|
52
|
-
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
53
61
|
|
|
54
62
|
exports.CheckBox = CheckBox;
|
|
@@ -21,28 +21,32 @@ var _watchValue = require("../watch-value.js");
|
|
|
21
21
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
|
|
24
|
-
const Template =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
const Template = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
name,
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref;
|
|
29
|
+
return /*#__PURE__*/(0, _jsx3.default)(_index.Form, {}, void 0, /*#__PURE__*/(0, _jsx3.default)(_connectForm.ConnectForm, {}, void 0, _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
formState: {
|
|
32
|
+
errors
|
|
33
|
+
}
|
|
34
|
+
} = _ref2;
|
|
35
|
+
const errField = (0, _reactHookForm.get)(errors, name);
|
|
36
|
+
const hasError = !!errField; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
const ctrlVariant = hasError ? _index2.CHECKBOX_VARIANT.ERROR : _index2.CHECKBOX_VARIANT.DEFAULT;
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.CheckBox, {
|
|
40
|
+
name: name,
|
|
41
|
+
...rest,
|
|
42
|
+
hasError: hasError,
|
|
43
|
+
variant: ctrlVariant
|
|
44
|
+
});
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_watchValue.WatchValue, {
|
|
37
46
|
name: name,
|
|
38
|
-
...rest
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_watchValue.WatchValue, {
|
|
43
|
-
name: name,
|
|
44
|
-
...rest
|
|
45
|
-
}));
|
|
47
|
+
...rest
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
46
50
|
|
|
47
51
|
var _default = {
|
|
48
52
|
title: 'Components/Form/Controls/CheckBox',
|
|
@@ -42,23 +42,27 @@ const ToggleValue = () => {
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
const Template =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
const Template = _ref => {
|
|
46
|
+
let {
|
|
47
|
+
name,
|
|
48
|
+
...rest
|
|
49
|
+
} = _ref;
|
|
50
|
+
return /*#__PURE__*/(0, _jsx3.default)(_index.Form, {}, void 0, /*#__PURE__*/(0, _jsx3.default)(_connectForm.ConnectForm, {}, void 0, _ref2 => {
|
|
51
|
+
let {
|
|
52
|
+
formState: {
|
|
53
|
+
errors
|
|
54
|
+
}
|
|
55
|
+
} = _ref2;
|
|
56
|
+
const hasError = !!(0, _reactHookForm.get)(errors, name);
|
|
57
|
+
const ctrlVariant = (0, _reactHookForm.get)(errors, name) ? _index2.CHECKBOX_VARIANT.ERROR : _index2.CHECKBOX_VARIANT.DEFAULT;
|
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.CheckBox, {
|
|
59
|
+
name: name,
|
|
60
|
+
...rest,
|
|
61
|
+
hasError: hasError,
|
|
62
|
+
variant: ctrlVariant
|
|
63
|
+
});
|
|
64
|
+
}), _ToggleValue || (_ToggleValue = /*#__PURE__*/(0, _jsx3.default)(ToggleValue, {})));
|
|
65
|
+
};
|
|
62
66
|
|
|
63
67
|
var _default = {
|
|
64
68
|
title: 'Components/Form/Controls/CheckBox'
|
|
@@ -15,28 +15,34 @@ var _reactHookForm = require("react-hook-form");
|
|
|
15
15
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
|
-
const ComboBox =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
const ComboBox = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
name,
|
|
21
|
+
defaultValue = '',
|
|
22
|
+
rules = {},
|
|
23
|
+
onChange: changeHandler,
|
|
24
|
+
...rest
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/(0, _jsx3.default)(_reactHookForm.Controller, {
|
|
27
|
+
name: name,
|
|
28
|
+
rules: rules,
|
|
29
|
+
defaultValue: defaultValue,
|
|
30
|
+
render: _ref2 => {
|
|
31
|
+
let {
|
|
32
|
+
field: {
|
|
33
|
+
onChange,
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
} = _ref2;
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ComboBox.default, { ...rest,
|
|
38
|
+
...props,
|
|
39
|
+
onChange: selected => {
|
|
40
|
+
onChange(selected);
|
|
41
|
+
if (changeHandler) changeHandler(selected);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
32
44
|
}
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
onChange: selected => {
|
|
36
|
-
onChange(selected);
|
|
37
|
-
if (changeHandler) changeHandler(selected);
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
});
|
|
45
|
+
});
|
|
46
|
+
};
|
|
41
47
|
|
|
42
48
|
exports.ComboBox = ComboBox;
|
|
@@ -7,9 +7,10 @@ exports.ConnectForm = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _reactHookForm = require("react-hook-form");
|
|
9
9
|
|
|
10
|
-
const ConnectForm =
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const ConnectForm = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children
|
|
13
|
+
} = _ref;
|
|
13
14
|
const methods = (0, _reactHookForm.useFormContext)();
|
|
14
15
|
return children({ ...methods
|
|
15
16
|
});
|
|
@@ -15,20 +15,26 @@ var _reactHookForm = require("react-hook-form");
|
|
|
15
15
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
|
-
const DateInput =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
18
|
+
const DateInput = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
name,
|
|
21
|
+
defaultValue = '',
|
|
22
|
+
rules = {},
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/(0, _jsx3.default)(_reactHookForm.Controller, {
|
|
26
|
+
name: name,
|
|
27
|
+
rules: rules,
|
|
28
|
+
defaultValue: defaultValue,
|
|
29
|
+
render: _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
field
|
|
32
|
+
} = _ref2;
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateInput.default, { ...rest,
|
|
34
|
+
...field
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
};
|
|
33
39
|
|
|
34
40
|
exports.DateInput = DateInput;
|
|
@@ -15,20 +15,26 @@ var _reactHookForm = require("react-hook-form");
|
|
|
15
15
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
|
-
const DatePicker =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
18
|
+
const DatePicker = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
name,
|
|
21
|
+
defaultValue = '',
|
|
22
|
+
rules = {},
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/(0, _jsx3.default)(_reactHookForm.Controller, {
|
|
26
|
+
name: name,
|
|
27
|
+
defaultValue: defaultValue,
|
|
28
|
+
rules: rules,
|
|
29
|
+
render: _ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
field
|
|
32
|
+
} = _ref2;
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dsDatePicker.default, { ...rest,
|
|
34
|
+
...field
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
};
|
|
33
39
|
|
|
34
40
|
exports.DatePicker = DatePicker;
|
|
@@ -17,23 +17,27 @@ var _connectForm = require("../connect-form.js");
|
|
|
17
17
|
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
|
|
20
|
-
const FormItemLayout =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}) => /*#__PURE__*/(0, _jsx3.default)(_connectForm.ConnectForm, {}, void 0, ({
|
|
24
|
-
formState: {
|
|
25
|
-
errors
|
|
26
|
-
}
|
|
27
|
-
}) => {
|
|
28
|
-
const errorField = (0, _reactHookForm.get)(errors, name);
|
|
29
|
-
const hasError = !!errorField;
|
|
30
|
-
const validationMessage = errorField === null || errorField === void 0 ? void 0 : errorField.message;
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormItem.default, {
|
|
32
|
-
name: name,
|
|
33
|
-
hasError: hasError,
|
|
34
|
-
validationMessage: validationMessage,
|
|
20
|
+
const FormItemLayout = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
name,
|
|
35
23
|
...rest
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/(0, _jsx3.default)(_connectForm.ConnectForm, {}, void 0, _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
formState: {
|
|
28
|
+
errors
|
|
29
|
+
}
|
|
30
|
+
} = _ref2;
|
|
31
|
+
const errorField = (0, _reactHookForm.get)(errors, name);
|
|
32
|
+
const hasError = !!errorField;
|
|
33
|
+
const validationMessage = errorField === null || errorField === void 0 ? void 0 : errorField.message;
|
|
34
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormItem.default, {
|
|
35
|
+
name: name,
|
|
36
|
+
hasError: hasError,
|
|
37
|
+
validationMessage: validationMessage,
|
|
38
|
+
...rest
|
|
39
|
+
});
|
|
36
40
|
});
|
|
37
|
-
}
|
|
41
|
+
};
|
|
38
42
|
|
|
39
43
|
exports.FormItemLayout = FormItemLayout;
|