@cere/cere-design-system 0.0.3 → 0.0.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.mts +78 -8
- package/dist/index.d.ts +78 -8
- package/dist/index.js +370 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +333 -110
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ __export(index_exports, {
|
|
|
38
38
|
Background: () => import_reactflow2.Background,
|
|
39
39
|
BackgroundVariant: () => import_reactflow2.BackgroundVariant,
|
|
40
40
|
Badge: () => Badge,
|
|
41
|
-
Box: () =>
|
|
41
|
+
Box: () => import_material20.Box,
|
|
42
42
|
Breadcrumbs: () => Breadcrumbs,
|
|
43
43
|
Button: () => Button,
|
|
44
44
|
ButtonGroup: () => ButtonGroup,
|
|
@@ -52,10 +52,10 @@ __export(index_exports, {
|
|
|
52
52
|
CodeEditor: () => CodeEditor,
|
|
53
53
|
Collapse: () => Collapse,
|
|
54
54
|
ConnectionLineType: () => import_reactflow2.ConnectionLineType,
|
|
55
|
-
Container: () =>
|
|
55
|
+
Container: () => import_material22.Container,
|
|
56
56
|
Controls: () => import_reactflow2.Controls,
|
|
57
57
|
Dialog: () => Dialog,
|
|
58
|
-
Divider: () =>
|
|
58
|
+
Divider: () => Divider4,
|
|
59
59
|
Drawer: () => Drawer2,
|
|
60
60
|
Dropdown: () => Dropdown,
|
|
61
61
|
EmptyState: () => EmptyState,
|
|
@@ -64,16 +64,16 @@ __export(index_exports, {
|
|
|
64
64
|
FormControlLabel: () => import_material2.FormControlLabel,
|
|
65
65
|
FormHelperText: () => import_material2.FormHelperText,
|
|
66
66
|
FormLabel: () => import_material2.FormLabel,
|
|
67
|
-
Grid: () =>
|
|
67
|
+
Grid: () => import_material17.Grid,
|
|
68
68
|
IconButton: () => IconButton,
|
|
69
69
|
InputAdornment: () => import_material2.InputAdornment,
|
|
70
70
|
InputLabel: () => import_material2.InputLabel,
|
|
71
71
|
Link: () => Link3,
|
|
72
72
|
List: () => List5,
|
|
73
73
|
ListItem: () => ListItem3,
|
|
74
|
-
ListItemIcon: () =>
|
|
75
|
-
ListItemSecondaryAction: () =>
|
|
76
|
-
ListItemText: () =>
|
|
74
|
+
ListItemIcon: () => import_material15.ListItemIcon,
|
|
75
|
+
ListItemSecondaryAction: () => import_material15.ListItemSecondaryAction,
|
|
76
|
+
ListItemText: () => import_material15.ListItemText,
|
|
77
77
|
Loading: () => Loading,
|
|
78
78
|
LoadingButton: () => LoadingButton,
|
|
79
79
|
Menu: () => Menu3,
|
|
@@ -91,7 +91,7 @@ __export(index_exports, {
|
|
|
91
91
|
Sidebar: () => Sidebar,
|
|
92
92
|
SidebarItem: () => SidebarItem,
|
|
93
93
|
Snackbar: () => Snackbar,
|
|
94
|
-
Stack: () =>
|
|
94
|
+
Stack: () => import_material19.Stack,
|
|
95
95
|
Step: () => Step,
|
|
96
96
|
StepButton: () => StepButton,
|
|
97
97
|
StepContent: () => StepContent,
|
|
@@ -104,9 +104,9 @@ __export(index_exports, {
|
|
|
104
104
|
TextField: () => TextField,
|
|
105
105
|
ToggleButton: () => ToggleButton,
|
|
106
106
|
ToggleButtonGroup: () => ToggleButtonGroup,
|
|
107
|
-
Toolbar: () =>
|
|
107
|
+
Toolbar: () => import_material23.Toolbar,
|
|
108
108
|
Tooltip: () => Tooltip2,
|
|
109
|
-
Typography: () =>
|
|
109
|
+
Typography: () => import_material21.Typography,
|
|
110
110
|
WorkspaceSelectorButton: () => WorkspaceSelectorButton,
|
|
111
111
|
colors: () => colors,
|
|
112
112
|
theme: () => theme
|
|
@@ -872,6 +872,8 @@ var import_Unarchive = __toESM(require("@mui/icons-material/Unarchive"));
|
|
|
872
872
|
var import_Search2 = __toESM(require("@mui/icons-material/Search"));
|
|
873
873
|
var import_Add = __toESM(require("@mui/icons-material/Add"));
|
|
874
874
|
var import_Check = __toESM(require("@mui/icons-material/Check"));
|
|
875
|
+
var import_Settings = __toESM(require("@mui/icons-material/Settings"));
|
|
876
|
+
var import_PersonAddAlt = __toESM(require("@mui/icons-material/PersonAddAlt"));
|
|
875
877
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
876
878
|
var ServiceSelectorButton = ({
|
|
877
879
|
services,
|
|
@@ -884,7 +886,9 @@ var ServiceSelectorButton = ({
|
|
|
884
886
|
onServiceCreated,
|
|
885
887
|
isManager = false,
|
|
886
888
|
sx = {},
|
|
887
|
-
panelWidth = 350
|
|
889
|
+
panelWidth = 350,
|
|
890
|
+
onOpenSettings,
|
|
891
|
+
onOpenAddMember
|
|
888
892
|
}) => {
|
|
889
893
|
const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
|
|
890
894
|
const [searchTerm, setSearchTerm] = (0, import_react.useState)("");
|
|
@@ -972,7 +976,9 @@ var ServiceSelectorButton = ({
|
|
|
972
976
|
onSearchChange: setSearchTerm,
|
|
973
977
|
showArchived,
|
|
974
978
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
975
|
-
filteredServices
|
|
979
|
+
filteredServices,
|
|
980
|
+
onOpenSettings,
|
|
981
|
+
onOpenAddMember
|
|
976
982
|
}
|
|
977
983
|
)
|
|
978
984
|
] });
|
|
@@ -1098,7 +1104,9 @@ var ServiceSelectorButton = ({
|
|
|
1098
1104
|
onSearchChange: setSearchTerm,
|
|
1099
1105
|
showArchived,
|
|
1100
1106
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
1101
|
-
filteredServices
|
|
1107
|
+
filteredServices,
|
|
1108
|
+
onOpenSettings,
|
|
1109
|
+
onOpenAddMember
|
|
1102
1110
|
}
|
|
1103
1111
|
)
|
|
1104
1112
|
] });
|
|
@@ -1120,7 +1128,9 @@ var ServiceSelectorPanel = ({
|
|
|
1120
1128
|
onSearchChange: externalOnSearchChange,
|
|
1121
1129
|
showArchived: externalShowArchived,
|
|
1122
1130
|
onToggleArchived: externalOnToggleArchived,
|
|
1123
|
-
filteredServices: externalFilteredServices
|
|
1131
|
+
filteredServices: externalFilteredServices,
|
|
1132
|
+
onOpenSettings,
|
|
1133
|
+
onOpenAddMember
|
|
1124
1134
|
}) => {
|
|
1125
1135
|
const [internalSearchTerm, setInternalSearchTerm] = (0, import_react.useState)("");
|
|
1126
1136
|
const [internalShowArchived, setInternalShowArchived] = (0, import_react.useState)(false);
|
|
@@ -1169,62 +1179,126 @@ var ServiceSelectorPanel = ({
|
|
|
1169
1179
|
}
|
|
1170
1180
|
},
|
|
1171
1181
|
children: [
|
|
1172
|
-
selectedService && /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1182
|
+
selectedService && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1173
1183
|
import_material7.Box,
|
|
1174
1184
|
{
|
|
1175
1185
|
sx: {
|
|
1176
1186
|
paddingLeft: 2,
|
|
1177
1187
|
paddingRight: 2,
|
|
1178
|
-
paddingTop:
|
|
1188
|
+
paddingTop: 1.5,
|
|
1189
|
+
paddingBottom: 1.5,
|
|
1179
1190
|
borderBottom: 1,
|
|
1180
1191
|
borderColor: "divider"
|
|
1181
1192
|
},
|
|
1182
|
-
children:
|
|
1183
|
-
import_material7.Box,
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1193
|
+
children: [
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: {
|
|
1195
|
+
display: "flex",
|
|
1196
|
+
alignItems: "center",
|
|
1197
|
+
mb: 1.5
|
|
1198
|
+
}, children: [
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1200
|
+
import_material7.Avatar,
|
|
1201
|
+
{
|
|
1202
|
+
sx: {
|
|
1203
|
+
width: 32,
|
|
1204
|
+
height: 32,
|
|
1205
|
+
bgcolor: "primary.main",
|
|
1206
|
+
fontSize: "0.9rem",
|
|
1207
|
+
mr: 1.5
|
|
1208
|
+
},
|
|
1209
|
+
children: selectedService.name.charAt(0)
|
|
1210
|
+
}
|
|
1211
|
+
),
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Box, { sx: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material7.Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
|
|
1192
1214
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1193
|
-
import_material7.
|
|
1215
|
+
import_material7.Box,
|
|
1194
1216
|
{
|
|
1195
1217
|
sx: {
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1218
|
+
display: "inline-block",
|
|
1219
|
+
bgcolor: "rgba(0, 0, 0, 0.04)",
|
|
1220
|
+
color: "text.secondary",
|
|
1221
|
+
px: 1,
|
|
1222
|
+
py: 0.3,
|
|
1223
|
+
borderRadius: "12px",
|
|
1224
|
+
fontSize: "0.7rem",
|
|
1225
|
+
fontWeight: 500,
|
|
1226
|
+
lineHeight: 1
|
|
1201
1227
|
},
|
|
1202
|
-
children:
|
|
1228
|
+
children: isManager ? "Manager" : "Viewer"
|
|
1203
1229
|
}
|
|
1204
|
-
)
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1230
|
+
)
|
|
1231
|
+
] }) })
|
|
1232
|
+
] }),
|
|
1233
|
+
(onOpenSettings || onOpenAddMember) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { display: "flex", gap: 1 }, children: [
|
|
1234
|
+
onOpenAddMember && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1235
|
+
import_material7.Button,
|
|
1236
|
+
{
|
|
1237
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_PersonAddAlt.default, {}),
|
|
1238
|
+
variant: "outlined",
|
|
1239
|
+
size: "small",
|
|
1240
|
+
onClick: (e) => {
|
|
1241
|
+
e.stopPropagation();
|
|
1242
|
+
onClose();
|
|
1243
|
+
onOpenAddMember(selectedServiceId || "");
|
|
1244
|
+
},
|
|
1245
|
+
disabled: !isManager,
|
|
1246
|
+
sx: {
|
|
1247
|
+
flex: 1,
|
|
1248
|
+
textTransform: "none",
|
|
1249
|
+
color: "text.secondary",
|
|
1250
|
+
fontSize: "0.8rem",
|
|
1251
|
+
py: 0.75,
|
|
1252
|
+
justifyContent: "flex-start",
|
|
1253
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1254
|
+
borderRadius: "6px",
|
|
1255
|
+
"&:hover": {
|
|
1256
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1257
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1258
|
+
},
|
|
1259
|
+
"&:disabled": {
|
|
1260
|
+
opacity: 0.5,
|
|
1261
|
+
cursor: "not-allowed"
|
|
1222
1262
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1263
|
+
},
|
|
1264
|
+
children: "Add member"
|
|
1265
|
+
}
|
|
1266
|
+
),
|
|
1267
|
+
onOpenSettings && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1268
|
+
import_material7.Button,
|
|
1269
|
+
{
|
|
1270
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_Settings.default, {}),
|
|
1271
|
+
variant: "outlined",
|
|
1272
|
+
size: "small",
|
|
1273
|
+
onClick: (e) => {
|
|
1274
|
+
e.stopPropagation();
|
|
1275
|
+
onClose();
|
|
1276
|
+
onOpenSettings(selectedServiceId || "");
|
|
1277
|
+
},
|
|
1278
|
+
disabled: !isManager,
|
|
1279
|
+
sx: {
|
|
1280
|
+
flex: 1,
|
|
1281
|
+
textTransform: "none",
|
|
1282
|
+
color: "text.secondary",
|
|
1283
|
+
fontSize: "0.8rem",
|
|
1284
|
+
py: 0.75,
|
|
1285
|
+
justifyContent: "flex-start",
|
|
1286
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1287
|
+
borderRadius: "6px",
|
|
1288
|
+
"&:hover": {
|
|
1289
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1290
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1291
|
+
},
|
|
1292
|
+
"&:disabled": {
|
|
1293
|
+
opacity: 0.5,
|
|
1294
|
+
cursor: "not-allowed"
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
children: "Settings"
|
|
1298
|
+
}
|
|
1299
|
+
)
|
|
1300
|
+
] })
|
|
1301
|
+
]
|
|
1228
1302
|
}
|
|
1229
1303
|
),
|
|
1230
1304
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material7.Box, { sx: { px: 2, pt: 2, pb: 1.5 }, children: [
|
|
@@ -2089,6 +2163,7 @@ var Dialog = ({
|
|
|
2089
2163
|
children,
|
|
2090
2164
|
dividers = true,
|
|
2091
2165
|
confirmBeforeClose = false,
|
|
2166
|
+
customActions,
|
|
2092
2167
|
...dialogProps
|
|
2093
2168
|
}) => {
|
|
2094
2169
|
const handleCloseAttempt = (e) => {
|
|
@@ -2130,9 +2205,9 @@ var Dialog = ({
|
|
|
2130
2205
|
] }),
|
|
2131
2206
|
dividers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.Divider, {}),
|
|
2132
2207
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.DialogContent, { dividers, children }),
|
|
2133
|
-
showActions && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2208
|
+
(showActions || customActions) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2134
2209
|
dividers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.Divider, {}),
|
|
2135
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.DialogActions, { children: customActions || /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2136
2211
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2137
2212
|
import_material13.Button,
|
|
2138
2213
|
{
|
|
@@ -2152,7 +2227,7 @@ var Dialog = ({
|
|
|
2152
2227
|
children: submitLabel
|
|
2153
2228
|
}
|
|
2154
2229
|
)
|
|
2155
|
-
] })
|
|
2230
|
+
] }) })
|
|
2156
2231
|
] })
|
|
2157
2232
|
]
|
|
2158
2233
|
}
|
|
@@ -2162,36 +2237,158 @@ var Dialog = ({
|
|
|
2162
2237
|
// src/components/layout/Drawer.tsx
|
|
2163
2238
|
var import_Drawer = __toESM(require("@mui/material/Drawer"));
|
|
2164
2239
|
var import_styles17 = require("@mui/material/styles");
|
|
2240
|
+
var import_material14 = require("@mui/material");
|
|
2241
|
+
var import_Close2 = __toESM(require("@mui/icons-material/Close"));
|
|
2165
2242
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2166
2243
|
var StyledDrawer2 = (0, import_styles17.styled)(import_Drawer.default, {
|
|
2167
|
-
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed"
|
|
2168
|
-
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed }) => ({
|
|
2244
|
+
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed" && prop !== "topOffset"
|
|
2245
|
+
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed, topOffset = 0 }) => ({
|
|
2169
2246
|
width: collapsed ? miniWidth : width,
|
|
2170
2247
|
flexShrink: 0,
|
|
2171
2248
|
"& .MuiDrawer-paper": {
|
|
2172
2249
|
width: collapsed ? miniWidth : width,
|
|
2173
2250
|
boxSizing: "border-box",
|
|
2174
2251
|
boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
|
|
2175
|
-
transition: theme2.transitions.create("width", {
|
|
2252
|
+
transition: theme2.transitions.create(["width", "top", "height"], {
|
|
2176
2253
|
easing: theme2.transitions.easing.sharp,
|
|
2177
2254
|
duration: theme2.transitions.duration.enteringScreen
|
|
2178
2255
|
}),
|
|
2179
|
-
overflow:
|
|
2256
|
+
overflow: "visible",
|
|
2257
|
+
// Let internal content handle scrolling
|
|
2258
|
+
display: "flex",
|
|
2259
|
+
flexDirection: "column",
|
|
2260
|
+
top: `${topOffset}px !important`,
|
|
2261
|
+
height: topOffset > 0 ? `calc(100% - ${topOffset}px) !important` : "100%",
|
|
2262
|
+
zIndex: `${theme2.zIndex.modal} !important`
|
|
2263
|
+
// Use modal zIndex to be above everything except AppBar (which is modal + 1)
|
|
2180
2264
|
}
|
|
2181
2265
|
}));
|
|
2182
2266
|
var Drawer2 = ({
|
|
2183
|
-
width
|
|
2267
|
+
width,
|
|
2184
2268
|
miniWidth = 72,
|
|
2185
2269
|
collapsed = false,
|
|
2270
|
+
title,
|
|
2271
|
+
header,
|
|
2272
|
+
showCloseButton,
|
|
2273
|
+
tabs,
|
|
2274
|
+
activeTab = 0,
|
|
2275
|
+
onTabChange,
|
|
2276
|
+
footer,
|
|
2277
|
+
contentProps,
|
|
2278
|
+
anchor = "right",
|
|
2279
|
+
variant = "temporary",
|
|
2280
|
+
topOffset = 0,
|
|
2281
|
+
children,
|
|
2282
|
+
onClose,
|
|
2186
2283
|
...props
|
|
2187
2284
|
}) => {
|
|
2188
|
-
|
|
2285
|
+
const defaultWidth = variant === "temporary" || variant === "persistent" ? 400 : 240;
|
|
2286
|
+
const finalWidth = width ?? defaultWidth;
|
|
2287
|
+
const shouldShowClose = showCloseButton ?? (variant === "temporary" || variant === "persistent");
|
|
2288
|
+
const hasHeader = title || header || shouldShowClose || tabs;
|
|
2289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2189
2290
|
StyledDrawer2,
|
|
2190
2291
|
{
|
|
2191
|
-
width,
|
|
2292
|
+
width: finalWidth,
|
|
2192
2293
|
miniWidth,
|
|
2193
2294
|
collapsed,
|
|
2194
|
-
|
|
2295
|
+
anchor,
|
|
2296
|
+
variant,
|
|
2297
|
+
topOffset,
|
|
2298
|
+
onClose,
|
|
2299
|
+
ModalProps: {
|
|
2300
|
+
...props.ModalProps,
|
|
2301
|
+
style: {
|
|
2302
|
+
zIndex: topOffset > 0 ? void 0 : void 0
|
|
2303
|
+
// Let styled component handle zIndex
|
|
2304
|
+
}
|
|
2305
|
+
},
|
|
2306
|
+
BackdropProps: {
|
|
2307
|
+
...props.BackdropProps,
|
|
2308
|
+
style: {
|
|
2309
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
...props,
|
|
2313
|
+
children: [
|
|
2314
|
+
hasHeader && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2316
|
+
import_material14.Box,
|
|
2317
|
+
{
|
|
2318
|
+
sx: {
|
|
2319
|
+
display: "flex",
|
|
2320
|
+
alignItems: "center",
|
|
2321
|
+
justifyContent: "space-between",
|
|
2322
|
+
p: 2,
|
|
2323
|
+
minHeight: 64,
|
|
2324
|
+
borderBottom: 1,
|
|
2325
|
+
borderColor: "divider"
|
|
2326
|
+
},
|
|
2327
|
+
children: header || /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Box, { sx: { flex: 1 }, children: typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Typography, { variant: "h6", children: title }) : title }),
|
|
2329
|
+
shouldShowClose && onClose && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2330
|
+
import_material14.IconButton,
|
|
2331
|
+
{
|
|
2332
|
+
onClick: (e) => {
|
|
2333
|
+
e.stopPropagation();
|
|
2334
|
+
onClose(e, "backdropClick");
|
|
2335
|
+
},
|
|
2336
|
+
size: "small",
|
|
2337
|
+
sx: { ml: 1 },
|
|
2338
|
+
"aria-label": "close",
|
|
2339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_Close2.default, {})
|
|
2340
|
+
}
|
|
2341
|
+
)
|
|
2342
|
+
] })
|
|
2343
|
+
}
|
|
2344
|
+
),
|
|
2345
|
+
tabs && tabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2346
|
+
import_material14.Tabs,
|
|
2347
|
+
{
|
|
2348
|
+
value: activeTab,
|
|
2349
|
+
onChange: (_, newValue) => onTabChange?.(newValue),
|
|
2350
|
+
variant: tabs.length > 4 ? "scrollable" : "standard",
|
|
2351
|
+
scrollButtons: tabs.length > 4 ? "auto" : false,
|
|
2352
|
+
sx: {
|
|
2353
|
+
borderBottom: 1,
|
|
2354
|
+
borderColor: "divider",
|
|
2355
|
+
px: 2,
|
|
2356
|
+
"& .MuiTabs-scrollableContainer": {
|
|
2357
|
+
overflow: "auto"
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Tab, { label: tab }, index))
|
|
2361
|
+
}
|
|
2362
|
+
)
|
|
2363
|
+
] }),
|
|
2364
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2365
|
+
import_material14.Box,
|
|
2366
|
+
{
|
|
2367
|
+
sx: {
|
|
2368
|
+
flex: 1,
|
|
2369
|
+
overflow: "auto",
|
|
2370
|
+
display: "flex",
|
|
2371
|
+
flexDirection: "column"
|
|
2372
|
+
},
|
|
2373
|
+
...contentProps,
|
|
2374
|
+
children
|
|
2375
|
+
}
|
|
2376
|
+
),
|
|
2377
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material14.Divider, {}),
|
|
2379
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2380
|
+
import_material14.Box,
|
|
2381
|
+
{
|
|
2382
|
+
sx: {
|
|
2383
|
+
p: 2,
|
|
2384
|
+
borderTop: 1,
|
|
2385
|
+
borderColor: "divider"
|
|
2386
|
+
},
|
|
2387
|
+
children: footer
|
|
2388
|
+
}
|
|
2389
|
+
)
|
|
2390
|
+
] })
|
|
2391
|
+
]
|
|
2195
2392
|
}
|
|
2196
2393
|
);
|
|
2197
2394
|
};
|
|
@@ -2233,13 +2430,13 @@ var CardActions = (props) => {
|
|
|
2233
2430
|
};
|
|
2234
2431
|
|
|
2235
2432
|
// src/components/layout/List.tsx
|
|
2236
|
-
var
|
|
2433
|
+
var import_material15 = require("@mui/material");
|
|
2237
2434
|
var import_styles19 = require("@mui/material/styles");
|
|
2238
2435
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2239
2436
|
var List5 = (props) => {
|
|
2240
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.List, { ...props });
|
|
2241
2438
|
};
|
|
2242
|
-
var StyledListItem = (0, import_styles19.styled)(
|
|
2439
|
+
var StyledListItem = (0, import_styles19.styled)(import_material15.ListItem, {
|
|
2243
2440
|
shouldForwardProp: (prop) => prop !== "hoverable"
|
|
2244
2441
|
})(({ hoverable = true }) => ({
|
|
2245
2442
|
border: `1px solid ${colors.grey[200]}`,
|
|
@@ -2261,16 +2458,16 @@ var ListItem3 = ({
|
|
|
2261
2458
|
...props
|
|
2262
2459
|
}) => {
|
|
2263
2460
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(StyledListItem, { hoverable, ...props, children: [
|
|
2264
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2461
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.ListItemIcon, { children: icon }),
|
|
2265
2462
|
(primary || secondary) && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2266
|
-
|
|
2463
|
+
import_material15.ListItemText,
|
|
2267
2464
|
{
|
|
2268
2465
|
primary,
|
|
2269
2466
|
secondary
|
|
2270
2467
|
}
|
|
2271
2468
|
),
|
|
2272
2469
|
children,
|
|
2273
|
-
action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2470
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material15.ListItemSecondaryAction, { children: action })
|
|
2274
2471
|
] });
|
|
2275
2472
|
};
|
|
2276
2473
|
|
|
@@ -2298,14 +2495,14 @@ var Avatar4 = ({ size = "medium", ...props }) => {
|
|
|
2298
2495
|
};
|
|
2299
2496
|
|
|
2300
2497
|
// src/components/layout/Table.tsx
|
|
2301
|
-
var
|
|
2498
|
+
var import_material16 = require("@mui/material");
|
|
2302
2499
|
var import_styles21 = require("@mui/material/styles");
|
|
2303
2500
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2304
|
-
var StyledTableContainer = (0, import_styles21.styled)(
|
|
2501
|
+
var StyledTableContainer = (0, import_styles21.styled)(import_material16.TableContainer)({
|
|
2305
2502
|
borderRadius: 8,
|
|
2306
2503
|
border: `1px solid ${colors.grey[200]}`
|
|
2307
2504
|
});
|
|
2308
|
-
var StyledTableHead = (0, import_styles21.styled)(
|
|
2505
|
+
var StyledTableHead = (0, import_styles21.styled)(import_material16.TableHead)({
|
|
2309
2506
|
backgroundColor: colors.grey[50],
|
|
2310
2507
|
"& .MuiTableCell-head": {
|
|
2311
2508
|
fontWeight: 600,
|
|
@@ -2313,7 +2510,7 @@ var StyledTableHead = (0, import_styles21.styled)(import_material15.TableHead)({
|
|
|
2313
2510
|
}
|
|
2314
2511
|
});
|
|
2315
2512
|
var Table = ({ stickyHeader = false, children, ...props }) => {
|
|
2316
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.Table, { stickyHeader, ...props, children }) });
|
|
2317
2514
|
};
|
|
2318
2515
|
var TableHeader = ({
|
|
2319
2516
|
columns,
|
|
@@ -2321,8 +2518,8 @@ var TableHeader = ({
|
|
|
2321
2518
|
order = "asc",
|
|
2322
2519
|
onSort
|
|
2323
2520
|
}) => {
|
|
2324
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2325
|
-
|
|
2521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StyledTableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.TableRow, { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_material16.TableCell, { align: column.align || "left", children: column.sortable && onSort ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2522
|
+
import_material16.TableSortLabel,
|
|
2326
2523
|
{
|
|
2327
2524
|
active: orderBy === column.id,
|
|
2328
2525
|
direction: orderBy === column.id ? order : "asc",
|
|
@@ -2333,7 +2530,7 @@ var TableHeader = ({
|
|
|
2333
2530
|
};
|
|
2334
2531
|
|
|
2335
2532
|
// src/components/layout/Grid.tsx
|
|
2336
|
-
var
|
|
2533
|
+
var import_material17 = require("@mui/material");
|
|
2337
2534
|
|
|
2338
2535
|
// src/components/layout/Breadcrumbs.tsx
|
|
2339
2536
|
var import_Breadcrumbs = __toESM(require("@mui/material/Breadcrumbs"));
|
|
@@ -2380,11 +2577,11 @@ var Breadcrumbs = ({ items, ...props }) => {
|
|
|
2380
2577
|
};
|
|
2381
2578
|
|
|
2382
2579
|
// src/components/layout/Accordion.tsx
|
|
2383
|
-
var
|
|
2580
|
+
var import_material18 = require("@mui/material");
|
|
2384
2581
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
2385
2582
|
var import_styles23 = require("@mui/material/styles");
|
|
2386
2583
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2387
|
-
var StyledAccordion = (0, import_styles23.styled)(
|
|
2584
|
+
var StyledAccordion = (0, import_styles23.styled)(import_material18.Accordion)({
|
|
2388
2585
|
borderRadius: 8,
|
|
2389
2586
|
boxShadow: "none",
|
|
2390
2587
|
border: `1px solid ${colors.grey[200]}`,
|
|
@@ -2395,7 +2592,7 @@ var StyledAccordion = (0, import_styles23.styled)(import_material17.Accordion)({
|
|
|
2395
2592
|
margin: 0
|
|
2396
2593
|
}
|
|
2397
2594
|
});
|
|
2398
|
-
var StyledAccordionSummary = (0, import_styles23.styled)(
|
|
2595
|
+
var StyledAccordionSummary = (0, import_styles23.styled)(import_material18.AccordionSummary)({
|
|
2399
2596
|
backgroundColor: colors.grey[50],
|
|
2400
2597
|
borderRadius: "8px 8px 0 0",
|
|
2401
2598
|
"&.Mui-expanded": {
|
|
@@ -2405,7 +2602,7 @@ var StyledAccordionSummary = (0, import_styles23.styled)(import_material17.Accor
|
|
|
2405
2602
|
margin: "12px 0"
|
|
2406
2603
|
}
|
|
2407
2604
|
});
|
|
2408
|
-
var StyledAccordionDetails = (0, import_styles23.styled)(
|
|
2605
|
+
var StyledAccordionDetails = (0, import_styles23.styled)(import_material18.AccordionDetails)({
|
|
2409
2606
|
padding: "16px"
|
|
2410
2607
|
});
|
|
2411
2608
|
var Accordion = ({
|
|
@@ -2445,27 +2642,27 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
|
2445
2642
|
var StyledDivider = (0, import_styles25.styled)(import_Divider.default)({
|
|
2446
2643
|
borderColor: colors.grey[200]
|
|
2447
2644
|
});
|
|
2448
|
-
var
|
|
2645
|
+
var Divider4 = ({ ...props }) => {
|
|
2449
2646
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledDivider, { ...props });
|
|
2450
2647
|
};
|
|
2451
2648
|
|
|
2452
2649
|
// src/components/layout/Stack.tsx
|
|
2453
|
-
var
|
|
2650
|
+
var import_material19 = require("@mui/material");
|
|
2454
2651
|
|
|
2455
2652
|
// src/components/layout/Box.tsx
|
|
2456
|
-
var
|
|
2653
|
+
var import_material20 = require("@mui/material");
|
|
2457
2654
|
|
|
2458
2655
|
// src/components/layout/Typography.tsx
|
|
2459
|
-
var
|
|
2656
|
+
var import_material21 = require("@mui/material");
|
|
2460
2657
|
|
|
2461
2658
|
// src/components/layout/Container.tsx
|
|
2462
|
-
var
|
|
2659
|
+
var import_material22 = require("@mui/material");
|
|
2463
2660
|
|
|
2464
2661
|
// src/components/layout/AppBar.tsx
|
|
2465
|
-
var
|
|
2662
|
+
var import_material23 = require("@mui/material");
|
|
2466
2663
|
var import_styles26 = require("@mui/material/styles");
|
|
2467
2664
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2468
|
-
var StyledAppBar = (0, import_styles26.styled)(
|
|
2665
|
+
var StyledAppBar = (0, import_styles26.styled)(import_material23.AppBar, {
|
|
2469
2666
|
shouldForwardProp: (prop) => prop !== "appBarHeight"
|
|
2470
2667
|
})(({ appBarHeight = 64 }) => ({
|
|
2471
2668
|
backgroundColor: colors.background.paper,
|
|
@@ -2474,7 +2671,7 @@ var StyledAppBar = (0, import_styles26.styled)(import_material22.AppBar, {
|
|
|
2474
2671
|
height: appBarHeight,
|
|
2475
2672
|
zIndex: 1300
|
|
2476
2673
|
}));
|
|
2477
|
-
var StyledToolbar = (0, import_styles26.styled)(
|
|
2674
|
+
var StyledToolbar = (0, import_styles26.styled)(import_material23.Toolbar)(({ theme: theme2 }) => ({
|
|
2478
2675
|
height: "100%",
|
|
2479
2676
|
paddingLeft: theme2.spacing(2),
|
|
2480
2677
|
paddingRight: theme2.spacing(2),
|
|
@@ -2485,15 +2682,16 @@ var AppBar = ({ height = 64, children, ...props }) => {
|
|
|
2485
2682
|
};
|
|
2486
2683
|
|
|
2487
2684
|
// src/components/layout/Collapse.tsx
|
|
2488
|
-
var
|
|
2685
|
+
var import_material24 = require("@mui/material");
|
|
2489
2686
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2490
2687
|
var Collapse = (props) => {
|
|
2491
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_material24.Collapse, { ...props });
|
|
2492
2689
|
};
|
|
2493
2690
|
|
|
2494
2691
|
// src/components/feedback/Alert.tsx
|
|
2692
|
+
var import_react4 = __toESM(require("react"));
|
|
2495
2693
|
var import_Alert = __toESM(require("@mui/material/Alert"));
|
|
2496
|
-
var
|
|
2694
|
+
var import_material25 = require("@mui/material");
|
|
2497
2695
|
var import_Snackbar = __toESM(require("@mui/material/Snackbar"));
|
|
2498
2696
|
var import_styles27 = require("@mui/material/styles");
|
|
2499
2697
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
@@ -2510,7 +2708,7 @@ var Alert = ({
|
|
|
2510
2708
|
...props
|
|
2511
2709
|
}) => {
|
|
2512
2710
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledAlert, { severity, ...props, children: [
|
|
2513
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2711
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_material25.AlertTitle, { children: title }),
|
|
2514
2712
|
children
|
|
2515
2713
|
] });
|
|
2516
2714
|
};
|
|
@@ -2526,10 +2724,16 @@ var Snackbar = ({
|
|
|
2526
2724
|
autoHideDuration = 6e3,
|
|
2527
2725
|
...props
|
|
2528
2726
|
}) => {
|
|
2727
|
+
const handleClose = (_event, reason) => {
|
|
2728
|
+
if (reason === "clickaway" && onClose) {
|
|
2729
|
+
return;
|
|
2730
|
+
}
|
|
2731
|
+
onClose?.();
|
|
2732
|
+
};
|
|
2529
2733
|
const content = children || (message ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2530
2734
|
Alert,
|
|
2531
2735
|
{
|
|
2532
|
-
onClose,
|
|
2736
|
+
onClose: onClose ? handleClose : void 0,
|
|
2533
2737
|
severity,
|
|
2534
2738
|
variant,
|
|
2535
2739
|
title,
|
|
@@ -2540,12 +2744,31 @@ var Snackbar = ({
|
|
|
2540
2744
|
if (!content) {
|
|
2541
2745
|
return null;
|
|
2542
2746
|
}
|
|
2747
|
+
const NoTransition = import_react4.default.forwardRef(
|
|
2748
|
+
(props2, ref) => {
|
|
2749
|
+
return import_react4.default.cloneElement(props2.children, {
|
|
2750
|
+
ref,
|
|
2751
|
+
style: {
|
|
2752
|
+
...props2.children.props.style,
|
|
2753
|
+
transition: "opacity 0.3s ease-in-out"
|
|
2754
|
+
}
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
);
|
|
2758
|
+
NoTransition.displayName = "NoTransition";
|
|
2543
2759
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2544
2760
|
StyledSnackbar,
|
|
2545
2761
|
{
|
|
2546
2762
|
anchorOrigin,
|
|
2547
2763
|
autoHideDuration,
|
|
2548
|
-
onClose,
|
|
2764
|
+
onClose: handleClose,
|
|
2765
|
+
disableWindowBlurListener: true,
|
|
2766
|
+
ClickAwayListenerProps: {
|
|
2767
|
+
onClickAway: () => {
|
|
2768
|
+
}
|
|
2769
|
+
// Prevent scroll issues
|
|
2770
|
+
},
|
|
2771
|
+
TransitionComponent: NoTransition,
|
|
2549
2772
|
...props,
|
|
2550
2773
|
children: content
|
|
2551
2774
|
}
|
|
@@ -2553,7 +2776,7 @@ var Snackbar = ({
|
|
|
2553
2776
|
};
|
|
2554
2777
|
|
|
2555
2778
|
// src/components/feedback/EmptyState.tsx
|
|
2556
|
-
var
|
|
2779
|
+
var import_material26 = require("@mui/material");
|
|
2557
2780
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2558
2781
|
var EmptyState = ({
|
|
2559
2782
|
title = "No items found",
|
|
@@ -2562,7 +2785,7 @@ var EmptyState = ({
|
|
|
2562
2785
|
action
|
|
2563
2786
|
}) => {
|
|
2564
2787
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2565
|
-
|
|
2788
|
+
import_material26.Box,
|
|
2566
2789
|
{
|
|
2567
2790
|
sx: {
|
|
2568
2791
|
display: "flex",
|
|
@@ -2575,7 +2798,7 @@ var EmptyState = ({
|
|
|
2575
2798
|
},
|
|
2576
2799
|
children: [
|
|
2577
2800
|
icon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2578
|
-
|
|
2801
|
+
import_material26.Box,
|
|
2579
2802
|
{
|
|
2580
2803
|
sx: {
|
|
2581
2804
|
color: colors.text.secondary,
|
|
@@ -2585,16 +2808,16 @@ var EmptyState = ({
|
|
|
2585
2808
|
children: icon
|
|
2586
2809
|
}
|
|
2587
2810
|
),
|
|
2588
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2589
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2590
|
-
action && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Typography, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
|
|
2812
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Typography, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
|
|
2813
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_material26.Box, { children: action })
|
|
2591
2814
|
]
|
|
2592
2815
|
}
|
|
2593
2816
|
);
|
|
2594
2817
|
};
|
|
2595
2818
|
|
|
2596
2819
|
// src/components/feedback/Loading.tsx
|
|
2597
|
-
var
|
|
2820
|
+
var import_material27 = require("@mui/material");
|
|
2598
2821
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2599
2822
|
var Loading = ({
|
|
2600
2823
|
message = "Loading...",
|
|
@@ -2602,7 +2825,7 @@ var Loading = ({
|
|
|
2602
2825
|
fullScreen = false
|
|
2603
2826
|
}) => {
|
|
2604
2827
|
const content = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2605
|
-
|
|
2828
|
+
import_material27.Box,
|
|
2606
2829
|
{
|
|
2607
2830
|
sx: {
|
|
2608
2831
|
display: "flex",
|
|
@@ -2624,8 +2847,8 @@ var Loading = ({
|
|
|
2624
2847
|
}
|
|
2625
2848
|
},
|
|
2626
2849
|
children: [
|
|
2627
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2628
|
-
message && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material27.CircularProgress, { size, thickness: 4 }),
|
|
2851
|
+
message && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_material27.Typography, { variant: "body2", color: "text.secondary", children: message })
|
|
2629
2852
|
]
|
|
2630
2853
|
}
|
|
2631
2854
|
);
|
|
@@ -2633,7 +2856,7 @@ var Loading = ({
|
|
|
2633
2856
|
};
|
|
2634
2857
|
|
|
2635
2858
|
// src/components/feedback/AppLoading.tsx
|
|
2636
|
-
var
|
|
2859
|
+
var import_material28 = require("@mui/material");
|
|
2637
2860
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2638
2861
|
var AppLoading = ({
|
|
2639
2862
|
message = "Loading...",
|
|
@@ -2641,7 +2864,7 @@ var AppLoading = ({
|
|
|
2641
2864
|
sx = {}
|
|
2642
2865
|
}) => {
|
|
2643
2866
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2644
|
-
|
|
2867
|
+
import_material28.Box,
|
|
2645
2868
|
{
|
|
2646
2869
|
sx: {
|
|
2647
2870
|
display: "flex",
|
|
@@ -2660,7 +2883,7 @@ var AppLoading = ({
|
|
|
2660
2883
|
},
|
|
2661
2884
|
children: [
|
|
2662
2885
|
logo && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2663
|
-
|
|
2886
|
+
import_material28.Box,
|
|
2664
2887
|
{
|
|
2665
2888
|
component: "img",
|
|
2666
2889
|
src: logo,
|
|
@@ -2672,28 +2895,28 @@ var AppLoading = ({
|
|
|
2672
2895
|
}
|
|
2673
2896
|
}
|
|
2674
2897
|
),
|
|
2675
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2676
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material28.CircularProgress, { size: 40, thickness: 4, sx: { mb: 2 } }),
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_material28.Typography, { variant: "body1", color: "text.secondary", children: message })
|
|
2677
2900
|
]
|
|
2678
2901
|
}
|
|
2679
2902
|
);
|
|
2680
2903
|
};
|
|
2681
2904
|
|
|
2682
2905
|
// src/components/feedback/CircularProgress.tsx
|
|
2683
|
-
var
|
|
2906
|
+
var import_material29 = require("@mui/material");
|
|
2684
2907
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2685
2908
|
var CircularProgress6 = ({
|
|
2686
2909
|
size = 40,
|
|
2687
2910
|
thickness = 4,
|
|
2688
2911
|
...props
|
|
2689
2912
|
}) => {
|
|
2690
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_material29.CircularProgress, { size, thickness, ...props });
|
|
2691
2914
|
};
|
|
2692
2915
|
|
|
2693
2916
|
// src/components/third-party/FlowEditor.tsx
|
|
2694
|
-
var
|
|
2917
|
+
var import_react5 = require("react");
|
|
2695
2918
|
var import_reactflow = __toESM(require("reactflow"));
|
|
2696
|
-
var
|
|
2919
|
+
var import_material30 = require("@mui/material");
|
|
2697
2920
|
var import_styles28 = require("@mui/material/styles");
|
|
2698
2921
|
var import_reactflow2 = require("reactflow");
|
|
2699
2922
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
@@ -2714,7 +2937,7 @@ var FlowEditor = ({
|
|
|
2714
2937
|
...reactFlowProps
|
|
2715
2938
|
}) => {
|
|
2716
2939
|
const theme2 = (0, import_styles28.useTheme)();
|
|
2717
|
-
const handleInit = (0,
|
|
2940
|
+
const handleInit = (0, import_react5.useCallback)(
|
|
2718
2941
|
(instance) => {
|
|
2719
2942
|
if (onInit) {
|
|
2720
2943
|
onInit(instance);
|
|
@@ -2723,7 +2946,7 @@ var FlowEditor = ({
|
|
|
2723
2946
|
[onInit]
|
|
2724
2947
|
);
|
|
2725
2948
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_reactflow.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2726
|
-
|
|
2949
|
+
import_material30.Box,
|
|
2727
2950
|
{
|
|
2728
2951
|
sx: {
|
|
2729
2952
|
width: "100%",
|
|
@@ -2790,9 +3013,9 @@ var FlowEditor = ({
|
|
|
2790
3013
|
};
|
|
2791
3014
|
|
|
2792
3015
|
// src/components/third-party/CodeEditor.tsx
|
|
2793
|
-
var
|
|
2794
|
-
var
|
|
2795
|
-
var
|
|
3016
|
+
var import_react6 = require("react");
|
|
3017
|
+
var import_react7 = __toESM(require("@monaco-editor/react"));
|
|
3018
|
+
var import_material31 = require("@mui/material");
|
|
2796
3019
|
var import_Fullscreen = __toESM(require("@mui/icons-material/Fullscreen"));
|
|
2797
3020
|
var import_FullscreenExit = __toESM(require("@mui/icons-material/FullscreenExit"));
|
|
2798
3021
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
@@ -2839,32 +3062,32 @@ var CodeEditor = ({
|
|
|
2839
3062
|
containerProps,
|
|
2840
3063
|
typeDefinitions
|
|
2841
3064
|
}) => {
|
|
2842
|
-
const [isEditorReady, setIsEditorReady] = (0,
|
|
2843
|
-
const [validationErrors, setValidationErrors] = (0,
|
|
2844
|
-
const [isFullscreen, setIsFullscreen] = (0,
|
|
2845
|
-
const [tsCode, setTsCode] = (0,
|
|
2846
|
-
const [actualHeight, setActualHeight] = (0,
|
|
3065
|
+
const [isEditorReady, setIsEditorReady] = (0, import_react6.useState)(false);
|
|
3066
|
+
const [validationErrors, setValidationErrors] = (0, import_react6.useState)([]);
|
|
3067
|
+
const [isFullscreen, setIsFullscreen] = (0, import_react6.useState)(false);
|
|
3068
|
+
const [tsCode, setTsCode] = (0, import_react6.useState)(value);
|
|
3069
|
+
const [actualHeight, setActualHeight] = (0, import_react6.useState)(
|
|
2847
3070
|
typeof height === "number" ? `${height}px` : height
|
|
2848
3071
|
);
|
|
2849
|
-
const internalEditorRef = (0,
|
|
2850
|
-
const internalMonacoRef = (0,
|
|
3072
|
+
const internalEditorRef = (0, import_react6.useRef)(null);
|
|
3073
|
+
const internalMonacoRef = (0, import_react6.useRef)(null);
|
|
2851
3074
|
const finalEditorRef = editorRef || internalEditorRef;
|
|
2852
3075
|
const finalMonacoRef = monacoRef || internalMonacoRef;
|
|
2853
|
-
(0,
|
|
3076
|
+
(0, import_react6.useEffect)(() => {
|
|
2854
3077
|
if (isFullscreen) {
|
|
2855
3078
|
setActualHeight("100vh");
|
|
2856
3079
|
} else {
|
|
2857
3080
|
setActualHeight(typeof height === "number" ? `${height}px` : height);
|
|
2858
3081
|
}
|
|
2859
3082
|
}, [height, isFullscreen]);
|
|
2860
|
-
const toggleFullscreen = (0,
|
|
3083
|
+
const toggleFullscreen = (0, import_react6.useCallback)(() => {
|
|
2861
3084
|
const newFullscreenState = !isFullscreen;
|
|
2862
3085
|
setIsFullscreen(newFullscreenState);
|
|
2863
3086
|
if (onFullscreenChange) {
|
|
2864
3087
|
onFullscreenChange(newFullscreenState);
|
|
2865
3088
|
}
|
|
2866
3089
|
}, [isFullscreen, onFullscreenChange]);
|
|
2867
|
-
(0,
|
|
3090
|
+
(0, import_react6.useEffect)(() => {
|
|
2868
3091
|
if (!isFullscreen) return;
|
|
2869
3092
|
function escapeHandler(event) {
|
|
2870
3093
|
if (event.key === "Escape") {
|
|
@@ -2881,7 +3104,7 @@ var CodeEditor = ({
|
|
|
2881
3104
|
window.removeEventListener("keydown", escapeHandler, { capture: true });
|
|
2882
3105
|
};
|
|
2883
3106
|
}, [isFullscreen, onFullscreenChange]);
|
|
2884
|
-
const handleEditorDidMount = (0,
|
|
3107
|
+
const handleEditorDidMount = (0, import_react6.useCallback)(
|
|
2885
3108
|
(editor, monaco) => {
|
|
2886
3109
|
console.log("CodeEditor: onMount called", { editor: !!editor, monaco: !!monaco });
|
|
2887
3110
|
try {
|
|
@@ -2935,7 +3158,7 @@ var CodeEditor = ({
|
|
|
2935
3158
|
},
|
|
2936
3159
|
[isFullscreen, onFullscreenChange, onValidate, onMount, finalEditorRef, finalMonacoRef]
|
|
2937
3160
|
);
|
|
2938
|
-
(0,
|
|
3161
|
+
(0, import_react6.useEffect)(() => {
|
|
2939
3162
|
if (!isEditorReady || !finalMonacoRef?.current || !typeDefinitions) return;
|
|
2940
3163
|
const monaco = finalMonacoRef.current;
|
|
2941
3164
|
const definitions = Array.isArray(typeDefinitions) ? typeDefinitions : [typeDefinitions];
|
|
@@ -2957,7 +3180,7 @@ var CodeEditor = ({
|
|
|
2957
3180
|
setTsCode(valueStr);
|
|
2958
3181
|
onChange(valueStr);
|
|
2959
3182
|
};
|
|
2960
|
-
(0,
|
|
3183
|
+
(0, import_react6.useEffect)(() => {
|
|
2961
3184
|
if (value !== tsCode) {
|
|
2962
3185
|
setTsCode(value);
|
|
2963
3186
|
if (isEditorReady && finalEditorRef?.current) {
|
|
@@ -2983,7 +3206,7 @@ var CodeEditor = ({
|
|
|
2983
3206
|
...options
|
|
2984
3207
|
};
|
|
2985
3208
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2986
|
-
|
|
3209
|
+
import_material31.Box,
|
|
2987
3210
|
{
|
|
2988
3211
|
sx: {
|
|
2989
3212
|
display: "flex",
|
|
@@ -3000,7 +3223,7 @@ var CodeEditor = ({
|
|
|
3000
3223
|
p: isFullscreen ? 2 : 0
|
|
3001
3224
|
},
|
|
3002
3225
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3003
|
-
|
|
3226
|
+
import_material31.Box,
|
|
3004
3227
|
{
|
|
3005
3228
|
sx: {
|
|
3006
3229
|
flex: 1,
|
|
@@ -3015,8 +3238,8 @@ var CodeEditor = ({
|
|
|
3015
3238
|
},
|
|
3016
3239
|
...containerProps,
|
|
3017
3240
|
children: [
|
|
3018
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3019
|
-
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Tooltip, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3242
|
+
import_material31.IconButton,
|
|
3020
3243
|
{
|
|
3021
3244
|
onClick: toggleFullscreen,
|
|
3022
3245
|
size: "small",
|
|
@@ -3035,7 +3258,7 @@ var CodeEditor = ({
|
|
|
3035
3258
|
}
|
|
3036
3259
|
) }),
|
|
3037
3260
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3038
|
-
|
|
3261
|
+
import_material31.Box,
|
|
3039
3262
|
{
|
|
3040
3263
|
sx: {
|
|
3041
3264
|
flex: 1,
|
|
@@ -3045,7 +3268,7 @@ var CodeEditor = ({
|
|
|
3045
3268
|
position: "relative"
|
|
3046
3269
|
},
|
|
3047
3270
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3048
|
-
|
|
3271
|
+
import_react7.default,
|
|
3049
3272
|
{
|
|
3050
3273
|
height: actualHeight,
|
|
3051
3274
|
defaultLanguage: language,
|
|
@@ -3055,7 +3278,7 @@ var CodeEditor = ({
|
|
|
3055
3278
|
onMount: handleEditorDidMount,
|
|
3056
3279
|
theme: themeProp || "vs",
|
|
3057
3280
|
options: defaultOptions,
|
|
3058
|
-
loading: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3281
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Box, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
|
|
3059
3282
|
beforeMount: (monaco) => {
|
|
3060
3283
|
console.log("CodeEditor: beforeMount called", { monaco: !!monaco });
|
|
3061
3284
|
}
|
|
@@ -3064,7 +3287,7 @@ var CodeEditor = ({
|
|
|
3064
3287
|
}
|
|
3065
3288
|
),
|
|
3066
3289
|
validationErrors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3067
|
-
|
|
3290
|
+
import_material31.Alert,
|
|
3068
3291
|
{
|
|
3069
3292
|
severity: "error",
|
|
3070
3293
|
sx: {
|
|
@@ -3081,15 +3304,15 @@ var CodeEditor = ({
|
|
|
3081
3304
|
overflow: "auto"
|
|
3082
3305
|
},
|
|
3083
3306
|
children: [
|
|
3084
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3085
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3086
|
-
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material31.Box, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "ul", sx: { m: 0, pl: 2 }, children: [
|
|
3309
|
+
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3087
3310
|
"Line ",
|
|
3088
3311
|
error.startLineNumber,
|
|
3089
3312
|
": ",
|
|
3090
3313
|
error.message
|
|
3091
3314
|
] }, index)),
|
|
3092
|
-
validationErrors.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3315
|
+
validationErrors.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_material31.Box, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3093
3316
|
validationErrors.length - 3,
|
|
3094
3317
|
" more error",
|
|
3095
3318
|
validationErrors.length - 3 > 1 ? "s" : "",
|