cloudmr-ux 1.9.4 → 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 -24
- package/dist/index.mjs +17 -29
- 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,19 +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 || "warning",
|
|
890
|
-
onClick: () => {
|
|
891
|
-
btn.onClick();
|
|
892
|
-
handleClose();
|
|
893
|
-
},
|
|
894
|
-
children: btn.text
|
|
895
|
-
},
|
|
896
|
-
idx
|
|
897
|
-
)),
|
|
898
886
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
|
|
899
887
|
] })
|
|
900
888
|
] })
|
|
@@ -902,7 +890,7 @@ function CmrConfirmation({
|
|
|
902
890
|
}
|
|
903
891
|
|
|
904
892
|
// src/CmrComponents/dialogue/DeletionDialog.tsx
|
|
905
|
-
var
|
|
893
|
+
var React8 = __toESM(require("react"));
|
|
906
894
|
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
907
895
|
var import_Dialog4 = __toESM(require("@mui/material/Dialog"));
|
|
908
896
|
var import_DialogActions4 = __toESM(require("@mui/material/DialogActions"));
|
|
@@ -911,8 +899,8 @@ var import_DialogContentText3 = __toESM(require("@mui/material/DialogContentText
|
|
|
911
899
|
var import_DialogTitle4 = __toESM(require("@mui/material/DialogTitle"));
|
|
912
900
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
913
901
|
function CmrDeletionDialog(props) {
|
|
914
|
-
const [open, setOpen] =
|
|
915
|
-
const [text, setText] =
|
|
902
|
+
const [open, setOpen] = React8.useState(true);
|
|
903
|
+
const [text, setText] = React8.useState("");
|
|
916
904
|
const handleClickOpen = () => {
|
|
917
905
|
setOpen(true);
|
|
918
906
|
};
|
|
@@ -955,7 +943,7 @@ function CmrDeletionDialog(props) {
|
|
|
955
943
|
}
|
|
956
944
|
|
|
957
945
|
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
958
|
-
var
|
|
946
|
+
var React9 = __toESM(require("react"));
|
|
959
947
|
var import_TextField4 = __toESM(require("@mui/material/TextField"));
|
|
960
948
|
var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
|
|
961
949
|
var import_DialogActions5 = __toESM(require("@mui/material/DialogActions"));
|
|
@@ -979,7 +967,7 @@ function CmrEditConfirmation({
|
|
|
979
967
|
},
|
|
980
968
|
suffix = ""
|
|
981
969
|
}) {
|
|
982
|
-
const [text, setText] =
|
|
970
|
+
const [text, setText] = React9.useState(defaultText);
|
|
983
971
|
(0, import_react6.useEffect)(() => {
|
|
984
972
|
if (open)
|
|
985
973
|
setText(defaultText);
|
|
@@ -1020,7 +1008,7 @@ function CmrEditConfirmation({
|
|
|
1020
1008
|
}
|
|
1021
1009
|
|
|
1022
1010
|
// src/CmrTabs/CmrTabs.tsx
|
|
1023
|
-
var
|
|
1011
|
+
var React10 = __toESM(require("react"));
|
|
1024
1012
|
var import_Tabs = __toESM(require("@mui/material/Tabs"));
|
|
1025
1013
|
var import_Tab = __toESM(require("@mui/material/Tab"));
|
|
1026
1014
|
var import_Container = __toESM(require("@mui/material/Container"));
|
|
@@ -1049,7 +1037,7 @@ function a11yProps(index) {
|
|
|
1049
1037
|
};
|
|
1050
1038
|
}
|
|
1051
1039
|
function CmrTabs(props) {
|
|
1052
|
-
const [value, setValue] =
|
|
1040
|
+
const [value, setValue] = React10.useState(0);
|
|
1053
1041
|
const handleChange = (event, newValue) => {
|
|
1054
1042
|
setValue(newValue);
|
|
1055
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,19 +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 || "warning",
|
|
842
|
-
onClick: () => {
|
|
843
|
-
btn.onClick();
|
|
844
|
-
handleClose();
|
|
845
|
-
},
|
|
846
|
-
children: btn.text
|
|
847
|
-
},
|
|
848
|
-
idx
|
|
849
|
-
)),
|
|
850
838
|
/* @__PURE__ */ jsx12(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
|
|
851
839
|
] })
|
|
852
840
|
] })
|
|
@@ -854,7 +842,7 @@ function CmrConfirmation({
|
|
|
854
842
|
}
|
|
855
843
|
|
|
856
844
|
// src/CmrComponents/dialogue/DeletionDialog.tsx
|
|
857
|
-
import * as
|
|
845
|
+
import * as React8 from "react";
|
|
858
846
|
import TextField3 from "@mui/material/TextField";
|
|
859
847
|
import Dialog4 from "@mui/material/Dialog";
|
|
860
848
|
import DialogActions4 from "@mui/material/DialogActions";
|
|
@@ -863,8 +851,8 @@ import DialogContentText3 from "@mui/material/DialogContentText";
|
|
|
863
851
|
import DialogTitle4 from "@mui/material/DialogTitle";
|
|
864
852
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
865
853
|
function CmrDeletionDialog(props) {
|
|
866
|
-
const [open, setOpen] =
|
|
867
|
-
const [text, setText] =
|
|
854
|
+
const [open, setOpen] = React8.useState(true);
|
|
855
|
+
const [text, setText] = React8.useState("");
|
|
868
856
|
const handleClickOpen = () => {
|
|
869
857
|
setOpen(true);
|
|
870
858
|
};
|
|
@@ -907,7 +895,7 @@ function CmrDeletionDialog(props) {
|
|
|
907
895
|
}
|
|
908
896
|
|
|
909
897
|
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
910
|
-
import * as
|
|
898
|
+
import * as React9 from "react";
|
|
911
899
|
import TextField4 from "@mui/material/TextField";
|
|
912
900
|
import Dialog5 from "@mui/material/Dialog";
|
|
913
901
|
import DialogActions5 from "@mui/material/DialogActions";
|
|
@@ -931,7 +919,7 @@ function CmrEditConfirmation({
|
|
|
931
919
|
},
|
|
932
920
|
suffix = ""
|
|
933
921
|
}) {
|
|
934
|
-
const [text, setText] =
|
|
922
|
+
const [text, setText] = React9.useState(defaultText);
|
|
935
923
|
useEffect2(() => {
|
|
936
924
|
if (open)
|
|
937
925
|
setText(defaultText);
|
|
@@ -972,7 +960,7 @@ function CmrEditConfirmation({
|
|
|
972
960
|
}
|
|
973
961
|
|
|
974
962
|
// src/CmrTabs/CmrTabs.tsx
|
|
975
|
-
import * as
|
|
963
|
+
import * as React10 from "react";
|
|
976
964
|
import Tabs from "@mui/material/Tabs";
|
|
977
965
|
import Tab from "@mui/material/Tab";
|
|
978
966
|
import Container from "@mui/material/Container";
|
|
@@ -1001,7 +989,7 @@ function a11yProps(index) {
|
|
|
1001
989
|
};
|
|
1002
990
|
}
|
|
1003
991
|
function CmrTabs(props) {
|
|
1004
|
-
const [value, setValue] =
|
|
992
|
+
const [value, setValue] = React10.useState(0);
|
|
1005
993
|
const handleChange = (event, newValue) => {
|
|
1006
994
|
setValue(newValue);
|
|
1007
995
|
if (props.onTabSelected)
|
|
@@ -1074,7 +1062,7 @@ var CmrInputNumber = (props) => {
|
|
|
1074
1062
|
var InputNumber_default = CmrInputNumber;
|
|
1075
1063
|
|
|
1076
1064
|
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1077
|
-
import
|
|
1065
|
+
import React11, { Fragment } from "react";
|
|
1078
1066
|
import { Button as Button4 } from "@mui/material";
|
|
1079
1067
|
import Select2 from "react-select";
|
|
1080
1068
|
import Dialog6 from "@mui/material/Dialog";
|
|
@@ -1094,10 +1082,10 @@ function checkExtension(filename, allowed) {
|
|
|
1094
1082
|
}
|
|
1095
1083
|
}
|
|
1096
1084
|
var CMRSelectUpload = (props) => {
|
|
1097
|
-
let [open, setOpen] =
|
|
1098
|
-
let [fileIndex, selectFileIndex] =
|
|
1099
|
-
let [uploading, setUploading] =
|
|
1100
|
-
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);
|
|
1101
1089
|
const handleClickOpen = () => {
|
|
1102
1090
|
selectFileIndex(-1);
|
|
1103
1091
|
setOpen(true);
|