cloudmr-ux 1.7.6 → 1.7.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/dist/index.js +26 -19
- package/dist/index.mjs +26 -19
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1110,14 +1110,12 @@ var InputNumber_default = CmrInputNumber;
|
|
|
1110
1110
|
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1111
1111
|
var import_react8 = __toESM(require("react"));
|
|
1112
1112
|
var import_material12 = require("@mui/material");
|
|
1113
|
+
var import_react_select = __toESM(require("react-select"));
|
|
1113
1114
|
var import_Dialog6 = __toESM(require("@mui/material/Dialog"));
|
|
1114
1115
|
var import_DialogTitle6 = __toESM(require("@mui/material/DialogTitle"));
|
|
1115
1116
|
var import_DialogContent6 = __toESM(require("@mui/material/DialogContent"));
|
|
1116
1117
|
var import_DialogContentText5 = __toESM(require("@mui/material/DialogContentText"));
|
|
1117
1118
|
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
1118
|
-
var import_Autocomplete = __toESM(require("@mui/material/Autocomplete"));
|
|
1119
|
-
var import_TextField5 = __toESM(require("@mui/material/TextField"));
|
|
1120
|
-
var import_Autocomplete2 = require("@mui/material/Autocomplete");
|
|
1121
1119
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1122
1120
|
var CMRSelectUpload = (props) => {
|
|
1123
1121
|
let [open, setOpen] = import_react8.default.useState(false);
|
|
@@ -1128,10 +1126,6 @@ var CMRSelectUpload = (props) => {
|
|
|
1128
1126
|
selectFileIndex(-1);
|
|
1129
1127
|
setOpen(true);
|
|
1130
1128
|
};
|
|
1131
|
-
const customFilter = (0, import_Autocomplete2.createFilterOptions)({
|
|
1132
|
-
matchFrom: "start",
|
|
1133
|
-
stringify: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || ""
|
|
1134
|
-
});
|
|
1135
1129
|
const handleClose = () => {
|
|
1136
1130
|
setOpen(false);
|
|
1137
1131
|
};
|
|
@@ -1144,24 +1138,37 @@ var CMRSelectUpload = (props) => {
|
|
|
1144
1138
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_DialogContent6.default, { sx: { width: 520 }, children: [
|
|
1145
1139
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_DialogContentText5.default, { sx: { pl: 1, pr: 1, pb: 0 }, children: uploading ? "Please wait for the upload to finish." : "" }),
|
|
1146
1140
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_DialogContent6.default, { sx: { p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1147
|
-
|
|
1141
|
+
import_react_select.default,
|
|
1148
1142
|
{
|
|
1149
|
-
|
|
1150
|
-
options: props.fileSelection
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
onChange: (
|
|
1156
|
-
if (
|
|
1157
|
-
const index = props.fileSelection.findIndex((file) => file.id ===
|
|
1143
|
+
isDisabled: uploading,
|
|
1144
|
+
options: props.fileSelection.map((file) => ({
|
|
1145
|
+
value: file.id,
|
|
1146
|
+
label: file.fileName
|
|
1147
|
+
})),
|
|
1148
|
+
placeholder: "Select a Stored File",
|
|
1149
|
+
onChange: (selected) => {
|
|
1150
|
+
if (selected) {
|
|
1151
|
+
const index = props.fileSelection.findIndex((file) => file.id === selected.value);
|
|
1158
1152
|
selectFileIndex(index);
|
|
1159
1153
|
} else {
|
|
1160
1154
|
selectFileIndex(-1);
|
|
1161
1155
|
}
|
|
1162
1156
|
},
|
|
1163
|
-
|
|
1164
|
-
|
|
1157
|
+
styles: {
|
|
1158
|
+
container: (base) => ({ ...base, width: "100%" }),
|
|
1159
|
+
menu: (base) => ({
|
|
1160
|
+
...base,
|
|
1161
|
+
zIndex: 9999,
|
|
1162
|
+
width: "100%"
|
|
1163
|
+
// Ensure the dropdown matches container width
|
|
1164
|
+
}),
|
|
1165
|
+
menuList: (base) => ({
|
|
1166
|
+
...base,
|
|
1167
|
+
maxHeight: "300px",
|
|
1168
|
+
// Optional: prevent scroll from being too short
|
|
1169
|
+
overflowY: "auto"
|
|
1170
|
+
})
|
|
1171
|
+
}
|
|
1165
1172
|
}
|
|
1166
1173
|
) }),
|
|
1167
1174
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Box3.default, { sx: { pt: 2, justifyContent: "center", display: "flex", padding: "8px" }, children: [
|
package/dist/index.mjs
CHANGED
|
@@ -1062,14 +1062,12 @@ var InputNumber_default = CmrInputNumber;
|
|
|
1062
1062
|
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1063
1063
|
import React11, { Fragment } from "react";
|
|
1064
1064
|
import { Button as Button4 } from "@mui/material";
|
|
1065
|
+
import Select2 from "react-select";
|
|
1065
1066
|
import Dialog6 from "@mui/material/Dialog";
|
|
1066
1067
|
import DialogTitle6 from "@mui/material/DialogTitle";
|
|
1067
1068
|
import DialogContent6 from "@mui/material/DialogContent";
|
|
1068
1069
|
import DialogContentText5 from "@mui/material/DialogContentText";
|
|
1069
1070
|
import Box4 from "@mui/material/Box";
|
|
1070
|
-
import Autocomplete from "@mui/material/Autocomplete";
|
|
1071
|
-
import TextField5 from "@mui/material/TextField";
|
|
1072
|
-
import { createFilterOptions } from "@mui/material/Autocomplete";
|
|
1073
1071
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1074
1072
|
var CMRSelectUpload = (props) => {
|
|
1075
1073
|
let [open, setOpen] = React11.useState(false);
|
|
@@ -1080,10 +1078,6 @@ var CMRSelectUpload = (props) => {
|
|
|
1080
1078
|
selectFileIndex(-1);
|
|
1081
1079
|
setOpen(true);
|
|
1082
1080
|
};
|
|
1083
|
-
const customFilter = createFilterOptions({
|
|
1084
|
-
matchFrom: "start",
|
|
1085
|
-
stringify: (option) => typeof option === "string" ? option : (option == null ? void 0 : option.fileName) || ""
|
|
1086
|
-
});
|
|
1087
1081
|
const handleClose = () => {
|
|
1088
1082
|
setOpen(false);
|
|
1089
1083
|
};
|
|
@@ -1096,24 +1090,37 @@ var CMRSelectUpload = (props) => {
|
|
|
1096
1090
|
/* @__PURE__ */ jsxs12(DialogContent6, { sx: { width: 520 }, children: [
|
|
1097
1091
|
/* @__PURE__ */ jsx18(DialogContentText5, { sx: { pl: 1, pr: 1, pb: 0 }, children: uploading ? "Please wait for the upload to finish." : "" }),
|
|
1098
1092
|
/* @__PURE__ */ jsx18(DialogContent6, { sx: { p: 1 }, children: /* @__PURE__ */ jsx18(
|
|
1099
|
-
|
|
1093
|
+
Select2,
|
|
1100
1094
|
{
|
|
1101
|
-
|
|
1102
|
-
options: props.fileSelection
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
onChange: (
|
|
1108
|
-
if (
|
|
1109
|
-
const index = props.fileSelection.findIndex((file) => file.id ===
|
|
1095
|
+
isDisabled: uploading,
|
|
1096
|
+
options: props.fileSelection.map((file) => ({
|
|
1097
|
+
value: file.id,
|
|
1098
|
+
label: file.fileName
|
|
1099
|
+
})),
|
|
1100
|
+
placeholder: "Select a Stored File",
|
|
1101
|
+
onChange: (selected) => {
|
|
1102
|
+
if (selected) {
|
|
1103
|
+
const index = props.fileSelection.findIndex((file) => file.id === selected.value);
|
|
1110
1104
|
selectFileIndex(index);
|
|
1111
1105
|
} else {
|
|
1112
1106
|
selectFileIndex(-1);
|
|
1113
1107
|
}
|
|
1114
1108
|
},
|
|
1115
|
-
|
|
1116
|
-
|
|
1109
|
+
styles: {
|
|
1110
|
+
container: (base) => ({ ...base, width: "100%" }),
|
|
1111
|
+
menu: (base) => ({
|
|
1112
|
+
...base,
|
|
1113
|
+
zIndex: 9999,
|
|
1114
|
+
width: "100%"
|
|
1115
|
+
// Ensure the dropdown matches container width
|
|
1116
|
+
}),
|
|
1117
|
+
menuList: (base) => ({
|
|
1118
|
+
...base,
|
|
1119
|
+
maxHeight: "300px",
|
|
1120
|
+
// Optional: prevent scroll from being too short
|
|
1121
|
+
overflowY: "auto"
|
|
1122
|
+
})
|
|
1123
|
+
}
|
|
1117
1124
|
}
|
|
1118
1125
|
) }),
|
|
1119
1126
|
/* @__PURE__ */ jsxs12(Box4, { sx: { pt: 2, justifyContent: "center", display: "flex", padding: "8px" }, children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudmr-ux",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"author": "erosmontin@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "erosmontin/cloudmr-ux",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"antd": "^5.22.1",
|
|
34
34
|
"axios": "1.10.0",
|
|
35
35
|
"css-loader": "^7.1.2",
|
|
36
|
+
"react-select": "^5.10.2",
|
|
36
37
|
"sass": "^1.81.0",
|
|
37
38
|
"sass-loader": "^16.0.3",
|
|
38
39
|
"style-loader": "^4.0.0"
|