cloudmr-ux 1.9.3 → 1.9.5
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 +5 -11
- package/dist/index.js +12 -30
- package/dist/index.mjs +17 -35
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -161,24 +161,18 @@ declare function CmrNameDialog(props: {
|
|
|
161
161
|
setOpen: (open: boolean) => void;
|
|
162
162
|
}): react_jsx_runtime.JSX.Element;
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
text: string;
|
|
166
|
-
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
167
|
-
onClick: () => void;
|
|
168
|
-
};
|
|
169
|
-
declare function CmrConfirmation({ name, message, cancelText, confirmText, color, open, setOpen, confirmCallback, cancelCallback, cancellable, width, extraButtons, }: {
|
|
164
|
+
declare function CmrConfirmation({ name, message, cancelText, color, open, setOpen, confirmCallback, confirmText, cancellable, cancelCallback, width }: {
|
|
170
165
|
name: string | undefined;
|
|
171
|
-
message: string | undefined;
|
|
172
166
|
cancelText?: string;
|
|
173
|
-
|
|
174
|
-
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
167
|
+
message: string | undefined;
|
|
168
|
+
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
175
169
|
open: boolean;
|
|
176
170
|
setOpen: (open: boolean) => void;
|
|
177
171
|
confirmCallback?: () => void;
|
|
178
|
-
cancelCallback?: () => void;
|
|
179
172
|
cancellable?: boolean;
|
|
173
|
+
cancelCallback?: () => void;
|
|
180
174
|
width?: number;
|
|
181
|
-
|
|
175
|
+
confirmText?: string;
|
|
182
176
|
}): react_jsx_runtime.JSX.Element;
|
|
183
177
|
|
|
184
178
|
declare function CmrDeletionDialog(props: {
|
package/dist/index.js
CHANGED
|
@@ -843,6 +843,7 @@ function CmrNameDialog(props) {
|
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
// src/CmrComponents/dialogue/Confirmation.tsx
|
|
846
|
+
var React7 = __toESM(require("react"));
|
|
846
847
|
var import_Dialog3 = __toESM(require("@mui/material/Dialog"));
|
|
847
848
|
var import_DialogActions3 = __toESM(require("@mui/material/DialogActions"));
|
|
848
849
|
var import_DialogContent3 = __toESM(require("@mui/material/DialogContent"));
|
|
@@ -853,18 +854,18 @@ function CmrConfirmation({
|
|
|
853
854
|
name,
|
|
854
855
|
message,
|
|
855
856
|
cancelText = "Cancel",
|
|
856
|
-
confirmText = "Confirm",
|
|
857
857
|
color,
|
|
858
858
|
open,
|
|
859
859
|
setOpen,
|
|
860
860
|
confirmCallback = () => {
|
|
861
861
|
},
|
|
862
|
+
confirmText = "Confirm",
|
|
863
|
+
cancellable = false,
|
|
862
864
|
cancelCallback = () => {
|
|
863
865
|
},
|
|
864
|
-
|
|
865
|
-
width,
|
|
866
|
-
extraButtons = []
|
|
866
|
+
width
|
|
867
867
|
}) {
|
|
868
|
+
const [text, setText] = React7.useState("");
|
|
868
869
|
const handleClose = () => {
|
|
869
870
|
setOpen(false);
|
|
870
871
|
};
|
|
@@ -882,25 +883,6 @@ function CmrConfirmation({
|
|
|
882
883
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_DialogContentText2.default, { alignContent: "center", children: message }),
|
|
883
884
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_DialogActions3.default, { className: "mt-4", children: [
|
|
884
885
|
cancellable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton_default, { variant: "outlined", onClick: handleCancel, children: cancelText }),
|
|
885
|
-
extraButtons.map((btn, idx) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
886
|
-
CmrButton_default,
|
|
887
|
-
{
|
|
888
|
-
variant: "outlined",
|
|
889
|
-
color: btn.color || "primary",
|
|
890
|
-
onClick: () => {
|
|
891
|
-
btn.onClick();
|
|
892
|
-
handleClose();
|
|
893
|
-
},
|
|
894
|
-
sx: {
|
|
895
|
-
backgroundColor: "#f3e5f5",
|
|
896
|
-
"&:hover": {
|
|
897
|
-
backgroundColor: "#e1bee7"
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
children: btn.text
|
|
901
|
-
},
|
|
902
|
-
idx
|
|
903
|
-
)),
|
|
904
886
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
|
|
905
887
|
] })
|
|
906
888
|
] })
|
|
@@ -908,7 +890,7 @@ function CmrConfirmation({
|
|
|
908
890
|
}
|
|
909
891
|
|
|
910
892
|
// src/CmrComponents/dialogue/DeletionDialog.tsx
|
|
911
|
-
var
|
|
893
|
+
var React8 = __toESM(require("react"));
|
|
912
894
|
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
913
895
|
var import_Dialog4 = __toESM(require("@mui/material/Dialog"));
|
|
914
896
|
var import_DialogActions4 = __toESM(require("@mui/material/DialogActions"));
|
|
@@ -917,8 +899,8 @@ var import_DialogContentText3 = __toESM(require("@mui/material/DialogContentText
|
|
|
917
899
|
var import_DialogTitle4 = __toESM(require("@mui/material/DialogTitle"));
|
|
918
900
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
919
901
|
function CmrDeletionDialog(props) {
|
|
920
|
-
const [open, setOpen] =
|
|
921
|
-
const [text, setText] =
|
|
902
|
+
const [open, setOpen] = React8.useState(true);
|
|
903
|
+
const [text, setText] = React8.useState("");
|
|
922
904
|
const handleClickOpen = () => {
|
|
923
905
|
setOpen(true);
|
|
924
906
|
};
|
|
@@ -961,7 +943,7 @@ function CmrDeletionDialog(props) {
|
|
|
961
943
|
}
|
|
962
944
|
|
|
963
945
|
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
964
|
-
var
|
|
946
|
+
var React9 = __toESM(require("react"));
|
|
965
947
|
var import_TextField4 = __toESM(require("@mui/material/TextField"));
|
|
966
948
|
var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
|
|
967
949
|
var import_DialogActions5 = __toESM(require("@mui/material/DialogActions"));
|
|
@@ -985,7 +967,7 @@ function CmrEditConfirmation({
|
|
|
985
967
|
},
|
|
986
968
|
suffix = ""
|
|
987
969
|
}) {
|
|
988
|
-
const [text, setText] =
|
|
970
|
+
const [text, setText] = React9.useState(defaultText);
|
|
989
971
|
(0, import_react6.useEffect)(() => {
|
|
990
972
|
if (open)
|
|
991
973
|
setText(defaultText);
|
|
@@ -1026,7 +1008,7 @@ function CmrEditConfirmation({
|
|
|
1026
1008
|
}
|
|
1027
1009
|
|
|
1028
1010
|
// src/CmrTabs/CmrTabs.tsx
|
|
1029
|
-
var
|
|
1011
|
+
var React10 = __toESM(require("react"));
|
|
1030
1012
|
var import_Tabs = __toESM(require("@mui/material/Tabs"));
|
|
1031
1013
|
var import_Tab = __toESM(require("@mui/material/Tab"));
|
|
1032
1014
|
var import_Container = __toESM(require("@mui/material/Container"));
|
|
@@ -1055,7 +1037,7 @@ function a11yProps(index) {
|
|
|
1055
1037
|
};
|
|
1056
1038
|
}
|
|
1057
1039
|
function CmrTabs(props) {
|
|
1058
|
-
const [value, setValue] =
|
|
1040
|
+
const [value, setValue] = React10.useState(0);
|
|
1059
1041
|
const handleChange = (event, newValue) => {
|
|
1060
1042
|
setValue(newValue);
|
|
1061
1043
|
if (props.onTabSelected)
|
package/dist/index.mjs
CHANGED
|
@@ -795,6 +795,7 @@ function CmrNameDialog(props) {
|
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
// src/CmrComponents/dialogue/Confirmation.tsx
|
|
798
|
+
import * as React7 from "react";
|
|
798
799
|
import Dialog3 from "@mui/material/Dialog";
|
|
799
800
|
import DialogActions3 from "@mui/material/DialogActions";
|
|
800
801
|
import DialogContent3 from "@mui/material/DialogContent";
|
|
@@ -805,18 +806,18 @@ function CmrConfirmation({
|
|
|
805
806
|
name,
|
|
806
807
|
message,
|
|
807
808
|
cancelText = "Cancel",
|
|
808
|
-
confirmText = "Confirm",
|
|
809
809
|
color,
|
|
810
810
|
open,
|
|
811
811
|
setOpen,
|
|
812
812
|
confirmCallback = () => {
|
|
813
813
|
},
|
|
814
|
+
confirmText = "Confirm",
|
|
815
|
+
cancellable = false,
|
|
814
816
|
cancelCallback = () => {
|
|
815
817
|
},
|
|
816
|
-
|
|
817
|
-
width,
|
|
818
|
-
extraButtons = []
|
|
818
|
+
width
|
|
819
819
|
}) {
|
|
820
|
+
const [text, setText] = React7.useState("");
|
|
820
821
|
const handleClose = () => {
|
|
821
822
|
setOpen(false);
|
|
822
823
|
};
|
|
@@ -834,25 +835,6 @@ function CmrConfirmation({
|
|
|
834
835
|
/* @__PURE__ */ jsx12(DialogContentText2, { alignContent: "center", children: message }),
|
|
835
836
|
/* @__PURE__ */ jsxs8(DialogActions3, { className: "mt-4", children: [
|
|
836
837
|
cancellable && /* @__PURE__ */ jsx12(CmrButton_default, { variant: "outlined", onClick: handleCancel, children: cancelText }),
|
|
837
|
-
extraButtons.map((btn, idx) => /* @__PURE__ */ jsx12(
|
|
838
|
-
CmrButton_default,
|
|
839
|
-
{
|
|
840
|
-
variant: "outlined",
|
|
841
|
-
color: btn.color || "primary",
|
|
842
|
-
onClick: () => {
|
|
843
|
-
btn.onClick();
|
|
844
|
-
handleClose();
|
|
845
|
-
},
|
|
846
|
-
sx: {
|
|
847
|
-
backgroundColor: "#f3e5f5",
|
|
848
|
-
"&:hover": {
|
|
849
|
-
backgroundColor: "#e1bee7"
|
|
850
|
-
}
|
|
851
|
-
},
|
|
852
|
-
children: btn.text
|
|
853
|
-
},
|
|
854
|
-
idx
|
|
855
|
-
)),
|
|
856
838
|
/* @__PURE__ */ jsx12(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
|
|
857
839
|
] })
|
|
858
840
|
] })
|
|
@@ -860,7 +842,7 @@ function CmrConfirmation({
|
|
|
860
842
|
}
|
|
861
843
|
|
|
862
844
|
// src/CmrComponents/dialogue/DeletionDialog.tsx
|
|
863
|
-
import * as
|
|
845
|
+
import * as React8 from "react";
|
|
864
846
|
import TextField3 from "@mui/material/TextField";
|
|
865
847
|
import Dialog4 from "@mui/material/Dialog";
|
|
866
848
|
import DialogActions4 from "@mui/material/DialogActions";
|
|
@@ -869,8 +851,8 @@ import DialogContentText3 from "@mui/material/DialogContentText";
|
|
|
869
851
|
import DialogTitle4 from "@mui/material/DialogTitle";
|
|
870
852
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
871
853
|
function CmrDeletionDialog(props) {
|
|
872
|
-
const [open, setOpen] =
|
|
873
|
-
const [text, setText] =
|
|
854
|
+
const [open, setOpen] = React8.useState(true);
|
|
855
|
+
const [text, setText] = React8.useState("");
|
|
874
856
|
const handleClickOpen = () => {
|
|
875
857
|
setOpen(true);
|
|
876
858
|
};
|
|
@@ -913,7 +895,7 @@ function CmrDeletionDialog(props) {
|
|
|
913
895
|
}
|
|
914
896
|
|
|
915
897
|
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
916
|
-
import * as
|
|
898
|
+
import * as React9 from "react";
|
|
917
899
|
import TextField4 from "@mui/material/TextField";
|
|
918
900
|
import Dialog5 from "@mui/material/Dialog";
|
|
919
901
|
import DialogActions5 from "@mui/material/DialogActions";
|
|
@@ -937,7 +919,7 @@ function CmrEditConfirmation({
|
|
|
937
919
|
},
|
|
938
920
|
suffix = ""
|
|
939
921
|
}) {
|
|
940
|
-
const [text, setText] =
|
|
922
|
+
const [text, setText] = React9.useState(defaultText);
|
|
941
923
|
useEffect2(() => {
|
|
942
924
|
if (open)
|
|
943
925
|
setText(defaultText);
|
|
@@ -978,7 +960,7 @@ function CmrEditConfirmation({
|
|
|
978
960
|
}
|
|
979
961
|
|
|
980
962
|
// src/CmrTabs/CmrTabs.tsx
|
|
981
|
-
import * as
|
|
963
|
+
import * as React10 from "react";
|
|
982
964
|
import Tabs from "@mui/material/Tabs";
|
|
983
965
|
import Tab from "@mui/material/Tab";
|
|
984
966
|
import Container from "@mui/material/Container";
|
|
@@ -1007,7 +989,7 @@ function a11yProps(index) {
|
|
|
1007
989
|
};
|
|
1008
990
|
}
|
|
1009
991
|
function CmrTabs(props) {
|
|
1010
|
-
const [value, setValue] =
|
|
992
|
+
const [value, setValue] = React10.useState(0);
|
|
1011
993
|
const handleChange = (event, newValue) => {
|
|
1012
994
|
setValue(newValue);
|
|
1013
995
|
if (props.onTabSelected)
|
|
@@ -1080,7 +1062,7 @@ var CmrInputNumber = (props) => {
|
|
|
1080
1062
|
var InputNumber_default = CmrInputNumber;
|
|
1081
1063
|
|
|
1082
1064
|
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1083
|
-
import
|
|
1065
|
+
import React11, { Fragment } from "react";
|
|
1084
1066
|
import { Button as Button4 } from "@mui/material";
|
|
1085
1067
|
import Select2 from "react-select";
|
|
1086
1068
|
import Dialog6 from "@mui/material/Dialog";
|
|
@@ -1100,10 +1082,10 @@ function checkExtension(filename, allowed) {
|
|
|
1100
1082
|
}
|
|
1101
1083
|
}
|
|
1102
1084
|
var CMRSelectUpload = (props) => {
|
|
1103
|
-
let [open, setOpen] =
|
|
1104
|
-
let [fileIndex, selectFileIndex] =
|
|
1105
|
-
let [uploading, setUploading] =
|
|
1106
|
-
const [progress, setProgress] =
|
|
1085
|
+
let [open, setOpen] = React11.useState(false);
|
|
1086
|
+
let [fileIndex, selectFileIndex] = React11.useState(-1);
|
|
1087
|
+
let [uploading, setUploading] = React11.useState(false);
|
|
1088
|
+
const [progress, setProgress] = React11.useState(0);
|
|
1107
1089
|
const handleClickOpen = () => {
|
|
1108
1090
|
selectFileIndex(-1);
|
|
1109
1091
|
setOpen(true);
|