@m4l/components 0.1.83 → 0.1.85
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 +25 -4
- package/components/AccountPopover/classes/index.d.ts +4 -0
- package/components/AccountPopover/classes/types.d.ts +4 -0
- package/components/AccountPopover/dictionary.d.ts +1 -0
- package/components/AccountPopover/{index.2677fe77.js → index.35c29a55.js} +86 -36
- package/components/AccountPopover/index.d.ts +1 -0
- package/components/AccountPopover/types.d.ts +2 -0
- package/components/AppBar/dictionary.d.ts +1 -0
- package/components/AppBar/{index.ad2a6f0e.js → index.291da9fd.js} +19 -11
- package/components/AppBar/index.d.ts +1 -0
- package/components/CommonActions/components/ActionCancel/{index.b2fc495d.js → index.67b91376.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.60d8963e.js → index.d4503410.js} +17 -16
- package/components/CommonActions/components/ActionFormIntro/{index.fde4ea51.js → index.01ed67de.js} +1 -1
- package/components/CommonActions/components/ActionIntro/{index.724d8e17.js → index.53e7fe2b.js} +1 -1
- package/components/CommonActions/components/Actions/{index.23a2d6ae.js → index.c91c27f9.js} +15 -14
- package/components/DataGrid/{index.d5d0d62f.js → index.37e14e83.js} +14 -12
- package/components/DataGrid/subcomponents/Actions/{index.201394f5.js → index.155c63af.js} +47 -31
- package/components/DynamicFilter/{index.7d134537.js → index.a8c2609c.js} +29 -28
- package/components/GridLayout/constants.d.ts +1 -1
- package/components/GridLayout/{index.70085b00.js → index.2383aaf9.js} +86 -23
- package/components/GridLayout/index.d.ts +1 -1
- package/components/GridLayout/subcomponents/Griditem/{index.c09681ff.js → index.58168132.js} +1 -6
- package/components/GridLayout/subcomponents/Responsive/{index.eb04fd5e.js → index.a6642437.js} +1 -2
- package/components/GridLayout/types.d.ts +2 -2
- package/components/HelperText/{index.28e9105d.js → index.8b5911d1.js} +9 -8
- package/components/Icon/{index.2414ff25.js → index.c3a579e7.js} +1 -1
- package/components/LanguagePopover/{index.065e0296.js → index.7681b08e.js} +9 -8
- package/components/ModalDialog/{index.fb148f76.js → index.b85ee3cb.js} +4 -6
- package/components/NavLink/{index.2ef07c44.js → index.bb879650.js} +9 -8
- package/components/NoItemSelected/classes/constants.d.ts +1 -0
- package/components/NoItemSelected/classes/index.d.ts +6 -0
- package/components/NoItemSelected/classes/types.d.ts +6 -0
- package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
- package/components/NoItemSelected/index.d.ts +2 -1
- package/components/NoItemSelected/types.d.ts +4 -0
- package/components/ObjectLogs/{index.5d74dfe0.js → index.2ed38a84.js} +22 -19
- package/components/PaperForm/{index.f931dc02.js → index.989377a5.js} +1 -1
- package/components/Period/{index.0e6512b2.js → index.061c9b2f.js} +16 -15
- package/components/PropertyValue/{index.a67c9916.js → index.ac46f441.js} +1 -1
- package/components/ScrollBar/{index.d4410cb5.js → index.1247c1c5.js} +38 -9
- package/components/SideBar/classes/index.d.ts +0 -1
- package/components/SideBar/classes/types.d.ts +0 -1
- package/components/SideBar/{index.72564ef2.js → index.e0587639.js} +131 -75
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
- package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/classes/types.d.ts +3 -0
- package/components/areas/components/AreasAdmin/index.d.ts +2 -2
- package/components/areas/components/AreasAdmin/index.f505897a.js +767 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +2 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +6 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +1 -0
- package/components/areas/components/AreasViewer/{index.9ed7dfd7.js → index.cacec884.js} +77 -52
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
- package/components/areas/components/index.6d5dfeec.js +31 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +10 -3
- package/components/areas/contexts/AreasContext/{index.36fe6953.js → index.6f56b1da.js} +103 -80
- package/components/areas/contexts/AreasContext/types.d.ts +28 -8
- package/components/areas/contexts/{index.68c53fc9.js → index.999e8b1e.js} +1 -1
- package/components/areas/hooks/useAreas/{index.a4c03e23.js → index.4baec91c.js} +1 -1
- package/components/areas/index.3088f99e.js +54 -0
- package/components/areas/utils/useOnClickOutside/index.d.ts +4 -0
- package/components/formatters/BooleanFormatter/{index.32de0803.js → index.e7f0b76a.js} +1 -1
- package/components/formatters/{index.d16d2331.js → index.d911949d.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.42df8eb4.js → index.aca6984f.js} +11 -9
- package/components/hook-form/RHFAutocompleteAsync/{index.0441524c.js → index.8511bcf8.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.c66147f7.js → index.0f45e6b0.js} +10 -9
- package/components/hook-form/RHFDateTime/{index.4698ca29.js → index.07412ef0.js} +10 -9
- package/components/hook-form/RHFPeriod/{index.f653934b.js → index.15b8f11e.js} +2 -2
- package/components/hook-form/RHFTextField/{index.1fa07688.js → index.94c8c59b.js} +3 -3
- package/components/hook-form/RHFUpload/{index.93c2dcb5.js → index.7ef1e124.js} +10 -9
- package/components/modal/{WindowBase.92ce9b8f.js → WindowBase.d485315d.js} +17 -12
- package/components/modal/{WindowConfirm.4c3d2cd7.js → WindowConfirm.3d9cd6e1.js} +18 -17
- package/components/modal/{index.1bd35bd5.js → index.c7e4beba.js} +15 -14
- package/components/mui_extended/Accordion/{index.5111314b.js → index.854f4c90.js} +3 -3
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
- package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +1 -1
- package/components/mui_extended/{CheckBox.5f6c78b0.js → CheckBox.38abccd8.js} +5 -3
- package/components/mui_extended/IconButton/{index.a318316e.js → index.be111a34.js} +2 -12
- package/components/mui_extended/MenuActions/{index.f6bfdd40.js → index.b16e84c1.js} +26 -8
- package/components/mui_extended/MenuActions/types.d.ts +3 -0
- package/components/mui_extended/Pager/{index.da26e9d4.js → index.5b77fa4c.js} +84 -82
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index.d.ts +5 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +1 -4
- package/components/mui_extended/Stack/Stack.d.ts +3 -0
- package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
- package/components/mui_extended/Stack/classes/index.d.ts +6 -0
- package/components/mui_extended/Stack/classes/types.d.ts +6 -0
- package/components/mui_extended/Stack/index.0e53197c.js +39 -0
- package/components/mui_extended/Stack/index.d.ts +2 -0
- package/components/mui_extended/Stack/types.d.ts +2 -0
- package/components/mui_extended/Tab/{index.0989d15d.js → index.c1dc7bbf.js} +42 -9
- package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
- package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
- package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
- package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
- package/components/mui_extended/Tabs/index.d.ts +1 -0
- package/components/mui_extended/index.d.ts +2 -0
- package/components/mui_extended/{index.813723c5.js → index.d1ee9a6a.js} +9 -8
- package/contexts/ModalContext/{index.577bf36b.js → index.1ea79d7e.js} +1 -1
- package/contexts/RHFormContext/{index.b9266262.js → index.e019f87d.js} +1 -1
- package/hooks/useModal/{index.7a07c208.js → index.c906706c.js} +1 -1
- package/index.js +81 -75
- package/package.json +1 -1
- package/{vendor.5365cc7e.js → vendor.f27b86c9.js} +51 -51
- package/components/GridLayout/subcomponents/SizeProvider/index.9c5e80b2.js +0 -65
- package/components/areas/components/AreasAdmin/index.7bfec13f.js +0 -487
- package/components/areas/components/index.654b08aa.js +0 -30
- package/components/areas/index.ec4f088c.js +0 -32
- /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/types.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AreasViewerClasses } from './types';
|
|
2
2
|
import { OwnerState } from '../../../contexts/AreasContext/types';
|
|
3
3
|
export declare const areasViewerClasses: AreasViewerClasses;
|
|
4
|
-
export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "windowLinearProgressBar" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowContent" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "windowToastiesContainer" | "windowToastiesContainerTostys" | "windowToastyMeesageButtonsContainer" | "windowToastyMessage" | "windowToastyButtonsContainer" | "windowToastyPin" | "windowToastyClose" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "windowToastyContainer", string>;
|
|
4
|
+
export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "resizeHandle" | "windowLinearProgressBar" | "areaRoot" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowRootContainer" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowContent" | "windowLinearProgressRoot" | "windowPopupRoot" | "windowModalRoot" | "selectedWindow" | "windowToastiesContainer" | "windowToastiesContainerTostys" | "windowToastyMeesageButtonsContainer" | "windowToastyMessage" | "windowToastyButtonsContainer" | "windowToastyPin" | "windowToastyClose" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "windowToastyContainer", string>;
|
|
5
5
|
export declare type ViwerClasses = ReturnType<typeof useAreasViewerUtilityClasses>;
|
|
@@ -13,26 +13,27 @@ import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
|
13
13
|
import { shallow } from "zustand/shallow";
|
|
14
14
|
import React__default, { useMemo, useState, useCallback, useEffect } from "react";
|
|
15
15
|
import clsx from "clsx";
|
|
16
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.
|
|
16
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.4baec91c.js";
|
|
17
17
|
import { useModuleDictionary, useEnvironment, useModuleSkeleton, useNetwork, useHostTools, axiosOperation } from "@m4l/core";
|
|
18
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
19
|
-
import "../../../mui_extended/Accordion/index.
|
|
20
|
-
import { I as Icon } from "../../../Icon/index.
|
|
18
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.be111a34.js";
|
|
19
|
+
import "../../../mui_extended/Accordion/index.854f4c90.js";
|
|
20
|
+
import { I as Icon } from "../../../Icon/index.c3a579e7.js";
|
|
21
21
|
import { T as Typography } from "../../../mui_extended/Typography/index.443590d6.js";
|
|
22
22
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
23
23
|
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
24
24
|
import "react-router-dom";
|
|
25
25
|
import "@mui/material/Button";
|
|
26
26
|
import { B as Button } from "../../../mui_extended/Button/index.40af964e.js";
|
|
27
|
-
import
|
|
28
|
-
import "../../../mui_extended/
|
|
29
|
-
import "../../../
|
|
30
|
-
import "../../../Image/index.c18ebf5a.js";
|
|
27
|
+
import "../../../mui_extended/CheckBox.38abccd8.js";
|
|
28
|
+
import "../../../mui_extended/Badge/index.8c2b8b66.js";
|
|
29
|
+
import { I as Image } from "../../../Image/index.c18ebf5a.js";
|
|
31
30
|
import "@mui/lab";
|
|
32
|
-
import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.
|
|
31
|
+
import { M as MenuActions, a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.b16e84c1.js";
|
|
33
32
|
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
34
|
-
import "../../../mui_extended/
|
|
35
|
-
import "../../../mui_extended/Tab/index.
|
|
33
|
+
import "../../../mui_extended/Stack/index.0e53197c.js";
|
|
34
|
+
import "../../../mui_extended/Tab/index.c1dc7bbf.js";
|
|
35
|
+
import "../../../mui_extended/Pager/index.5b77fa4c.js";
|
|
36
|
+
import { useResponsiveDesktop, useHostTheme, useFormatter, useLocales, useFirstRender } from "@m4l/graphics";
|
|
36
37
|
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
37
38
|
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
38
39
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
@@ -41,58 +42,57 @@ import debounce from "lodash/debounce";
|
|
|
41
42
|
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
42
43
|
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
43
44
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
44
|
-
import "../../../../contexts/ModalContext/index.
|
|
45
|
-
import "../../../../contexts/RHFormContext/index.
|
|
46
|
-
import "../../../GridLayout/subcomponents/Griditem/index.
|
|
47
|
-
import "../../../GridLayout/index.
|
|
48
|
-
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.
|
|
49
|
-
import {
|
|
50
|
-
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.36fe6953.js";
|
|
45
|
+
import "../../../../contexts/ModalContext/index.1ea79d7e.js";
|
|
46
|
+
import "../../../../contexts/RHFormContext/index.e019f87d.js";
|
|
47
|
+
import "../../../GridLayout/subcomponents/Griditem/index.58168132.js";
|
|
48
|
+
import { S as SizeProvider } from "../../../GridLayout/index.2383aaf9.js";
|
|
49
|
+
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.a6642437.js";
|
|
50
|
+
import { R as ROW_HEIGTH_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.6f56b1da.js";
|
|
51
51
|
import "../../../animate/index.4e9774a6.js";
|
|
52
52
|
import "framer-motion";
|
|
53
53
|
import "../../../animate/LoadingScreen/index.1d0c4307.js";
|
|
54
54
|
import "../../../animate/PropagateLoader/index.7fab43c8.js";
|
|
55
|
-
import "../AreasAdmin/index.
|
|
56
|
-
import "../../../ScrollBar/index.
|
|
55
|
+
import "../AreasAdmin/index.f505897a.js";
|
|
56
|
+
import "../../../ScrollBar/index.1247c1c5.js";
|
|
57
57
|
import "zustand";
|
|
58
58
|
import "react-hook-form";
|
|
59
|
-
import "../../../hook-form/RHFAutocomplete/index.
|
|
60
|
-
import "../../../HelperText/index.
|
|
61
|
-
import "../../../hook-form/RHFAutocompleteAsync/index.
|
|
62
|
-
import "../../../hook-form/RHFCheckbox/index.
|
|
59
|
+
import "../../../hook-form/RHFAutocomplete/index.aca6984f.js";
|
|
60
|
+
import "../../../HelperText/index.8b5911d1.js";
|
|
61
|
+
import "../../../hook-form/RHFAutocompleteAsync/index.8511bcf8.js";
|
|
62
|
+
import "../../../hook-form/RHFCheckbox/index.0f45e6b0.js";
|
|
63
63
|
import "@mui/x-date-pickers";
|
|
64
|
-
import "../../../hook-form/RHFDateTime/index.
|
|
65
|
-
import "../../../hook-form/RHFTextField/index.
|
|
66
|
-
import "../../../hook-form/RHFPeriod/index.
|
|
67
|
-
import "../../../Period/index.
|
|
68
|
-
import "../../../CommonActions/components/Actions/index.
|
|
64
|
+
import "../../../hook-form/RHFDateTime/index.07412ef0.js";
|
|
65
|
+
import "../../../hook-form/RHFTextField/index.94c8c59b.js";
|
|
66
|
+
import "../../../hook-form/RHFPeriod/index.15b8f11e.js";
|
|
67
|
+
import "../../../Period/index.061c9b2f.js";
|
|
68
|
+
import "../../../CommonActions/components/Actions/index.c91c27f9.js";
|
|
69
69
|
import { c as cjs } from "../../../../react-draggable.7abb5d0a.js";
|
|
70
70
|
import { R as ResizeableWindow } from "../../../Resizeable/index.9a9c79a4.js";
|
|
71
|
-
import "../../../modal/index.
|
|
71
|
+
import "../../../modal/index.c7e4beba.js";
|
|
72
72
|
import "lodash/isString";
|
|
73
73
|
import "react-dropzone";
|
|
74
|
-
import "../../../hook-form/RHFUpload/index.
|
|
75
|
-
import "../../../DataGrid/index.
|
|
74
|
+
import "../../../hook-form/RHFUpload/index.7ef1e124.js";
|
|
75
|
+
import "../../../DataGrid/index.37e14e83.js";
|
|
76
76
|
import "react-dnd";
|
|
77
77
|
import "react-dnd-html5-backend";
|
|
78
|
-
import "../../../DataGrid/subcomponents/Actions/index.
|
|
78
|
+
import "../../../DataGrid/subcomponents/Actions/index.155c63af.js";
|
|
79
79
|
import "../../../DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
|
|
80
|
-
import "../../../DynamicFilter/index.
|
|
80
|
+
import "../../../DynamicFilter/index.a8c2609c.js";
|
|
81
81
|
import "yup";
|
|
82
82
|
import "lodash";
|
|
83
|
-
import "../../../LanguagePopover/index.
|
|
84
|
-
import "../../../NavLink/index.
|
|
85
|
-
import "../../../NoItemSelected/index.
|
|
86
|
-
import "../../../ObjectLogs/index.
|
|
83
|
+
import "../../../LanguagePopover/index.7681b08e.js";
|
|
84
|
+
import "../../../NavLink/index.bb879650.js";
|
|
85
|
+
import "../../../NoItemSelected/index.a2807715.js";
|
|
86
|
+
import "../../../ObjectLogs/index.2ed38a84.js";
|
|
87
87
|
import "../../../../react-json-view.57125fcf.js";
|
|
88
|
-
import "../../../PaperForm/index.
|
|
88
|
+
import "../../../PaperForm/index.989377a5.js";
|
|
89
89
|
import "../../../Page/index.4237c241.js";
|
|
90
|
-
import "../../../PropertyValue/index.
|
|
90
|
+
import "../../../PropertyValue/index.ac46f441.js";
|
|
91
91
|
import "../../../SplitLayout/index.9ef430f6.js";
|
|
92
92
|
import "../../../../react-splitter-layout.8b1655c8.js";
|
|
93
|
-
import "../../../SideBar/index.
|
|
94
|
-
import "../../../AppBar/index.
|
|
95
|
-
import "../../../AccountPopover/index.
|
|
93
|
+
import "../../../SideBar/index.e0587639.js";
|
|
94
|
+
import "../../../AppBar/index.291da9fd.js";
|
|
95
|
+
import "../../../AccountPopover/index.35c29a55.js";
|
|
96
96
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
97
97
|
"root",
|
|
98
98
|
"areaRoot",
|
|
@@ -131,6 +131,7 @@ const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
|
131
131
|
"panelWindowsRoot",
|
|
132
132
|
"panelWindowsButtonContainer",
|
|
133
133
|
"containerLinearProgress",
|
|
134
|
+
"resizeHandle",
|
|
134
135
|
"selected",
|
|
135
136
|
"colapsed",
|
|
136
137
|
"selectedWindow",
|
|
@@ -178,7 +179,8 @@ const useAreasViewerUtilityClasses = (ownerState) => {
|
|
|
178
179
|
windowToastyPin: ["windowToastyPin"],
|
|
179
180
|
windowToastyClose: ["windowToastyClose"],
|
|
180
181
|
panelWindowsRoot: ["panelWindowsRoot"],
|
|
181
|
-
panelWindowsButtonContainer: ["panelWindowsButtonContainer"]
|
|
182
|
+
panelWindowsButtonContainer: ["panelWindowsButtonContainer"],
|
|
183
|
+
resizeHandle: ["resizeHandle"]
|
|
182
184
|
};
|
|
183
185
|
return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_VIEWER_CLASS_NAME), {});
|
|
184
186
|
};
|
|
@@ -1315,6 +1317,26 @@ const Window = (props) => {
|
|
|
1315
1317
|
});
|
|
1316
1318
|
};
|
|
1317
1319
|
React__default.memo(Window);
|
|
1320
|
+
const ResizeHandle = React__default.forwardRef((props, ref) => {
|
|
1321
|
+
const {
|
|
1322
|
+
handleAxis,
|
|
1323
|
+
...restProps
|
|
1324
|
+
} = props;
|
|
1325
|
+
const {
|
|
1326
|
+
host_static_assets,
|
|
1327
|
+
environment_assets
|
|
1328
|
+
} = useEnvironment();
|
|
1329
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1330
|
+
ref,
|
|
1331
|
+
className: clsx(`react-resizable-handle react-resizable-handle-${handleAxis}`, areasViewerClasses.resizeHandle),
|
|
1332
|
+
...restProps,
|
|
1333
|
+
children: /* @__PURE__ */ jsx(Image, {
|
|
1334
|
+
width: "12px",
|
|
1335
|
+
height: "12px",
|
|
1336
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/control_size.svg`
|
|
1337
|
+
})
|
|
1338
|
+
});
|
|
1339
|
+
});
|
|
1318
1340
|
const ResponsiveGridLayout = SizeProvider(Responsive);
|
|
1319
1341
|
const AreaGridLayout = (props) => {
|
|
1320
1342
|
const {
|
|
@@ -1364,7 +1386,8 @@ const AreaGridLayout = (props) => {
|
|
|
1364
1386
|
onContainerChange(areaId, e);
|
|
1365
1387
|
},
|
|
1366
1388
|
preventCollision: false,
|
|
1367
|
-
maximizeId: maximizedId
|
|
1389
|
+
maximizeId: maximizedId,
|
|
1390
|
+
resizeHandle: /* @__PURE__ */ jsx(ResizeHandle, {})
|
|
1368
1391
|
}
|
|
1369
1392
|
);
|
|
1370
1393
|
};
|
|
@@ -1520,15 +1543,17 @@ const WindowModal = (props) => {
|
|
|
1520
1543
|
};
|
|
1521
1544
|
const MemonizedWindowModal = React__default.memo(WindowModal);
|
|
1522
1545
|
function AreasViewer() {
|
|
1523
|
-
const areas = useAreasStore((
|
|
1524
|
-
const windowsModals = useAreasStore((
|
|
1525
|
-
const hashWindowsModals = useAreasStore((
|
|
1526
|
-
const currentArea = useAreasStore((
|
|
1527
|
-
const status = useAreasStore((
|
|
1528
|
-
const classesRoot = useAreasStore((
|
|
1546
|
+
const areas = useAreasStore((state2) => state2.areasIds, shallow);
|
|
1547
|
+
const windowsModals = useAreasStore((state2) => state2.windowsModals);
|
|
1548
|
+
const hashWindowsModals = useAreasStore((state2) => state2.hashWindowsModals);
|
|
1549
|
+
const currentArea = useAreasStore((state2) => state2.currentAreaId);
|
|
1550
|
+
const status = useAreasStore((state2) => state2.ownerState.status);
|
|
1551
|
+
const classesRoot = useAreasStore((state2) => state2.viwerClasses.root);
|
|
1552
|
+
const state = useAreasStore((state2) => state2);
|
|
1553
|
+
console.log("Areas state >>>>", state);
|
|
1529
1554
|
const {
|
|
1530
1555
|
init
|
|
1531
|
-
} = useAreasStore((
|
|
1556
|
+
} = useAreasStore((state2) => state2.areasActions);
|
|
1532
1557
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
1533
1558
|
children: [/* @__PURE__ */ jsx(AreasViewerRoot, {
|
|
1534
1559
|
className: classesRoot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { GridLayoutProps } from './types';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* @description Retorna el componente GridLayout con las ventanas (layouts) y popups tomados del área de trabajo.
|
|
5
5
|
* @returns JSX
|
|
6
6
|
*/
|
|
7
|
-
export declare const AreaGridLayout: (props: GridLayoutProps) =>
|
|
7
|
+
export declare const AreaGridLayout: (props: GridLayoutProps) => React.JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@m4l/core";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "../../Icon/index.c3a579e7.js";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "../../mui_extended/IconButton/index.be111a34.js";
|
|
8
|
+
import "@m4l/graphics";
|
|
9
|
+
import "zustand";
|
|
10
|
+
import "../contexts/AreasContext/index.6f56b1da.js";
|
|
11
|
+
import "./AreasAdmin/index.f505897a.js";
|
|
12
|
+
import "zustand/shallow";
|
|
13
|
+
import "../../ScrollBar/index.1247c1c5.js";
|
|
14
|
+
import "../../mui_extended/Accordion/index.854f4c90.js";
|
|
15
|
+
import "../../mui_extended/Typography/index.443590d6.js";
|
|
16
|
+
import "../../mui_extended/Avatar/index.75e6ed57.js";
|
|
17
|
+
import "react-router-dom";
|
|
18
|
+
import "@mui/material/Button";
|
|
19
|
+
import "../../mui_extended/Button/index.40af964e.js";
|
|
20
|
+
import "../../mui_extended/CheckBox.38abccd8.js";
|
|
21
|
+
import "../../mui_extended/Badge/index.8c2b8b66.js";
|
|
22
|
+
import "../../Image/index.c18ebf5a.js";
|
|
23
|
+
import "@mui/lab";
|
|
24
|
+
import "../../mui_extended/MenuActions/index.b16e84c1.js";
|
|
25
|
+
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
+
import "../../mui_extended/Stack/index.0e53197c.js";
|
|
27
|
+
import "../../mui_extended/Tab/index.c1dc7bbf.js";
|
|
28
|
+
import "../../mui_extended/Pager/index.5b77fa4c.js";
|
|
29
|
+
import "../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
30
|
+
import "./AreasViewer/index.cacec884.js";
|
|
31
|
+
import "../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
@@ -2,8 +2,8 @@ import { WritableDraft } from 'immer/dist/internal';
|
|
|
2
2
|
import type { Area, AreasStateWithActions } from './types';
|
|
3
3
|
import type { WindowState, WindowStateProps } from '../../types';
|
|
4
4
|
export declare const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
5
|
-
export declare const PADDING_GRIDLAYOUT =
|
|
6
|
-
export declare const MARGIN_GRIDLAYOUT =
|
|
5
|
+
export declare const PADDING_GRIDLAYOUT = 4;
|
|
6
|
+
export declare const MARGIN_GRIDLAYOUT = 4;
|
|
7
7
|
export declare const DEBOUCED_SAVE_TIME = 500;
|
|
8
8
|
export declare const THROTTLE_RESIZE_TIME = 300;
|
|
9
9
|
export declare const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
|
|
@@ -22,9 +22,16 @@ export declare const NORMALIZED_COLS: {
|
|
|
22
22
|
xs: number;
|
|
23
23
|
xxs: number;
|
|
24
24
|
};
|
|
25
|
+
export declare const DEFAULT_LAYOUTS: {
|
|
26
|
+
lg: never[];
|
|
27
|
+
md: never[];
|
|
28
|
+
sm: never[];
|
|
29
|
+
xs: never[];
|
|
30
|
+
xxs: never[];
|
|
31
|
+
};
|
|
25
32
|
import { Layouts } from '../../../GridLayout/types';
|
|
26
33
|
export declare const DEFAULT_WINDOW: Pick<WindowState, 'status' | 'moduleActions' | 'cookies' | 'loading' | 'toasties' | 'toastyCount' | 'hashToasties'>;
|
|
27
|
-
export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | '
|
|
34
|
+
export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'viewMode'>;
|
|
28
35
|
/**
|
|
29
36
|
* @description Función de apoyo que crea un área de trabajo,
|
|
30
37
|
* El Id del area sale de concatenar la fecha actual con un número aleeatorio de 3 digitos
|
|
@@ -5,24 +5,26 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.
|
|
9
|
-
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.
|
|
8
|
+
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.cacec884.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.f505897a.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
11
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.afb7e3d9.js";
|
|
12
12
|
import "clsx";
|
|
13
|
-
import "../../../GridLayout/subcomponents/Griditem/index.
|
|
14
|
-
import { z as isEqualLayouts } from "../../../GridLayout/index.
|
|
13
|
+
import "../../../GridLayout/subcomponents/Griditem/index.58168132.js";
|
|
14
|
+
import { z as isEqualLayouts } from "../../../GridLayout/index.2383aaf9.js";
|
|
15
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.
|
|
16
|
+
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.a6642437.js";
|
|
17
17
|
import { debounce, cloneDeep } from "lodash";
|
|
18
|
+
import { useNavigate } from "react-router-dom";
|
|
18
19
|
const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
19
|
-
const PADDING_GRIDLAYOUT =
|
|
20
|
-
const MARGIN_GRIDLAYOUT =
|
|
20
|
+
const PADDING_GRIDLAYOUT = 4;
|
|
21
|
+
const MARGIN_GRIDLAYOUT = 4;
|
|
21
22
|
const DEBOUCED_SAVE_TIME = 500;
|
|
22
23
|
const COOKIE_BREAKPOINT_LAYOUTS = "layoutPros";
|
|
23
24
|
const COOKIE_WINDOWS = "windows";
|
|
24
25
|
const BREAKPOINT_SIZES = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 1 };
|
|
25
26
|
const NORMALIZED_COLS = { lg: 64, md: 48, sm: 32, xs: 24, xxs: 1 };
|
|
27
|
+
const DEFAULT_LAYOUTS = { lg: [], md: [], sm: [], xs: [], xxs: [] };
|
|
26
28
|
const DEFAULT_WINDOW = {
|
|
27
29
|
status: "init",
|
|
28
30
|
moduleActions: [],
|
|
@@ -35,23 +37,24 @@ const DEFAULT_WINDOW = {
|
|
|
35
37
|
const DEFAULT_AREA = {
|
|
36
38
|
status: "init",
|
|
37
39
|
zPopUpIndex: 0,
|
|
38
|
-
layouts:
|
|
40
|
+
layouts: DEFAULT_LAYOUTS,
|
|
39
41
|
layoutItemsIds: [],
|
|
40
42
|
currentLayoutId: "",
|
|
41
43
|
currentPopUpId: "",
|
|
42
44
|
breakpoints: BREAKPOINT_SIZES,
|
|
43
|
-
cols: NORMALIZED_COLS
|
|
45
|
+
cols: NORMALIZED_COLS,
|
|
46
|
+
loadWindows: false
|
|
44
47
|
};
|
|
45
48
|
const addArea = (state) => {
|
|
46
49
|
const areaId = `area_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
47
50
|
const labelNewArea = state.getLabel(getAreasDictionary(DICCTIONARY.label_new_area));
|
|
48
51
|
let isFree;
|
|
49
52
|
let name = `${labelNewArea} 1`;
|
|
50
|
-
for (let indexNames = 1; indexNames <= state.
|
|
51
|
-
name = `${labelNewArea} ${indexNames + state.
|
|
53
|
+
for (let indexNames = 1; indexNames <= state.areasIds.length + 1; indexNames++) {
|
|
54
|
+
name = `${labelNewArea} ${indexNames + state.areasIds.length}`;
|
|
52
55
|
isFree = true;
|
|
53
|
-
for (let index = 0; index < state.
|
|
54
|
-
if (state.hashAreas[state.
|
|
56
|
+
for (let index = 0; index < state.areasIds.length; index++) {
|
|
57
|
+
if (state.hashAreas[state.areasIds[index]].name === name) {
|
|
55
58
|
isFree = false;
|
|
56
59
|
break;
|
|
57
60
|
}
|
|
@@ -63,11 +66,11 @@ const addArea = (state) => {
|
|
|
63
66
|
const newArea = {
|
|
64
67
|
id: areaId,
|
|
65
68
|
name,
|
|
66
|
-
loadWindows: false,
|
|
67
69
|
...DEFAULT_AREA
|
|
68
70
|
};
|
|
69
|
-
state.
|
|
71
|
+
state.areasIds.push(areaId);
|
|
70
72
|
state.hashAreas[areaId] = newArea;
|
|
73
|
+
state.currentModuleId = "";
|
|
71
74
|
if (state.loadAreasFromNetwork) {
|
|
72
75
|
state.networkOperation({
|
|
73
76
|
method: "POST",
|
|
@@ -249,7 +252,7 @@ const createAreasStore = (initProps) => {
|
|
|
249
252
|
adminClasses: useAreasAdminUtilityClasses(initProps.ownerState),
|
|
250
253
|
currentAreaId: "",
|
|
251
254
|
currentModuleId: "",
|
|
252
|
-
|
|
255
|
+
areasIds: [],
|
|
253
256
|
hashAreas: {},
|
|
254
257
|
hashWindows: {},
|
|
255
258
|
hashWindowsModals: {},
|
|
@@ -262,63 +265,49 @@ const createAreasStore = (initProps) => {
|
|
|
262
265
|
...startProps,
|
|
263
266
|
areasActions: {
|
|
264
267
|
init: () => {
|
|
265
|
-
if (get().ownerState.status
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
updateOwnerStateClasses(state);
|
|
276
|
-
state.networkOperation({
|
|
277
|
-
method: "GET",
|
|
278
|
-
endPoint: `areas`,
|
|
279
|
-
parms: {},
|
|
280
|
-
toastSuccess: false
|
|
281
|
-
}).then((response) => {
|
|
282
|
-
set((otherState) => {
|
|
283
|
-
if (response?.data && Array.isArray(response.data) && response.data.length > 0) {
|
|
284
|
-
for (let i = 0; i < response.data.length; i++) {
|
|
285
|
-
const newArea = {
|
|
286
|
-
...DEFAULT_AREA,
|
|
287
|
-
...response.data[i],
|
|
288
|
-
loadWindows: true
|
|
289
|
-
};
|
|
290
|
-
otherState.hashAreas[newArea.id] = newArea;
|
|
291
|
-
otherState.areas.push(newArea.id);
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
addArea(otherState);
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
}).finally(() => {
|
|
298
|
-
set((state2) => {
|
|
299
|
-
state2.ownerState.status = "loaded";
|
|
300
|
-
updateOwnerStateClasses(state2);
|
|
301
|
-
});
|
|
302
|
-
if (get().areas.length > 0) {
|
|
303
|
-
get().areasActions.selectArea(get().areas[0]);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
}
|
|
268
|
+
if (get().ownerState.status !== "init") {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (!get().loadAreasFromNetwork) {
|
|
272
|
+
get().areasActions.addArea();
|
|
273
|
+
set((state) => {
|
|
274
|
+
state.ownerState.status = "loaded";
|
|
275
|
+
updateOwnerStateClasses(state);
|
|
276
|
+
});
|
|
277
|
+
return;
|
|
308
278
|
}
|
|
309
|
-
},
|
|
310
|
-
editArea: (areaId, newName) => {
|
|
311
279
|
set((state) => {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
280
|
+
state.ownerState.status = "loading";
|
|
281
|
+
updateOwnerStateClasses(state);
|
|
282
|
+
});
|
|
283
|
+
get().networkOperation({
|
|
284
|
+
method: "GET",
|
|
285
|
+
endPoint: `areas`,
|
|
286
|
+
parms: {},
|
|
287
|
+
toastSuccess: false
|
|
288
|
+
}).then((response) => {
|
|
289
|
+
set((state) => {
|
|
290
|
+
if (response?.data && Array.isArray(response.data) && response.data.length > 0) {
|
|
291
|
+
for (let i = 0; i < response.data.length; i++) {
|
|
292
|
+
const newArea = {
|
|
293
|
+
...DEFAULT_AREA,
|
|
294
|
+
...response.data[i],
|
|
295
|
+
loadWindows: true
|
|
296
|
+
};
|
|
297
|
+
state.hashAreas[newArea.id] = newArea;
|
|
298
|
+
state.areasIds.push(newArea.id);
|
|
299
|
+
}
|
|
300
|
+
} else {
|
|
301
|
+
addArea(state);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}).finally(() => {
|
|
305
|
+
set((state) => {
|
|
306
|
+
state.ownerState.status = "loaded";
|
|
307
|
+
updateOwnerStateClasses(state);
|
|
308
|
+
});
|
|
309
|
+
if (get().areasIds.length > 0 && get().currentAreaId === "") {
|
|
310
|
+
get().areasActions.selectArea(get().areasIds[0]);
|
|
322
311
|
}
|
|
323
312
|
});
|
|
324
313
|
},
|
|
@@ -330,25 +319,42 @@ const createAreasStore = (initProps) => {
|
|
|
330
319
|
get().areasActions.selectArea(newId);
|
|
331
320
|
return newId;
|
|
332
321
|
},
|
|
322
|
+
editArea: (areaId, newName) => {
|
|
323
|
+
set((state) => {
|
|
324
|
+
if (state.hashAreas[areaId]) {
|
|
325
|
+
state.hashAreas[areaId].name = newName;
|
|
326
|
+
if (state.loadAreasFromNetwork) {
|
|
327
|
+
state.networkOperation({
|
|
328
|
+
method: "PATCH",
|
|
329
|
+
endPoint: `areas/${areaId}`,
|
|
330
|
+
data: { name: newName },
|
|
331
|
+
toastSuccess: false,
|
|
332
|
+
toastError: false
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
},
|
|
333
338
|
deleteArea: (areaId) => {
|
|
334
339
|
let selectNewAreaId = "";
|
|
335
340
|
set((state) => {
|
|
336
|
-
const
|
|
341
|
+
const ha = state.hashAreas[areaId];
|
|
342
|
+
if (!ha || state.areasIds.length < 2) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
purgeToastsArea(state, areaId);
|
|
346
|
+
const removeIndex = state.areasIds.indexOf(areaId);
|
|
337
347
|
if (removeIndex > -1) {
|
|
338
348
|
for (const key in state.hashWindows) {
|
|
339
349
|
if (state.hashWindows[key].areaId === areaId) {
|
|
340
350
|
delete state.hashWindows[key];
|
|
341
351
|
}
|
|
342
352
|
}
|
|
343
|
-
state.
|
|
353
|
+
state.areasIds.splice(removeIndex, 1);
|
|
344
354
|
delete state.hashAreas[areaId];
|
|
345
355
|
}
|
|
346
356
|
if (state.currentAreaId === areaId) {
|
|
347
|
-
|
|
348
|
-
selectNewAreaId = state.areas[0];
|
|
349
|
-
} else {
|
|
350
|
-
state.currentAreaId = "";
|
|
351
|
-
}
|
|
357
|
+
selectNewAreaId = state.areasIds[0];
|
|
352
358
|
}
|
|
353
359
|
if (state.loadAreasFromNetwork) {
|
|
354
360
|
state.networkOperation({
|
|
@@ -651,6 +657,12 @@ const createAreasStore = (initProps) => {
|
|
|
651
657
|
selectLayout: (areaId, layoutId) => {
|
|
652
658
|
set((state) => {
|
|
653
659
|
const area = state.hashAreas[areaId];
|
|
660
|
+
const moduleId = state.hashWindows[layoutId].moduleId;
|
|
661
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
662
|
+
searchParams.set("module", moduleId);
|
|
663
|
+
state.navigate({
|
|
664
|
+
search: `?${searchParams.toString()}`
|
|
665
|
+
});
|
|
654
666
|
if (state.hashWindows[layoutId].emergeType === "layout") {
|
|
655
667
|
area.currentLayoutId = layoutId;
|
|
656
668
|
state.currentModuleId = state.hashWindows[layoutId].moduleId;
|
|
@@ -999,6 +1011,14 @@ const createAreasStore = (initProps) => {
|
|
|
999
1011
|
}
|
|
1000
1012
|
});
|
|
1001
1013
|
}
|
|
1014
|
+
},
|
|
1015
|
+
areaAdminActions: {
|
|
1016
|
+
setFocus: (newValue) => {
|
|
1017
|
+
set((state) => {
|
|
1018
|
+
state.ownerState = { ...state.ownerState, focus: newValue };
|
|
1019
|
+
updateOwnerStateClasses(state);
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1002
1022
|
}
|
|
1003
1023
|
})),
|
|
1004
1024
|
{ name: `Areas store` }
|
|
@@ -1026,6 +1046,7 @@ function AreasProvider(props) {
|
|
|
1026
1046
|
} = useNetwork();
|
|
1027
1047
|
const isDesktop = useResponsiveDesktop();
|
|
1028
1048
|
const isSkeleton = useModuleSkeleton();
|
|
1049
|
+
const navigate = useNavigate();
|
|
1029
1050
|
const isFirstRender = useFirstRender([getLabel]);
|
|
1030
1051
|
const areasStoreRef = useRef();
|
|
1031
1052
|
if (!areasStoreRef.current) {
|
|
@@ -1034,10 +1055,12 @@ function AreasProvider(props) {
|
|
|
1034
1055
|
loadAreasFromNetwork,
|
|
1035
1056
|
loadCookiesFromNetwork,
|
|
1036
1057
|
networkOperation,
|
|
1058
|
+
navigate,
|
|
1037
1059
|
ownerState: {
|
|
1038
1060
|
status: "init",
|
|
1039
1061
|
isMobile: !isDesktop,
|
|
1040
|
-
isSkeleton
|
|
1062
|
+
isSkeleton,
|
|
1063
|
+
focus: false
|
|
1041
1064
|
}
|
|
1042
1065
|
});
|
|
1043
1066
|
areasStoreRef.current?.getState().areasActions.init();
|
|
@@ -1051,7 +1074,7 @@ function AreasProvider(props) {
|
|
|
1051
1074
|
} = useStore(areasStoreRef.current, (state) => state.areasActions, shallow);
|
|
1052
1075
|
const addWindow = useCallback((newWindow) => {
|
|
1053
1076
|
const currentAreaId = areasStoreRef.current?.getState().currentAreaId;
|
|
1054
|
-
const areas = areasStoreRef.current?.getState().
|
|
1077
|
+
const areas = areasStoreRef.current?.getState().areasIds;
|
|
1055
1078
|
if (currentAreaId && areas) {
|
|
1056
1079
|
areasStoreRef.current?.getState().areaActions.addWindow(newWindow);
|
|
1057
1080
|
}
|