cloudmr-ux 1.2.2 → 1.3.0
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.css +0 -2
- package/dist/index.d.ts +1 -47
- package/dist/index.js +6 -144
- package/dist/index.mjs +5 -141
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -146,8 +146,6 @@
|
|
|
146
146
|
|
|
147
147
|
/* src/CmrComponents/input-number/InputNumber.css */
|
|
148
148
|
|
|
149
|
-
/* src/CmrComponents/tooltip/Tooltip.css */
|
|
150
|
-
|
|
151
149
|
/* src/CmrTable/CmrTable.css */
|
|
152
150
|
.css-1lymaxv-MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within,
|
|
153
151
|
.css-1lymaxv-MuiDataGrid-root .MuiDataGrid-cell:focus-within {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { SizeType } from 'antd/lib/config-provider/SizeContext';
|
|
|
5
5
|
import { CollapsibleType } from 'antd/es/collapse/CollapsePanel';
|
|
6
6
|
import { ExpandIconPosition } from 'antd/es/collapse/Collapse';
|
|
7
7
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
8
|
-
import { TooltipPlacement } from 'antd/lib/tooltip';
|
|
9
8
|
import { DataGridProps } from '@mui/x-data-grid';
|
|
10
9
|
|
|
11
10
|
declare const CmrButton: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -239,51 +238,6 @@ interface CmrInputNumberProps {
|
|
|
239
238
|
}
|
|
240
239
|
declare const CmrInputNumber: (props: CmrInputNumberProps) => react_jsx_runtime.JSX.Element;
|
|
241
240
|
|
|
242
|
-
interface CmrTooltipProps {
|
|
243
|
-
arrowPointAtCenter?: boolean;
|
|
244
|
-
autoAdjustOverflow?: boolean;
|
|
245
|
-
color?: string;
|
|
246
|
-
defaultVisible?: boolean;
|
|
247
|
-
mouseEnterDelay?: number;
|
|
248
|
-
mouseLeaveDelay?: number;
|
|
249
|
-
overlayClassName?: string;
|
|
250
|
-
placement?: TooltipPlacement;
|
|
251
|
-
visible?: boolean;
|
|
252
|
-
title: React.ReactNode;
|
|
253
|
-
overlay?: React.ReactNode;
|
|
254
|
-
}
|
|
255
|
-
declare const CmrTooltip: (props: CmrTooltipProps) => react_jsx_runtime.JSX.Element;
|
|
256
|
-
|
|
257
|
-
interface CMRSelectUploadProps extends CMRUploadProps {
|
|
258
|
-
/**
|
|
259
|
-
* A selection of currently uploaded files
|
|
260
|
-
*/
|
|
261
|
-
fileSelection: UploadedFile[];
|
|
262
|
-
onSelected: (file?: UploadedFile) => void;
|
|
263
|
-
chosenFile?: string;
|
|
264
|
-
buttonText?: string;
|
|
265
|
-
/**
|
|
266
|
-
* Enforces the extension of selected files
|
|
267
|
-
*/
|
|
268
|
-
fileExtension?: string;
|
|
269
|
-
}
|
|
270
|
-
interface UploadedFile {
|
|
271
|
-
id: number;
|
|
272
|
-
fileName: string;
|
|
273
|
-
link: string;
|
|
274
|
-
md5?: string;
|
|
275
|
-
size: string;
|
|
276
|
-
status: string;
|
|
277
|
-
createdAt: string;
|
|
278
|
-
updatedAt: string;
|
|
279
|
-
database: string;
|
|
280
|
-
location: string;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Select from a set of uploaded files or upload new
|
|
284
|
-
*/
|
|
285
|
-
declare const CMRSelectUpload: (props: CMRSelectUploadProps) => react_jsx_runtime.JSX.Element;
|
|
286
|
-
|
|
287
241
|
interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
|
|
288
242
|
dataSource: any[];
|
|
289
243
|
idAlias?: string;
|
|
@@ -294,4 +248,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
|
|
|
294
248
|
|
|
295
249
|
declare const CmrTable: FC<CmrTableProps>;
|
|
296
250
|
|
|
297
|
-
export {
|
|
251
|
+
export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrInputNumber, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
-
CMRSelectUpload: () => SelectUpload_default,
|
|
34
33
|
CMRUpload: () => Upload_default,
|
|
35
34
|
CmrButton: () => CmrButton_default,
|
|
36
35
|
CmrCheckbox: () => Checkbox_default,
|
|
@@ -46,8 +45,7 @@ __export(src_exports, {
|
|
|
46
45
|
CmrRadioGroup: () => CmrRadioGroup_default,
|
|
47
46
|
CmrSelect: () => CmrSelect_default,
|
|
48
47
|
CmrTable: () => CmrTable2,
|
|
49
|
-
CmrTabs: () => CmrTabs
|
|
50
|
-
CmrTooltip: () => Tooltip_default
|
|
48
|
+
CmrTabs: () => CmrTabs
|
|
51
49
|
});
|
|
52
50
|
module.exports = __toCommonJS(src_exports);
|
|
53
51
|
|
|
@@ -785,9 +783,9 @@ function CmrNameDialog(props) {
|
|
|
785
783
|
maxWidth: "xs",
|
|
786
784
|
children: [
|
|
787
785
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DialogTitle2.default, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_material8.Typography, { children: [
|
|
788
|
-
|
|
786
|
+
" Rename the File ",
|
|
789
787
|
originalName,
|
|
790
|
-
|
|
788
|
+
" as:"
|
|
791
789
|
] }) }),
|
|
792
790
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DialogContent2.default, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
793
791
|
import_TextField2.default,
|
|
@@ -1083,143 +1081,9 @@ var CmrInputNumber = (props) => {
|
|
|
1083
1081
|
};
|
|
1084
1082
|
var InputNumber_default = CmrInputNumber;
|
|
1085
1083
|
|
|
1086
|
-
// src/CmrComponents/tooltip/Tooltip.tsx
|
|
1087
|
-
var import_antd3 = require("antd");
|
|
1088
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1089
|
-
var CmrTooltip = (props) => {
|
|
1090
|
-
const {
|
|
1091
|
-
arrowPointAtCenter,
|
|
1092
|
-
autoAdjustOverflow,
|
|
1093
|
-
color,
|
|
1094
|
-
defaultVisible,
|
|
1095
|
-
mouseEnterDelay,
|
|
1096
|
-
mouseLeaveDelay,
|
|
1097
|
-
overlayClassName,
|
|
1098
|
-
placement,
|
|
1099
|
-
visible,
|
|
1100
|
-
...rest
|
|
1101
|
-
} = props;
|
|
1102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1103
|
-
import_antd3.Tooltip,
|
|
1104
|
-
{
|
|
1105
|
-
arrowPointAtCenter,
|
|
1106
|
-
autoAdjustOverflow,
|
|
1107
|
-
color,
|
|
1108
|
-
defaultVisible,
|
|
1109
|
-
mouseEnterDelay,
|
|
1110
|
-
mouseLeaveDelay,
|
|
1111
|
-
overlayClassName,
|
|
1112
|
-
placement,
|
|
1113
|
-
visible,
|
|
1114
|
-
...rest
|
|
1115
|
-
}
|
|
1116
|
-
);
|
|
1117
|
-
};
|
|
1118
|
-
var Tooltip_default = CmrTooltip;
|
|
1119
|
-
|
|
1120
|
-
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1121
|
-
var import_react8 = __toESM(require("react"));
|
|
1122
|
-
var import_material12 = require("@mui/material");
|
|
1123
|
-
var import_Select = __toESM(require("@mui/material/Select"));
|
|
1124
|
-
var import_Dialog6 = __toESM(require("@mui/material/Dialog"));
|
|
1125
|
-
var import_DialogTitle6 = __toESM(require("@mui/material/DialogTitle"));
|
|
1126
|
-
var import_DialogContent6 = __toESM(require("@mui/material/DialogContent"));
|
|
1127
|
-
var import_DialogContentText5 = __toESM(require("@mui/material/DialogContentText"));
|
|
1128
|
-
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
1129
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1130
|
-
var CMRSelectUpload = (props) => {
|
|
1131
|
-
let [open, setOpen] = import_react8.default.useState(false);
|
|
1132
|
-
let [fileIndex, selectFileIndex] = import_react8.default.useState(-1);
|
|
1133
|
-
let [uploading, setUploading] = import_react8.default.useState(false);
|
|
1134
|
-
const [progress, setProgress] = import_react8.default.useState(0);
|
|
1135
|
-
const handleClickOpen = () => {
|
|
1136
|
-
selectFileIndex(-1);
|
|
1137
|
-
setOpen(true);
|
|
1138
|
-
};
|
|
1139
|
-
const handleClose = () => {
|
|
1140
|
-
setOpen(false);
|
|
1141
|
-
};
|
|
1142
|
-
const handleChange = (event) => {
|
|
1143
|
-
selectFileIndex(event.target.value);
|
|
1144
|
-
};
|
|
1145
|
-
const onSet = () => {
|
|
1146
|
-
props.onSelected(props.fileSelection[fileIndex]);
|
|
1147
|
-
setOpen(false);
|
|
1148
|
-
};
|
|
1149
|
-
const selectionDialog = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Dialog6.default, { open, onClose: handleClose, children: [
|
|
1150
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_DialogTitle6.default, { children: "Select or Upload" }),
|
|
1151
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_DialogContent6.default, { sx: { width: 520 }, children: [
|
|
1152
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_DialogContentText5.default, { sx: { pl: 1, pr: 1, pb: 0 }, children: uploading ? "Please wait for the upload to finish." : "" }),
|
|
1153
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_DialogContent6.default, { sx: { p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1154
|
-
import_Select.default,
|
|
1155
|
-
{
|
|
1156
|
-
value: fileIndex,
|
|
1157
|
-
onChange: handleChange,
|
|
1158
|
-
disabled: uploading,
|
|
1159
|
-
inputProps: { "aria-label": "Without label" },
|
|
1160
|
-
sx: { width: "100%" },
|
|
1161
|
-
children: [
|
|
1162
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material12.MenuItem, { value: -1, children: props.fileSelection.length < 1 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("em", { children: "No Stored Files" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("em", { children: "Select a Stored File" }) }),
|
|
1163
|
-
(props.fileSelection != void 0 ? props.fileSelection : []).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material12.MenuItem, { value: index, children: option.fileName }, index))
|
|
1164
|
-
]
|
|
1165
|
-
}
|
|
1166
|
-
) }),
|
|
1167
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Box3.default, { sx: { pt: 2, justifyContent: "center", display: "flex", padding: "8px" }, children: [
|
|
1168
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material12.Button, { fullWidth: true, variant: "outlined", sx: { marginRight: "8px" }, onClick: handleClose, children: "Cancel" }),
|
|
1169
|
-
fileIndex !== -1 && !uploading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material12.Button, { fullWidth: true, sx: { marginLeft: "8px" }, variant: "contained", onClick: onSet, children: "OK" }),
|
|
1170
|
-
fileIndex == -1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1171
|
-
Upload_default,
|
|
1172
|
-
{
|
|
1173
|
-
...props,
|
|
1174
|
-
color: "info",
|
|
1175
|
-
fullWidth: true,
|
|
1176
|
-
onUploaded: (res, file) => {
|
|
1177
|
-
console.log("calling Setup level on uploaded");
|
|
1178
|
-
console.log(props.onUploaded);
|
|
1179
|
-
selectFileIndex(props.fileSelection.length);
|
|
1180
|
-
props.onUploaded(res, file);
|
|
1181
|
-
setOpen(false);
|
|
1182
|
-
},
|
|
1183
|
-
fileExtension: props.fileExtension,
|
|
1184
|
-
uploadHandler: props.uploadHandler,
|
|
1185
|
-
uploadStarted: () => {
|
|
1186
|
-
setUploading(true);
|
|
1187
|
-
props.onSelected(void 0);
|
|
1188
|
-
},
|
|
1189
|
-
uploadProgressed: (progress2) => {
|
|
1190
|
-
setOpen(false);
|
|
1191
|
-
setProgress(progress2);
|
|
1192
|
-
},
|
|
1193
|
-
uploadEnded: () => setUploading(false)
|
|
1194
|
-
}
|
|
1195
|
-
)
|
|
1196
|
-
] })
|
|
1197
|
-
] })
|
|
1198
|
-
] });
|
|
1199
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react8.Fragment, { children: [
|
|
1200
|
-
uploading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_material12.Button, { variant: "contained", style: { ...props.style, textTransform: "none" }, sx: { overflowWrap: "inherit" }, color: "primary", disabled: uploading, children: [
|
|
1201
|
-
"Uploading ",
|
|
1202
|
-
progress,
|
|
1203
|
-
"%"
|
|
1204
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1205
|
-
import_material12.Button,
|
|
1206
|
-
{
|
|
1207
|
-
variant: props.chosenFile == void 0 ? "contained" : "outlined",
|
|
1208
|
-
color: "info",
|
|
1209
|
-
onClick: handleClickOpen,
|
|
1210
|
-
sx: { marginRight: "10pt" },
|
|
1211
|
-
style: { ...props.style, textTransform: "none" },
|
|
1212
|
-
children: props.chosenFile == void 0 ? props.buttonText ? props.buttonText : "Choose" : props.chosenFile
|
|
1213
|
-
}
|
|
1214
|
-
),
|
|
1215
|
-
selectionDialog
|
|
1216
|
-
] });
|
|
1217
|
-
};
|
|
1218
|
-
var SelectUpload_default = CMRSelectUpload;
|
|
1219
|
-
|
|
1220
1084
|
// src/CmrTable/CmrTable.tsx
|
|
1221
1085
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
1222
|
-
var
|
|
1086
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1223
1087
|
var CmrTable = (props) => {
|
|
1224
1088
|
const {
|
|
1225
1089
|
dataSource,
|
|
@@ -1231,7 +1095,7 @@ var CmrTable = (props) => {
|
|
|
1231
1095
|
showCheckbox = true,
|
|
1232
1096
|
...rest
|
|
1233
1097
|
} = props;
|
|
1234
|
-
return /* @__PURE__ */ (0,
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1235
1099
|
import_x_data_grid.DataGrid,
|
|
1236
1100
|
{
|
|
1237
1101
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1257,7 +1121,6 @@ var CmrTable_default = CmrTable;
|
|
|
1257
1121
|
var CmrTable2 = CmrTable_default;
|
|
1258
1122
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1259
1123
|
0 && (module.exports = {
|
|
1260
|
-
CMRSelectUpload,
|
|
1261
1124
|
CMRUpload,
|
|
1262
1125
|
CmrButton,
|
|
1263
1126
|
CmrCheckbox,
|
|
@@ -1273,6 +1136,5 @@ var CmrTable2 = CmrTable_default;
|
|
|
1273
1136
|
CmrRadioGroup,
|
|
1274
1137
|
CmrSelect,
|
|
1275
1138
|
CmrTable,
|
|
1276
|
-
CmrTabs
|
|
1277
|
-
CmrTooltip
|
|
1139
|
+
CmrTabs
|
|
1278
1140
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -738,9 +738,9 @@ function CmrNameDialog(props) {
|
|
|
738
738
|
maxWidth: "xs",
|
|
739
739
|
children: [
|
|
740
740
|
/* @__PURE__ */ jsx11(DialogTitle2, { children: /* @__PURE__ */ jsxs7(Typography2, { children: [
|
|
741
|
-
|
|
741
|
+
" Rename the File ",
|
|
742
742
|
originalName,
|
|
743
|
-
|
|
743
|
+
" as:"
|
|
744
744
|
] }) }),
|
|
745
745
|
/* @__PURE__ */ jsx11(DialogContent2, { children: /* @__PURE__ */ jsx11(
|
|
746
746
|
TextField2,
|
|
@@ -1036,143 +1036,9 @@ var CmrInputNumber = (props) => {
|
|
|
1036
1036
|
};
|
|
1037
1037
|
var InputNumber_default = CmrInputNumber;
|
|
1038
1038
|
|
|
1039
|
-
// src/CmrComponents/tooltip/Tooltip.tsx
|
|
1040
|
-
import { Tooltip } from "antd";
|
|
1041
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1042
|
-
var CmrTooltip = (props) => {
|
|
1043
|
-
const {
|
|
1044
|
-
arrowPointAtCenter,
|
|
1045
|
-
autoAdjustOverflow,
|
|
1046
|
-
color,
|
|
1047
|
-
defaultVisible,
|
|
1048
|
-
mouseEnterDelay,
|
|
1049
|
-
mouseLeaveDelay,
|
|
1050
|
-
overlayClassName,
|
|
1051
|
-
placement,
|
|
1052
|
-
visible,
|
|
1053
|
-
...rest
|
|
1054
|
-
} = props;
|
|
1055
|
-
return /* @__PURE__ */ jsx18(
|
|
1056
|
-
Tooltip,
|
|
1057
|
-
{
|
|
1058
|
-
arrowPointAtCenter,
|
|
1059
|
-
autoAdjustOverflow,
|
|
1060
|
-
color,
|
|
1061
|
-
defaultVisible,
|
|
1062
|
-
mouseEnterDelay,
|
|
1063
|
-
mouseLeaveDelay,
|
|
1064
|
-
overlayClassName,
|
|
1065
|
-
placement,
|
|
1066
|
-
visible,
|
|
1067
|
-
...rest
|
|
1068
|
-
}
|
|
1069
|
-
);
|
|
1070
|
-
};
|
|
1071
|
-
var Tooltip_default = CmrTooltip;
|
|
1072
|
-
|
|
1073
|
-
// src/CmrComponents/select-upload/SelectUpload.tsx
|
|
1074
|
-
import React11, { Fragment } from "react";
|
|
1075
|
-
import { Button as Button4, MenuItem as MenuItem3 } from "@mui/material";
|
|
1076
|
-
import Select2 from "@mui/material/Select";
|
|
1077
|
-
import Dialog6 from "@mui/material/Dialog";
|
|
1078
|
-
import DialogTitle6 from "@mui/material/DialogTitle";
|
|
1079
|
-
import DialogContent6 from "@mui/material/DialogContent";
|
|
1080
|
-
import DialogContentText5 from "@mui/material/DialogContentText";
|
|
1081
|
-
import Box4 from "@mui/material/Box";
|
|
1082
|
-
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1083
|
-
var CMRSelectUpload = (props) => {
|
|
1084
|
-
let [open, setOpen] = React11.useState(false);
|
|
1085
|
-
let [fileIndex, selectFileIndex] = React11.useState(-1);
|
|
1086
|
-
let [uploading, setUploading] = React11.useState(false);
|
|
1087
|
-
const [progress, setProgress] = React11.useState(0);
|
|
1088
|
-
const handleClickOpen = () => {
|
|
1089
|
-
selectFileIndex(-1);
|
|
1090
|
-
setOpen(true);
|
|
1091
|
-
};
|
|
1092
|
-
const handleClose = () => {
|
|
1093
|
-
setOpen(false);
|
|
1094
|
-
};
|
|
1095
|
-
const handleChange = (event) => {
|
|
1096
|
-
selectFileIndex(event.target.value);
|
|
1097
|
-
};
|
|
1098
|
-
const onSet = () => {
|
|
1099
|
-
props.onSelected(props.fileSelection[fileIndex]);
|
|
1100
|
-
setOpen(false);
|
|
1101
|
-
};
|
|
1102
|
-
const selectionDialog = /* @__PURE__ */ jsxs12(Dialog6, { open, onClose: handleClose, children: [
|
|
1103
|
-
/* @__PURE__ */ jsx19(DialogTitle6, { children: "Select or Upload" }),
|
|
1104
|
-
/* @__PURE__ */ jsxs12(DialogContent6, { sx: { width: 520 }, children: [
|
|
1105
|
-
/* @__PURE__ */ jsx19(DialogContentText5, { sx: { pl: 1, pr: 1, pb: 0 }, children: uploading ? "Please wait for the upload to finish." : "" }),
|
|
1106
|
-
/* @__PURE__ */ jsx19(DialogContent6, { sx: { p: 1 }, children: /* @__PURE__ */ jsxs12(
|
|
1107
|
-
Select2,
|
|
1108
|
-
{
|
|
1109
|
-
value: fileIndex,
|
|
1110
|
-
onChange: handleChange,
|
|
1111
|
-
disabled: uploading,
|
|
1112
|
-
inputProps: { "aria-label": "Without label" },
|
|
1113
|
-
sx: { width: "100%" },
|
|
1114
|
-
children: [
|
|
1115
|
-
/* @__PURE__ */ jsx19(MenuItem3, { value: -1, children: props.fileSelection.length < 1 ? /* @__PURE__ */ jsx19("em", { children: "No Stored Files" }) : /* @__PURE__ */ jsx19("em", { children: "Select a Stored File" }) }),
|
|
1116
|
-
(props.fileSelection != void 0 ? props.fileSelection : []).map((option, index) => /* @__PURE__ */ jsx19(MenuItem3, { value: index, children: option.fileName }, index))
|
|
1117
|
-
]
|
|
1118
|
-
}
|
|
1119
|
-
) }),
|
|
1120
|
-
/* @__PURE__ */ jsxs12(Box4, { sx: { pt: 2, justifyContent: "center", display: "flex", padding: "8px" }, children: [
|
|
1121
|
-
/* @__PURE__ */ jsx19(Button4, { fullWidth: true, variant: "outlined", sx: { marginRight: "8px" }, onClick: handleClose, children: "Cancel" }),
|
|
1122
|
-
fileIndex !== -1 && !uploading && /* @__PURE__ */ jsx19(Button4, { fullWidth: true, sx: { marginLeft: "8px" }, variant: "contained", onClick: onSet, children: "OK" }),
|
|
1123
|
-
fileIndex == -1 && /* @__PURE__ */ jsx19(
|
|
1124
|
-
Upload_default,
|
|
1125
|
-
{
|
|
1126
|
-
...props,
|
|
1127
|
-
color: "info",
|
|
1128
|
-
fullWidth: true,
|
|
1129
|
-
onUploaded: (res, file) => {
|
|
1130
|
-
console.log("calling Setup level on uploaded");
|
|
1131
|
-
console.log(props.onUploaded);
|
|
1132
|
-
selectFileIndex(props.fileSelection.length);
|
|
1133
|
-
props.onUploaded(res, file);
|
|
1134
|
-
setOpen(false);
|
|
1135
|
-
},
|
|
1136
|
-
fileExtension: props.fileExtension,
|
|
1137
|
-
uploadHandler: props.uploadHandler,
|
|
1138
|
-
uploadStarted: () => {
|
|
1139
|
-
setUploading(true);
|
|
1140
|
-
props.onSelected(void 0);
|
|
1141
|
-
},
|
|
1142
|
-
uploadProgressed: (progress2) => {
|
|
1143
|
-
setOpen(false);
|
|
1144
|
-
setProgress(progress2);
|
|
1145
|
-
},
|
|
1146
|
-
uploadEnded: () => setUploading(false)
|
|
1147
|
-
}
|
|
1148
|
-
)
|
|
1149
|
-
] })
|
|
1150
|
-
] })
|
|
1151
|
-
] });
|
|
1152
|
-
return /* @__PURE__ */ jsxs12(Fragment, { children: [
|
|
1153
|
-
uploading ? /* @__PURE__ */ jsxs12(Button4, { variant: "contained", style: { ...props.style, textTransform: "none" }, sx: { overflowWrap: "inherit" }, color: "primary", disabled: uploading, children: [
|
|
1154
|
-
"Uploading ",
|
|
1155
|
-
progress,
|
|
1156
|
-
"%"
|
|
1157
|
-
] }) : /* @__PURE__ */ jsx19(
|
|
1158
|
-
Button4,
|
|
1159
|
-
{
|
|
1160
|
-
variant: props.chosenFile == void 0 ? "contained" : "outlined",
|
|
1161
|
-
color: "info",
|
|
1162
|
-
onClick: handleClickOpen,
|
|
1163
|
-
sx: { marginRight: "10pt" },
|
|
1164
|
-
style: { ...props.style, textTransform: "none" },
|
|
1165
|
-
children: props.chosenFile == void 0 ? props.buttonText ? props.buttonText : "Choose" : props.chosenFile
|
|
1166
|
-
}
|
|
1167
|
-
),
|
|
1168
|
-
selectionDialog
|
|
1169
|
-
] });
|
|
1170
|
-
};
|
|
1171
|
-
var SelectUpload_default = CMRSelectUpload;
|
|
1172
|
-
|
|
1173
1039
|
// src/CmrTable/CmrTable.tsx
|
|
1174
1040
|
import { DataGrid } from "@mui/x-data-grid";
|
|
1175
|
-
import { jsx as
|
|
1041
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1176
1042
|
var CmrTable = (props) => {
|
|
1177
1043
|
const {
|
|
1178
1044
|
dataSource,
|
|
@@ -1184,7 +1050,7 @@ var CmrTable = (props) => {
|
|
|
1184
1050
|
showCheckbox = true,
|
|
1185
1051
|
...rest
|
|
1186
1052
|
} = props;
|
|
1187
|
-
return /* @__PURE__ */
|
|
1053
|
+
return /* @__PURE__ */ jsx18("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx18(
|
|
1188
1054
|
DataGrid,
|
|
1189
1055
|
{
|
|
1190
1056
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1209,7 +1075,6 @@ var CmrTable_default = CmrTable;
|
|
|
1209
1075
|
// src/index.ts
|
|
1210
1076
|
var CmrTable2 = CmrTable_default;
|
|
1211
1077
|
export {
|
|
1212
|
-
SelectUpload_default as CMRSelectUpload,
|
|
1213
1078
|
Upload_default as CMRUpload,
|
|
1214
1079
|
CmrButton_default as CmrButton,
|
|
1215
1080
|
Checkbox_default as CmrCheckbox,
|
|
@@ -1225,6 +1090,5 @@ export {
|
|
|
1225
1090
|
CmrRadioGroup_default as CmrRadioGroup,
|
|
1226
1091
|
CmrSelect_default as CmrSelect,
|
|
1227
1092
|
CmrTable2 as CmrTable,
|
|
1228
|
-
CmrTabs
|
|
1229
|
-
Tooltip_default as CmrTooltip
|
|
1093
|
+
CmrTabs
|
|
1230
1094
|
};
|