@elliemae/pui-app-sdk 2.21.4 → 2.22.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/view/app-root/hosted-app.js +6 -5
- package/dist/cjs/view/app-root/index.js +2 -16
- package/dist/cjs/view/fields/input-mask/index.js +0 -1
- package/dist/cjs/view/modals/wait-message/index.js +9 -14
- package/dist/cjs/view/modals/wait-message/wait-message-load.js +17 -0
- package/dist/es/view/app-root/hosted-app.js +5 -5
- package/dist/es/view/app-root/index.js +0 -11
- package/dist/es/view/fields/input-mask/index.js +0 -1
- package/dist/es/view/fields/watch-value.js +0 -1
- package/dist/es/view/form/index.stories.js +0 -2
- package/dist/es/view/micro-iframe-app/iframe/index.js +0 -1
- package/dist/es/view/modals/wait-message/index.js +10 -16
- package/dist/es/view/modals/wait-message/wait-message-load.js +7 -0
- package/dist/types/view/app-root/hosted-app.d.ts +2 -1
- package/dist/types/view/modals/wait-message/wait-message-load.d.ts +1 -0
- package/package.json +23 -23
- package/dist/cjs/sideeffect/error-toast/index.js +0 -35
- package/dist/cjs/sideeffect/wait-message/index.js +0 -45
- package/dist/cjs/view/modals/wait-message/html-wait-message.js +0 -21
- package/dist/es/sideeffect/error-toast/index.js +0 -24
- package/dist/es/sideeffect/wait-message/index.js +0 -34
- package/dist/es/view/modals/wait-message/html-wait-message.js +0 -12
- package/dist/types/sideeffect/error-toast/index.d.ts +0 -2
- package/dist/types/sideeffect/wait-message/index.d.ts +0 -2
- package/dist/types/view/modals/wait-message/html-wait-message.d.ts +0 -6
|
@@ -15,17 +15,18 @@ var _index = require("../media-breakpoint/index.js");
|
|
|
15
15
|
|
|
16
16
|
var _index2 = require("../window-size/index.js");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _index3 = require("../error-toast/index.js");
|
|
19
|
+
|
|
20
|
+
var _index4 = require("../modals/wait-message/index.js");
|
|
19
21
|
|
|
20
22
|
var _style = _interopRequireDefault(require("./style.js"));
|
|
21
23
|
|
|
22
|
-
var _GlobalStyle, _MediaBreakpoint, _WindowSize,
|
|
24
|
+
var _GlobalStyle, _MediaBreakpoint, _WindowSize, _DefaultWaitMessage, _ErrorToast;
|
|
23
25
|
|
|
24
26
|
const HostedApp = ({
|
|
27
|
+
WaitMessage,
|
|
25
28
|
children
|
|
26
|
-
}) => /*#__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, {})),
|
|
27
|
-
close: true
|
|
28
|
-
})), children);
|
|
29
|
+
}) => /*#__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, {})), WaitMessage || _DefaultWaitMessage || (_DefaultWaitMessage = /*#__PURE__*/(0, _jsx2.default)(_index4.WaitMessage, {})), _ErrorToast || (_ErrorToast = /*#__PURE__*/(0, _jsx2.default)(_index3.ErrorToast, {})), children);
|
|
29
30
|
|
|
30
31
|
exports.HostedApp = HostedApp;
|
|
31
32
|
|
|
@@ -17,15 +17,9 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
17
17
|
|
|
18
18
|
var _puiTheme = require("@elliemae/pui-theme");
|
|
19
19
|
|
|
20
|
-
var _reduxInjectors = require("redux-injectors");
|
|
21
|
-
|
|
22
20
|
var _index = require("../../utils/micro-frontend/index.js");
|
|
23
21
|
|
|
24
|
-
var _index2 = require("
|
|
25
|
-
|
|
26
|
-
var _index3 = require("../../sideeffect/error-toast/index.js");
|
|
27
|
-
|
|
28
|
-
var _index4 = require("../error-boundary/index.js");
|
|
22
|
+
var _index2 = require("../error-boundary/index.js");
|
|
29
23
|
|
|
30
24
|
var _standAloneApp = require("./stand-alone-app.js");
|
|
31
25
|
|
|
@@ -34,14 +28,6 @@ var _hostedApp = require("./hosted-app.js");
|
|
|
34
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
29
|
|
|
36
30
|
const AppToRender = props => {
|
|
37
|
-
(0, _reduxInjectors.useInjectSaga)({
|
|
38
|
-
key: 'waitMessage',
|
|
39
|
-
saga: _index2.waitMessage
|
|
40
|
-
});
|
|
41
|
-
(0, _reduxInjectors.useInjectSaga)({
|
|
42
|
-
key: 'errorToast',
|
|
43
|
-
saga: _index3.errorToast
|
|
44
|
-
});
|
|
45
31
|
const isParent = (0, _index.isStandAloneGuest)() || (0, _index.isHost)();
|
|
46
32
|
return isParent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_standAloneApp.StandAloneApp, { ...props
|
|
47
33
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_hostedApp.HostedApp, { ...props
|
|
@@ -56,7 +42,7 @@ const AppRoot = ({
|
|
|
56
42
|
WaitMessage,
|
|
57
43
|
errorTemplate,
|
|
58
44
|
children
|
|
59
|
-
}) => /*#__PURE__*/(0, _jsx3.default)(
|
|
45
|
+
}) => /*#__PURE__*/(0, _jsx3.default)(_index2.ErrorBoundary, {
|
|
60
46
|
errorTemplate: errorTemplate
|
|
61
47
|
}, void 0, /*#__PURE__*/(0, _jsx3.default)(_reactRedux.Provider, {
|
|
62
48
|
store: store
|
|
@@ -7,15 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.WaitMessage = void 0;
|
|
9
9
|
|
|
10
|
-
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
|
-
|
|
12
10
|
var _react = require("react");
|
|
13
11
|
|
|
14
12
|
var _dsLoadingIndicator = _interopRequireDefault(require("@elliemae/ds-loading-indicator"));
|
|
15
13
|
|
|
16
14
|
var _reactRedux = require("../../../data/react-redux.js");
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _waitMessageLoad = require("./wait-message-load.js");
|
|
19
17
|
|
|
20
18
|
var _userWaitEvent = require("../../../analytics/user-wait-event.js");
|
|
21
19
|
|
|
@@ -39,20 +37,17 @@ const WaitMessage = /*#__PURE__*/(0, _react.memo)(({
|
|
|
39
37
|
|
|
40
38
|
return (_state$waitMessage2 = state.waitMessage) === null || _state$waitMessage2 === void 0 ? void 0 : _state$waitMessage2.message;
|
|
41
39
|
});
|
|
40
|
+
(0, _waitMessageLoad.useWaitMessageLoad)();
|
|
42
41
|
(0, _react.useEffect)(() => {
|
|
43
42
|
if (isOpen) (0, _userWaitEvent.waitStartEvent)();else (0, _userWaitEvent.waitEndEvent)();
|
|
44
43
|
}, [isOpen]);
|
|
45
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
...rest,
|
|
53
|
-
loading: isOpen,
|
|
54
|
-
message: message
|
|
55
|
-
})]
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dsLoadingIndicator.default, {
|
|
45
|
+
id: "em-loading",
|
|
46
|
+
size: size,
|
|
47
|
+
style: style,
|
|
48
|
+
...rest,
|
|
49
|
+
loading: isOpen,
|
|
50
|
+
message: message
|
|
56
51
|
});
|
|
57
52
|
});
|
|
58
53
|
exports.WaitMessage = WaitMessage;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useWaitMessageLoad = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
const useWaitMessageLoad = () => {
|
|
11
|
+
(0, _react.useEffect)(() => {
|
|
12
|
+
const htmlWaitMsgElement = document.getElementById('em-wait-message');
|
|
13
|
+
if (htmlWaitMsgElement) htmlWaitMsgElement.remove();
|
|
14
|
+
}, []);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.useWaitMessageLoad = useWaitMessageLoad;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import _jsx from "@babel/runtime/helpers/jsx";
|
|
2
2
|
import _styled from "styled-components";
|
|
3
3
|
|
|
4
|
-
var _GlobalStyle, _MediaBreakpoint, _WindowSize,
|
|
4
|
+
var _GlobalStyle, _MediaBreakpoint, _WindowSize, _DefaultWaitMessage, _ErrorToast;
|
|
5
5
|
|
|
6
6
|
import { MediaBreakpoint } from "../media-breakpoint/index.js";
|
|
7
7
|
import { WindowSize } from "../window-size/index.js";
|
|
8
|
-
import {
|
|
8
|
+
import { ErrorToast } from "../error-toast/index.js";
|
|
9
|
+
import { WaitMessage as DefaultWaitMessage } from "../modals/wait-message/index.js";
|
|
9
10
|
import GlobalStyle from "./style.js";
|
|
10
11
|
export const HostedApp = ({
|
|
12
|
+
WaitMessage,
|
|
11
13
|
children
|
|
12
|
-
}) => /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})),
|
|
13
|
-
close: true
|
|
14
|
-
})), children);
|
|
14
|
+
}) => /*#__PURE__*/_jsx(_StyledDiv, {}, void 0, _GlobalStyle || (_GlobalStyle = /*#__PURE__*/_jsx(GlobalStyle, {})), _MediaBreakpoint || (_MediaBreakpoint = /*#__PURE__*/_jsx(MediaBreakpoint, {})), _WindowSize || (_WindowSize = /*#__PURE__*/_jsx(WindowSize, {})), WaitMessage || _DefaultWaitMessage || (_DefaultWaitMessage = /*#__PURE__*/_jsx(DefaultWaitMessage, {})), _ErrorToast || (_ErrorToast = /*#__PURE__*/_jsx(ErrorToast, {})), children);
|
|
15
15
|
|
|
16
16
|
var _StyledDiv = /*#__PURE__*/_styled("div").withConfig({
|
|
17
17
|
componentId: "sc-njn2ro-0"
|
|
@@ -3,24 +3,13 @@ import { Provider } from 'react-redux';
|
|
|
3
3
|
import { ThemeProvider } from 'styled-components';
|
|
4
4
|
import { Router } from 'react-router-dom';
|
|
5
5
|
import { getDefaultTheme } from '@elliemae/pui-theme';
|
|
6
|
-
import { useInjectSaga } from 'redux-injectors';
|
|
7
6
|
import { isStandAloneGuest, isHost } from "../../utils/micro-frontend/index.js";
|
|
8
|
-
import { waitMessage } from "../../sideeffect/wait-message/index.js";
|
|
9
|
-
import { errorToast } from "../../sideeffect/error-toast/index.js";
|
|
10
7
|
import { ErrorBoundary } from "../error-boundary/index.js";
|
|
11
8
|
import { StandAloneApp } from "./stand-alone-app.js";
|
|
12
9
|
import { HostedApp } from "./hosted-app.js";
|
|
13
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
11
|
|
|
15
12
|
const AppToRender = props => {
|
|
16
|
-
useInjectSaga({
|
|
17
|
-
key: 'waitMessage',
|
|
18
|
-
saga: waitMessage
|
|
19
|
-
});
|
|
20
|
-
useInjectSaga({
|
|
21
|
-
key: 'errorToast',
|
|
22
|
-
saga: errorToast
|
|
23
|
-
});
|
|
24
13
|
const isParent = isStandAloneGuest() || isHost();
|
|
25
14
|
return isParent ? /*#__PURE__*/_jsx(StandAloneApp, { ...props
|
|
26
15
|
}) : /*#__PURE__*/_jsx(HostedApp, { ...props
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import _jsx from "@babel/runtime/helpers/jsx";
|
|
2
1
|
import { memo, useEffect } from 'react';
|
|
3
2
|
import DSLoadingIndicator from '@elliemae/ds-loading-indicator';
|
|
4
3
|
import { useAppSelector } from "../../../data/react-redux.js";
|
|
5
|
-
import {
|
|
4
|
+
import { useWaitMessageLoad } from "./wait-message-load.js";
|
|
6
5
|
import { waitStartEvent, waitEndEvent } from "../../../analytics/user-wait-event.js";
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
7
|
export const WaitMessage = /*#__PURE__*/memo(({
|
|
11
8
|
size = 'm',
|
|
12
9
|
style = {
|
|
@@ -25,19 +22,16 @@ export const WaitMessage = /*#__PURE__*/memo(({
|
|
|
25
22
|
|
|
26
23
|
return (_state$waitMessage2 = state.waitMessage) === null || _state$waitMessage2 === void 0 ? void 0 : _state$waitMessage2.message;
|
|
27
24
|
});
|
|
25
|
+
useWaitMessageLoad();
|
|
28
26
|
useEffect(() => {
|
|
29
27
|
if (isOpen) waitStartEvent();else waitEndEvent();
|
|
30
28
|
}, [isOpen]);
|
|
31
|
-
return /*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...rest,
|
|
39
|
-
loading: isOpen,
|
|
40
|
-
message: message
|
|
41
|
-
})]
|
|
29
|
+
return /*#__PURE__*/_jsx(DSLoadingIndicator, {
|
|
30
|
+
id: "em-loading",
|
|
31
|
+
size: size,
|
|
32
|
+
style: style,
|
|
33
|
+
...rest,
|
|
34
|
+
loading: isOpen,
|
|
35
|
+
message: message
|
|
42
36
|
});
|
|
43
37
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type HostedAppProps = {
|
|
3
|
+
WaitMessage: React.ReactNode;
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
};
|
|
5
|
-
export declare const HostedApp:
|
|
6
|
+
export declare const HostedApp: ({ WaitMessage, children }: HostedAppProps) => JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useWaitMessageLoad: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"url": "http://git.elliemae.io/platform-ui/pui-app-sdk.git"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
|
-
"npm": ">=
|
|
50
|
+
"npm": ">=8",
|
|
51
51
|
"node": ">=14"
|
|
52
52
|
},
|
|
53
53
|
"author": "ICE MT",
|
|
@@ -89,37 +89,37 @@
|
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@elliemae/app-react-dependencies": "^2.10.0",
|
|
92
|
-
"@elliemae/ds-basic": "^2.
|
|
93
|
-
"@elliemae/ds-button": "^2.
|
|
94
|
-
"@elliemae/ds-form": "^2.
|
|
95
|
-
"@elliemae/ds-loading-indicator": "^2.
|
|
96
|
-
"@elliemae/ds-date-picker": "^2.
|
|
97
|
-
"@elliemae/ds-modal": "^2.
|
|
98
|
-
"@elliemae/ds-popperjs": "^2.
|
|
99
|
-
"@elliemae/ds-toast": "^2.
|
|
92
|
+
"@elliemae/ds-basic": "^2.4.1",
|
|
93
|
+
"@elliemae/ds-button": "^2.4.1",
|
|
94
|
+
"@elliemae/ds-form": "^2.4.1",
|
|
95
|
+
"@elliemae/ds-loading-indicator": "^2.4.1",
|
|
96
|
+
"@elliemae/ds-date-picker": "^2.4.1",
|
|
97
|
+
"@elliemae/ds-modal": "^2.4.1",
|
|
98
|
+
"@elliemae/ds-popperjs": "^2.4.1",
|
|
99
|
+
"@elliemae/ds-toast": "^2.4.1",
|
|
100
100
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
101
101
|
"@elliemae/pui-diagnostics": "^2.7.3",
|
|
102
102
|
"@elliemae/pui-micro-frontend-base": "^1.10.1",
|
|
103
|
-
"@elliemae/pui-theme": "^2.
|
|
104
|
-
"@elliemae/pui-user-monitoring": "^1.
|
|
103
|
+
"@elliemae/pui-theme": "^2.4.1",
|
|
104
|
+
"@elliemae/pui-user-monitoring": "^1.14.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@elliemae/app-react-dependencies": "~2.10.0",
|
|
108
|
-
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.
|
|
109
|
-
"@elliemae/ds-basic": "~2.
|
|
110
|
-
"@elliemae/ds-button": "~2.
|
|
111
|
-
"@elliemae/ds-form": "~2.
|
|
112
|
-
"@elliemae/ds-loading-indicator": "~2.
|
|
113
|
-
"@elliemae/ds-date-picker": "~2.
|
|
114
|
-
"@elliemae/ds-modal": "~2.
|
|
115
|
-
"@elliemae/ds-popperjs": "~2.
|
|
116
|
-
"@elliemae/ds-toast": "~2.
|
|
108
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
|
|
109
|
+
"@elliemae/ds-basic": "~2.4.1",
|
|
110
|
+
"@elliemae/ds-button": "~2.4.1",
|
|
111
|
+
"@elliemae/ds-form": "~2.4.1",
|
|
112
|
+
"@elliemae/ds-loading-indicator": "~2.4.1",
|
|
113
|
+
"@elliemae/ds-date-picker": "~2.4.1",
|
|
114
|
+
"@elliemae/ds-modal": "~2.4.1",
|
|
115
|
+
"@elliemae/ds-popperjs": "~2.4.1",
|
|
116
|
+
"@elliemae/ds-toast": "~2.4.1",
|
|
117
117
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
118
118
|
"@elliemae/pui-cli": "~5.26.2",
|
|
119
119
|
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
120
120
|
"@elliemae/pui-e2e-test-sdk": "~6.10.0",
|
|
121
121
|
"@elliemae/pui-micro-frontend-base": "~1.10.1",
|
|
122
|
-
"@elliemae/pui-theme": "~2.
|
|
123
|
-
"@elliemae/pui-user-monitoring": "~1.
|
|
122
|
+
"@elliemae/pui-theme": "~2.4.1",
|
|
123
|
+
"@elliemae/pui-user-monitoring": "~1.14.0"
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.errorToast = errorToast;
|
|
7
|
-
|
|
8
|
-
var _effects = require("redux-saga/effects");
|
|
9
|
-
|
|
10
|
-
var _index = require("../../data/error/index.js");
|
|
11
|
-
|
|
12
|
-
var _guest = require("../../utils/micro-frontend/guest.js");
|
|
13
|
-
|
|
14
|
-
var _index2 = require("../../utils/micro-frontend/index.js");
|
|
15
|
-
|
|
16
|
-
var _logRecords = require("../../utils/log-records.js");
|
|
17
|
-
|
|
18
|
-
function* openErrorToast(action) {
|
|
19
|
-
try {
|
|
20
|
-
var _action$payload, _action$payload2;
|
|
21
|
-
|
|
22
|
-
const microApp = yield (0, _effects.call)(_guest.CMicroAppGuest.getInstance.bind(_guest.CMicroAppGuest));
|
|
23
|
-
const host = yield (0, _effects.call)(microApp.getHost.bind(microApp));
|
|
24
|
-
const message = (action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.description) || (action === null || action === void 0 ? void 0 : (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.messageText);
|
|
25
|
-
if (host && message) yield (0, _effects.call)(host.openErrorBanner.bind(host), message);
|
|
26
|
-
} catch (ex) {
|
|
27
|
-
(0, _index2.getLogger)().error({ ..._logRecords.logRecords.ERR_TOAST_OPEN_FAILED,
|
|
28
|
-
exception: ex
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function* errorToast() {
|
|
34
|
-
yield (0, _effects.takeLatest)(_index.actions.set.type, openErrorToast);
|
|
35
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.waitMessage = waitMessage;
|
|
7
|
-
|
|
8
|
-
var _effects = require("redux-saga/effects");
|
|
9
|
-
|
|
10
|
-
var _actions = require("../../data/wait-message/actions.js");
|
|
11
|
-
|
|
12
|
-
var _guest = require("../../utils/micro-frontend/guest.js");
|
|
13
|
-
|
|
14
|
-
var _index = require("../../utils/micro-frontend/index.js");
|
|
15
|
-
|
|
16
|
-
var _logRecords = require("../../utils/log-records.js");
|
|
17
|
-
|
|
18
|
-
function* openWaitMessage() {
|
|
19
|
-
try {
|
|
20
|
-
const microApp = yield (0, _effects.call)(_guest.CMicroAppGuest.getInstance.bind(_guest.CMicroAppGuest));
|
|
21
|
-
const host = yield (0, _effects.call)(microApp.getHost.bind(microApp));
|
|
22
|
-
if (host) yield (0, _effects.call)(host.openWaitMessage.bind(host));
|
|
23
|
-
} catch (ex) {
|
|
24
|
-
(0, _index.getLogger)().error({ ..._logRecords.logRecords.WAIT_MSG_OPEN_FAILED,
|
|
25
|
-
exception: ex
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function* closeWaitMessage() {
|
|
31
|
-
try {
|
|
32
|
-
const microApp = yield (0, _effects.call)(_guest.CMicroAppGuest.getInstance.bind(_guest.CMicroAppGuest));
|
|
33
|
-
const host = yield (0, _effects.call)(microApp.getHost.bind(microApp));
|
|
34
|
-
if (host) yield (0, _effects.call)(host.closeWaitMessage.bind(host));
|
|
35
|
-
} catch (ex) {
|
|
36
|
-
(0, _index.getLogger)().error({ ..._logRecords.logRecords.WAIT_MSG_CLOSE_FAILED,
|
|
37
|
-
exception: ex
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function* waitMessage() {
|
|
43
|
-
yield (0, _effects.takeLatest)(_actions.ACTIONS.OPEN, openWaitMessage);
|
|
44
|
-
yield (0, _effects.takeLatest)(_actions.ACTIONS.CLOSE, closeWaitMessage);
|
|
45
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.HTMLWaitMessage = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
const HTMLWaitMessage = /*#__PURE__*/(0, _react.memo)(({
|
|
13
|
-
close
|
|
14
|
-
}) => {
|
|
15
|
-
(0, _react.useEffect)(() => {
|
|
16
|
-
const htmlWaitMsgElement = document.getElementById('em-wait-message');
|
|
17
|
-
if (htmlWaitMsgElement && close) htmlWaitMsgElement.remove();
|
|
18
|
-
}, [close]);
|
|
19
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {});
|
|
20
|
-
});
|
|
21
|
-
exports.HTMLWaitMessage = HTMLWaitMessage;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { call, takeLatest } from 'redux-saga/effects';
|
|
2
|
-
import { actions } from "../../data/error/index.js";
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
-
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
7
|
-
function* openErrorToast(action) {
|
|
8
|
-
try {
|
|
9
|
-
var _action$payload, _action$payload2;
|
|
10
|
-
|
|
11
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
12
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
13
|
-
const message = (action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.description) || (action === null || action === void 0 ? void 0 : (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.messageText);
|
|
14
|
-
if (host && message) yield call(host.openErrorBanner.bind(host), message);
|
|
15
|
-
} catch (ex) {
|
|
16
|
-
getLogger().error({ ...logRecords.ERR_TOAST_OPEN_FAILED,
|
|
17
|
-
exception: ex
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function* errorToast() {
|
|
23
|
-
yield takeLatest(actions.set.type, openErrorToast);
|
|
24
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { call, takeLatest } from 'redux-saga/effects';
|
|
2
|
-
import { ACTIONS } from "../../data/wait-message/actions.js";
|
|
3
|
-
import { CMicroAppGuest } from "../../utils/micro-frontend/guest.js";
|
|
4
|
-
import { getLogger } from "../../utils/micro-frontend/index.js";
|
|
5
|
-
import { logRecords } from "../../utils/log-records.js";
|
|
6
|
-
|
|
7
|
-
function* openWaitMessage() {
|
|
8
|
-
try {
|
|
9
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
10
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
11
|
-
if (host) yield call(host.openWaitMessage.bind(host));
|
|
12
|
-
} catch (ex) {
|
|
13
|
-
getLogger().error({ ...logRecords.WAIT_MSG_OPEN_FAILED,
|
|
14
|
-
exception: ex
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function* closeWaitMessage() {
|
|
20
|
-
try {
|
|
21
|
-
const microApp = yield call(CMicroAppGuest.getInstance.bind(CMicroAppGuest));
|
|
22
|
-
const host = yield call(microApp.getHost.bind(microApp));
|
|
23
|
-
if (host) yield call(host.closeWaitMessage.bind(host));
|
|
24
|
-
} catch (ex) {
|
|
25
|
-
getLogger().error({ ...logRecords.WAIT_MSG_CLOSE_FAILED,
|
|
26
|
-
exception: ex
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function* waitMessage() {
|
|
32
|
-
yield takeLatest(ACTIONS.OPEN, openWaitMessage);
|
|
33
|
-
yield takeLatest(ACTIONS.CLOSE, closeWaitMessage);
|
|
34
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { memo, useEffect } from 'react';
|
|
2
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
export const HTMLWaitMessage = /*#__PURE__*/memo(({
|
|
5
|
-
close
|
|
6
|
-
}) => {
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const htmlWaitMsgElement = document.getElementById('em-wait-message');
|
|
9
|
-
if (htmlWaitMsgElement && close) htmlWaitMsgElement.remove();
|
|
10
|
-
}, [close]);
|
|
11
|
-
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
12
|
-
});
|