cloudmr-ux 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -1
- package/dist/index.js +85 -18
- package/dist/index.mjs +81 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,20 @@ declare function CmrDeletionDialog(props: {
|
|
|
178
178
|
deletionCallback: () => void;
|
|
179
179
|
}): react_jsx_runtime.JSX.Element;
|
|
180
180
|
|
|
181
|
+
interface EditConfirmationProps {
|
|
182
|
+
name?: string;
|
|
183
|
+
defaultText?: string;
|
|
184
|
+
message?: string;
|
|
185
|
+
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
186
|
+
open: boolean;
|
|
187
|
+
setOpen: (open: boolean) => void;
|
|
188
|
+
confirmCallback?: (text: string) => void;
|
|
189
|
+
cancellable?: boolean;
|
|
190
|
+
cancelCallback?: (edit: string) => void;
|
|
191
|
+
suffix?: string;
|
|
192
|
+
}
|
|
193
|
+
declare function CmrEditConfirmation({ name, message, defaultText, color, open, setOpen, confirmCallback, cancellable, cancelCallback, suffix }: EditConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
194
|
+
|
|
181
195
|
interface TabInfo {
|
|
182
196
|
id: number;
|
|
183
197
|
text: string;
|
|
@@ -214,4 +228,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
|
|
|
214
228
|
|
|
215
229
|
declare const CmrTable: FC<CmrTableProps>;
|
|
216
230
|
|
|
217
|
-
export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrInput, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
|
|
231
|
+
export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
CmrCollapse: () => Collapse_default,
|
|
37
37
|
CmrConfirmation: () => CmrConfirmation,
|
|
38
38
|
CmrDeletionDialog: () => CmrDeletionDialog,
|
|
39
|
+
CmrEditConfirmation: () => CmrEditConfirmation,
|
|
39
40
|
CmrInput: () => CmrInput,
|
|
40
41
|
CmrNameDialog: () => CmrNameDialog,
|
|
41
42
|
CmrPanel: () => Panel_default,
|
|
@@ -929,18 +930,83 @@ function CmrDeletionDialog(props) {
|
|
|
929
930
|
] }) });
|
|
930
931
|
}
|
|
931
932
|
|
|
932
|
-
// src/
|
|
933
|
+
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
933
934
|
var React9 = __toESM(require("react"));
|
|
935
|
+
var import_TextField4 = __toESM(require("@mui/material/TextField"));
|
|
936
|
+
var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
|
|
937
|
+
var import_DialogActions5 = __toESM(require("@mui/material/DialogActions"));
|
|
938
|
+
var import_DialogContent5 = __toESM(require("@mui/material/DialogContent"));
|
|
939
|
+
var import_DialogContentText4 = __toESM(require("@mui/material/DialogContentText"));
|
|
940
|
+
var import_DialogTitle5 = __toESM(require("@mui/material/DialogTitle"));
|
|
941
|
+
var import_material9 = require("@mui/material");
|
|
942
|
+
var import_react6 = require("react");
|
|
943
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
944
|
+
function CmrEditConfirmation({
|
|
945
|
+
name,
|
|
946
|
+
message,
|
|
947
|
+
defaultText = "",
|
|
948
|
+
color,
|
|
949
|
+
open,
|
|
950
|
+
setOpen,
|
|
951
|
+
confirmCallback = () => {
|
|
952
|
+
},
|
|
953
|
+
cancellable = false,
|
|
954
|
+
cancelCallback = () => {
|
|
955
|
+
},
|
|
956
|
+
suffix = ""
|
|
957
|
+
}) {
|
|
958
|
+
const [text, setText] = React9.useState(defaultText);
|
|
959
|
+
(0, import_react6.useEffect)(() => {
|
|
960
|
+
if (open)
|
|
961
|
+
setText(defaultText);
|
|
962
|
+
}, [open]);
|
|
963
|
+
const handleClose = () => {
|
|
964
|
+
setOpen(false);
|
|
965
|
+
};
|
|
966
|
+
const handleConfirm = () => {
|
|
967
|
+
confirmCallback(text + suffix);
|
|
968
|
+
handleClose();
|
|
969
|
+
};
|
|
970
|
+
const handleCancel = () => {
|
|
971
|
+
cancelCallback(text + suffix);
|
|
972
|
+
handleClose();
|
|
973
|
+
};
|
|
974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_Dialog5.default, { maxWidth: "xs", fullWidth: true, open, onClose: handleCancel, children: [
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogTitle5.default, { children: name ? name : "Confirmation" }),
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogContent5.default, { children: [
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogContentText4.default, { alignContent: "center", children: message }),
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogActions5.default, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
979
|
+
import_TextField4.default,
|
|
980
|
+
{
|
|
981
|
+
fullWidth: true,
|
|
982
|
+
variant: "standard",
|
|
983
|
+
InputProps: {
|
|
984
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.InputAdornment, { position: "end", sx: { whiteSpace: "nowrap" }, children: suffix })
|
|
985
|
+
},
|
|
986
|
+
defaultValue: text,
|
|
987
|
+
onChange: (e) => setText(e.target.value)
|
|
988
|
+
}
|
|
989
|
+
) }),
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogActions5.default, { children: [
|
|
991
|
+
cancellable && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
|
|
992
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
|
|
993
|
+
] })
|
|
994
|
+
] })
|
|
995
|
+
] });
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// src/CmrTabs/CmrTabs.tsx
|
|
999
|
+
var React10 = __toESM(require("react"));
|
|
934
1000
|
var import_Tabs = __toESM(require("@mui/material/Tabs"));
|
|
935
1001
|
var import_Tab = __toESM(require("@mui/material/Tab"));
|
|
936
1002
|
var import_Container = __toESM(require("@mui/material/Container"));
|
|
937
1003
|
var import_Typography2 = __toESM(require("@mui/material/Typography"));
|
|
938
1004
|
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
939
|
-
var
|
|
940
|
-
var
|
|
1005
|
+
var import_react7 = require("react");
|
|
1006
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
941
1007
|
function CustomTabPanel(props) {
|
|
942
1008
|
const { children, value, index, ...other } = props;
|
|
943
|
-
return /* @__PURE__ */ (0,
|
|
1009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
944
1010
|
"div",
|
|
945
1011
|
{
|
|
946
1012
|
role: "tabpanel",
|
|
@@ -948,7 +1014,7 @@ function CustomTabPanel(props) {
|
|
|
948
1014
|
id: `simple-tabpanel-${index}`,
|
|
949
1015
|
"aria-labelledby": `simple-tab-${index}`,
|
|
950
1016
|
...other,
|
|
951
|
-
children: /* @__PURE__ */ (0,
|
|
1017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Box2.default, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Typography2.default, { children }) })
|
|
952
1018
|
}
|
|
953
1019
|
);
|
|
954
1020
|
}
|
|
@@ -959,13 +1025,13 @@ function a11yProps(index) {
|
|
|
959
1025
|
};
|
|
960
1026
|
}
|
|
961
1027
|
function CmrTabs(props) {
|
|
962
|
-
const [value, setValue] =
|
|
1028
|
+
const [value, setValue] = React10.useState(0);
|
|
963
1029
|
const handleChange = (event, newValue) => {
|
|
964
1030
|
setValue(newValue);
|
|
965
1031
|
if (props.onTabSelected)
|
|
966
1032
|
props.onTabSelected(newValue);
|
|
967
1033
|
};
|
|
968
|
-
return /* @__PURE__ */ (0,
|
|
1034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
969
1035
|
import_Container.default,
|
|
970
1036
|
{
|
|
971
1037
|
maxWidth: "lg",
|
|
@@ -976,7 +1042,7 @@ function CmrTabs(props) {
|
|
|
976
1042
|
mt: 4
|
|
977
1043
|
},
|
|
978
1044
|
children: [
|
|
979
|
-
/* @__PURE__ */ (0,
|
|
1045
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Box2.default, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
980
1046
|
import_Tabs.default,
|
|
981
1047
|
{
|
|
982
1048
|
value,
|
|
@@ -988,11 +1054,11 @@ function CmrTabs(props) {
|
|
|
988
1054
|
backgroundColor: "#580F8B"
|
|
989
1055
|
}
|
|
990
1056
|
},
|
|
991
|
-
children: props.tabList.map((tab, index) => /* @__PURE__ */ (0,
|
|
1057
|
+
children: props.tabList.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Tab.default, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
|
|
992
1058
|
}
|
|
993
1059
|
) }),
|
|
994
1060
|
props.tabList.map(
|
|
995
|
-
(tab, index) => /* @__PURE__ */ (0,
|
|
1061
|
+
(tab, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomTabPanel, { value, index, children: (0, import_react7.cloneElement)(tab.children, {
|
|
996
1062
|
visible: value == index
|
|
997
1063
|
}) })
|
|
998
1064
|
)
|
|
@@ -1002,19 +1068,19 @@ function CmrTabs(props) {
|
|
|
1002
1068
|
}
|
|
1003
1069
|
|
|
1004
1070
|
// src/CmrComponents/checkbox/Checkbox.tsx
|
|
1005
|
-
var import_material9 = require("@mui/material");
|
|
1006
1071
|
var import_material10 = require("@mui/material");
|
|
1007
|
-
var
|
|
1072
|
+
var import_material11 = require("@mui/material");
|
|
1073
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1008
1074
|
var CmrCheckbox = (props) => {
|
|
1009
1075
|
const { defaultChecked, onChange, children, ...rest } = props;
|
|
1010
|
-
return /* @__PURE__ */ (0,
|
|
1011
|
-
|
|
1076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1077
|
+
import_material11.FormControlLabel,
|
|
1012
1078
|
{
|
|
1013
1079
|
disabled: props.disabled,
|
|
1014
1080
|
style: props.style,
|
|
1015
1081
|
className: props.className,
|
|
1016
|
-
control: /* @__PURE__ */ (0,
|
|
1017
|
-
label: /* @__PURE__ */ (0,
|
|
1082
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.Checkbox, { style: props.style, checked: props.checked, defaultChecked, onChange }),
|
|
1083
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label_default, { children: props.children }),
|
|
1018
1084
|
sx: props.sx,
|
|
1019
1085
|
labelPlacement: "end"
|
|
1020
1086
|
}
|
|
@@ -1024,7 +1090,7 @@ var Checkbox_default = CmrCheckbox;
|
|
|
1024
1090
|
|
|
1025
1091
|
// src/CmrTable/CmrTable.tsx
|
|
1026
1092
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
1027
|
-
var
|
|
1093
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1028
1094
|
var CmrTable = (props) => {
|
|
1029
1095
|
const {
|
|
1030
1096
|
dataSource,
|
|
@@ -1036,7 +1102,7 @@ var CmrTable = (props) => {
|
|
|
1036
1102
|
showCheckbox = true,
|
|
1037
1103
|
...rest
|
|
1038
1104
|
} = props;
|
|
1039
|
-
return /* @__PURE__ */ (0,
|
|
1105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1040
1106
|
import_x_data_grid.DataGrid,
|
|
1041
1107
|
{
|
|
1042
1108
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1068,6 +1134,7 @@ var CmrTable2 = CmrTable_default;
|
|
|
1068
1134
|
CmrCollapse,
|
|
1069
1135
|
CmrConfirmation,
|
|
1070
1136
|
CmrDeletionDialog,
|
|
1137
|
+
CmrEditConfirmation,
|
|
1071
1138
|
CmrInput,
|
|
1072
1139
|
CmrNameDialog,
|
|
1073
1140
|
CmrPanel,
|
package/dist/index.mjs
CHANGED
|
@@ -887,18 +887,83 @@ function CmrDeletionDialog(props) {
|
|
|
887
887
|
] }) });
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
// src/
|
|
890
|
+
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
891
891
|
import * as React9 from "react";
|
|
892
|
+
import TextField4 from "@mui/material/TextField";
|
|
893
|
+
import Dialog5 from "@mui/material/Dialog";
|
|
894
|
+
import DialogActions5 from "@mui/material/DialogActions";
|
|
895
|
+
import DialogContent5 from "@mui/material/DialogContent";
|
|
896
|
+
import DialogContentText4 from "@mui/material/DialogContentText";
|
|
897
|
+
import DialogTitle5 from "@mui/material/DialogTitle";
|
|
898
|
+
import { InputAdornment } from "@mui/material";
|
|
899
|
+
import { useEffect as useEffect2 } from "react";
|
|
900
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
901
|
+
function CmrEditConfirmation({
|
|
902
|
+
name,
|
|
903
|
+
message,
|
|
904
|
+
defaultText = "",
|
|
905
|
+
color,
|
|
906
|
+
open,
|
|
907
|
+
setOpen,
|
|
908
|
+
confirmCallback = () => {
|
|
909
|
+
},
|
|
910
|
+
cancellable = false,
|
|
911
|
+
cancelCallback = () => {
|
|
912
|
+
},
|
|
913
|
+
suffix = ""
|
|
914
|
+
}) {
|
|
915
|
+
const [text, setText] = React9.useState(defaultText);
|
|
916
|
+
useEffect2(() => {
|
|
917
|
+
if (open)
|
|
918
|
+
setText(defaultText);
|
|
919
|
+
}, [open]);
|
|
920
|
+
const handleClose = () => {
|
|
921
|
+
setOpen(false);
|
|
922
|
+
};
|
|
923
|
+
const handleConfirm = () => {
|
|
924
|
+
confirmCallback(text + suffix);
|
|
925
|
+
handleClose();
|
|
926
|
+
};
|
|
927
|
+
const handleCancel = () => {
|
|
928
|
+
cancelCallback(text + suffix);
|
|
929
|
+
handleClose();
|
|
930
|
+
};
|
|
931
|
+
return /* @__PURE__ */ jsxs10(Dialog5, { maxWidth: "xs", fullWidth: true, open, onClose: handleCancel, children: [
|
|
932
|
+
/* @__PURE__ */ jsx14(DialogTitle5, { children: name ? name : "Confirmation" }),
|
|
933
|
+
/* @__PURE__ */ jsxs10(DialogContent5, { children: [
|
|
934
|
+
/* @__PURE__ */ jsx14(DialogContentText4, { alignContent: "center", children: message }),
|
|
935
|
+
/* @__PURE__ */ jsx14(DialogActions5, { children: /* @__PURE__ */ jsx14(
|
|
936
|
+
TextField4,
|
|
937
|
+
{
|
|
938
|
+
fullWidth: true,
|
|
939
|
+
variant: "standard",
|
|
940
|
+
InputProps: {
|
|
941
|
+
endAdornment: /* @__PURE__ */ jsx14(InputAdornment, { position: "end", sx: { whiteSpace: "nowrap" }, children: suffix })
|
|
942
|
+
},
|
|
943
|
+
defaultValue: text,
|
|
944
|
+
onChange: (e) => setText(e.target.value)
|
|
945
|
+
}
|
|
946
|
+
) }),
|
|
947
|
+
/* @__PURE__ */ jsxs10(DialogActions5, { children: [
|
|
948
|
+
cancellable && /* @__PURE__ */ jsx14(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
|
|
949
|
+
/* @__PURE__ */ jsx14(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
|
|
950
|
+
] })
|
|
951
|
+
] })
|
|
952
|
+
] });
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// src/CmrTabs/CmrTabs.tsx
|
|
956
|
+
import * as React10 from "react";
|
|
892
957
|
import Tabs from "@mui/material/Tabs";
|
|
893
958
|
import Tab from "@mui/material/Tab";
|
|
894
959
|
import Container from "@mui/material/Container";
|
|
895
960
|
import Typography3 from "@mui/material/Typography";
|
|
896
961
|
import Box3 from "@mui/material/Box";
|
|
897
962
|
import { cloneElement as cloneElement2 } from "react";
|
|
898
|
-
import { jsx as
|
|
963
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
899
964
|
function CustomTabPanel(props) {
|
|
900
965
|
const { children, value, index, ...other } = props;
|
|
901
|
-
return /* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ jsx15(
|
|
902
967
|
"div",
|
|
903
968
|
{
|
|
904
969
|
role: "tabpanel",
|
|
@@ -906,7 +971,7 @@ function CustomTabPanel(props) {
|
|
|
906
971
|
id: `simple-tabpanel-${index}`,
|
|
907
972
|
"aria-labelledby": `simple-tab-${index}`,
|
|
908
973
|
...other,
|
|
909
|
-
children: /* @__PURE__ */
|
|
974
|
+
children: /* @__PURE__ */ jsx15(Box3, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ jsx15(Typography3, { children }) })
|
|
910
975
|
}
|
|
911
976
|
);
|
|
912
977
|
}
|
|
@@ -917,13 +982,13 @@ function a11yProps(index) {
|
|
|
917
982
|
};
|
|
918
983
|
}
|
|
919
984
|
function CmrTabs(props) {
|
|
920
|
-
const [value, setValue] =
|
|
985
|
+
const [value, setValue] = React10.useState(0);
|
|
921
986
|
const handleChange = (event, newValue) => {
|
|
922
987
|
setValue(newValue);
|
|
923
988
|
if (props.onTabSelected)
|
|
924
989
|
props.onTabSelected(newValue);
|
|
925
990
|
};
|
|
926
|
-
return /* @__PURE__ */
|
|
991
|
+
return /* @__PURE__ */ jsxs11(
|
|
927
992
|
Container,
|
|
928
993
|
{
|
|
929
994
|
maxWidth: "lg",
|
|
@@ -934,7 +999,7 @@ function CmrTabs(props) {
|
|
|
934
999
|
mt: 4
|
|
935
1000
|
},
|
|
936
1001
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ jsx15(Box3, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ jsx15(
|
|
938
1003
|
Tabs,
|
|
939
1004
|
{
|
|
940
1005
|
value,
|
|
@@ -946,11 +1011,11 @@ function CmrTabs(props) {
|
|
|
946
1011
|
backgroundColor: "#580F8B"
|
|
947
1012
|
}
|
|
948
1013
|
},
|
|
949
|
-
children: props.tabList.map((tab, index) => /* @__PURE__ */
|
|
1014
|
+
children: props.tabList.map((tab, index) => /* @__PURE__ */ jsx15(Tab, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
|
|
950
1015
|
}
|
|
951
1016
|
) }),
|
|
952
1017
|
props.tabList.map(
|
|
953
|
-
(tab, index) => /* @__PURE__ */
|
|
1018
|
+
(tab, index) => /* @__PURE__ */ jsx15(CustomTabPanel, { value, index, children: cloneElement2(tab.children, {
|
|
954
1019
|
visible: value == index
|
|
955
1020
|
}) })
|
|
956
1021
|
)
|
|
@@ -962,17 +1027,17 @@ function CmrTabs(props) {
|
|
|
962
1027
|
// src/CmrComponents/checkbox/Checkbox.tsx
|
|
963
1028
|
import { Checkbox as Checkbox2 } from "@mui/material";
|
|
964
1029
|
import { FormControlLabel as FormControlLabel3 } from "@mui/material";
|
|
965
|
-
import { jsx as
|
|
1030
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
966
1031
|
var CmrCheckbox = (props) => {
|
|
967
1032
|
const { defaultChecked, onChange, children, ...rest } = props;
|
|
968
|
-
return /* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ jsx16(
|
|
969
1034
|
FormControlLabel3,
|
|
970
1035
|
{
|
|
971
1036
|
disabled: props.disabled,
|
|
972
1037
|
style: props.style,
|
|
973
1038
|
className: props.className,
|
|
974
|
-
control: /* @__PURE__ */
|
|
975
|
-
label: /* @__PURE__ */
|
|
1039
|
+
control: /* @__PURE__ */ jsx16(Checkbox2, { style: props.style, checked: props.checked, defaultChecked, onChange }),
|
|
1040
|
+
label: /* @__PURE__ */ jsx16(Label_default, { children: props.children }),
|
|
976
1041
|
sx: props.sx,
|
|
977
1042
|
labelPlacement: "end"
|
|
978
1043
|
}
|
|
@@ -982,7 +1047,7 @@ var Checkbox_default = CmrCheckbox;
|
|
|
982
1047
|
|
|
983
1048
|
// src/CmrTable/CmrTable.tsx
|
|
984
1049
|
import { DataGrid } from "@mui/x-data-grid";
|
|
985
|
-
import { jsx as
|
|
1050
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
986
1051
|
var CmrTable = (props) => {
|
|
987
1052
|
const {
|
|
988
1053
|
dataSource,
|
|
@@ -994,7 +1059,7 @@ var CmrTable = (props) => {
|
|
|
994
1059
|
showCheckbox = true,
|
|
995
1060
|
...rest
|
|
996
1061
|
} = props;
|
|
997
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx17("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx17(
|
|
998
1063
|
DataGrid,
|
|
999
1064
|
{
|
|
1000
1065
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1025,6 +1090,7 @@ export {
|
|
|
1025
1090
|
Collapse_default as CmrCollapse,
|
|
1026
1091
|
CmrConfirmation,
|
|
1027
1092
|
CmrDeletionDialog,
|
|
1093
|
+
CmrEditConfirmation,
|
|
1028
1094
|
CmrInput,
|
|
1029
1095
|
CmrNameDialog,
|
|
1030
1096
|
Panel_default as CmrPanel,
|