@elliemae/pui-app-sdk 2.19.0 → 2.21.1
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/utils/micro-frontend/guest.js +1 -2
- package/dist/cjs/utils/micro-frontend/host.js +6 -6
- package/dist/cjs/utils/session.js +2 -2
- package/dist/cjs/view/error-toast/index.js +5 -5
- package/dist/cjs/view/error-toast/index.stories.js +8 -8
- package/dist/cjs/view/fields/check-box/index.js +1 -1
- package/dist/cjs/view/fields/check-box/set-value.stories.js +2 -2
- package/dist/cjs/view/fields/combo-box/index.js +1 -1
- package/dist/cjs/view/fields/date-input/index.js +1 -1
- package/dist/cjs/view/fields/form-item-layout/index.js +1 -1
- package/dist/cjs/view/fields/input-mask/index.js +1 -1
- package/dist/cjs/view/fields/large-text-box/index.js +1 -1
- package/dist/cjs/view/fields/radio/index.js +1 -1
- package/dist/cjs/view/fields/radio/set-value.stories.js +2 -2
- package/dist/cjs/view/fields/radio-group/index.js +1 -1
- package/dist/cjs/view/fields/radio-group/index.stories.js +1 -1
- package/dist/cjs/view/fields/text-box/index.js +1 -1
- package/dist/cjs/view/form/submit-button/index.js +2 -2
- package/dist/cjs/view/modals/session-expiry/index.js +4 -1
- package/dist/cjs/view/modals/wait-message/index.js +2 -2
- package/dist/cjs/view/session-timeout/index.js +5 -1
- package/dist/es/utils/micro-frontend/guest.js +1 -1
- package/dist/es/utils/micro-frontend/host.js +8 -7
- package/dist/es/utils/session.js +2 -2
- package/dist/es/view/error-toast/index.js +1 -1
- package/dist/es/view/error-toast/index.stories.js +2 -2
- package/dist/es/view/fields/check-box/index.js +1 -1
- package/dist/es/view/fields/check-box/set-value.stories.js +1 -1
- package/dist/es/view/fields/combo-box/index.js +1 -1
- package/dist/es/view/fields/date-input/index.js +1 -1
- package/dist/es/view/fields/form-item-layout/index.js +1 -1
- package/dist/es/view/fields/input-mask/index.js +1 -1
- package/dist/es/view/fields/large-text-box/index.js +1 -1
- package/dist/es/view/fields/radio/index.js +1 -1
- package/dist/es/view/fields/radio/set-value.stories.js +1 -1
- package/dist/es/view/fields/radio-group/index.js +1 -1
- package/dist/es/view/fields/radio-group/index.stories.js +1 -1
- package/dist/es/view/fields/text-box/index.js +1 -1
- package/dist/es/view/form/submit-button/index.js +1 -1
- package/dist/es/view/modals/session-expiry/index.js +5 -2
- package/dist/es/view/modals/wait-message/index.js +1 -1
- package/dist/es/view/session-timeout/index.js +5 -1
- package/dist/types/data/react-redux.d.ts +8 -8
- package/dist/types/utils/session.d.ts +5 -2
- package/dist/types/view/fields/check-box/index.d.ts +1 -1
- package/dist/types/view/fields/input-mask/index.d.ts +1 -1
- package/package.json +22 -14
|
@@ -139,8 +139,7 @@ class CMicroAppGuest {
|
|
|
139
139
|
|
|
140
140
|
host = ((_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : (_window$parent$emui = _window$parent.emui) === null || _window$parent$emui === void 0 ? void 0 : _window$parent$emui.MicroAppHost) || null;
|
|
141
141
|
} else if (_emSsfGuest.default && this.props.hostName) {
|
|
142
|
-
_emSsfGuest.default.connect();
|
|
143
|
-
|
|
142
|
+
await _emSsfGuest.default.connect();
|
|
144
143
|
const timeout = new Promise(resolve => {
|
|
145
144
|
setTimeout(resolve, 100, null);
|
|
146
145
|
});
|
|
@@ -41,6 +41,7 @@ var _appdynamics = require("../../analytics/appdynamics.js");
|
|
|
41
41
|
|
|
42
42
|
var _webAnalytics = require("../../analytics/web-analytics.js");
|
|
43
43
|
|
|
44
|
+
/* eslint-disable max-lines */
|
|
44
45
|
class CMicroAppHost {
|
|
45
46
|
constructor(params) {
|
|
46
47
|
(0, _defineProperty2.default)(this, "logger", void 0);
|
|
@@ -99,11 +100,11 @@ class CMicroAppHost {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
getItem(key) {
|
|
102
|
-
return
|
|
103
|
+
return (0, _window.getWindow)().sessionStorage.getItem(key);
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
setItem(key, value) {
|
|
106
|
-
|
|
107
|
+
(0, _window.getWindow)().sessionStorage.setItem(key, value);
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
getGuests() {
|
|
@@ -149,11 +150,11 @@ class CMicroAppHost {
|
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
getAuthToken() {
|
|
152
|
-
return
|
|
153
|
+
return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
renewAuthToken() {
|
|
156
|
-
return
|
|
157
|
+
return (0, _window.getWindow)().sessionStorage.getItem('Authorization');
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
logout() {
|
|
@@ -185,8 +186,7 @@ class CMicroAppHost {
|
|
|
185
186
|
setSystemVersion(version = 'latest') {
|
|
186
187
|
window.emui.version = version;
|
|
187
188
|
this.props.systemVersion = version;
|
|
188
|
-
}
|
|
189
|
-
|
|
189
|
+
}
|
|
190
190
|
|
|
191
191
|
sendBAEvent(data) {
|
|
192
192
|
(0, _index3.sendBAEvent)({
|
|
@@ -23,12 +23,12 @@ let sessionExpiryWarningNotified = false;
|
|
|
23
23
|
let timerHandle;
|
|
24
24
|
let sessionExpiryWarningNotifiedAt;
|
|
25
25
|
|
|
26
|
-
const resetUserIdleTime = () => {
|
|
26
|
+
const resetUserIdleTime = (resetWarningModal = false) => {
|
|
27
27
|
sessionExpiryWarningNotified = false;
|
|
28
28
|
sessionExpiryWarningNotifiedAt = null;
|
|
29
29
|
lastUserActivityTimeStamp = Date.now();
|
|
30
30
|
Promise.resolve().then(() => {
|
|
31
|
-
resetListeners.forEach(listener => listener());
|
|
31
|
+
resetListeners.forEach(listener => listener(resetWarningModal));
|
|
32
32
|
}).catch(() => {});
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -7,7 +7,7 @@ exports.ErrorToast = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _dsToast = require("@elliemae/ds-toast");
|
|
11
11
|
|
|
12
12
|
var _reactRedux = require("../../data/react-redux.js");
|
|
13
13
|
|
|
@@ -22,21 +22,21 @@ const ErrorToast = /*#__PURE__*/(0, _react.memo)(props => {
|
|
|
22
22
|
// Only show toast when there is error set in redux state
|
|
23
23
|
if (storeError && (storeError !== null && storeError !== void 0 && storeError.description || storeError !== null && storeError !== void 0 && storeError.messageText)) {
|
|
24
24
|
const toastProps = {
|
|
25
|
-
position:
|
|
25
|
+
position: _dsToast.ToastPosition.TOP_RIGHT,
|
|
26
26
|
messageTitle: 'Error',
|
|
27
|
-
type:
|
|
27
|
+
type: _dsToast.ToastType.ERROR,
|
|
28
28
|
...props,
|
|
29
29
|
...storeError
|
|
30
30
|
};
|
|
31
31
|
const messageText = toastProps.description || toastProps.messageText;
|
|
32
|
-
if (messageText) (0,
|
|
32
|
+
if (messageText) (0, _dsToast.toast)({
|
|
33
33
|
messageText,
|
|
34
34
|
...toastProps
|
|
35
35
|
});
|
|
36
36
|
dispatch(_index.actions.clear());
|
|
37
37
|
}
|
|
38
38
|
}, [storeError, props, dispatch]);
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dsToast.DSToast, { ...props
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
exports.ErrorToast = ErrorToast;
|
|
@@ -11,9 +11,9 @@ var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
|
11
11
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _dsToast = require("@elliemae/ds-toast");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _dsButton = _interopRequireDefault(require("@elliemae/ds-button"));
|
|
17
17
|
|
|
18
18
|
var _reactRedux = require("../../data/react-redux.js");
|
|
19
19
|
|
|
@@ -62,7 +62,7 @@ exports.BasicError = BasicError;
|
|
|
62
62
|
|
|
63
63
|
const showToast = ({
|
|
64
64
|
messageText = 'Toast Message',
|
|
65
|
-
type =
|
|
65
|
+
type = _dsToast.ToastType.DEFAULT,
|
|
66
66
|
...props
|
|
67
67
|
}) => _index.error.set({
|
|
68
68
|
type,
|
|
@@ -73,25 +73,25 @@ const showToast = ({
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
const successToast = props => showToast({ ...props,
|
|
76
|
-
type:
|
|
76
|
+
type: _dsToast.ToastType.SUCCESS
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
const infoToast = props => showToast({ ...props,
|
|
80
|
-
type:
|
|
80
|
+
type: _dsToast.ToastType.INFO
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
const warningToast = props => showToast({ ...props,
|
|
84
|
-
type:
|
|
84
|
+
type: _dsToast.ToastType.WARNING
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
const errorToast = props => showToast({ ...props,
|
|
88
|
-
type:
|
|
88
|
+
type: _dsToast.ToastType.ERROR
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
const ToastButton = ({
|
|
92
92
|
labelText,
|
|
93
93
|
onClick
|
|
94
|
-
}) => /*#__PURE__*/(0, _jsx3.default)(
|
|
94
|
+
}) => /*#__PURE__*/(0, _jsx3.default)(_dsButton.default, {
|
|
95
95
|
buttonType: "text",
|
|
96
96
|
labelText: labelText,
|
|
97
97
|
onClick: onClick
|
|
@@ -15,7 +15,7 @@ exports.CheckBox = void 0;
|
|
|
15
15
|
|
|
16
16
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
17
17
|
|
|
18
|
-
var _Checkbox = _interopRequireWildcard(require("@elliemae/ds-
|
|
18
|
+
var _Checkbox = _interopRequireWildcard(require("@elliemae/ds-form/Checkbox"));
|
|
19
19
|
|
|
20
20
|
var _reactHookForm = require("react-hook-form");
|
|
21
21
|
|
|
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _dsButton = _interopRequireDefault(require("@elliemae/ds-button"));
|
|
17
17
|
|
|
18
18
|
var _index = require("../../form/index.js");
|
|
19
19
|
|
|
@@ -78,6 +78,6 @@ SetValue.args = {
|
|
|
78
78
|
defaultChecked: false
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
var _StyledDSButton = /*#__PURE__*/(0, _styledComponents.default)(
|
|
81
|
+
var _StyledDSButton = /*#__PURE__*/(0, _styledComponents.default)(_dsButton.default).withConfig({
|
|
82
82
|
componentId: "sc-1lqqv9c-0"
|
|
83
83
|
})(["margin-top:10px;"]);
|
|
@@ -9,7 +9,7 @@ exports.ComboBox = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _ComboBox = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _ComboBox = _interopRequireDefault(require("@elliemae/ds-form/ComboBox"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.DateInput = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _DateInput = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _DateInput = _interopRequireDefault(require("@elliemae/ds-form/DateInput"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.FormItemLayout = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _FormItem = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _FormItem = _interopRequireDefault(require("@elliemae/ds-form/FormItem"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "MASK_TYPES", {
|
|
|
21
21
|
|
|
22
22
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
23
23
|
|
|
24
|
-
var _InputMask = _interopRequireWildcard(require("@elliemae/ds-
|
|
24
|
+
var _InputMask = _interopRequireWildcard(require("@elliemae/ds-form/InputMask"));
|
|
25
25
|
|
|
26
26
|
var _reactHookForm = require("react-hook-form");
|
|
27
27
|
|
|
@@ -9,7 +9,7 @@ exports.LargeTextBox = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _LargeInputText = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _LargeInputText = _interopRequireDefault(require("@elliemae/ds-form/LargeInputText"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.Radio = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _Radio = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _Radio = _interopRequireDefault(require("@elliemae/ds-form/Radio"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _dsButton = _interopRequireDefault(require("@elliemae/ds-button"));
|
|
17
17
|
|
|
18
18
|
var _index = require("../../form/index.js");
|
|
19
19
|
|
|
@@ -76,6 +76,6 @@ SetValue.args = {
|
|
|
76
76
|
defaultChecked: true
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
var _StyledDSButton = /*#__PURE__*/(0, _styledComponents.default)(
|
|
79
|
+
var _StyledDSButton = /*#__PURE__*/(0, _styledComponents.default)(_dsButton.default).withConfig({
|
|
80
80
|
componentId: "sc-fd8n0e-0"
|
|
81
81
|
})(["margin-top:10px;"]);
|
|
@@ -9,7 +9,7 @@ exports.RadioGroup = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _RadioGroup = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _RadioGroup = _interopRequireDefault(require("@elliemae/ds-form/RadioGroup"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.default = exports.Basic = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _Radio = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _Radio = _interopRequireDefault(require("@elliemae/ds-form/Radio"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.TextBox = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
11
11
|
|
|
12
|
-
var _TextBox = _interopRequireDefault(require("@elliemae/ds-
|
|
12
|
+
var _TextBox = _interopRequireDefault(require("@elliemae/ds-form/TextBox"));
|
|
13
13
|
|
|
14
14
|
var _reactHookForm = require("react-hook-form");
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ exports.FormSubmitButton = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _reactHookForm = require("react-hook-form");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _dsButton = _interopRequireDefault(require("@elliemae/ds-button"));
|
|
13
13
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ const FormSubmitButton = ({ ...rest
|
|
|
21
21
|
mode
|
|
22
22
|
}
|
|
23
23
|
} = (0, _reactHookForm.useFormContext)();
|
|
24
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dsButton.default, { ...rest,
|
|
25
25
|
type: "submit",
|
|
26
26
|
disabled: mode !== 'onSubmit' && (!formState.isDirty || formState.isDirty && !formState.isValid)
|
|
27
27
|
});
|
|
@@ -35,10 +35,13 @@ const SessionExpiry = /*#__PURE__*/(0, _react.memo)(({
|
|
|
35
35
|
const [isOpen, setIsOpen] = (0, _react.useState)(open);
|
|
36
36
|
const timeLeft = (0, _customHooks.useTrackSessionExpiry)(warningNotifiedAt);
|
|
37
37
|
const dispatch = (0, _reactRedux.useAppDispatch)();
|
|
38
|
+
(0, _react.useEffect)(() => {
|
|
39
|
+
setIsOpen(open);
|
|
40
|
+
}, [open]);
|
|
38
41
|
|
|
39
42
|
const resetSession = () => {
|
|
40
43
|
setIsOpen(false);
|
|
41
|
-
(0, _session.resetUserIdleTime)();
|
|
44
|
+
(0, _session.resetUserIdleTime)(true);
|
|
42
45
|
dispatch(_actions.logout.cancel());
|
|
43
46
|
};
|
|
44
47
|
|
|
@@ -11,7 +11,7 @@ var _jsx3 = _interopRequireDefault(require("@babel/runtime/helpers/jsx"));
|
|
|
11
11
|
|
|
12
12
|
var _react = require("react");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _dsLoadingIndicator = _interopRequireDefault(require("@elliemae/ds-loading-indicator"));
|
|
15
15
|
|
|
16
16
|
var _reactRedux = require("../../../data/react-redux.js");
|
|
17
17
|
|
|
@@ -45,7 +45,7 @@ const WaitMessage = /*#__PURE__*/(0, _react.memo)(({
|
|
|
45
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
46
46
|
children: [/*#__PURE__*/(0, _jsx3.default)(_htmlWaitMessage.HTMLWaitMessage, {
|
|
47
47
|
close: isOpen !== null
|
|
48
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
48
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_dsLoadingIndicator.default, {
|
|
49
49
|
id: "em-loading",
|
|
50
50
|
size: size,
|
|
51
51
|
style: style,
|
|
@@ -30,7 +30,11 @@ const SessionTimeout = () => {
|
|
|
30
30
|
setwarningNotifiedAt(sessionExpiryWarningNotifiedAt);
|
|
31
31
|
setSessionExpiryWarning(true);
|
|
32
32
|
});
|
|
33
|
-
const resetCb = (0, _session.subscribeToResetSession)(
|
|
33
|
+
const resetCb = (0, _session.subscribeToResetSession)(resetWarningModal => {
|
|
34
|
+
if (resetWarningModal === true) {
|
|
35
|
+
setSessionExpiryWarning(false);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
34
38
|
const sessionExpiredCb = (0, _session.subscribeToSessionExpiry)(() => {
|
|
35
39
|
dispatch(_actions.logout.confirm());
|
|
36
40
|
setSessionExpiryWarning(false);
|
|
@@ -126,7 +126,7 @@ export class CMicroAppGuest {
|
|
|
126
126
|
|
|
127
127
|
host = ((_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : (_window$parent$emui = _window$parent.emui) === null || _window$parent$emui === void 0 ? void 0 : _window$parent$emui.MicroAppHost) || null;
|
|
128
128
|
} else if (ssfGuest && this.props.hostName) {
|
|
129
|
-
ssfGuest.connect();
|
|
129
|
+
await ssfGuest.connect();
|
|
130
130
|
const timeout = new Promise(resolve => {
|
|
131
131
|
setTimeout(resolve, 100, null);
|
|
132
132
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable max-lines */
|
|
2
4
|
import { publish, subscribe, unsubscribe } from 'pubsub-js';
|
|
3
5
|
import { getDefaultTheme } from '@elliemae/pui-theme';
|
|
4
6
|
import { getStore } from "../../data/store.js";
|
|
@@ -11,7 +13,7 @@ import { loadAppConfig } from "../app-config/index.js";
|
|
|
11
13
|
import { browserHistory } from "../history.js";
|
|
12
14
|
import { logger } from "./console-logger.js";
|
|
13
15
|
import { HOST_WINDOW_RESIZED, HOST_WINDOW_BREAKPOINT_CHANGED } from "../constants.js";
|
|
14
|
-
import { getCurrentBreakpoint, getViewportSize as getWindowViewportSize } from "../window.js";
|
|
16
|
+
import { getWindow, getCurrentBreakpoint, getViewportSize as getWindowViewportSize } from "../window.js";
|
|
15
17
|
import { sendBAEvent } from "../../analytics/index.js";
|
|
16
18
|
import { setAppDynamicsUserData } from "../../analytics/appdynamics.js";
|
|
17
19
|
import { updateBAEventParameters } from "../../analytics/web-analytics.js";
|
|
@@ -79,11 +81,11 @@ export class CMicroAppHost {
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
getItem(key) {
|
|
82
|
-
return
|
|
84
|
+
return getWindow().sessionStorage.getItem(key);
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
setItem(key, value) {
|
|
86
|
-
|
|
88
|
+
getWindow().sessionStorage.setItem(key, value);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
getGuests() {
|
|
@@ -129,11 +131,11 @@ export class CMicroAppHost {
|
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
getAuthToken() {
|
|
132
|
-
return
|
|
134
|
+
return getWindow().sessionStorage.getItem('Authorization');
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
renewAuthToken() {
|
|
136
|
-
return
|
|
138
|
+
return getWindow().sessionStorage.getItem('Authorization');
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
logout() {
|
|
@@ -165,8 +167,7 @@ export class CMicroAppHost {
|
|
|
165
167
|
setSystemVersion(version = 'latest') {
|
|
166
168
|
window.emui.version = version;
|
|
167
169
|
this.props.systemVersion = version;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
+
}
|
|
170
171
|
|
|
171
172
|
sendBAEvent(data) {
|
|
172
173
|
sendBAEvent({
|
package/dist/es/utils/session.js
CHANGED
|
@@ -10,12 +10,12 @@ const userInteractionEvents = ['click', 'scroll', 'keypress', 'touchstart'];
|
|
|
10
10
|
let sessionExpiryWarningNotified = false;
|
|
11
11
|
let timerHandle;
|
|
12
12
|
let sessionExpiryWarningNotifiedAt;
|
|
13
|
-
export const resetUserIdleTime = () => {
|
|
13
|
+
export const resetUserIdleTime = (resetWarningModal = false) => {
|
|
14
14
|
sessionExpiryWarningNotified = false;
|
|
15
15
|
sessionExpiryWarningNotifiedAt = null;
|
|
16
16
|
lastUserActivityTimeStamp = Date.now();
|
|
17
17
|
Promise.resolve().then(() => {
|
|
18
|
-
resetListeners.forEach(listener => listener());
|
|
18
|
+
resetListeners.forEach(listener => listener(resetWarningModal));
|
|
19
19
|
}).catch(() => {});
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, memo } from 'react';
|
|
2
|
-
import { ToastPosition, ToastType, DSToast, toast } from '@elliemae/ds-
|
|
2
|
+
import { ToastPosition, ToastType, DSToast, toast } from '@elliemae/ds-toast';
|
|
3
3
|
import { useAppSelector, useAppDispatch } from "../../data/react-redux.js";
|
|
4
4
|
import { actions as error } from "../../data/error/index.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -3,8 +3,8 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
3
3
|
var _ErrorToast, _Renderer, _Renderer2;
|
|
4
4
|
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
|
-
import { ToastType } from '@elliemae/ds-
|
|
7
|
-
import DSButton from '@elliemae/ds-
|
|
6
|
+
import { ToastType } from '@elliemae/ds-toast';
|
|
7
|
+
import DSButton from '@elliemae/ds-button';
|
|
8
8
|
import { useAppDispatch } from "../../data/react-redux.js";
|
|
9
9
|
import { error } from "../../index.js";
|
|
10
10
|
import { ErrorToast } from "./index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSCheckbox, { CHECKBOX_VARIANT } from '@elliemae/ds-
|
|
2
|
+
import DSCheckbox, { CHECKBOX_VARIANT } from '@elliemae/ds-form/Checkbox';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const CheckBox = ({
|
|
@@ -4,7 +4,7 @@ import _styled from "styled-components";
|
|
|
4
4
|
var _ToggleValue;
|
|
5
5
|
|
|
6
6
|
import { useFormContext, get } from 'react-hook-form';
|
|
7
|
-
import DSButton from '@elliemae/ds-
|
|
7
|
+
import DSButton from '@elliemae/ds-button';
|
|
8
8
|
import { Form } from "../../form/index.js";
|
|
9
9
|
import { CheckBox, CHECKBOX_VARIANT } from "./index.js";
|
|
10
10
|
import { ConnectForm } from "../connect-form.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSComboBox from '@elliemae/ds-
|
|
2
|
+
import DSComboBox from '@elliemae/ds-form/ComboBox';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const ComboBox = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSDateInput from '@elliemae/ds-
|
|
2
|
+
import DSDateInput from '@elliemae/ds-form/DateInput';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const DateInput = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSFormItemLayout from '@elliemae/ds-
|
|
2
|
+
import DSFormItemLayout from '@elliemae/ds-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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSInputMask, { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-
|
|
2
|
+
import DSInputMask, { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-form/InputMask';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const InputMask = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSLargeInputText from '@elliemae/ds-
|
|
2
|
+
import DSLargeInputText from '@elliemae/ds-form/LargeInputText';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const LargeTextBox = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSRadio from '@elliemae/ds-
|
|
2
|
+
import DSRadio from '@elliemae/ds-form/Radio';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const Radio = ({
|
|
@@ -4,7 +4,7 @@ import _styled from "styled-components";
|
|
|
4
4
|
var _ToggleValue;
|
|
5
5
|
|
|
6
6
|
import { useFormContext, get } from 'react-hook-form';
|
|
7
|
-
import DSButton from '@elliemae/ds-
|
|
7
|
+
import DSButton from '@elliemae/ds-button';
|
|
8
8
|
import { Form } from "../../form/index.js";
|
|
9
9
|
import { Radio } from "./index.js";
|
|
10
10
|
import { ConnectForm } from "../connect-form.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSRadioGroup from '@elliemae/ds-
|
|
2
|
+
import DSRadioGroup from '@elliemae/ds-form/RadioGroup';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const RadioGroup = ({
|
|
@@ -2,7 +2,7 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
|
|
3
3
|
var _DSRadio, _DSRadio2;
|
|
4
4
|
|
|
5
|
-
import DSRadio from '@elliemae/ds-
|
|
5
|
+
import DSRadio from '@elliemae/ds-form/Radio';
|
|
6
6
|
import { get } from 'react-hook-form';
|
|
7
7
|
import { RadioGroup } from "./index.js";
|
|
8
8
|
import { Form } from "../../form/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _jsx2 from "@babel/runtime/helpers/jsx";
|
|
2
|
-
import DSTextBox from '@elliemae/ds-
|
|
2
|
+
import DSTextBox from '@elliemae/ds-form/TextBox';
|
|
3
3
|
import { Controller } from 'react-hook-form';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export const TextBox = ({
|
|
@@ -2,7 +2,7 @@ import _jsx from "@babel/runtime/helpers/jsx";
|
|
|
2
2
|
|
|
3
3
|
var _p;
|
|
4
4
|
|
|
5
|
-
import { memo, useState } from 'react';
|
|
5
|
+
import { memo, useEffect, useState } from 'react';
|
|
6
6
|
import DSModal, { MODAL_SUB_TYPE_V2, MODAL_TYPE_V2 } from '@elliemae/ds-modal';
|
|
7
7
|
import { useAppDispatch } from "../../../data/react-redux.js";
|
|
8
8
|
import { logout } from "../../../data/logout/actions.js";
|
|
@@ -16,10 +16,13 @@ export const SessionExpiry = /*#__PURE__*/memo(({
|
|
|
16
16
|
const [isOpen, setIsOpen] = useState(open);
|
|
17
17
|
const timeLeft = useTrackSessionExpiry(warningNotifiedAt);
|
|
18
18
|
const dispatch = useAppDispatch();
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setIsOpen(open);
|
|
21
|
+
}, [open]);
|
|
19
22
|
|
|
20
23
|
const resetSession = () => {
|
|
21
24
|
setIsOpen(false);
|
|
22
|
-
resetUserIdleTime();
|
|
25
|
+
resetUserIdleTime(true);
|
|
23
26
|
dispatch(logout.cancel());
|
|
24
27
|
};
|
|
25
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _jsx from "@babel/runtime/helpers/jsx";
|
|
2
2
|
import { memo, useEffect } from 'react';
|
|
3
|
-
import DSLoadingIndicator from '@elliemae/ds-
|
|
3
|
+
import DSLoadingIndicator from '@elliemae/ds-loading-indicator';
|
|
4
4
|
import { useAppSelector } from "../../../data/react-redux.js";
|
|
5
5
|
import { HTMLWaitMessage } from "./html-wait-message.js";
|
|
6
6
|
import { waitStartEvent, waitEndEvent } from "../../../analytics/user-wait-event.js";
|
|
@@ -15,7 +15,11 @@ export const SessionTimeout = () => {
|
|
|
15
15
|
setwarningNotifiedAt(sessionExpiryWarningNotifiedAt);
|
|
16
16
|
setSessionExpiryWarning(true);
|
|
17
17
|
});
|
|
18
|
-
const resetCb = subscribeToResetSession(
|
|
18
|
+
const resetCb = subscribeToResetSession(resetWarningModal => {
|
|
19
|
+
if (resetWarningModal === true) {
|
|
20
|
+
setSessionExpiryWarning(false);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
19
23
|
const sessionExpiredCb = subscribeToSessionExpiry(() => {
|
|
20
24
|
dispatch(logout.confirm());
|
|
21
25
|
setSessionExpiryWarning(false);
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { TypedUseSelectorHook } from 'react-redux';
|
|
2
2
|
import { RootState } from './store';
|
|
3
|
-
export declare const useAppDispatch: () => import("redux
|
|
3
|
+
export declare const useAppDispatch: () => import("redux").Dispatch<{
|
|
4
|
+
payload: import("./wait-message/reducer").WaitMessageState;
|
|
5
|
+
type: string;
|
|
6
|
+
} | import("redux").AnyAction | {
|
|
7
|
+
payload: import("./breakpoint").Breakpoints;
|
|
8
|
+
type: string;
|
|
9
|
+
}> & import("redux-thunk").ThunkDispatch<import("redux").CombinedState<{
|
|
4
10
|
waitMessage: import("./wait-message/reducer").WaitMessageState;
|
|
5
11
|
error: import("./error").ErrorState;
|
|
6
12
|
breakpoint: import("./breakpoint").BreakpointState;
|
|
@@ -10,11 +16,5 @@ export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<i
|
|
|
10
16
|
error: import("./error").ErrorState;
|
|
11
17
|
breakpoint: import("./breakpoint").BreakpointState;
|
|
12
18
|
liveMessage: import("./live-message").LiveMessageState;
|
|
13
|
-
}>, undefined, import("redux").AnyAction
|
|
14
|
-
payload: import("./wait-message/reducer").WaitMessageState;
|
|
15
|
-
type: string;
|
|
16
|
-
} | import("redux").AnyAction | {
|
|
17
|
-
payload: import("./breakpoint").Breakpoints;
|
|
18
|
-
type: string;
|
|
19
|
-
}>;
|
|
19
|
+
}>, undefined, import("redux").AnyAction>;
|
|
20
20
|
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
declare type WARNLISTENER = {
|
|
2
2
|
(sessionExpiryWarningNotifiedAt: number | null): void;
|
|
3
3
|
};
|
|
4
|
+
declare type RESETLISTENER = {
|
|
5
|
+
(resetWarningModal: unknown): void;
|
|
6
|
+
};
|
|
4
7
|
declare type LISTENER = {
|
|
5
8
|
(): void;
|
|
6
9
|
};
|
|
7
|
-
export declare const resetUserIdleTime: () => void;
|
|
10
|
+
export declare const resetUserIdleTime: (resetWarningModal?: unknown) => void;
|
|
8
11
|
export declare const stopSessionMonitoring: () => void;
|
|
9
12
|
export declare const initSessionMonitoring: () => void;
|
|
10
13
|
export declare const subscribeToSessionExpiryWarning: (onSessionExpiryWarn: WARNLISTENER) => () => void;
|
|
11
14
|
export declare const subscribeToSessionExpiry: (onSessionExpiry: LISTENER) => () => void;
|
|
12
|
-
export declare const subscribeToResetSession: (onResetListener:
|
|
15
|
+
export declare const subscribeToResetSession: (onResetListener: RESETLISTENER) => () => void;
|
|
13
16
|
export declare const trackActivity: (element: Document | null, cb: (...args: unknown[]) => void) => () => void;
|
|
14
17
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { CHECKBOX_VARIANT } from '@elliemae/ds-
|
|
2
|
+
import { CHECKBOX_VARIANT } from '@elliemae/ds-form/Checkbox';
|
|
3
3
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
4
4
|
export declare type CheckBoxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
5
5
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-
|
|
2
|
+
import { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-form/InputMask';
|
|
3
3
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
4
4
|
export declare type InputMaskProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
5
5
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-app-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.1",
|
|
4
4
|
"description": "ICE MT UI Platform Application SDK ",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -89,29 +89,37 @@
|
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@elliemae/app-react-dependencies": "^2.10.0",
|
|
92
|
-
"@elliemae/ds-basic": "^
|
|
93
|
-
"@elliemae/ds-
|
|
94
|
-
"@elliemae/ds-
|
|
95
|
-
"@elliemae/ds-
|
|
92
|
+
"@elliemae/ds-basic": "^2.0.0",
|
|
93
|
+
"@elliemae/ds-button": "^2.0.0",
|
|
94
|
+
"@elliemae/ds-form": "^2.0.0",
|
|
95
|
+
"@elliemae/ds-loading-indicator": "^2.0.0",
|
|
96
|
+
"@elliemae/ds-date-picker": "^2.0.0",
|
|
97
|
+
"@elliemae/ds-modal": "^2.0.0",
|
|
98
|
+
"@elliemae/ds-popperjs": "^2.0.0",
|
|
99
|
+
"@elliemae/ds-toast": "^2.0.0",
|
|
96
100
|
"@elliemae/em-ssf-guest": "^1.11.1",
|
|
97
|
-
"@elliemae/pui-diagnostics": "^2.7.
|
|
101
|
+
"@elliemae/pui-diagnostics": "^2.7.3",
|
|
98
102
|
"@elliemae/pui-micro-frontend-base": "^1.10.0",
|
|
99
103
|
"@elliemae/pui-theme": "^2.3.0",
|
|
100
|
-
"@elliemae/pui-user-monitoring": "^1.12.
|
|
104
|
+
"@elliemae/pui-user-monitoring": "^1.12.2"
|
|
101
105
|
},
|
|
102
106
|
"devDependencies": {
|
|
103
107
|
"@elliemae/app-react-dependencies": "~2.10.0",
|
|
104
108
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.2.1",
|
|
105
|
-
"@elliemae/ds-basic": "~
|
|
106
|
-
"@elliemae/ds-
|
|
107
|
-
"@elliemae/ds-
|
|
108
|
-
"@elliemae/ds-
|
|
109
|
+
"@elliemae/ds-basic": "~2.0.0",
|
|
110
|
+
"@elliemae/ds-button": "~2.0.0",
|
|
111
|
+
"@elliemae/ds-form": "~2.0.0",
|
|
112
|
+
"@elliemae/ds-loading-indicator": "~2.0.0",
|
|
113
|
+
"@elliemae/ds-date-picker": "~2.0.0",
|
|
114
|
+
"@elliemae/ds-modal": "~2.0.0",
|
|
115
|
+
"@elliemae/ds-popperjs": "~2.0.0",
|
|
116
|
+
"@elliemae/ds-toast": "~2.0.0",
|
|
109
117
|
"@elliemae/em-ssf-guest": "~1.11.1",
|
|
110
|
-
"@elliemae/pui-cli": "~5.
|
|
111
|
-
"@elliemae/pui-diagnostics": "~2.7.
|
|
118
|
+
"@elliemae/pui-cli": "~5.23.0",
|
|
119
|
+
"@elliemae/pui-diagnostics": "~2.7.3",
|
|
112
120
|
"@elliemae/pui-e2e-test-sdk": "~6.8.0",
|
|
113
121
|
"@elliemae/pui-micro-frontend-base": "~1.10.0",
|
|
114
122
|
"@elliemae/pui-theme": "~2.3.0",
|
|
115
|
-
"@elliemae/pui-user-monitoring": "~1.12.
|
|
123
|
+
"@elliemae/pui-user-monitoring": "~1.12.2"
|
|
116
124
|
}
|
|
117
125
|
}
|