@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.mjs
CHANGED
|
@@ -800,6 +800,8 @@ import UnarchiveIcon from "@mui/icons-material/Unarchive";
|
|
|
800
800
|
import SearchIcon2 from "@mui/icons-material/Search";
|
|
801
801
|
import AddIcon from "@mui/icons-material/Add";
|
|
802
802
|
import CheckIcon from "@mui/icons-material/Check";
|
|
803
|
+
import SettingsIcon from "@mui/icons-material/Settings";
|
|
804
|
+
import PersonAddAltIcon from "@mui/icons-material/PersonAddAlt";
|
|
803
805
|
import { Fragment, jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
804
806
|
var ServiceSelectorButton = ({
|
|
805
807
|
services,
|
|
@@ -812,7 +814,9 @@ var ServiceSelectorButton = ({
|
|
|
812
814
|
onServiceCreated,
|
|
813
815
|
isManager = false,
|
|
814
816
|
sx = {},
|
|
815
|
-
panelWidth = 350
|
|
817
|
+
panelWidth = 350,
|
|
818
|
+
onOpenSettings,
|
|
819
|
+
onOpenAddMember
|
|
816
820
|
}) => {
|
|
817
821
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
818
822
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -900,7 +904,9 @@ var ServiceSelectorButton = ({
|
|
|
900
904
|
onSearchChange: setSearchTerm,
|
|
901
905
|
showArchived,
|
|
902
906
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
903
|
-
filteredServices
|
|
907
|
+
filteredServices,
|
|
908
|
+
onOpenSettings,
|
|
909
|
+
onOpenAddMember
|
|
904
910
|
}
|
|
905
911
|
)
|
|
906
912
|
] });
|
|
@@ -1026,7 +1032,9 @@ var ServiceSelectorButton = ({
|
|
|
1026
1032
|
onSearchChange: setSearchTerm,
|
|
1027
1033
|
showArchived,
|
|
1028
1034
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
1029
|
-
filteredServices
|
|
1035
|
+
filteredServices,
|
|
1036
|
+
onOpenSettings,
|
|
1037
|
+
onOpenAddMember
|
|
1030
1038
|
}
|
|
1031
1039
|
)
|
|
1032
1040
|
] });
|
|
@@ -1048,7 +1056,9 @@ var ServiceSelectorPanel = ({
|
|
|
1048
1056
|
onSearchChange: externalOnSearchChange,
|
|
1049
1057
|
showArchived: externalShowArchived,
|
|
1050
1058
|
onToggleArchived: externalOnToggleArchived,
|
|
1051
|
-
filteredServices: externalFilteredServices
|
|
1059
|
+
filteredServices: externalFilteredServices,
|
|
1060
|
+
onOpenSettings,
|
|
1061
|
+
onOpenAddMember
|
|
1052
1062
|
}) => {
|
|
1053
1063
|
const [internalSearchTerm, setInternalSearchTerm] = useState("");
|
|
1054
1064
|
const [internalShowArchived, setInternalShowArchived] = useState(false);
|
|
@@ -1097,62 +1107,126 @@ var ServiceSelectorPanel = ({
|
|
|
1097
1107
|
}
|
|
1098
1108
|
},
|
|
1099
1109
|
children: [
|
|
1100
|
-
selectedService && /* @__PURE__ */
|
|
1110
|
+
selectedService && /* @__PURE__ */ jsxs4(
|
|
1101
1111
|
Box2,
|
|
1102
1112
|
{
|
|
1103
1113
|
sx: {
|
|
1104
1114
|
paddingLeft: 2,
|
|
1105
1115
|
paddingRight: 2,
|
|
1106
|
-
paddingTop:
|
|
1116
|
+
paddingTop: 1.5,
|
|
1117
|
+
paddingBottom: 1.5,
|
|
1107
1118
|
borderBottom: 1,
|
|
1108
1119
|
borderColor: "divider"
|
|
1109
1120
|
},
|
|
1110
|
-
children:
|
|
1111
|
-
Box2,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1121
|
+
children: [
|
|
1122
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: {
|
|
1123
|
+
display: "flex",
|
|
1124
|
+
alignItems: "center",
|
|
1125
|
+
mb: 1.5
|
|
1126
|
+
}, children: [
|
|
1127
|
+
/* @__PURE__ */ jsx14(
|
|
1128
|
+
Avatar,
|
|
1129
|
+
{
|
|
1130
|
+
sx: {
|
|
1131
|
+
width: 32,
|
|
1132
|
+
height: 32,
|
|
1133
|
+
bgcolor: "primary.main",
|
|
1134
|
+
fontSize: "0.9rem",
|
|
1135
|
+
mr: 1.5
|
|
1136
|
+
},
|
|
1137
|
+
children: selectedService.name.charAt(0)
|
|
1138
|
+
}
|
|
1139
|
+
),
|
|
1140
|
+
/* @__PURE__ */ jsx14(Box2, { sx: { flex: 1 }, children: /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1141
|
+
/* @__PURE__ */ jsx14(Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
|
|
1120
1142
|
/* @__PURE__ */ jsx14(
|
|
1121
|
-
|
|
1143
|
+
Box2,
|
|
1122
1144
|
{
|
|
1123
1145
|
sx: {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1146
|
+
display: "inline-block",
|
|
1147
|
+
bgcolor: "rgba(0, 0, 0, 0.04)",
|
|
1148
|
+
color: "text.secondary",
|
|
1149
|
+
px: 1,
|
|
1150
|
+
py: 0.3,
|
|
1151
|
+
borderRadius: "12px",
|
|
1152
|
+
fontSize: "0.7rem",
|
|
1153
|
+
fontWeight: 500,
|
|
1154
|
+
lineHeight: 1
|
|
1129
1155
|
},
|
|
1130
|
-
children:
|
|
1156
|
+
children: isManager ? "Manager" : "Viewer"
|
|
1131
1157
|
}
|
|
1132
|
-
)
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1158
|
+
)
|
|
1159
|
+
] }) })
|
|
1160
|
+
] }),
|
|
1161
|
+
(onOpenSettings || onOpenAddMember) && /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", gap: 1 }, children: [
|
|
1162
|
+
onOpenAddMember && /* @__PURE__ */ jsx14(
|
|
1163
|
+
Button2,
|
|
1164
|
+
{
|
|
1165
|
+
startIcon: /* @__PURE__ */ jsx14(PersonAddAltIcon, {}),
|
|
1166
|
+
variant: "outlined",
|
|
1167
|
+
size: "small",
|
|
1168
|
+
onClick: (e) => {
|
|
1169
|
+
e.stopPropagation();
|
|
1170
|
+
onClose();
|
|
1171
|
+
onOpenAddMember(selectedServiceId || "");
|
|
1172
|
+
},
|
|
1173
|
+
disabled: !isManager,
|
|
1174
|
+
sx: {
|
|
1175
|
+
flex: 1,
|
|
1176
|
+
textTransform: "none",
|
|
1177
|
+
color: "text.secondary",
|
|
1178
|
+
fontSize: "0.8rem",
|
|
1179
|
+
py: 0.75,
|
|
1180
|
+
justifyContent: "flex-start",
|
|
1181
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1182
|
+
borderRadius: "6px",
|
|
1183
|
+
"&:hover": {
|
|
1184
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1185
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1186
|
+
},
|
|
1187
|
+
"&:disabled": {
|
|
1188
|
+
opacity: 0.5,
|
|
1189
|
+
cursor: "not-allowed"
|
|
1150
1190
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1191
|
+
},
|
|
1192
|
+
children: "Add member"
|
|
1193
|
+
}
|
|
1194
|
+
),
|
|
1195
|
+
onOpenSettings && /* @__PURE__ */ jsx14(
|
|
1196
|
+
Button2,
|
|
1197
|
+
{
|
|
1198
|
+
startIcon: /* @__PURE__ */ jsx14(SettingsIcon, {}),
|
|
1199
|
+
variant: "outlined",
|
|
1200
|
+
size: "small",
|
|
1201
|
+
onClick: (e) => {
|
|
1202
|
+
e.stopPropagation();
|
|
1203
|
+
onClose();
|
|
1204
|
+
onOpenSettings(selectedServiceId || "");
|
|
1205
|
+
},
|
|
1206
|
+
disabled: !isManager,
|
|
1207
|
+
sx: {
|
|
1208
|
+
flex: 1,
|
|
1209
|
+
textTransform: "none",
|
|
1210
|
+
color: "text.secondary",
|
|
1211
|
+
fontSize: "0.8rem",
|
|
1212
|
+
py: 0.75,
|
|
1213
|
+
justifyContent: "flex-start",
|
|
1214
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1215
|
+
borderRadius: "6px",
|
|
1216
|
+
"&:hover": {
|
|
1217
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1218
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1219
|
+
},
|
|
1220
|
+
"&:disabled": {
|
|
1221
|
+
opacity: 0.5,
|
|
1222
|
+
cursor: "not-allowed"
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
children: "Settings"
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
] })
|
|
1229
|
+
]
|
|
1156
1230
|
}
|
|
1157
1231
|
),
|
|
1158
1232
|
/* @__PURE__ */ jsxs4(Box2, { sx: { px: 2, pt: 2, pb: 1.5 }, children: [
|
|
@@ -2069,6 +2143,7 @@ var Dialog = ({
|
|
|
2069
2143
|
children,
|
|
2070
2144
|
dividers = true,
|
|
2071
2145
|
confirmBeforeClose = false,
|
|
2146
|
+
customActions,
|
|
2072
2147
|
...dialogProps
|
|
2073
2148
|
}) => {
|
|
2074
2149
|
const handleCloseAttempt = (e) => {
|
|
@@ -2110,9 +2185,9 @@ var Dialog = ({
|
|
|
2110
2185
|
] }),
|
|
2111
2186
|
dividers && /* @__PURE__ */ jsx26(Divider2, {}),
|
|
2112
2187
|
/* @__PURE__ */ jsx26(DialogContent, { dividers, children }),
|
|
2113
|
-
showActions && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
2188
|
+
(showActions || customActions) && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
2114
2189
|
dividers && /* @__PURE__ */ jsx26(Divider2, {}),
|
|
2115
|
-
/* @__PURE__ */
|
|
2190
|
+
/* @__PURE__ */ jsx26(DialogActions, { children: customActions || /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
2116
2191
|
/* @__PURE__ */ jsx26(
|
|
2117
2192
|
Button4,
|
|
2118
2193
|
{
|
|
@@ -2132,7 +2207,7 @@ var Dialog = ({
|
|
|
2132
2207
|
children: submitLabel
|
|
2133
2208
|
}
|
|
2134
2209
|
)
|
|
2135
|
-
] })
|
|
2210
|
+
] }) })
|
|
2136
2211
|
] })
|
|
2137
2212
|
]
|
|
2138
2213
|
}
|
|
@@ -2142,36 +2217,158 @@ var Dialog = ({
|
|
|
2142
2217
|
// src/components/layout/Drawer.tsx
|
|
2143
2218
|
import MuiDrawer from "@mui/material/Drawer";
|
|
2144
2219
|
import { styled as styled19 } from "@mui/material/styles";
|
|
2145
|
-
import {
|
|
2220
|
+
import { Box as Box6, IconButton as IconButton5, Typography as Typography5, Divider as Divider3, Tabs, Tab as Tab2 } from "@mui/material";
|
|
2221
|
+
import CloseIcon2 from "@mui/icons-material/Close";
|
|
2222
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2146
2223
|
var StyledDrawer2 = styled19(MuiDrawer, {
|
|
2147
|
-
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed"
|
|
2148
|
-
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed }) => ({
|
|
2224
|
+
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed" && prop !== "topOffset"
|
|
2225
|
+
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed, topOffset = 0 }) => ({
|
|
2149
2226
|
width: collapsed ? miniWidth : width,
|
|
2150
2227
|
flexShrink: 0,
|
|
2151
2228
|
"& .MuiDrawer-paper": {
|
|
2152
2229
|
width: collapsed ? miniWidth : width,
|
|
2153
2230
|
boxSizing: "border-box",
|
|
2154
2231
|
boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
|
|
2155
|
-
transition: theme2.transitions.create("width", {
|
|
2232
|
+
transition: theme2.transitions.create(["width", "top", "height"], {
|
|
2156
2233
|
easing: theme2.transitions.easing.sharp,
|
|
2157
2234
|
duration: theme2.transitions.duration.enteringScreen
|
|
2158
2235
|
}),
|
|
2159
|
-
overflow:
|
|
2236
|
+
overflow: "visible",
|
|
2237
|
+
// Let internal content handle scrolling
|
|
2238
|
+
display: "flex",
|
|
2239
|
+
flexDirection: "column",
|
|
2240
|
+
top: `${topOffset}px !important`,
|
|
2241
|
+
height: topOffset > 0 ? `calc(100% - ${topOffset}px) !important` : "100%",
|
|
2242
|
+
zIndex: `${theme2.zIndex.modal} !important`
|
|
2243
|
+
// Use modal zIndex to be above everything except AppBar (which is modal + 1)
|
|
2160
2244
|
}
|
|
2161
2245
|
}));
|
|
2162
2246
|
var Drawer2 = ({
|
|
2163
|
-
width
|
|
2247
|
+
width,
|
|
2164
2248
|
miniWidth = 72,
|
|
2165
2249
|
collapsed = false,
|
|
2250
|
+
title,
|
|
2251
|
+
header,
|
|
2252
|
+
showCloseButton,
|
|
2253
|
+
tabs,
|
|
2254
|
+
activeTab = 0,
|
|
2255
|
+
onTabChange,
|
|
2256
|
+
footer,
|
|
2257
|
+
contentProps,
|
|
2258
|
+
anchor = "right",
|
|
2259
|
+
variant = "temporary",
|
|
2260
|
+
topOffset = 0,
|
|
2261
|
+
children,
|
|
2262
|
+
onClose,
|
|
2166
2263
|
...props
|
|
2167
2264
|
}) => {
|
|
2168
|
-
|
|
2265
|
+
const defaultWidth = variant === "temporary" || variant === "persistent" ? 400 : 240;
|
|
2266
|
+
const finalWidth = width ?? defaultWidth;
|
|
2267
|
+
const shouldShowClose = showCloseButton ?? (variant === "temporary" || variant === "persistent");
|
|
2268
|
+
const hasHeader = title || header || shouldShowClose || tabs;
|
|
2269
|
+
return /* @__PURE__ */ jsxs9(
|
|
2169
2270
|
StyledDrawer2,
|
|
2170
2271
|
{
|
|
2171
|
-
width,
|
|
2272
|
+
width: finalWidth,
|
|
2172
2273
|
miniWidth,
|
|
2173
2274
|
collapsed,
|
|
2174
|
-
|
|
2275
|
+
anchor,
|
|
2276
|
+
variant,
|
|
2277
|
+
topOffset,
|
|
2278
|
+
onClose,
|
|
2279
|
+
ModalProps: {
|
|
2280
|
+
...props.ModalProps,
|
|
2281
|
+
style: {
|
|
2282
|
+
zIndex: topOffset > 0 ? void 0 : void 0
|
|
2283
|
+
// Let styled component handle zIndex
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
BackdropProps: {
|
|
2287
|
+
...props.BackdropProps,
|
|
2288
|
+
style: {
|
|
2289
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
...props,
|
|
2293
|
+
children: [
|
|
2294
|
+
hasHeader && /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2295
|
+
/* @__PURE__ */ jsx27(
|
|
2296
|
+
Box6,
|
|
2297
|
+
{
|
|
2298
|
+
sx: {
|
|
2299
|
+
display: "flex",
|
|
2300
|
+
alignItems: "center",
|
|
2301
|
+
justifyContent: "space-between",
|
|
2302
|
+
p: 2,
|
|
2303
|
+
minHeight: 64,
|
|
2304
|
+
borderBottom: 1,
|
|
2305
|
+
borderColor: "divider"
|
|
2306
|
+
},
|
|
2307
|
+
children: header || /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2308
|
+
/* @__PURE__ */ jsx27(Box6, { sx: { flex: 1 }, children: typeof title === "string" ? /* @__PURE__ */ jsx27(Typography5, { variant: "h6", children: title }) : title }),
|
|
2309
|
+
shouldShowClose && onClose && /* @__PURE__ */ jsx27(
|
|
2310
|
+
IconButton5,
|
|
2311
|
+
{
|
|
2312
|
+
onClick: (e) => {
|
|
2313
|
+
e.stopPropagation();
|
|
2314
|
+
onClose(e, "backdropClick");
|
|
2315
|
+
},
|
|
2316
|
+
size: "small",
|
|
2317
|
+
sx: { ml: 1 },
|
|
2318
|
+
"aria-label": "close",
|
|
2319
|
+
children: /* @__PURE__ */ jsx27(CloseIcon2, {})
|
|
2320
|
+
}
|
|
2321
|
+
)
|
|
2322
|
+
] })
|
|
2323
|
+
}
|
|
2324
|
+
),
|
|
2325
|
+
tabs && tabs.length > 0 && /* @__PURE__ */ jsx27(
|
|
2326
|
+
Tabs,
|
|
2327
|
+
{
|
|
2328
|
+
value: activeTab,
|
|
2329
|
+
onChange: (_, newValue) => onTabChange?.(newValue),
|
|
2330
|
+
variant: tabs.length > 4 ? "scrollable" : "standard",
|
|
2331
|
+
scrollButtons: tabs.length > 4 ? "auto" : false,
|
|
2332
|
+
sx: {
|
|
2333
|
+
borderBottom: 1,
|
|
2334
|
+
borderColor: "divider",
|
|
2335
|
+
px: 2,
|
|
2336
|
+
"& .MuiTabs-scrollableContainer": {
|
|
2337
|
+
overflow: "auto"
|
|
2338
|
+
}
|
|
2339
|
+
},
|
|
2340
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx27(Tab2, { label: tab }, index))
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
] }),
|
|
2344
|
+
/* @__PURE__ */ jsx27(
|
|
2345
|
+
Box6,
|
|
2346
|
+
{
|
|
2347
|
+
sx: {
|
|
2348
|
+
flex: 1,
|
|
2349
|
+
overflow: "auto",
|
|
2350
|
+
display: "flex",
|
|
2351
|
+
flexDirection: "column"
|
|
2352
|
+
},
|
|
2353
|
+
...contentProps,
|
|
2354
|
+
children
|
|
2355
|
+
}
|
|
2356
|
+
),
|
|
2357
|
+
footer && /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2358
|
+
/* @__PURE__ */ jsx27(Divider3, {}),
|
|
2359
|
+
/* @__PURE__ */ jsx27(
|
|
2360
|
+
Box6,
|
|
2361
|
+
{
|
|
2362
|
+
sx: {
|
|
2363
|
+
p: 2,
|
|
2364
|
+
borderTop: 1,
|
|
2365
|
+
borderColor: "divider"
|
|
2366
|
+
},
|
|
2367
|
+
children: footer
|
|
2368
|
+
}
|
|
2369
|
+
)
|
|
2370
|
+
] })
|
|
2371
|
+
]
|
|
2175
2372
|
}
|
|
2176
2373
|
);
|
|
2177
2374
|
};
|
|
@@ -2221,7 +2418,7 @@ import {
|
|
|
2221
2418
|
ListItemSecondaryAction
|
|
2222
2419
|
} from "@mui/material";
|
|
2223
2420
|
import { styled as styled21 } from "@mui/material/styles";
|
|
2224
|
-
import { jsx as jsx29, jsxs as
|
|
2421
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2225
2422
|
var List5 = (props) => {
|
|
2226
2423
|
return /* @__PURE__ */ jsx29(MuiList, { ...props });
|
|
2227
2424
|
};
|
|
@@ -2246,7 +2443,7 @@ var ListItem3 = ({
|
|
|
2246
2443
|
children,
|
|
2247
2444
|
...props
|
|
2248
2445
|
}) => {
|
|
2249
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ jsxs10(StyledListItem, { hoverable, ...props, children: [
|
|
2250
2447
|
icon && /* @__PURE__ */ jsx29(ListItemIcon3, { children: icon }),
|
|
2251
2448
|
(primary || secondary) && /* @__PURE__ */ jsx29(
|
|
2252
2449
|
ListItemText6,
|
|
@@ -2332,7 +2529,7 @@ import { Grid } from "@mui/material";
|
|
|
2332
2529
|
// src/components/layout/Breadcrumbs.tsx
|
|
2333
2530
|
import MuiBreadcrumbs from "@mui/material/Breadcrumbs";
|
|
2334
2531
|
import Link4 from "@mui/material/Link";
|
|
2335
|
-
import
|
|
2532
|
+
import Typography6 from "@mui/material/Typography";
|
|
2336
2533
|
import { styled as styled24 } from "@mui/material/styles";
|
|
2337
2534
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2338
2535
|
var StyledBreadcrumbs = styled24(MuiBreadcrumbs)({
|
|
@@ -2354,7 +2551,7 @@ var Breadcrumbs = ({ items, ...props }) => {
|
|
|
2354
2551
|
return /* @__PURE__ */ jsx32(StyledBreadcrumbs, { ...props, children: items.map((item, index) => {
|
|
2355
2552
|
const isLast = index === items.length - 1;
|
|
2356
2553
|
if (isLast || !item.href && !item.onClick) {
|
|
2357
|
-
return /* @__PURE__ */ jsx32(
|
|
2554
|
+
return /* @__PURE__ */ jsx32(Typography6, { color: "text.primary", children: item.label }, index);
|
|
2358
2555
|
}
|
|
2359
2556
|
return /* @__PURE__ */ jsx32(
|
|
2360
2557
|
StyledLink2,
|
|
@@ -2381,7 +2578,7 @@ import {
|
|
|
2381
2578
|
} from "@mui/material";
|
|
2382
2579
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
2383
2580
|
import { styled as styled25 } from "@mui/material/styles";
|
|
2384
|
-
import { jsx as jsx33, jsxs as
|
|
2581
|
+
import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2385
2582
|
var StyledAccordion = styled25(MuiAccordion)({
|
|
2386
2583
|
borderRadius: 8,
|
|
2387
2584
|
boxShadow: "none",
|
|
@@ -2412,7 +2609,7 @@ var Accordion = ({
|
|
|
2412
2609
|
defaultExpanded = false,
|
|
2413
2610
|
...props
|
|
2414
2611
|
}) => {
|
|
2415
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsxs11(StyledAccordion, { defaultExpanded, ...props, children: [
|
|
2416
2613
|
/* @__PURE__ */ jsx33(StyledAccordionSummary, { expandIcon: /* @__PURE__ */ jsx33(ExpandMoreIcon, {}), children: title }),
|
|
2417
2614
|
/* @__PURE__ */ jsx33(StyledAccordionDetails, { children })
|
|
2418
2615
|
] });
|
|
@@ -2443,7 +2640,7 @@ import { jsx as jsx35 } from "react/jsx-runtime";
|
|
|
2443
2640
|
var StyledDivider = styled27(MuiDivider)({
|
|
2444
2641
|
borderColor: colors.grey[200]
|
|
2445
2642
|
});
|
|
2446
|
-
var
|
|
2643
|
+
var Divider4 = ({ ...props }) => {
|
|
2447
2644
|
return /* @__PURE__ */ jsx35(StyledDivider, { ...props });
|
|
2448
2645
|
};
|
|
2449
2646
|
|
|
@@ -2451,10 +2648,10 @@ var Divider3 = ({ ...props }) => {
|
|
|
2451
2648
|
import { Stack } from "@mui/material";
|
|
2452
2649
|
|
|
2453
2650
|
// src/components/layout/Box.tsx
|
|
2454
|
-
import { Box as
|
|
2651
|
+
import { Box as Box7 } from "@mui/material";
|
|
2455
2652
|
|
|
2456
2653
|
// src/components/layout/Typography.tsx
|
|
2457
|
-
import { Typography as
|
|
2654
|
+
import { Typography as Typography7 } from "@mui/material";
|
|
2458
2655
|
|
|
2459
2656
|
// src/components/layout/Container.tsx
|
|
2460
2657
|
import { Container } from "@mui/material";
|
|
@@ -2495,11 +2692,12 @@ var Collapse = (props) => {
|
|
|
2495
2692
|
};
|
|
2496
2693
|
|
|
2497
2694
|
// src/components/feedback/Alert.tsx
|
|
2695
|
+
import React4 from "react";
|
|
2498
2696
|
import MuiAlert from "@mui/material/Alert";
|
|
2499
2697
|
import { AlertTitle as MuiAlertTitle } from "@mui/material";
|
|
2500
2698
|
import MuiSnackbar from "@mui/material/Snackbar";
|
|
2501
2699
|
import { styled as styled29 } from "@mui/material/styles";
|
|
2502
|
-
import { jsx as jsx38, jsxs as
|
|
2700
|
+
import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2503
2701
|
var StyledAlert = styled29(MuiAlert)({
|
|
2504
2702
|
borderRadius: 8,
|
|
2505
2703
|
"&.MuiAlert-filled": {
|
|
@@ -2512,7 +2710,7 @@ var Alert = ({
|
|
|
2512
2710
|
children,
|
|
2513
2711
|
...props
|
|
2514
2712
|
}) => {
|
|
2515
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsxs12(StyledAlert, { severity, ...props, children: [
|
|
2516
2714
|
title && /* @__PURE__ */ jsx38(MuiAlertTitle, { children: title }),
|
|
2517
2715
|
children
|
|
2518
2716
|
] });
|
|
@@ -2529,10 +2727,16 @@ var Snackbar = ({
|
|
|
2529
2727
|
autoHideDuration = 6e3,
|
|
2530
2728
|
...props
|
|
2531
2729
|
}) => {
|
|
2730
|
+
const handleClose = (_event, reason) => {
|
|
2731
|
+
if (reason === "clickaway" && onClose) {
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
onClose?.();
|
|
2735
|
+
};
|
|
2532
2736
|
const content = children || (message ? /* @__PURE__ */ jsx38(
|
|
2533
2737
|
Alert,
|
|
2534
2738
|
{
|
|
2535
|
-
onClose,
|
|
2739
|
+
onClose: onClose ? handleClose : void 0,
|
|
2536
2740
|
severity,
|
|
2537
2741
|
variant,
|
|
2538
2742
|
title,
|
|
@@ -2543,12 +2747,31 @@ var Snackbar = ({
|
|
|
2543
2747
|
if (!content) {
|
|
2544
2748
|
return null;
|
|
2545
2749
|
}
|
|
2750
|
+
const NoTransition = React4.forwardRef(
|
|
2751
|
+
(props2, ref) => {
|
|
2752
|
+
return React4.cloneElement(props2.children, {
|
|
2753
|
+
ref,
|
|
2754
|
+
style: {
|
|
2755
|
+
...props2.children.props.style,
|
|
2756
|
+
transition: "opacity 0.3s ease-in-out"
|
|
2757
|
+
}
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2760
|
+
);
|
|
2761
|
+
NoTransition.displayName = "NoTransition";
|
|
2546
2762
|
return /* @__PURE__ */ jsx38(
|
|
2547
2763
|
StyledSnackbar,
|
|
2548
2764
|
{
|
|
2549
2765
|
anchorOrigin,
|
|
2550
2766
|
autoHideDuration,
|
|
2551
|
-
onClose,
|
|
2767
|
+
onClose: handleClose,
|
|
2768
|
+
disableWindowBlurListener: true,
|
|
2769
|
+
ClickAwayListenerProps: {
|
|
2770
|
+
onClickAway: () => {
|
|
2771
|
+
}
|
|
2772
|
+
// Prevent scroll issues
|
|
2773
|
+
},
|
|
2774
|
+
TransitionComponent: NoTransition,
|
|
2552
2775
|
...props,
|
|
2553
2776
|
children: content
|
|
2554
2777
|
}
|
|
@@ -2556,16 +2779,16 @@ var Snackbar = ({
|
|
|
2556
2779
|
};
|
|
2557
2780
|
|
|
2558
2781
|
// src/components/feedback/EmptyState.tsx
|
|
2559
|
-
import { Box as
|
|
2560
|
-
import { jsx as jsx39, jsxs as
|
|
2782
|
+
import { Box as Box8, Typography as Typography8 } from "@mui/material";
|
|
2783
|
+
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2561
2784
|
var EmptyState = ({
|
|
2562
2785
|
title = "No items found",
|
|
2563
2786
|
description,
|
|
2564
2787
|
icon,
|
|
2565
2788
|
action
|
|
2566
2789
|
}) => {
|
|
2567
|
-
return /* @__PURE__ */
|
|
2568
|
-
|
|
2790
|
+
return /* @__PURE__ */ jsxs13(
|
|
2791
|
+
Box8,
|
|
2569
2792
|
{
|
|
2570
2793
|
sx: {
|
|
2571
2794
|
display: "flex",
|
|
@@ -2578,7 +2801,7 @@ var EmptyState = ({
|
|
|
2578
2801
|
},
|
|
2579
2802
|
children: [
|
|
2580
2803
|
icon && /* @__PURE__ */ jsx39(
|
|
2581
|
-
|
|
2804
|
+
Box8,
|
|
2582
2805
|
{
|
|
2583
2806
|
sx: {
|
|
2584
2807
|
color: colors.text.secondary,
|
|
@@ -2588,24 +2811,24 @@ var EmptyState = ({
|
|
|
2588
2811
|
children: icon
|
|
2589
2812
|
}
|
|
2590
2813
|
),
|
|
2591
|
-
/* @__PURE__ */ jsx39(
|
|
2592
|
-
description && /* @__PURE__ */ jsx39(
|
|
2593
|
-
action && /* @__PURE__ */ jsx39(
|
|
2814
|
+
/* @__PURE__ */ jsx39(Typography8, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
|
|
2815
|
+
description && /* @__PURE__ */ jsx39(Typography8, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
|
|
2816
|
+
action && /* @__PURE__ */ jsx39(Box8, { children: action })
|
|
2594
2817
|
]
|
|
2595
2818
|
}
|
|
2596
2819
|
);
|
|
2597
2820
|
};
|
|
2598
2821
|
|
|
2599
2822
|
// src/components/feedback/Loading.tsx
|
|
2600
|
-
import { Box as
|
|
2601
|
-
import { jsx as jsx40, jsxs as
|
|
2823
|
+
import { Box as Box9, CircularProgress as CircularProgress4, Typography as Typography9 } from "@mui/material";
|
|
2824
|
+
import { jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2602
2825
|
var Loading = ({
|
|
2603
2826
|
message = "Loading...",
|
|
2604
2827
|
size = 40,
|
|
2605
2828
|
fullScreen = false
|
|
2606
2829
|
}) => {
|
|
2607
|
-
const content = /* @__PURE__ */
|
|
2608
|
-
|
|
2830
|
+
const content = /* @__PURE__ */ jsxs14(
|
|
2831
|
+
Box9,
|
|
2609
2832
|
{
|
|
2610
2833
|
sx: {
|
|
2611
2834
|
display: "flex",
|
|
@@ -2628,7 +2851,7 @@ var Loading = ({
|
|
|
2628
2851
|
},
|
|
2629
2852
|
children: [
|
|
2630
2853
|
/* @__PURE__ */ jsx40(CircularProgress4, { size, thickness: 4 }),
|
|
2631
|
-
message && /* @__PURE__ */ jsx40(
|
|
2854
|
+
message && /* @__PURE__ */ jsx40(Typography9, { variant: "body2", color: "text.secondary", children: message })
|
|
2632
2855
|
]
|
|
2633
2856
|
}
|
|
2634
2857
|
);
|
|
@@ -2636,15 +2859,15 @@ var Loading = ({
|
|
|
2636
2859
|
};
|
|
2637
2860
|
|
|
2638
2861
|
// src/components/feedback/AppLoading.tsx
|
|
2639
|
-
import { Box as
|
|
2640
|
-
import { jsx as jsx41, jsxs as
|
|
2862
|
+
import { Box as Box10, CircularProgress as CircularProgress5, Typography as Typography10 } from "@mui/material";
|
|
2863
|
+
import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2641
2864
|
var AppLoading = ({
|
|
2642
2865
|
message = "Loading...",
|
|
2643
2866
|
logo = "/icons/logo.png",
|
|
2644
2867
|
sx = {}
|
|
2645
2868
|
}) => {
|
|
2646
|
-
return /* @__PURE__ */
|
|
2647
|
-
|
|
2869
|
+
return /* @__PURE__ */ jsxs15(
|
|
2870
|
+
Box10,
|
|
2648
2871
|
{
|
|
2649
2872
|
sx: {
|
|
2650
2873
|
display: "flex",
|
|
@@ -2663,7 +2886,7 @@ var AppLoading = ({
|
|
|
2663
2886
|
},
|
|
2664
2887
|
children: [
|
|
2665
2888
|
logo && /* @__PURE__ */ jsx41(
|
|
2666
|
-
|
|
2889
|
+
Box10,
|
|
2667
2890
|
{
|
|
2668
2891
|
component: "img",
|
|
2669
2892
|
src: logo,
|
|
@@ -2676,7 +2899,7 @@ var AppLoading = ({
|
|
|
2676
2899
|
}
|
|
2677
2900
|
),
|
|
2678
2901
|
/* @__PURE__ */ jsx41(CircularProgress5, { size: 40, thickness: 4, sx: { mb: 2 } }),
|
|
2679
|
-
/* @__PURE__ */ jsx41(
|
|
2902
|
+
/* @__PURE__ */ jsx41(Typography10, { variant: "body1", color: "text.secondary", children: message })
|
|
2680
2903
|
]
|
|
2681
2904
|
}
|
|
2682
2905
|
);
|
|
@@ -2705,10 +2928,10 @@ import ReactFlow, {
|
|
|
2705
2928
|
BackgroundVariant,
|
|
2706
2929
|
ConnectionLineType
|
|
2707
2930
|
} from "reactflow";
|
|
2708
|
-
import { Box as
|
|
2931
|
+
import { Box as Box11 } from "@mui/material";
|
|
2709
2932
|
import { useTheme } from "@mui/material/styles";
|
|
2710
2933
|
import { Background as Background2, Controls as Controls2, MiniMap as MiniMap2, Panel, BackgroundVariant as BackgroundVariant2, ConnectionLineType as ConnectionLineType2 } from "reactflow";
|
|
2711
|
-
import { jsx as jsx43, jsxs as
|
|
2934
|
+
import { jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2712
2935
|
var FlowEditor = ({
|
|
2713
2936
|
nodes,
|
|
2714
2937
|
edges,
|
|
@@ -2735,7 +2958,7 @@ var FlowEditor = ({
|
|
|
2735
2958
|
[onInit]
|
|
2736
2959
|
);
|
|
2737
2960
|
return /* @__PURE__ */ jsx43(ReactFlowProvider, { children: /* @__PURE__ */ jsx43(
|
|
2738
|
-
|
|
2961
|
+
Box11,
|
|
2739
2962
|
{
|
|
2740
2963
|
sx: {
|
|
2741
2964
|
width: "100%",
|
|
@@ -2747,7 +2970,7 @@ var FlowEditor = ({
|
|
|
2747
2970
|
...containerProps?.sx
|
|
2748
2971
|
},
|
|
2749
2972
|
...containerProps,
|
|
2750
|
-
children: /* @__PURE__ */
|
|
2973
|
+
children: /* @__PURE__ */ jsxs16(
|
|
2751
2974
|
ReactFlow,
|
|
2752
2975
|
{
|
|
2753
2976
|
nodes,
|
|
@@ -2804,10 +3027,10 @@ var FlowEditor = ({
|
|
|
2804
3027
|
// src/components/third-party/CodeEditor.tsx
|
|
2805
3028
|
import { useCallback as useCallback4, useEffect, useState as useState4, useRef } from "react";
|
|
2806
3029
|
import Editor from "@monaco-editor/react";
|
|
2807
|
-
import { Box as
|
|
3030
|
+
import { Box as Box12, IconButton as IconButton6, Tooltip as Tooltip3, Alert as Alert2 } from "@mui/material";
|
|
2808
3031
|
import FullscreenIcon from "@mui/icons-material/Fullscreen";
|
|
2809
3032
|
import FullscreenExitIcon from "@mui/icons-material/FullscreenExit";
|
|
2810
|
-
import { jsx as jsx44, jsxs as
|
|
3033
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2811
3034
|
var configureTypeScript = (monaco) => {
|
|
2812
3035
|
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
|
|
2813
3036
|
target: monaco.languages.typescript.ScriptTarget.ES2020,
|
|
@@ -2995,7 +3218,7 @@ var CodeEditor = ({
|
|
|
2995
3218
|
...options
|
|
2996
3219
|
};
|
|
2997
3220
|
return /* @__PURE__ */ jsx44(
|
|
2998
|
-
|
|
3221
|
+
Box12,
|
|
2999
3222
|
{
|
|
3000
3223
|
sx: {
|
|
3001
3224
|
display: "flex",
|
|
@@ -3011,8 +3234,8 @@ var CodeEditor = ({
|
|
|
3011
3234
|
bgcolor: "background.paper",
|
|
3012
3235
|
p: isFullscreen ? 2 : 0
|
|
3013
3236
|
},
|
|
3014
|
-
children: /* @__PURE__ */
|
|
3015
|
-
|
|
3237
|
+
children: /* @__PURE__ */ jsxs17(
|
|
3238
|
+
Box12,
|
|
3016
3239
|
{
|
|
3017
3240
|
sx: {
|
|
3018
3241
|
flex: 1,
|
|
@@ -3028,7 +3251,7 @@ var CodeEditor = ({
|
|
|
3028
3251
|
...containerProps,
|
|
3029
3252
|
children: [
|
|
3030
3253
|
/* @__PURE__ */ jsx44(Tooltip3, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ jsx44(
|
|
3031
|
-
|
|
3254
|
+
IconButton6,
|
|
3032
3255
|
{
|
|
3033
3256
|
onClick: toggleFullscreen,
|
|
3034
3257
|
size: "small",
|
|
@@ -3047,7 +3270,7 @@ var CodeEditor = ({
|
|
|
3047
3270
|
}
|
|
3048
3271
|
) }),
|
|
3049
3272
|
/* @__PURE__ */ jsx44(
|
|
3050
|
-
|
|
3273
|
+
Box12,
|
|
3051
3274
|
{
|
|
3052
3275
|
sx: {
|
|
3053
3276
|
flex: 1,
|
|
@@ -3067,7 +3290,7 @@ var CodeEditor = ({
|
|
|
3067
3290
|
onMount: handleEditorDidMount,
|
|
3068
3291
|
theme: themeProp || "vs",
|
|
3069
3292
|
options: defaultOptions,
|
|
3070
|
-
loading: /* @__PURE__ */ jsx44(
|
|
3293
|
+
loading: /* @__PURE__ */ jsx44(Box12, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
|
|
3071
3294
|
beforeMount: (monaco) => {
|
|
3072
3295
|
console.log("CodeEditor: beforeMount called", { monaco: !!monaco });
|
|
3073
3296
|
}
|
|
@@ -3075,7 +3298,7 @@ var CodeEditor = ({
|
|
|
3075
3298
|
)
|
|
3076
3299
|
}
|
|
3077
3300
|
),
|
|
3078
|
-
validationErrors.length > 0 && /* @__PURE__ */
|
|
3301
|
+
validationErrors.length > 0 && /* @__PURE__ */ jsxs17(
|
|
3079
3302
|
Alert2,
|
|
3080
3303
|
{
|
|
3081
3304
|
severity: "error",
|
|
@@ -3093,15 +3316,15 @@ var CodeEditor = ({
|
|
|
3093
3316
|
overflow: "auto"
|
|
3094
3317
|
},
|
|
3095
3318
|
children: [
|
|
3096
|
-
/* @__PURE__ */ jsx44(
|
|
3097
|
-
/* @__PURE__ */
|
|
3098
|
-
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ jsx44(Box12, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
|
|
3320
|
+
/* @__PURE__ */ jsxs17(Box12, { component: "ul", sx: { m: 0, pl: 2 }, children: [
|
|
3321
|
+
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ jsxs17(Box12, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3099
3322
|
"Line ",
|
|
3100
3323
|
error.startLineNumber,
|
|
3101
3324
|
": ",
|
|
3102
3325
|
error.message
|
|
3103
3326
|
] }, index)),
|
|
3104
|
-
validationErrors.length > 3 && /* @__PURE__ */
|
|
3327
|
+
validationErrors.length > 3 && /* @__PURE__ */ jsxs17(Box12, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3105
3328
|
validationErrors.length - 3,
|
|
3106
3329
|
" more error",
|
|
3107
3330
|
validationErrors.length - 3 > 1 ? "s" : "",
|
|
@@ -3129,7 +3352,7 @@ export {
|
|
|
3129
3352
|
Background2 as Background,
|
|
3130
3353
|
BackgroundVariant2 as BackgroundVariant,
|
|
3131
3354
|
Badge,
|
|
3132
|
-
|
|
3355
|
+
Box7 as Box,
|
|
3133
3356
|
Breadcrumbs,
|
|
3134
3357
|
Button,
|
|
3135
3358
|
ButtonGroup,
|
|
@@ -3146,7 +3369,7 @@ export {
|
|
|
3146
3369
|
Container,
|
|
3147
3370
|
Controls2 as Controls,
|
|
3148
3371
|
Dialog,
|
|
3149
|
-
|
|
3372
|
+
Divider4 as Divider,
|
|
3150
3373
|
Drawer2 as Drawer,
|
|
3151
3374
|
Dropdown,
|
|
3152
3375
|
EmptyState,
|
|
@@ -3197,7 +3420,7 @@ export {
|
|
|
3197
3420
|
ToggleButtonGroup,
|
|
3198
3421
|
Toolbar,
|
|
3199
3422
|
Tooltip2 as Tooltip,
|
|
3200
|
-
|
|
3423
|
+
Typography7 as Typography,
|
|
3201
3424
|
WorkspaceSelectorButton,
|
|
3202
3425
|
colors,
|
|
3203
3426
|
theme
|