@m4l/components 1.0.11 → 1.0.12
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/components/AccountPopover/{index.62b1290b.js → index.705c7df5.js} +4 -4
- package/components/AppBar/{index.b48343d8.js → index.04816fec.js} +4 -4
- package/components/CommonActions/components/ActionCancel/index.609a78ca.js +12 -0
- package/components/CommonActions/components/ActionFormCancel/index.2a55418d.js +56 -0
- package/components/CommonActions/components/ActionFormIntro/index.34d569d1.js +33 -0
- package/components/CommonActions/components/ActionIntro/index.ebac0bc1.js +25 -0
- package/components/CommonActions/components/Actions/index.258bf919.js +71 -0
- package/components/DataGrid/constants.e334cd50.js +10 -0
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index.30ea5c9a.js +26 -0
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.512d6ee0.js +22 -0
- package/components/DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js +19 -0
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.5d294f5d.js +23 -0
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index.880e743b.js +14 -0
- package/components/DataGrid/formatters/ColumnPointsFormatter/index.226cc583.js +10 -0
- package/components/DataGrid/formatters/ColumnPriceFormatter/index.bf9d9e60.js +10 -0
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.4045b2f2.js +36 -0
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.a87302d1.js +10 -0
- package/components/DataGrid/formatters/index.2c2f0ae4.js +1 -0
- package/components/DataGrid/index.3ffee8f3.js +915 -0
- package/components/DataGrid/subcomponents/Actions/index.8224ef1a.js +596 -0
- package/components/DataGrid/subcomponents/editors/TextEditor/index.3f0d9e28.js +76 -0
- package/components/DragResizeWindow/{index.8b3e79f7.js → index.917d150b.js} +6 -3
- package/components/DynamicFilter/helpers/{index.609b3915.js → index.9baa9ef7.js} +3 -4
- package/components/DynamicFilter/{index.0f04f223.js → index.7e64ade0.js} +84 -6
- package/components/DynamicFilter/slots/{index.00b68384.js → index.dbb0936d.js} +30 -31
- package/components/DynamicFilter/store/{index.85a2812f.js → index.eafe4a4d.js} +2 -2
- package/components/DynamicFilter/subcomponents/{index.86c6fda2.js → index.d5bea68c.js} +215 -15
- package/components/FieldLabel/{index.1577ac9c.js → index.317f5f6f.js} +4 -4
- package/components/GridLayout/{index.656840a5.js → index.68d907d4.js} +34 -11
- package/components/GridLayout/subcomponents/Griditem/{index.b23625d7.js → index.8955a794.js} +3 -4
- package/components/GridLayout/subcomponents/Responsive/{index.97505a31.js → index.45cecca2.js} +1 -2
- package/components/GridLayout/subcomponents/SizeProvider/{index.36cb4139.js → index.7050ac4f.js} +1 -1
- package/components/HelperText/{index.ebb53dac.js → index.09e80920.js} +1 -1
- package/components/Icon/{index.8ecfb193.js → index.0598dfb1.js} +10 -26
- package/components/Image/{index.4a822ede.js → index.19aa7ff5.js} +3 -2
- package/components/LanguagePopover/index.921efd11.js +188 -0
- package/components/{mui_extended/LinearProgress/index.e9455b2e.js → LinearProgressIndeterminate/index.ea9c8518.js} +4 -9
- package/components/LoadingError/{index.9e829e8d.js → index.1e464569.js} +11 -7
- package/components/MFLoader/{index.29f445e2.js → index.08b59dce.js} +8 -4
- package/components/ModalDialog/{index.96c4aba3.js → index.0dd5af28.js} +14 -5
- package/components/NavLink/{index.9f5d5670.js → index.ad039baf.js} +3 -2
- package/components/NoItemSelected/{index.0ae9f28f.js → index.d10603d7.js} +13 -3
- package/components/ObjectLogs/{index.40c5047f.js → index.72dc8feb.js} +25 -8
- package/components/PDFViewer/{index.651cc4b6.js → index.35f68e67.js} +2 -2
- package/components/Page/{index.1d08818c.js → index.f4755eba.js} +18 -2
- package/components/PaperForm/{index.1a8b10d4.js → index.5ef72398.js} +2 -2
- package/components/Period/{index.236971ae.js → index.301a752f.js} +15 -54
- package/components/PrintingSystem/{index.9fdae551.js → index.a69a9d85.js} +14 -15
- package/components/PrintingSystem/subcomponents/BodyNode/{index.794dbc69.js → index.528fcfbf.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.6bbf7d75.js → index.fbe87257.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.015a2212.js → index.f5adab1d.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.08eeb1d2.js → index.f42ca7dc.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.23995699.js → index.041b9cff.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.3fa36620.js → index.a8140332.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.8b7d43f4.js → index.aabde2bb.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.9856c572.js → index.7f75ca46.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.89b3a4e0.js → index.61babb47.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.dc6e9dc2.js → index.4d0e67a3.js} +1 -1
- package/components/PropertyValue/{index.646a7e8b.js → index.0b5c361c.js} +7 -4
- package/components/Resizeable/{index.414ff687.js → index.4f75c0b5.js} +1 -1
- package/components/ScrollBar/{index.1e89bb44.js → index.21bc5025.js} +1 -1
- package/components/SideBar/{index.d221254d.js → index.8fdf28e0.js} +36 -7
- package/components/SplitLayout/{index.7d9edf4e.js → index.15756f0f.js} +3 -1
- package/components/ToastContainer/{index.7f246bbd.js → index.123d26d9.js} +3 -3
- package/components/animate/variants/index.7a912140.js +1 -0
- package/components/areas/components/AreasAdmin/index.1aec24f3.js +733 -0
- package/components/areas/components/AreasViewer/index.429dbb7b.js +1072 -0
- package/components/areas/components/index.558684b3.js +1 -0
- package/components/areas/constants.66529246.js +6 -0
- package/components/areas/contexts/AreasContext/{index.0815f278.js → index.2e7cdc05.js} +6 -5
- package/components/areas/contexts/DynamicMFParmsContext/{index.37d1d444.js → index.3d9ad0ad.js} +2 -2
- package/components/areas/contexts/WindowToolsMFContext/{index.69d95c15.js → index.992ae7a3.js} +2 -2
- package/components/areas/contexts/index.24025b97.js +1 -0
- package/components/areas/dictionary.08cfc4c9.js +36 -0
- package/components/areas/hooks/index.d9dc1e21.js +1 -0
- package/components/areas/hooks/useAreas/{index.4039e30d.js → index.8913b7b5.js} +1 -1
- package/components/areas/hooks/useDynamicMFParameters/{index.03ce6078.js → index.9e09e1e3.js} +1 -1
- package/components/areas/hooks/useWindowToolsMF/{index.09801b66.js → index.2fbae9dc.js} +1 -1
- package/components/areas/icons.8266ccc8.js +26 -0
- package/components/areas/index.4cc6a221.js +22 -0
- package/components/commercial/AppBarCommercial/index.cbd55cf8.js +28 -0
- package/components/commercial/SectionCommercial/index.d22ebbd5.js +57 -0
- package/components/commercial/TopBar/index.20c4b2ea.js +234 -0
- package/components/{HamburgerMenu/index.6c82741d.js → commercial/index.504bddfe.js} +5 -3
- package/components/formatters/BooleanFormatter/index.a4abeebc.js +44 -0
- package/components/formatters/DateFormatter/index.2ef6f261.js +43 -0
- package/components/formatters/PointsFormatter/index.d8a4ee54.js +25 -0
- package/components/formatters/PriceFormatter/index.97f75b4b.js +35 -0
- package/components/formatters/UncertaintyFormatter/index.c3ffdebc.js +29 -0
- package/components/formatters/index.18f49751.js +117 -0
- package/components/hook-form/HelperError/{index.2ed03a3c.js → index.c0109d5b.js} +1 -1
- package/components/hook-form/RHFAutocomplete/index.d6dd0f42.js +404 -0
- package/components/hook-form/RHFAutocompleteAsync/{index.69f5661d.js → index.35d82ca9.js} +2 -3
- package/components/hook-form/RHFCheckbox/{index.13de27db.js → index.6a1b97dd.js} +4 -4
- package/components/hook-form/RHFColorPicker/{index.66004599.js → index.dccd7187.js} +6 -6
- package/components/hook-form/RHFDateTime/{index.dfe07e18.js → index.15976fef.js} +5 -5
- package/components/hook-form/RHFPeriod/{index.d852649b.js → index.e6d5c3a6.js} +4 -4
- package/components/hook-form/RHFTextField/{index.d207efc1.js → index.55f91506.js} +6 -6
- package/components/hook-form/RHFUpload/{index.955a4ba5.js → index.7fd23b2a.js} +5 -5
- package/components/{mui_extended/Tab/index.37d588d6.js → maps/components/GpsTools/index.b126f06c.js} +331 -645
- package/components/maps/{index.a1bf63f2.js → components/Map/index.c163038c.js} +737 -28
- package/components/maps/index.13bb982c.js +7 -0
- package/components/modal/{WindowBase.390b0910.js → WindowBase.6fbd595f.js} +4 -4
- package/components/modal/{WindowConfirm.243e1bef.js → WindowConfirm.a33e1d29.js} +10 -6
- package/components/modal/{index.5bce430d.js → index.81eb6def.js} +5 -1
- package/components/mui_extended/Accordion/{index.f7a17c83.js → index.808f22d7.js} +5 -5
- package/components/mui_extended/Avatar/{index.12b96914.js → index.fb9ad158.js} +1 -1
- package/components/mui_extended/Badge/{index.4737c113.js → index.8beaeefc.js} +1 -1
- package/components/mui_extended/Button/{index.52852c42.js → index.d742e9ee.js} +6 -81
- package/components/mui_extended/{CheckBox/index.01218423.js → CheckBox.2f354abf.js} +1 -1
- package/components/mui_extended/IconButton/{index.d5b273e6.js → index.98914ce2.js} +1 -1
- package/components/mui_extended/LinearProgress/index.4092bb69.js +9 -0
- package/components/mui_extended/MenuActions/index.ba7f3376.js +176 -0
- package/components/mui_extended/Pager/{index.8960227c.js → index.abeb8d39.js} +22 -40
- package/components/mui_extended/Popover/index.2348fc4f.js +143 -0
- package/components/mui_extended/Tab/index.e911930f.js +135 -0
- package/components/mui_extended/ToggleButton/{index.c441b949.js → index.b834f5f0.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.8a84f25e.js → index.efed3ff5.js} +1 -1
- package/components/mui_extended/Typography/{index.463f613f.js → index.642798f1.js} +1 -1
- package/components/mui_extended/index.b606cd9d.js +1 -0
- package/components/popups/PopupsProvider/{index.d4caacc3.js → index.8609e808.js} +1 -1
- package/components/popups/PopupsViewer/{index.42312806.js → index.bfab9357.js} +10 -6
- package/contexts/ModalContext/{index.5f77a463.js → index.ad1fb73b.js} +1 -1
- package/contexts/RHFormContext/{index.95ebabc9.js → index.bf3a2812.js} +6 -2
- package/hooks/useFormAddEdit/{index.ecb77e67.js → index.faafbfae.js} +6 -2
- package/hooks/useModal/index.2003c854.js +11 -0
- package/hooks/useTab/index.8d1a6e63.js +12 -0
- package/index.js +330 -277
- package/package.json +1 -1
- package/{react-draggable.0cc9b257.js → react-draggable.1c1ba224.js} +1 -1
- package/{react-resizable.837c446d.js → react-resizable.a59c14f4.js} +2 -2
- package/test/constants_no_mock.86c553a9.js +4 -0
- package/test/{getNameDataTestId.aee44365.js → getNameDataTestId.0faeade8.js} +2 -2
- package/utils/{index.c64c2dd1.js → index.14912462.js} +1 -54
- package/components/CommonActions/index.19f39dca.js +0 -170
- package/components/areas/constants.0d3ba950.js +0 -289
- package/components/areas/dictionary.6168209a.js +0 -266
- package/components/areas/icons.504ec098.js +0 -83
- package/components/maps/components/GpsTools/index.01acaf3e.js +0 -251
- package/components/mui_extended/Popover/index.146ded9e.js +0 -1044
- package/hooks/useModal/index.d14c7e46.js +0 -67
- package/vendor.5b266106.js +0 -3952
|
@@ -3,11 +3,11 @@ import { useEnvironment, useModuleDictionary, useNetwork } from "@m4l/core";
|
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
4
|
import { generateUtilityClasses, generateUtilityClass, styled, useTheme, ButtonBase } from "@mui/material";
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { T as TEST_PROP_ID } from "
|
|
7
|
-
import { A as Avatar } from "../mui_extended/Avatar/index.
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
7
|
+
import { A as Avatar } from "../mui_extended/Avatar/index.fb9ad158.js";
|
|
8
8
|
import { C as CircularProgress } from "../mui_extended/CircularProgress/index.967e70b7.js";
|
|
9
|
-
import { P as Popover } from "../mui_extended/Popover/index.
|
|
10
|
-
import { I as Icon } from "../Icon/index.
|
|
9
|
+
import { P as Popover } from "../mui_extended/Popover/index.2348fc4f.js";
|
|
10
|
+
import { I as Icon } from "../Icon/index.0598dfb1.js";
|
|
11
11
|
import clsx from "clsx";
|
|
12
12
|
const componentName = "M4LAccountPopover";
|
|
13
13
|
generateUtilityClasses(
|
|
@@ -2,12 +2,12 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
3
|
import { useResponsiveContainerStore } from "@m4l/graphics";
|
|
4
4
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
5
|
-
import { T as TEST_PROP_ID } from "
|
|
5
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
6
6
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
|
-
import { I as Image } from "../Image/index.
|
|
9
|
-
import { T as Typography } from "../mui_extended/Typography/index.
|
|
10
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
8
|
+
import { I as Image } from "../Image/index.19aa7ff5.js";
|
|
9
|
+
import { T as Typography } from "../mui_extended/Typography/index.642798f1.js";
|
|
10
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.98914ce2.js";
|
|
11
11
|
const AppBarRoot = styled("header")(({ theme }) => ({
|
|
12
12
|
...theme.components?.M4LAppBar?.styleOverrides
|
|
13
13
|
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { B as Button } from "../../../mui_extended/Button/index.d742e9ee.js";
|
|
4
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.258bf919.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
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
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.d742e9ee.js";
|
|
5
|
+
import { useCallback, useEffect } from "react";
|
|
6
|
+
import { u as useModal } from "../../../../hooks/useModal/index.2003c854.js";
|
|
7
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.258bf919.js";
|
|
8
|
+
import { u as useWindowToolsMF } from "../../../areas/hooks/useWindowToolsMF/index.2fbae9dc.js";
|
|
9
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.a33e1d29.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
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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.d742e9ee.js";
|
|
6
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.258bf919.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
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { B as Button } from "../../../mui_extended/Button/index.d742e9ee.js";
|
|
4
|
+
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
|
|
5
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.258bf919.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
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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.86c553a9.js";
|
|
5
|
+
import { generateUtilityClasses } from "@mui/material";
|
|
6
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.14912462.js";
|
|
8
|
+
import { styled } from "@mui/material/styles";
|
|
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
|
+
"root",
|
|
25
|
+
"skeleton",
|
|
26
|
+
"actionCancel",
|
|
27
|
+
"actionFormCancel",
|
|
28
|
+
"actionFormIntro",
|
|
29
|
+
"actionIntro",
|
|
30
|
+
"wrapperActions"
|
|
31
|
+
]
|
|
32
|
+
);
|
|
33
|
+
const useCommonActionsUtilityClasses = () => {
|
|
34
|
+
const slots = {
|
|
35
|
+
root: ["root"],
|
|
36
|
+
skeleton: ["skeleton"],
|
|
37
|
+
actionCancel: ["actionCancel"],
|
|
38
|
+
actionFormCancel: ["actionFormCancel"],
|
|
39
|
+
actionFormIntro: ["actionFormIntro"],
|
|
40
|
+
actionIntro: ["actionIntro"],
|
|
41
|
+
wrapperActions: ["wrapperActions"]
|
|
42
|
+
};
|
|
43
|
+
return unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
44
|
+
};
|
|
45
|
+
const WrapperStandarActions = styled("div")(({ theme }) => ({
|
|
46
|
+
...theme.components?.M4LCommonActions?.styleOverrides
|
|
47
|
+
}));
|
|
48
|
+
const COMMONACTIONS_PREFIX = "M4LCommonActions";
|
|
49
|
+
const getNameCommonActionsDataTestId = (KEY) => {
|
|
50
|
+
return `${COMMONACTIONS_PREFIX}-${KEY}`;
|
|
51
|
+
};
|
|
52
|
+
const Actions = forwardRef(function ActionsForwarded(props, ref) {
|
|
53
|
+
const { children, ...restProps } = props;
|
|
54
|
+
const classes = useCommonActionsUtilityClasses();
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
WrapperStandarActions,
|
|
57
|
+
{
|
|
58
|
+
...restProps,
|
|
59
|
+
ref,
|
|
60
|
+
className: clsx(classes.root, restProps?.className),
|
|
61
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameCommonActionsDataTestId("root") } : {},
|
|
62
|
+
children
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
Actions as A,
|
|
68
|
+
defaultCommonActionsDictionary as d,
|
|
69
|
+
getCommonActionsDictionary as g,
|
|
70
|
+
useCommonActionsUtilityClasses as u
|
|
71
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/index.a4abeebc.js";
|
|
4
|
+
function ColumnBooleanFormatter(props) {
|
|
5
|
+
const { fieldValue, presentationType, Component } = props;
|
|
6
|
+
return (obProps) => {
|
|
7
|
+
const valueMaybeString = getPropertyByString(obProps, fieldValue);
|
|
8
|
+
let fixedValue;
|
|
9
|
+
if (typeof valueMaybeString === "boolean") {
|
|
10
|
+
fixedValue = valueMaybeString;
|
|
11
|
+
} else {
|
|
12
|
+
fixedValue = void 0;
|
|
13
|
+
}
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
BooleanFormatter,
|
|
16
|
+
{
|
|
17
|
+
presentationType,
|
|
18
|
+
value: fixedValue,
|
|
19
|
+
Component
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
ColumnBooleanFormatter as C
|
|
26
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { C as ConcatenatedFormatter } from "../../../formatters/index.18f49751.js";
|
|
4
|
+
function ColumnConcatenatedValueFormatter(props) {
|
|
5
|
+
const { fieldValue, fieldSeparator, Component } = props;
|
|
6
|
+
return (obProps) => {
|
|
7
|
+
const values = fieldValue.map((element) => {
|
|
8
|
+
const valueMaybeString = getPropertyByString(obProps, element);
|
|
9
|
+
let fixedValue;
|
|
10
|
+
if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
|
|
11
|
+
fixedValue = valueMaybeString;
|
|
12
|
+
} else {
|
|
13
|
+
fixedValue = "";
|
|
14
|
+
}
|
|
15
|
+
return fixedValue;
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ jsx(ConcatenatedFormatter, { values, separator: fieldSeparator, Component });
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
ColumnConcatenatedValueFormatter as C
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { D as DateFormatter } from "../../../formatters/DateFormatter/index.2ef6f261.js";
|
|
4
|
+
function ColumnDateFormatter(props) {
|
|
5
|
+
const { fieldValue, presentationType, Component } = props;
|
|
6
|
+
return (obProps) => {
|
|
7
|
+
const valueMaybeDateStringNumber = getPropertyByString(obProps, fieldValue);
|
|
8
|
+
let fixedValue;
|
|
9
|
+
if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
|
|
10
|
+
fixedValue = valueMaybeDateStringNumber;
|
|
11
|
+
} else {
|
|
12
|
+
fixedValue = "";
|
|
13
|
+
}
|
|
14
|
+
return /* @__PURE__ */ jsx(DateFormatter, { presentationType, value: fixedValue, Component });
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
ColumnDateFormatter as C
|
|
19
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox } from "@mui/material";
|
|
3
|
+
import { d as dataGridClasses } from "../../index.3ffee8f3.js";
|
|
4
|
+
function ColumnInteractiveCheckFormatter(props) {
|
|
5
|
+
const { row, onRowChange, column } = props;
|
|
6
|
+
const handleChange = () => {
|
|
7
|
+
const newRow = { ...row };
|
|
8
|
+
newRow[column.key] = !row[column.key];
|
|
9
|
+
onRowChange(newRow);
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Checkbox,
|
|
13
|
+
{
|
|
14
|
+
size: "small",
|
|
15
|
+
checked: row[column.key] || false,
|
|
16
|
+
onChange: handleChange,
|
|
17
|
+
className: dataGridClasses.formatterColumn
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
ColumnInteractiveCheckFormatter as C
|
|
23
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { W as WrapperComponent } from "../../../WrapperComponent/index.57964195.js";
|
|
4
|
+
function ColumnNestedValueFormatter(props) {
|
|
5
|
+
const { fieldValue, Component = WrapperComponent } = props;
|
|
6
|
+
return (obProps) => {
|
|
7
|
+
const property = getPropertyByString(obProps, fieldValue);
|
|
8
|
+
const value = typeof property === "object" ? "" : property;
|
|
9
|
+
return /* @__PURE__ */ jsx(Component, { children: value });
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
ColumnNestedValueFormatter as C
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { P as PointsFormatter } from "../../../formatters/PointsFormatter/index.d8a4ee54.js";
|
|
3
|
+
function ColumnPointsFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(PointsFormatter, { obProps, ...props });
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
ColumnPointsFormatter as C
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { P as PriceFormatter } from "../../../formatters/PriceFormatter/index.97f75b4b.js";
|
|
3
|
+
function ColumnPriceFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(PriceFormatter, { obProps, ...props });
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
ColumnPriceFormatter as C
|
|
10
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { S as SelectCellFormatter } from "../../../../react-data-grid.c5377916.js";
|
|
3
|
+
function ColumnSetCheckFormatter(parameters) {
|
|
4
|
+
const { field, disabledGetter, rowKeyGetter, useHook } = parameters;
|
|
5
|
+
const formatter = (props) => {
|
|
6
|
+
const { row } = props;
|
|
7
|
+
const [checkedRows, setCheckedRows] = useHook(field);
|
|
8
|
+
const onChange = (checked, _isShiftClick) => {
|
|
9
|
+
const newCheckedRows = new Set(checkedRows);
|
|
10
|
+
if (checked) {
|
|
11
|
+
newCheckedRows.add(rowKeyGetter(props.row));
|
|
12
|
+
} else {
|
|
13
|
+
newCheckedRows.delete(rowKeyGetter(props.row));
|
|
14
|
+
}
|
|
15
|
+
setCheckedRows(newCheckedRows);
|
|
16
|
+
};
|
|
17
|
+
let disabled = false;
|
|
18
|
+
if (disabledGetter) {
|
|
19
|
+
disabled = disabledGetter(row);
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
SelectCellFormatter,
|
|
23
|
+
{
|
|
24
|
+
value: checkedRows.has(rowKeyGetter(row)) || false,
|
|
25
|
+
disabled,
|
|
26
|
+
isCellSelected: props.isCellSelected,
|
|
27
|
+
onChange,
|
|
28
|
+
"aria-label": "Select"
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
return formatter;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
ColumnSetCheckFormatter as C
|
|
36
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { U as UncertaintyFormatter } from "../../../formatters/UncertaintyFormatter/index.c3ffdebc.js";
|
|
3
|
+
function ColumnUncertaintyFormatter(props) {
|
|
4
|
+
return (obProps) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(UncertaintyFormatter, { obProps, ...props });
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
ColumnUncertaintyFormatter as C
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|