@m4l/components 0.1.50 → 0.1.52
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/components/CommonActions/components/ActionFormCancel/{index.bf4c99f9.js → index.bd0d16d6.js} +10 -11
- package/components/CommonActions/components/Actions/{index.274f0ce8.js → index.f0a3167b.js} +9 -9
- package/components/DataGrid/{index.01df4f26.js → index.85390177.js} +10 -10
- package/components/DynamicFilter/{index.c1022a6f.js → index.cddd7472.js} +13 -13
- package/components/ModalDialog/{index.1e2f7995.js → index.5a307e29.js} +2 -2
- package/components/ObjectLogs/{index.820d75ac.js → index.1315af37.js} +12 -12
- package/components/Period/{index.514252d6.js → index.85fe764a.js} +10 -10
- package/components/areas/components/Area/subcomponents/InnerForHooks/index.d.ts +2 -0
- package/components/areas/components/Area/types.d.ts +4 -2
- package/components/areas/components/AreasAdmin/{index.c6ccc79c.js → index.dbab59f1.js} +1 -3
- package/components/areas/components/AreasContainer/{index.a4393459.js → index.f3f921b9.js} +2 -7
- package/components/areas/components/GridLayout/index.9953146d.js +103 -0
- package/components/areas/components/Window/{index.ac629c20.js → index.e34225ae.js} +223 -36
- package/components/areas/components/WindowModal/index.d.ts +4 -0
- package/components/areas/components/WindowPopUp/{index.ba674a09.js → index.90eb0348.js} +18 -19
- package/components/areas/components/WindowsPanel/index.d.ts +2 -0
- package/components/areas/components/index.6d863764.js +77 -0
- package/components/areas/contexts/AreaContext/helper.d.ts +27 -0
- package/components/areas/contexts/AreaContext/index.d.ts +18 -4
- package/components/areas/contexts/AreaContext/{index.282b9a30.js → index.f25f7180.js} +181 -66
- package/components/areas/contexts/AreaContext/store.d.ts +23 -3
- package/components/areas/contexts/AreasContext/{index.cbfa4a53.js → index.7406c20f.js} +7 -14
- package/components/areas/contexts/AreasContext/store.d.ts +2 -2
- package/components/areas/contexts/{index.ea2185f5.js → index.e80d8f0f.js} +10 -15
- package/components/areas/hooks/{index.98cf18fc.js → index.0fd57f88.js} +1 -1
- package/components/areas/hooks/useArea/{index.868089ed.js → index.7bdbbb79.js} +8 -8
- package/components/areas/hooks/useArea/index.d.ts +9 -1
- package/components/areas/{index.d1ebea1b.js → index.6f09d168.js} +5 -5
- package/components/hook-form/RHFPeriod/{index.72f32f9b.js → index.5d2a2071.js} +1 -1
- package/components/hook-form/RHFTextField/{index.57f138f7.js → index.bef7eced.js} +0 -1
- package/components/index.d.ts +0 -1
- package/components/modal/ModalDialog/types.d.ts +2 -1
- package/components/modal/{WindowBase.9f5db87e.js → WindowBase.b5e29758.js} +1 -1
- package/components/modal/{WindowConfirm.d5026cb4.js → WindowConfirm.cbc7720c.js} +9 -9
- package/components/modal/{index.a568e1f0.js → index.f6de895f.js} +10 -10
- package/contexts/ModalContext/{index.6a6bf90d.js → index.3d92d9f9.js} +1 -1
- package/hooks/useModal/{index.2097260d.js → index.4454145e.js} +1 -1
- package/index.js +29 -60
- package/package.json +5 -3
- package/components/CmpDisenoTest/index.d.ts +0 -4
- package/components/CmpDisenoTest/types.d.ts +0 -20
- package/components/CommonActions/components/Actions/styles.d.ts +0 -2
- package/components/DataGrid/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/styles.d.ts +0 -4
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -8
- package/components/DataGrid/subcomponents/Table/styles.d.ts +0 -3
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -2
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -6
- package/components/DynamicFilter/styles.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/ApplyedFilters/components/ApplyedFilter/styles.d.ts +0 -6
- package/components/DynamicFilter/subcomponents/ApplyedFilters/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/ClearFilters/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/FilterButton/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/InputFilter/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/PopupEditFilter/styles.d.ts +0 -7
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/styles.d.ts +0 -3
- package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/styles.d.ts +0 -3
- package/components/ErrorLabel/styles.d.ts +0 -2
- package/components/Icon/styles.d.ts +0 -4
- package/components/Image/styles.d.ts +0 -3
- package/components/Image/subcomponents/LazyLoadComponent/styles.d.ts +0 -2
- package/components/Image/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/LanguagePopover/styles.d.ts +0 -5
- package/components/NoItemSelected/styles.d.ts +0 -5
- package/components/ObjectLogs/components/DetailDialog/styles.d.ts +0 -3
- package/components/ObjectLogs/styles.d.ts +0 -4
- package/components/PaperForm/styles.d.ts +0 -7
- package/components/Period/styles.d.ts +0 -7
- package/components/PropertyValue/styles.d.ts +0 -6
- package/components/ResizeableWindow/styles.d.ts +0 -5
- package/components/SplitLayout/styles.d.ts +0 -4
- package/components/animate/LoadingScreen/styles.d.ts +0 -3
- package/components/animate/PropagateLoader/syles.d.ts +0 -2
- package/components/areas/components/Area/styles.d.ts +0 -2
- package/components/areas/components/AreasAdmin/styles.d.ts +0 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +0 -3
- package/components/areas/components/AreasContainer/styles.d.ts +0 -2
- package/components/areas/components/GridLayout/index.7a78196e.js +0 -102
- package/components/areas/components/GridLayout/styles.d.ts +0 -2
- package/components/areas/components/Window/styles.d.ts +0 -6
- package/components/areas/components/Window/subcomponents/InnerForHooks/styles.d.ts +0 -2
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/Header/styles.d.ts +0 -9
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/styles.d.ts +0 -2
- package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/styles.d.ts +0 -2
- package/components/areas/components/index.3c88ce04.js +0 -72
- package/components/hook-form/RHFAutocomplete/styles.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +0 -2
- package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/styles.d.ts +0 -3
- package/components/hook-form/RHFCheckbox/styles.d.ts +0 -14
- package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/hook-form/RHFPeriod/styles.d.ts +0 -2
- package/components/hook-form/RHFTextField/styles.d.ts +0 -3
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +0 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +0 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +0 -12
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/modal/ModalDialog/styles.d.ts +0 -9
- package/components/modal/WindowBase/styles.d.ts +0 -2
- package/components/modal/WindowBase/subcomponents/Header/styles.d.ts +0 -6
- package/components/modal/WindowConfirm/subcomponents/MessageIlustration/styles.d.ts +0 -6
- package/components/mui_extended/Accordion/styles.d.ts +0 -4
- package/components/mui_extended/Button/styles.d.ts +0 -13
- package/components/mui_extended/IconButton/styles.d.ts +0 -2
- package/components/mui_extended/ImageButton/styles.d.ts +0 -2
- package/components/mui_extended/LoadingButton/subcomponents/Skeleton/styles.d.ts +0 -2
- package/components/mui_extended/MenuActions/styles.d.ts +0 -30
- package/components/mui_extended/Pager/components/PagerActions/styles.d.ts +0 -2
- package/components/mui_extended/Pager/styles.d.ts +0 -6
- package/components/mui_extended/Popover/styles.d.ts +0 -1
- package/components/mui_extended/Popover/subcomponts/ArrowIcon/index.d.ts +0 -3
- package/components/mui_extended/Tab/styles.d.ts +0 -2
- package/components/mui_extended/Typography/styles.d.ts +0 -2
- package/contexts/RHFormContext/styles.d.ts +0 -2
|
@@ -1,38 +1,79 @@
|
|
|
1
1
|
import React__default, { useMemo, useState, useRef, useCallback, useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { I as Icon } from "../../../Icon/index.f6e8d810.js";
|
|
3
|
+
import { m } from "framer-motion";
|
|
4
|
+
import { Skeleton, Typography, styled as styled$1, Dialog, Paper } from "@mui/material";
|
|
5
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
6
|
import { styled } from "@mui/material/styles";
|
|
4
|
-
import
|
|
7
|
+
import "react-router-dom";
|
|
8
|
+
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
9
|
+
import "../../../animate/PropagateLoader/index.be5b02c3.js";
|
|
10
|
+
import "../index.6d863764.js";
|
|
11
|
+
import "../AreasAdmin/index.dbab59f1.js";
|
|
12
|
+
import { useEnvironment, useModuleSkeleton, useModuleDictionary, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
13
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.1318a283.js";
|
|
14
|
+
import "zustand";
|
|
15
|
+
import "../../contexts/AreasContext/index.7406c20f.js";
|
|
5
16
|
import { shallow } from "zustand/shallow";
|
|
17
|
+
import "../AreasContainer/index.f3f921b9.js";
|
|
18
|
+
import "react-grid-layout/css/styles.css";
|
|
19
|
+
import "../../../../react-resizable.bb58c8fc.js";
|
|
20
|
+
import { W as WindowToolsMFProvider, a as WindowMFProvider } from "../../contexts/index.e80d8f0f.js";
|
|
6
21
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.c19cb8cc.js";
|
|
7
|
-
import "../../../../contexts/ModalContext/index.6a6bf90d.js";
|
|
8
22
|
import "react-hook-form";
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { useEnvironment, useModuleSkeleton, useModuleDictionary, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
14
|
-
import { Skeleton, Typography, styled as styled$1 } from "@mui/material";
|
|
15
|
-
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
16
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.1318a283.js";
|
|
17
|
-
import { I as Icon } from "../../../Icon/index.f6e8d810.js";
|
|
23
|
+
import "../../../hook-form/RHFAutocomplete/index.74add0d0.js";
|
|
24
|
+
import { I as Image } from "../../../Image/index.aa24e982.js";
|
|
25
|
+
import debounce from "lodash/debounce";
|
|
26
|
+
import "../../../hook-form/RHFCheckbox/index.ca94a050.js";
|
|
18
27
|
import "../../../mui_extended/Accordion/index.1d513477.js";
|
|
19
28
|
import "../../../mui_extended/Avatar/index.fe06afd7.js";
|
|
20
|
-
import "
|
|
29
|
+
import "@mui/material/Button";
|
|
21
30
|
import { B as Button } from "../../../mui_extended/Button/index.8406ed5b.js";
|
|
22
|
-
import { I as Image } from "../../../Image/index.aa24e982.js";
|
|
23
31
|
import "@mui/lab";
|
|
24
|
-
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.1261168c.js";
|
|
25
32
|
import "../../../mui_extended/Popover/index.58c49cc0.js";
|
|
33
|
+
import { M as MenuActions } from "../../../mui_extended/MenuActions/index.1261168c.js";
|
|
26
34
|
import "../../../mui_extended/Pager/index.984aac44.js";
|
|
27
35
|
import "../../../mui_extended/Tab/index.e0653a0a.js";
|
|
28
36
|
import "../../../mui_extended/Typography/index.be3a279a.js";
|
|
29
|
-
import
|
|
30
|
-
import "@mui/
|
|
37
|
+
import "../../../ErrorLabel/index.78553a1e.js";
|
|
38
|
+
import "@mui/x-date-pickers";
|
|
39
|
+
import "../../../hook-form/RHFDateTime/index.7f1cbd85.js";
|
|
40
|
+
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
41
|
+
import "../../../hook-form/RHFTextField/index.bef7eced.js";
|
|
42
|
+
import "../../../hook-form/RHFPeriod/index.5d2a2071.js";
|
|
43
|
+
import "../../../Period/index.85fe764a.js";
|
|
44
|
+
import "../../../CommonActions/components/Actions/index.f0a3167b.js";
|
|
45
|
+
import "../../../../contexts/ModalContext/index.3d92d9f9.js";
|
|
46
|
+
import { c as cjs } from "../../../../react-draggable.0eef011c.js";
|
|
47
|
+
import "../../../ModalDialog/index.5a307e29.js";
|
|
48
|
+
import { R as ResizeableWindow } from "../../../Resizeable/index.8a442a8b.js";
|
|
49
|
+
import "../../../modal/WindowConfirm.cbc7720c.js";
|
|
50
|
+
import "../../../modal/WindowBase.b5e29758.js";
|
|
51
|
+
import "lodash/isString";
|
|
52
|
+
import "react-dropzone";
|
|
53
|
+
import "../../../hook-form/RHFUpload/index.7fdff30f.js";
|
|
54
|
+
import "../../../DataGrid/index.85390177.js";
|
|
55
|
+
import "react-dnd";
|
|
56
|
+
import "react-dnd-html5-backend";
|
|
57
|
+
import "../../../ScrollBar/index.39eeb2de.js";
|
|
58
|
+
import "../../../DynamicFilter/index.cddd7472.js";
|
|
59
|
+
import "clsx";
|
|
60
|
+
import "simplebar/dist/simplebar.min.css";
|
|
61
|
+
import "@hookform/resolvers/yup";
|
|
62
|
+
import "../../../../contexts/RHFormContext/index.828b60ad.js";
|
|
63
|
+
import "yup";
|
|
64
|
+
import "../../../LanguagePopover/index.5047b444.js";
|
|
65
|
+
import "../../../NoItemSelected/index.9636ec8a.js";
|
|
66
|
+
import "../../../ObjectLogs/index.1315af37.js";
|
|
67
|
+
import "../../../../react-json-view.57125fcf.js";
|
|
68
|
+
import "../../../PaperForm/index.0114aa9b.js";
|
|
69
|
+
import "../../../Page/index.4237c241.js";
|
|
70
|
+
import "../../../PropertyValue/index.dfcfe1ba.js";
|
|
71
|
+
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
72
|
+
import "../../../SplitLayout/index.5a8355d8.js";
|
|
73
|
+
import { a as useAreaStore } from "../../hooks/useArea/index.7bdbbb79.js";
|
|
74
|
+
import { a as useWindow, b as useWindowStore } from "../../hooks/index.0fd57f88.js";
|
|
31
75
|
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
32
|
-
import { m } from "framer-motion";
|
|
33
76
|
import { v as varBounce } from "../../../animate/variants/bounce.784aaaaa.js";
|
|
34
|
-
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
35
|
-
import "../../../animate/PropagateLoader/index.be5b02c3.js";
|
|
36
77
|
const WrapperWindow = styled("div", {
|
|
37
78
|
shouldForwardProp: (props) => props !== "selected"
|
|
38
79
|
})(({ theme, selected }) => ({
|
|
@@ -42,9 +83,9 @@ const WrapperWindow = styled("div", {
|
|
|
42
83
|
width: "100%",
|
|
43
84
|
overflow: "hidden",
|
|
44
85
|
border: "1px solid gray",
|
|
45
|
-
borderTop: selected ? "1px solid red" : "1px solid
|
|
86
|
+
borderTop: selected ? "1px solid red" : "1px solid gray",
|
|
46
87
|
backgroundColor: theme.palette.background.paper,
|
|
47
|
-
padding: theme.spacing(
|
|
88
|
+
padding: theme.spacing(0),
|
|
48
89
|
"&.m4l_selected": {
|
|
49
90
|
borderTop: "1px solid green"
|
|
50
91
|
}
|
|
@@ -264,7 +305,14 @@ function getMainActions(isDesktop, moduleActions) {
|
|
|
264
305
|
}
|
|
265
306
|
function Header() {
|
|
266
307
|
const [url_icon, title, moduleActions, onClose, container_id] = useWindowStore((state) => [state.url_icon, state.title, state.moduleActions, state.onClose, state.windowId], shallow);
|
|
267
|
-
const
|
|
308
|
+
const {
|
|
309
|
+
saveModuleCookies
|
|
310
|
+
} = useWindowStore((state) => state.internalActions);
|
|
311
|
+
const maximizedId = useAreaStore((state) => state.singleId);
|
|
312
|
+
const {
|
|
313
|
+
maximizeLayout,
|
|
314
|
+
normalizeLayouts
|
|
315
|
+
} = useAreaStore((state) => state.actions, shallow);
|
|
268
316
|
const {
|
|
269
317
|
host_static_assets,
|
|
270
318
|
environment_assets
|
|
@@ -278,6 +326,13 @@ function Header() {
|
|
|
278
326
|
const onCloseLocal = () => {
|
|
279
327
|
onClose && onClose(container_id);
|
|
280
328
|
};
|
|
329
|
+
const maxNormalize = () => {
|
|
330
|
+
if (maximizedId) {
|
|
331
|
+
normalizeLayouts();
|
|
332
|
+
} else {
|
|
333
|
+
maximizeLayout(container_id);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
281
336
|
if (isSkeleton) {
|
|
282
337
|
return /* @__PURE__ */ jsx(SKTModuleHeader, {});
|
|
283
338
|
}
|
|
@@ -330,6 +385,10 @@ function Header() {
|
|
|
330
385
|
onClick: onCloseLocal,
|
|
331
386
|
"aria-label": "click",
|
|
332
387
|
src: `${host_static_assets}/${environment_assets}/frontend/components/window/assets/icons/close.svg`
|
|
388
|
+
}), isDesktop && /* @__PURE__ */ jsx(Button, {
|
|
389
|
+
onClick: maxNormalize,
|
|
390
|
+
"aria-label": "click",
|
|
391
|
+
children: maximizedId ? "Norm" : "Max"
|
|
333
392
|
}), /* @__PURE__ */ jsx(Button, {
|
|
334
393
|
onClick: saveModuleCookies,
|
|
335
394
|
"aria-label": "click",
|
|
@@ -582,7 +641,6 @@ function MFLoader(props) {
|
|
|
582
641
|
cleanUp(dsScript);
|
|
583
642
|
};
|
|
584
643
|
}, [divScript]);
|
|
585
|
-
console.log("Render micro frontend", divScript.divContainerId, final_host);
|
|
586
644
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
587
645
|
children: [/* @__PURE__ */ jsx("div", {
|
|
588
646
|
id: divScript.divContainerId
|
|
@@ -614,12 +672,11 @@ const InnerForHooks = (props) => {
|
|
|
614
672
|
const {
|
|
615
673
|
winType
|
|
616
674
|
} = props;
|
|
617
|
-
const
|
|
618
|
-
if (
|
|
675
|
+
const status = useWindowStore((state) => state.status);
|
|
676
|
+
if (status !== "loaded") {
|
|
619
677
|
return null;
|
|
620
|
-
|
|
621
|
-
return /* @__PURE__ */ jsxs(
|
|
622
|
-
...props,
|
|
678
|
+
}
|
|
679
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
623
680
|
children: [/* @__PURE__ */ jsx(Header, {}), /* @__PURE__ */ jsx(WrapperContent, {
|
|
624
681
|
children: winType === "microfrontend" ? /* @__PURE__ */ jsx(MicroFrontend, {
|
|
625
682
|
...props.mfProps
|
|
@@ -629,7 +686,7 @@ const InnerForHooks = (props) => {
|
|
|
629
686
|
})]
|
|
630
687
|
});
|
|
631
688
|
};
|
|
632
|
-
|
|
689
|
+
React__default.memo(InnerForHooks);
|
|
633
690
|
const Window = (props) => {
|
|
634
691
|
const {
|
|
635
692
|
emergeType
|
|
@@ -640,27 +697,157 @@ const Window = (props) => {
|
|
|
640
697
|
selectWindowLayout
|
|
641
698
|
} = useAreaStore((state) => state.actions);
|
|
642
699
|
const onTouch = () => {
|
|
643
|
-
console.log("onTouch", props.windowId);
|
|
644
700
|
if (!selected) {
|
|
645
701
|
if (emergeType === "popup") {
|
|
646
702
|
selectWindowPopUp(props.windowId);
|
|
647
|
-
} else {
|
|
703
|
+
} else if (emergeType === "layout") {
|
|
648
704
|
selectWindowLayout(props.windowId);
|
|
649
705
|
}
|
|
650
706
|
}
|
|
651
707
|
};
|
|
652
|
-
console.log("Render Window", props.windowId, selected);
|
|
653
708
|
return /* @__PURE__ */ jsx(WrapperWindow, {
|
|
654
709
|
id: "WrapperWindow",
|
|
655
710
|
selected,
|
|
656
711
|
onMouseDown: onTouch,
|
|
657
|
-
children: /* @__PURE__ */ jsx(
|
|
658
|
-
...props
|
|
712
|
+
children: /* @__PURE__ */ jsx(WindowMFProvider, {
|
|
713
|
+
...props,
|
|
714
|
+
children: /* @__PURE__ */ jsx(InnerForHooks, {
|
|
715
|
+
...props
|
|
716
|
+
})
|
|
659
717
|
})
|
|
660
718
|
});
|
|
661
719
|
};
|
|
662
720
|
const MemonizedWindow = React__default.memo(Window);
|
|
721
|
+
const Container = styled("div")(({ theme }) => ({
|
|
722
|
+
display: "flex",
|
|
723
|
+
flexDirection: "column",
|
|
724
|
+
height: "100%",
|
|
725
|
+
overflow: "hidden",
|
|
726
|
+
padding: theme.spacing(3)
|
|
727
|
+
}));
|
|
728
|
+
const WrapperWindowModal = styled(Dialog)(() => ({
|
|
729
|
+
height: "100%",
|
|
730
|
+
"&.m4l_selected": {
|
|
731
|
+
borderTop: "1px solid green"
|
|
732
|
+
}
|
|
733
|
+
}));
|
|
734
|
+
const DragabblePaperComponent = (props) => {
|
|
735
|
+
return /* @__PURE__ */ jsx(cjs.exports, {
|
|
736
|
+
handle: ".m4l_draggable_handle",
|
|
737
|
+
cancel: '[class*="MuiDialogContent-root"]',
|
|
738
|
+
children: /* @__PURE__ */ jsx(Paper, {
|
|
739
|
+
sx: {
|
|
740
|
+
maxHeight: "unset",
|
|
741
|
+
maxWidth: "unset"
|
|
742
|
+
},
|
|
743
|
+
...props
|
|
744
|
+
})
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
function PaperComponent(props) {
|
|
748
|
+
return /* @__PURE__ */ jsx(Paper, {
|
|
749
|
+
sx: {
|
|
750
|
+
maxHeight: "unset",
|
|
751
|
+
maxWidth: "unset",
|
|
752
|
+
height: "100%"
|
|
753
|
+
},
|
|
754
|
+
...props
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
const WindowModal = (props) => {
|
|
758
|
+
const {
|
|
759
|
+
closeWindowModal
|
|
760
|
+
} = useAreaStore((state) => state.actions);
|
|
761
|
+
const isDesktop = useResponsiveDesktop();
|
|
762
|
+
const onClose = () => {
|
|
763
|
+
closeWindowModal();
|
|
764
|
+
};
|
|
765
|
+
const contentComnponent = /* @__PURE__ */ jsx(Container, {
|
|
766
|
+
id: "Container",
|
|
767
|
+
children: /* @__PURE__ */ jsx(Window, {
|
|
768
|
+
...props,
|
|
769
|
+
onClose
|
|
770
|
+
})
|
|
771
|
+
});
|
|
772
|
+
return /* @__PURE__ */ jsxs(WrapperWindowModal, {
|
|
773
|
+
open: true,
|
|
774
|
+
"aria-labelledby": "child-modal-title",
|
|
775
|
+
"aria-describedby": "child-modal-description",
|
|
776
|
+
PaperComponent: isDesktop ? DragabblePaperComponent : PaperComponent,
|
|
777
|
+
maxWidth: false,
|
|
778
|
+
fullWidth: !isDesktop,
|
|
779
|
+
fullScreen: false,
|
|
780
|
+
disableEnforceFocus: true,
|
|
781
|
+
children: [isDesktop && /* @__PURE__ */ jsx(
|
|
782
|
+
ResizeableWindow,
|
|
783
|
+
{
|
|
784
|
+
children: contentComnponent
|
|
785
|
+
}
|
|
786
|
+
), !isDesktop && contentComnponent]
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
|
+
const MemonizedWindowModal = React__default.memo(WindowModal);
|
|
790
|
+
const WrapperWindowsPanel = styled("div", {
|
|
791
|
+
shouldForwardProp: (props) => props !== "isDesktop"
|
|
792
|
+
})(({
|
|
793
|
+
isDesktop
|
|
794
|
+
}) => ({
|
|
795
|
+
display: "flex",
|
|
796
|
+
flexDirection: isDesktop ? "column" : "row",
|
|
797
|
+
height: isDesktop ? "40px" : "unset",
|
|
798
|
+
maxWidth: isDesktop ? "40px" : "unset",
|
|
799
|
+
flexGrow: "1",
|
|
800
|
+
position: "relative"
|
|
801
|
+
}));
|
|
802
|
+
const WrapperWindowPanel = styled("div", {
|
|
803
|
+
shouldForwardProp: (props) => props !== "selected"
|
|
804
|
+
})(({
|
|
805
|
+
selected
|
|
806
|
+
}) => ({
|
|
807
|
+
flexDirection: "column",
|
|
808
|
+
flexGrow: "1",
|
|
809
|
+
position: "relative",
|
|
810
|
+
width: "40px",
|
|
811
|
+
height: "40px",
|
|
812
|
+
border: selected ? "1px solid red" : "1px solid black"
|
|
813
|
+
}));
|
|
814
|
+
const WindowsPanel = () => {
|
|
815
|
+
const status = useAreaStore((state) => state.status);
|
|
816
|
+
const mode = useAreaStore((state) => state.viewMode);
|
|
817
|
+
const singleId = useAreaStore((state) => state.singleId);
|
|
818
|
+
const gridLayouts = useAreaStore((state) => state.gridLayouts, shallow);
|
|
819
|
+
const hashWindowsLayouts = useAreaStore((state) => state.hashWindowsLayouts, shallow);
|
|
820
|
+
const {
|
|
821
|
+
maximizeLayout
|
|
822
|
+
} = useAreaStore((state) => state.actions);
|
|
823
|
+
const isDesktop = useAreaStore((state) => state.isDesktop);
|
|
824
|
+
const onTouched = (layoutId) => {
|
|
825
|
+
maximizeLayout(layoutId);
|
|
826
|
+
};
|
|
827
|
+
if (status === "loaded") {
|
|
828
|
+
if (mode !== "single" || gridLayouts.length < 2) {
|
|
829
|
+
return null;
|
|
830
|
+
}
|
|
831
|
+
return /* @__PURE__ */ jsx(WrapperWindowsPanel, {
|
|
832
|
+
isDesktop,
|
|
833
|
+
children: gridLayouts.map((l) => {
|
|
834
|
+
return /* @__PURE__ */ jsx(WrapperWindowPanel, {
|
|
835
|
+
onClick: () => onTouched(l.i),
|
|
836
|
+
selected: singleId === l.i,
|
|
837
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
838
|
+
src: hashWindowsLayouts[l.i].url_icon,
|
|
839
|
+
size: "32px"
|
|
840
|
+
})
|
|
841
|
+
}, l.i);
|
|
842
|
+
})
|
|
843
|
+
});
|
|
844
|
+
} else {
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
};
|
|
663
848
|
export {
|
|
664
849
|
MemonizedWindow as M,
|
|
665
|
-
Window as W
|
|
850
|
+
Window as W,
|
|
851
|
+
MemonizedWindowModal as a,
|
|
852
|
+
WindowsPanel as b
|
|
666
853
|
};
|
|
@@ -7,17 +7,17 @@ import "@mui/material/styles";
|
|
|
7
7
|
import "react-router-dom";
|
|
8
8
|
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
9
9
|
import "../../../animate/PropagateLoader/index.be5b02c3.js";
|
|
10
|
-
import "../index.
|
|
11
|
-
import "../AreasAdmin/index.
|
|
10
|
+
import "../index.6d863764.js";
|
|
11
|
+
import "../AreasAdmin/index.dbab59f1.js";
|
|
12
12
|
import "@m4l/core";
|
|
13
13
|
import "../../../mui_extended/IconButton/index.1318a283.js";
|
|
14
14
|
import "zustand";
|
|
15
|
-
import "../../contexts/AreasContext/index.
|
|
15
|
+
import "../../contexts/AreasContext/index.7406c20f.js";
|
|
16
16
|
import "zustand/shallow";
|
|
17
|
-
import "../AreasContainer/index.
|
|
17
|
+
import "../AreasContainer/index.f3f921b9.js";
|
|
18
18
|
import "react-grid-layout/css/styles.css";
|
|
19
19
|
import "../../../../react-resizable.bb58c8fc.js";
|
|
20
|
-
import "../../contexts/index.
|
|
20
|
+
import "../../contexts/index.e80d8f0f.js";
|
|
21
21
|
import "../../contexts/DynamicMFParmsContext/index.c19cb8cc.js";
|
|
22
22
|
import "react-hook-form";
|
|
23
23
|
import "../../../hook-form/RHFAutocomplete/index.74add0d0.js";
|
|
@@ -38,42 +38,41 @@ import "../../../ErrorLabel/index.78553a1e.js";
|
|
|
38
38
|
import "@mui/x-date-pickers";
|
|
39
39
|
import "../../../hook-form/RHFDateTime/index.7f1cbd85.js";
|
|
40
40
|
import "@m4l/graphics";
|
|
41
|
-
import "../../../hook-form/RHFTextField/index.
|
|
42
|
-
import "../../../hook-form/RHFPeriod/index.
|
|
43
|
-
import "../../../Period/index.
|
|
44
|
-
import "../../../CommonActions/components/Actions/index.
|
|
45
|
-
import "../../../../contexts/ModalContext/index.
|
|
41
|
+
import "../../../hook-form/RHFTextField/index.bef7eced.js";
|
|
42
|
+
import "../../../hook-form/RHFPeriod/index.5d2a2071.js";
|
|
43
|
+
import "../../../Period/index.85fe764a.js";
|
|
44
|
+
import "../../../CommonActions/components/Actions/index.f0a3167b.js";
|
|
45
|
+
import "../../../../contexts/ModalContext/index.3d92d9f9.js";
|
|
46
46
|
import "../../../../react-draggable.0eef011c.js";
|
|
47
|
-
import "../../../ModalDialog/index.
|
|
47
|
+
import "../../../ModalDialog/index.5a307e29.js";
|
|
48
48
|
import { R as ResizeableWindow } from "../../../Resizeable/index.8a442a8b.js";
|
|
49
|
-
import "../../../modal/WindowConfirm.
|
|
50
|
-
import "../../../modal/WindowBase.
|
|
49
|
+
import "../../../modal/WindowConfirm.cbc7720c.js";
|
|
50
|
+
import "../../../modal/WindowBase.b5e29758.js";
|
|
51
51
|
import "lodash/isString";
|
|
52
52
|
import "react-dropzone";
|
|
53
53
|
import "../../../hook-form/RHFUpload/index.7fdff30f.js";
|
|
54
|
-
import "../../../DataGrid/index.
|
|
54
|
+
import "../../../DataGrid/index.85390177.js";
|
|
55
55
|
import "react-dnd";
|
|
56
56
|
import "react-dnd-html5-backend";
|
|
57
57
|
import "../../../ScrollBar/index.39eeb2de.js";
|
|
58
|
-
import "../../../DynamicFilter/index.
|
|
58
|
+
import "../../../DynamicFilter/index.cddd7472.js";
|
|
59
59
|
import "clsx";
|
|
60
60
|
import "simplebar/dist/simplebar.min.css";
|
|
61
61
|
import "@hookform/resolvers/yup";
|
|
62
62
|
import "../../../../contexts/RHFormContext/index.828b60ad.js";
|
|
63
63
|
import "yup";
|
|
64
64
|
import { DraggableWindow } from "../../../../index.js";
|
|
65
|
-
import "@mui/base";
|
|
66
65
|
import "../../../LanguagePopover/index.5047b444.js";
|
|
67
66
|
import "../../../NoItemSelected/index.9636ec8a.js";
|
|
68
|
-
import "../../../ObjectLogs/index.
|
|
67
|
+
import "../../../ObjectLogs/index.1315af37.js";
|
|
69
68
|
import "../../../../react-json-view.57125fcf.js";
|
|
70
69
|
import "../../../PaperForm/index.0114aa9b.js";
|
|
71
70
|
import "../../../Page/index.4237c241.js";
|
|
72
71
|
import "../../../PropertyValue/index.dfcfe1ba.js";
|
|
73
72
|
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
74
73
|
import "../../../SplitLayout/index.5a8355d8.js";
|
|
75
|
-
import { a as useAreaStore } from "../../hooks/useArea/index.
|
|
76
|
-
import { W as Window } from "../Window/index.
|
|
74
|
+
import { a as useAreaStore } from "../../hooks/useArea/index.7bdbbb79.js";
|
|
75
|
+
import { W as Window } from "../Window/index.e34225ae.js";
|
|
77
76
|
const WindowPopUp = (props) => {
|
|
78
77
|
const {
|
|
79
78
|
windowProps,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { A as AreaProvider } from "../contexts/AreaContext/index.f25f7180.js";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { G as GridLayout } from "./GridLayout/index.9953146d.js";
|
|
4
|
+
import { a as useAreaStore } from "../hooks/useArea/index.7bdbbb79.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { b as WindowsPanel } from "./Window/index.e34225ae.js";
|
|
7
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
8
|
+
import "./AreasAdmin/index.dbab59f1.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import "@m4l/core";
|
|
11
|
+
import "@mui/material";
|
|
12
|
+
import "../../Icon/index.f6e8d810.js";
|
|
13
|
+
import "../../mui_extended/IconButton/index.1318a283.js";
|
|
14
|
+
import "zustand";
|
|
15
|
+
import "../contexts/AreasContext/index.7406c20f.js";
|
|
16
|
+
import "zustand/shallow";
|
|
17
|
+
import "./AreasContainer/index.f3f921b9.js";
|
|
18
|
+
import "react-grid-layout/css/styles.css";
|
|
19
|
+
import "../../../react-resizable.bb58c8fc.js";
|
|
20
|
+
const WrapperArea = styled("div", {
|
|
21
|
+
shouldForwardProp: (props) => props !== "isDesktop"
|
|
22
|
+
})(({
|
|
23
|
+
isDesktop
|
|
24
|
+
}) => ({
|
|
25
|
+
flexDirection: isDesktop ? "row" : "column-reverse",
|
|
26
|
+
flexGrow: "1",
|
|
27
|
+
position: "absolute",
|
|
28
|
+
height: "100%",
|
|
29
|
+
width: "100%",
|
|
30
|
+
overflow: "hiden",
|
|
31
|
+
justifyContent: "top",
|
|
32
|
+
alignItems: "flex-start",
|
|
33
|
+
visibility: "hidden",
|
|
34
|
+
display: "none",
|
|
35
|
+
hola: "juan",
|
|
36
|
+
"&.active": {
|
|
37
|
+
display: "flex",
|
|
38
|
+
visibility: "visible"
|
|
39
|
+
},
|
|
40
|
+
"& .M4L_GridLayout": {
|
|
41
|
+
minWidth: "100%",
|
|
42
|
+
minHeight: "100%",
|
|
43
|
+
juan: 1
|
|
44
|
+
},
|
|
45
|
+
"& .selected": {
|
|
46
|
+
borderTop: "1px solid green"
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
const InnerForHooks = () => {
|
|
50
|
+
const status = useAreaStore((state) => state.status);
|
|
51
|
+
if (status === "loaded") {
|
|
52
|
+
return /* @__PURE__ */ jsx(GridLayout, {});
|
|
53
|
+
} else {
|
|
54
|
+
return /* @__PURE__ */ jsx("div", {
|
|
55
|
+
children: "Loading.. Intentar si falla."
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const Area = (props) => {
|
|
60
|
+
const {
|
|
61
|
+
id,
|
|
62
|
+
active
|
|
63
|
+
} = props;
|
|
64
|
+
const isDesktop = useResponsiveDesktop();
|
|
65
|
+
return /* @__PURE__ */ jsx(WrapperArea, {
|
|
66
|
+
className: `M4L_Area_wrapper_${id} ${active ? "active" : ""}`,
|
|
67
|
+
isDesktop: !!isDesktop,
|
|
68
|
+
children: /* @__PURE__ */ jsxs(AreaProvider, {
|
|
69
|
+
...props,
|
|
70
|
+
children: [/* @__PURE__ */ jsx(InnerForHooks, {}), /* @__PURE__ */ jsx(WindowsPanel, {})]
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
Area.displayName = "Area";
|
|
75
|
+
export {
|
|
76
|
+
Area as A
|
|
77
|
+
};
|
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
+
import { Layouts } from 'react-grid-layout';
|
|
2
3
|
import { HashWindowsByLayouts } from '../../components/Area/types';
|
|
3
4
|
import { AreaStateWithActions } from './store';
|
|
5
|
+
import { WinLayout } from './types';
|
|
6
|
+
export declare const ROW_HEIGTH_GRIDLAYOUT = 100;
|
|
7
|
+
export declare const CONTAINER_PADDING_GRIDLAYOUT = 3;
|
|
4
8
|
export declare const DEBOUCED_SAVE_TIME = 500;
|
|
5
9
|
export declare const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
|
|
6
10
|
export declare const COOKIE_WINDOWS = "windows";
|
|
11
|
+
export declare const NORMALIZED_BREAKPOINTS: {
|
|
12
|
+
lg: number;
|
|
13
|
+
md: number;
|
|
14
|
+
sm: number;
|
|
15
|
+
xs: number;
|
|
16
|
+
xxs: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const NORMALIZED_COLS: {
|
|
19
|
+
lg: number;
|
|
20
|
+
md: number;
|
|
21
|
+
sm: number;
|
|
22
|
+
xs: number;
|
|
23
|
+
xxs: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const MAXIMIZED_COLS: {
|
|
26
|
+
lg: number;
|
|
27
|
+
md: number;
|
|
28
|
+
sm: number;
|
|
29
|
+
xs: number;
|
|
30
|
+
xxs: number;
|
|
31
|
+
};
|
|
7
32
|
export declare const getParmsFromValue: (key: string, data: []) => any;
|
|
33
|
+
export declare function setAddBreakPoints(state: WritableDraft<AreaStateWithActions>, newLayout: WinLayout): Layouts;
|
|
34
|
+
export declare function setBreakPointsMaximized(state: WritableDraft<AreaStateWithActions>, layoutId?: string): Layouts;
|
|
8
35
|
export declare function getDataFromResponse(data: any, state: WritableDraft<AreaStateWithActions>): {
|
|
9
36
|
newBreakPointsLayouts: any;
|
|
10
37
|
newGridLayouts: any[];
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const AreaContext: React.Context<
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { AreaProviderProps } from './types';
|
|
3
|
+
declare const AreaContext: React.Context<(Omit<Omit<import("zustand").StoreApi<import("./store").AreaStateWithActions>, "setState"> & {
|
|
4
|
+
setState<A extends string | {
|
|
5
|
+
type: unknown;
|
|
6
|
+
}>(partial: import("./store").AreaStateWithActions | Partial<import("./store").AreaStateWithActions> | ((state: import("./store").AreaStateWithActions) => import("./store").AreaStateWithActions | Partial<import("./store").AreaStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
7
|
+
}, "setState"> & {
|
|
8
|
+
setState(nextStateOrUpdater: import("./store").AreaStateWithActions | Partial<import("./store").AreaStateWithActions> | ((state: import("immer/dist/internal").WritableDraft<import("./store").AreaStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
9
|
+
type: unknown;
|
|
10
|
+
} | undefined): void;
|
|
11
|
+
}) | null>;
|
|
12
|
+
declare const AreaProvider: {
|
|
13
|
+
(props: AreaProviderProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const MemonizedAreaProvider: React.MemoExoticComponent<{
|
|
17
|
+
(props: AreaProviderProps): JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
}>;
|
|
6
20
|
export { AreaProvider, AreaContext, MemonizedAreaProvider };
|