@m4l/components 1.1.0 → 1.1.2
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 +0 -5
- package/@types/types.d.ts +9 -0
- package/components/AccountPopover/{index.789ca5b9.js → index.84049a50.js} +3 -3
- package/components/AppBar/{index.a1734c3b.js → index.22ed1a0e.js} +4 -4
- package/components/BaseModule/{index.db78c929.js → index.0fc648c5.js} +1 -1
- package/components/CommonActions/components/ActionCancel/{index.a44544d1.js → index.33cf608e.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.1b921390.js → index.d1359a38.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.624a468b.js → index.415de2bb.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.63222f6a.js → index.0893587b.js} +2 -2
- package/components/CommonActions/components/Actions/{index.46d6c3d1.js → index.2342a37e.js} +2 -2
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.8ba7afb9.js → index.9d6f8597.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.5a93dc9b.js → index.9bcaba12.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.35597c7f.js → index.a58a8712.js} +1 -1
- package/components/DataGrid/formatters/{index.4a07af63.js → index.6698b419.js} +2 -2
- package/components/DataGrid/{index.65f1da52.js → index.b1cac6af.js} +4 -4
- package/components/DataGrid/subcomponents/Actions/{index.1fed83ce.js → index.a60b17d5.js} +11 -11
- package/components/DragResizeWindow/classes/types.d.ts +1 -0
- package/components/DragResizeWindow/helpers/index.d.ts +3 -0
- package/components/DragResizeWindow/{index.ad0da648.js → index.46048367.js} +52 -39
- package/components/DragResizeWindow/types.d.ts +7 -0
- package/components/DynamicFilter/{dictionary.7aeaab97.js → dictionary.da256925.js} +2 -2
- package/components/DynamicFilter/{index.895da58e.js → index.08abfc2c.js} +4 -4
- package/components/DynamicFilter/slots/{dynamicFilterSlots.84150a22.js → dynamicFilterSlots.b02bff6a.js} +6 -6
- package/components/DynamicFilter/store/{index.6ec4c67c.js → index.1e4af8b4.js} +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index.42446f8e.js → index.37bcd016.js} +3 -3
- package/components/DynamicFilter/subcomponents/AppliedFilters/{index.621ca411.js → index.2740f285.js} +4 -4
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index.0c3af964.js → index.63102514.js} +6 -6
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index.f92d2a9c.js → index.3824d701.js} +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index.aad7a12c.js → index.57ddf344.js} +4 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index.852c4c73.js → index.7beac9f0.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index.4beced1d.js → index.e9e1af93.js} +4 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index.17191093.js → index.d27a8bcc.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/{index.10c9c338.js → index.e8f1d8e5.js} +5 -5
- package/components/DynamicFilter/subcomponents/FilterActions/{index.7bee6c25.js → index.35014c15.js} +3 -3
- package/components/DynamicFilter/subcomponents/InputFilter/{index.85d720be.js → index.f42e9571.js} +4 -4
- package/components/DynamicFilter/subcomponents/PopoverFilter/{index.0fdc8a51.js → index.ada7eb0c.js} +6 -6
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index.3674da6c.js → index.144885cf.js} +2 -2
- package/components/FieldLabel/{index.523aaa62.js → index.59b9b63a.js} +4 -4
- package/components/GridLayout/{index.3b90ce9b.js → index.56c3f4fa.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index.83d54714.js → index.02bcb3b3.js} +3 -3
- package/components/GridLayout/subcomponents/Responsive/{index.f06bbf5e.js → index.65aeef5e.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.72bfaedb.js → index.0aad6f90.js} +1 -1
- package/components/HelperText/{index.af402ba9.js → index.5c72277a.js} +2 -2
- package/components/Icon/{index.ab280d41.js → index.13aaae3c.js} +3 -3
- package/components/Image/{index.ec13c4a1.js → index.4b51d4ba.js} +2 -2
- package/components/LanguagePopover/{index.6af275d0.js → index.7605fda8.js} +4 -4
- package/components/LinearProgressIndeterminate/{index.6739ff49.js → index.292a4af8.js} +2 -2
- package/components/LoadingError/{index.cfdfb380.js → index.b129b573.js} +5 -5
- package/components/MFIsolationApp/{index.96eb2a32.js → index.9f718621.js} +2 -2
- package/components/MFLoader/{index.9f542136.js → index.5d340e32.js} +2 -2
- package/components/ModalDialog/{index.b975fc7b.js → index.ff275011.js} +4 -4
- package/components/NavLink/{index.9cc3caf4.js → index.506c7827.js} +2 -2
- package/components/NoItemSelected/{index.4ea373aa.js → index.1d7d5a9d.js} +1 -1
- package/components/ObjectLogs/{index.55d93ddb.js → index.473ebd65.js} +9 -9
- package/components/PDFViewer/{index.8d8c9d39.js → index.4e7ffac8.js} +2 -2
- package/components/Page/{index.eb107182.js → index.b75c74e3.js} +1 -1
- package/components/PaperForm/{index.37170e07.js → index.8289409f.js} +2 -2
- package/components/Period/{index.2a193da0.js → index.13e4c351.js} +4 -4
- package/components/PrintingSystem/{index.6d6cd410.js → index.e1535b80.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.2f4b2285.js → index.6b36842d.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.0e11ce1a.js → index.4aab9d2c.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.774c0eb8.js → index.23a9dc95.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.23fb8a3e.js → index.d0e8fd15.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.9cd30c38.js → index.35ff7dab.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.9f4f2196.js → index.9547c826.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.7b78e756.js → index.71afe03e.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.6c924beb.js → index.abbb154c.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.2da2a062.js → index.b3f2ba6c.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.334ff3ef.js → index.809aaad2.js} +1 -1
- package/components/PropertyValue/{index.cec68741.js → index.36555931.js} +3 -3
- package/components/Resizeable/{index.a27cb569.js → index.57363836.js} +1 -1
- package/components/ScrollBar/{index.4e447b30.js → index.236e2aa3.js} +1 -1
- package/components/SideBar/{index.902789b8.js → index.bb6c2c7b.js} +6 -6
- package/components/SplitLayout/{index.e048f8c4.js → index.75953afb.js} +1 -1
- package/components/ToastContainer/{index.319037c5.js → index.bb972338.js} +3 -3
- package/components/animate/LoadingScreen/{index.d22d67a3.js → index.09915798.js} +1 -1
- package/components/animate/{index.271410bf.js → index.5c545243.js} +1 -1
- package/components/areas/components/AreasAdmin/{index.f3a211a4.js → index.42d40964.js} +15 -15
- package/components/areas/components/AreasViewer/{index.8e9d24c2.js → index.266a3815.js} +15 -15
- package/components/areas/components/AreasViewer/styles.d.ts +1 -1
- package/components/areas/contexts/AreasContext/{index.b29fb29f.js → index.c2289888.js} +4 -4
- package/components/areas/hooks/useAreas/{index.5f7f615d.js → index.509c1703.js} +1 -1
- package/components/commercial/AppBarCommercial/{index.8b27200f.js → index.3fd10868.js} +2 -2
- package/components/commercial/SectionCommercial/{index.6ffe7283.js → index.bd45c64e.js} +2 -2
- package/components/commercial/TopBar/{index.67ee203b.js → index.4e55cffa.js} +6 -6
- package/components/commercial/{index.196f2f16.js → index.4bdbb8fe.js} +3 -3
- package/components/formatters/BooleanFormatter/{index.71e5727f.js → index.ac870381.js} +2 -2
- package/components/formatters/{index.6c7fdd6c.js → index.53ad2f51.js} +2 -2
- package/components/hook-form/HelperError/{index.af99c705.js → index.9f93c627.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index.b295a0b4.js → index.b8347185.js} +6 -6
- package/components/hook-form/RHFAutocompleteAsync/{index.ad51f3e2.js → index.aeb3bf66.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index.4aa49169.js → index.c3b7ce0f.js} +3 -3
- package/components/hook-form/RHFColorPicker/{index.6e788803.js → index.c259b8ac.js} +6 -6
- package/components/hook-form/RHFDateTime/{index.4c686856.js → index.4efe48ce.js} +4 -4
- package/components/hook-form/RHFPeriod/{index.7bd17690.js → index.0f912e3e.js} +4 -4
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.d.ts +1 -1
- package/components/hook-form/RHFRadioGroup/formatters/OptionIconLabelFormatter/index.d.ts +2 -0
- package/components/hook-form/RHFRadioGroup/index.96c94958.js +52 -0
- package/components/hook-form/RHFRadioGroup/types.d.ts +10 -4
- package/components/hook-form/RHFTextField/{index.ec3f5dd5.js → index.828b30f5.js} +5 -5
- package/components/hook-form/RHFUpload/{index.1275836a.js → index.b664c68b.js} +5 -5
- package/components/maps/components/GpsTools/{index.44b82290.js → index.e759163d.js} +23 -23
- package/components/maps/components/Map/external/Control/index.d.ts +1 -1
- package/components/maps/components/Map/{index.7cb66143.js → index.c568e68d.js} +30 -27
- package/components/modal/{WindowBase.e663941b.js → WindowBase.58f9e2b0.js} +3 -3
- package/components/modal/{WindowConfirm.abcfd142.js → WindowConfirm.60955735.js} +6 -6
- package/components/mui_extended/Accordion/{index.1d692b19.js → index.e6971e30.js} +4 -4
- package/components/mui_extended/Avatar/{index.561ed0f7.js → index.8cc99f13.js} +1 -1
- package/components/mui_extended/Badge/{index.abad2c28.js → index.07fb40c0.js} +1 -1
- package/components/mui_extended/Button/{index.8afd5131.js → index.111f830e.js} +3 -3
- package/components/mui_extended/{CheckBox.d84658da.js → CheckBox.a8958eb8.js} +2 -2
- package/components/mui_extended/IconButton/{index.cb274bbe.js → index.9425bdc5.js} +2 -2
- package/components/mui_extended/MenuActions/{index.8168ad20.js → index.8b0d69b7.js} +5 -5
- package/components/mui_extended/Pager/{index.9184e616.js → index.cb749e65.js} +4 -4
- package/components/mui_extended/Popover/{index.594e3587.js → index.5e78a637.js} +2 -2
- package/components/mui_extended/Stack/{index.6516b2b5.js → index.3674daf7.js} +1 -1
- package/components/mui_extended/Tab/{index.2ac4a667.js → index.a94a92c1.js} +1 -1
- package/components/mui_extended/ToggleButton/{index.94cd32f3.js → index.a55def3b.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.3cb364d1.js → index.cd20de81.js} +1 -1
- package/components/mui_extended/Typography/{index.71fbb5c4.js → index.45e97bdd.js} +1 -1
- package/components/popups/PopupsProvider/{index.07940e4f.js → index.776c62e7.js} +8 -34
- package/components/popups/PopupsViewer/constants.29247547.js +4 -0
- package/components/popups/PopupsViewer/icons.066abd43.js +7 -0
- package/components/popups/PopupsViewer/{index.d8b9a059.js → index.8fe4aa5d.js} +43 -78
- package/components/popups/PopupsViewer/slots/index.154e4e5f.js +14 -0
- package/components/popups/PopupsViewer/slots/popupsViewerSlots.aaf546e2.js +39 -0
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +27 -47
- package/components/popups/components/PopupsViewer/PopupsViewer.d.ts +1 -2
- package/components/popups/components/PopupsViewer/constants.d.ts +1 -1
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +25 -0
- package/components/popups/components/PopupsViewer/slots/slots.d.ts +10 -0
- package/components/popups/components/PopupsViewer/types.d.ts +17 -3
- package/contexts/ModalContext/{index.dd147fa6.js → index.a5c622d6.js} +1 -1
- package/contexts/RHFormContext/{index.cedd3482.js → index.40a9547e.js} +1 -1
- package/hooks/useFormAddEdit/{index.00c86b5b.js → index.b6a3cf63.js} +2 -2
- package/hooks/useModal/{index.84233480.js → index.3ad1e014.js} +1 -1
- package/hooks/useTab/{index.74399f56.js → index.4081b113.js} +1 -1
- package/index.js +126 -122
- package/package.json +1 -1
- package/{react-draggable.079122b0.js → react-draggable.310e3387.js} +1 -1
- package/{react-resizable.330f1499.js → react-resizable.3755959b.js} +2 -2
- package/styles/{DynamicFilter.0713a406.js → DynamicFilter.557ee3a7.js} +1 -1
- package/styles/PopupViewer.styles.d.ts +2 -0
- package/styles/{index.1735a866.js → index.239f949e.js} +100 -10
- package/components/hook-form/RHFRadioGroup/index.11c0add8.js +0 -35
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/helper.d.ts +0 -7
- package/components/popups/components/PopupsViewer/classes/index.d.ts +0 -17
- package/components/popups/components/PopupsViewer/classes/types.d.ts +0 -15
- package/components/popups/components/PopupsViewer/styled.d.ts +0 -2
- /package/utils/{index.f77cc2ab.js → index.78d1638f.js} +0 -0
|
@@ -5,42 +5,42 @@ import { shallow } from "zustand/shallow";
|
|
|
5
5
|
import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
|
|
6
6
|
import "@geoman-io/leaflet-geoman-free";
|
|
7
7
|
import clsx from "clsx";
|
|
8
|
-
import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivTabGpsToolsRoot } from "../../../../styles/index.
|
|
9
|
-
import { D as DynamicFilter } from "../../../DynamicFilter/index.
|
|
10
|
-
import { C as ColumnIconFormatter } from "../../../DataGrid/formatters/index.
|
|
8
|
+
import { au as RHFormProviderStyled, av as StackGeofenceListRoot, aw as DivTabGpsToolsRoot } from "../../../../styles/index.239f949e.js";
|
|
9
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/index.08abfc2c.js";
|
|
10
|
+
import { C as ColumnIconFormatter } from "../../../DataGrid/formatters/index.6698b419.js";
|
|
11
11
|
import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js";
|
|
12
12
|
import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
13
13
|
import { useFormContext, useWatch, useFormState } from "react-hook-form";
|
|
14
|
-
import { H as HelperError } from "../../../hook-form/HelperError/index.
|
|
15
|
-
import { u as useModal } from "../../../../hooks/useModal/index.
|
|
16
|
-
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.
|
|
14
|
+
import { H as HelperError } from "../../../hook-form/HelperError/index.9f93c627.js";
|
|
15
|
+
import { u as useModal } from "../../../../hooks/useModal/index.3ad1e014.js";
|
|
16
|
+
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index.776c62e7.js";
|
|
17
17
|
import { createStore, useStore } from "zustand";
|
|
18
18
|
import { devtools } from "zustand/middleware";
|
|
19
19
|
import { immer } from "zustand/middleware/immer";
|
|
20
20
|
import { enableMapSet } from "immer";
|
|
21
|
-
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.
|
|
22
|
-
import { W as WindowConfirm } from "../../../modal/WindowConfirm.
|
|
23
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.
|
|
24
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
21
|
+
import { A as ActionFormIntro } from "../../../CommonActions/components/ActionFormIntro/index.415de2bb.js";
|
|
22
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.60955735.js";
|
|
23
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.2342a37e.js";
|
|
24
|
+
import { B as Button } from "../../../mui_extended/Button/index.111f830e.js";
|
|
25
25
|
import { useMap } from "react-leaflet";
|
|
26
26
|
import * as L from "leaflet";
|
|
27
27
|
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
28
|
-
import { u as useTab } from "../../../../hooks/useTab/index.
|
|
28
|
+
import { u as useTab } from "../../../../hooks/useTab/index.4081b113.js";
|
|
29
29
|
import { generateUtilityClasses } from "@mui/material";
|
|
30
30
|
import "@mui/base";
|
|
31
|
-
import { P as PaperForm } from "../../../PaperForm/index.
|
|
32
|
-
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.
|
|
33
|
-
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.
|
|
34
|
-
import { S as Stack } from "../../../mui_extended/Stack/index.
|
|
35
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
36
|
-
import { P as PropertyValue } from "../../../PropertyValue/index.
|
|
37
|
-
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.
|
|
38
|
-
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.
|
|
39
|
-
import { I as Icon } from "../../../Icon/index.
|
|
31
|
+
import { P as PaperForm } from "../../../PaperForm/index.8289409f.js";
|
|
32
|
+
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index.b8347185.js";
|
|
33
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index.828b30f5.js";
|
|
34
|
+
import { S as Stack } from "../../../mui_extended/Stack/index.3674daf7.js";
|
|
35
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.9425bdc5.js";
|
|
36
|
+
import { P as PropertyValue } from "../../../PropertyValue/index.36555931.js";
|
|
37
|
+
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index.c259b8ac.js";
|
|
38
|
+
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index.a94a92c1.js";
|
|
39
|
+
import { I as Icon } from "../../../Icon/index.13aaae3c.js";
|
|
40
40
|
import * as Yup from "yup";
|
|
41
|
-
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.
|
|
42
|
-
import { u as useMapStore, C as CommonFeatureRender, G as GPS_TOOLS_POPUP_ID } from "../Map/index.
|
|
43
|
-
import { D as DataGrid } from "../../../DataGrid/index.
|
|
41
|
+
import { u as useFormAddEdit } from "../../../../hooks/useFormAddEdit/index.b6a3cf63.js";
|
|
42
|
+
import { u as useMapStore, C as CommonFeatureRender, G as GPS_TOOLS_POPUP_ID } from "../Map/index.c568e68d.js";
|
|
43
|
+
import { D as DataGrid } from "../../../DataGrid/index.b1cac6af.js";
|
|
44
44
|
const COMPONENT_CLASS_NAME = "M4LMapGpsTools";
|
|
45
45
|
const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
46
46
|
const STYLE_OPACITIES = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ControlProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* @description crea un componente react dentro de un control de leaflet, utilizando una tecnica e
|
|
4
|
+
* @description crea un componente react dentro de un control de leaflet, utilizando una tecnica e portal diferente a createPortal
|
|
5
5
|
* Dependiendo de la posicion del control, este se agrega en la parte correspondiente del mapa, por defecto es topright
|
|
6
6
|
*
|
|
7
7
|
* @param props
|
|
@@ -9,24 +9,24 @@ import { createPortal } from "react-dom";
|
|
|
9
9
|
import { useModuleDictionary, useModuleSkeleton, useEnvironment, useModulePrivileges } from "@m4l/core";
|
|
10
10
|
import clsx from "clsx";
|
|
11
11
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
12
|
-
import { A as Actions } from "../../../CommonActions/components/Actions/index.
|
|
13
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
12
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index.2342a37e.js";
|
|
13
|
+
import { B as Button } from "../../../mui_extended/Button/index.111f830e.js";
|
|
14
14
|
import * as Yup from "yup";
|
|
15
15
|
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index.f60f500e.js";
|
|
16
|
-
import { R as RHFAutocompleteAsync } from "../../../hook-form/RHFAutocompleteAsync/index.
|
|
17
|
-
import { S as Stack } from "../../../mui_extended/Stack/index.
|
|
18
|
-
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.
|
|
19
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
20
|
-
import { u as usePopupsStore, P as PopupsProvider } from "../../../popups/PopupsProvider/index.
|
|
21
|
-
import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index.
|
|
22
|
-
import { D as DataGrid } from "../../../DataGrid/index.
|
|
16
|
+
import { R as RHFAutocompleteAsync } from "../../../hook-form/RHFAutocompleteAsync/index.aeb3bf66.js";
|
|
17
|
+
import { S as Stack } from "../../../mui_extended/Stack/index.3674daf7.js";
|
|
18
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index.40a9547e.js";
|
|
19
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.9425bdc5.js";
|
|
20
|
+
import { u as usePopupsStore, P as PopupsProvider } from "../../../popups/PopupsProvider/index.776c62e7.js";
|
|
21
|
+
import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index.cd20de81.js";
|
|
22
|
+
import { D as DataGrid } from "../../../DataGrid/index.b1cac6af.js";
|
|
23
23
|
import { generateUtilityClasses, Tooltip, FormControl, RadioGroup, FormControlLabel, Radio, useTheme } from "@mui/material";
|
|
24
24
|
import { C as ColumnSetCheckFormatter } from "../../../DataGrid/formatters/ColumnSetCheckFormatter/index.4045b2f2.js";
|
|
25
|
-
import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index.
|
|
25
|
+
import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index.13aaae3c.js";
|
|
26
26
|
import { u as useStateRef } from "../../../../hooks/useStateRef/index.538edb89.js";
|
|
27
|
-
import { C as CheckBox } from "../../../mui_extended/CheckBox.
|
|
28
|
-
import { P as Popover } from "../../../mui_extended/Popover/index.
|
|
29
|
-
import { P as PopupsViewer } from "../../../popups/PopupsViewer/index.
|
|
27
|
+
import { C as CheckBox } from "../../../mui_extended/CheckBox.a8958eb8.js";
|
|
28
|
+
import { P as Popover } from "../../../mui_extended/Popover/index.5e78a637.js";
|
|
29
|
+
import { P as PopupsViewer } from "../../../popups/PopupsViewer/index.8fe4aa5d.js";
|
|
30
30
|
import { createPathComponent } from "@react-leaflet/core";
|
|
31
31
|
import "leaflet.markercluster";
|
|
32
32
|
import { cloneDeep, throttle } from "lodash";
|
|
@@ -37,7 +37,7 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
37
37
|
import { devtools } from "zustand/middleware";
|
|
38
38
|
import { immer } from "zustand/middleware/immer";
|
|
39
39
|
import { unstable_composeClasses } from "@mui/base";
|
|
40
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.
|
|
40
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.78d1638f.js";
|
|
41
41
|
import { b as bearingRawToCSS } from "../../index.13bb982c.js";
|
|
42
42
|
import "leaflet-polylinedecorator";
|
|
43
43
|
const COMPONENT_CLASS_NAME = "M4LMap";
|
|
@@ -1708,10 +1708,21 @@ function Controls(props) {
|
|
|
1708
1708
|
L__default.DomEvent.disableScrollPropagation(cContainer);
|
|
1709
1709
|
}
|
|
1710
1710
|
}, [map]);
|
|
1711
|
-
return /* @__PURE__ */ jsxs(PopupsProvider, { baseZindex: MAP_ZINDEX_OVER_MAP,
|
|
1711
|
+
return /* @__PURE__ */ jsxs(PopupsProvider, { baseZindex: MAP_ZINDEX_OVER_MAP, containerElement: map.getContainer(), initialPopups: [
|
|
1712
|
+
{
|
|
1713
|
+
popupId: "popup1",
|
|
1714
|
+
status: "init",
|
|
1715
|
+
iconUrl: "`https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/dynamic_filter/assets/icons/edit.svg`,",
|
|
1716
|
+
title: "Popup 1",
|
|
1717
|
+
subTitle: "Subtitulo",
|
|
1718
|
+
zIndex: 1,
|
|
1719
|
+
componentProps: {},
|
|
1720
|
+
functionComponent: () => /* @__PURE__ */ jsx("div", { children: "MyComponent" })
|
|
1721
|
+
}
|
|
1722
|
+
], children: [
|
|
1712
1723
|
/* @__PURE__ */ jsx(TopLeftTools, {}),
|
|
1713
1724
|
/* @__PURE__ */ jsx(TopRightTools, { gpsTools }),
|
|
1714
|
-
controlContainer && createPortal(/* @__PURE__ */ jsx(PopupsViewer, {
|
|
1725
|
+
controlContainer && createPortal(/* @__PURE__ */ jsx(PopupsViewer, {}), controlContainer)
|
|
1715
1726
|
] });
|
|
1716
1727
|
}
|
|
1717
1728
|
const MarkerClusterGroup = createPathComponent(({ children: _c, ...props }, ctx) => {
|
|
@@ -1768,10 +1779,8 @@ const MyLayer = (props) => {
|
|
|
1768
1779
|
if (lefaletLayerRef.current.clickCount === 1) {
|
|
1769
1780
|
lefaletLayerRef.current.clickTimeout = setTimeout(() => {
|
|
1770
1781
|
const cluster2 = a.propagatedFrom;
|
|
1771
|
-
if (cluster2 && cluster2 instanceof L__default.MarkerCluster)
|
|
1772
|
-
|
|
1773
|
-
console.log("Markers in this cluster: ", childMarkers);
|
|
1774
|
-
}
|
|
1782
|
+
if (cluster2 && cluster2 instanceof L__default.MarkerCluster)
|
|
1783
|
+
;
|
|
1775
1784
|
if (!popupRef.current) {
|
|
1776
1785
|
popupRef.current = L__default.popup().setLatLng(a.sourceTarget._cLatLng).setContent("Hello, World!");
|
|
1777
1786
|
map.addLayer(popupRef.current);
|
|
@@ -2167,10 +2176,6 @@ const CommonFeatureRender = (props) => {
|
|
|
2167
2176
|
fetchData();
|
|
2168
2177
|
}
|
|
2169
2178
|
}, [feature]);
|
|
2170
|
-
useEffect(() => {
|
|
2171
|
-
return () => {
|
|
2172
|
-
};
|
|
2173
|
-
}, []);
|
|
2174
2179
|
if (!feature) {
|
|
2175
2180
|
return null;
|
|
2176
2181
|
}
|
|
@@ -2229,9 +2234,7 @@ const CommonFeatureRender = (props) => {
|
|
|
2229
2234
|
},
|
|
2230
2235
|
draggable: false,
|
|
2231
2236
|
eventHandlers: {
|
|
2232
|
-
add: onAddPointLayer
|
|
2233
|
-
click: (_e) => {
|
|
2234
|
-
}
|
|
2237
|
+
add: onAddPointLayer
|
|
2235
2238
|
},
|
|
2236
2239
|
...styleProperties,
|
|
2237
2240
|
...propFeature
|
|
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { m as modalUtilityClasses } from "./index.81eb6def.js";
|
|
3
3
|
import { useEnvironment } from "@m4l/core";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { I as Icon } from "../Icon/index.
|
|
6
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
7
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
5
|
+
import { I as Icon } from "../Icon/index.13aaae3c.js";
|
|
6
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.9425bdc5.js";
|
|
7
|
+
import { u as useModal } from "../../hooks/useModal/index.3ad1e014.js";
|
|
8
8
|
const Header = (props) => {
|
|
9
9
|
const { title, onClickCancel, urlIcon, classes } = props;
|
|
10
10
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { A as Actions } from "../CommonActions/components/Actions/index.
|
|
2
|
+
import { A as Actions } from "../CommonActions/components/Actions/index.2342a37e.js";
|
|
3
3
|
import { Typography } from "@mui/material";
|
|
4
4
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
5
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
6
|
-
import { I as Image } from "../Image/index.
|
|
5
|
+
import { u as useModal } from "../../hooks/useModal/index.3ad1e014.js";
|
|
6
|
+
import { I as Image } from "../Image/index.4b51d4ba.js";
|
|
7
7
|
import { m as modalUtilityClasses } from "./index.81eb6def.js";
|
|
8
|
-
import { W as WindowBase } from "./WindowBase.
|
|
9
|
-
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.
|
|
10
|
-
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.
|
|
8
|
+
import { W as WindowBase } from "./WindowBase.58f9e2b0.js";
|
|
9
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.33cf608e.js";
|
|
10
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.0893587b.js";
|
|
11
11
|
const dictionary = {
|
|
12
12
|
MESSAGE: "common_actions.confirm_quit_msg"
|
|
13
13
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { generateUtilityClasses, generateUtilityClass, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
3
|
-
import { I as IconButton } from "../IconButton/index.
|
|
3
|
+
import { I as IconButton } from "../IconButton/index.9425bdc5.js";
|
|
4
4
|
import { useEnvironment } from "@m4l/core";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { ax as AccordionRoot } from "../../../styles/index.
|
|
6
|
+
import { ax as AccordionRoot } from "../../../styles/index.239f949e.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
9
9
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.0faeade8.js";
|
|
10
|
-
import { I as Icon } from "../../Icon/index.
|
|
11
|
-
import { T as Typography } from "../Typography/index.
|
|
10
|
+
import { I as Icon } from "../../Icon/index.13aaae3c.js";
|
|
11
|
+
import { T as Typography } from "../Typography/index.45e97bdd.js";
|
|
12
12
|
const componentName = "M4LAccordion";
|
|
13
13
|
generateUtilityClasses(componentName, [
|
|
14
14
|
"root",
|
|
@@ -4,7 +4,7 @@ import { Skeleton, generateUtilityClasses, generateUtilityClass, Avatar as Avata
|
|
|
4
4
|
import { useModuleSkeleton } from "@m4l/core";
|
|
5
5
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
-
import { ay as AvatarRoot } from "../../../styles/index.
|
|
7
|
+
import { ay as AvatarRoot } from "../../../styles/index.239f949e.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
const AVATAR_PREFIX = "M4LAvatar";
|
|
10
10
|
const getNameAvatarDataTestId = (KEY) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { generateUtilityClasses, Badge as Badge$1 } from "@mui/material";
|
|
3
3
|
import "@mui/base";
|
|
4
|
-
import { az as BadgeRoot } from "../../../styles/index.
|
|
4
|
+
import { az as BadgeRoot } from "../../../styles/index.239f949e.js";
|
|
5
5
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
6
6
|
const componentName = "M4LBadge";
|
|
7
7
|
const badgeClasses = generateUtilityClasses(componentName, [
|
|
@@ -2,14 +2,14 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass, Skeleton, IconButton, Tooltip } from "@mui/material";
|
|
4
4
|
import MuiButton from "@mui/material/Button";
|
|
5
|
-
import { aA as ButtonRoot, aB as WrapperImageButton, aC as LoadingButtonRoot } from "../../../styles/index.
|
|
5
|
+
import { aA as ButtonRoot, aB as WrapperImageButton, aC as LoadingButtonRoot } from "../../../styles/index.239f949e.js";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { useMemo } from "react";
|
|
9
|
-
import { I as Image } from "../../Image/index.
|
|
9
|
+
import { I as Image } from "../../Image/index.4b51d4ba.js";
|
|
10
10
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
11
11
|
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
12
|
-
import { T as Typography } from "../Typography/index.
|
|
12
|
+
import { T as Typography } from "../Typography/index.45e97bdd.js";
|
|
13
13
|
const componentName$2 = "M4LButton";
|
|
14
14
|
const buttonClasses = generateUtilityClasses(componentName$2, [
|
|
15
15
|
"root",
|
|
@@ -5,8 +5,8 @@ import { useResponsiveDesktop } from "@m4l/graphics";
|
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
6
|
import { useModuleSkeleton } from "@m4l/core";
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
|
-
import { aD as CheckBoxRoot } from "../../styles/index.
|
|
9
|
-
import { F as FieldLabel } from "../FieldLabel/index.
|
|
8
|
+
import { aD as CheckBoxRoot } from "../../styles/index.239f949e.js";
|
|
9
|
+
import { F as FieldLabel } from "../FieldLabel/index.59b9b63a.js";
|
|
10
10
|
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
11
11
|
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
12
12
|
"root",
|
|
@@ -2,8 +2,8 @@ import { jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo, useState } from "react";
|
|
3
3
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
4
4
|
import { Skeleton, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
5
|
-
import { I as Icon } from "../../Icon/index.
|
|
6
|
-
import { aE as IconButtonRoot } from "../../../styles/index.
|
|
5
|
+
import { I as Icon } from "../../Icon/index.13aaae3c.js";
|
|
6
|
+
import { aE as IconButtonRoot } from "../../../styles/index.239f949e.js";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -2,13 +2,13 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React__default, { useState, useEffect, useMemo } from "react";
|
|
3
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import { generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
5
|
-
import { P as Popover } from "../Popover/index.
|
|
6
|
-
import { aF as LabelMemuItem } from "../../../styles/index.
|
|
7
|
-
import { I as Icon } from "../../Icon/index.
|
|
5
|
+
import { P as Popover } from "../Popover/index.5e78a637.js";
|
|
6
|
+
import { aF as LabelMemuItem } from "../../../styles/index.239f949e.js";
|
|
7
|
+
import { I as Icon } from "../../Icon/index.13aaae3c.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
|
-
import { B as Badge } from "../Badge/index.
|
|
11
|
-
import { I as IconButton } from "../IconButton/index.
|
|
10
|
+
import { B as Badge } from "../Badge/index.07fb40c0.js";
|
|
11
|
+
import { I as IconButton } from "../IconButton/index.9425bdc5.js";
|
|
12
12
|
const ICONS = {
|
|
13
13
|
MENU: "menu.svg"
|
|
14
14
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { aG as PagerRoot } from "../../../styles/index.
|
|
3
|
+
import { aG as PagerRoot } from "../../../styles/index.239f949e.js";
|
|
4
4
|
import { generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { I as IconButton } from "../IconButton/index.
|
|
6
|
+
import { I as IconButton } from "../IconButton/index.9425bdc5.js";
|
|
7
7
|
import { useEnvironment } from "@m4l/core";
|
|
8
8
|
import { useResponsiveContainerStore } from "@m4l/graphics";
|
|
9
9
|
import { shallow } from "zustand/shallow";
|
|
10
|
-
import { T as Typography } from "../Typography/index.
|
|
11
|
-
import { I as Icon } from "../../Icon/index.
|
|
10
|
+
import { T as Typography } from "../Typography/index.45e97bdd.js";
|
|
11
|
+
import { I as Icon } from "../../Icon/index.13aaae3c.js";
|
|
12
12
|
const componentName = "M4LPager";
|
|
13
13
|
generateUtilityClasses(componentName, [
|
|
14
14
|
"root",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { aH as PopoverRoot } from "../../../styles/index.
|
|
2
|
+
import { aH as PopoverRoot } from "../../../styles/index.239f949e.js";
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
@@ -123,7 +123,7 @@ const Popover = (props) => {
|
|
|
123
123
|
},
|
|
124
124
|
...other,
|
|
125
125
|
children: [
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
126
|
+
arrowType !== "no-arrow" && /* @__PURE__ */ jsx(
|
|
127
127
|
ArrowStyle,
|
|
128
128
|
{
|
|
129
129
|
className: classes.arrowStyle,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
3
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { aI as MUISTack } from "../../../styles/index.
|
|
4
|
+
import { aI as MUISTack } from "../../../styles/index.239f949e.js";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
const componentName = "M4LStack";
|
|
7
7
|
generateUtilityClasses(componentName, [
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass, Tab as Tab$1, Skeleton } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { aJ as MUITabs, aK as TabContentRoot, aL as TabRoot, aM as SKTTabWrapper } from "../../../styles/index.
|
|
5
|
+
import { aJ as MUITabs, aK as TabContentRoot, aL as TabRoot, aM as SKTTabWrapper } from "../../../styles/index.239f949e.js";
|
|
6
6
|
import { useModuleSkeleton } from "@m4l/core";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
8
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.0faeade8.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { B as Button, b as buttonClasses } from "../Button/index.
|
|
3
|
+
import { B as Button, b as buttonClasses } from "../Button/index.111f830e.js";
|
|
4
4
|
import { w as withToggle } from "../../../hocs/withToggle/index.548aeace.js";
|
|
5
5
|
const ToggleAbleButton = ({ onToggle, isToggled, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.
|
|
3
|
+
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.9425bdc5.js";
|
|
4
4
|
import { w as withToggle } from "../../../hocs/withToggle/index.548aeace.js";
|
|
5
5
|
const ToggleAbleIconButton = ({
|
|
6
6
|
onToggle,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, generateUtilityClasses, generateUtilityClass, Typography as Typography$1 } from "@mui/material";
|
|
4
|
-
import { aN as WarpperTypography } from "../../../styles/index.
|
|
4
|
+
import { aN as WarpperTypography } from "../../../styles/index.239f949e.js";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
@@ -2,21 +2,17 @@ import React__default, { createContext, useRef, useEffect, useContext } from "re
|
|
|
2
2
|
import { createStore, useStore } from "zustand";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { shallow } from "zustand/shallow";
|
|
5
|
-
import {
|
|
6
|
-
import { useModuleDictionary
|
|
5
|
+
import { useFirstRender } from "@m4l/graphics";
|
|
6
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
7
7
|
import { devtools } from "zustand/middleware";
|
|
8
8
|
import { immer } from "zustand/middleware/immer";
|
|
9
|
-
import { p as popupsUtilityClasses } from "../PopupsViewer/index.d8b9a059.js";
|
|
10
9
|
import { cloneDeep } from "lodash";
|
|
11
|
-
const updateOwnerStateClasses = (state) => {
|
|
12
|
-
state.classes = popupsUtilityClasses(state.ownerState);
|
|
13
|
-
};
|
|
14
10
|
const createPopupsStore = (initProps) => {
|
|
15
11
|
const startProps = {
|
|
16
|
-
classes: popupsUtilityClasses(initProps.ownerState),
|
|
17
12
|
currentZindex: initProps.baseZindex,
|
|
18
13
|
popupsIds: [],
|
|
19
14
|
hashPopups: {},
|
|
15
|
+
getContainer: () => initProps.containerElement,
|
|
20
16
|
...initProps
|
|
21
17
|
};
|
|
22
18
|
return createStore(
|
|
@@ -32,11 +28,6 @@ const createPopupsStore = (initProps) => {
|
|
|
32
28
|
}
|
|
33
29
|
});
|
|
34
30
|
},
|
|
35
|
-
setState: (status) => {
|
|
36
|
-
set((state) => {
|
|
37
|
-
state.ownerState.status = status;
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
31
|
addPopup: (popupProps, options) => {
|
|
41
32
|
if (get().hashPopups[popupProps.popupId]) {
|
|
42
33
|
throw new Error(`Poupup with id ${popupProps.popupId} already exists`);
|
|
@@ -130,40 +121,29 @@ const createPopupsStore = (initProps) => {
|
|
|
130
121
|
set((state) => {
|
|
131
122
|
state.getLabel = newHandler;
|
|
132
123
|
});
|
|
133
|
-
},
|
|
134
|
-
setExternalState: (newExternalState) => {
|
|
135
|
-
set((state) => {
|
|
136
|
-
state.ownerState = { ...state.ownerState, ...newExternalState };
|
|
137
|
-
updateOwnerStateClasses(state);
|
|
138
|
-
});
|
|
139
124
|
}
|
|
140
125
|
}
|
|
141
126
|
})),
|
|
142
|
-
{ name: `Popups store` }
|
|
127
|
+
{ name: `Popups store: ${initProps.storeId}` }
|
|
143
128
|
)
|
|
144
129
|
);
|
|
145
130
|
};
|
|
146
131
|
const PopupsContext = createContext(null);
|
|
147
132
|
function PopupsProvider(props) {
|
|
148
|
-
const { children, initialPopups, baseZindex = 0 } = props;
|
|
133
|
+
const { children, initialPopups, baseZindex = 0, storeId, containerElement } = props;
|
|
149
134
|
const { getLabel } = useModuleDictionary();
|
|
150
|
-
const isDesktop = useResponsiveDesktop();
|
|
151
|
-
const isSkeleton = useModuleSkeleton();
|
|
152
135
|
const isFirstRender = useFirstRender([getLabel]);
|
|
153
136
|
const popupsStoreRef = useRef();
|
|
154
137
|
if (!popupsStoreRef.current) {
|
|
155
138
|
popupsStoreRef.current = createPopupsStore({
|
|
156
139
|
getLabel,
|
|
157
140
|
baseZindex,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
isMobile: !isDesktop,
|
|
161
|
-
isSkeleton
|
|
162
|
-
}
|
|
141
|
+
storeId,
|
|
142
|
+
containerElement
|
|
163
143
|
});
|
|
164
144
|
popupsStoreRef.current?.getState().popupsActions.init(initialPopups || []);
|
|
165
145
|
}
|
|
166
|
-
const { setHandlerGetLabel
|
|
146
|
+
const { setHandlerGetLabel } = useStore(
|
|
167
147
|
popupsStoreRef.current,
|
|
168
148
|
(state) => state.popupsActions,
|
|
169
149
|
shallow
|
|
@@ -173,12 +153,6 @@ function PopupsProvider(props) {
|
|
|
173
153
|
setHandlerGetLabel(getLabel);
|
|
174
154
|
}
|
|
175
155
|
}, [getLabel]);
|
|
176
|
-
useEffect(() => {
|
|
177
|
-
if (isFirstRender) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
setExternalState({ isMobile: !isDesktop, isSkeleton });
|
|
181
|
-
}, [isDesktop, isSkeleton]);
|
|
182
156
|
return /* @__PURE__ */ jsx(PopupsContext.Provider, { value: popupsStoreRef.current, children: /* @__PURE__ */ jsx(React__default.Fragment, { children }) });
|
|
183
157
|
}
|
|
184
158
|
function usePopupsStore(selector, equalityFn) {
|