@m4l/components 0.1.70 → 0.1.72
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 +20 -0
- package/components/CommonActions/components/ActionCancel/{index.9d521b2a.js → index.07ba5a89.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.4756457f.js → index.9bdae569.js} +21 -19
- package/components/CommonActions/components/ActionFormIntro/{index.40321b1b.js → index.e077d11f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.1ba5b02b.js → index.a454d0e4.js} +3 -3
- package/components/CommonActions/components/Actions/{index.154d7cb6.js → index.e190561b.js} +20 -18
- package/components/DataGrid/{index.2f4a0e64.js → index.549bd646.js} +22 -20
- package/components/DynamicFilter/{index.789ab474.js → index.c1a3e2f1.js} +48 -98
- package/components/HelperText/{index.a69e9509.js → index.4c27bfc1.js} +11 -10
- package/components/Icon/{index.caaed284.js → index.9839297c.js} +6 -4
- package/components/Icon/types.d.ts +1 -0
- package/components/Image/{index.82a6cd46.js → index.a88f6341.js} +3 -3
- package/components/LanguagePopover/{index.5af28b9e.js → index.84c51cd3.js} +11 -11
- package/components/ModalDialog/{index.cdfd1ae8.js → index.75ddf6de.js} +19 -5
- package/components/NavLink/{index.251fcf0d.js → index.e88494ef.js} +12 -11
- package/components/NoItemSelected/{index.3b9d16e3.js → index.c3b67da1.js} +1 -1
- package/components/ObjectLogs/{index.57ea68b3.js → index.88bcf75a.js} +17 -15
- package/components/PaperForm/{index.d2d492ea.js → index.b141d583.js} +1 -1
- package/components/Period/{index.fbf074d3.js → index.2ab4f2a1.js} +20 -18
- package/components/Resizeable/{index.aafda79e.js → index.086ff29e.js} +20 -6
- package/components/SideBar/{index.3bc6a634.js → index.90137dc5.js} +55 -40
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/Drawer.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/types.d.ts +8 -0
- package/components/areas/components/AreasAdmin/index.218451cf.js +289 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +4 -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/{index.359c2b18.js → AreasViewer/index.51ee3d38.js} +163 -197
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +3 -3
- package/components/areas/components/index.ae4cbf2e.js +14 -0
- package/components/areas/constants.66529246.js +6 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +6 -4
- package/components/areas/contexts/AreasContext/{index.de8b4e78.js → index.0b50676d.js} +102 -15
- package/components/areas/contexts/AreasContext/types.d.ts +8 -3
- package/components/areas/contexts/DynamicMFParmsContext/store.d.ts +1 -1
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +1 -1
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +2 -10
- package/components/areas/contexts/{index.771827bb.js → index.b0ce327e.js} +1 -1
- package/components/areas/contexts/index.d.ts +2 -1
- package/components/areas/dictionary.d.ts +2 -0
- package/components/areas/dictionary.e72db809.js +22 -0
- package/components/areas/hooks/index.0184c6f7.js +4 -0
- package/components/areas/hooks/{useArea/index.2adbe001.js → useAreas/index.e868e3d9.js} +1 -1
- package/components/areas/hooks/{index.ae8d8631.js → useWindowToolsMF/index.b7afaf88.js} +1 -3
- package/components/areas/icons.b36751f2.js +17 -0
- package/components/areas/icons.d.ts +2 -0
- package/components/areas/index.05b7b8e2.js +16 -0
- package/components/areas/types.d.ts +25 -3
- package/components/formatters/BooleanFormatter/{index.7eb0498c.js → index.e610de08.js} +1 -1
- package/components/formatters/{index.f6b9ed01.js → index.982e909b.js} +3 -2
- package/components/hook-form/RHFAutocomplete/{index.09c400c3.js → index.b185393e.js} +12 -11
- package/components/hook-form/RHFAutocompleteAsync/{index.e8acff04.js → index.7a569646.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index.70310f35.js → index.7a9ea396.js} +3 -3
- package/components/hook-form/RHFDateTime/{index.7b815072.js → index.2fd1d56b.js} +10 -10
- package/components/hook-form/RHFPeriod/{index.3c7d393c.js → index.df3d3f69.js} +2 -2
- package/components/hook-form/RHFTextField/{index.d4c39859.js → index.e1b50c30.js} +7 -6
- package/components/hook-form/RHFUpload/{index.31044674.js → index.ec977af6.js} +1 -1
- package/components/modal/{WindowBase.6a40a945.js → WindowBase.e5ec6128.js} +11 -11
- package/components/modal/{WindowConfirm.e21763cb.js → WindowConfirm.b89712de.js} +17 -15
- package/components/modal/index.97752555.js +36 -0
- package/components/mui_extended/Accordion/{index.437bb3f8.js → index.d420b666.js} +2 -2
- package/components/mui_extended/Button/{index.f8ce9ccd.js → index.1cd0c4e4.js} +6 -4
- package/components/mui_extended/Button/types.d.ts +2 -0
- package/components/mui_extended/IconButton/{index.57824447.js → index.590049b4.js} +7 -3
- package/components/mui_extended/MenuActions/{index.37043326.js → index.f9eb6463.js} +3 -3
- package/components/mui_extended/Pager/{index.eeed3bd5.js → index.c058b933.js} +1 -1
- package/components/mui_extended/Popover/{index.226f247e.js → index.9f35d0eb.js} +1 -3
- package/components/mui_extended/Popover/types.d.ts +6 -2
- package/components/mui_extended/Typography/{index.b3c6e71c.js → index.1659d310.js} +1 -1
- package/components/mui_extended/index.ec312b5a.js +20 -0
- package/contexts/ModalContext/{index.8e3cd7a8.js → index.92e80136.js} +1 -1
- package/hooks/useModal/{index.d590f506.js → index.18a7cb8f.js} +1 -1
- package/index.js +88 -85
- package/package.json +3 -1
- package/{react-draggable.0d64c8b1.js → react-draggable.21aa9ee1.js} +1 -1
- package/{react-resizable.8307e056.js → react-resizable.e78d1cc8.js} +3 -3
- package/utils/{index.a2312a73.js → index.8608d16c.js} +1 -1
- package/{vendor.8edaef93.js → vendor.d194839d.js} +48 -47
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/styles.d.ts +0 -2
- package/components/areas/index.8a58bcbf.js +0 -50
- package/components/modal/index.438777d9.js +0 -34
- package/components/mui_extended/index.dacbb059.js +0 -19
|
@@ -1,81 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { r as react_resizable_css } from "../../../../react-resizable.e78d1cc8.js";
|
|
3
|
+
import { generateUtilityClasses, Skeleton, styled as styled$1, Typography as Typography$1, Dialog } from "@mui/material";
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.8608d16c.js";
|
|
6
|
+
import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
7
|
+
import React__default, { useMemo, useState, useRef, useCallback, useEffect } from "react";
|
|
8
|
+
import { WidthProvider, Responsive } from "react-grid-layout";
|
|
4
9
|
import { shallow } from "zustand/shallow";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
10
|
+
import { I as Icon } from "../../../Icon/index.9839297c.js";
|
|
11
|
+
import { m } from "framer-motion";
|
|
7
12
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
13
|
+
import "react-router-dom";
|
|
14
|
+
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
15
|
+
import "../../../animate/PropagateLoader/index.be5b02c3.js";
|
|
16
|
+
import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
17
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.590049b4.js";
|
|
10
18
|
import clsx from "clsx";
|
|
19
|
+
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender, useResizeObserver } from "@m4l/graphics";
|
|
20
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.e868e3d9.js";
|
|
21
|
+
import "../AreasAdmin/index.218451cf.js";
|
|
22
|
+
import { I as ICONS } from "../../icons.b36751f2.js";
|
|
23
|
+
import "../../../ScrollBar/index.bbe48f4d.js";
|
|
24
|
+
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, C as CONTAINER_PADDING_GRIDLAYOUT, T as THROTTLE_RESIZE_TIME } from "../../contexts/AreasContext/index.0b50676d.js";
|
|
25
|
+
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
11
26
|
import "zustand";
|
|
12
|
-
import {
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
27
|
+
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
28
|
+
import "react-hook-form";
|
|
29
|
+
import "../../../hook-form/RHFAutocomplete/index.b185393e.js";
|
|
30
|
+
import { I as Image } from "../../../Image/index.a88f6341.js";
|
|
31
|
+
import { T as Typography } from "../../../mui_extended/Typography/index.1659d310.js";
|
|
32
|
+
import "../../../mui_extended/Accordion/index.d420b666.js";
|
|
33
|
+
import "../../../mui_extended/Avatar/index.fe06afd7.js";
|
|
16
34
|
import "@mui/material/Button";
|
|
17
|
-
import { B as Button } from "
|
|
18
|
-
import { I as Image } from "../../Image/index.82a6cd46.js";
|
|
35
|
+
import { B as Button } from "../../../mui_extended/Button/index.1cd0c4e4.js";
|
|
19
36
|
import "@mui/lab";
|
|
20
|
-
import
|
|
21
|
-
import "
|
|
22
|
-
import
|
|
23
|
-
import "
|
|
24
|
-
import "
|
|
25
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
26
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.a2312a73.js";
|
|
27
|
-
import { styled } from "@mui/material/styles";
|
|
28
|
-
import { r as react_resizable_css } from "../../../react-resizable.8307e056.js";
|
|
29
|
-
import { WidthProvider, Responsive } from "react-grid-layout";
|
|
30
|
-
import { m } from "framer-motion";
|
|
31
|
-
import "../../animate/LoadingScreen/index.1d0c4307.js";
|
|
32
|
-
import "../../animate/PropagateLoader/index.be5b02c3.js";
|
|
33
|
-
import { W as WindowToolsMFProvider } from "../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
34
|
-
import { D as DynamicMFParmsProvider } from "../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
35
|
-
import "react-hook-form";
|
|
36
|
-
import "../../hook-form/RHFAutocomplete/index.09c400c3.js";
|
|
37
|
-
import "../../HelperText/index.a69e9509.js";
|
|
37
|
+
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
38
|
+
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.f9eb6463.js";
|
|
39
|
+
import "../../../mui_extended/Pager/index.c058b933.js";
|
|
40
|
+
import "../../../mui_extended/Tab/index.e0653a0a.js";
|
|
41
|
+
import "../../../HelperText/index.4c27bfc1.js";
|
|
38
42
|
import debounce from "lodash/debounce";
|
|
39
|
-
import "
|
|
40
|
-
import "
|
|
43
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.7a569646.js";
|
|
44
|
+
import "../../../hook-form/RHFCheckbox/index.7a9ea396.js";
|
|
41
45
|
import "@mui/x-date-pickers";
|
|
42
|
-
import "
|
|
43
|
-
import
|
|
44
|
-
import "
|
|
45
|
-
import "
|
|
46
|
-
import "
|
|
47
|
-
import "
|
|
48
|
-
import "
|
|
49
|
-
import
|
|
50
|
-
import "
|
|
51
|
-
import
|
|
52
|
-
import "
|
|
53
|
-
import "../../modal/WindowBase.6a40a945.js";
|
|
46
|
+
import "../../../hook-form/RHFDateTime/index.2fd1d56b.js";
|
|
47
|
+
import "../../../hook-form/RHFTextField/index.e1b50c30.js";
|
|
48
|
+
import "../../../hook-form/RHFPeriod/index.df3d3f69.js";
|
|
49
|
+
import "../../../Period/index.2ab4f2a1.js";
|
|
50
|
+
import "../../../CommonActions/components/Actions/index.e190561b.js";
|
|
51
|
+
import "../../../../contexts/ModalContext/index.92e80136.js";
|
|
52
|
+
import { c as cjs } from "../../../../react-draggable.21aa9ee1.js";
|
|
53
|
+
import "../../../ModalDialog/index.75ddf6de.js";
|
|
54
|
+
import { R as ResizeableWindow } from "../../../Resizeable/index.086ff29e.js";
|
|
55
|
+
import "../../../modal/WindowConfirm.b89712de.js";
|
|
56
|
+
import "../../../modal/WindowBase.e5ec6128.js";
|
|
54
57
|
import "lodash/isString";
|
|
55
58
|
import "react-dropzone";
|
|
56
|
-
import "
|
|
57
|
-
import "
|
|
59
|
+
import "../../../hook-form/RHFUpload/index.ec977af6.js";
|
|
60
|
+
import "../../../DataGrid/index.549bd646.js";
|
|
58
61
|
import "react-dnd";
|
|
59
62
|
import "react-dnd-html5-backend";
|
|
60
|
-
import "
|
|
61
|
-
import "../../ScrollBar/index.bbe48f4d.js";
|
|
63
|
+
import "../../../DynamicFilter/index.c1a3e2f1.js";
|
|
62
64
|
import "yup";
|
|
63
65
|
import "@hookform/resolvers/yup";
|
|
64
|
-
import "
|
|
65
|
-
import "
|
|
66
|
-
import "
|
|
67
|
-
import "
|
|
68
|
-
import "
|
|
69
|
-
import "
|
|
70
|
-
import "
|
|
71
|
-
import "
|
|
72
|
-
import "
|
|
73
|
-
import "
|
|
74
|
-
import "
|
|
75
|
-
import "
|
|
76
|
-
import { D as DraggableWindow } from "
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
66
|
+
import "../../../../contexts/RHFormContext/index.a7511399.js";
|
|
67
|
+
import "../../../LanguagePopover/index.84c51cd3.js";
|
|
68
|
+
import "../../../NavLink/index.e88494ef.js";
|
|
69
|
+
import "../../../NoItemSelected/index.c3b67da1.js";
|
|
70
|
+
import "../../../ObjectLogs/index.88bcf75a.js";
|
|
71
|
+
import "../../../../react-json-view.57125fcf.js";
|
|
72
|
+
import "../../../PaperForm/index.b141d583.js";
|
|
73
|
+
import "../../../Page/index.4237c241.js";
|
|
74
|
+
import "../../../PropertyValue/index.dfcfe1ba.js";
|
|
75
|
+
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
76
|
+
import "../../../SplitLayout/index.5a8355d8.js";
|
|
77
|
+
import "../../../SideBar/index.90137dc5.js";
|
|
78
|
+
import { D as DraggableWindow } from "../../../../vendor.d194839d.js";
|
|
79
|
+
import { g as getAreasDictionary } from "../../dictionary.e72db809.js";
|
|
80
|
+
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
81
|
+
import { v as varBounce } from "../../../animate/variants/bounce.784aaaaa.js";
|
|
79
82
|
import { throttle } from "lodash";
|
|
80
83
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
81
84
|
"root",
|
|
@@ -90,9 +93,11 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
|
90
93
|
"windowContent",
|
|
91
94
|
"windowPopupRoot",
|
|
92
95
|
"windowModalRoot",
|
|
96
|
+
"windowRootContainer",
|
|
93
97
|
"panelWindowsRoot",
|
|
94
98
|
"panelWindowsButtonContainer",
|
|
95
99
|
"selected",
|
|
100
|
+
"selectedWindow",
|
|
96
101
|
"isMobile",
|
|
97
102
|
"loading"
|
|
98
103
|
], AREAS_VIEWER_CLASS_NAME);
|
|
@@ -104,141 +109,19 @@ const useAreasViewerUtilityClasses = (ownerState) => {
|
|
|
104
109
|
areaGridLayout: ["areaGridLayout"],
|
|
105
110
|
areaGridLayoutPopupsContainer: ["areaGridLayoutPopupsContainer"],
|
|
106
111
|
windowRoot: ["windowRoot"],
|
|
112
|
+
windowRootContainer: ["windowRootContainer"],
|
|
107
113
|
windowHeader: ["windowHeader"],
|
|
108
114
|
windowHeaderTitle: ["windowHeaderTitle"],
|
|
109
115
|
windowHeaderMainActions: ["windowHeaderMainActions"],
|
|
110
116
|
windowContent: ["windowContent"],
|
|
111
117
|
windowPopupRoot: ["windowPopupRoot"],
|
|
112
118
|
windowModalRoot: ["windowModalRoot"],
|
|
119
|
+
selectedWindow: ["selectedWindow"],
|
|
113
120
|
panelWindowsRoot: ["panelWindowsRoot"],
|
|
114
121
|
panelWindowsButtonContainer: ["panelWindowsButtonContainer"]
|
|
115
122
|
};
|
|
116
123
|
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_VIEWER_CLASS_NAME), {});
|
|
117
124
|
};
|
|
118
|
-
const areasAdminClasses = generateUtilityClasses(AREAS_ADMIN_CLASS_NAME, [
|
|
119
|
-
"root",
|
|
120
|
-
"areaChipRoot",
|
|
121
|
-
"areaChipTitle",
|
|
122
|
-
"areaChipDeleteButton",
|
|
123
|
-
"areaChipEditButton",
|
|
124
|
-
"areasAddButton",
|
|
125
|
-
"areaContainerChips",
|
|
126
|
-
"areaIconLayer",
|
|
127
|
-
"selected",
|
|
128
|
-
"isMobile",
|
|
129
|
-
"disabled"
|
|
130
|
-
], AREAS_ADMIN_CLASS_NAME);
|
|
131
|
-
const useAreasAdminUtilityClasses = (ownerState) => {
|
|
132
|
-
const slots = {
|
|
133
|
-
root: ["root", ownerState.status, ownerState.isMobile && "isMobile", ownerState.isSkeleton && "isSkeleton"],
|
|
134
|
-
areaChipRoot: ["areaChipRoot"],
|
|
135
|
-
areaIconLayer: ["areaIconLayer"],
|
|
136
|
-
areaContainerChips: ["areaContainerChips"],
|
|
137
|
-
areaChipTitle: ["areaChipTitle"],
|
|
138
|
-
areaChipDeleteButton: ["areaChipDeleteButton"],
|
|
139
|
-
areaChipEditButton: ["areaChipEditButton"],
|
|
140
|
-
areasAddButton: ["areasAddButton"]
|
|
141
|
-
};
|
|
142
|
-
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
|
|
143
|
-
};
|
|
144
|
-
const AreaChip = (props) => {
|
|
145
|
-
const {
|
|
146
|
-
areaId,
|
|
147
|
-
selected,
|
|
148
|
-
areaName,
|
|
149
|
-
disabled
|
|
150
|
-
} = props;
|
|
151
|
-
const {
|
|
152
|
-
host_static_assets,
|
|
153
|
-
environment_assets
|
|
154
|
-
} = useEnvironment();
|
|
155
|
-
const {
|
|
156
|
-
deleteArea,
|
|
157
|
-
selectArea
|
|
158
|
-
} = useAreasStore((state) => state.areasActions);
|
|
159
|
-
const onClickDeleteArea = (e) => {
|
|
160
|
-
e.stopPropagation();
|
|
161
|
-
deleteArea(areaId);
|
|
162
|
-
};
|
|
163
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
164
|
-
role: "presentation",
|
|
165
|
-
className: clsx(areasAdminClasses.areaChipRoot, selected ? areasAdminClasses.selected : null, disabled ? areasAdminClasses.disabled : null),
|
|
166
|
-
onClick: () => {
|
|
167
|
-
selectArea(areaId);
|
|
168
|
-
},
|
|
169
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
170
|
-
className: areasAdminClasses.areaChipTitle,
|
|
171
|
-
children: areaName
|
|
172
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
173
|
-
className: areasAdminClasses.areaChipDeleteButton,
|
|
174
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
|
|
175
|
-
size: "small",
|
|
176
|
-
disabled,
|
|
177
|
-
onClick: onClickDeleteArea
|
|
178
|
-
})]
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
AreaChip.displayName = "AreaButtons";
|
|
182
|
-
const AreasAdminRoot = styled("div")`
|
|
183
|
-
display: flex;
|
|
184
|
-
position: relative;
|
|
185
|
-
|
|
186
|
-
//areaRoot
|
|
187
|
-
& .${areasAdminClasses.areaChipRoot} {
|
|
188
|
-
display: flex;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
& .${areasAdminClasses.areaChipRoot}.${areasAdminClasses.selected}::before {
|
|
192
|
-
content: "";
|
|
193
|
-
background-color: ${(props) => props.theme.palette.primary.main};
|
|
194
|
-
height: 100%;
|
|
195
|
-
width: 8px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
${(props) => props.theme.components?.M4LAreasAdmin?.styleOverrides}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
`;
|
|
202
|
-
function AreasAdmin() {
|
|
203
|
-
const areas = useAreasStore((state) => state.areas, shallow);
|
|
204
|
-
const currentArea = useAreasStore((state) => state.currentAreaId, shallow);
|
|
205
|
-
const status = useAreasStore((state) => state.ownerState.status);
|
|
206
|
-
const classesRoot = useAreasStore((state) => state.adminClasses.root);
|
|
207
|
-
const areasLength = useAreasStore((state) => state.areas.length);
|
|
208
|
-
const {
|
|
209
|
-
addArea
|
|
210
|
-
} = useAreasStore((state) => state.areasActions, shallow);
|
|
211
|
-
const {
|
|
212
|
-
host_static_assets,
|
|
213
|
-
environment_assets
|
|
214
|
-
} = useEnvironment();
|
|
215
|
-
console.log("Render AreasAdmin", areas);
|
|
216
|
-
if (status !== "loaded") {
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
219
|
-
return /* @__PURE__ */ jsxs(AreasAdminRoot, {
|
|
220
|
-
className: classesRoot,
|
|
221
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
222
|
-
className: areasAdminClasses.areaIconLayer,
|
|
223
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
224
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`
|
|
225
|
-
})
|
|
226
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
227
|
-
className: areasAdminClasses.areaContainerChips,
|
|
228
|
-
children: areas.map((area) => /* @__PURE__ */ jsx(AreaChip, {
|
|
229
|
-
areaId: area.id,
|
|
230
|
-
selected: area.id === currentArea,
|
|
231
|
-
areaName: area.name,
|
|
232
|
-
disabled: areasLength === 1
|
|
233
|
-
}, area.id))
|
|
234
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
235
|
-
className: areasAdminClasses.areasAddButton,
|
|
236
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
237
|
-
size: "small",
|
|
238
|
-
onClick: addArea
|
|
239
|
-
})]
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
125
|
const AreasViewerRoot = styled("div")`
|
|
243
126
|
/* display: flex; */
|
|
244
127
|
width: 100%;
|
|
@@ -309,11 +192,72 @@ const AreasViewerRoot = styled("div")`
|
|
|
309
192
|
&.${areasViewerClasses.isMobile} .${areasViewerClasses.panelWindowsRoot} {
|
|
310
193
|
flex-direction: row;
|
|
311
194
|
}
|
|
312
|
-
& .${areasViewerClasses.panelWindowsButtonContainer}.${areasViewerClasses.selected} {
|
|
313
|
-
border: 1px solid red;
|
|
314
|
-
}
|
|
315
195
|
|
|
316
196
|
// windowRoot
|
|
197
|
+
& .${areasViewerClasses.windowRoot} {
|
|
198
|
+
inset:0;
|
|
199
|
+
position: absolute;
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
/* height: 100%; */
|
|
203
|
+
/* width: 100%; */
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
border: 1px solid gray;
|
|
206
|
+
|
|
207
|
+
background-color: ${(props) => props.theme.palette.background.default};
|
|
208
|
+
padding: ${(props) => props.theme.spacing(0)};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
& .${areasViewerClasses.windowRoot}.${areasViewerClasses.selected} {
|
|
212
|
+
border-top: 1px solid green;
|
|
213
|
+
}
|
|
214
|
+
// windowHeader
|
|
215
|
+
& .${areasViewerClasses.windowHeader} {
|
|
216
|
+
display: flex;
|
|
217
|
+
gap: 4px;
|
|
218
|
+
|
|
219
|
+
align-items: center;
|
|
220
|
+
position: relative;
|
|
221
|
+
|
|
222
|
+
padding: 8px;
|
|
223
|
+
justify-content: end;
|
|
224
|
+
min-height: ${(props) => props.theme.spacing(5)} ;
|
|
225
|
+
|
|
226
|
+
border-bottom: 1px solid ${(props) => props.theme.palette.divider};
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
cursor: move;
|
|
229
|
+
height: 60px;
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
> span: {
|
|
234
|
+
margin-right: 12px;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// windowHeaderTitle
|
|
238
|
+
& .${areasViewerClasses.windowHeaderTitle} {
|
|
239
|
+
width: 100%;
|
|
240
|
+
max-width: 100%;
|
|
241
|
+
overflow: hidden;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
color: ${(props) => props.theme.palette.text.primary};
|
|
244
|
+
margin-left: 12px;
|
|
245
|
+
margin-right: 24px;
|
|
246
|
+
text-overflow: ellipsis;
|
|
247
|
+
}
|
|
248
|
+
// windowHeaderMainActions
|
|
249
|
+
& .${areasViewerClasses.windowHeaderMainActions} {
|
|
250
|
+
display: flex;
|
|
251
|
+
|
|
252
|
+
gap: 4px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
// windowHeaderMainActions
|
|
257
|
+
& .${areasViewerClasses.windowContent} {
|
|
258
|
+
flex-grow: 1;
|
|
259
|
+
position: relative;
|
|
260
|
+
}
|
|
317
261
|
|
|
318
262
|
// windowModalRoot
|
|
319
263
|
& .${areasViewerClasses.windowModalRoot} {
|
|
@@ -774,7 +718,8 @@ function Header(props) {
|
|
|
774
718
|
}
|
|
775
719
|
const WrapperLinearProgress = styled$1("div")(() => ({
|
|
776
720
|
width: "70%",
|
|
777
|
-
margin: "auto auto"
|
|
721
|
+
margin: "auto auto",
|
|
722
|
+
position: "absolute"
|
|
778
723
|
}));
|
|
779
724
|
const WrapperFallBackNotFound = styled$1("div")(({
|
|
780
725
|
theme
|
|
@@ -1183,7 +1128,7 @@ const Window = (props) => {
|
|
|
1183
1128
|
}, []);
|
|
1184
1129
|
return /* @__PURE__ */ jsxs(WindowRoot, {
|
|
1185
1130
|
role: "presentation",
|
|
1186
|
-
className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.
|
|
1131
|
+
className: clsx(areasViewerClasses.windowRoot, selected ? areasViewerClasses.selectedWindow : null, wd.loading ? areasViewerClasses.loading : null),
|
|
1187
1132
|
onMouseDown: onTouch,
|
|
1188
1133
|
children: [/* @__PURE__ */ jsx(Header, {
|
|
1189
1134
|
areaId,
|
|
@@ -1214,6 +1159,10 @@ const WindowPopUp = (props) => {
|
|
|
1214
1159
|
windowProps,
|
|
1215
1160
|
windowId
|
|
1216
1161
|
} = props;
|
|
1162
|
+
const {
|
|
1163
|
+
host_static_assets,
|
|
1164
|
+
environment_assets
|
|
1165
|
+
} = useEnvironment();
|
|
1217
1166
|
const {
|
|
1218
1167
|
selectWindowPopUp
|
|
1219
1168
|
} = useAreasStore((store) => store.areaActions);
|
|
@@ -1240,6 +1189,13 @@ const WindowPopUp = (props) => {
|
|
|
1240
1189
|
onResizeStart: () => {
|
|
1241
1190
|
onTouch();
|
|
1242
1191
|
},
|
|
1192
|
+
handle: (resizeHandle, ref) => /* @__PURE__ */ jsx("div", {
|
|
1193
|
+
ref,
|
|
1194
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1195
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.RESIZE}`,
|
|
1196
|
+
className: `custom-handle custom-handle-${resizeHandle}`
|
|
1197
|
+
})
|
|
1198
|
+
}, resizeHandle),
|
|
1243
1199
|
children: /* @__PURE__ */ jsx(Window, {
|
|
1244
1200
|
...props
|
|
1245
1201
|
})
|
|
@@ -1439,6 +1395,10 @@ const WindowModal = (props) => {
|
|
|
1439
1395
|
const {
|
|
1440
1396
|
onClose
|
|
1441
1397
|
} = useAreasStore((state) => state.hashWindowsModals[windowId]);
|
|
1398
|
+
const {
|
|
1399
|
+
host_static_assets,
|
|
1400
|
+
environment_assets
|
|
1401
|
+
} = useEnvironment();
|
|
1442
1402
|
const isDesktop = useResponsiveDesktop();
|
|
1443
1403
|
const DragabblePaperComponent = (_props) => {
|
|
1444
1404
|
return /* @__PURE__ */ jsx(cjs.exports, {
|
|
@@ -1447,6 +1407,14 @@ const WindowModal = (props) => {
|
|
|
1447
1407
|
children: /* @__PURE__ */ jsx(ResizeableWindow, {
|
|
1448
1408
|
width: props.windowProps?.width || 400,
|
|
1449
1409
|
height: props.windowProps?.height || 300,
|
|
1410
|
+
className: areasViewerClasses.windowModalRoot,
|
|
1411
|
+
handle: (resizeHandle, ref) => /* @__PURE__ */ jsx("div", {
|
|
1412
|
+
ref,
|
|
1413
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
1414
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.RESIZE}`,
|
|
1415
|
+
className: `custom-handle custom-handle-${resizeHandle}`
|
|
1416
|
+
})
|
|
1417
|
+
}, resizeHandle),
|
|
1450
1418
|
children: /* @__PURE__ */ jsx(Window, {
|
|
1451
1419
|
...props
|
|
1452
1420
|
})
|
|
@@ -1506,9 +1474,7 @@ function AreasViewer() {
|
|
|
1506
1474
|
});
|
|
1507
1475
|
}
|
|
1508
1476
|
export {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
areasViewerClasses as b,
|
|
1512
|
-
AreasViewer as c,
|
|
1477
|
+
AreasViewer as A,
|
|
1478
|
+
areasViewerClasses as a,
|
|
1513
1479
|
useAreasViewerUtilityClasses as u
|
|
1514
1480
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getMainActions(isDesktop: boolean | undefined, moduleActions:
|
|
3
|
-
export declare function getMenuActions(windowId: string, isDesktop: boolean | undefined, moduleActions:
|
|
1
|
+
import { AreaWindowAction } from '../../../../../../../../types';
|
|
2
|
+
export declare function getMainActions(isDesktop: boolean | undefined, moduleActions: AreaWindowAction[]): AreaWindowAction[];
|
|
3
|
+
export declare function getMenuActions(windowId: string, isDesktop: boolean | undefined, moduleActions: AreaWindowAction[], urlPrefix: string, saveModuleCookies: (wd: string) => void, resetModuleCookies: (wd: string) => void, version?: string): AreaWindowAction[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@m4l/core";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "../../Icon/index.9839297c.js";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "../../mui_extended/IconButton/index.590049b4.js";
|
|
8
|
+
import "@m4l/graphics";
|
|
9
|
+
import "zustand";
|
|
10
|
+
import "../contexts/AreasContext/index.0b50676d.js";
|
|
11
|
+
import "./AreasAdmin/index.218451cf.js";
|
|
12
|
+
import "zustand/shallow";
|
|
13
|
+
import "../../ScrollBar/index.bbe48f4d.js";
|
|
14
|
+
import "./AreasViewer/index.51ee3d38.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
-
import { Layouts } from 'react-grid-layout';
|
|
3
|
-
import { Area, AreasStateWithActions } from './types';
|
|
4
|
-
import { WinLayout } from './types';
|
|
5
|
-
import { HashWindowsByLayouts } from '../../types';
|
|
2
|
+
import type { Layouts } from 'react-grid-layout';
|
|
3
|
+
import type { Area, AreasStateWithActions } from './types';
|
|
4
|
+
import type { WinLayout } from './types';
|
|
5
|
+
import type { HashWindowsByLayouts, WindowState, WindowStateProps } from '../../types';
|
|
6
6
|
export declare const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
7
7
|
export declare const CONTAINER_PADDING_GRIDLAYOUT = 3;
|
|
8
8
|
export declare const MARGIN_GRIDLAYOUT = 5;
|
|
@@ -31,6 +31,7 @@ export declare const MAXIMIZED_COLS: {
|
|
|
31
31
|
xs: number;
|
|
32
32
|
xxs: number;
|
|
33
33
|
};
|
|
34
|
+
export declare const DEFAULT_WINDOW: Pick<WindowState, 'status' | 'moduleActions' | 'cookies' | 'loading' | 'tosties' | 'toastyCount'>;
|
|
34
35
|
export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'loadWindows' | 'viewMode'>;
|
|
35
36
|
/**
|
|
36
37
|
* @description Función de apoyo que crea un área de trabajo,
|
|
@@ -57,3 +58,4 @@ export declare function getDataFromResponse(data: any, state: WritableDraft<Area
|
|
|
57
58
|
newHashWindowLayouts: HashWindowsByLayouts;
|
|
58
59
|
};
|
|
59
60
|
export declare function getCookiesContainer(data: any, containerId: string): Record<string, any>;
|
|
61
|
+
export declare const removeToasty: (state: WritableDraft<WindowStateProps>, toastyId: number) => void;
|