@m4l/components 3.1.7 → 3.1.8
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/index.js +183 -340
- package/node_modules-CQtkw0uG.js +7350 -0
- package/package.json +1 -1
- package/vendor-AfIOyqRr.js +24636 -0
- package/components/AccountPopover/index-Dm2-k-Mv.js +0 -334
- package/components/AppBar/index-i0rhG3J1.js +0 -93
- package/components/BaseModule/index-CiNNlxzS.js +0 -30
- package/components/CommonActions/components/ActionCancel/index-CIdpDXkr.js +0 -12
- package/components/CommonActions/components/ActionFormCancel/index-CpyASN3q.js +0 -56
- package/components/CommonActions/components/ActionFormIntro/index-7KKtcUra.js +0 -33
- package/components/CommonActions/components/ActionIntro/index-CqqDZZcG.js +0 -25
- package/components/CommonActions/components/Actions/index-CuG1pnXW.js +0 -70
- package/components/DataGrid/constants-8L7QgBKi.js +0 -10
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index-CveSCbq_.js +0 -26
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-CHqvieM2.js +0 -22
- package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-DE6bwaKP.js +0 -23
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
- package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
- package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
- package/components/DataGrid/formatters/index-CrZXPa0e.js +0 -13
- package/components/DataGrid/index-BZ-lbmuU.js +0 -908
- package/components/DataGrid/subcomponents/Actions/index-CHvPZ4Ru.js +0 -549
- package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
- package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
- package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
- package/components/DynamicFilter/dictionary-PrbXU3VZ.js +0 -51
- package/components/DynamicFilter/index-DZiJc9h7.js +0 -116
- package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
- package/components/DynamicFilter/slots/dynamicFilterSlots-DHxelhXP.js +0 -151
- package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
- package/components/DynamicFilter/store/index-BT-eWVnJ.js +0 -254
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-B32bAzi-.js +0 -60
- package/components/DynamicFilter/subcomponents/AppliedFilters/index-Bha19drV.js +0 -26
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BmvzoHit.js +0 -40
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-BcO3SlP5.js +0 -129
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BCJhpNS8.js +0 -171
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-DCNhz68u.js +0 -153
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-BdypjM1Y.js +0 -146
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-D-NFIVnK.js +0 -114
- package/components/DynamicFilter/subcomponents/FieldTypes/index-BwQHJqk9.js +0 -38
- package/components/DynamicFilter/subcomponents/FilterActions/index-B9UWmk07.js +0 -88
- package/components/DynamicFilter/subcomponents/InputFilter/index-CfGb1TfV.js +0 -188
- package/components/DynamicFilter/subcomponents/PopoverFilter/index-DkfRGrlO.js +0 -158
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DSegwAm2.js +0 -63
- package/components/FieldLabel/index-CI57EizR.js +0 -54
- package/components/GridLayout/index-C4HyxNYX.js +0 -1044
- package/components/GridLayout/subcomponents/Griditem/index-C7jT4s8t.js +0 -395
- package/components/GridLayout/subcomponents/Responsive/index-BKcU2OnF.js +0 -348
- package/components/GridLayout/subcomponents/SizeProvider/index-1aJ-e_54.js +0 -71
- package/components/HelperText/index-Crn_XIPF.js +0 -50
- package/components/Icon/index-C89MAkeH.js +0 -176
- package/components/Image/index-COp8vP0X.js +0 -175
- package/components/LanguagePopover/index-BA2Igs9L.js +0 -179
- package/components/LinearProgressIndeterminate/index-BwI756Mb.js +0 -55
- package/components/Loadable/index-BMbi9ISF.js +0 -9
- package/components/LoadingError/index-Cf0oGUrL.js +0 -89
- package/components/MFIsolationApp/index-V4R55hNU.js +0 -169
- package/components/MFLoader/index-BI8vQZSH.js +0 -299
- package/components/ModalDialog/index-CEVQBQ7W.js +0 -77
- package/components/NavLink/index-D1S_vtFO.js +0 -55
- package/components/NoItemSelected/index-B9oM26AX.js +0 -54
- package/components/ObjectLogs/index-CiXOJpS4.js +0 -233
- package/components/PDFViewer/index-GVN2rfd6.js +0 -51
- package/components/Page/index-DZMkYmr4.js +0 -117
- package/components/PaperForm/index-DwgAfjci.js +0 -59
- package/components/Period/index-2pJG3VmY.js +0 -238
- package/components/PrintingSystem/index-B2qcnfw0.js +0 -187
- package/components/PrintingSystem/subcomponents/BodyNode/index-Cv2aoy8S.js +0 -49
- package/components/PrintingSystem/subcomponents/ChartNode/index-BmJm8v_C.js +0 -105
- package/components/PrintingSystem/subcomponents/DividerNode/index-MpFhE-H0.js +0 -20
- package/components/PrintingSystem/subcomponents/FooterNode/index-ZEcWdMSM.js +0 -49
- package/components/PrintingSystem/subcomponents/GridNode/index-SsKax2xu.js +0 -74
- package/components/PrintingSystem/subcomponents/HeaderNode/index-Cs8TOOBL.js +0 -49
- package/components/PrintingSystem/subcomponents/PaperNode/index-DBb25Ecg.js +0 -30
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index-CTVn7J9Q.js +0 -47
- package/components/PrintingSystem/subcomponents/SectionNode/index-iYPM3EaS.js +0 -49
- package/components/PrintingSystem/subcomponents/TextBoxNode/index-DGjXCFKJ.js +0 -24
- package/components/PropertyValue/index-Bh-Jnrte.js +0 -264
- package/components/Resizeable/index-DdP1xfE9.js +0 -20
- package/components/ScrollBar/index-f2URPPE2.js +0 -35
- package/components/ScrollToTop/index-TxORk5dB.js +0 -12
- package/components/SideBar/index-PUBBe0yH.js +0 -758
- package/components/SplitLayout/index-Bu1hcO6G.js +0 -89
- package/components/ToastContainer/index-DK1d8NNd.js +0 -191
- package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
- package/components/animate/LoadingScreen/index-CkVLOrMz.js +0 -70
- package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
- package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
- package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
- package/components/animate/features-BbnE33u3.js +0 -5
- package/components/animate/index-BsWiJfzp.js +0 -89
- package/components/animate/variants/bounce-DanQqHAX.js +0 -101
- package/components/animate/variants/container-Dmpr6tg5.js +0 -22
- package/components/animate/variants/fade-CAOJNn06.js +0 -65
- package/components/animate/variants/index-l0sNRNKZ.js +0 -1
- package/components/animate/variants/transition-B9W5SWTa.js +0 -20
- package/components/areas/components/AreasAdmin/index-OxQU3P8Y.js +0 -699
- package/components/areas/components/AreasViewer/index-DQ0aPioP.js +0 -805
- package/components/areas/components/index-l0sNRNKZ.js +0 -1
- package/components/areas/constants-rqODZNZe.js +0 -6
- package/components/areas/contexts/AreasContext/index-BqRlA7JA.js +0 -1110
- package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
- package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
- package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
- package/components/areas/dictionary-YUsP9beq.js +0 -36
- package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
- package/components/areas/hooks/useAreas/index-BSbwbJLS.js +0 -11
- package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
- package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
- package/components/areas/icons-CwFr-alN.js +0 -24
- package/components/areas/index-B_Odny9h.js +0 -22
- package/components/commercial/AppBarCommercial/index-CHq3P3GY.js +0 -28
- package/components/commercial/SectionCommercial/index-BeABGtdr.js +0 -56
- package/components/commercial/TopBar/index-F1repmti.js +0 -232
- package/components/commercial/index-CxDzs6Ax.js +0 -81
- package/components/formatters/BooleanFormatter/index-DktIidqW.js +0 -44
- package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
- package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
- package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
- package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
- package/components/formatters/index-pnJhDYKe.js +0 -109
- package/components/hook-form/HelperError/index-BVnmUazV.js +0 -19
- package/components/hook-form/RHFAutocomplete/index-BtPL16HR.js +0 -657
- package/components/hook-form/RHFAutocompleteAsync/index-BfzjLHG8.js +0 -226
- package/components/hook-form/RHFCheckbox/index-Vyttu8Vx.js +0 -132
- package/components/hook-form/RHFColorPicker/index-Cxxb5Wa_.js +0 -191
- package/components/hook-form/RHFDateTime/index-CW1Slb-f.js +0 -190
- package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
- package/components/hook-form/RHFPeriod/index-r-HeIOoZ.js +0 -98
- package/components/hook-form/RHFRadioGroup/index-CTD-0zKo.js +0 -52
- package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
- package/components/hook-form/RHFTextField/index-B6ufruSB.js +0 -337
- package/components/hook-form/RHFUpload/index-CDPbm8NR.js +0 -253
- package/components/maps/components/GpsTools/index-5MXlhIEt.js +0 -1948
- package/components/maps/components/Map/index-2Lx5ARXa.js +0 -2546
- package/components/maps/index-Ci-7-FHg.js +0 -7
- package/components/modal/WindowBase-Gd27v5FU.js +0 -44
- package/components/modal/WindowConfirm-u6vAMFo7.js +0 -73
- package/components/modal/index-CydPIpKZ.js +0 -65
- package/components/mui_extended/Accordion/index-DMLYJL7o.js +0 -124
- package/components/mui_extended/Avatar/index-ClBa-6eF.js +0 -64
- package/components/mui_extended/Badge/index-zI-F_Qkq.js +0 -29
- package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
- package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
- package/components/mui_extended/Button/index-CGfZbaea.js +0 -222
- package/components/mui_extended/CheckBox-BXUrbonB.js +0 -76
- package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
- package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
- package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
- package/components/mui_extended/IconButton/index-CusYFjie.js +0 -97
- package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
- package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
- package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
- package/components/mui_extended/MenuActions/MenuActions-C6CjSU6C.js +0 -149
- package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
- package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots-D65KZAKF.js +0 -46
- package/components/mui_extended/Pager/index-DCbxiTZA.js +0 -257
- package/components/mui_extended/Popover/index-DfrJAQkV.js +0 -153
- package/components/mui_extended/Stack/index-DzEeCYfp.js +0 -31
- package/components/mui_extended/Tab/index-Bu3dPidV.js +0 -129
- package/components/mui_extended/ToggleButton/index-C9cBkT1V.js +0 -18
- package/components/mui_extended/ToggleIconButton/index--0b3Td6C.js +0 -26
- package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
- package/components/mui_extended/Typography/index-Cf_4Zw8f.js +0 -54
- package/components/mui_extended/index-l0sNRNKZ.js +0 -1
- package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
- package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
- package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
- package/components/popups/PopupsViewer/index-BecevSns.js +0 -172
- package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
- package/components/popups/PopupsViewer/slots/popupsViewerSlots-BXH77nCF.js +0 -46
- package/components/popups/index-l0sNRNKZ.js +0 -1
- package/contexts/ModalContext/index-CPfNnfTL.js +0 -39
- package/contexts/RHFormContext/index-D_nK759o.js +0 -78
- package/hocs/withToggle/index-C1_DMZD3.js +0 -14
- package/hooks/useFormAddEdit/index-D9oSjUn1.js +0 -90
- package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
- package/hooks/useModal/index-BJSQOX3U.js +0 -10
- package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
- package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
- package/hooks/useTab/index-B_GEQFOP.js +0 -12
- package/react-data-grid-BfYuZ6AK.js +0 -2606
- package/react-draggable-DsCPdgQP.js +0 -811
- package/react-json-view-bhqIAaNg.js +0 -2576
- package/react-resizable-eBbFl2dX.js +0 -618
- package/react-spinners-TpKN9lZg.js +0 -123
- package/react-splitter-layout-C-JTsNGs.js +0 -158
- package/styles/DynamicFilter-CJFsIegc.js +0 -319
- package/styles/MenuActions-lTi-ynPM.js +0 -42
- package/styles/index-DKj6m8SL.js +0 -1691
- package/test/constants_no_mock-CF-669v-.js +0 -4
- package/test/getNameDataTestId-BaBTWhBr.js +0 -10
- package/utils/index-DiMrtgIu.js +0 -502
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
- /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createStore } from "zustand";
|
|
2
|
-
import { immer } from "zustand/middleware/immer";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import React__default, { createContext } from "react";
|
|
5
|
-
const createDynamicMFStore = (initProps) => {
|
|
6
|
-
const startProps = {
|
|
7
|
-
...initProps
|
|
8
|
-
};
|
|
9
|
-
return createStore(
|
|
10
|
-
immer((set, _get) => ({
|
|
11
|
-
...startProps,
|
|
12
|
-
actions: {
|
|
13
|
-
changeData: (newDynamicMFState) => {
|
|
14
|
-
set((state) => {
|
|
15
|
-
state.dynamicMFParameters = {
|
|
16
|
-
...state.dynamicMFParameters,
|
|
17
|
-
...newDynamicMFState
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}))
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
const DynamicMFParmsContext = createContext(null);
|
|
26
|
-
function DynamicMFParmsProvider(props) {
|
|
27
|
-
const { children, store } = props;
|
|
28
|
-
return /* @__PURE__ */ jsx(DynamicMFParmsContext.Provider, { value: store, children });
|
|
29
|
-
}
|
|
30
|
-
const MemonizedDynamicMFParmsProvider = React__default.memo(DynamicMFParmsProvider);
|
|
31
|
-
export {
|
|
32
|
-
DynamicMFParmsProvider as D,
|
|
33
|
-
MemonizedDynamicMFParmsProvider as M,
|
|
34
|
-
DynamicMFParmsContext as a,
|
|
35
|
-
createDynamicMFStore as c
|
|
36
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import React__default, { createContext } from "react";
|
|
3
|
-
const WindowToolsMFContext = createContext(null);
|
|
4
|
-
function WindowToolsMFProvider(props) {
|
|
5
|
-
const { children, ...other } = props;
|
|
6
|
-
return /* @__PURE__ */ jsx(WindowToolsMFContext.Provider, { value: { ...other }, children });
|
|
7
|
-
}
|
|
8
|
-
React__default.memo(WindowToolsMFProvider);
|
|
9
|
-
export {
|
|
10
|
-
WindowToolsMFProvider as W,
|
|
11
|
-
WindowToolsMFContext as a
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const AREAS_DICTIONARY_ID = "areas";
|
|
2
|
-
function getAreasComponentsDictionary() {
|
|
3
|
-
return [AREAS_DICTIONARY_ID];
|
|
4
|
-
}
|
|
5
|
-
const LABEL_FILTER_BUTTON = "filter_tooltip";
|
|
6
|
-
const DICCTIONARY = {
|
|
7
|
-
label_new_area: "label_new_area",
|
|
8
|
-
label_persist_module_cookies: "label_persist_module_cookies",
|
|
9
|
-
validation_edit_area: "validation_edit_area",
|
|
10
|
-
label_edit_area: "label_edit_area",
|
|
11
|
-
label_delete_area: "label_delete_area",
|
|
12
|
-
label_window_colapse: "label_window_colapse",
|
|
13
|
-
label_window_un_colapse: "label_window_un_colapse",
|
|
14
|
-
area_error_title: "area_error_title",
|
|
15
|
-
area_error_description: "area_error_description",
|
|
16
|
-
area_error_recommendation: "area_error_recommendation",
|
|
17
|
-
area_error_intro: "area_error_intro",
|
|
18
|
-
area_add_new: "area_add_new",
|
|
19
|
-
label_reset_module_cookies: "label_reset_module_cookies",
|
|
20
|
-
label_close_window: "label_close_window",
|
|
21
|
-
label_maximize_window: "label_maximize_window",
|
|
22
|
-
label_minimize_window: "label_minimize_window",
|
|
23
|
-
label_collapse_window: "label_collapse_window",
|
|
24
|
-
label_uncollapse_window: "label_uncollapse_window",
|
|
25
|
-
label_module_actions: "label_module_actions"
|
|
26
|
-
};
|
|
27
|
-
const getAreasDictionary = (key) => {
|
|
28
|
-
return `${AREAS_DICTIONARY_ID}.${key}`;
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
AREAS_DICTIONARY_ID as A,
|
|
32
|
-
DICCTIONARY as D,
|
|
33
|
-
LABEL_FILTER_BUTTON as L,
|
|
34
|
-
getAreasComponentsDictionary as a,
|
|
35
|
-
getAreasDictionary as g
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
import { useStore } from "zustand";
|
|
3
|
-
import { b as AreasContext } from "../../contexts/AreasContext/index-BqRlA7JA.js";
|
|
4
|
-
function useAreasStore(selector, equalityFn) {
|
|
5
|
-
const context = useContext(AreasContext);
|
|
6
|
-
if (!context) throw new Error("useAreasStore context must be use inside AreasContext");
|
|
7
|
-
return useStore(context, selector, equalityFn);
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
useAreasStore as u
|
|
11
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
import { useStore } from "zustand";
|
|
3
|
-
import { a as DynamicMFParmsContext } from "../../contexts/DynamicMFParmsContext/index-22c6E7vK.js";
|
|
4
|
-
function useDynamicMFParametersStore(selector, equalityFn) {
|
|
5
|
-
const store = useContext(DynamicMFParmsContext);
|
|
6
|
-
if (!store)
|
|
7
|
-
throw new Error("useDynamicMFParametersStore context must be use inside DynamicMFParmsContext");
|
|
8
|
-
return useStore(store, selector, equalityFn);
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
useDynamicMFParametersStore as u
|
|
12
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { shallow } from "zustand/shallow";
|
|
3
|
-
import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { u as useWindowToolsMF } from "../useWindowToolsMF/index-BECQfhbC.js";
|
|
5
|
-
import { u as useDynamicMFParametersStore } from "../useDynamicMFParameters/index-DhbcZPs9.js";
|
|
6
|
-
const titleLabels = {
|
|
7
|
-
moduleName: "module_name",
|
|
8
|
-
moduleNameAdd: "module_name_add",
|
|
9
|
-
moduleNameEdit: "module_name_edit"
|
|
10
|
-
};
|
|
11
|
-
function useSetWindowsTitle({
|
|
12
|
-
isAddEditModule = false
|
|
13
|
-
} = {}) {
|
|
14
|
-
const isFlagPresent = useFlagsPresent([CommonFlags.FLAG_DICTIONARY_LOADED]);
|
|
15
|
-
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const { setWindowTitle } = useWindowToolsMF();
|
|
17
|
-
const id = useDynamicMFParametersStore(
|
|
18
|
-
// objectId or id puede ser el nombre del parametro del con el Id que se está editando en los modulos add/edit
|
|
19
|
-
(state) => state.dynamicMFParameters?.objectId || state.dynamicMFParameters?.id,
|
|
20
|
-
shallow
|
|
21
|
-
);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (isFlagPresent) {
|
|
24
|
-
const labelKey = isAddEditModule ? id ? titleLabels.moduleNameEdit : titleLabels.moduleNameAdd : titleLabels.moduleName;
|
|
25
|
-
setWindowTitle(getLabel(labelKey));
|
|
26
|
-
}
|
|
27
|
-
}, [getLabel, isFlagPresent]);
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
useSetWindowsTitle as u
|
|
31
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext } from "react";
|
|
2
|
-
import { a as WindowToolsMFContext } from "../../contexts/WindowToolsMFContext/index-DkE30fhm.js";
|
|
3
|
-
const useWindowToolsMF = () => {
|
|
4
|
-
const context = useContext(WindowToolsMFContext);
|
|
5
|
-
if (!context) throw new Error("useWindowToolsMF context must be use inside WindowToolsMFContext");
|
|
6
|
-
return context;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
useWindowToolsMF as u
|
|
10
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const ICONS = {
|
|
2
|
-
CLOSE: "close.svg",
|
|
3
|
-
MAXIMIZE: "maximize.svg",
|
|
4
|
-
NORMALIZE: "normalize.svg",
|
|
5
|
-
COLAPSE: "colapse.svg",
|
|
6
|
-
UNCOLPASE: "uncolapse.svg",
|
|
7
|
-
RESET_COOKIES: "reset_cookies.svg",
|
|
8
|
-
SAVE_COOKIES: "save_cookies.svg",
|
|
9
|
-
DELETE_AREA: "delete_area.svg",
|
|
10
|
-
ADD_AREA: "add_area.svg",
|
|
11
|
-
LAYERS: "layers.svg",
|
|
12
|
-
NAVIGATE_ERROR: "navegate_error.svg",
|
|
13
|
-
EDIT_AREA: "edit.svg",
|
|
14
|
-
CHECK: "checkmarkInCircle.svg",
|
|
15
|
-
RESIZE: "controlSize.svg",
|
|
16
|
-
VERSION: "version.svg",
|
|
17
|
-
SHOW_OPTIONS: "showMoreVertical.svg",
|
|
18
|
-
CHEVRON_DOWN: "chevronDown.svg",
|
|
19
|
-
MODULE: "module.svg",
|
|
20
|
-
POPUP: "popup.svg"
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
ICONS as I
|
|
24
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
function useOnClickOutside(ref, handler, noRef) {
|
|
3
|
-
useEffect(() => {
|
|
4
|
-
const listener = (event) => {
|
|
5
|
-
const el = ref?.current;
|
|
6
|
-
const noEl = noRef?.current;
|
|
7
|
-
if (!el || el.contains(event.target) || noEl && noEl.contains(event.target)) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
handler(event);
|
|
11
|
-
};
|
|
12
|
-
document.addEventListener("mousedown", listener);
|
|
13
|
-
document.addEventListener("touchstart", listener);
|
|
14
|
-
return () => {
|
|
15
|
-
document.removeEventListener("mousedown", listener);
|
|
16
|
-
document.removeEventListener("touchstart", listener);
|
|
17
|
-
};
|
|
18
|
-
}, [ref, handler]);
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
useOnClickOutside as u
|
|
22
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
3
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
|
|
5
|
-
import { ab as AppBarComercialRoot } from "../../../styles/index-DKj6m8SL.js";
|
|
6
|
-
const componentName = "M4LAppBarCommercial";
|
|
7
|
-
generateUtilityClasses(
|
|
8
|
-
componentName,
|
|
9
|
-
[
|
|
10
|
-
/* elements */
|
|
11
|
-
"root"
|
|
12
|
-
/* states or variants of elements */
|
|
13
|
-
]
|
|
14
|
-
);
|
|
15
|
-
const useAppBarComercialUtilityClasses = () => {
|
|
16
|
-
const slots = {
|
|
17
|
-
root: ["root"]
|
|
18
|
-
};
|
|
19
|
-
return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
20
|
-
};
|
|
21
|
-
const AppBarComercial = (props) => {
|
|
22
|
-
const { children } = props;
|
|
23
|
-
const classes = useAppBarComercialUtilityClasses();
|
|
24
|
-
return /* @__PURE__ */ jsx(AppBarComercialRoot, { className: classes.root, children });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
AppBarComercial as A
|
|
28
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
3
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
|
|
5
|
-
import { ac as SectionCommercialRoot } from "../../../styles/index-DKj6m8SL.js";
|
|
6
|
-
const componentName = "M4LSectionCommercial";
|
|
7
|
-
generateUtilityClasses(
|
|
8
|
-
componentName,
|
|
9
|
-
[
|
|
10
|
-
/* elements */
|
|
11
|
-
"root",
|
|
12
|
-
/* states or variants of elements */
|
|
13
|
-
"fullWidth",
|
|
14
|
-
"boxed",
|
|
15
|
-
"columnReverse"
|
|
16
|
-
]
|
|
17
|
-
);
|
|
18
|
-
const useAppBarComercialUtilityClasses = (ownerState) => {
|
|
19
|
-
const slots = {
|
|
20
|
-
root: [
|
|
21
|
-
"root",
|
|
22
|
-
ownerState.contentWith === "fullWidth" && "fullWidth",
|
|
23
|
-
ownerState.contentWith === "boxed" && "boxed",
|
|
24
|
-
ownerState.columnReverse && "columnReverse"
|
|
25
|
-
]
|
|
26
|
-
};
|
|
27
|
-
return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
28
|
-
};
|
|
29
|
-
const SectionCommercial = (props) => {
|
|
30
|
-
const {
|
|
31
|
-
children,
|
|
32
|
-
contentWith = "boxed",
|
|
33
|
-
paddingX = "40px",
|
|
34
|
-
paddingY,
|
|
35
|
-
columnReverse = false,
|
|
36
|
-
...others
|
|
37
|
-
} = props;
|
|
38
|
-
const ownerState = {
|
|
39
|
-
contentWith,
|
|
40
|
-
columnReverse
|
|
41
|
-
};
|
|
42
|
-
const classes = useAppBarComercialUtilityClasses(ownerState);
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
SectionCommercialRoot,
|
|
45
|
-
{
|
|
46
|
-
className: classes.root,
|
|
47
|
-
paddingY,
|
|
48
|
-
...others,
|
|
49
|
-
...contentWith === "boxed" ? { paddingX } : null,
|
|
50
|
-
children
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
SectionCommercial as S
|
|
56
|
-
};
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock-CF-669v-.js";
|
|
3
|
-
import { generateUtilityClasses, useTheme, Box, Grid, styled } from "@mui/material";
|
|
4
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { g as getComponentUtilityClass } from "../../../utils/index-DiMrtgIu.js";
|
|
6
|
-
import { createContext, useContext, useState } from "react";
|
|
7
|
-
import { useEnvironment } from "@m4l/core";
|
|
8
|
-
import { ad as ArrowIconRoot } from "../../../styles/index-DKj6m8SL.js";
|
|
9
|
-
import { I as Icon } from "../../Icon/index-C89MAkeH.js";
|
|
10
|
-
import clsx from "clsx";
|
|
11
|
-
import { g as getNameDataTestId } from "../../../test/getNameDataTestId-BaBTWhBr.js";
|
|
12
|
-
import { A as Accordion } from "../../mui_extended/Accordion/index-DMLYJL7o.js";
|
|
13
|
-
import { B as Button } from "../../mui_extended/Button/index-CGfZbaea.js";
|
|
14
|
-
import { P as Popover } from "../../mui_extended/Popover/index-DfrJAQkV.js";
|
|
15
|
-
const componentName = "M4LTopBar";
|
|
16
|
-
const TopBarClasses = generateUtilityClasses(componentName, [
|
|
17
|
-
/* elements */
|
|
18
|
-
"root",
|
|
19
|
-
"ContainerImageComercial",
|
|
20
|
-
"SimplebarComercial",
|
|
21
|
-
"ItemRoot",
|
|
22
|
-
"ItemSelect",
|
|
23
|
-
"ContainerAccordion",
|
|
24
|
-
"ContainerAccordionCase1",
|
|
25
|
-
"IconAndButton",
|
|
26
|
-
/* states or variants of elements */
|
|
27
|
-
"IsActive"
|
|
28
|
-
]);
|
|
29
|
-
function getTopBarClassesUtilityClass() {
|
|
30
|
-
const slots = {
|
|
31
|
-
root: ["root"],
|
|
32
|
-
ContainerImageComercial: ["ContainerImageComercial"],
|
|
33
|
-
SimplebarComercial: ["SimplebarComercial"],
|
|
34
|
-
ItemRoot: ["ItemRoot"],
|
|
35
|
-
ItemSelect: ["ItemSelect"],
|
|
36
|
-
ContainerAccordion: ["ContainerAccordion"],
|
|
37
|
-
ContainerAccordionCase1: ["ContainerAccordionCase1"],
|
|
38
|
-
IconAndButton: ["IconAndButton"]
|
|
39
|
-
};
|
|
40
|
-
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
41
|
-
return {
|
|
42
|
-
...composedClasses
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const initialstate = {
|
|
46
|
-
dataMenu: [],
|
|
47
|
-
classes: getTopBarClassesUtilityClass(),
|
|
48
|
-
dataTestId: ""
|
|
49
|
-
};
|
|
50
|
-
const TopBarContext = createContext(initialstate);
|
|
51
|
-
const TopBarProvider = (props) => {
|
|
52
|
-
const { children, value } = props;
|
|
53
|
-
const { dataMenu: DataMenu, classes, dataTestId } = value;
|
|
54
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
-
TopBarContext.Provider,
|
|
56
|
-
{
|
|
57
|
-
value: { dataMenu: DataMenu, classes, dataTestId },
|
|
58
|
-
children
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
const useTopBar = () => useContext(TopBarContext);
|
|
63
|
-
function ArrowIcon(props) {
|
|
64
|
-
const { openState } = props;
|
|
65
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
66
|
-
return /* @__PURE__ */ jsx(ArrowIconRoot, { className: "", children: /* @__PURE__ */ jsx(
|
|
67
|
-
Icon,
|
|
68
|
-
{
|
|
69
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/ChevronRight.svg`,
|
|
70
|
-
rotationAngle: openState ? 270 : 90,
|
|
71
|
-
size: "medium"
|
|
72
|
-
}
|
|
73
|
-
) });
|
|
74
|
-
}
|
|
75
|
-
const isActive = (data) => {
|
|
76
|
-
const path = window.location.pathname;
|
|
77
|
-
if (data.path === path) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
if (data.children) {
|
|
81
|
-
return data.children.some((item) => isActive(item));
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
};
|
|
85
|
-
const NavItemRoot = (props) => {
|
|
86
|
-
const theme = useTheme();
|
|
87
|
-
const { classes, dataTestId } = useTopBar();
|
|
88
|
-
const { itemRootData } = props;
|
|
89
|
-
const { title, children, module_id } = itemRootData;
|
|
90
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
91
|
-
const [openedPopoverId, setOpenedPopoverId] = useState(null);
|
|
92
|
-
const handleClick = (event, popoverId) => {
|
|
93
|
-
setAnchorEl(event.currentTarget);
|
|
94
|
-
setOpenedPopoverId(popoverId);
|
|
95
|
-
};
|
|
96
|
-
const handleClose = () => {
|
|
97
|
-
setAnchorEl(null);
|
|
98
|
-
setOpenedPopoverId(null);
|
|
99
|
-
};
|
|
100
|
-
const renderMenuItems = (items) => {
|
|
101
|
-
return items.map((item, index) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: item.children ? item.children && item.children.length > 0 && /* @__PURE__ */ jsx(Accordion, { label: item.title, children: renderMenuItems(item.children) }) : /* @__PURE__ */ jsx(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
className: clsx(
|
|
105
|
-
classes.ItemSelect,
|
|
106
|
-
item.path === window.location.pathname ? TopBarClasses.IsActive : null
|
|
107
|
-
),
|
|
108
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemSelect", dataTestId) } : {},
|
|
109
|
-
children: /* @__PURE__ */ jsx(Button, { variant: "text", href: item.path, fullWidth: true, children: item.title })
|
|
110
|
-
}
|
|
111
|
-
) }, index));
|
|
112
|
-
};
|
|
113
|
-
const renderPopover = () => {
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
Popover,
|
|
116
|
-
{
|
|
117
|
-
elevation: 3,
|
|
118
|
-
id: module_id,
|
|
119
|
-
open: openedPopoverId === itemRootData.module_id ? true : false,
|
|
120
|
-
anchorEl,
|
|
121
|
-
onClose: handleClose,
|
|
122
|
-
anchorOrigin: {
|
|
123
|
-
vertical: "bottom",
|
|
124
|
-
horizontal: "center"
|
|
125
|
-
},
|
|
126
|
-
transformOrigin: {
|
|
127
|
-
vertical: "top",
|
|
128
|
-
horizontal: "center"
|
|
129
|
-
},
|
|
130
|
-
arrowType: "top-center",
|
|
131
|
-
sx: { ...theme.components?.M4LPopoverTopBar?.styleOverrides },
|
|
132
|
-
children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 0.5, children: children && children.length > 0 && renderMenuItems(children) })
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
const render = () => {
|
|
137
|
-
if (itemRootData.children && itemRootData.path) {
|
|
138
|
-
return /* @__PURE__ */ jsxs(
|
|
139
|
-
"div",
|
|
140
|
-
{
|
|
141
|
-
className: classes.ContainerAccordionCase1,
|
|
142
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
143
|
-
[TEST_PROP_ID]: getNameDataTestId(
|
|
144
|
-
componentName,
|
|
145
|
-
"ContainerAccordionCase1",
|
|
146
|
-
dataTestId
|
|
147
|
-
)
|
|
148
|
-
} : {},
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ jsx(Button, { size: "medium", variant: "text", href: itemRootData.path, children: title }),
|
|
151
|
-
/* @__PURE__ */ jsx(
|
|
152
|
-
Button,
|
|
153
|
-
{
|
|
154
|
-
variant: "text",
|
|
155
|
-
id: module_id,
|
|
156
|
-
onClick: (e) => handleClick(e, module_id),
|
|
157
|
-
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false })
|
|
158
|
-
}
|
|
159
|
-
),
|
|
160
|
-
renderPopover()
|
|
161
|
-
]
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
if (itemRootData.children) {
|
|
166
|
-
return /* @__PURE__ */ jsxs(
|
|
167
|
-
"div",
|
|
168
|
-
{
|
|
169
|
-
className: classes.ContainerAccordion,
|
|
170
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ContainerAccordion", dataTestId) } : {},
|
|
171
|
-
children: [
|
|
172
|
-
/* @__PURE__ */ jsx(
|
|
173
|
-
Button,
|
|
174
|
-
{
|
|
175
|
-
"aria-describedby": module_id,
|
|
176
|
-
variant: "text",
|
|
177
|
-
size: "medium",
|
|
178
|
-
onClick: (e) => handleClick(e, itemRootData.module_id),
|
|
179
|
-
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false }),
|
|
180
|
-
children: title
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
renderPopover()
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
if (itemRootData.path)
|
|
189
|
-
return /* @__PURE__ */ jsx(Button, { variant: "text", size: "medium", href: itemRootData.path, "aria-describedby": module_id, children: /* @__PURE__ */ jsx("div", { children: title }) });
|
|
190
|
-
};
|
|
191
|
-
return /* @__PURE__ */ jsx(
|
|
192
|
-
Box,
|
|
193
|
-
{
|
|
194
|
-
className: clsx(
|
|
195
|
-
classes.ItemRoot,
|
|
196
|
-
isActive(itemRootData) || openedPopoverId === itemRootData.module_id ? TopBarClasses.IsActive : null
|
|
197
|
-
),
|
|
198
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemRoot", dataTestId) } : {},
|
|
199
|
-
children: render()
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
};
|
|
203
|
-
const ConteinItem = () => {
|
|
204
|
-
const { dataMenu: DataMenu, classes, dataTestId } = useTopBar();
|
|
205
|
-
return /* @__PURE__ */ jsx(
|
|
206
|
-
"div",
|
|
207
|
-
{
|
|
208
|
-
className: classes.SimplebarComercial,
|
|
209
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "SimplebarComercial", dataTestId) } : {},
|
|
210
|
-
//Map que se encarga de cargar el iNavItemRoot
|
|
211
|
-
children: DataMenu.map((group) => /* @__PURE__ */ jsx(NavItemRoot, { itemRootData: group }, group.module_id))
|
|
212
|
-
}
|
|
213
|
-
);
|
|
214
|
-
};
|
|
215
|
-
const TopBarRoot = styled("header")(({ theme }) => ({
|
|
216
|
-
...theme.components?.M4LTopBar?.styleOverrides
|
|
217
|
-
}));
|
|
218
|
-
const TopBar = (props) => {
|
|
219
|
-
const { dataMenu: DataMenu, dataTestId } = props;
|
|
220
|
-
const classes = getTopBarClassesUtilityClass();
|
|
221
|
-
return /* @__PURE__ */ jsx(
|
|
222
|
-
TopBarRoot,
|
|
223
|
-
{
|
|
224
|
-
className: classes.root,
|
|
225
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "root", dataTestId) } : {},
|
|
226
|
-
children: /* @__PURE__ */ jsx(TopBarProvider, { value: { dataMenu: DataMenu, classes, dataTestId }, children: /* @__PURE__ */ jsx(ConteinItem, {}) })
|
|
227
|
-
}
|
|
228
|
-
);
|
|
229
|
-
};
|
|
230
|
-
export {
|
|
231
|
-
TopBar as T
|
|
232
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { ae as HamburgerMenuRoot } from "../../styles/index-DKj6m8SL.js";
|
|
4
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
5
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
7
|
-
import { useEnvironment } from "@m4l/core";
|
|
8
|
-
import { S as SideBar } from "../SideBar/index-PUBBe0yH.js";
|
|
9
|
-
import { I as IconButton } from "../mui_extended/IconButton/index-CusYFjie.js";
|
|
10
|
-
const componentName = "M4LHamburgerMenuCommercial";
|
|
11
|
-
generateUtilityClasses(componentName, ["root", "ImageLogo"]);
|
|
12
|
-
function getHamburgerMenuComercialClassesUtilityClass(slot) {
|
|
13
|
-
return generateUtilityClass(componentName, slot);
|
|
14
|
-
}
|
|
15
|
-
const useHamburgerMenuComercialUtilityClasses = () => {
|
|
16
|
-
const slots = {
|
|
17
|
-
root: ["root"],
|
|
18
|
-
ImageLogo: ["ImageLogo"]
|
|
19
|
-
};
|
|
20
|
-
const composedClasses = unstable_composeClasses(slots, getHamburgerMenuComercialClassesUtilityClass, {});
|
|
21
|
-
return {
|
|
22
|
-
...composedClasses
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
const HAMBURGER_MENU_PREFIX = "M4LHamburgerMenu";
|
|
26
|
-
const getNameDataTestId = (KEY) => {
|
|
27
|
-
return `${HAMBURGER_MENU_PREFIX}-${KEY}`;
|
|
28
|
-
};
|
|
29
|
-
const HamburgerMenu = (props) => {
|
|
30
|
-
const { data, itemClick } = props;
|
|
31
|
-
const [visible, setVisible] = useState(false);
|
|
32
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
33
|
-
const handlerOnVisible = () => {
|
|
34
|
-
setVisible((val) => !val);
|
|
35
|
-
};
|
|
36
|
-
const handleCollapseToggle = () => {
|
|
37
|
-
if (visible) {
|
|
38
|
-
setVisible(false);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const classes = useHamburgerMenuComercialUtilityClasses();
|
|
42
|
-
const handlerItemActive = (item) => {
|
|
43
|
-
return window.location.pathname === item.path;
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsxs(
|
|
46
|
-
HamburgerMenuRoot,
|
|
47
|
-
{
|
|
48
|
-
className: classes.root,
|
|
49
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
52
|
-
IconButton,
|
|
53
|
-
{
|
|
54
|
-
src: `${host_static_assets}/${environment_assets}/frontend/web_comercial/menu.svg`,
|
|
55
|
-
className: classes.ImageLogo,
|
|
56
|
-
variant: "secondary",
|
|
57
|
-
onClick: () => handlerOnVisible()
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
SideBar,
|
|
62
|
-
{
|
|
63
|
-
menuData: data,
|
|
64
|
-
visible,
|
|
65
|
-
onClick: (item) => itemClick(item),
|
|
66
|
-
isItemActive: handlerItemActive,
|
|
67
|
-
onToggleCollapse: handleCollapseToggle,
|
|
68
|
-
onToggleVisible: handlerOnVisible,
|
|
69
|
-
collapsed: false,
|
|
70
|
-
companyLogoSmallUrl: "",
|
|
71
|
-
companyName: "",
|
|
72
|
-
variantStyle: "variantComercial"
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
export {
|
|
80
|
-
HamburgerMenu as H
|
|
81
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { I as Icon } from "../../Icon/index-C89MAkeH.js";
|
|
5
|
-
import { W as WrapperComponent } from "../../WrapperComponent/index-BHV-CsDU.js";
|
|
6
|
-
import { F as FormatterRoot, f as formatterClasses } from "../index-pnJhDYKe.js";
|
|
7
|
-
import clsx from "clsx";
|
|
8
|
-
const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
|
|
9
|
-
const LABEL_BOOLEAN_YES = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_yes`;
|
|
10
|
-
const LABEL_BOOLEAN_NO = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_no`;
|
|
11
|
-
const LABEL_BOOLEAN_TRUE = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_true`;
|
|
12
|
-
const LABEL_BOOLEAN_FALSE = `${BOOLEAN_FORMATTER_DICTIONARY_KEY}.boolean_false`;
|
|
13
|
-
function BooleanFormatter(props) {
|
|
14
|
-
const { presentationType, value, Component = WrapperComponent } = props;
|
|
15
|
-
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
17
|
-
const final_value = value ?? false;
|
|
18
|
-
const srcCheckTrue = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_true.svg`;
|
|
19
|
-
const srcCheckFalse = `${host_static_assets}/${environment_assets}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_false.svg`;
|
|
20
|
-
const memoComponent = useMemo(() => {
|
|
21
|
-
if (presentationType === "string_yes_no") {
|
|
22
|
-
return /* @__PURE__ */ jsx(Component, { children: final_value ? getLabel(LABEL_BOOLEAN_YES) : getLabel(LABEL_BOOLEAN_NO) });
|
|
23
|
-
}
|
|
24
|
-
if (presentationType === "string_true_false") {
|
|
25
|
-
return /* @__PURE__ */ jsx(Component, { children: final_value ? getLabel(LABEL_BOOLEAN_TRUE) : getLabel(LABEL_BOOLEAN_FALSE) });
|
|
26
|
-
}
|
|
27
|
-
return /* @__PURE__ */ jsx(FormatterRoot, { children: /* @__PURE__ */ jsx(Component, { children: /* @__PURE__ */ jsx(
|
|
28
|
-
Icon,
|
|
29
|
-
{
|
|
30
|
-
src: final_value ? srcCheckTrue : srcCheckFalse,
|
|
31
|
-
className: clsx(
|
|
32
|
-
formatterClasses.root,
|
|
33
|
-
formatterClasses.booleanFormatterIcon,
|
|
34
|
-
final_value && formatterClasses.booleanFormatterCheck
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
) }) });
|
|
38
|
-
}, [final_value]);
|
|
39
|
-
return memoComponent;
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
BooleanFormatter as B,
|
|
43
|
-
BOOLEAN_FORMATTER_DICTIONARY_KEY as a
|
|
44
|
-
};
|