@m4l/components 3.0.1 → 3.0.3
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/types.d.ts +31 -8
- package/components/AccountPopover/{index-BJWLsxYq.js → index-C1SHV3XZ.js} +3 -3
- package/components/AppBar/{index-BdA-qQyV.js → index-CpiDi7W9.js} +4 -4
- package/components/BaseModule/{index-Bl0GPyrz.js → index-C3PN52OU.js} +1 -1
- package/components/CommonActions/components/ActionCancel/{index-BlaMdPmp.js → index-GS4HJIdE.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index-C5ZI4ZPP.js → index-CX2I9LHt.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index-BbVMcr05.js → index-w0_c4nBH.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index-DGooFqVu.js → index-iGNIvcsn.js} +2 -2
- package/components/CommonActions/components/Actions/{index-B_vOmNZT.js → index-BKkqUxgb.js} +1 -1
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index-0wqcK8ML.js → index-C5oGRz2u.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index-Ozdfjlt2.js → index-D3U8qNWy.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index-D-98uXfl.js → index-BiSoxUSc.js} +1 -1
- package/components/DataGrid/formatters/{index-B5SJg0Qq.js → index-CBg-w3uZ.js} +2 -2
- package/components/DataGrid/{index-7vJWvQtu.js → index-BagYcO5M.js} +4 -4
- package/components/DataGrid/subcomponents/Actions/{index-C-p5O-cU.js → index-D3XaKBc9.js} +11 -11
- package/components/DynamicFilter/{dictionary-DbRGLe8j.js → dictionary-CZftQwMz.js} +2 -2
- package/components/DynamicFilter/{index-D2CmPq_i.js → index-ZWC-ymw6.js} +4 -4
- package/components/DynamicFilter/slots/{dynamicFilterSlots-BSCWv_Rw.js → dynamicFilterSlots-BJg8NW69.js} +5 -5
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicFilter/store/{index-BcaPHLdk.js → index-B8EJidMA.js} +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/{index-BZAxYAp1.js → index-BxXqpZ2r.js} +3 -3
- package/components/DynamicFilter/subcomponents/AppliedFilters/{index-DIFUGgys.js → index-BsusIn_U.js} +4 -4
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/{index-D5BGKd5r.js → index-BDQlXUiN.js} +6 -6
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/{index-DFHDm1e4.js → index-JLN5ZRhw.js} +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/{index-Hn2Rzovd.js → index-BYqh8Qr6.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/{index-B5F1Ji7m.js → index-CjcL1o1V.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/{index-BQlxIk_N.js → index-tYDNVMc6.js} +4 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/{index-DF7EGeSx.js → index-BFUVXE4A.js} +3 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/{index-B6WQUIl7.js → index-BNi-tpG7.js} +5 -5
- package/components/DynamicFilter/subcomponents/FilterActions/{index-D5edNMdo.js → index-BATOWnYB.js} +3 -3
- package/components/DynamicFilter/subcomponents/InputFilter/{index-bbdBrHj0.js → index-yfPsp685.js} +4 -4
- package/components/DynamicFilter/subcomponents/PopoverFilter/{index-CD3aGB5S.js → index-C7ntxhq7.js} +6 -6
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/{index-MiYNpAu0.js → index-DrgdahUr.js} +2 -2
- package/components/FieldLabel/{index-BpW2AGJx.js → index-uRWxFkWU.js} +3 -3
- package/components/GridLayout/{index-HK_hTGnZ.js → index-CRsM-v5t.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index-izY8S7ns.js → index-D7RPlp1E.js} +1 -1
- package/components/GridLayout/subcomponents/Responsive/{index-bpKDnaCd.js → index-uchivok8.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index-OWN-RzRq.js → index-HZgs6M75.js} +1 -1
- package/components/HelperText/{index-COWCXeJp.js → index-D2yPRkGD.js} +2 -2
- package/components/Icon/{index-CedboS6y.js → index-94Yiv115.js} +3 -3
- package/components/Image/{index-B7FhR9uF.js → index-D0wxe0iA.js} +2 -2
- package/components/LanguagePopover/{index-4kPWKmxk.js → index-BvbgbVe2.js} +4 -4
- package/components/LinearProgressIndeterminate/{index-Do7CKcow.js → index-DOKrJpZ4.js} +1 -1
- package/components/LoadingError/{index-CNh7b1ew.js → index-DbVvt8Og.js} +5 -5
- package/components/MFIsolationApp/{index-DJ-MUHoQ.js → index-CzX8pqYQ.js} +3 -3
- package/components/MFLoader/{index-Bcg9TXnJ.js → index-B4k4mKvG.js} +2 -2
- package/components/ModalDialog/{index-BuGRs967.js → index-D8uF8eMi.js} +3 -3
- package/components/NavLink/{index-B6Gmzyl0.js → index-mHY1nBUC.js} +2 -2
- package/components/NoItemSelected/{index-CMet73v_.js → index-B1BsnTIa.js} +1 -1
- package/components/ObjectLogs/{index-_8l1PbEQ.js → index-CNAZX4Ww.js} +9 -9
- package/components/PDFViewer/{index-CV9x1XKR.js → index-D_ICdj18.js} +2 -2
- package/components/Page/{index-DKQLs5le.js → index-BjeY10EA.js} +1 -1
- package/components/PaperForm/{index-DciWfnML.js → index-B1W7MP_K.js} +2 -2
- package/components/Period/{index-DxijnNw6.js → index-Dvul8haj.js} +4 -4
- package/components/PrintingSystem/{index-sSZkZbrr.js → index-B56vJjAF.js} +13 -13
- package/components/PrintingSystem/subcomponents/BodyNode/{index-CxYjxWxL.js → index-D5KO0QfW.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index-D85qi4Qz.js → index-Ba_7C2wF.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index-BA-IYLWh.js → index-BNNGCXzD.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index-Bn9eNtAi.js → index-DJkRhg7I.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index-gNEGVptD.js → index-BheH6Pxb.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index-CiVr-jBF.js → index-D10NbTfK.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index-BGbvh0Xk.js → index-eDLVQIAt.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index-DvhbyOo3.js → index-G_ggggdA.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index-Cw8ZUwsm.js → index-Ct4ZH9_9.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index-l9SFQ11V.js → index-CC3kIul5.js} +1 -1
- package/components/PropertyValue/{index-hcXIE6qk.js → index-C8XbXuPK.js} +3 -3
- package/components/Resizeable/{index-ObbOlXFx.js → index-enxKr_xx.js} +1 -1
- package/components/ScrollBar/{index-BpTjE7o3.js → index-CHwim4Ga.js} +1 -1
- package/components/SideBar/{index-Cg1bZn8y.js → index-Bi1cZIrX.js} +5 -5
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +1 -1
- package/components/SplitLayout/{index-CYnKlhi5.js → index-CKvln8Em.js} +1 -1
- package/components/ToastContainer/{index-B5VGIn45.js → index-CcDbkO5x.js} +2 -2
- package/components/animate/LoadingScreen/{index-CzDq3A0i.js → index-CxwaarhX.js} +1 -1
- package/components/animate/{index-mH4o-crX.js → index-C2MciKBn.js} +1 -1
- package/components/areas/components/AreasAdmin/{index-qqSduaty.js → index-w4ZiYbUn.js} +14 -14
- package/components/areas/components/AreasViewer/{index-D5If8gFK.js → index-C_Doyhlf.js} +52 -60
- package/components/areas/contexts/AreasContext/{index-Dyj8tCdG.js → index-BhgVSihv.js} +10 -5
- package/components/areas/contexts/AreasContext/types.d.ts +1 -0
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +5 -0
- package/components/areas/hooks/index.d.ts +1 -0
- package/components/areas/hooks/useAreas/{index-o0DvT3xZ.js → index-D9svmsAV.js} +1 -1
- package/components/areas/hooks/useSetWindowsTitle/index.d.ts +1 -0
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +31 -0
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.d.ts +3 -0
- package/components/commercial/AppBarCommercial/{index-DvigwCQP.js → index-C2XuD_Di.js} +1 -1
- package/components/commercial/SectionCommercial/{index-CLHGooDg.js → index-CQ909EmI.js} +1 -1
- package/components/commercial/TopBar/{index-DJNYXgHq.js → index-C3oRupMz.js} +5 -5
- package/components/commercial/{index-BLUHQfcA.js → index-D8V8uETc.js} +3 -3
- package/components/formatters/BooleanFormatter/{index-DpF0x_xp.js → index-Cgmuw-1G.js} +2 -2
- package/components/formatters/{index-CDt8LzvL.js → index-D52mbpAz.js} +2 -2
- package/components/hook-form/HelperError/{index-D-_czK9n.js → index-B6yzmaGZ.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index-BhbgwNUz.js → index-BAUo34ue.js} +6 -6
- package/components/hook-form/RHFAutocompleteAsync/{index-BnUgdSnR.js → index-C7qy6PHH.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index-ubHFuH1F.js → index-Dmsakuyn.js} +3 -3
- package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/{index-DBpi0Zhe.js → index-DCTeXEXx.js} +6 -6
- package/components/hook-form/RHFDateTime/{index-BtfOlX4T.js → index-Cn5PXhkh.js} +4 -4
- package/components/hook-form/RHFInputNumberSpinner/constants.d.ts +1 -0
- package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnnerEnum.d.ts +9 -0
- package/components/hook-form/RHFInputNumberSpinner/types.d.ts +21 -0
- package/components/hook-form/RHFPeriod/{index-BicAIry0.js → index-BeUY33Fb.js} +4 -4
- package/components/hook-form/RHFRadioGroup/{index-Di37rp0B.js → index-DCq9ErFn.js} +1 -1
- package/components/hook-form/RHFTextField/{index-Cz7BMTLe.js → index-BcOjGk_X.js} +4 -4
- package/components/hook-form/RHFUpload/{index-D52JNxDh.js → index-B9Yv-1cI.js} +5 -5
- package/components/maps/components/GpsTools/{index-BP1dIwh6.js → index-CPthTXb6.js} +22 -22
- package/components/maps/components/Map/{index-CS6xr1Fl.js → index-h_YuCA40.js} +12 -12
- package/components/modal/{WindowBase-CLBER1xc.js → WindowBase-CbvNt18-.js} +3 -3
- package/components/modal/{WindowConfirm-DraflAKP.js → WindowConfirm-BcBjlBYB.js} +6 -6
- package/components/mui_extended/Accordion/{index-ZFpEUCnw.js → index-CImLE2c2.js} +4 -4
- package/components/mui_extended/Avatar/{index-Bk4Hq2nk.js → index-QcHxAObO.js} +1 -1
- package/components/mui_extended/Badge/{index-D6F1o3k2.js → index-CkxVcDch.js} +1 -1
- package/components/mui_extended/Button/{index-DlzpoczE.js → index-CeKWngaw.js} +3 -3
- package/components/mui_extended/Button/styles.d.ts +1 -1
- package/components/mui_extended/{CheckBox-ByxYagHV.js → CheckBox-D4lOF2ZN.js} +2 -2
- package/components/mui_extended/IconButton/{index-BfDbi0cC.js → index-8KJAFQdk.js} +2 -2
- package/components/mui_extended/IconButton/types.d.ts +18 -0
- package/components/mui_extended/MenuActions/MenuActions.d.ts +5 -0
- package/components/mui_extended/MenuActions/constant.d.ts +5 -0
- package/components/mui_extended/MenuActions/dictionary.d.ts +7 -0
- package/components/mui_extended/MenuActions/index-DUH9jcY3.js +202 -0
- package/components/mui_extended/MenuActions/index.d.ts +2 -5
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum.d.ts +9 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +24 -0
- package/components/mui_extended/MenuActions/slots/index.d.ts +2 -0
- package/components/mui_extended/MenuActions/types.d.ts +11 -2
- package/components/mui_extended/Pager/{index-CRgYDkV8.js → index-CPojTM6X.js} +4 -4
- package/components/mui_extended/Popover/{index-C6_2t4L1.js → index-ADNJKYaU.js} +1 -1
- package/components/mui_extended/Stack/{index-CV2W-_eL.js → index-COSPZIcB.js} +1 -1
- package/components/mui_extended/Tab/{index-PyZxxeDt.js → index-DIBG_fln.js} +1 -1
- package/components/mui_extended/Tabs/styles.d.ts +1 -1
- package/components/mui_extended/ToggleButton/{index-X6htsgfF.js → index-iPblHkXQ.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index-mT-xXWg9.js → index-C-84m9IF.js} +1 -1
- package/components/mui_extended/Typography/{index-DKPqV11f.js → index-DdbNIn5v.js} +1 -1
- package/components/popups/PopupsViewer/{index-D8iTb2JJ.js → index-CZGtpMc5.js} +3 -3
- package/components/popups/PopupsViewer/slots/{popupsViewerSlots-DEQAZ8fq.js → popupsViewerSlots-a4Hanx4W.js} +1 -1
- package/contexts/ModalContext/{index-CMPcjPCy.js → index-5DJdcEm0.js} +1 -1
- package/contexts/RHFormContext/{index-B4a0h0fX.js → index-D-Aek3pv.js} +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useFormAddEdit/{index-DvRNtaub.js → index-DfH0uOq9.js} +2 -2
- package/hooks/useInterval/index.d.ts +7 -0
- package/hooks/useModal/{index-C9r1LQIz.js → index-CHufWxiG.js} +1 -1
- package/hooks/useTab/{index-DTbLh_DH.js → index-B9UPdit5.js} +1 -1
- package/index.js +114 -93
- package/package.json +1 -1
- package/style.css +65 -1
- package/styles/MenuActions.styles.d.ts +2 -0
- package/styles/{index-Cc9p_h7i.js → index-DITv2ClE.js} +49 -19
- package/components/mui_extended/MenuActions/classes/constants.d.ts +0 -1
- package/components/mui_extended/MenuActions/classes/index.d.ts +0 -7
- package/components/mui_extended/MenuActions/classes/types.d.ts +0 -7
- package/components/mui_extended/MenuActions/icons.d.ts +0 -3
- package/components/mui_extended/MenuActions/index-CUz70BPj.js +0 -171
- package/components/mui_extended/MenuActions/styles.d.ts +0 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { an as RHFPeriodRoot } from "../../../styles/index-
|
|
2
|
+
import { an as RHFPeriodRoot } from "../../../styles/index-DITv2ClE.js";
|
|
3
3
|
import { useFormContext, Controller } from "react-hook-form";
|
|
4
|
-
import { H as HelperText } from "../../HelperText/index-
|
|
4
|
+
import { H as HelperText } from "../../HelperText/index-D2yPRkGD.js";
|
|
5
5
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import { useModuleSkeleton } from "@m4l/core";
|
|
8
8
|
import { useFormFocus } from "../../../index.js";
|
|
9
|
-
import { F as FieldLabel } from "../../FieldLabel/index-
|
|
10
|
-
import { P as Period } from "../../Period/index-
|
|
9
|
+
import { F as FieldLabel } from "../../FieldLabel/index-uRWxFkWU.js";
|
|
10
|
+
import { P as Period } from "../../Period/index-Dvul8haj.js";
|
|
11
11
|
const componentName = "M4LRHFPeriod";
|
|
12
12
|
generateUtilityClasses(componentName, [
|
|
13
13
|
/* elements */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import { RadioGroup, FormControlLabel, FormHelperText, Radio } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../../Icon/index-
|
|
4
|
+
import { I as Icon } from "../../Icon/index-94Yiv115.js";
|
|
5
5
|
function OptionIconLabelFormatter(option, getOptionLabel, getOptionIconUrl) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
7
7
|
/* @__PURE__ */ jsx(
|
|
@@ -2,16 +2,16 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
3
3
|
import { Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
|
|
4
4
|
import { forwardRef, useState, useEffect } from "react";
|
|
5
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index-
|
|
5
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index-8KJAFQdk.js";
|
|
6
6
|
import { useFormContext, Controller } from "react-hook-form";
|
|
7
|
-
import { ao as SkeletonTextFieldRoot, ap as WrapperSkeletonRHFTextField, aq as RHFTextFieldRoot, ar as RHFTextFieldPasswordRoot } from "../../../styles/index-
|
|
7
|
+
import { ao as SkeletonTextFieldRoot, ap as WrapperSkeletonRHFTextField, aq as RHFTextFieldRoot, ar as RHFTextFieldPasswordRoot } from "../../../styles/index-DITv2ClE.js";
|
|
8
8
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
|
|
9
9
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
10
|
import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
|
|
11
|
-
import { H as HelperText } from "../../HelperText/index-
|
|
11
|
+
import { H as HelperText } from "../../HelperText/index-D2yPRkGD.js";
|
|
12
12
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
13
13
|
import { useFormFocus } from "../../../index.js";
|
|
14
|
-
import { F as FieldLabel } from "../../FieldLabel/index-
|
|
14
|
+
import { F as FieldLabel } from "../../FieldLabel/index-uRWxFkWU.js";
|
|
15
15
|
const RHFTEXTFIELD_ROOT_TEST_ID = "RHFTextFieldRoot";
|
|
16
16
|
const RHFTEXTFIELD_INPUT_TEST_ID = "RHFTextFieldInput";
|
|
17
17
|
const RHFTEXTFIELD_PREFIX = "RHFTextField";
|
|
@@ -3,15 +3,15 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { useFormContext, Controller } from "react-hook-form";
|
|
4
4
|
import isString from "lodash/isString";
|
|
5
5
|
import { useDropzone } from "react-dropzone";
|
|
6
|
-
import { I as Image } from "../../Image/index-
|
|
6
|
+
import { I as Image } from "../../Image/index-D0wxe0iA.js";
|
|
7
7
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
8
|
-
import { as as UploadImageRoot, at as WrapperRHFUploadImage } from "../../../styles/index-
|
|
8
|
+
import { as as UploadImageRoot, at as WrapperRHFUploadImage } from "../../../styles/index-DITv2ClE.js";
|
|
9
9
|
import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
10
10
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
|
|
11
11
|
import { unstable_composeClasses } from "@mui/base";
|
|
12
|
-
import { T as Typography } from "../../mui_extended/Typography/index-
|
|
13
|
-
import { B as Button } from "../../mui_extended/Button/index-
|
|
14
|
-
import { H as HelperText } from "../../HelperText/index-
|
|
12
|
+
import { T as Typography } from "../../mui_extended/Typography/index-DdbNIn5v.js";
|
|
13
|
+
import { B as Button } from "../../mui_extended/Button/index-CeKWngaw.js";
|
|
14
|
+
import { H as HelperText } from "../../HelperText/index-D2yPRkGD.js";
|
|
15
15
|
const ICON_PREFIX = "M4LRHFUploadImage";
|
|
16
16
|
const getNameRHFUploadImageDataTestId = (KEY) => {
|
|
17
17
|
return `${ICON_PREFIX}-${KEY}`;
|
|
@@ -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-DITv2ClE.js";
|
|
9
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/index-ZWC-ymw6.js";
|
|
10
|
+
import { C as ColumnIconFormatter } from "../../../DataGrid/formatters/index-CBg-w3uZ.js";
|
|
11
11
|
import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.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-
|
|
14
|
+
import { H as HelperError } from "../../../hook-form/HelperError/index-B6yzmaGZ.js";
|
|
15
|
+
import { u as useModal } from "../../../../hooks/useModal/index-CHufWxiG.js";
|
|
16
16
|
import { u as usePopupsStore } from "../../../popups/PopupsProvider/index-DhSxmtfJ.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-w0_c4nBH.js";
|
|
22
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm-BcBjlBYB.js";
|
|
23
|
+
import { A as Actions } from "../../../CommonActions/components/Actions/index-BKkqUxgb.js";
|
|
24
|
+
import { B as Button } from "../../../mui_extended/Button/index-CeKWngaw.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-B3HygFCM.js";
|
|
28
|
-
import { u as useTab } from "../../../../hooks/useTab/index-
|
|
28
|
+
import { u as useTab } from "../../../../hooks/useTab/index-B9UPdit5.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-B1W7MP_K.js";
|
|
32
|
+
import { R as RHFAutocomplete } from "../../../hook-form/RHFAutocomplete/index-BAUo34ue.js";
|
|
33
|
+
import { R as RHFTextField } from "../../../hook-form/RHFTextField/index-BcOjGk_X.js";
|
|
34
|
+
import { S as Stack } from "../../../mui_extended/Stack/index-COSPZIcB.js";
|
|
35
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index-8KJAFQdk.js";
|
|
36
|
+
import { P as PropertyValue } from "../../../PropertyValue/index-C8XbXuPK.js";
|
|
37
|
+
import { R as RHFColorPicker } from "../../../hook-form/RHFColorPicker/index-DCTeXEXx.js";
|
|
38
|
+
import { T as Tabs, a as Tab, b as TabContent, c as TabProvider } from "../../../mui_extended/Tab/index-DIBG_fln.js";
|
|
39
|
+
import { I as Icon } from "../../../Icon/index-94Yiv115.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-DfH0uOq9.js";
|
|
42
|
+
import { u as useMapStore, C as CommonFeatureRender, G as GPS_TOOLS_POPUP_ID } from "../Map/index-h_YuCA40.js";
|
|
43
|
+
import { D as DataGrid } from "../../../DataGrid/index-BagYcO5M.js";
|
|
44
44
|
const COMPONENT_CLASS_NAME = "M4LMapGpsTools";
|
|
45
45
|
const COMPONENT_MAP_TOOLS_ID = "gps_tools";
|
|
46
46
|
const STYLE_OPACITIES = [
|
|
@@ -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-BKkqUxgb.js";
|
|
13
|
+
import { B as Button } from "../../../mui_extended/Button/index-CeKWngaw.js";
|
|
14
14
|
import * as Yup from "yup";
|
|
15
15
|
import { u as useFormReadyForUpdate } from "../../../../hooks/useFormReadyForUpdate/index-B3HygFCM.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-
|
|
16
|
+
import { R as RHFAutocompleteAsync } from "../../../hook-form/RHFAutocompleteAsync/index-C7qy6PHH.js";
|
|
17
|
+
import { S as Stack } from "../../../mui_extended/Stack/index-COSPZIcB.js";
|
|
18
|
+
import { R as RHFormProvider } from "../../../../contexts/RHFormContext/index-D-Aek3pv.js";
|
|
19
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index-8KJAFQdk.js";
|
|
20
20
|
import { u as usePopupsStore, P as PopupsProvider } from "../../../popups/PopupsProvider/index-DhSxmtfJ.js";
|
|
21
|
-
import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index-
|
|
22
|
-
import { D as DataGrid } from "../../../DataGrid/index-
|
|
21
|
+
import { T as ToggleIconButton } from "../../../mui_extended/ToggleIconButton/index-C-84m9IF.js";
|
|
22
|
+
import { D as DataGrid } from "../../../DataGrid/index-BagYcO5M.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-BaCawLr1.js";
|
|
25
|
-
import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index-
|
|
25
|
+
import { I as Icon, M as MarkerIconLabel } from "../../../Icon/index-94Yiv115.js";
|
|
26
26
|
import { u as useStateRef } from "../../../../hooks/useStateRef/index-C3P6ZK3m.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-D4lOF2ZN.js";
|
|
28
|
+
import { P as Popover } from "../../../mui_extended/Popover/index-ADNJKYaU.js";
|
|
29
|
+
import { P as PopupsViewer } from "../../../popups/PopupsViewer/index-CZGtpMc5.js";
|
|
30
30
|
import { createPathComponent } from "@react-leaflet/core";
|
|
31
31
|
import "leaflet.markercluster";
|
|
32
32
|
import { cloneDeep, throttle } from "lodash";
|
|
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { m as modalUtilityClasses } from "./index-CydPIpKZ.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-94Yiv115.js";
|
|
6
|
+
import { I as IconButton } from "../mui_extended/IconButton/index-8KJAFQdk.js";
|
|
7
|
+
import { u as useModal } from "../../hooks/useModal/index-CHufWxiG.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-BKkqUxgb.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-CHufWxiG.js";
|
|
6
|
+
import { I as Image } from "../Image/index-D0wxe0iA.js";
|
|
7
7
|
import { m as modalUtilityClasses } from "./index-CydPIpKZ.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-CbvNt18-.js";
|
|
9
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index-GS4HJIdE.js";
|
|
10
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index-iGNIvcsn.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-8KJAFQdk.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-DITv2ClE.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
|
|
9
9
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId-BaBTWhBr.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-94Yiv115.js";
|
|
11
|
+
import { T as Typography } from "../Typography/index-DdbNIn5v.js";
|
|
12
12
|
const componentName = "M4LAccordion";
|
|
13
13
|
generateUtilityClasses(componentName, [
|
|
14
14
|
/* elements */
|
|
@@ -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-CF-669v-.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-DITv2ClE.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-DITv2ClE.js";
|
|
5
5
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.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-DITv2ClE.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-D0wxe0iA.js";
|
|
10
10
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.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-DdbNIn5v.js";
|
|
13
13
|
const componentName$2 = "M4LButton";
|
|
14
14
|
const buttonClasses = generateUtilityClasses(componentName$2, [
|
|
15
15
|
/* elements */
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
export declare const ButtonRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
3
|
export declare const SKTButton: import("@emotion/styled").StyledComponent<import("@mui/material").SkeletonOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
4
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
5
|
-
}, "style" | "children" | "width" | "className" | "height" | "animation" | "
|
|
5
|
+
}, "style" | "children" | "width" | "className" | "height" | "animation" | "sx" | "classes" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -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-DITv2ClE.js";
|
|
9
|
+
import { F as FieldLabel } from "../FieldLabel/index-uRWxFkWU.js";
|
|
10
10
|
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
11
11
|
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
12
12
|
/* elements */
|
|
@@ -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-94Yiv115.js";
|
|
6
|
+
import { aE as IconButtonRoot } from "../../../styles/index-DITv2ClE.js";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
1
3
|
import { IconProps } from '../../Icon/types';
|
|
2
4
|
import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
|
|
3
5
|
export declare type IconButtonVariants = 'primary' | 'secondary' | 'line';
|
|
@@ -15,3 +17,19 @@ export interface OwnerState {
|
|
|
15
17
|
isFocus: boolean;
|
|
16
18
|
isDisabled?: boolean;
|
|
17
19
|
}
|
|
20
|
+
export declare enum IconButtonSlots {
|
|
21
|
+
root = "root",
|
|
22
|
+
skeleton = "skeleton",
|
|
23
|
+
sizemSall = "sizemSall",
|
|
24
|
+
sizeMedium = "sizeMedium",
|
|
25
|
+
variantPrimary = "variantPrimary",
|
|
26
|
+
variantSecondary = "variantSecondary",
|
|
27
|
+
variantLine = "variantLine",
|
|
28
|
+
isFocus = "isFocus",
|
|
29
|
+
isDisabled = "isDisabled",
|
|
30
|
+
/**Toggle */
|
|
31
|
+
togglePressed = "togglePressed",
|
|
32
|
+
toggleNotPressed = "toggleNotPressed"
|
|
33
|
+
}
|
|
34
|
+
export declare type IconButtonSlotsType = keyof typeof IconButtonSlots;
|
|
35
|
+
export declare type IconButtonStyles = Partial<OverridesStyleRules<IconButtonSlotsType, 'M4LIconButton', Theme> | undefined> | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuActionsProps } from './types';
|
|
3
|
+
export declare function MenuActions(props: MenuActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const MemonizedMenuActions: React.MemoExoticComponent<typeof MenuActions>;
|
|
5
|
+
export default MenuActions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MENU_ACTIONS_DICTIONARY_ID = "menu_actions";
|
|
2
|
+
export declare function getMenuActionsComponentsDictionary(): string[];
|
|
3
|
+
export declare const DICTIONARY: {
|
|
4
|
+
readonly no_actions_label: "no_actions_label";
|
|
5
|
+
};
|
|
6
|
+
export declare type TypeDictionary = typeof DICTIONARY;
|
|
7
|
+
export declare const getMenuActionsDictionary: (key: keyof TypeDictionary) => string;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default, { useState, useEffect, useMemo } from "react";
|
|
3
|
+
import { styled, useTheme } from "@mui/material/styles";
|
|
4
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
5
|
+
import { MenuItem } from "@mui/material";
|
|
6
|
+
import { aF as menuActionsStyles } from "../../../styles/index-DITv2ClE.js";
|
|
7
|
+
import { P as Popover } from "../Popover/index-ADNJKYaU.js";
|
|
8
|
+
import { B as Badge } from "../Badge/index-CkxVcDch.js";
|
|
9
|
+
import { I as IconButton } from "../IconButton/index-8KJAFQdk.js";
|
|
10
|
+
import { I as Icon } from "../../Icon/index-94Yiv115.js";
|
|
11
|
+
const ICON_PATH = "frontend/components/menu_actions/assets/icons";
|
|
12
|
+
const ICONS = {
|
|
13
|
+
MENU: "menu.svg"
|
|
14
|
+
};
|
|
15
|
+
const MENU_ACTIONS_KEY_COMPONENT = "M4LMenuActions";
|
|
16
|
+
var MenuActionsSlots = /* @__PURE__ */ ((MenuActionsSlots2) => {
|
|
17
|
+
MenuActionsSlots2["root"] = "root";
|
|
18
|
+
MenuActionsSlots2["badge"] = "badge";
|
|
19
|
+
MenuActionsSlots2["iconButton"] = "iconButton";
|
|
20
|
+
MenuActionsSlots2["menuItem"] = "menuItem";
|
|
21
|
+
MenuActionsSlots2["menuItemIcon"] = "menuItemIcon";
|
|
22
|
+
MenuActionsSlots2["menuItemLabel"] = "menuItemLabel";
|
|
23
|
+
MenuActionsSlots2["labelEmpty"] = "labelEmpty";
|
|
24
|
+
return MenuActionsSlots2;
|
|
25
|
+
})(MenuActionsSlots || {});
|
|
26
|
+
const RootStyled = styled(Popover, {
|
|
27
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
28
|
+
slot: MenuActionsSlots.root
|
|
29
|
+
})(menuActionsStyles?.root);
|
|
30
|
+
const BadgeStyled = styled(Badge, {
|
|
31
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
32
|
+
slot: MenuActionsSlots.badge
|
|
33
|
+
})(menuActionsStyles?.badge);
|
|
34
|
+
const IconButtonStyled = styled(IconButton, {
|
|
35
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
36
|
+
slot: MenuActionsSlots.iconButton
|
|
37
|
+
})(menuActionsStyles?.iconButton);
|
|
38
|
+
const MenuItemStyled = styled(MenuItem, {
|
|
39
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
40
|
+
slot: MenuActionsSlots.menuItem
|
|
41
|
+
})(menuActionsStyles?.menuItem);
|
|
42
|
+
const LabelMenuItemStyled = styled("div", {
|
|
43
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
44
|
+
slot: MenuActionsSlots.menuItemLabel
|
|
45
|
+
})(menuActionsStyles?.menuItemLabel);
|
|
46
|
+
const IconButtonUrlStyled = styled(Icon, {
|
|
47
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
48
|
+
slot: MenuActionsSlots.menuItemIcon
|
|
49
|
+
})(menuActionsStyles?.menuItemIcon);
|
|
50
|
+
const LabelEmptyStyled = styled("div", {
|
|
51
|
+
name: MENU_ACTIONS_KEY_COMPONENT,
|
|
52
|
+
slot: MenuActionsSlots.labelEmpty
|
|
53
|
+
})(menuActionsStyles?.labelEmpty);
|
|
54
|
+
const MENU_ACTIONS_DICTIONARY_ID = "menu_actions";
|
|
55
|
+
const DICTIONARY = {
|
|
56
|
+
no_actions_label: "no_actions_label"
|
|
57
|
+
};
|
|
58
|
+
const getMenuActionsDictionary = (key) => {
|
|
59
|
+
return `${MENU_ACTIONS_DICTIONARY_ID}.${key}`;
|
|
60
|
+
};
|
|
61
|
+
function MenuActions(props) {
|
|
62
|
+
const {
|
|
63
|
+
menuActions,
|
|
64
|
+
endListElement,
|
|
65
|
+
menuActionSx,
|
|
66
|
+
iconButtonClassName = "",
|
|
67
|
+
objItem = {},
|
|
68
|
+
urlIcon,
|
|
69
|
+
toolTip = "",
|
|
70
|
+
marginTop = -1,
|
|
71
|
+
marginBottom,
|
|
72
|
+
marginLeft,
|
|
73
|
+
marginRight,
|
|
74
|
+
width = 200,
|
|
75
|
+
withBadge = false,
|
|
76
|
+
badgeContent,
|
|
77
|
+
arrowType = "right-top",
|
|
78
|
+
externalOpen = null,
|
|
79
|
+
externalClose,
|
|
80
|
+
...other
|
|
81
|
+
} = props;
|
|
82
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
83
|
+
const { getLabel } = useModuleDictionary();
|
|
84
|
+
const [open, setOpen] = useState(null);
|
|
85
|
+
const handleOpen = (event) => {
|
|
86
|
+
setOpen(event.currentTarget);
|
|
87
|
+
};
|
|
88
|
+
const theme = useTheme();
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
let mounted = true;
|
|
91
|
+
if (mounted) {
|
|
92
|
+
setOpen(externalOpen);
|
|
93
|
+
}
|
|
94
|
+
return function cleanUp() {
|
|
95
|
+
mounted = false;
|
|
96
|
+
};
|
|
97
|
+
}, [externalOpen]);
|
|
98
|
+
const urlFinalIcon = useMemo(() => {
|
|
99
|
+
if (urlIcon) return urlIcon;
|
|
100
|
+
return `${host_static_assets}/${environment_assets}/${ICON_PATH}/${ICONS.MENU}`;
|
|
101
|
+
}, [urlIcon, host_static_assets, environment_assets]);
|
|
102
|
+
const handleClose = (e) => {
|
|
103
|
+
e.stopPropagation();
|
|
104
|
+
setOpen(null);
|
|
105
|
+
externalClose && externalClose(null);
|
|
106
|
+
};
|
|
107
|
+
const handleClick = (e, menuAction) => {
|
|
108
|
+
e.stopPropagation();
|
|
109
|
+
setOpen(null);
|
|
110
|
+
menuAction.onClick();
|
|
111
|
+
};
|
|
112
|
+
const finalActions = useMemo(() => {
|
|
113
|
+
let ret;
|
|
114
|
+
if (typeof menuActions !== "function") {
|
|
115
|
+
ret = menuActions;
|
|
116
|
+
} else {
|
|
117
|
+
ret = menuActions(objItem);
|
|
118
|
+
}
|
|
119
|
+
return ret;
|
|
120
|
+
}, [menuActions, objItem]);
|
|
121
|
+
const IconButtonElement = (
|
|
122
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
123
|
+
/* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(BadgeStyled, { ownerState: {}, badgeContent, children: /* @__PURE__ */ jsx(
|
|
124
|
+
IconButtonStyled,
|
|
125
|
+
{
|
|
126
|
+
ownerState: {},
|
|
127
|
+
src: urlFinalIcon,
|
|
128
|
+
onClick: handleOpen,
|
|
129
|
+
tooltip: toolTip,
|
|
130
|
+
className: iconButtonClassName
|
|
131
|
+
}
|
|
132
|
+
) }) : /* @__PURE__ */ jsx(
|
|
133
|
+
IconButtonStyled,
|
|
134
|
+
{
|
|
135
|
+
ownerState: {},
|
|
136
|
+
src: urlFinalIcon,
|
|
137
|
+
onClick: handleOpen,
|
|
138
|
+
tooltip: toolTip,
|
|
139
|
+
className: iconButtonClassName
|
|
140
|
+
}
|
|
141
|
+
) })
|
|
142
|
+
);
|
|
143
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
144
|
+
IconButtonElement,
|
|
145
|
+
/* @__PURE__ */ jsxs(
|
|
146
|
+
RootStyled,
|
|
147
|
+
{
|
|
148
|
+
ownerState: {},
|
|
149
|
+
id: "Popover",
|
|
150
|
+
open: Boolean(open),
|
|
151
|
+
anchorEl: open,
|
|
152
|
+
onClose: handleClose,
|
|
153
|
+
arrowType,
|
|
154
|
+
sx: {
|
|
155
|
+
marginTop,
|
|
156
|
+
marginBottom,
|
|
157
|
+
marginLeft,
|
|
158
|
+
marginRight,
|
|
159
|
+
width,
|
|
160
|
+
maxWidth: 300,
|
|
161
|
+
"& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
|
|
162
|
+
...theme.components?.M4LMenuActions?.styleOverrides,
|
|
163
|
+
...menuActionSx
|
|
164
|
+
},
|
|
165
|
+
...other,
|
|
166
|
+
children: [
|
|
167
|
+
finalActions.map(
|
|
168
|
+
(menuAction, index) => menuAction.label || menuAction.dictionaryId ? /* @__PURE__ */ jsxs(
|
|
169
|
+
MenuItemStyled,
|
|
170
|
+
{
|
|
171
|
+
dense: true,
|
|
172
|
+
onClick: (e) => {
|
|
173
|
+
handleClick(e, menuAction);
|
|
174
|
+
},
|
|
175
|
+
sx: { color: menuAction.color ?? "text.main" },
|
|
176
|
+
disabled: menuAction.disabled,
|
|
177
|
+
ownerState: { variant: menuAction.variant, color: menuAction.color },
|
|
178
|
+
children: [
|
|
179
|
+
menuAction.urlIcon ? /* @__PURE__ */ jsx(
|
|
180
|
+
IconButtonUrlStyled,
|
|
181
|
+
{
|
|
182
|
+
ownerState: { variant: menuAction.variant },
|
|
183
|
+
src: menuAction.urlIcon
|
|
184
|
+
}
|
|
185
|
+
) : null,
|
|
186
|
+
/* @__PURE__ */ jsx(LabelMenuItemStyled, { ownerState: {}, children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
`menu_action_${index}`
|
|
190
|
+
) : /* @__PURE__ */ jsx(LabelEmptyStyled, { ownerState: {}, children: getLabel(getMenuActionsDictionary(DICTIONARY.no_actions_label)) }, `menu_action_${index}`)
|
|
191
|
+
),
|
|
192
|
+
endListElement ? endListElement : null
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
] });
|
|
197
|
+
}
|
|
198
|
+
const MemonizedMenuActions = React__default.memo(MenuActions);
|
|
199
|
+
export {
|
|
200
|
+
MenuActions as M,
|
|
201
|
+
MemonizedMenuActions as a
|
|
202
|
+
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function MenuActions(props: MenuActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const MemonizedMenuActions: React.MemoExoticComponent<typeof MenuActions>;
|
|
5
|
-
export default MenuActions;
|
|
1
|
+
export * from './MenuActions';
|
|
2
|
+
export { getMenuActionsComponentsDictionary } from './dictionary';
|