@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,334 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEnvironment, useModuleDictionary, useNetwork } from "@m4l/core";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
4
|
-
import { generateUtilityClasses, generateUtilityClass, styled, useTheme, ButtonBase } 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 { A as Avatar } from "../mui_extended/Avatar/index-ClBa-6eF.js";
|
|
8
|
-
import { C as CircularProgress } from "../mui_extended/CircularProgress/index-Bnnti_G6.js";
|
|
9
|
-
import { P as Popover } from "../mui_extended/Popover/index-DfrJAQkV.js";
|
|
10
|
-
import { I as Icon } from "../Icon/index-C89MAkeH.js";
|
|
11
|
-
import clsx from "clsx";
|
|
12
|
-
const componentName = "M4LAccountPopover";
|
|
13
|
-
generateUtilityClasses(
|
|
14
|
-
componentName,
|
|
15
|
-
[
|
|
16
|
-
/* elements */
|
|
17
|
-
"root",
|
|
18
|
-
"containerUserName",
|
|
19
|
-
"containerUserEmail",
|
|
20
|
-
"containerlogOut",
|
|
21
|
-
"containerUserInfo",
|
|
22
|
-
"containerSetting",
|
|
23
|
-
"labelUserName",
|
|
24
|
-
"labelUserEmail",
|
|
25
|
-
"labelVersion",
|
|
26
|
-
"containerAvatarPopover",
|
|
27
|
-
"myAvatar",
|
|
28
|
-
"popover",
|
|
29
|
-
"containerAppVersion",
|
|
30
|
-
"containerMenuItems",
|
|
31
|
-
"containerProgress",
|
|
32
|
-
"logOut",
|
|
33
|
-
"menuItem"
|
|
34
|
-
/* states or variants of elements */
|
|
35
|
-
]
|
|
36
|
-
);
|
|
37
|
-
function getAccountPopoverClassesUtilityClass(slot) {
|
|
38
|
-
return generateUtilityClass(componentName, slot);
|
|
39
|
-
}
|
|
40
|
-
const useAccountPopoverUtilityClasses = () => {
|
|
41
|
-
const slots = {
|
|
42
|
-
root: ["root"],
|
|
43
|
-
containerUserName: ["containerUserName"],
|
|
44
|
-
containerUserEmail: ["containerUserEmail"],
|
|
45
|
-
containerUserInfo: ["containerUserInfo"],
|
|
46
|
-
containerlogOut: ["containerlogOut"],
|
|
47
|
-
containerSetting: ["containerSetting"],
|
|
48
|
-
labelUserName: ["labelUserName"],
|
|
49
|
-
labelUserEmail: ["labelUserEmail"],
|
|
50
|
-
labelVersion: ["labelVersion"],
|
|
51
|
-
myAvatar: ["myAvatar"],
|
|
52
|
-
containerAvatarPopover: ["containerAvatarPopover"],
|
|
53
|
-
popover: ["popover"],
|
|
54
|
-
containerAppVersion: ["containerAppVersion"],
|
|
55
|
-
containerMenuItems: ["containerMenuItems"],
|
|
56
|
-
containerProgress: ["containerProgress"],
|
|
57
|
-
logOut: ["logOut"],
|
|
58
|
-
menuItem: ["menuItem"]
|
|
59
|
-
};
|
|
60
|
-
const composedClasses = unstable_composeClasses(slots, getAccountPopoverClassesUtilityClass, {});
|
|
61
|
-
return {
|
|
62
|
-
...composedClasses
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const AcountPopOverRoot = styled("div")(({ theme }) => ({
|
|
66
|
-
...theme.components?.M4LAccountPopover?.styleOverrides
|
|
67
|
-
}));
|
|
68
|
-
function MyAvatar(props) {
|
|
69
|
-
const { avatarUrl, firstName = "", lastName = "arreee", ...other } = props;
|
|
70
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
71
|
-
return /* @__PURE__ */ jsx(
|
|
72
|
-
Avatar,
|
|
73
|
-
{
|
|
74
|
-
alt: "full_name",
|
|
75
|
-
color: "default",
|
|
76
|
-
...avatarUrl ? {
|
|
77
|
-
src: `${host_static_assets}/${environment_assets}/frontend/domain/${avatarUrl}`
|
|
78
|
-
} : { children: `${firstName[0]}${lastName[0]}` },
|
|
79
|
-
...other
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
const MenuPopOver = (props) => {
|
|
84
|
-
const {
|
|
85
|
-
data,
|
|
86
|
-
itemHandleClick,
|
|
87
|
-
version,
|
|
88
|
-
handleLogOut,
|
|
89
|
-
classes,
|
|
90
|
-
userData,
|
|
91
|
-
settingsHandleOpen: settingHandleOpen,
|
|
92
|
-
asyncState
|
|
93
|
-
} = props;
|
|
94
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
95
|
-
const { avatar_url, first_name, last_name, email } = userData || {};
|
|
96
|
-
const { getLabel } = useModuleDictionary();
|
|
97
|
-
const [open2, setOpen] = useState(null);
|
|
98
|
-
const theme = useTheme();
|
|
99
|
-
const handleClick = (item) => {
|
|
100
|
-
itemHandleClick(item);
|
|
101
|
-
handleClose();
|
|
102
|
-
};
|
|
103
|
-
const handleClose = () => {
|
|
104
|
-
setOpen(null);
|
|
105
|
-
};
|
|
106
|
-
const handleOpen = (event) => {
|
|
107
|
-
setOpen(event.currentTarget);
|
|
108
|
-
};
|
|
109
|
-
return /* @__PURE__ */ jsxs(
|
|
110
|
-
"div",
|
|
111
|
-
{
|
|
112
|
-
role: "presentation",
|
|
113
|
-
className: classes.containerAvatarPopover,
|
|
114
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("containerAvatarPopover") } : {},
|
|
115
|
-
children: [
|
|
116
|
-
/* @__PURE__ */ jsx(ButtonBase, { children: /* @__PURE__ */ jsx(
|
|
117
|
-
MyAvatar,
|
|
118
|
-
{
|
|
119
|
-
className: classes.myAvatar,
|
|
120
|
-
avatarUrl: avatar_url,
|
|
121
|
-
firstName: first_name || "",
|
|
122
|
-
lastName: last_name || "",
|
|
123
|
-
onClick: handleOpen
|
|
124
|
-
}
|
|
125
|
-
) }),
|
|
126
|
-
/* @__PURE__ */ jsxs(
|
|
127
|
-
Popover,
|
|
128
|
-
{
|
|
129
|
-
open: Boolean(open2),
|
|
130
|
-
anchorEl: open2,
|
|
131
|
-
onClose: handleClose,
|
|
132
|
-
className: classes.popover,
|
|
133
|
-
arrowType: "no-arrow",
|
|
134
|
-
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
135
|
-
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
136
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("popover") } : {},
|
|
137
|
-
sx: {
|
|
138
|
-
mt: "5px",
|
|
139
|
-
...theme.components?.M4LAccountPopoverPopover?.styleOverrides
|
|
140
|
-
},
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ jsxs(
|
|
143
|
-
"div",
|
|
144
|
-
{
|
|
145
|
-
className: classes.containerUserInfo,
|
|
146
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
147
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("containerUserInfo")
|
|
148
|
-
} : {},
|
|
149
|
-
children: [
|
|
150
|
-
" ",
|
|
151
|
-
/* @__PURE__ */ jsxs("div", { className: classes.containerUserName, children: [
|
|
152
|
-
/* @__PURE__ */ jsx(
|
|
153
|
-
Icon,
|
|
154
|
-
{
|
|
155
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/account_popover/assets/icons/users.svg`
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ jsx("span", { className: classes.labelUserName, children: `${first_name} ${last_name}` })
|
|
159
|
-
] }),
|
|
160
|
-
/* @__PURE__ */ jsxs("div", { className: classes.containerUserEmail, children: [
|
|
161
|
-
/* @__PURE__ */ jsx(
|
|
162
|
-
Icon,
|
|
163
|
-
{
|
|
164
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/account_popover/assets/icons/email.svg`
|
|
165
|
-
}
|
|
166
|
-
),
|
|
167
|
-
/* @__PURE__ */ jsx("span", { className: classes.labelUserEmail, children: email })
|
|
168
|
-
] })
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ jsxs(
|
|
173
|
-
"div",
|
|
174
|
-
{
|
|
175
|
-
className: classes.containerAppVersion,
|
|
176
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
177
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("containerAppVersion")
|
|
178
|
-
} : {},
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ jsx(
|
|
181
|
-
Icon,
|
|
182
|
-
{
|
|
183
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/account_popover/assets/icons/version.svg`
|
|
184
|
-
}
|
|
185
|
-
),
|
|
186
|
-
/* @__PURE__ */ jsx("span", { className: classes.labelVersion, children: `${getLabel("account_popover.label_version")} ${version}` })
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
|
-
/* @__PURE__ */ jsxs(
|
|
191
|
-
"div",
|
|
192
|
-
{
|
|
193
|
-
className: classes.containerMenuItems,
|
|
194
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
195
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("containerMenuItems")
|
|
196
|
-
} : {},
|
|
197
|
-
children: [
|
|
198
|
-
/* @__PURE__ */ jsxs(
|
|
199
|
-
"div",
|
|
200
|
-
{
|
|
201
|
-
role: "button",
|
|
202
|
-
tabIndex: 0,
|
|
203
|
-
className: classes.containerSetting,
|
|
204
|
-
onClick: () => {
|
|
205
|
-
settingHandleOpen();
|
|
206
|
-
handleClose();
|
|
207
|
-
},
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ jsx(
|
|
210
|
-
Icon,
|
|
211
|
-
{
|
|
212
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/account_popover/assets/icons/configuration.svg`
|
|
213
|
-
}
|
|
214
|
-
),
|
|
215
|
-
/* @__PURE__ */ jsx("div", { className: classes.menuItem, children: getLabel("account_popover.label_settings") })
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
asyncState === "loaded" ? data.map((option) => /* @__PURE__ */ jsx(
|
|
220
|
-
"div",
|
|
221
|
-
{
|
|
222
|
-
role: "presentation",
|
|
223
|
-
onClick: () => handleClick(option),
|
|
224
|
-
className: classes.menuItem,
|
|
225
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
226
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("menuItem")
|
|
227
|
-
} : {},
|
|
228
|
-
children: option.title
|
|
229
|
-
},
|
|
230
|
-
option.title
|
|
231
|
-
)) : /* @__PURE__ */ jsx(
|
|
232
|
-
"div",
|
|
233
|
-
{
|
|
234
|
-
className: classes.containerProgress,
|
|
235
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
236
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("containerProgress")
|
|
237
|
-
} : {},
|
|
238
|
-
children: /* @__PURE__ */ jsx(CircularProgress, { size: "20px" })
|
|
239
|
-
}
|
|
240
|
-
)
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
),
|
|
244
|
-
/* @__PURE__ */ jsxs("div", { role: "button", tabIndex: 0, className: classes.containerlogOut, onClick: handleLogOut, children: [
|
|
245
|
-
/* @__PURE__ */ jsx(
|
|
246
|
-
Icon,
|
|
247
|
-
{
|
|
248
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/account_popover/assets/icons/sign_off.svg`
|
|
249
|
-
}
|
|
250
|
-
),
|
|
251
|
-
/* @__PURE__ */ jsx(
|
|
252
|
-
"div",
|
|
253
|
-
{
|
|
254
|
-
role: "presentation",
|
|
255
|
-
className: classes.logOut,
|
|
256
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
257
|
-
[TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("logOut")
|
|
258
|
-
} : {},
|
|
259
|
-
children: getLabel("account_popover.label_logout")
|
|
260
|
-
}
|
|
261
|
-
)
|
|
262
|
-
] })
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
);
|
|
269
|
-
};
|
|
270
|
-
const AccountPopover = (props) => {
|
|
271
|
-
const {
|
|
272
|
-
itemHandleClick,
|
|
273
|
-
version,
|
|
274
|
-
handleLogOut,
|
|
275
|
-
userData,
|
|
276
|
-
className,
|
|
277
|
-
settingsHandleOpen: settingHandleOpen
|
|
278
|
-
} = props;
|
|
279
|
-
const [asyncState, setAsyncState] = useState("unLoad");
|
|
280
|
-
const [menuData, setMenuData] = useState([]);
|
|
281
|
-
const { networkOperation } = useNetwork();
|
|
282
|
-
useEffect(() => {
|
|
283
|
-
let mounted = true;
|
|
284
|
-
if (asyncState === "unLoad") {
|
|
285
|
-
setAsyncState("loading");
|
|
286
|
-
networkOperation({
|
|
287
|
-
method: "GET",
|
|
288
|
-
endPoint: `menus`,
|
|
289
|
-
parms: {
|
|
290
|
-
position: 1
|
|
291
|
-
}
|
|
292
|
-
}).then((response) => {
|
|
293
|
-
if (mounted) {
|
|
294
|
-
setAsyncState("loaded");
|
|
295
|
-
setMenuData(response.data);
|
|
296
|
-
}
|
|
297
|
-
}).catch((_error) => {
|
|
298
|
-
console.error("AccountData network request error - get menus", _error);
|
|
299
|
-
setMenuData([]);
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
return function cleanUp() {
|
|
303
|
-
mounted = false;
|
|
304
|
-
};
|
|
305
|
-
}, [open]);
|
|
306
|
-
const accountPopoverClasses = useAccountPopoverUtilityClasses();
|
|
307
|
-
return /* @__PURE__ */ jsx(
|
|
308
|
-
AcountPopOverRoot,
|
|
309
|
-
{
|
|
310
|
-
className: clsx(accountPopoverClasses.root, className),
|
|
311
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getAccountPopoverClassesUtilityClass("root") } : {},
|
|
312
|
-
children: /* @__PURE__ */ jsx(
|
|
313
|
-
MenuPopOver,
|
|
314
|
-
{
|
|
315
|
-
data: menuData,
|
|
316
|
-
asyncState,
|
|
317
|
-
itemHandleClick,
|
|
318
|
-
version,
|
|
319
|
-
handleLogOut,
|
|
320
|
-
classes: accountPopoverClasses,
|
|
321
|
-
userData,
|
|
322
|
-
settingsHandleOpen: settingHandleOpen
|
|
323
|
-
}
|
|
324
|
-
)
|
|
325
|
-
}
|
|
326
|
-
);
|
|
327
|
-
};
|
|
328
|
-
function getAccountPopoverDictionary() {
|
|
329
|
-
return ["account_popover"];
|
|
330
|
-
}
|
|
331
|
-
export {
|
|
332
|
-
AccountPopover as A,
|
|
333
|
-
getAccountPopoverDictionary as g
|
|
334
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { A as AppBarRoot } from "../../styles/index-DKj6m8SL.js";
|
|
3
|
-
import { useResponsiveContainerStore } from "@m4l/graphics";
|
|
4
|
-
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
5
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock-CF-669v-.js";
|
|
6
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
8
|
-
import { I as Image } from "../Image/index-COp8vP0X.js";
|
|
9
|
-
import { T as Typography } from "../mui_extended/Typography/index-Cf_4Zw8f.js";
|
|
10
|
-
import { I as IconButton } from "../mui_extended/IconButton/index-CusYFjie.js";
|
|
11
|
-
const APPBAR_PREFIX = "M4LAppBar";
|
|
12
|
-
const getNameDataTestId = (KEY) => {
|
|
13
|
-
return `${APPBAR_PREFIX}-${KEY}`;
|
|
14
|
-
};
|
|
15
|
-
const componentName = "M4LAppBar";
|
|
16
|
-
generateUtilityClasses(componentName, [
|
|
17
|
-
/* elements */
|
|
18
|
-
"root",
|
|
19
|
-
"containerChilds",
|
|
20
|
-
"containerIconMenuToggle",
|
|
21
|
-
"iconMenuToggle",
|
|
22
|
-
"containerLogo",
|
|
23
|
-
"containerImageTypography"
|
|
24
|
-
/* states or variants of elements */
|
|
25
|
-
]);
|
|
26
|
-
function getAppBarClassesUtilityClass(slot) {
|
|
27
|
-
return generateUtilityClass(componentName, slot);
|
|
28
|
-
}
|
|
29
|
-
const useAppBarUtilityClasses = () => {
|
|
30
|
-
const slots = {
|
|
31
|
-
root: ["root"],
|
|
32
|
-
containerChilds: ["containerChilds"],
|
|
33
|
-
containerIconMenuToggle: ["containerIconMenuToggle"],
|
|
34
|
-
iconMenuToggle: ["iconMenuToggle"],
|
|
35
|
-
containerLogo: ["containerLogo"],
|
|
36
|
-
containerImageTypography: ["containerImageTypography"]
|
|
37
|
-
};
|
|
38
|
-
const composedClasses = unstable_composeClasses(slots, getAppBarClassesUtilityClass, {});
|
|
39
|
-
return {
|
|
40
|
-
...composedClasses
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
const AppBar = (props) => {
|
|
44
|
-
const { onToggleVisible, children, companyLogo, companyName } = props;
|
|
45
|
-
const { isUpSm } = useResponsiveContainerStore((state) => state);
|
|
46
|
-
const { host_static_assets, environment_assets } = useEnvironment();
|
|
47
|
-
const classes = useAppBarUtilityClasses();
|
|
48
|
-
const { getLabel } = useModuleDictionary();
|
|
49
|
-
return /* @__PURE__ */ jsxs(
|
|
50
|
-
AppBarRoot,
|
|
51
|
-
{
|
|
52
|
-
className: classes.root,
|
|
53
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
54
|
-
children: [
|
|
55
|
-
companyLogo && isUpSm ? /* @__PURE__ */ jsx("div", { className: classes.containerLogo, children: /* @__PURE__ */ jsxs("div", { className: classes.containerImageTypography, children: [
|
|
56
|
-
/* @__PURE__ */ jsx(Image, { src: companyLogo, alt: "logo" }, "Logo"),
|
|
57
|
-
/* @__PURE__ */ jsx(Typography, { variant: "bodyDens", skeletonWidth: "100px", children: companyName })
|
|
58
|
-
] }) }) : null,
|
|
59
|
-
!isUpSm ? /* @__PURE__ */ jsx(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
className: classes.containerIconMenuToggle,
|
|
63
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerIconMenuToggle") } : {},
|
|
64
|
-
children: /* @__PURE__ */ jsx(
|
|
65
|
-
IconButton,
|
|
66
|
-
{
|
|
67
|
-
tooltip: getLabel("appbar.tooltip_toogle_menu"),
|
|
68
|
-
className: classes.iconMenuToggle,
|
|
69
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/settings/assets/icons/options.svg`,
|
|
70
|
-
onClick: onToggleVisible
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
) : null,
|
|
75
|
-
/* @__PURE__ */ jsx(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
className: classes.containerChilds,
|
|
79
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("containerChilds") } : {},
|
|
80
|
-
children
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
function getAppBarDictionary() {
|
|
88
|
-
return ["appbar"];
|
|
89
|
-
}
|
|
90
|
-
export {
|
|
91
|
-
AppBar as A,
|
|
92
|
-
getAppBarDictionary as g
|
|
93
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, ModulePrivilegesProvider } from "@m4l/core";
|
|
3
|
-
import { useLocales } from "@m4l/graphics";
|
|
4
|
-
import { M as ModalProvider } from "../../contexts/ModalContext/index-CPfNnfTL.js";
|
|
5
|
-
function BaseModule(props) {
|
|
6
|
-
const {
|
|
7
|
-
children,
|
|
8
|
-
isAuth = true,
|
|
9
|
-
moduleId,
|
|
10
|
-
moduleNameField,
|
|
11
|
-
skeletonFlags,
|
|
12
|
-
privileges,
|
|
13
|
-
componentsDictionary
|
|
14
|
-
} = props;
|
|
15
|
-
const localeString = useLocales().currentLocale?.localeString;
|
|
16
|
-
return /* @__PURE__ */ jsx(FlagsProvider, { children: /* @__PURE__ */ jsx(
|
|
17
|
-
ModuleDictionaryProvider,
|
|
18
|
-
{
|
|
19
|
-
isAuth,
|
|
20
|
-
moduleId,
|
|
21
|
-
moduleNameField,
|
|
22
|
-
componentsDictionary,
|
|
23
|
-
currentLang: localeString,
|
|
24
|
-
children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, { flags: skeletonFlags, children: isAuth ? /* @__PURE__ */ jsx(ModulePrivilegesProvider, { queryPrivileges: privileges, children: /* @__PURE__ */ jsx(ModalProvider, { children }) }) : /* @__PURE__ */ jsx(ModalProvider, { children }) })
|
|
25
|
-
}
|
|
26
|
-
) });
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
BaseModule as B
|
|
30
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { B as Button } from "../../../mui_extended/Button/index-CGfZbaea.js";
|
|
4
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index-CuG1pnXW.js";
|
|
5
|
-
const ActionCancel = (props) => {
|
|
6
|
-
const { getLabel } = useModuleDictionary();
|
|
7
|
-
const classes = useCommonActionsUtilityClasses();
|
|
8
|
-
return /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "inherit", ...props, className: classes.actionCancel, children: getLabel("common_actions.cancel") });
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
ActionCancel as A
|
|
12
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useFormContext, useFormState } from "react-hook-form";
|
|
3
|
-
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { B as Button } from "../../../mui_extended/Button/index-CGfZbaea.js";
|
|
5
|
-
import { useCallback, useEffect } from "react";
|
|
6
|
-
import { u as useModal } from "../../../../hooks/useModal/index-BJSQOX3U.js";
|
|
7
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index-CuG1pnXW.js";
|
|
8
|
-
import { u as useWindowToolsMF } from "../../../areas/hooks/useWindowToolsMF/index-BECQfhbC.js";
|
|
9
|
-
import { W as WindowConfirm } from "../../../modal/WindowConfirm-u6vAMFo7.js";
|
|
10
|
-
function ActionFormCancel() {
|
|
11
|
-
const { getLabel } = useModuleDictionary();
|
|
12
|
-
const { openModal } = useModal();
|
|
13
|
-
const { close: closeWindow, setFnQueryClose: setQueryClose } = useWindowToolsMF();
|
|
14
|
-
const { control } = useFormContext();
|
|
15
|
-
const { isDirty } = useFormState({
|
|
16
|
-
control
|
|
17
|
-
});
|
|
18
|
-
const onConfirmQuit = useCallback(() => {
|
|
19
|
-
closeWindow();
|
|
20
|
-
}, []);
|
|
21
|
-
const onClickCancel = useCallback(() => {
|
|
22
|
-
if (isDirty) {
|
|
23
|
-
openModal({
|
|
24
|
-
window: /* @__PURE__ */ jsx(
|
|
25
|
-
WindowConfirm,
|
|
26
|
-
{
|
|
27
|
-
variant: "warning",
|
|
28
|
-
title: getLabel("common_actions.confirm_quit_title"),
|
|
29
|
-
msg: getLabel("common_actions.confirm_quit_msg"),
|
|
30
|
-
onClickIntro: onConfirmQuit
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
variant: "warning"
|
|
34
|
-
});
|
|
35
|
-
} else {
|
|
36
|
-
onConfirmQuit();
|
|
37
|
-
}
|
|
38
|
-
}, [getLabel, isDirty, openModal]);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
setQueryClose(onClickCancel);
|
|
41
|
-
}, [onClickCancel]);
|
|
42
|
-
const classes = useCommonActionsUtilityClasses();
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
Button,
|
|
45
|
-
{
|
|
46
|
-
variant: "outlined",
|
|
47
|
-
color: "inherit",
|
|
48
|
-
onClick: onClickCancel,
|
|
49
|
-
className: classes.actionFormCancel,
|
|
50
|
-
children: getLabel("common_actions.cancel")
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
ActionFormCancel as A
|
|
56
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useFormContext, useFormState } from "react-hook-form";
|
|
3
|
-
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
4
|
-
import { Skeleton } from "@mui/material";
|
|
5
|
-
import { L as LoadingButton } from "../../../mui_extended/Button/index-CGfZbaea.js";
|
|
6
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index-CuG1pnXW.js";
|
|
7
|
-
function ActionFormIntro(props) {
|
|
8
|
-
const { getLabel } = useModuleDictionary();
|
|
9
|
-
const isSkeleton = useModuleSkeleton();
|
|
10
|
-
const { control } = useFormContext();
|
|
11
|
-
const { isSubmitting } = useFormState({
|
|
12
|
-
control
|
|
13
|
-
});
|
|
14
|
-
const classes = useCommonActionsUtilityClasses();
|
|
15
|
-
if (isSkeleton) {
|
|
16
|
-
return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: 57, height: 30 });
|
|
17
|
-
}
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
LoadingButton,
|
|
20
|
-
{
|
|
21
|
-
variant: "contained",
|
|
22
|
-
type: "submit",
|
|
23
|
-
color: "primary",
|
|
24
|
-
loading: isSubmitting,
|
|
25
|
-
className: classes.actionFormIntro,
|
|
26
|
-
...props,
|
|
27
|
-
children: getLabel("common_actions.intro")
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
ActionFormIntro as A
|
|
33
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { B as Button } from "../../../mui_extended/Button/index-CGfZbaea.js";
|
|
4
|
-
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock-CF-669v-.js";
|
|
5
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index-CuG1pnXW.js";
|
|
6
|
-
const ACTIONINTRO_TEST_ID = "m4lactions";
|
|
7
|
-
const ActionIntro = (props) => {
|
|
8
|
-
const { getLabel } = useModuleDictionary();
|
|
9
|
-
const classes = useCommonActionsUtilityClasses();
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
Button,
|
|
12
|
-
{
|
|
13
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: ACTIONINTRO_TEST_ID } : {},
|
|
14
|
-
variant: "contained",
|
|
15
|
-
type: "submit",
|
|
16
|
-
color: "primary",
|
|
17
|
-
className: classes.actionIntro,
|
|
18
|
-
...props,
|
|
19
|
-
children: getLabel("common_actions.intro")
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
ActionIntro as A
|
|
25
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock-CF-669v-.js";
|
|
5
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
6
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index-DiMrtgIu.js";
|
|
8
|
-
import { W as WrapperStandarActions } from "../../../../styles/index-DKj6m8SL.js";
|
|
9
|
-
function getCommonActionsDictionary() {
|
|
10
|
-
return ["common_actions"];
|
|
11
|
-
}
|
|
12
|
-
const defaultCommonActionsDictionary = {
|
|
13
|
-
common_actions: {
|
|
14
|
-
cancel: "Cancel",
|
|
15
|
-
intro: "Intro",
|
|
16
|
-
confirm_quit_title: "Confirm",
|
|
17
|
-
confirm_quit_msg: "Are your sure exit?"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const componentName = "M4LCommonActions";
|
|
21
|
-
generateUtilityClasses(
|
|
22
|
-
componentName,
|
|
23
|
-
[
|
|
24
|
-
/* elements */
|
|
25
|
-
"root",
|
|
26
|
-
"skeleton",
|
|
27
|
-
"actionCancel",
|
|
28
|
-
"actionFormCancel",
|
|
29
|
-
"actionFormIntro",
|
|
30
|
-
"actionIntro",
|
|
31
|
-
"wrapperActions"
|
|
32
|
-
/* states or variants of elements */
|
|
33
|
-
]
|
|
34
|
-
);
|
|
35
|
-
const useCommonActionsUtilityClasses = () => {
|
|
36
|
-
const slots = {
|
|
37
|
-
root: ["root"],
|
|
38
|
-
skeleton: ["skeleton"],
|
|
39
|
-
actionCancel: ["actionCancel"],
|
|
40
|
-
actionFormCancel: ["actionFormCancel"],
|
|
41
|
-
actionFormIntro: ["actionFormIntro"],
|
|
42
|
-
actionIntro: ["actionIntro"],
|
|
43
|
-
wrapperActions: ["wrapperActions"]
|
|
44
|
-
};
|
|
45
|
-
return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
46
|
-
};
|
|
47
|
-
const COMMONACTIONS_PREFIX = "M4LCommonActions";
|
|
48
|
-
const getNameCommonActionsDataTestId = (KEY) => {
|
|
49
|
-
return `${COMMONACTIONS_PREFIX}-${KEY}`;
|
|
50
|
-
};
|
|
51
|
-
const Actions = forwardRef(function ActionsForwarded(props, ref) {
|
|
52
|
-
const { children, ...restProps } = props;
|
|
53
|
-
const classes = useCommonActionsUtilityClasses();
|
|
54
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
-
WrapperStandarActions,
|
|
56
|
-
{
|
|
57
|
-
...restProps,
|
|
58
|
-
ref,
|
|
59
|
-
className: clsx(classes.root, restProps?.className),
|
|
60
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameCommonActionsDataTestId("root") } : {},
|
|
61
|
-
children
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
export {
|
|
66
|
-
Actions as A,
|
|
67
|
-
defaultCommonActionsDictionary as d,
|
|
68
|
-
getCommonActionsDictionary as g,
|
|
69
|
-
useCommonActionsUtilityClasses as u
|
|
70
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const DATAGRID_PREFIX_NAME = "M4LDataGrid";
|
|
2
|
-
const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
|
|
3
|
-
const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
|
|
4
|
-
const componentName = "M4LDataGrid";
|
|
5
|
-
export {
|
|
6
|
-
DATAGRID_SELECT_COLUMN_KEY as D,
|
|
7
|
-
DATAGRID_PREFIX_NAME as a,
|
|
8
|
-
DATAGRID_ACTIONS_COLUMN_KEY as b,
|
|
9
|
-
componentName as c
|
|
10
|
-
};
|