aefis-core-ui 3.0.0 → 3.1.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/index.modern.js +68 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -5027,8 +5027,10 @@ const MenuButton = /*#__PURE__*/forwardRef(function MenuButton(_ref, ref) {
|
|
|
5027
5027
|
borderTop: item.divider ? "1px solid #dddddd" : "none",
|
|
5028
5028
|
marginTop: item.divider ? 1 : "inherit",
|
|
5029
5029
|
paddingTop: item.divider ? 1 : "inherit",
|
|
5030
|
-
"&.Mui-focusVisible": {
|
|
5031
|
-
backgroundColor: "rgba(0, 0, 0, 0.
|
|
5030
|
+
"&.Mui-focusVisible, &:hover": {
|
|
5031
|
+
backgroundColor: "rgba(0, 0, 0, 0.12)",
|
|
5032
|
+
outline: "2px solid rgba(0, 0, 0, 0.87)",
|
|
5033
|
+
outlineOffset: "-2px"
|
|
5032
5034
|
}
|
|
5033
5035
|
},
|
|
5034
5036
|
children: [item.icon && /*#__PURE__*/jsx(ListItemIcon, {
|
|
@@ -11109,6 +11111,58 @@ DisplayInFrame.propTypes = {
|
|
|
11109
11111
|
iframeAttributes: PropTypes.any
|
|
11110
11112
|
};
|
|
11111
11113
|
|
|
11114
|
+
const MESSAGES = {
|
|
11115
|
+
close: "fpv.close",
|
|
11116
|
+
showLoading: "fpv.showLoading",
|
|
11117
|
+
hideLoading: "fpv.hideLoading"
|
|
11118
|
+
};
|
|
11119
|
+
|
|
11120
|
+
/**
|
|
11121
|
+
* Custom hook to handle window messages for specific actions.
|
|
11122
|
+
*
|
|
11123
|
+
* @param {Object} params - The parameters object.
|
|
11124
|
+
* @param {Function} params.onClose - Callback function to execute when the "closeModal" message is received.
|
|
11125
|
+
* @param {Function} params.onShowLoading - Callback function to execute when the "showLoading" message is received.
|
|
11126
|
+
* @param {Function} params.onHideLoading - Callback function to execute when the "hideLoading" message is received.
|
|
11127
|
+
* @param {Function} [params.onWindowMessage] - Optional callback function to execute for any window message.
|
|
11128
|
+
*
|
|
11129
|
+
*
|
|
11130
|
+
* @example
|
|
11131
|
+
* window.parent.postMessage("fpv.close", "*");
|
|
11132
|
+
* window.parent.postMessage("fpv.showLoading", "*");
|
|
11133
|
+
* window.parent.postMessage("fpv.hideLoading", "*");
|
|
11134
|
+
*/
|
|
11135
|
+
const useFpvWindowMessage = ({
|
|
11136
|
+
onClose,
|
|
11137
|
+
onShowLoading,
|
|
11138
|
+
onHideLoading,
|
|
11139
|
+
onWindowMessage
|
|
11140
|
+
}) => {
|
|
11141
|
+
useEffect(() => {
|
|
11142
|
+
const messageHandlers = {
|
|
11143
|
+
[MESSAGES.close]: onClose,
|
|
11144
|
+
[MESSAGES.showLoading]: onShowLoading,
|
|
11145
|
+
[MESSAGES.hideLoading]: onHideLoading
|
|
11146
|
+
};
|
|
11147
|
+
|
|
11148
|
+
/**
|
|
11149
|
+
* Handles the window message event.
|
|
11150
|
+
*
|
|
11151
|
+
* @param {MessageEvent} event - The message event object.
|
|
11152
|
+
*/
|
|
11153
|
+
const handleMessage = event => {
|
|
11154
|
+
onWindowMessage == null ? void 0 : onWindowMessage(event);
|
|
11155
|
+
if (typeof event.data !== "string") return;
|
|
11156
|
+
const handler = messageHandlers[event.data];
|
|
11157
|
+
if (handler) handler();
|
|
11158
|
+
};
|
|
11159
|
+
window.addEventListener("message", handleMessage);
|
|
11160
|
+
return () => {
|
|
11161
|
+
window.removeEventListener("message", handleMessage);
|
|
11162
|
+
};
|
|
11163
|
+
}, [onWindowMessage, onClose, onShowLoading, onHideLoading]);
|
|
11164
|
+
};
|
|
11165
|
+
|
|
11112
11166
|
const Transition = /*#__PURE__*/forwardRef(function Transition(props, ref) {
|
|
11113
11167
|
return /*#__PURE__*/jsx(Slide, _extends({
|
|
11114
11168
|
direction: "up",
|
|
@@ -11127,6 +11181,12 @@ const FullPageViewer = props => {
|
|
|
11127
11181
|
const handleFrameLoad = () => {
|
|
11128
11182
|
setShowLoading(false);
|
|
11129
11183
|
};
|
|
11184
|
+
useFpvWindowMessage({
|
|
11185
|
+
onClose: handleClose,
|
|
11186
|
+
onShowLoading: () => setShowLoading(true),
|
|
11187
|
+
onHideLoading: () => setShowLoading(false),
|
|
11188
|
+
onWindowMessage: props.onWindowMessage
|
|
11189
|
+
});
|
|
11130
11190
|
return /*#__PURE__*/jsx(ModalDialog, {
|
|
11131
11191
|
size: "fullscreen",
|
|
11132
11192
|
open: props.open,
|
|
@@ -11212,7 +11272,11 @@ FullPageViewer.propTypes = {
|
|
|
11212
11272
|
* cross origin URL is given as url, than this JS file most likely won't be
|
|
11213
11273
|
* avaliable. So scrolling should be enabled manually with this option. This
|
|
11214
11274
|
* option same as giving { scrolling: "yes" } to iframeAttributes*/
|
|
11215
|
-
isIframeScrollable: PropTypes.bool
|
|
11275
|
+
isIframeScrollable: PropTypes.bool,
|
|
11276
|
+
/** Custom styles for the dialog */
|
|
11277
|
+
dialogSx: PropTypes.any,
|
|
11278
|
+
/** Custom styles for the dialog */
|
|
11279
|
+
onWindowMessage: PropTypes.func
|
|
11216
11280
|
};
|
|
11217
11281
|
|
|
11218
11282
|
const _excluded$s = ["height", "children", "onScroll", "showTopFade", "showBottomFade", "component", "onScrollReachStart", "onScrollReachEnd"];
|
|
@@ -25425,7 +25489,7 @@ LoadingScreenWithTextTransition.propTypes = {
|
|
|
25425
25489
|
textTransitionProps: PropTypes.object
|
|
25426
25490
|
};
|
|
25427
25491
|
|
|
25428
|
-
LicenseInfo.setLicenseKey("
|
|
25492
|
+
LicenseInfo.setLicenseKey("02e713a3c6c99449d985ebc2ad97581cTz0xMjYzODksRT0xODA0MTE4Mzk5MDAwLFM9cHJlbWl1bSxMTT1hbm51YWwsUFY9aW5pdGlhbCxLVj0y");
|
|
25429
25493
|
const DataTable = ({
|
|
25430
25494
|
columns,
|
|
25431
25495
|
data,
|