@m4l/components 0.1.92 → 0.1.93
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/@types/export.d.ts +12 -15
- package/components/AccountPopover/AccountPopover.d.ts +2 -1
- package/components/AccountPopover/{index.eebea1c5.js → index.2ef0bf6d.js} +20 -31
- package/components/AccountPopover/index.d.ts +0 -1
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +4 -3
- package/components/AccountPopover/types.d.ts +50 -26
- package/components/AppBar/{index.90cceb7d.js → index.16fe42a1.js} +3 -22
- package/components/CommonActions/components/ActionCancel/{index.54588e5b.js → index.c3e23ad4.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.7907e6f4.js → index.6da52418.js} +4 -34
- package/components/CommonActions/components/ActionFormIntro/{index.f7cd515b.js → index.c3af6d1d.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.f20cffae.js → index.49631fcb.js} +2 -2
- package/components/CommonActions/components/Actions/{index.7a196c44.js → index.ccf731c1.js} +2 -38
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/formatters/columnConcatenatedValueFormatter/index.d.ts +2 -2
- package/components/DataGrid/{index.95cea2ca.js → index.abedf2c0.js} +44 -14
- package/components/DataGrid/subcomponents/Actions/{index.5b0b1fbf.js → index.c8408b73.js} +9 -38
- package/components/DraggableWindow/{index.c702d3f2.js → index.8f423ed7.js} +1 -1
- package/components/DynamicFilter/{index.e9192ebd.js → index.cb1402aa.js} +23 -56
- package/components/DynamicFilter/index.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/GridLayout/{index.5e43414d.js → index.1421f0d4.js} +7 -7
- package/components/GridLayout/subcomponents/Griditem/{index.d6f326d2.js → index.b2342897.js} +4 -4
- package/components/GridLayout/subcomponents/Responsive/{index.d41e31ca.js → index.f459804c.js} +2 -2
- package/components/HelperText/{index.191348cc.js → index.7d2afdb3.js} +2 -23
- package/components/Icon/{index.a70c4729.js → index.3211023d.js} +8 -6
- package/components/Image/{index.c18ebf5a.js → index.611cd930.js} +43 -14
- package/components/LanguagePopover/{index.a74f2065.js → index.b6dc03d0.js} +4 -20
- package/components/LinearProgressIndeterminate/{index.60dabc06.js → index.c46da124.js} +1 -1
- package/components/LoadingError/LoadingError.d.ts +3 -0
- package/components/LoadingError/classes/constants.d.ts +1 -0
- package/components/LoadingError/classes/index.d.ts +14 -0
- package/components/LoadingError/classes/types.d.ts +14 -0
- package/components/LoadingError/dictionary.d.ts +1 -0
- package/components/LoadingError/index.96bdc803.js +106 -0
- package/components/LoadingError/index.d.ts +2 -0
- package/components/LoadingError/types.d.ts +10 -0
- package/components/MFLoader/classes/constants.d.ts +1 -0
- package/components/MFLoader/classes/index.d.ts +7 -0
- package/components/MFLoader/classes/types.d.ts +7 -0
- package/components/MFLoader/dictionary.d.ts +1 -0
- package/components/MFLoader/index.caee87dd.js +296 -0
- package/components/MFLoader/index.d.ts +2 -0
- package/components/MFLoader/types.d.ts +7 -0
- package/components/ModalDialog/{index.99745527.js → index.ec55087e.js} +5 -5
- package/components/NavLink/{index.f12bba32.js → index.b75c91e1.js} +2 -22
- package/components/NoItemSelected/{index.1eaf72d8.js → index.3e29c208.js} +1 -1
- package/components/ObjectLogs/{index.9bbac2a0.js → index.38fd657f.js} +12 -38
- package/components/Page/index.c4642a29.js +127 -0
- package/components/PaperForm/{index.e02c772c.js → index.cce9ed39.js} +1 -1
- package/components/Period/{index.ebd5e3b7.js → index.c35c6a6c.js} +5 -37
- package/components/PrintingSystem/PrintingSystem.d.ts +3 -0
- package/components/PrintingSystem/classes/constants.d.ts +1 -0
- package/components/PrintingSystem/classes/index.d.ts +32 -0
- package/components/PrintingSystem/classes/types.d.ts +33 -0
- package/components/PrintingSystem/index.d.ts +2 -0
- package/components/PrintingSystem/index.e18a2fa8.js +634 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ChartNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/GridNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ImageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/Pager/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/Pager/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PaperNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/SectionNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +3 -0
- package/components/PrintingSystem/types.d.ts +214 -0
- package/components/PrintingSystem/utils/FactoryRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/FactoryRender/types.d.ts +4 -0
- package/components/PrintingSystem/utils/PageRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/PageRender/types.d.ts +13 -0
- package/components/PrintingSystem/utils/getEvalValue/index.d.ts +1 -0
- package/components/PrintingSystem/utils/getSize/index.d.ts +1 -0
- package/components/PropertyValue/classes/index.d.ts +3 -2
- package/components/PropertyValue/classes/types.d.ts +2 -0
- package/components/PropertyValue/{index.76fa6a12.js → index.3ee95452.js} +25 -9
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/Resizeable/{index.676c96fe.js → index.8c53c1fa.js} +1 -1
- package/components/SideBar/{index.2dfc5445.js → index.5fd648d2.js} +44 -39
- package/components/animate/{index.4e9774a6.js → index.5d4575bc.js} +2 -6
- package/components/areas/components/AreasAdmin/{index.cd054608.js → index.ddb384a1.js} +29 -62
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +2 -8
- package/components/areas/components/AreasViewer/{index.62abf0bb.js → index.625bf23b.js} +68 -437
- package/components/areas/components/index.558684b3.js +1 -0
- package/components/areas/components/index.d.ts +0 -1
- package/components/areas/contexts/AreasContext/{index.d528f6e7.js → index.646f3c8f.js} +9 -7
- package/components/areas/contexts/index.24025b97.js +1 -0
- package/components/areas/contexts/index.d.ts +1 -0
- package/components/areas/hooks/index.d9dc1e21.js +1 -0
- package/components/areas/hooks/useAreas/{index.d417e4b2.js → index.ee66240b.js} +1 -1
- package/components/areas/index.4cc6a221.js +22 -0
- package/components/areas/index.d.ts +1 -1
- package/components/formatters/BooleanFormatter/{index.a013b080.js → index.3c2df7a8.js} +10 -4
- package/components/formatters/FormatterRoot/index.d.ts +3 -0
- package/components/formatters/FormatterRoot/types.d.ts +4 -0
- package/components/formatters/classes/index.d.ts +4 -0
- package/components/formatters/classes/types.d.ts +6 -0
- package/components/formatters/constants.d.ts +1 -0
- package/components/formatters/{index.576922c9.js → index.dc77adb7.js} +25 -8
- package/components/hook-form/RHFAutocomplete/{index.29a4c62c.js → index.52387f0f.js} +7 -22
- package/components/hook-form/RHFAutocompleteAsync/{index.647c3f9c.js → index.638bd2ae.js} +3 -2
- package/components/hook-form/RHFCheckbox/{index.0b89ea5c.js → index.a38715e3.js} +2 -22
- package/components/hook-form/RHFDateTime/{index.1adc88ad.js → index.66e334b0.js} +23 -23
- package/components/hook-form/RHFPeriod/{index.a4476d23.js → index.23099265.js} +2 -2
- package/components/hook-form/RHFTextField/{index.a1a240b1.js → index.25b3627e.js} +6 -8
- package/components/hook-form/RHFUpload/{index.a4582341.js → index.65588e08.js} +5 -22
- package/components/index.d.ts +3 -0
- package/components/modal/{WindowBase.a4752aa1.js → WindowBase.161ec78a.js} +5 -37
- package/components/modal/{WindowConfirm.7a9c12c0.js → WindowConfirm.7eed7c35.js} +8 -40
- package/components/modal/{index.b434146b.js → index.61389369.js} +0 -37
- package/components/mui_extended/Accordion/{index.cdedddba.js → index.92aae1a4.js} +4 -4
- package/components/mui_extended/Button/{index.f79eb74e.js → index.94fec33c.js} +3 -3
- package/components/mui_extended/{CheckBox.38abccd8.js → CheckBox.e662d20c.js} +1 -1
- package/components/mui_extended/IconButton/{index.76624519.js → index.53cd6388.js} +2 -2
- package/components/mui_extended/MenuActions/{index.7669b8af.js → index.dd9f65a2.js} +5 -19
- package/components/mui_extended/Pager/{index.ac2a21f0.js → index.de0bd62c.js} +2 -2
- package/components/mui_extended/Tab/{index.5f09e16a.js → index.1fcabba2.js} +2 -2
- package/components/mui_extended/index.b606cd9d.js +1 -0
- package/contexts/ModalContext/{index.347f6738.js → index.436c2938.js} +1 -1
- package/contexts/RHFormContext/classes/index.d.ts +1 -1
- package/hooks/useFormAddEdit/{index.e8e7f758.js → index.3584a29f.js} +2 -26
- package/hooks/useModal/{index.fa6dfaa1.js → index.05d1821e.js} +1 -1
- package/index.js +196 -187
- package/node_modules.b55d04d9.js +15267 -0
- package/package.json +5 -1
- package/react-data-grid.d46d625e.js +2 -2
- package/react-draggable.e4725f3a.js +630 -0
- package/{react-resizable.ba08699a.js → react-resizable.c07d63fb.js} +2 -2
- package/utils/{index.c43a95f4.js → index.6469f148.js} +75 -107
- package/vendor.71883626.js +104 -0
- package/components/Page/index.4237c241.js +0 -27
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/types.d.ts +0 -8
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/index.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/types.d.ts +0 -5
- package/components/areas/components/index.ea2f9914.js +0 -31
- package/components/areas/contexts/index.6e9bbc64.js +0 -2
- package/components/areas/hooks/index.0184c6f7.js +0 -4
- package/components/areas/index.8d6d8969.js +0 -54
- package/components/mui_extended/index.fe189e7d.js +0 -24
- package/node_modules.d73a220d.js +0 -363
- package/react-draggable.7abb5d0a.js +0 -962
- package/vendor.e14dec76.js +0 -128
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/index.d.ts → MFLoader/MFLoader.d.ts} +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/helper.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/index.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/types.d.ts +0 -0
- package/components/mui_extended/Badge/{index.b09524fe.js → index.09f5aee5.js} +1 -1
- package/components/mui_extended/Popover/{index.9f35d0eb.js → index.b3eca6b1.js} +2 -2
- package/components/mui_extended/Tooltip/{index.5a795dcd.js → index.24a2bc3f.js} +1 -1
- package/components/mui_extended/Typography/{index.443590d6.js → index.379dd374.js} +1 -1
|
@@ -1,109 +1,39 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
1
|
import { styled } from "@mui/material/styles";
|
|
8
|
-
import { r as react_resizable_css } from "../../../../react-resizable.
|
|
9
|
-
import { generateUtilityClasses, Skeleton,
|
|
2
|
+
import { r as react_resizable_css } from "../../../../react-resizable.c07d63fb.js";
|
|
3
|
+
import { generateUtilityClasses, Skeleton, Dialog } from "@mui/material";
|
|
10
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
11
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.
|
|
5
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.6469f148.js";
|
|
12
6
|
import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
13
7
|
import { shallow } from "zustand/shallow";
|
|
14
|
-
import React__default, { useMemo,
|
|
8
|
+
import React__default, { useMemo, useEffect } from "react";
|
|
15
9
|
import clsx from "clsx";
|
|
16
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.
|
|
17
|
-
import { useModuleDictionary, useEnvironment, useModuleSkeleton
|
|
18
|
-
import {
|
|
19
|
-
import "
|
|
20
|
-
import { I as Icon } from "../../../Icon/index.a70c4729.js";
|
|
21
|
-
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
10
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.ee66240b.js";
|
|
11
|
+
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
12
|
+
import { a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.dd9f65a2.js";
|
|
13
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
22
14
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
23
|
-
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
24
|
-
import "react-router-dom";
|
|
25
|
-
import "@mui/material/Button";
|
|
26
|
-
import { B as Button } from "../../../mui_extended/Button/index.f79eb74e.js";
|
|
27
|
-
import "../../../mui_extended/CheckBox.38abccd8.js";
|
|
28
|
-
import "../../../mui_extended/Badge/index.b09524fe.js";
|
|
29
|
-
import "../../../Image/index.c18ebf5a.js";
|
|
30
|
-
import "@mui/lab";
|
|
31
|
-
import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.7669b8af.js";
|
|
32
|
-
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
33
|
-
import "../../../mui_extended/Stack/index.0e53197c.js";
|
|
34
|
-
import "../../../mui_extended/Tab/index.5f09e16a.js";
|
|
35
|
-
import "../../../mui_extended/Pager/index.ac2a21f0.js";
|
|
36
|
-
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
37
|
-
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
38
15
|
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
39
16
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.08cfc4c9.js";
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
import {
|
|
17
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.53cd6388.js";
|
|
18
|
+
import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.c46da124.js";
|
|
19
|
+
import { I as Icon } from "../../../Icon/index.3211023d.js";
|
|
20
|
+
import { T as Typography } from "../../../mui_extended/Typography/index.379dd374.js";
|
|
21
|
+
import { M as MFLoader } from "../../../MFLoader/index.caee87dd.js";
|
|
43
22
|
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
44
23
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
45
|
-
import "
|
|
46
|
-
import "../../../../
|
|
47
|
-
import "
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import { R as
|
|
51
|
-
import "
|
|
52
|
-
import "
|
|
53
|
-
import "
|
|
54
|
-
import "../../../
|
|
55
|
-
import "../AreasAdmin/index.cd054608.js";
|
|
56
|
-
import "../../../ScrollBar/index.65bb2930.js";
|
|
57
|
-
import "zustand";
|
|
58
|
-
import "react-hook-form";
|
|
59
|
-
import "../../../hook-form/RHFAutocomplete/index.29a4c62c.js";
|
|
60
|
-
import "../../../HelperText/index.191348cc.js";
|
|
61
|
-
import "../../../hook-form/RHFAutocompleteAsync/index.647c3f9c.js";
|
|
62
|
-
import "../../../hook-form/RHFCheckbox/index.0b89ea5c.js";
|
|
63
|
-
import "@mui/x-date-pickers";
|
|
64
|
-
import "../../../hook-form/RHFDateTime/index.1adc88ad.js";
|
|
65
|
-
import "../../../hook-form/RHFTextField/index.a1a240b1.js";
|
|
66
|
-
import "../../../hook-form/RHFPeriod/index.a4476d23.js";
|
|
67
|
-
import "../../../Period/index.ebd5e3b7.js";
|
|
68
|
-
import "../../../CommonActions/components/Actions/index.7a196c44.js";
|
|
69
|
-
import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
|
|
70
|
-
import { R as ResizeableWindow } from "../../../Resizeable/index.676c96fe.js";
|
|
71
|
-
import "../../../modal/index.b434146b.js";
|
|
72
|
-
import "lodash/isString";
|
|
73
|
-
import "react-dropzone";
|
|
74
|
-
import "../../../hook-form/RHFUpload/index.a4582341.js";
|
|
75
|
-
import "../../../DataGrid/index.95cea2ca.js";
|
|
76
|
-
import "react-dnd";
|
|
77
|
-
import "react-dnd-html5-backend";
|
|
78
|
-
import "../../../DataGrid/subcomponents/Actions/index.5b0b1fbf.js";
|
|
79
|
-
import "../../../DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
|
|
80
|
-
import "../../../DynamicFilter/index.e9192ebd.js";
|
|
81
|
-
import "yup";
|
|
82
|
-
import "lodash";
|
|
83
|
-
import "../../../LanguagePopover/index.a74f2065.js";
|
|
84
|
-
import "../../../NavLink/index.f12bba32.js";
|
|
85
|
-
import "../../../NoItemSelected/index.1eaf72d8.js";
|
|
86
|
-
import "../../../ObjectLogs/index.9bbac2a0.js";
|
|
87
|
-
import "../../../../react-json-view.57125fcf.js";
|
|
88
|
-
import "../../../PaperForm/index.e02c772c.js";
|
|
89
|
-
import "../../../Page/index.4237c241.js";
|
|
90
|
-
import "../../../PropertyValue/index.76fa6a12.js";
|
|
91
|
-
import "../../../SplitLayout/index.9ef430f6.js";
|
|
92
|
-
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
93
|
-
import "../../../SideBar/index.2dfc5445.js";
|
|
94
|
-
import "../../../AppBar/index.90cceb7d.js";
|
|
95
|
-
import "../../../AccountPopover/index.eebea1c5.js";
|
|
24
|
+
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
25
|
+
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
|
|
26
|
+
import { g as getNameDataTestId } from "../../../../vendor.71883626.js";
|
|
27
|
+
import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.646f3c8f.js";
|
|
28
|
+
import { S as SizeProvider } from "../../../GridLayout/index.1421f0d4.js";
|
|
29
|
+
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.f459804c.js";
|
|
30
|
+
import { useLocation } from "react-router-dom";
|
|
31
|
+
import { L as LoadingError } from "../../../LoadingError/index.96bdc803.js";
|
|
32
|
+
import { c as cjs } from "../../../../react-draggable.e4725f3a.js";
|
|
33
|
+
import { R as ResizeableWindow } from "../../../Resizeable/index.8c53c1fa.js";
|
|
96
34
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
97
35
|
"root",
|
|
98
36
|
"areaRoot",
|
|
99
|
-
"areasLoadingErrorRoot",
|
|
100
|
-
"areasLoadingErrorLoading",
|
|
101
|
-
"areasLoadingError",
|
|
102
|
-
"areasLoadingErrorIcon",
|
|
103
|
-
"areasLoadingErrorTitle",
|
|
104
|
-
"areasLoadingErrorDescription",
|
|
105
|
-
"areasLoadingErrorDivider",
|
|
106
|
-
"areasLoadingErrorTextAction",
|
|
107
37
|
"areaGridLayoutPanelContainer",
|
|
108
38
|
"areaGridLayout",
|
|
109
39
|
"areaGridLayoutPopupsContainer",
|
|
@@ -132,6 +62,8 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
|
132
62
|
"panelWindowsButtonContainer",
|
|
133
63
|
"containerLinearProgress",
|
|
134
64
|
"resizeHandle",
|
|
65
|
+
"loaderContainer",
|
|
66
|
+
"containerComponent",
|
|
135
67
|
"selected",
|
|
136
68
|
"colapsed",
|
|
137
69
|
"selectedWindow",
|
|
@@ -180,7 +112,9 @@ const useAreasViewerUtilityClasses = (ownerState) => {
|
|
|
180
112
|
windowToastyClose: ["windowToastyClose"],
|
|
181
113
|
panelWindowsRoot: ["panelWindowsRoot"],
|
|
182
114
|
panelWindowsButtonContainer: ["panelWindowsButtonContainer"],
|
|
183
|
-
resizeHandle: ["resizeHandle"]
|
|
115
|
+
resizeHandle: ["resizeHandle"],
|
|
116
|
+
loaderContainer: ["loaderContainer"],
|
|
117
|
+
containerComponent: ["containerComponent"]
|
|
184
118
|
};
|
|
185
119
|
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_VIEWER_CLASS_NAME), {});
|
|
186
120
|
};
|
|
@@ -518,8 +452,8 @@ function MainActions(props) {
|
|
|
518
452
|
windowId
|
|
519
453
|
} = props;
|
|
520
454
|
const moduleActions = useAreasStore((state) => {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
455
|
+
const window = state.hashWindows[windowId];
|
|
456
|
+
return window?.moduleActions || [];
|
|
523
457
|
}, shallow);
|
|
524
458
|
const {
|
|
525
459
|
getLabel
|
|
@@ -552,10 +486,6 @@ const WindowPopUpsList = (props) => {
|
|
|
552
486
|
areaId,
|
|
553
487
|
windowId
|
|
554
488
|
} = props;
|
|
555
|
-
const {
|
|
556
|
-
host_static_assets,
|
|
557
|
-
environment_assets
|
|
558
|
-
} = useEnvironment();
|
|
559
489
|
const windowsPopUps = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds.filter((li) => state.hashWindows[li].parentLayoutId === windowId && state.hashWindows[li].emergeType === "popup").map((lim) => {
|
|
560
490
|
const w = state.hashWindows[lim];
|
|
561
491
|
return {
|
|
@@ -564,7 +494,6 @@ const WindowPopUpsList = (props) => {
|
|
|
564
494
|
title: w.title
|
|
565
495
|
};
|
|
566
496
|
}), shallow);
|
|
567
|
-
const theme = useTheme();
|
|
568
497
|
const {
|
|
569
498
|
maximizeLayout
|
|
570
499
|
} = useAreasStore((state) => state.areaActions);
|
|
@@ -579,25 +508,7 @@ const WindowPopUpsList = (props) => {
|
|
|
579
508
|
};
|
|
580
509
|
}) : null;
|
|
581
510
|
if (menuActions && menuActions.length > 0) {
|
|
582
|
-
return /* @__PURE__ */ jsx(
|
|
583
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.POPUP}`,
|
|
584
|
-
arrowType: "no-arrow",
|
|
585
|
-
marginTop: "12px!important",
|
|
586
|
-
marginLeft: "14px!important",
|
|
587
|
-
anchorOrigin: {
|
|
588
|
-
vertical: "bottom",
|
|
589
|
-
horizontal: "right"
|
|
590
|
-
},
|
|
591
|
-
transformOrigin: {
|
|
592
|
-
vertical: "top",
|
|
593
|
-
horizontal: "right"
|
|
594
|
-
},
|
|
595
|
-
menuActions,
|
|
596
|
-
className: areasViewerClasses.areasWindowPopUpList,
|
|
597
|
-
menuActionSx: theme.components?.M4LAreasViewerWindowPopUpList?.styleOverrides,
|
|
598
|
-
withBadge: true,
|
|
599
|
-
badgeContent: menuActions.length.toString()
|
|
600
|
-
});
|
|
511
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
601
512
|
} else {
|
|
602
513
|
return null;
|
|
603
514
|
}
|
|
@@ -609,15 +520,15 @@ function Header(props) {
|
|
|
609
520
|
emergeType
|
|
610
521
|
} = props;
|
|
611
522
|
const [url_icon, title, moduleActions, onClose, version, windowOptions, fnQueryClose] = useAreasStore((state) => {
|
|
612
|
-
const
|
|
523
|
+
const window = state.hashWindows[windowId];
|
|
613
524
|
return [
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
525
|
+
window.url_icon,
|
|
526
|
+
window.title,
|
|
527
|
+
window.moduleActions,
|
|
528
|
+
window.onClose,
|
|
529
|
+
window.version,
|
|
530
|
+
window.windowOptions,
|
|
531
|
+
window.fnQueryClose
|
|
621
532
|
];
|
|
622
533
|
}, shallow);
|
|
623
534
|
const {
|
|
@@ -699,7 +610,7 @@ function Header(props) {
|
|
|
699
610
|
className: areasViewerClasses.windowHeaderCancelHandle,
|
|
700
611
|
children: [!colapsed && /* @__PURE__ */ jsx(MainActions, {
|
|
701
612
|
windowId
|
|
702
|
-
}), !colapsed
|
|
613
|
+
}), !colapsed ? /* @__PURE__ */ jsx(WindowPopUpsList, {
|
|
703
614
|
areaId,
|
|
704
615
|
windowId
|
|
705
616
|
}) : null, !colapsed && menuActions.length > 0 && /* @__PURE__ */ jsx(MemonizedMenuActions, {
|
|
@@ -739,305 +650,6 @@ function Header(props) {
|
|
|
739
650
|
})]
|
|
740
651
|
});
|
|
741
652
|
}
|
|
742
|
-
const ProggessLoadingMF = (props) => {
|
|
743
|
-
try {
|
|
744
|
-
const {
|
|
745
|
-
loadingProgress
|
|
746
|
-
} = props;
|
|
747
|
-
if (loadingProgress >= 0 && loadingProgress <= 100) {
|
|
748
|
-
return /* @__PURE__ */ jsx("div", {
|
|
749
|
-
className: areasViewerClasses.containerLinearProgress,
|
|
750
|
-
children: /* @__PURE__ */ jsx(LinearProgress, {
|
|
751
|
-
variant: "determinate",
|
|
752
|
-
value: loadingProgress
|
|
753
|
-
})
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
} catch (error) {
|
|
757
|
-
}
|
|
758
|
-
return null;
|
|
759
|
-
};
|
|
760
|
-
class ObservableLoaderMF {
|
|
761
|
-
constructor(host, scriptId, networkOperation, isRemote) {
|
|
762
|
-
__publicField(this, "host");
|
|
763
|
-
__publicField(this, "isRemote");
|
|
764
|
-
__publicField(this, "eventStatus");
|
|
765
|
-
__publicField(this, "scriptId");
|
|
766
|
-
__publicField(this, "networkOperation");
|
|
767
|
-
__publicField(this, "subscribers");
|
|
768
|
-
this.host = host;
|
|
769
|
-
this.subscribers = [];
|
|
770
|
-
this.scriptId = scriptId;
|
|
771
|
-
this.networkOperation = networkOperation;
|
|
772
|
-
this.isRemote = isRemote;
|
|
773
|
-
this.eventStatus = "progress";
|
|
774
|
-
this.start = this.start.bind(this);
|
|
775
|
-
this.subscribe = this.subscribe.bind(this);
|
|
776
|
-
this.unsubscribe = this.unsubscribe.bind(this);
|
|
777
|
-
this.notify = this.notify.bind(this);
|
|
778
|
-
this.tryAgain = this.tryAgain.bind(this);
|
|
779
|
-
setTimeout(this.start, 100);
|
|
780
|
-
}
|
|
781
|
-
tryAgain() {
|
|
782
|
-
if (this.eventStatus === "error") {
|
|
783
|
-
setTimeout(this.start, 100);
|
|
784
|
-
new Promise((resolve) => {
|
|
785
|
-
resolve("ok");
|
|
786
|
-
}).then(() => {
|
|
787
|
-
this.start();
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
async start() {
|
|
792
|
-
let percentCompleted = 0;
|
|
793
|
-
this.notify("progress", percentCompleted);
|
|
794
|
-
const manifest = await fetch(`${this.host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
|
|
795
|
-
setTimeout(() => this.notify("error", 0), 300);
|
|
796
|
-
return void 0;
|
|
797
|
-
});
|
|
798
|
-
if (!manifest) {
|
|
799
|
-
return;
|
|
800
|
-
}
|
|
801
|
-
percentCompleted = 10;
|
|
802
|
-
this.notify("progress", percentCompleted);
|
|
803
|
-
const urlFile = `${this.host}/${manifest["src/index.tsx"]["file"]}?rnd=${Math.random()}`;
|
|
804
|
-
const controller = new AbortController();
|
|
805
|
-
const ret = await this.networkOperation({
|
|
806
|
-
method: "GET",
|
|
807
|
-
endPoint: urlFile,
|
|
808
|
-
isRemote: this.isRemote,
|
|
809
|
-
headers: { "Content-Type": "application/json" },
|
|
810
|
-
onDownloadProgress: (progressEvent) => {
|
|
811
|
-
try {
|
|
812
|
-
if (progressEvent.lengthComputable) {
|
|
813
|
-
percentCompleted = 10 + Math.round(progressEvent.loaded * 90 / progressEvent.total);
|
|
814
|
-
} else {
|
|
815
|
-
percentCompleted = 10 + progressEvent.loaded / 15e5 * 90;
|
|
816
|
-
if (percentCompleted > 95)
|
|
817
|
-
percentCompleted = 95;
|
|
818
|
-
}
|
|
819
|
-
} catch (error) {
|
|
820
|
-
}
|
|
821
|
-
this.notify("progress", percentCompleted);
|
|
822
|
-
},
|
|
823
|
-
isExternalUrl: true,
|
|
824
|
-
responseType: "text",
|
|
825
|
-
signal: controller.signal
|
|
826
|
-
}).then(() => {
|
|
827
|
-
return "ok";
|
|
828
|
-
}).catch(() => {
|
|
829
|
-
this.notify("error", 0);
|
|
830
|
-
return "error";
|
|
831
|
-
});
|
|
832
|
-
if (ret == "ok") {
|
|
833
|
-
const script = document.createElement("script");
|
|
834
|
-
const startTime = new Date().getTime();
|
|
835
|
-
script.id = this.scriptId;
|
|
836
|
-
script.crossOrigin = "";
|
|
837
|
-
script.type = "module";
|
|
838
|
-
script.src = urlFile || "";
|
|
839
|
-
script.onload = () => {
|
|
840
|
-
this.notify("complete", 100);
|
|
841
|
-
};
|
|
842
|
-
document.head.appendChild(script);
|
|
843
|
-
console.debug("Script appened", startTime);
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
subscribe(subscriber) {
|
|
847
|
-
this.subscribers.push(subscriber);
|
|
848
|
-
this.tryAgain();
|
|
849
|
-
}
|
|
850
|
-
unsubscribe(subscriber) {
|
|
851
|
-
console.log("unsubscribe", subscriber);
|
|
852
|
-
const index = this.subscribers.indexOf(subscriber);
|
|
853
|
-
if (index !== -1) {
|
|
854
|
-
this.subscribers.splice(index, 1);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
notify(newEvent, progress) {
|
|
858
|
-
this.eventStatus = newEvent;
|
|
859
|
-
this.subscribers.forEach((subscriber) => {
|
|
860
|
-
setTimeout(() => subscriber(newEvent, progress), 1);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
const AreasLoadingError = (props) => {
|
|
865
|
-
const {
|
|
866
|
-
status,
|
|
867
|
-
action
|
|
868
|
-
} = props;
|
|
869
|
-
const {
|
|
870
|
-
host_static_assets,
|
|
871
|
-
environment_assets
|
|
872
|
-
} = useEnvironment();
|
|
873
|
-
const {
|
|
874
|
-
getLabel
|
|
875
|
-
} = useModuleDictionary();
|
|
876
|
-
return /* @__PURE__ */ jsx("div", {
|
|
877
|
-
className: areasViewerClasses.areasLoadingErrorRoot,
|
|
878
|
-
children: status !== "error" ? /* @__PURE__ */ jsx("div", {
|
|
879
|
-
className: areasViewerClasses.areasLoadingErrorLoading,
|
|
880
|
-
children: /* @__PURE__ */ jsx(LinearProgressIndeterminate, {})
|
|
881
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
882
|
-
className: areasViewerClasses.areasLoadingError,
|
|
883
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
884
|
-
className: areasViewerClasses.areasLoadingErrorIcon,
|
|
885
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NAVIGATE_ERROR}`
|
|
886
|
-
}), /* @__PURE__ */ jsx(Typography, {
|
|
887
|
-
variant: "h3",
|
|
888
|
-
skeletonWidth: "100px",
|
|
889
|
-
className: areasViewerClasses.areasLoadingErrorTitle,
|
|
890
|
-
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_title))
|
|
891
|
-
}), /* @__PURE__ */ jsx(Typography, {
|
|
892
|
-
variant: "subtitle",
|
|
893
|
-
skeletonWidth: "100px",
|
|
894
|
-
className: areasViewerClasses.areasLoadingErrorDescription,
|
|
895
|
-
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_description))
|
|
896
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
897
|
-
className: areasViewerClasses.areasLoadingErrorDivider
|
|
898
|
-
}), /* @__PURE__ */ jsx(Typography, {
|
|
899
|
-
variant: "paragraph",
|
|
900
|
-
skeletonWidth: "100px",
|
|
901
|
-
className: areasViewerClasses.areasLoadingErrorTextAction,
|
|
902
|
-
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_recommendation))
|
|
903
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
904
|
-
onClick: action,
|
|
905
|
-
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_intro))
|
|
906
|
-
})]
|
|
907
|
-
})
|
|
908
|
-
});
|
|
909
|
-
};
|
|
910
|
-
function getDivScritId(prefix, moduleId) {
|
|
911
|
-
const rotational_id = `${Math.round(new Date().getTime() / 1e3)}_rnd_${Math.round(Math.random() * 1e3)}`;
|
|
912
|
-
return {
|
|
913
|
-
divContainerId: `container_${prefix}_${moduleId}_${rotational_id}`,
|
|
914
|
-
scriptId: `script_${moduleId}_${rotational_id}`,
|
|
915
|
-
moduleId
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
function MFLoader(props) {
|
|
919
|
-
const {
|
|
920
|
-
prefix,
|
|
921
|
-
moduleId,
|
|
922
|
-
cache = true,
|
|
923
|
-
debug_port,
|
|
924
|
-
dynamicMFStore,
|
|
925
|
-
windowTools
|
|
926
|
-
} = props;
|
|
927
|
-
const {
|
|
928
|
-
hostThemeOptions,
|
|
929
|
-
fnComponentsOverrides
|
|
930
|
-
} = useHostTheme();
|
|
931
|
-
const {
|
|
932
|
-
networkOperation
|
|
933
|
-
} = useNetwork();
|
|
934
|
-
const environment = useEnvironment();
|
|
935
|
-
const hostTools = useHostTools();
|
|
936
|
-
const formatter = useFormatter();
|
|
937
|
-
const [statusLoader, setStatusLoader] = useState("progress");
|
|
938
|
-
const [loadingProgress, setLoadingProgress] = useState(-1);
|
|
939
|
-
const {
|
|
940
|
-
currentLocale
|
|
941
|
-
} = useLocales();
|
|
942
|
-
const [divScript, setDivScript] = useState(getDivScritId(prefix, moduleId));
|
|
943
|
-
const isFirstRender = useFirstRender([moduleId]);
|
|
944
|
-
const final_host = environment.isLocalhost ? `https://localhost:${debug_port}` : `https://${window.location.host}/mf/${moduleId}`;
|
|
945
|
-
function cleanUp(dScript) {
|
|
946
|
-
try {
|
|
947
|
-
if (window[`unmount_${prefix}_${dScript.moduleId}`]) {
|
|
948
|
-
window[`unmount_${prefix}_${dScript.moduleId}`](dScript.divContainerId);
|
|
949
|
-
}
|
|
950
|
-
} catch (error) {
|
|
951
|
-
}
|
|
952
|
-
if (!cache) {
|
|
953
|
-
const script = document.getElementById(dScript.scriptId);
|
|
954
|
-
if (script) {
|
|
955
|
-
try {
|
|
956
|
-
document.head.removeChild(script);
|
|
957
|
-
delete window[`render_${prefix}_${dScript.moduleId}`];
|
|
958
|
-
delete window[`unmount_${prefix}_${dScript.moduleId}`];
|
|
959
|
-
} catch (error) {
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
const renderMicroFrontend = useCallback((newDScript) => {
|
|
965
|
-
try {
|
|
966
|
-
window[`render_${prefix}_${newDScript.moduleId}`](newDScript.divContainerId, environment, hostTools, currentLocale, {
|
|
967
|
-
hostThemeOptions,
|
|
968
|
-
fnComponentsOverrides
|
|
969
|
-
}, axiosOperation, formatter, dynamicMFStore, windowTools);
|
|
970
|
-
} catch (error) {
|
|
971
|
-
}
|
|
972
|
-
}, [hostThemeOptions, currentLocale, formatter]);
|
|
973
|
-
const debouncedSetDivScript = useCallback(debounce((newName) => {
|
|
974
|
-
const newDivScript = getDivScritId(prefix, newName);
|
|
975
|
-
if (newName !== divScript.moduleId) {
|
|
976
|
-
setDivScript({
|
|
977
|
-
...newDivScript
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
}, 200), [divScript]);
|
|
981
|
-
useEffect(() => {
|
|
982
|
-
if (!isFirstRender) {
|
|
983
|
-
debouncedSetDivScript(moduleId + "");
|
|
984
|
-
if (moduleId !== divScript.moduleId)
|
|
985
|
-
;
|
|
986
|
-
}
|
|
987
|
-
return () => {
|
|
988
|
-
};
|
|
989
|
-
}, [moduleId]);
|
|
990
|
-
const tryAgainOnError = useCallback(() => {
|
|
991
|
-
window[`observable_${prefix}_${moduleId}`]?.tryAgain();
|
|
992
|
-
}, []);
|
|
993
|
-
useEffect(() => {
|
|
994
|
-
const dsNowScript = {
|
|
995
|
-
...divScript
|
|
996
|
-
};
|
|
997
|
-
const observableDownload = (event, progress) => {
|
|
998
|
-
setLoadingProgress(progress);
|
|
999
|
-
setStatusLoader(event);
|
|
1000
|
-
};
|
|
1001
|
-
if (!window[`render_${prefix}_${moduleId}`]) {
|
|
1002
|
-
let observableLoaderMF;
|
|
1003
|
-
if (!window[`observable_${prefix}_${moduleId}`]) {
|
|
1004
|
-
observableLoaderMF = new ObservableLoaderMF(final_host, dsNowScript.scriptId, networkOperation, !environment.isLocalhost);
|
|
1005
|
-
window[`observable_${prefix}_${moduleId}`] = observableLoaderMF;
|
|
1006
|
-
} else {
|
|
1007
|
-
observableLoaderMF = window[`observable_${prefix}_${moduleId}`];
|
|
1008
|
-
}
|
|
1009
|
-
observableLoaderMF.subscribe(observableDownload);
|
|
1010
|
-
} else {
|
|
1011
|
-
setStatusLoader("complete");
|
|
1012
|
-
}
|
|
1013
|
-
return () => {
|
|
1014
|
-
window[`observable_${prefix}_${moduleId}`].unsubscribe(observableDownload);
|
|
1015
|
-
cleanUp(dsNowScript);
|
|
1016
|
-
};
|
|
1017
|
-
}, [divScript]);
|
|
1018
|
-
useEffect(() => {
|
|
1019
|
-
if (statusLoader === "complete") {
|
|
1020
|
-
renderMicroFrontend(divScript);
|
|
1021
|
-
}
|
|
1022
|
-
}, [statusLoader]);
|
|
1023
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1024
|
-
id: divScript.divContainerId,
|
|
1025
|
-
style: {
|
|
1026
|
-
width: "100%",
|
|
1027
|
-
height: "100%"
|
|
1028
|
-
},
|
|
1029
|
-
children: [statusLoader === "progress" ? /* @__PURE__ */ jsx(ProggessLoadingMF, {
|
|
1030
|
-
loadingProgress
|
|
1031
|
-
}) : null, statusLoader === "error" ? /* @__PURE__ */ jsx(AreasLoadingError, {
|
|
1032
|
-
status: statusLoader,
|
|
1033
|
-
action: tryAgainOnError
|
|
1034
|
-
}) : null]
|
|
1035
|
-
});
|
|
1036
|
-
}
|
|
1037
|
-
MFLoader.defaultProps = {
|
|
1038
|
-
document,
|
|
1039
|
-
window
|
|
1040
|
-
};
|
|
1041
653
|
const MicroFrontend = (props) => {
|
|
1042
654
|
return /* @__PURE__ */ jsx(MFLoader, {
|
|
1043
655
|
...props
|
|
@@ -1054,10 +666,13 @@ const Component = (props) => {
|
|
|
1054
666
|
...windowTools,
|
|
1055
667
|
children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
|
|
1056
668
|
store: dynamicMFStore,
|
|
1057
|
-
children:
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
669
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
670
|
+
className: areasViewerClasses.containerComponent,
|
|
671
|
+
children: typeof component === "function" ? component({
|
|
672
|
+
windowTools,
|
|
673
|
+
dynamicMFStore
|
|
674
|
+
}) : component
|
|
675
|
+
})
|
|
1061
676
|
})
|
|
1062
677
|
});
|
|
1063
678
|
};
|
|
@@ -1231,6 +846,8 @@ const Window = (props) => {
|
|
|
1231
846
|
return emergeType === "layout" ? state.hashAreas[areaId]?.currentLayoutId : state.hashAreas[areaId]?.currentPopUpId;
|
|
1232
847
|
}) === windowId;
|
|
1233
848
|
const mfProps = useAreasStore((state) => state.hashWindows[windowId]?.mfProps, shallow);
|
|
849
|
+
const areaStore = useAreasStore((state) => state, shallow);
|
|
850
|
+
console.log("areaStore", areaStore);
|
|
1234
851
|
const component = useAreasStore((state) => state.hashWindows[windowId]?.component, shallow);
|
|
1235
852
|
const loading = useAreasStore((state) => state.hashWindows[windowId]?.loading, shallow);
|
|
1236
853
|
const status = useAreasStore((state) => state.hashWindows[windowId]?.status, shallow);
|
|
@@ -1289,6 +906,9 @@ const Window = (props) => {
|
|
|
1289
906
|
role: "presentation",
|
|
1290
907
|
className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null, emergeType === "popup" ? areasViewerClasses.windowPopupRoot : null, emergeType === "modal" ? areasViewerClasses.windowModalRoot : null),
|
|
1291
908
|
onMouseDown: onTouch,
|
|
909
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
910
|
+
[TEST_PROP_ID]: getNameDataTestId(AREAS_VIEWER_CLASS_NAME, "windowRoot", `${emergeType}`)
|
|
911
|
+
} : {},
|
|
1292
912
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1293
913
|
className: areasViewerClasses.windowRootContainer,
|
|
1294
914
|
children: [/* @__PURE__ */ jsx(Header, {
|
|
@@ -1364,7 +984,8 @@ const AreaGridLayout = (props) => {
|
|
|
1364
984
|
if (p.type === "placeholder") {
|
|
1365
985
|
return /* @__PURE__ */ jsx("div", {});
|
|
1366
986
|
}
|
|
1367
|
-
console.
|
|
987
|
+
console.log("layoutItemRender window", hashLayoutItems, p.i, p.type);
|
|
988
|
+
console.log("layoutItemRender window value p argument", p);
|
|
1368
989
|
return /* @__PURE__ */ jsx(Window, {
|
|
1369
990
|
windowId: p.i,
|
|
1370
991
|
areaId
|
|
@@ -1391,10 +1012,14 @@ const PanelWindows = (props) => {
|
|
|
1391
1012
|
} = props;
|
|
1392
1013
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
1393
1014
|
const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId);
|
|
1015
|
+
const maximizedIdParent = useAreasStore((state) => state.hashWindows[maximizedId || ""]?.parentLayoutId || void 0);
|
|
1394
1016
|
const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds.filter((itemId) => state.hashWindows[itemId].emergeType === "layout").map((key) => ({
|
|
1395
1017
|
i: key,
|
|
1396
1018
|
url_icon: state.hashWindows[key].url_icon,
|
|
1397
|
-
title: state.hashWindows[key].title
|
|
1019
|
+
title: state.hashWindows[key].title,
|
|
1020
|
+
moduleId: state.hashWindows[key].moduleId,
|
|
1021
|
+
emergeType: state.hashWindows[key].emergeType,
|
|
1022
|
+
windowId: state.hashWindows[key].windowId
|
|
1398
1023
|
})), shallow);
|
|
1399
1024
|
const {
|
|
1400
1025
|
maximizeLayout
|
|
@@ -1402,6 +1027,9 @@ const PanelWindows = (props) => {
|
|
|
1402
1027
|
const onTouched = (layoutId) => {
|
|
1403
1028
|
maximizeLayout(areaId, layoutId);
|
|
1404
1029
|
};
|
|
1030
|
+
const location = useLocation();
|
|
1031
|
+
const searchParams = new URLSearchParams(location.search);
|
|
1032
|
+
const currentParam = searchParams.get("module");
|
|
1405
1033
|
if (status === "loaded") {
|
|
1406
1034
|
if (!maximizedId || hashLayoutItems.length < 2) {
|
|
1407
1035
|
return null;
|
|
@@ -1410,7 +1038,7 @@ const PanelWindows = (props) => {
|
|
|
1410
1038
|
className: areasViewerClasses.panelWindowsRoot,
|
|
1411
1039
|
children: hashLayoutItems.map((kl) => {
|
|
1412
1040
|
return /* @__PURE__ */ jsx("div", {
|
|
1413
|
-
className: clsx(areasViewerClasses.panelWindowsButtonContainer, maximizedId === kl.i ? areasViewerClasses.selected : null),
|
|
1041
|
+
className: clsx(areasViewerClasses.panelWindowsButtonContainer, maximizedId === kl.i && kl.emergeType !== "popup" || maximizedIdParent === kl.windowId && kl.moduleId === currentParam ? areasViewerClasses.selected : null),
|
|
1414
1042
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
1415
1043
|
src: kl.url_icon,
|
|
1416
1044
|
size: "small",
|
|
@@ -1435,7 +1063,7 @@ const InnerForHooks = (props) => {
|
|
|
1435
1063
|
children: [
|
|
1436
1064
|
status === "loaded" ? /* @__PURE__ */ jsx(AreaGridLayout, {
|
|
1437
1065
|
areaId
|
|
1438
|
-
}) : /* @__PURE__ */ jsx(
|
|
1066
|
+
}) : /* @__PURE__ */ jsx(LoadingError, {
|
|
1439
1067
|
status,
|
|
1440
1068
|
action: () => {
|
|
1441
1069
|
}
|
|
@@ -1549,12 +1177,15 @@ function AreasViewer() {
|
|
|
1549
1177
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
1550
1178
|
children: [/* @__PURE__ */ jsx(AreasViewerRoot, {
|
|
1551
1179
|
className: classesRoot,
|
|
1180
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
1181
|
+
[TEST_PROP_ID]: getNameDataTestId(AREAS_VIEWER_CLASS_NAME, "root", "")
|
|
1182
|
+
} : {},
|
|
1552
1183
|
children: status === "loaded" ? areas.map((area) => {
|
|
1553
1184
|
return /* @__PURE__ */ jsx(Area, {
|
|
1554
1185
|
areaId: area,
|
|
1555
1186
|
selected: currentArea === area
|
|
1556
1187
|
}, area);
|
|
1557
|
-
}) : /* @__PURE__ */ jsx(
|
|
1188
|
+
}) : /* @__PURE__ */ jsx(LoadingError, {
|
|
1558
1189
|
status,
|
|
1559
1190
|
action: () => init()
|
|
1560
1191
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export * from './AreasAdmin';
|
|
2
2
|
export * from './AreasViewer';
|
|
3
3
|
export type { NewWindowProps as NewWindow } from '../types';
|
|
4
|
-
export type { MFLoaderProps as MicroFrontendProps } from './AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/types';
|