cloudmr-ux 1.7.1 → 1.7.2
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 +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1117,7 +1117,6 @@ var import_DialogContentText5 = __toESM(require("@mui/material/DialogContentText
|
|
|
1117
1117
|
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
1118
1118
|
var import_Autocomplete = __toESM(require("@mui/material/Autocomplete"));
|
|
1119
1119
|
var import_TextField5 = __toESM(require("@mui/material/TextField"));
|
|
1120
|
-
var import_Autocomplete2 = require("@mui/material/Autocomplete");
|
|
1121
1120
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1122
1121
|
var CMRSelectUpload = (props) => {
|
|
1123
1122
|
let [open, setOpen] = import_react8.default.useState(false);
|
|
@@ -1138,11 +1137,6 @@ var CMRSelectUpload = (props) => {
|
|
|
1138
1137
|
const sortedFiles = [...props.fileSelection].sort(
|
|
1139
1138
|
(a, b) => a.fileName.localeCompare(b.fileName)
|
|
1140
1139
|
);
|
|
1141
|
-
const stringMatchFilter = (0, import_Autocomplete2.createFilterOptions)({
|
|
1142
|
-
stringify: (option) => option.fileName || "",
|
|
1143
|
-
trim: true,
|
|
1144
|
-
ignoreCase: true
|
|
1145
|
-
});
|
|
1146
1140
|
const selectionDialog = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Dialog6.default, { open, onClose: handleClose, children: [
|
|
1147
1141
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_DialogTitle6.default, { children: "Select or Upload" }),
|
|
1148
1142
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_DialogContent6.default, { sx: { width: 520 }, children: [
|
|
@@ -1152,9 +1146,15 @@ var CMRSelectUpload = (props) => {
|
|
|
1152
1146
|
{
|
|
1153
1147
|
disabled: uploading,
|
|
1154
1148
|
options: sortedFiles,
|
|
1155
|
-
filterOptions: (options, state) =>
|
|
1156
|
-
|
|
1157
|
-
|
|
1149
|
+
filterOptions: (options, state) => {
|
|
1150
|
+
const input = state.inputValue.toLowerCase();
|
|
1151
|
+
const filtered = options.filter(
|
|
1152
|
+
(option) => option.fileName.toLowerCase().startsWith(input)
|
|
1153
|
+
);
|
|
1154
|
+
return filtered.sort(
|
|
1155
|
+
(a, b) => a.fileName.toLowerCase().localeCompare(b.fileName.toLowerCase())
|
|
1156
|
+
);
|
|
1157
|
+
},
|
|
1158
1158
|
getOptionLabel: (option) => option.fileName,
|
|
1159
1159
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
1160
1160
|
value: fileIndex === -1 ? null : props.fileSelection[fileIndex],
|
package/dist/index.mjs
CHANGED
|
@@ -1069,7 +1069,6 @@ import DialogContentText5 from "@mui/material/DialogContentText";
|
|
|
1069
1069
|
import Box4 from "@mui/material/Box";
|
|
1070
1070
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
1071
1071
|
import TextField5 from "@mui/material/TextField";
|
|
1072
|
-
import { createFilterOptions } from "@mui/material/Autocomplete";
|
|
1073
1072
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1074
1073
|
var CMRSelectUpload = (props) => {
|
|
1075
1074
|
let [open, setOpen] = React11.useState(false);
|
|
@@ -1090,11 +1089,6 @@ var CMRSelectUpload = (props) => {
|
|
|
1090
1089
|
const sortedFiles = [...props.fileSelection].sort(
|
|
1091
1090
|
(a, b) => a.fileName.localeCompare(b.fileName)
|
|
1092
1091
|
);
|
|
1093
|
-
const stringMatchFilter = createFilterOptions({
|
|
1094
|
-
stringify: (option) => option.fileName || "",
|
|
1095
|
-
trim: true,
|
|
1096
|
-
ignoreCase: true
|
|
1097
|
-
});
|
|
1098
1092
|
const selectionDialog = /* @__PURE__ */ jsxs12(Dialog6, { open, onClose: handleClose, children: [
|
|
1099
1093
|
/* @__PURE__ */ jsx18(DialogTitle6, { children: "Select or Upload" }),
|
|
1100
1094
|
/* @__PURE__ */ jsxs12(DialogContent6, { sx: { width: 520 }, children: [
|
|
@@ -1104,9 +1098,15 @@ var CMRSelectUpload = (props) => {
|
|
|
1104
1098
|
{
|
|
1105
1099
|
disabled: uploading,
|
|
1106
1100
|
options: sortedFiles,
|
|
1107
|
-
filterOptions: (options, state) =>
|
|
1108
|
-
|
|
1109
|
-
|
|
1101
|
+
filterOptions: (options, state) => {
|
|
1102
|
+
const input = state.inputValue.toLowerCase();
|
|
1103
|
+
const filtered = options.filter(
|
|
1104
|
+
(option) => option.fileName.toLowerCase().startsWith(input)
|
|
1105
|
+
);
|
|
1106
|
+
return filtered.sort(
|
|
1107
|
+
(a, b) => a.fileName.toLowerCase().localeCompare(b.fileName.toLowerCase())
|
|
1108
|
+
);
|
|
1109
|
+
},
|
|
1110
1110
|
getOptionLabel: (option) => option.fileName,
|
|
1111
1111
|
isOptionEqualToValue: (option, value) => option.id === value.id,
|
|
1112
1112
|
value: fileIndex === -1 ? null : props.fileSelection[fileIndex],
|