@m4l/components 0.1.76 → 0.1.77
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 +19 -0
- package/components/AccountPopover/{index.47cf6c43.js → index.3a79c395.js} +7 -6
- package/components/AppBar/{index.f04f5e45.js → index.71b38ee9.js} +7 -6
- package/components/CommonActions/components/ActionCancel/{index.453c2d24.js → index.b748a38e.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.c2a2fd55.js → index.27ad09e1.js} +18 -18
- package/components/CommonActions/components/ActionFormIntro/{index.25d33912.js → index.2556f054.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.c653a266.js → index.a7d92e66.js} +2 -2
- package/components/CommonActions/components/Actions/{index.e376a68e.js → index.3eba9d91.js} +16 -17
- package/components/DataGrid/{index.ffaf000e.js → index.545b492f.js} +42 -30
- package/components/DataGrid/types.d.ts +5 -1
- package/components/DraggableWindow/{index.b08af1dc.js → index.c702d3f2.js} +1 -1
- package/components/DynamicFilter/{index.d7c03a61.js → index.d7be0f37.js} +40 -33
- package/components/DynamicFilter/subcomponents/InnerForHooks/index.d.ts +2 -1
- package/components/DynamicFilter/subcomponents/InnerForHooks/types.d.ts +2 -0
- package/components/DynamicFilter/tests/contants.d.ts +1 -1
- package/components/DynamicFilter/types.d.ts +4 -0
- package/components/GridLayout/GridLayout.d.ts +6 -0
- package/components/GridLayout/Responsive/index.a12a8cec.js +335 -0
- package/components/GridLayout/WidthProvider/index.8ff65909.js +67 -0
- package/components/GridLayout/calculateUtils.d.ts +42 -0
- package/components/GridLayout/index.4ba3767a.js +1400 -0
- package/components/GridLayout/index.d.ts +6 -0
- package/components/GridLayout/subcomponents/GridItem/index.d.ts +25 -0
- package/components/GridLayout/subcomponents/GridItem/types.d.ts +76 -0
- package/components/GridLayout/subcomponents/Responsive/index.d.ts +3 -0
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils.d.ts +61 -0
- package/components/GridLayout/subcomponents/Responsive/types.d.ts +71 -0
- package/components/GridLayout/subcomponents/WidthProvider/index.d.ts +16 -0
- package/components/GridLayout/types.d.ts +355 -0
- package/components/GridLayout/utils.d.ts +123 -0
- package/components/HelperText/{index.9864f773.js → index.ef31df1f.js} +7 -6
- package/components/Icon/{index.9dae8337.js → index.ecb63e65.js} +1 -1
- package/components/LanguagePopover/{index.938c6675.js → index.0023d069.js} +7 -6
- package/components/LinearProgressIndeterminate/{index.d34d398f.js → index.60dabc06.js} +1 -1
- package/components/ModalDialog/{index.d9c5d400.js → index.d880e685.js} +8 -56
- package/components/NavLink/{index.21c8fd90.js → index.cd92eceb.js} +7 -6
- package/components/ObjectLogs/{index.a2709fc2.js → index.f174c542.js} +19 -19
- package/components/PaperForm/{index.5e1bc99f.js → index.1bd86ee5.js} +1 -1
- package/components/Period/{index.526791a3.js → index.711db043.js} +21 -22
- package/components/Resizeable/{index.f6e48e56.js → index.9a9c79a4.js} +1 -1
- package/components/SideBar/{index.9e1a5b96.js → index.c5ce0bad.js} +5 -5
- package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/classes/types.d.ts +2 -0
- package/components/areas/components/AreasAdmin/{index.946eebb9.js → index.cc4cbf56.js} +120 -46
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +0 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/index.d.ts +3 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/PanelWindowPopUp/types.d.ts +3 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/{index.bf4191ea.js → index.9c2aaaeb.js} +258 -259
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/index.d.ts +1 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +3 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/types.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/types.d.ts +1 -1
- package/components/areas/components/{index.2bb534cb.js → index.0f7ac464.js} +11 -10
- package/components/areas/contexts/AreasContext/helper.d.ts +6 -16
- package/components/areas/contexts/AreasContext/{index.f0397b7c.js → index.c8147e8e.js} +244 -339
- package/components/areas/contexts/AreasContext/types.d.ts +23 -20
- package/components/areas/contexts/{index.1809650a.js → index.02336412.js} +1 -1
- package/components/areas/{dictionary.3fabae50.js → dictionary.afb7e3d9.js} +5 -2
- package/components/areas/dictionary.d.ts +4 -1
- package/components/areas/hooks/useAreas/{index.40917e99.js → index.3406a6cb.js} +1 -1
- package/components/areas/{icons.19cde4b4.js → icons.8266ccc8.js} +5 -1
- package/components/areas/icons.d.ts +4 -0
- package/components/areas/{index.9bd48013.js → index.6f2e5dab.js} +11 -10
- package/components/areas/types.d.ts +30 -22
- package/components/formatters/BooleanFormatter/{index.431dc923.js → index.5268b024.js} +1 -1
- package/components/formatters/{index.e1af75e6.js → index.137169d8.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.a063dc44.js → index.ac2b1fae.js} +8 -7
- package/components/hook-form/RHFAutocompleteAsync/{index.ddfd9cc9.js → index.8b4ccc8d.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.7e7f220b.js → index.acef119c.js} +1 -1
- package/components/hook-form/RHFDateTime/{index.d330709b.js → index.5b080342.js} +9 -8
- package/components/hook-form/RHFPeriod/{index.e2b1293b.js → index.5304e3bd.js} +2 -2
- package/components/hook-form/RHFTextField/{index.e5336d09.js → index.e751dca7.js} +5 -5
- package/components/hook-form/RHFUpload/{index.17e7f9eb.js → index.25db0511.js} +8 -7
- package/components/index.d.ts +1 -0
- package/components/modal/{WindowBase.7acb9f1d.js → WindowBase.850ea31a.js} +9 -8
- package/components/modal/{WindowConfirm.9b829837.js → WindowConfirm.cb37bc58.js} +18 -18
- package/components/modal/classes/index.d.ts +1 -0
- package/components/modal/classes/types.d.ts +1 -0
- package/components/modal/{index.1b25b61d.js → index.a0978193.js} +18 -16
- package/components/mui_extended/Accordion/{index.3faafd8b.js → index.12b1339a.js} +2 -2
- package/components/mui_extended/Badge/Badge.d.ts +3 -0
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -0
- package/components/mui_extended/Badge/classes/index.d.ts +6 -0
- package/components/mui_extended/Badge/classes/types.d.ts +6 -0
- package/components/mui_extended/Badge/index.8c2b8b66.js +36 -0
- package/components/mui_extended/Badge/index.d.ts +2 -0
- package/components/mui_extended/Badge/tests/constants.d.ts +1 -0
- package/components/mui_extended/Badge/tests/utils.d.ts +2 -0
- package/components/mui_extended/Badge/types.d.ts +4 -0
- package/components/mui_extended/Button/{index.fdb5dcbd.js → index.4288f9fc.js} +8 -3
- package/components/mui_extended/IconButton/{index.1a9d4fa5.js → index.fc5b7c2d.js} +1 -1
- package/components/mui_extended/MenuActions/{index.ba1da3b3.js → index.f5b1c022.js} +28 -9
- package/components/mui_extended/MenuActions/types.d.ts +8 -0
- package/components/mui_extended/Pager/{index.67bda2c5.js → index.435af0df.js} +1 -1
- package/components/mui_extended/{index.73e536de.js → index.83979b6a.js} +7 -6
- package/components/mui_extended/index.d.ts +1 -0
- package/contexts/ModalContext/{index.699f95fa.js → index.dee85a61.js} +1 -1
- package/hooks/useModal/{index.7b7d26ba.js → index.de522a10.js} +1 -1
- package/index.js +94 -83
- package/node_modules.d73a220d.js +363 -0
- package/package.json +4 -3
- package/{react-draggable.6d7949a3.js → react-draggable.7abb5d0a.js} +3 -2
- package/{react-resizable.b6f8e04a.js → react-resizable.ba08699a.js} +13 -12
- package/utils/{index.008b4c2a.js → index.c43a95f4.js} +0 -15
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowPopUp/index.d.ts +0 -4
- package/components/modal/ModalDialog/types.d.ts +0 -7
- /package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/{GridLayout → AreaGridLayout}/types.d.ts +0 -0
|
@@ -5,89 +5,90 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { styled } from "@mui/material/styles";
|
|
8
|
-
import { r as react_resizable_css } from "../../../../react-resizable.
|
|
9
|
-
import { generateUtilityClasses, Skeleton, Dialog } from "@mui/material";
|
|
8
|
+
import { r as react_resizable_css } from "../../../../react-resizable.ba08699a.js";
|
|
9
|
+
import { generateUtilityClasses, Skeleton, useTheme, Dialog } from "@mui/material";
|
|
10
10
|
import { unstable_composeClasses } from "@mui/base";
|
|
11
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.
|
|
11
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.c43a95f4.js";
|
|
12
12
|
import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
13
|
-
import React__default, { useMemo, useState, useCallback, useEffect } from "react";
|
|
14
|
-
import { WidthProvider, Responsive } from "react-grid-layout";
|
|
15
13
|
import { shallow } from "zustand/shallow";
|
|
16
|
-
import "
|
|
17
|
-
import "framer-motion";
|
|
18
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
19
|
-
import "react-router-dom";
|
|
20
|
-
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
21
|
-
import "../../../animate/PropagateLoader/index.7fab43c8.js";
|
|
22
|
-
import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
23
|
-
import { I as Icon } from "../../../Icon/index.9dae8337.js";
|
|
24
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.1a9d4fa5.js";
|
|
14
|
+
import React__default, { useMemo, useState, useCallback, useEffect } from "react";
|
|
25
15
|
import clsx from "clsx";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import "
|
|
29
|
-
import
|
|
30
|
-
import "../../../
|
|
31
|
-
import "../../../mui_extended/Accordion/index.3faafd8b.js";
|
|
16
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.3406a6cb.js";
|
|
17
|
+
import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
18
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.fc5b7c2d.js";
|
|
19
|
+
import "../../../mui_extended/Accordion/index.12b1339a.js";
|
|
20
|
+
import { I as Icon } from "../../../Icon/index.ecb63e65.js";
|
|
32
21
|
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
22
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
33
23
|
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
24
|
+
import "react-router-dom";
|
|
34
25
|
import "@mui/material/Button";
|
|
35
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
26
|
+
import { B as Button } from "../../../mui_extended/Button/index.4288f9fc.js";
|
|
27
|
+
import "../../../mui_extended/Badge/index.8c2b8b66.js";
|
|
36
28
|
import "../../../Image/index.c18ebf5a.js";
|
|
37
29
|
import "@mui/lab";
|
|
30
|
+
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f5b1c022.js";
|
|
38
31
|
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
39
|
-
import
|
|
40
|
-
import "../../../mui_extended/Pager/index.67bda2c5.js";
|
|
32
|
+
import "../../../mui_extended/Pager/index.435af0df.js";
|
|
41
33
|
import "../../../mui_extended/Tab/index.9e2f6e34.js";
|
|
42
34
|
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
35
|
+
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
36
|
+
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
37
|
+
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
38
|
+
import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
39
|
+
import debounce from "lodash/debounce";
|
|
40
|
+
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
45
41
|
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
46
|
-
import "zustand";
|
|
47
42
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
43
|
+
import "../../../../contexts/ModalContext/index.dee85a61.js";
|
|
44
|
+
import "../../../../contexts/RHFormContext/index.fe175bab.js";
|
|
45
|
+
import "../../../GridLayout/index.4ba3767a.js";
|
|
46
|
+
import { R as Responsive } from "../../../GridLayout/Responsive/index.a12a8cec.js";
|
|
47
|
+
import { W as WidthProvider } from "../../../GridLayout/WidthProvider/index.8ff65909.js";
|
|
48
|
+
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.c8147e8e.js";
|
|
49
|
+
import "../../../animate/index.1f8eadd4.js";
|
|
50
|
+
import "framer-motion";
|
|
51
|
+
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
52
|
+
import "../../../animate/PropagateLoader/index.7fab43c8.js";
|
|
53
|
+
import "../AreasAdmin/index.cc4cbf56.js";
|
|
54
|
+
import "../../../ScrollBar/index.bbe48f4d.js";
|
|
55
|
+
import "zustand";
|
|
48
56
|
import "react-hook-form";
|
|
49
|
-
import "../../../hook-form/RHFAutocomplete/index.
|
|
50
|
-
import "../../../HelperText/index.
|
|
51
|
-
import
|
|
52
|
-
import "../../../hook-form/
|
|
53
|
-
import "../../../hook-form/RHFCheckbox/index.7e7f220b.js";
|
|
57
|
+
import "../../../hook-form/RHFAutocomplete/index.ac2b1fae.js";
|
|
58
|
+
import "../../../HelperText/index.ef31df1f.js";
|
|
59
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.8b4ccc8d.js";
|
|
60
|
+
import "../../../hook-form/RHFCheckbox/index.acef119c.js";
|
|
54
61
|
import "@mui/x-date-pickers";
|
|
55
|
-
import "../../../hook-form/RHFDateTime/index.
|
|
56
|
-
import "../../../hook-form/RHFTextField/index.
|
|
57
|
-
import "../../../hook-form/RHFPeriod/index.
|
|
58
|
-
import "../../../Period/index.
|
|
59
|
-
import "../../../CommonActions/components/Actions/index.
|
|
60
|
-
import "../../../../
|
|
61
|
-
import {
|
|
62
|
-
import "../../../
|
|
63
|
-
import { R as ResizeableWindow } from "../../../Resizeable/index.f6e48e56.js";
|
|
64
|
-
import "../../../modal/index.1b25b61d.js";
|
|
62
|
+
import "../../../hook-form/RHFDateTime/index.5b080342.js";
|
|
63
|
+
import "../../../hook-form/RHFTextField/index.e751dca7.js";
|
|
64
|
+
import "../../../hook-form/RHFPeriod/index.5304e3bd.js";
|
|
65
|
+
import "../../../Period/index.711db043.js";
|
|
66
|
+
import "../../../CommonActions/components/Actions/index.3eba9d91.js";
|
|
67
|
+
import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
|
|
68
|
+
import { R as ResizeableWindow } from "../../../Resizeable/index.9a9c79a4.js";
|
|
69
|
+
import "../../../modal/index.a0978193.js";
|
|
65
70
|
import "lodash/isString";
|
|
66
71
|
import "react-dropzone";
|
|
67
|
-
import "../../../hook-form/RHFUpload/index.
|
|
68
|
-
import "../../../DataGrid/index.
|
|
72
|
+
import "../../../hook-form/RHFUpload/index.25db0511.js";
|
|
73
|
+
import "../../../DataGrid/index.545b492f.js";
|
|
69
74
|
import "react-dnd";
|
|
70
75
|
import "react-dnd-html5-backend";
|
|
71
|
-
import "../../../DynamicFilter/index.
|
|
76
|
+
import "../../../DynamicFilter/index.d7be0f37.js";
|
|
72
77
|
import "yup";
|
|
73
|
-
import "
|
|
74
|
-
import "../../../LanguagePopover/index.
|
|
75
|
-
import "../../../NavLink/index.
|
|
78
|
+
import "lodash";
|
|
79
|
+
import "../../../LanguagePopover/index.0023d069.js";
|
|
80
|
+
import "../../../NavLink/index.cd92eceb.js";
|
|
76
81
|
import "../../../NoItemSelected/index.23dfc897.js";
|
|
77
|
-
import "../../../ObjectLogs/index.
|
|
82
|
+
import "../../../ObjectLogs/index.f174c542.js";
|
|
78
83
|
import "../../../../react-json-view.57125fcf.js";
|
|
79
|
-
import "../../../PaperForm/index.
|
|
84
|
+
import "../../../PaperForm/index.1bd86ee5.js";
|
|
80
85
|
import "../../../Page/index.4237c241.js";
|
|
81
86
|
import "../../../PropertyValue/index.8a1adf3e.js";
|
|
82
87
|
import "../../../SplitLayout/index.9ef430f6.js";
|
|
83
88
|
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
84
|
-
import "../../../SideBar/index.
|
|
85
|
-
import "../../../AppBar/index.
|
|
86
|
-
import "../../../AccountPopover/index.
|
|
87
|
-
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.3fabae50.js";
|
|
88
|
-
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
89
|
-
import { D as DraggableWindow } from "../../../DraggableWindow/index.b08af1dc.js";
|
|
90
|
-
import { throttle } from "lodash";
|
|
89
|
+
import "../../../SideBar/index.c5ce0bad.js";
|
|
90
|
+
import "../../../AppBar/index.71b38ee9.js";
|
|
91
|
+
import "../../../AccountPopover/index.3a79c395.js";
|
|
91
92
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
92
93
|
"root",
|
|
93
94
|
"areaRoot",
|
|
@@ -102,6 +103,7 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
|
102
103
|
"areaGridLayoutPanelContainer",
|
|
103
104
|
"areaGridLayout",
|
|
104
105
|
"areaGridLayoutPopupsContainer",
|
|
106
|
+
"areasWindowPopUpList",
|
|
105
107
|
"windowRoot",
|
|
106
108
|
"windowHeader",
|
|
107
109
|
"windowHeaderContent",
|
|
@@ -125,6 +127,7 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
|
125
127
|
"panelWindowsButtonContainer",
|
|
126
128
|
"containerLinearProgress",
|
|
127
129
|
"selected",
|
|
130
|
+
"colapsed",
|
|
128
131
|
"selectedWindow",
|
|
129
132
|
"isMobile",
|
|
130
133
|
"loading",
|
|
@@ -148,6 +151,7 @@ const useAreasViewerUtilityClasses = (ownerState) => {
|
|
|
148
151
|
areaGridLayoutPanelContainer: ["areaGridLayoutPanelContainer"],
|
|
149
152
|
areaGridLayout: ["areaGridLayout"],
|
|
150
153
|
areaGridLayoutPopupsContainer: ["areaGridLayoutPopupsContainer"],
|
|
154
|
+
areasWindowPopUpList: ["areasWindowPopUpList"],
|
|
151
155
|
windowRoot: ["windowRoot"],
|
|
152
156
|
windowRootContainer: ["windowRootContainer"],
|
|
153
157
|
windowHeader: ["windowHeader"],
|
|
@@ -620,7 +624,7 @@ function getMenuActions(options) {
|
|
|
620
624
|
onClick: () => saveModuleCookies(windowId),
|
|
621
625
|
disabled: false,
|
|
622
626
|
visibility: "normal",
|
|
623
|
-
dictionaryId: getAreasDictionary(
|
|
627
|
+
dictionaryId: getAreasDictionary(DICCTIONARY.label_persist_module_cookies),
|
|
624
628
|
key: "save_cookies"
|
|
625
629
|
};
|
|
626
630
|
menuActions.push(saveCookiesAction);
|
|
@@ -629,7 +633,7 @@ function getMenuActions(options) {
|
|
|
629
633
|
onClick: () => resetModuleCookies(windowId),
|
|
630
634
|
disabled: false,
|
|
631
635
|
visibility: "normal",
|
|
632
|
-
dictionaryId: getAreasDictionary(
|
|
636
|
+
dictionaryId: getAreasDictionary(DICCTIONARY.label_reset_module_cookies),
|
|
633
637
|
key: "reset_cookes"
|
|
634
638
|
};
|
|
635
639
|
menuActions.push(resetCookiesAction);
|
|
@@ -678,23 +682,85 @@ function MainActions(props) {
|
|
|
678
682
|
})
|
|
679
683
|
});
|
|
680
684
|
}
|
|
685
|
+
const WindowPopUpsList = (props) => {
|
|
686
|
+
const {
|
|
687
|
+
areaId,
|
|
688
|
+
windowId
|
|
689
|
+
} = props;
|
|
690
|
+
const {
|
|
691
|
+
host_static_assets,
|
|
692
|
+
environment_assets
|
|
693
|
+
} = useEnvironment();
|
|
694
|
+
const windowsPopUps = useAreasStore((state2) => state2.hashAreas[areaId].hashLayoutItems.filter((li) => state2.hashWindows[li].parentLayoutId === windowId && state2.hashWindows[li].emergeType === "popup").map((lim) => {
|
|
695
|
+
const w = state2.hashWindows[lim];
|
|
696
|
+
return {
|
|
697
|
+
i: w.windowId,
|
|
698
|
+
url_icon: w.url_icon,
|
|
699
|
+
title: w.title
|
|
700
|
+
};
|
|
701
|
+
}), shallow);
|
|
702
|
+
const state = useAreasStore((state2) => state2);
|
|
703
|
+
const theme = useTheme();
|
|
704
|
+
const {
|
|
705
|
+
maximizeLayout
|
|
706
|
+
} = useAreasStore((state2) => state2.areaActions);
|
|
707
|
+
const onTouched = (layoutId) => {
|
|
708
|
+
maximizeLayout(areaId, layoutId);
|
|
709
|
+
};
|
|
710
|
+
console.log("windowsPopUps", windowsPopUps);
|
|
711
|
+
console.log("areaId", areaId);
|
|
712
|
+
console.log("state", state);
|
|
713
|
+
const menuActions = windowsPopUps ? windowsPopUps.map((element) => {
|
|
714
|
+
return {
|
|
715
|
+
onClick: () => onTouched(element.i),
|
|
716
|
+
label: element.title,
|
|
717
|
+
urlIcon: element.url_icon
|
|
718
|
+
};
|
|
719
|
+
}) : null;
|
|
720
|
+
if (menuActions && menuActions.length > 0) {
|
|
721
|
+
return /* @__PURE__ */ jsx(MenuActions, {
|
|
722
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.POPUP}`,
|
|
723
|
+
arrowType: "no-arrow",
|
|
724
|
+
marginTop: "12px!important",
|
|
725
|
+
marginLeft: "14px!important",
|
|
726
|
+
anchorOrigin: {
|
|
727
|
+
vertical: "bottom",
|
|
728
|
+
horizontal: "right"
|
|
729
|
+
},
|
|
730
|
+
transformOrigin: {
|
|
731
|
+
vertical: "top",
|
|
732
|
+
horizontal: "right"
|
|
733
|
+
},
|
|
734
|
+
menuActions,
|
|
735
|
+
className: areasViewerClasses.areasWindowPopUpList,
|
|
736
|
+
menuActionSx: theme.components?.M4LAreasViewerWindowPopUpList?.styleOverrides,
|
|
737
|
+
withBadge: true,
|
|
738
|
+
badgeContent: menuActions.length.toString()
|
|
739
|
+
});
|
|
740
|
+
} else {
|
|
741
|
+
return null;
|
|
742
|
+
}
|
|
743
|
+
};
|
|
681
744
|
function Header(props) {
|
|
682
745
|
const {
|
|
683
746
|
areaId,
|
|
684
747
|
windowId,
|
|
685
748
|
emergeType
|
|
686
749
|
} = props;
|
|
687
|
-
const [url_icon, title, moduleActions, onClose, version, windowOptions,
|
|
750
|
+
const [url_icon, title, moduleActions, onClose, version, windowOptions, colapsed] = useAreasStore((state) => {
|
|
688
751
|
const window2 = state.hashWindows[windowId];
|
|
689
|
-
return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, window2.windowOptions,
|
|
752
|
+
return [window2.url_icon, window2.title, window2.moduleActions, window2.onClose, window2.version, window2.windowOptions, window2.colapsed];
|
|
690
753
|
}, shallow);
|
|
691
754
|
const {
|
|
692
755
|
saveModuleCookies,
|
|
693
756
|
resetModuleCookies
|
|
694
757
|
} = useAreasStore((state) => state.windowActions, shallow);
|
|
758
|
+
const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
|
|
695
759
|
const {
|
|
696
760
|
maximizeLayout,
|
|
697
|
-
normalizeLayouts
|
|
761
|
+
normalizeLayouts,
|
|
762
|
+
colapseLayoutItem,
|
|
763
|
+
unColapseLayoutItem
|
|
698
764
|
} = useAreasStore((state) => state.areaActions, shallow);
|
|
699
765
|
const {
|
|
700
766
|
host_static_assets,
|
|
@@ -702,6 +768,7 @@ function Header(props) {
|
|
|
702
768
|
} = useEnvironment();
|
|
703
769
|
const isDesktop = useResponsiveDesktop();
|
|
704
770
|
const isSkeleton = useModuleSkeleton();
|
|
771
|
+
useModuleDictionary();
|
|
705
772
|
const urlPrefix = `${host_static_assets}/${environment_assets}`;
|
|
706
773
|
const menuActions = useMemo(() => {
|
|
707
774
|
return getMenuActions({
|
|
@@ -719,12 +786,20 @@ function Header(props) {
|
|
|
719
786
|
onClose && onClose(windowId);
|
|
720
787
|
};
|
|
721
788
|
const maxNormalize = () => {
|
|
722
|
-
if (
|
|
789
|
+
if (maximizedId === windowId) {
|
|
723
790
|
normalizeLayouts(areaId);
|
|
724
791
|
} else {
|
|
725
792
|
maximizeLayout(areaId, windowId);
|
|
726
793
|
}
|
|
727
794
|
};
|
|
795
|
+
const colapedToggle = () => {
|
|
796
|
+
console.log("Toggle", colapsed);
|
|
797
|
+
if (!colapsed) {
|
|
798
|
+
colapseLayoutItem(areaId, windowId);
|
|
799
|
+
} else {
|
|
800
|
+
unColapseLayoutItem(areaId, windowId);
|
|
801
|
+
}
|
|
802
|
+
};
|
|
728
803
|
if (isSkeleton) {
|
|
729
804
|
return /* @__PURE__ */ jsx(SKTModuleHeader, {});
|
|
730
805
|
}
|
|
@@ -741,11 +816,10 @@ function Header(props) {
|
|
|
741
816
|
children: `${title}`
|
|
742
817
|
}), /* @__PURE__ */ jsx(MainActions, {
|
|
743
818
|
windowId
|
|
744
|
-
}),
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}), menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
|
|
819
|
+
}), emergeType === "layout" ? /* @__PURE__ */ jsx(WindowPopUpsList, {
|
|
820
|
+
areaId,
|
|
821
|
+
windowId
|
|
822
|
+
}) : null, menuActions.length > 0 && /* @__PURE__ */ jsx(MenuActions, {
|
|
749
823
|
arrowType: "no-arrow",
|
|
750
824
|
marginTop: "12px!important",
|
|
751
825
|
marginLeft: "14px!important",
|
|
@@ -758,6 +832,15 @@ function Header(props) {
|
|
|
758
832
|
horizontal: "right"
|
|
759
833
|
},
|
|
760
834
|
menuActions
|
|
835
|
+
}), !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
|
|
836
|
+
onClick: maxNormalize,
|
|
837
|
+
"aria-label": "click",
|
|
838
|
+
src: maximizedId === windowId ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.NORMALIZE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.MAXIMIZE}`
|
|
839
|
+
}), !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(IconButton, {
|
|
840
|
+
onClick: colapedToggle,
|
|
841
|
+
"aria-label": "click",
|
|
842
|
+
src: !colapsed ? `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.COLAPSE}` : `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.UNCOLPASE}`,
|
|
843
|
+
dictionaryTooltipId: "pendiente"
|
|
761
844
|
}), onClose && /* @__PURE__ */ jsx(IconButton, {
|
|
762
845
|
onClick: onCloseLocal,
|
|
763
846
|
"aria-label": "click",
|
|
@@ -823,7 +906,7 @@ class ObservableLoaderMF {
|
|
|
823
906
|
console.log("ObservableLoaderMF start", this.host);
|
|
824
907
|
const manifest = await fetch(`${this.host}/manifest.json?rnd=${Math.random()}`).then((res) => res.json()).catch(() => {
|
|
825
908
|
console.debug("Error fetching manifest", `${this.host}/manifest.json`);
|
|
826
|
-
this.notify("error", 0);
|
|
909
|
+
setTimeout(() => this.notify("error", 0), 300);
|
|
827
910
|
return void 0;
|
|
828
911
|
});
|
|
829
912
|
console.log("ObservableLoaderMF cargado de manifest");
|
|
@@ -922,22 +1005,22 @@ const AreasLoadingError = (props) => {
|
|
|
922
1005
|
variant: "h3",
|
|
923
1006
|
skeletonWidth: "100px",
|
|
924
1007
|
className: areasViewerClasses.areasLoadingErrorTitle,
|
|
925
|
-
children: getLabel(DICCTIONARY.area_error_title)
|
|
1008
|
+
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_title))
|
|
926
1009
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
927
1010
|
variant: "subtitle",
|
|
928
1011
|
skeletonWidth: "100px",
|
|
929
1012
|
className: areasViewerClasses.areasLoadingErrorDescription,
|
|
930
|
-
children: getLabel(DICCTIONARY.area_error_description)
|
|
1013
|
+
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_description))
|
|
931
1014
|
}), /* @__PURE__ */ jsx("div", {
|
|
932
1015
|
className: areasViewerClasses.areasLoadingErrorDivider
|
|
933
1016
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
934
1017
|
variant: "paragraph",
|
|
935
1018
|
skeletonWidth: "100px",
|
|
936
1019
|
className: areasViewerClasses.areasLoadingErrorTextAction,
|
|
937
|
-
children: getLabel(DICCTIONARY.area_error_recommendation)
|
|
1020
|
+
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_recommendation))
|
|
938
1021
|
}), /* @__PURE__ */ jsx(Button, {
|
|
939
1022
|
onClick: action,
|
|
940
|
-
children: getLabel(DICCTIONARY.area_error_intro)
|
|
1023
|
+
children: getLabel(getAreasDictionary(DICCTIONARY.area_error_intro))
|
|
941
1024
|
})]
|
|
942
1025
|
})
|
|
943
1026
|
});
|
|
@@ -1097,8 +1180,7 @@ const Component = (props) => {
|
|
|
1097
1180
|
};
|
|
1098
1181
|
React__default.memo(Component);
|
|
1099
1182
|
const WindowRoot = styled("div")`
|
|
1100
|
-
|
|
1101
|
-
inset:0;
|
|
1183
|
+
inset: 0;
|
|
1102
1184
|
position: absolute;
|
|
1103
1185
|
display: flex;
|
|
1104
1186
|
flex-direction: column;
|
|
@@ -1137,13 +1219,16 @@ const WindowRoot = styled("div")`
|
|
|
1137
1219
|
gap: 4px;
|
|
1138
1220
|
}
|
|
1139
1221
|
|
|
1140
|
-
|
|
1141
1222
|
// windowHeaderMainActions
|
|
1142
1223
|
& .${areasViewerClasses.windowContent} {
|
|
1143
1224
|
flex-grow: 1;
|
|
1144
1225
|
position: relative;
|
|
1145
1226
|
}
|
|
1146
1227
|
|
|
1228
|
+
& .${areasViewerClasses.windowContent}.${areasViewerClasses.colapsed} {
|
|
1229
|
+
display: none !important;
|
|
1230
|
+
prop1: juan;
|
|
1231
|
+
}
|
|
1147
1232
|
// windowModalRoot
|
|
1148
1233
|
& .${areasViewerClasses.windowModalRoot} {
|
|
1149
1234
|
padding: 16px;
|
|
@@ -1160,37 +1245,29 @@ const WindowRoot = styled("div")`
|
|
|
1160
1245
|
flex-direction: column;
|
|
1161
1246
|
}
|
|
1162
1247
|
// windowToastyContainer
|
|
1163
|
-
& .${areasViewerClasses.windowToastyContainer}.${areasViewerClasses.success}
|
|
1164
|
-
|
|
1248
|
+
& .${areasViewerClasses.windowToastyContainer}.${areasViewerClasses.success} {
|
|
1249
|
+
background-color: ${(props) => props.theme.palette.success.main};
|
|
1165
1250
|
}
|
|
1166
1251
|
|
|
1167
1252
|
// windowToastyMeesageButtonsContainer
|
|
1168
1253
|
& .${areasViewerClasses.windowToastyMeesageButtonsContainer} {
|
|
1169
1254
|
display: flex;
|
|
1170
|
-
|
|
1171
1255
|
}
|
|
1172
1256
|
& .MuiLinearProgress-root {
|
|
1173
1257
|
width: 100%;
|
|
1174
1258
|
}
|
|
1175
1259
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
1260
|
// windowToastyMessage
|
|
1180
1261
|
& .${areasViewerClasses.windowToastyMessage} {
|
|
1181
1262
|
flex-grow: 1;
|
|
1182
1263
|
}
|
|
1183
1264
|
|
|
1184
|
-
|
|
1265
|
+
// windowToastyContainer
|
|
1185
1266
|
& .${areasViewerClasses.windowToastyPin}.${areasViewerClasses.pinIn} {
|
|
1186
1267
|
border: 1px solid red;
|
|
1187
1268
|
}
|
|
1188
1269
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
1270
|
${(props) => props.theme.components?.M4LAreasViewerWindow?.styleOverrides}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
1271
|
`;
|
|
1195
1272
|
function Toasty(props) {
|
|
1196
1273
|
const {
|
|
@@ -1259,15 +1336,21 @@ function Toasties(props) {
|
|
|
1259
1336
|
}
|
|
1260
1337
|
const Window = (props) => {
|
|
1261
1338
|
const {
|
|
1262
|
-
|
|
1263
|
-
windowId
|
|
1264
|
-
moduleId,
|
|
1265
|
-
areaId
|
|
1339
|
+
areaId,
|
|
1340
|
+
windowId
|
|
1266
1341
|
} = props;
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
const
|
|
1342
|
+
const [emergeType, moduleId, winType] = useAreasStore((state) => {
|
|
1343
|
+
return [state.hashWindows[windowId]?.emergeType, state.hashWindows[windowId]?.moduleId, state.hashWindows[windowId]?.winType];
|
|
1344
|
+
}, shallow);
|
|
1345
|
+
const selected = useAreasStore((state) => {
|
|
1346
|
+
return emergeType === "layout" ? state.hashAreas[areaId]?.currentLayoutId : state.hashAreas[areaId]?.currentPopUpId;
|
|
1347
|
+
}) === windowId;
|
|
1348
|
+
const mfProps = useAreasStore((state) => state.hashWindows[windowId]?.mfProps, shallow);
|
|
1349
|
+
const component = useAreasStore((state) => state.hashWindows[windowId]?.component, shallow);
|
|
1350
|
+
const loading = useAreasStore((state) => state.hashWindows[windowId]?.loading, shallow);
|
|
1351
|
+
const status = useAreasStore((state) => state.hashWindows[windowId]?.status, shallow);
|
|
1352
|
+
const colapsed = useAreasStore((state) => state.hashWindows[windowId]?.colapsed, shallow);
|
|
1353
|
+
const dynamicMFStore = useAreasStore((state) => state.hashWindows[windowId]?.dynamicMFStore, shallow);
|
|
1271
1354
|
const {
|
|
1272
1355
|
setActions,
|
|
1273
1356
|
getCookie,
|
|
@@ -1279,19 +1362,14 @@ const Window = (props) => {
|
|
|
1279
1362
|
toast
|
|
1280
1363
|
} = useAreasStore((state) => state.windowActions, shallow);
|
|
1281
1364
|
const {
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
} = useAreasStore((state) => state.areaActions);
|
|
1365
|
+
selectLayout
|
|
1366
|
+
} = useAreasStore((state) => state.areaActions, shallow);
|
|
1285
1367
|
const {
|
|
1286
1368
|
loadCookiesFromApi
|
|
1287
|
-
} = useAreasStore((state) => state.windowActions);
|
|
1369
|
+
} = useAreasStore((state) => state.windowActions, shallow);
|
|
1288
1370
|
const onTouch = () => {
|
|
1289
1371
|
if (!selected) {
|
|
1290
|
-
|
|
1291
|
-
selectWindowPopUp(areaId, props.windowId);
|
|
1292
|
-
} else if (emergeType === "layout") {
|
|
1293
|
-
selectWindowLayout(areaId, props.windowId);
|
|
1294
|
-
}
|
|
1372
|
+
selectLayout(areaId, props.windowId);
|
|
1295
1373
|
}
|
|
1296
1374
|
};
|
|
1297
1375
|
const windowTools = useMemo(() => ({
|
|
@@ -1312,16 +1390,22 @@ const Window = (props) => {
|
|
|
1312
1390
|
}
|
|
1313
1391
|
}), []);
|
|
1314
1392
|
useEffect(() => {
|
|
1315
|
-
if (
|
|
1393
|
+
if (status === "init") {
|
|
1316
1394
|
loadCookiesFromApi(windowId);
|
|
1317
1395
|
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1396
|
+
}, [status]);
|
|
1397
|
+
console.log(
|
|
1398
|
+
`Window Render***#,selected:${selected}`,
|
|
1399
|
+
moduleId,
|
|
1400
|
+
status,
|
|
1401
|
+
loading
|
|
1402
|
+
);
|
|
1403
|
+
if (status === void 0) {
|
|
1404
|
+
return null;
|
|
1405
|
+
}
|
|
1322
1406
|
return /* @__PURE__ */ jsx(WindowRoot, {
|
|
1323
1407
|
role: "presentation",
|
|
1324
|
-
className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null,
|
|
1408
|
+
className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, loading ? areasViewerClasses.loading : null),
|
|
1325
1409
|
onMouseDown: onTouch,
|
|
1326
1410
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1327
1411
|
className: areasViewerClasses.windowRootContainer,
|
|
@@ -1331,100 +1415,43 @@ const Window = (props) => {
|
|
|
1331
1415
|
emergeType
|
|
1332
1416
|
}), /* @__PURE__ */ jsx(Toasties, {
|
|
1333
1417
|
windowId
|
|
1334
|
-
}), /* @__PURE__ */
|
|
1335
|
-
className: areasViewerClasses.windowContent,
|
|
1336
|
-
children:
|
|
1337
|
-
children: "...Componente de carga"
|
|
1338
|
-
}) :
|
|
1418
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1419
|
+
className: clsx(areasViewerClasses.windowContent, colapsed ? areasViewerClasses.colapsed : null),
|
|
1420
|
+
children: [status === "init" ? /* @__PURE__ */ jsx(Fragment, {
|
|
1421
|
+
children: "...Brucee porr analizar Componente de carga"
|
|
1422
|
+
}) : null, status === "loaded" ? winType === "microfrontend" ? /* @__PURE__ */ jsx(MemonizedMicroFrontend, {
|
|
1339
1423
|
moduleId,
|
|
1340
|
-
dynamicMFStore
|
|
1424
|
+
dynamicMFStore,
|
|
1341
1425
|
windowTools,
|
|
1342
|
-
...
|
|
1426
|
+
...mfProps
|
|
1343
1427
|
}) : /* @__PURE__ */ jsx(Component, {
|
|
1344
1428
|
moduleId,
|
|
1345
|
-
dynamicMFStore
|
|
1429
|
+
dynamicMFStore,
|
|
1346
1430
|
windowTools,
|
|
1347
|
-
component
|
|
1348
|
-
})
|
|
1431
|
+
component
|
|
1432
|
+
}) : null]
|
|
1349
1433
|
})]
|
|
1350
1434
|
})
|
|
1351
1435
|
});
|
|
1352
1436
|
};
|
|
1353
|
-
|
|
1354
|
-
const WindowPopUp = (props) => {
|
|
1355
|
-
const {
|
|
1356
|
-
areaId,
|
|
1357
|
-
windowProps,
|
|
1358
|
-
windowId
|
|
1359
|
-
} = props;
|
|
1360
|
-
const {
|
|
1361
|
-
host_static_assets,
|
|
1362
|
-
environment_assets
|
|
1363
|
-
} = useEnvironment();
|
|
1364
|
-
const {
|
|
1365
|
-
selectWindowPopUp
|
|
1366
|
-
} = useAreasStore((store) => store.areaActions);
|
|
1367
|
-
const selectedPopUpId = useAreasStore((store) => store.hashAreas[areaId].currentPopUpId);
|
|
1368
|
-
const zIndex = useAreasStore((store) => store.hashAreas[areaId].hashWindowsPopups[props.windowId].zIndex);
|
|
1369
|
-
const isSelected = props.windowId === selectedPopUpId;
|
|
1370
|
-
const onTouch = () => {
|
|
1371
|
-
if (!isSelected) {
|
|
1372
|
-
selectWindowPopUp(areaId, props.windowId);
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
return /* @__PURE__ */ jsx(DraggableWindow, {
|
|
1376
|
-
handle: ".m4l_draggable_handle",
|
|
1377
|
-
cancel: "",
|
|
1378
|
-
defaultPosition: windowProps,
|
|
1379
|
-
children: /* @__PURE__ */ jsx(ResizeableWindow, {
|
|
1380
|
-
className: clsx(areasViewerClasses.windowPopupRoot, `${areasViewerClasses.windowPopupRoot}-${windowId}`),
|
|
1381
|
-
width: windowProps.width,
|
|
1382
|
-
height: windowProps.height,
|
|
1383
|
-
style: {
|
|
1384
|
-
zIndex,
|
|
1385
|
-
position: "absolute"
|
|
1386
|
-
},
|
|
1387
|
-
onResizeStart: () => {
|
|
1388
|
-
onTouch();
|
|
1389
|
-
},
|
|
1390
|
-
handle: (resizeHandle, ref) => /* @__PURE__ */ jsx("div", {
|
|
1391
|
-
ref,
|
|
1392
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1393
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.RESIZE}`,
|
|
1394
|
-
className: `custom-handle custom-handle-${resizeHandle}`
|
|
1395
|
-
})
|
|
1396
|
-
}, resizeHandle),
|
|
1397
|
-
children: /* @__PURE__ */ jsx(Window, {
|
|
1398
|
-
...props
|
|
1399
|
-
})
|
|
1400
|
-
})
|
|
1401
|
-
});
|
|
1402
|
-
};
|
|
1403
|
-
const MemonizedWindowPopUp = React__default.memo(WindowPopUp);
|
|
1437
|
+
React__default.memo(Window);
|
|
1404
1438
|
const ResponsiveGridLayout = WidthProvider(Responsive);
|
|
1405
|
-
const
|
|
1439
|
+
const AreaGridLayout = (props) => {
|
|
1406
1440
|
const {
|
|
1407
1441
|
areaId
|
|
1408
1442
|
} = props;
|
|
1409
|
-
const
|
|
1410
|
-
const
|
|
1411
|
-
const
|
|
1412
|
-
const breakPointsLayouts = useAreasStore((state) => state.hashAreas[areaId].breakPointsLayouts, shallow);
|
|
1413
|
-
const windowsPopUps = useAreasStore((state) => state.hashAreas[areaId].windowsPopUps, shallow);
|
|
1443
|
+
const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems, shallow);
|
|
1444
|
+
const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
|
|
1445
|
+
const colapsedItems = useAreasStore((state) => state.hashAreas[areaId].colapsedItems, shallow);
|
|
1414
1446
|
const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
|
|
1415
|
-
const
|
|
1447
|
+
const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId, shallow);
|
|
1416
1448
|
const cols = useAreasStore((state) => state.hashAreas[areaId].cols, shallow);
|
|
1417
1449
|
const {
|
|
1418
|
-
onBreakpointsLayoutsChange
|
|
1450
|
+
onBreakpointsLayoutsChange,
|
|
1451
|
+
onContainerChange
|
|
1419
1452
|
} = useAreasStore((state) => state.areaActions, shallow);
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
useEffect(() => {
|
|
1423
|
-
setTimeout(() => {
|
|
1424
|
-
window.dispatchEvent(new Event("resize"));
|
|
1425
|
-
}, 100);
|
|
1426
|
-
}, [viewMode, windowsLayouts]);
|
|
1427
|
-
return /* @__PURE__ */ jsxs(
|
|
1453
|
+
console.debug("Window***", hashLayoutItems, layouts);
|
|
1454
|
+
return /* @__PURE__ */ jsx(
|
|
1428
1455
|
ResponsiveGridLayout,
|
|
1429
1456
|
{
|
|
1430
1457
|
autoSize: false,
|
|
@@ -1432,54 +1459,37 @@ const GridLayout = (props) => {
|
|
|
1432
1459
|
measureBeforeMount: true,
|
|
1433
1460
|
resizeHandles: ["nw", "se"],
|
|
1434
1461
|
className: clsx(areasViewerClasses.areaGridLayout, `${areasViewerClasses.areaGridLayout}-${areaId}`),
|
|
1435
|
-
layouts
|
|
1436
|
-
onLayoutChange: (
|
|
1437
|
-
|
|
1462
|
+
layouts,
|
|
1463
|
+
onLayoutChange: (layout, newLayouts) => onBreakpointsLayoutsChange(areaId, layout, newLayouts),
|
|
1464
|
+
layoutItemRender: (p) => {
|
|
1465
|
+
console.debug("layoutItemRender window", hashLayoutItems, p.i, p.type);
|
|
1466
|
+
if (hashLayoutItems.indexOf(p.i) === -1) {
|
|
1467
|
+
console.debug("NO EXISTE window", hashLayoutItems, p.i);
|
|
1468
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1469
|
+
}
|
|
1470
|
+
if (p.type === "placeholder") {
|
|
1471
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1472
|
+
children: "Place holder"
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
return /* @__PURE__ */ jsx(Window, {
|
|
1476
|
+
windowId: p.i,
|
|
1477
|
+
areaId
|
|
1478
|
+
});
|
|
1479
|
+
},
|
|
1438
1480
|
breakpoints,
|
|
1439
1481
|
cols,
|
|
1440
1482
|
rowHeight: ROW_HEIGTH_GRIDLAYOUT,
|
|
1441
|
-
|
|
1442
|
-
containerPadding: [
|
|
1483
|
+
containerMargin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
|
|
1484
|
+
containerPadding: [PADDING_GRIDLAYOUT, PADDING_GRIDLAYOUT],
|
|
1443
1485
|
draggableHandle: ".m4l_draggable_handle",
|
|
1444
|
-
|
|
1445
|
-
|
|
1486
|
+
onContainerChange: (e) => {
|
|
1487
|
+
onContainerChange(areaId, e);
|
|
1446
1488
|
},
|
|
1447
1489
|
preventCollision: false,
|
|
1448
1490
|
verticalCompact: true,
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
"data-grid": {
|
|
1452
|
-
i: "none",
|
|
1453
|
-
x: 0,
|
|
1454
|
-
y: 0,
|
|
1455
|
-
w: 0,
|
|
1456
|
-
h: 0,
|
|
1457
|
-
maxW: 0,
|
|
1458
|
-
maxH: 0,
|
|
1459
|
-
minW: 0,
|
|
1460
|
-
minH: 0,
|
|
1461
|
-
static: true,
|
|
1462
|
-
isDraggable: false,
|
|
1463
|
-
isResizable: false
|
|
1464
|
-
},
|
|
1465
|
-
children: windowsPopUps.map((wp) => {
|
|
1466
|
-
if (hashWindowsPopups[wp]) {
|
|
1467
|
-
return /* @__PURE__ */ jsx(MemonizedWindowPopUp, {
|
|
1468
|
-
...hashWindowsPopups[wp]
|
|
1469
|
-
}, hashWindowsPopups[wp].windowId);
|
|
1470
|
-
}
|
|
1471
|
-
return null;
|
|
1472
|
-
})
|
|
1473
|
-
}, "none"), windowsLayouts.map((l) => {
|
|
1474
|
-
if (hashWindowsLayouts[l.i]) {
|
|
1475
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1476
|
-
children: /* @__PURE__ */ jsx(MemonizedWindow, {
|
|
1477
|
-
...hashWindowsLayouts[l.i]
|
|
1478
|
-
})
|
|
1479
|
-
}, l.i);
|
|
1480
|
-
}
|
|
1481
|
-
return null;
|
|
1482
|
-
})]
|
|
1491
|
+
maximizeId: maximizedId,
|
|
1492
|
+
colapsedItems
|
|
1483
1493
|
}
|
|
1484
1494
|
);
|
|
1485
1495
|
};
|
|
@@ -1488,10 +1498,12 @@ const PanelWindows = (props) => {
|
|
|
1488
1498
|
areaId
|
|
1489
1499
|
} = props;
|
|
1490
1500
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
1491
|
-
const
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
1501
|
+
const maximizedId = useAreasStore((state) => state.hashAreas[areaId].maximizedId);
|
|
1502
|
+
const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].hashLayoutItems.map((key) => ({
|
|
1503
|
+
i: key,
|
|
1504
|
+
url_icon: state.hashWindows[key].url_icon,
|
|
1505
|
+
title: state.hashWindows[key].title
|
|
1506
|
+
})), shallow);
|
|
1495
1507
|
const {
|
|
1496
1508
|
maximizeLayout
|
|
1497
1509
|
} = useAreasStore((state) => state.areaActions);
|
|
@@ -1499,21 +1511,21 @@ const PanelWindows = (props) => {
|
|
|
1499
1511
|
maximizeLayout(areaId, layoutId);
|
|
1500
1512
|
};
|
|
1501
1513
|
if (status === "loaded") {
|
|
1502
|
-
if (
|
|
1514
|
+
if (!maximizedId || hashLayoutItems.length < 2) {
|
|
1503
1515
|
return null;
|
|
1504
1516
|
}
|
|
1505
1517
|
return /* @__PURE__ */ jsx("div", {
|
|
1506
1518
|
className: areasViewerClasses.panelWindowsRoot,
|
|
1507
|
-
children:
|
|
1519
|
+
children: hashLayoutItems.map((kl) => {
|
|
1508
1520
|
return /* @__PURE__ */ jsx("div", {
|
|
1509
|
-
className: clsx(areasViewerClasses.panelWindowsButtonContainer,
|
|
1521
|
+
className: clsx(areasViewerClasses.panelWindowsButtonContainer, maximizedId === kl.i ? areasViewerClasses.selected : null),
|
|
1510
1522
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
1511
|
-
src:
|
|
1523
|
+
src: kl.url_icon,
|
|
1512
1524
|
size: "small",
|
|
1513
|
-
onClick: () => onTouched(
|
|
1514
|
-
tooltip:
|
|
1525
|
+
onClick: () => onTouched(kl.i),
|
|
1526
|
+
tooltip: maximizedId !== kl.i ? kl.title : void 0
|
|
1515
1527
|
})
|
|
1516
|
-
},
|
|
1528
|
+
}, kl.i);
|
|
1517
1529
|
})
|
|
1518
1530
|
});
|
|
1519
1531
|
} else {
|
|
@@ -1524,20 +1536,22 @@ const InnerForHooks = (props) => {
|
|
|
1524
1536
|
const {
|
|
1525
1537
|
areaId
|
|
1526
1538
|
} = props;
|
|
1539
|
+
const isDesktop = useResponsiveDesktop();
|
|
1527
1540
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
1541
|
+
console.debug("Area InnerForHooks***", status);
|
|
1528
1542
|
return /* @__PURE__ */ jsxs("div", {
|
|
1529
1543
|
className: clsx(areasViewerClasses.areaGridLayoutPanelContainer, `${areasViewerClasses.areaGridLayoutPanelContainer}-${areaId}`),
|
|
1530
1544
|
children: [
|
|
1531
|
-
status === "loaded" ? /* @__PURE__ */ jsx(
|
|
1545
|
+
status === "loaded" ? /* @__PURE__ */ jsx(AreaGridLayout, {
|
|
1532
1546
|
areaId
|
|
1533
1547
|
}) : /* @__PURE__ */ jsx(AreasLoadingError, {
|
|
1534
1548
|
status,
|
|
1535
1549
|
action: () => {
|
|
1536
1550
|
}
|
|
1537
1551
|
}),
|
|
1538
|
-
/* @__PURE__ */ jsx(PanelWindows, {
|
|
1552
|
+
isDesktop ? /* @__PURE__ */ jsx(PanelWindows, {
|
|
1539
1553
|
areaId
|
|
1540
|
-
})
|
|
1554
|
+
}) : null
|
|
1541
1555
|
]
|
|
1542
1556
|
});
|
|
1543
1557
|
};
|
|
@@ -1548,25 +1562,11 @@ const Area = (props) => {
|
|
|
1548
1562
|
} = props;
|
|
1549
1563
|
const classesAreaRoot = useAreasStore((state) => state.viwerClasses.areaRoot);
|
|
1550
1564
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
1551
|
-
const {
|
|
1552
|
-
resizeMaximixedLayout
|
|
1553
|
-
} = useAreasStore((state) => state.areaActions, shallow);
|
|
1554
|
-
const throttleResizeMaximixedLayout = throttle(() => {
|
|
1555
|
-
console.log("throttleResizeMaximixedLayout", areaId);
|
|
1556
|
-
resizeMaximixedLayout(areaId);
|
|
1557
|
-
}, THROTTLE_RESIZE_TIME, {
|
|
1558
|
-
leading: false
|
|
1559
|
-
});
|
|
1560
|
-
const onResize = useCallback((_target) => {
|
|
1561
|
-
throttleResizeMaximixedLayout();
|
|
1562
|
-
}, []);
|
|
1563
|
-
const ref = useResizeObserver(onResize);
|
|
1564
1565
|
if (status === "init") {
|
|
1565
1566
|
return null;
|
|
1566
1567
|
}
|
|
1567
1568
|
return /* @__PURE__ */ jsx("div", {
|
|
1568
1569
|
className: clsx(classesAreaRoot, selected ? areasViewerClasses.selected : null, status === "loading" ? areasViewerClasses.loading : null),
|
|
1569
|
-
ref,
|
|
1570
1570
|
children: /* @__PURE__ */ jsx(InnerForHooks, {
|
|
1571
1571
|
areaId
|
|
1572
1572
|
})
|
|
@@ -1660,9 +1660,9 @@ function AreasViewer() {
|
|
|
1660
1660
|
className: classesRoot,
|
|
1661
1661
|
children: status === "loaded" ? areas.map((area) => {
|
|
1662
1662
|
return /* @__PURE__ */ jsx(Area, {
|
|
1663
|
-
areaId: area
|
|
1664
|
-
selected: currentArea === area
|
|
1665
|
-
}, area
|
|
1663
|
+
areaId: area,
|
|
1664
|
+
selected: currentArea === area
|
|
1665
|
+
}, area);
|
|
1666
1666
|
}) : /* @__PURE__ */ jsx(AreasLoadingError, {
|
|
1667
1667
|
status,
|
|
1668
1668
|
action: () => init()
|
|
@@ -1679,6 +1679,5 @@ function AreasViewer() {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
export {
|
|
1681
1681
|
AreasViewer as A,
|
|
1682
|
-
areasViewerClasses as a,
|
|
1683
1682
|
useAreasViewerUtilityClasses as u
|
|
1684
1683
|
};
|