@cere/cere-design-system 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +264 -0
- package/dist/index.d.mts +901 -0
- package/dist/index.d.ts +901 -0
- package/dist/index.js +3194 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3205 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +98 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3205 @@
|
|
|
1
|
+
// src/theme/index.ts
|
|
2
|
+
import { createTheme } from "@mui/material/styles";
|
|
3
|
+
var colors = {
|
|
4
|
+
primary: {
|
|
5
|
+
main: "#1976d2",
|
|
6
|
+
// ROB primary color
|
|
7
|
+
light: "#1976d2",
|
|
8
|
+
// Same as main for selected background
|
|
9
|
+
dark: "#1565c0",
|
|
10
|
+
contrastText: "#FFFFFF"
|
|
11
|
+
},
|
|
12
|
+
secondary: {
|
|
13
|
+
main: "#666666",
|
|
14
|
+
light: "#999999",
|
|
15
|
+
dark: "#333333",
|
|
16
|
+
contrastText: "#FFFFFF"
|
|
17
|
+
},
|
|
18
|
+
success: {
|
|
19
|
+
main: "#10B981",
|
|
20
|
+
light: "#34D399",
|
|
21
|
+
dark: "#059669",
|
|
22
|
+
contrastText: "#FFFFFF"
|
|
23
|
+
},
|
|
24
|
+
error: {
|
|
25
|
+
main: "#EF4444",
|
|
26
|
+
light: "#F87171",
|
|
27
|
+
dark: "#DC2626",
|
|
28
|
+
contrastText: "#FFFFFF"
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
main: "#F59E0B",
|
|
32
|
+
light: "#FBBF24",
|
|
33
|
+
dark: "#D97706",
|
|
34
|
+
contrastText: "#FFFFFF"
|
|
35
|
+
},
|
|
36
|
+
tertiary: {
|
|
37
|
+
main: "#F59E0B",
|
|
38
|
+
light: "#FBBF24",
|
|
39
|
+
dark: "#D97706",
|
|
40
|
+
contrastText: "#1A1A1A"
|
|
41
|
+
},
|
|
42
|
+
grey: {
|
|
43
|
+
50: "#FAFAFA",
|
|
44
|
+
100: "#F5F5F5",
|
|
45
|
+
200: "#EEEEEE",
|
|
46
|
+
300: "#E0E0E0",
|
|
47
|
+
400: "#BDBDBD",
|
|
48
|
+
500: "#9E9E9E",
|
|
49
|
+
600: "#757575",
|
|
50
|
+
700: "#616161",
|
|
51
|
+
800: "#424242",
|
|
52
|
+
900: "#212121"
|
|
53
|
+
},
|
|
54
|
+
text: {
|
|
55
|
+
primary: "#1A1A1A",
|
|
56
|
+
secondary: "#666666",
|
|
57
|
+
disabled: "#999999"
|
|
58
|
+
},
|
|
59
|
+
background: {
|
|
60
|
+
default: "#FFFFFF",
|
|
61
|
+
paper: "#FFFFFF",
|
|
62
|
+
selected: "rgba(123, 44, 191, 0.1)"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var theme = createTheme({
|
|
66
|
+
palette: {
|
|
67
|
+
mode: "light",
|
|
68
|
+
primary: colors.primary,
|
|
69
|
+
secondary: colors.secondary,
|
|
70
|
+
success: colors.success,
|
|
71
|
+
error: colors.error,
|
|
72
|
+
warning: colors.warning,
|
|
73
|
+
grey: colors.grey,
|
|
74
|
+
text: colors.text,
|
|
75
|
+
background: colors.background
|
|
76
|
+
},
|
|
77
|
+
typography: {
|
|
78
|
+
fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Human Sans', 'Nohemi', sans-serif",
|
|
79
|
+
h1: {
|
|
80
|
+
fontWeight: 700,
|
|
81
|
+
fontSize: "96px",
|
|
82
|
+
lineHeight: 1.2
|
|
83
|
+
},
|
|
84
|
+
h2: {
|
|
85
|
+
fontWeight: 700,
|
|
86
|
+
fontSize: "60px",
|
|
87
|
+
lineHeight: 1.2
|
|
88
|
+
},
|
|
89
|
+
h3: {
|
|
90
|
+
fontWeight: 700,
|
|
91
|
+
fontSize: "48px",
|
|
92
|
+
lineHeight: 1.2
|
|
93
|
+
},
|
|
94
|
+
h4: {
|
|
95
|
+
fontWeight: 600,
|
|
96
|
+
fontSize: "34px",
|
|
97
|
+
lineHeight: 1.2
|
|
98
|
+
},
|
|
99
|
+
h5: {
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
fontSize: "24px",
|
|
102
|
+
lineHeight: 1.2
|
|
103
|
+
},
|
|
104
|
+
h6: {
|
|
105
|
+
fontWeight: 600,
|
|
106
|
+
fontSize: "20px",
|
|
107
|
+
lineHeight: 1.2
|
|
108
|
+
},
|
|
109
|
+
subtitle1: {
|
|
110
|
+
fontWeight: 700,
|
|
111
|
+
fontSize: "16px",
|
|
112
|
+
lineHeight: 1.5
|
|
113
|
+
},
|
|
114
|
+
subtitle2: {
|
|
115
|
+
fontWeight: 700,
|
|
116
|
+
fontSize: "14px",
|
|
117
|
+
lineHeight: 1.5
|
|
118
|
+
},
|
|
119
|
+
body1: {
|
|
120
|
+
fontWeight: 400,
|
|
121
|
+
fontSize: "16px",
|
|
122
|
+
lineHeight: 1.5
|
|
123
|
+
},
|
|
124
|
+
body2: {
|
|
125
|
+
fontWeight: 400,
|
|
126
|
+
fontSize: "14px",
|
|
127
|
+
lineHeight: 1.5
|
|
128
|
+
},
|
|
129
|
+
button: {
|
|
130
|
+
fontWeight: 700,
|
|
131
|
+
fontSize: "14px",
|
|
132
|
+
textTransform: "uppercase",
|
|
133
|
+
letterSpacing: "0.5px"
|
|
134
|
+
},
|
|
135
|
+
caption: {
|
|
136
|
+
fontWeight: 400,
|
|
137
|
+
fontSize: "12px",
|
|
138
|
+
lineHeight: 1.5
|
|
139
|
+
},
|
|
140
|
+
overline: {
|
|
141
|
+
fontWeight: 800,
|
|
142
|
+
fontSize: "10px",
|
|
143
|
+
textTransform: "uppercase",
|
|
144
|
+
letterSpacing: "1px"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
shape: {
|
|
148
|
+
borderRadius: 16
|
|
149
|
+
},
|
|
150
|
+
components: {
|
|
151
|
+
MuiButton: {
|
|
152
|
+
styleOverrides: {
|
|
153
|
+
root: {
|
|
154
|
+
textTransform: "none",
|
|
155
|
+
borderRadius: 12,
|
|
156
|
+
fontWeight: 600,
|
|
157
|
+
padding: "8px 24px",
|
|
158
|
+
boxShadow: "none",
|
|
159
|
+
"&:hover": {
|
|
160
|
+
boxShadow: "none"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
sizeSmall: {
|
|
164
|
+
padding: "4px 12px",
|
|
165
|
+
fontSize: "12px"
|
|
166
|
+
},
|
|
167
|
+
sizeMedium: {
|
|
168
|
+
padding: "8px 24px",
|
|
169
|
+
fontSize: "14px"
|
|
170
|
+
},
|
|
171
|
+
sizeLarge: {
|
|
172
|
+
padding: "12px 24px",
|
|
173
|
+
fontSize: "16px"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
MuiTextField: {
|
|
178
|
+
styleOverrides: {
|
|
179
|
+
root: {
|
|
180
|
+
"& .MuiOutlinedInput-root": {
|
|
181
|
+
borderRadius: 12
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
MuiSelect: {
|
|
187
|
+
styleOverrides: {
|
|
188
|
+
root: {
|
|
189
|
+
borderRadius: 12
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
MuiChip: {
|
|
194
|
+
styleOverrides: {
|
|
195
|
+
root: {
|
|
196
|
+
borderRadius: 16,
|
|
197
|
+
fontWeight: 500
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
MuiPaper: {
|
|
202
|
+
styleOverrides: {
|
|
203
|
+
root: {
|
|
204
|
+
boxShadow: "0px 4px 20px rgba(0, 0, 0, 0.05)",
|
|
205
|
+
border: "1px solid rgba(0, 0, 0, 0.05)"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
MuiDrawer: {
|
|
210
|
+
styleOverrides: {
|
|
211
|
+
paper: {
|
|
212
|
+
borderRight: "1px solid rgba(0, 0, 0, 0.05)"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
MuiAlert: {
|
|
217
|
+
styleOverrides: {
|
|
218
|
+
root: {
|
|
219
|
+
borderRadius: 8
|
|
220
|
+
},
|
|
221
|
+
filled: {
|
|
222
|
+
borderRadius: 8
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// src/components/buttons/Button.tsx
|
|
230
|
+
import MuiButton from "@mui/material/Button";
|
|
231
|
+
import { styled } from "@mui/material/styles";
|
|
232
|
+
import { jsx } from "react/jsx-runtime";
|
|
233
|
+
var StyledPrimaryButton = styled(MuiButton)(() => ({
|
|
234
|
+
backgroundColor: colors.primary.main,
|
|
235
|
+
color: colors.primary.contrastText,
|
|
236
|
+
"&:hover": {
|
|
237
|
+
backgroundColor: colors.primary.light
|
|
238
|
+
},
|
|
239
|
+
"&:active": {
|
|
240
|
+
backgroundColor: colors.primary.dark
|
|
241
|
+
},
|
|
242
|
+
"&:disabled": {
|
|
243
|
+
backgroundColor: colors.grey[300],
|
|
244
|
+
color: colors.grey[500]
|
|
245
|
+
}
|
|
246
|
+
}));
|
|
247
|
+
var StyledSecondaryButton = styled(MuiButton)(() => ({
|
|
248
|
+
backgroundColor: "transparent",
|
|
249
|
+
color: colors.primary.main,
|
|
250
|
+
border: `1px solid ${colors.primary.main}`,
|
|
251
|
+
"&:hover": {
|
|
252
|
+
backgroundColor: colors.background.selected,
|
|
253
|
+
borderColor: colors.primary.light
|
|
254
|
+
},
|
|
255
|
+
"&:active": {
|
|
256
|
+
backgroundColor: colors.background.selected,
|
|
257
|
+
borderColor: colors.primary.dark
|
|
258
|
+
},
|
|
259
|
+
"&:disabled": {
|
|
260
|
+
borderColor: colors.grey[300],
|
|
261
|
+
color: colors.grey[500]
|
|
262
|
+
}
|
|
263
|
+
}));
|
|
264
|
+
var StyledTertiaryButton = styled(MuiButton)(() => ({
|
|
265
|
+
backgroundColor: "transparent",
|
|
266
|
+
color: colors.tertiary.main,
|
|
267
|
+
"&:hover": {
|
|
268
|
+
backgroundColor: "rgba(245, 158, 11, 0.1)"
|
|
269
|
+
},
|
|
270
|
+
"&:active": {
|
|
271
|
+
backgroundColor: "rgba(245, 158, 11, 0.2)"
|
|
272
|
+
},
|
|
273
|
+
"&:disabled": {
|
|
274
|
+
color: colors.grey[500]
|
|
275
|
+
}
|
|
276
|
+
}));
|
|
277
|
+
var Button = ({
|
|
278
|
+
variant = "primary",
|
|
279
|
+
children,
|
|
280
|
+
startIcon,
|
|
281
|
+
endIcon,
|
|
282
|
+
...props
|
|
283
|
+
}) => {
|
|
284
|
+
const buttonProps = {
|
|
285
|
+
...props,
|
|
286
|
+
startIcon,
|
|
287
|
+
endIcon
|
|
288
|
+
};
|
|
289
|
+
switch (variant) {
|
|
290
|
+
case "primary":
|
|
291
|
+
return /* @__PURE__ */ jsx(StyledPrimaryButton, { ...buttonProps, children });
|
|
292
|
+
case "secondary":
|
|
293
|
+
return /* @__PURE__ */ jsx(StyledSecondaryButton, { ...buttonProps, children });
|
|
294
|
+
case "tertiary":
|
|
295
|
+
return /* @__PURE__ */ jsx(StyledTertiaryButton, { ...buttonProps, children });
|
|
296
|
+
default:
|
|
297
|
+
return /* @__PURE__ */ jsx(StyledPrimaryButton, { ...buttonProps, children });
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// src/components/buttons/IconButton.tsx
|
|
302
|
+
import MuiIconButton from "@mui/material/IconButton";
|
|
303
|
+
import { styled as styled2 } from "@mui/material/styles";
|
|
304
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
305
|
+
var StyledIconButton = styled2(MuiIconButton, {
|
|
306
|
+
shouldForwardProp: (prop) => prop !== "buttonVariant"
|
|
307
|
+
})(({ buttonVariant = "default" }) => {
|
|
308
|
+
const variants = {
|
|
309
|
+
primary: {
|
|
310
|
+
color: colors.primary.main,
|
|
311
|
+
"&:hover": {
|
|
312
|
+
backgroundColor: colors.background.selected
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
secondary: {
|
|
316
|
+
color: colors.text.secondary,
|
|
317
|
+
"&:hover": {
|
|
318
|
+
backgroundColor: colors.grey[50]
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
default: {
|
|
322
|
+
color: colors.text.primary,
|
|
323
|
+
"&:hover": {
|
|
324
|
+
backgroundColor: colors.grey[50]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
return variants[buttonVariant] || variants.default;
|
|
329
|
+
});
|
|
330
|
+
var IconButton = ({
|
|
331
|
+
variant = "default",
|
|
332
|
+
...props
|
|
333
|
+
}) => {
|
|
334
|
+
return /* @__PURE__ */ jsx2(StyledIconButton, { buttonVariant: variant, ...props });
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
// src/components/buttons/LoadingButton.tsx
|
|
338
|
+
import { LoadingButton as MuiLoadingButton } from "@mui/lab";
|
|
339
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
340
|
+
var LoadingButton = ({
|
|
341
|
+
loading = false,
|
|
342
|
+
loadingPosition = "center",
|
|
343
|
+
...props
|
|
344
|
+
}) => {
|
|
345
|
+
return /* @__PURE__ */ jsx3(
|
|
346
|
+
MuiLoadingButton,
|
|
347
|
+
{
|
|
348
|
+
loading,
|
|
349
|
+
loadingPosition,
|
|
350
|
+
...props
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
// src/components/buttons/ButtonGroup.tsx
|
|
356
|
+
import {
|
|
357
|
+
ButtonGroup as MuiButtonGroup
|
|
358
|
+
} from "@mui/material";
|
|
359
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
360
|
+
var ButtonGroup = ({
|
|
361
|
+
orientation = "horizontal",
|
|
362
|
+
size = "medium",
|
|
363
|
+
variant = "outlined",
|
|
364
|
+
...props
|
|
365
|
+
}) => {
|
|
366
|
+
return /* @__PURE__ */ jsx4(
|
|
367
|
+
MuiButtonGroup,
|
|
368
|
+
{
|
|
369
|
+
orientation,
|
|
370
|
+
size,
|
|
371
|
+
variant,
|
|
372
|
+
...props
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// src/components/inputs/TextField.tsx
|
|
378
|
+
import MuiTextField from "@mui/material/TextField";
|
|
379
|
+
import { styled as styled3 } from "@mui/material/styles";
|
|
380
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
381
|
+
var StyledTextField = styled3(MuiTextField)(({ error }) => ({
|
|
382
|
+
"& .MuiOutlinedInput-root": {
|
|
383
|
+
"&:hover fieldset": {
|
|
384
|
+
borderColor: error ? colors.error.main : colors.primary.main
|
|
385
|
+
},
|
|
386
|
+
"&.Mui-focused fieldset": {
|
|
387
|
+
borderColor: error ? colors.error.main : colors.primary.main
|
|
388
|
+
},
|
|
389
|
+
"&.Mui-error fieldset": {
|
|
390
|
+
borderColor: colors.error.main
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"& .MuiInputLabel-root": {
|
|
394
|
+
"&.Mui-focused": {
|
|
395
|
+
color: error ? colors.error.main : colors.primary.main
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}));
|
|
399
|
+
var TextField = ({
|
|
400
|
+
size = "medium",
|
|
401
|
+
...props
|
|
402
|
+
}) => {
|
|
403
|
+
return /* @__PURE__ */ jsx5(StyledTextField, { size: size === "medium" ? "medium" : "small", ...props });
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// src/components/inputs/SearchField.tsx
|
|
407
|
+
import SearchIcon from "@mui/icons-material/Search";
|
|
408
|
+
import InputAdornment from "@mui/material/InputAdornment";
|
|
409
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
410
|
+
var SearchField = ({
|
|
411
|
+
placeholder = "Search...",
|
|
412
|
+
onSearch,
|
|
413
|
+
onChange,
|
|
414
|
+
...props
|
|
415
|
+
}) => {
|
|
416
|
+
const handleChange = (e) => {
|
|
417
|
+
if (onChange) {
|
|
418
|
+
onChange(e);
|
|
419
|
+
}
|
|
420
|
+
if (onSearch) {
|
|
421
|
+
onSearch(e.target.value);
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
return /* @__PURE__ */ jsx6(
|
|
425
|
+
TextField,
|
|
426
|
+
{
|
|
427
|
+
placeholder,
|
|
428
|
+
onChange: handleChange,
|
|
429
|
+
InputProps: {
|
|
430
|
+
startAdornment: /* @__PURE__ */ jsx6(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx6(SearchIcon, { style: { fontSize: 18, color: "#999" } }) })
|
|
431
|
+
},
|
|
432
|
+
...props
|
|
433
|
+
}
|
|
434
|
+
);
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// src/components/inputs/FormControl.tsx
|
|
438
|
+
import {
|
|
439
|
+
FormControl,
|
|
440
|
+
FormLabel,
|
|
441
|
+
FormHelperText,
|
|
442
|
+
FormControlLabel,
|
|
443
|
+
InputLabel,
|
|
444
|
+
InputAdornment as InputAdornment2
|
|
445
|
+
} from "@mui/material";
|
|
446
|
+
|
|
447
|
+
// src/components/inputs/Dropdown.tsx
|
|
448
|
+
import {
|
|
449
|
+
Select,
|
|
450
|
+
MenuItem,
|
|
451
|
+
FormControl as FormControl2,
|
|
452
|
+
InputLabel as InputLabel2
|
|
453
|
+
} from "@mui/material";
|
|
454
|
+
import { styled as styled4 } from "@mui/material/styles";
|
|
455
|
+
import { jsx as jsx7, jsxs } from "react/jsx-runtime";
|
|
456
|
+
var StyledFormControl = styled4(FormControl2)({
|
|
457
|
+
minWidth: 120
|
|
458
|
+
});
|
|
459
|
+
var StyledSelect = styled4(Select)(({ error }) => ({
|
|
460
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
461
|
+
borderColor: error ? colors.error.main : colors.primary.main
|
|
462
|
+
},
|
|
463
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
464
|
+
borderColor: error ? colors.error.main : colors.primary.main
|
|
465
|
+
}
|
|
466
|
+
}));
|
|
467
|
+
var Dropdown = ({
|
|
468
|
+
label,
|
|
469
|
+
options,
|
|
470
|
+
size = "medium",
|
|
471
|
+
placeholder,
|
|
472
|
+
value,
|
|
473
|
+
...props
|
|
474
|
+
}) => {
|
|
475
|
+
const selectSize = size === "large" ? "medium" : size;
|
|
476
|
+
return /* @__PURE__ */ jsxs(StyledFormControl, { size: selectSize, error: props.error, fullWidth: props.fullWidth, children: [
|
|
477
|
+
label && /* @__PURE__ */ jsx7(InputLabel2, { children: label }),
|
|
478
|
+
/* @__PURE__ */ jsxs(
|
|
479
|
+
StyledSelect,
|
|
480
|
+
{
|
|
481
|
+
value: value || "",
|
|
482
|
+
label,
|
|
483
|
+
size: selectSize,
|
|
484
|
+
...props,
|
|
485
|
+
children: [
|
|
486
|
+
placeholder && /* @__PURE__ */ jsx7(MenuItem, { value: "", disabled: true, children: placeholder }),
|
|
487
|
+
options.map((option) => /* @__PURE__ */ jsx7(MenuItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value))
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
] });
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
// src/components/inputs/ToggleButton.tsx
|
|
495
|
+
import {
|
|
496
|
+
ToggleButton as MuiToggleButton,
|
|
497
|
+
ToggleButtonGroup as MuiToggleButtonGroup
|
|
498
|
+
} from "@mui/material";
|
|
499
|
+
import { styled as styled5 } from "@mui/material/styles";
|
|
500
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
501
|
+
var ToggleButton = (props) => {
|
|
502
|
+
return /* @__PURE__ */ jsx8(MuiToggleButton, { ...props });
|
|
503
|
+
};
|
|
504
|
+
var StyledToggleButtonGroup = styled5(MuiToggleButtonGroup)({
|
|
505
|
+
"& .MuiToggleButton-root": {
|
|
506
|
+
border: `1px solid ${colors.grey[300]}`,
|
|
507
|
+
"&.Mui-selected": {
|
|
508
|
+
backgroundColor: colors.primary.main,
|
|
509
|
+
color: colors.primary.contrastText,
|
|
510
|
+
"&:hover": {
|
|
511
|
+
backgroundColor: colors.primary.light
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"&:hover": {
|
|
515
|
+
backgroundColor: colors.grey[50]
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
var ToggleButtonGroup = (props) => {
|
|
520
|
+
return /* @__PURE__ */ jsx8(StyledToggleButtonGroup, { ...props });
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
// src/components/inputs/Switch.tsx
|
|
524
|
+
import MuiSwitch from "@mui/material/Switch";
|
|
525
|
+
import { styled as styled6 } from "@mui/material/styles";
|
|
526
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
527
|
+
var StyledSwitch = styled6(MuiSwitch)(({ theme: theme2 }) => ({
|
|
528
|
+
width: 44,
|
|
529
|
+
height: 24,
|
|
530
|
+
padding: 0,
|
|
531
|
+
"& .MuiSwitch-switchBase": {
|
|
532
|
+
padding: 0,
|
|
533
|
+
margin: 2,
|
|
534
|
+
transitionDuration: "300ms",
|
|
535
|
+
"&.Mui-checked": {
|
|
536
|
+
transform: "translateX(20px)",
|
|
537
|
+
color: "#fff",
|
|
538
|
+
"& + .MuiSwitch-track": {
|
|
539
|
+
backgroundColor: colors.success.main,
|
|
540
|
+
opacity: 1,
|
|
541
|
+
border: 0
|
|
542
|
+
},
|
|
543
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
544
|
+
opacity: 0.5
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"&.Mui-focusVisible .MuiSwitch-thumb": {
|
|
548
|
+
color: colors.success.main,
|
|
549
|
+
border: `6px solid #fff`
|
|
550
|
+
},
|
|
551
|
+
"&.Mui-disabled .MuiSwitch-thumb": {
|
|
552
|
+
color: colors.grey[300]
|
|
553
|
+
},
|
|
554
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
555
|
+
opacity: 0.5,
|
|
556
|
+
backgroundColor: colors.grey[300]
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"& .MuiSwitch-thumb": {
|
|
560
|
+
boxSizing: "border-box",
|
|
561
|
+
width: 20,
|
|
562
|
+
height: 20
|
|
563
|
+
},
|
|
564
|
+
"& .MuiSwitch-track": {
|
|
565
|
+
borderRadius: 24 / 2,
|
|
566
|
+
backgroundColor: colors.grey[300],
|
|
567
|
+
opacity: 1,
|
|
568
|
+
transition: theme2.transitions.create(["background-color"], {
|
|
569
|
+
duration: 500
|
|
570
|
+
})
|
|
571
|
+
}
|
|
572
|
+
}));
|
|
573
|
+
var Switch = ({
|
|
574
|
+
label,
|
|
575
|
+
labelPosition = "right",
|
|
576
|
+
...props
|
|
577
|
+
}) => {
|
|
578
|
+
const switchComponent = /* @__PURE__ */ jsx9(StyledSwitch, { ...props });
|
|
579
|
+
if (!label) {
|
|
580
|
+
return switchComponent;
|
|
581
|
+
}
|
|
582
|
+
return /* @__PURE__ */ jsxs2("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
583
|
+
labelPosition === "left" && /* @__PURE__ */ jsx9("span", { children: label }),
|
|
584
|
+
switchComponent,
|
|
585
|
+
labelPosition === "right" && /* @__PURE__ */ jsx9("span", { children: label })
|
|
586
|
+
] });
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
// src/components/inputs/Checkbox.tsx
|
|
590
|
+
import MuiCheckbox from "@mui/material/Checkbox";
|
|
591
|
+
import { styled as styled7 } from "@mui/material/styles";
|
|
592
|
+
import FormControlLabel2 from "@mui/material/FormControlLabel";
|
|
593
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
594
|
+
var StyledCheckbox = styled7(MuiCheckbox)(() => ({
|
|
595
|
+
color: colors.grey[400],
|
|
596
|
+
"&.Mui-checked": {
|
|
597
|
+
color: colors.primary.main
|
|
598
|
+
},
|
|
599
|
+
"&.MuiCheckbox-indeterminate": {
|
|
600
|
+
color: colors.primary.main
|
|
601
|
+
},
|
|
602
|
+
"&.Mui-disabled": {
|
|
603
|
+
color: colors.grey[300]
|
|
604
|
+
},
|
|
605
|
+
"&:hover": {
|
|
606
|
+
backgroundColor: colors.background.selected
|
|
607
|
+
},
|
|
608
|
+
"&.Mui-focusVisible": {
|
|
609
|
+
outline: `2px solid ${colors.primary.main}`,
|
|
610
|
+
outlineOffset: 2
|
|
611
|
+
}
|
|
612
|
+
}));
|
|
613
|
+
var Checkbox = ({
|
|
614
|
+
label,
|
|
615
|
+
labelPosition = "right",
|
|
616
|
+
...props
|
|
617
|
+
}) => {
|
|
618
|
+
const checkboxComponent = /* @__PURE__ */ jsx10(StyledCheckbox, { ...props });
|
|
619
|
+
if (!label) {
|
|
620
|
+
return checkboxComponent;
|
|
621
|
+
}
|
|
622
|
+
const labelPlacementMap = {
|
|
623
|
+
left: "start",
|
|
624
|
+
right: "end"
|
|
625
|
+
};
|
|
626
|
+
return /* @__PURE__ */ jsx10(
|
|
627
|
+
FormControlLabel2,
|
|
628
|
+
{
|
|
629
|
+
control: checkboxComponent,
|
|
630
|
+
label,
|
|
631
|
+
labelPlacement: labelPlacementMap[labelPosition] || "end"
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
// src/components/inputs/Radio.tsx
|
|
637
|
+
import MuiRadio from "@mui/material/Radio";
|
|
638
|
+
import { styled as styled8 } from "@mui/material/styles";
|
|
639
|
+
import FormControlLabel3 from "@mui/material/FormControlLabel";
|
|
640
|
+
import RadioGroup from "@mui/material/RadioGroup";
|
|
641
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
642
|
+
var StyledRadio = styled8(MuiRadio)(() => ({
|
|
643
|
+
color: colors.grey[400],
|
|
644
|
+
"&.Mui-checked": {
|
|
645
|
+
color: colors.primary.main
|
|
646
|
+
},
|
|
647
|
+
"&.Mui-disabled": {
|
|
648
|
+
color: colors.grey[300]
|
|
649
|
+
},
|
|
650
|
+
"&:hover": {
|
|
651
|
+
backgroundColor: colors.background.selected
|
|
652
|
+
},
|
|
653
|
+
"&.Mui-focusVisible": {
|
|
654
|
+
outline: `2px solid ${colors.primary.main}`,
|
|
655
|
+
outlineOffset: 2
|
|
656
|
+
}
|
|
657
|
+
}));
|
|
658
|
+
var Radio = ({
|
|
659
|
+
label,
|
|
660
|
+
labelPosition = "right",
|
|
661
|
+
...props
|
|
662
|
+
}) => {
|
|
663
|
+
const radioComponent = /* @__PURE__ */ jsx11(StyledRadio, { ...props });
|
|
664
|
+
if (!label) {
|
|
665
|
+
return radioComponent;
|
|
666
|
+
}
|
|
667
|
+
const labelPlacementMap = {
|
|
668
|
+
left: "start",
|
|
669
|
+
right: "end"
|
|
670
|
+
};
|
|
671
|
+
return /* @__PURE__ */ jsx11(
|
|
672
|
+
FormControlLabel3,
|
|
673
|
+
{
|
|
674
|
+
control: radioComponent,
|
|
675
|
+
label,
|
|
676
|
+
labelPlacement: labelPlacementMap[labelPosition] || "end"
|
|
677
|
+
}
|
|
678
|
+
);
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
// src/components/navigation/Sidebar.tsx
|
|
682
|
+
import {
|
|
683
|
+
Drawer,
|
|
684
|
+
List,
|
|
685
|
+
styled as styled10,
|
|
686
|
+
Box
|
|
687
|
+
} from "@mui/material";
|
|
688
|
+
|
|
689
|
+
// src/components/navigation/SidebarItem.tsx
|
|
690
|
+
import {
|
|
691
|
+
ListItemButton,
|
|
692
|
+
ListItemIcon,
|
|
693
|
+
ListItemText,
|
|
694
|
+
styled as styled9
|
|
695
|
+
} from "@mui/material";
|
|
696
|
+
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
697
|
+
var StyledListItemButton = styled9(ListItemButton, {
|
|
698
|
+
shouldForwardProp: (prop) => prop !== "selected" && prop !== "size"
|
|
699
|
+
})(({ selected, size = "medium" }) => {
|
|
700
|
+
const heightMap = {
|
|
701
|
+
small: "40px",
|
|
702
|
+
medium: "56px",
|
|
703
|
+
large: "64px"
|
|
704
|
+
};
|
|
705
|
+
return {
|
|
706
|
+
height: heightMap[size],
|
|
707
|
+
paddingLeft: "16px",
|
|
708
|
+
paddingRight: "16px",
|
|
709
|
+
borderRadius: "8px",
|
|
710
|
+
margin: "4px 8px",
|
|
711
|
+
color: selected ? colors.primary.main : colors.text.primary,
|
|
712
|
+
backgroundColor: selected ? colors.background.selected : "transparent",
|
|
713
|
+
"&:hover": {
|
|
714
|
+
backgroundColor: selected ? colors.background.selected : colors.grey[50]
|
|
715
|
+
},
|
|
716
|
+
"& .MuiListItemIcon-root": {
|
|
717
|
+
color: selected ? colors.primary.main : colors.text.secondary,
|
|
718
|
+
minWidth: "40px"
|
|
719
|
+
},
|
|
720
|
+
"& .MuiListItemText-primary": {
|
|
721
|
+
fontWeight: selected ? 600 : 400,
|
|
722
|
+
color: selected ? colors.primary.main : colors.text.primary
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
});
|
|
726
|
+
var SidebarItem = ({
|
|
727
|
+
label,
|
|
728
|
+
icon,
|
|
729
|
+
selected = false,
|
|
730
|
+
onClick,
|
|
731
|
+
size = "medium",
|
|
732
|
+
endIcon,
|
|
733
|
+
children
|
|
734
|
+
}) => {
|
|
735
|
+
return /* @__PURE__ */ jsxs3(StyledListItemButton, { selected, size, onClick, children: [
|
|
736
|
+
icon && /* @__PURE__ */ jsx12(ListItemIcon, { children: icon }),
|
|
737
|
+
/* @__PURE__ */ jsx12(ListItemText, { primary: label }),
|
|
738
|
+
endIcon && /* @__PURE__ */ jsx12("div", { style: { marginLeft: "auto" }, children: endIcon }),
|
|
739
|
+
children
|
|
740
|
+
] });
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
// src/components/navigation/Sidebar.tsx
|
|
744
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
745
|
+
var StyledDrawer = styled10(Drawer)(() => ({
|
|
746
|
+
"& .MuiDrawer-paper": {
|
|
747
|
+
backgroundColor: colors.background.paper,
|
|
748
|
+
borderRight: `1px solid ${colors.grey[200]}`,
|
|
749
|
+
boxShadow: "none"
|
|
750
|
+
}
|
|
751
|
+
}));
|
|
752
|
+
var Sidebar = ({
|
|
753
|
+
open = true,
|
|
754
|
+
width = 280,
|
|
755
|
+
items,
|
|
756
|
+
onClose,
|
|
757
|
+
variant = "permanent"
|
|
758
|
+
}) => {
|
|
759
|
+
return /* @__PURE__ */ jsx13(
|
|
760
|
+
StyledDrawer,
|
|
761
|
+
{
|
|
762
|
+
variant,
|
|
763
|
+
open,
|
|
764
|
+
onClose,
|
|
765
|
+
sx: {
|
|
766
|
+
width,
|
|
767
|
+
flexShrink: 0,
|
|
768
|
+
"& .MuiDrawer-paper": {
|
|
769
|
+
width,
|
|
770
|
+
boxSizing: "border-box"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
children: /* @__PURE__ */ jsx13(Box, { sx: { overflow: "auto", padding: "8px 0" }, children: /* @__PURE__ */ jsx13(List, { children: items.map((item, index) => /* @__PURE__ */ jsx13(SidebarItem, { ...item }, index)) }) })
|
|
774
|
+
}
|
|
775
|
+
);
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
// src/components/navigation/ServiceSelector.tsx
|
|
779
|
+
import { useState, useCallback } from "react";
|
|
780
|
+
import {
|
|
781
|
+
Box as Box2,
|
|
782
|
+
Typography,
|
|
783
|
+
Avatar,
|
|
784
|
+
Tooltip,
|
|
785
|
+
IconButton as IconButton2,
|
|
786
|
+
Link,
|
|
787
|
+
Chip,
|
|
788
|
+
TextField as TextField2,
|
|
789
|
+
InputAdornment as InputAdornment3,
|
|
790
|
+
List as List2,
|
|
791
|
+
ListItem,
|
|
792
|
+
ListItemAvatar,
|
|
793
|
+
ListItemText as ListItemText2,
|
|
794
|
+
Button as Button2,
|
|
795
|
+
Menu
|
|
796
|
+
} from "@mui/material";
|
|
797
|
+
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
798
|
+
import ArchiveIcon from "@mui/icons-material/Archive";
|
|
799
|
+
import UnarchiveIcon from "@mui/icons-material/Unarchive";
|
|
800
|
+
import SearchIcon2 from "@mui/icons-material/Search";
|
|
801
|
+
import AddIcon from "@mui/icons-material/Add";
|
|
802
|
+
import CheckIcon from "@mui/icons-material/Check";
|
|
803
|
+
import { Fragment, jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
804
|
+
var ServiceSelectorButton = ({
|
|
805
|
+
services,
|
|
806
|
+
selectedServiceId,
|
|
807
|
+
loading = false,
|
|
808
|
+
compact = false,
|
|
809
|
+
onSelectService,
|
|
810
|
+
onServiceClick,
|
|
811
|
+
onCreateService,
|
|
812
|
+
onServiceCreated,
|
|
813
|
+
isManager = false,
|
|
814
|
+
sx = {},
|
|
815
|
+
panelWidth = 350
|
|
816
|
+
}) => {
|
|
817
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
818
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
819
|
+
const [showArchived, setShowArchived] = useState(false);
|
|
820
|
+
const handleOpenSelector = (event) => {
|
|
821
|
+
event.stopPropagation();
|
|
822
|
+
setAnchorEl(event.currentTarget);
|
|
823
|
+
};
|
|
824
|
+
const handleClose = () => {
|
|
825
|
+
setAnchorEl(null);
|
|
826
|
+
setSearchTerm("");
|
|
827
|
+
setShowArchived(false);
|
|
828
|
+
};
|
|
829
|
+
const handleServiceClick = (e) => {
|
|
830
|
+
e.stopPropagation();
|
|
831
|
+
if (selectedServiceId && onServiceClick) {
|
|
832
|
+
onServiceClick(selectedServiceId);
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
const handleSelectService = useCallback(
|
|
836
|
+
(serviceId) => {
|
|
837
|
+
handleClose();
|
|
838
|
+
if (onSelectService) {
|
|
839
|
+
onSelectService(serviceId);
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
[onSelectService]
|
|
843
|
+
);
|
|
844
|
+
const handleCreateClick = () => {
|
|
845
|
+
handleClose();
|
|
846
|
+
if (onCreateService) {
|
|
847
|
+
onCreateService();
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
const selectedService = Array.isArray(services) ? services.find((s) => s.id === selectedServiceId) : null;
|
|
851
|
+
const filteredServices = services.filter((service) => {
|
|
852
|
+
const matchesSearch = searchTerm === "" || service.name.toLowerCase().includes(searchTerm.toLowerCase());
|
|
853
|
+
const isArchived = service.archived === true;
|
|
854
|
+
const matchesArchivedFilter = showArchived ? isArchived : !isArchived;
|
|
855
|
+
return matchesSearch && matchesArchivedFilter;
|
|
856
|
+
});
|
|
857
|
+
if (compact) {
|
|
858
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
859
|
+
/* @__PURE__ */ jsx14(Box2, { sx: { position: "relative" }, children: /* @__PURE__ */ jsx14(Tooltip, { title: "Select service", placement: "right", children: /* @__PURE__ */ jsx14(
|
|
860
|
+
IconButton2,
|
|
861
|
+
{
|
|
862
|
+
onClick: handleOpenSelector,
|
|
863
|
+
sx: {
|
|
864
|
+
p: 1,
|
|
865
|
+
"&:hover": {
|
|
866
|
+
bgcolor: "rgba(0, 0, 0, 0.04)"
|
|
867
|
+
},
|
|
868
|
+
...sx
|
|
869
|
+
},
|
|
870
|
+
children: /* @__PURE__ */ jsx14(
|
|
871
|
+
Avatar,
|
|
872
|
+
{
|
|
873
|
+
sx: {
|
|
874
|
+
width: 32,
|
|
875
|
+
height: 32,
|
|
876
|
+
bgcolor: selectedServiceId ? "primary.main" : "grey.400",
|
|
877
|
+
fontSize: "0.9rem"
|
|
878
|
+
},
|
|
879
|
+
children: selectedService ? selectedService.name.charAt(0) : "D"
|
|
880
|
+
}
|
|
881
|
+
)
|
|
882
|
+
}
|
|
883
|
+
) }) }),
|
|
884
|
+
/* @__PURE__ */ jsx14(
|
|
885
|
+
ServiceSelectorPanel,
|
|
886
|
+
{
|
|
887
|
+
open: Boolean(anchorEl),
|
|
888
|
+
anchorEl,
|
|
889
|
+
onClose: handleClose,
|
|
890
|
+
services,
|
|
891
|
+
selectedServiceId,
|
|
892
|
+
onSelectService: handleSelectService,
|
|
893
|
+
onCreateService: handleCreateClick,
|
|
894
|
+
onServiceCreated,
|
|
895
|
+
loading,
|
|
896
|
+
width: panelWidth,
|
|
897
|
+
isManager,
|
|
898
|
+
selectedService,
|
|
899
|
+
searchTerm,
|
|
900
|
+
onSearchChange: setSearchTerm,
|
|
901
|
+
showArchived,
|
|
902
|
+
onToggleArchived: () => setShowArchived(!showArchived),
|
|
903
|
+
filteredServices
|
|
904
|
+
}
|
|
905
|
+
)
|
|
906
|
+
] });
|
|
907
|
+
}
|
|
908
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
909
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", ...sx }, children: [
|
|
910
|
+
selectedService ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
911
|
+
isManager ? /* @__PURE__ */ jsxs4(
|
|
912
|
+
Link,
|
|
913
|
+
{
|
|
914
|
+
underline: "hover",
|
|
915
|
+
color: "inherit",
|
|
916
|
+
onClick: handleServiceClick,
|
|
917
|
+
sx: {
|
|
918
|
+
display: "flex",
|
|
919
|
+
alignItems: "center",
|
|
920
|
+
fontSize: "0.875rem",
|
|
921
|
+
cursor: "pointer",
|
|
922
|
+
mr: 0.5
|
|
923
|
+
},
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ jsx14(
|
|
926
|
+
Avatar,
|
|
927
|
+
{
|
|
928
|
+
sx: {
|
|
929
|
+
width: 20,
|
|
930
|
+
height: 20,
|
|
931
|
+
bgcolor: "primary.main",
|
|
932
|
+
fontSize: "0.7rem",
|
|
933
|
+
mr: 0.5
|
|
934
|
+
},
|
|
935
|
+
children: selectedService.name.charAt(0)
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
selectedService.name
|
|
939
|
+
]
|
|
940
|
+
}
|
|
941
|
+
) : /* @__PURE__ */ jsxs4(
|
|
942
|
+
Box2,
|
|
943
|
+
{
|
|
944
|
+
sx: {
|
|
945
|
+
display: "flex",
|
|
946
|
+
alignItems: "center",
|
|
947
|
+
fontSize: "0.875rem",
|
|
948
|
+
mr: 0.5,
|
|
949
|
+
color: "text.primary"
|
|
950
|
+
},
|
|
951
|
+
children: [
|
|
952
|
+
/* @__PURE__ */ jsx14(
|
|
953
|
+
Avatar,
|
|
954
|
+
{
|
|
955
|
+
sx: {
|
|
956
|
+
width: 20,
|
|
957
|
+
height: 20,
|
|
958
|
+
bgcolor: "primary.main",
|
|
959
|
+
fontSize: "0.7rem",
|
|
960
|
+
mr: 0.5
|
|
961
|
+
},
|
|
962
|
+
children: selectedService.name.charAt(0)
|
|
963
|
+
}
|
|
964
|
+
),
|
|
965
|
+
selectedService.name
|
|
966
|
+
]
|
|
967
|
+
}
|
|
968
|
+
),
|
|
969
|
+
selectedService.archived && /* @__PURE__ */ jsx14(
|
|
970
|
+
Chip,
|
|
971
|
+
{
|
|
972
|
+
size: "small",
|
|
973
|
+
label: "Archived",
|
|
974
|
+
color: "error",
|
|
975
|
+
variant: "outlined",
|
|
976
|
+
sx: {
|
|
977
|
+
ml: 0.5,
|
|
978
|
+
height: 20,
|
|
979
|
+
fontSize: "0.8rem",
|
|
980
|
+
"& .MuiChip-label": { px: 1 },
|
|
981
|
+
"& .MuiChip-icon": { fontSize: "0.7rem", ml: 0.5 }
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
)
|
|
985
|
+
] }) : /* @__PURE__ */ jsx14(
|
|
986
|
+
Typography,
|
|
987
|
+
{
|
|
988
|
+
variant: "body2",
|
|
989
|
+
color: "text.secondary",
|
|
990
|
+
sx: {
|
|
991
|
+
fontSize: "0.875rem"
|
|
992
|
+
},
|
|
993
|
+
children: "Select Service"
|
|
994
|
+
}
|
|
995
|
+
),
|
|
996
|
+
/* @__PURE__ */ jsx14(
|
|
997
|
+
IconButton2,
|
|
998
|
+
{
|
|
999
|
+
onClick: handleOpenSelector,
|
|
1000
|
+
size: "small",
|
|
1001
|
+
sx: {
|
|
1002
|
+
p: 0.2,
|
|
1003
|
+
ml: 0.5,
|
|
1004
|
+
color: "text.secondary"
|
|
1005
|
+
},
|
|
1006
|
+
children: /* @__PURE__ */ jsx14(KeyboardArrowDownIcon, { fontSize: "small" })
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
] }),
|
|
1010
|
+
/* @__PURE__ */ jsx14(
|
|
1011
|
+
ServiceSelectorPanel,
|
|
1012
|
+
{
|
|
1013
|
+
open: Boolean(anchorEl),
|
|
1014
|
+
anchorEl,
|
|
1015
|
+
onClose: handleClose,
|
|
1016
|
+
services,
|
|
1017
|
+
selectedServiceId,
|
|
1018
|
+
onSelectService: handleSelectService,
|
|
1019
|
+
onCreateService: handleCreateClick,
|
|
1020
|
+
onServiceCreated,
|
|
1021
|
+
loading,
|
|
1022
|
+
width: panelWidth,
|
|
1023
|
+
isManager,
|
|
1024
|
+
selectedService,
|
|
1025
|
+
searchTerm,
|
|
1026
|
+
onSearchChange: setSearchTerm,
|
|
1027
|
+
showArchived,
|
|
1028
|
+
onToggleArchived: () => setShowArchived(!showArchived),
|
|
1029
|
+
filteredServices
|
|
1030
|
+
}
|
|
1031
|
+
)
|
|
1032
|
+
] });
|
|
1033
|
+
};
|
|
1034
|
+
var ServiceSelectorPanel = ({
|
|
1035
|
+
open,
|
|
1036
|
+
anchorEl,
|
|
1037
|
+
onClose,
|
|
1038
|
+
services,
|
|
1039
|
+
selectedServiceId,
|
|
1040
|
+
onSelectService,
|
|
1041
|
+
onCreateService,
|
|
1042
|
+
onServiceCreated,
|
|
1043
|
+
loading = false,
|
|
1044
|
+
width = 350,
|
|
1045
|
+
isManager = false,
|
|
1046
|
+
selectedService,
|
|
1047
|
+
searchTerm: externalSearchTerm,
|
|
1048
|
+
onSearchChange: externalOnSearchChange,
|
|
1049
|
+
showArchived: externalShowArchived,
|
|
1050
|
+
onToggleArchived: externalOnToggleArchived,
|
|
1051
|
+
filteredServices: externalFilteredServices
|
|
1052
|
+
}) => {
|
|
1053
|
+
const [internalSearchTerm, setInternalSearchTerm] = useState("");
|
|
1054
|
+
const [internalShowArchived, setInternalShowArchived] = useState(false);
|
|
1055
|
+
const searchTerm = externalSearchTerm !== void 0 ? externalSearchTerm : internalSearchTerm;
|
|
1056
|
+
const setSearchTerm = externalOnSearchChange || setInternalSearchTerm;
|
|
1057
|
+
const showArchived = externalShowArchived !== void 0 ? externalShowArchived : internalShowArchived;
|
|
1058
|
+
const toggleArchived = externalOnToggleArchived || (() => setInternalShowArchived(!internalShowArchived));
|
|
1059
|
+
const filteredServices = externalFilteredServices || services.filter((service) => {
|
|
1060
|
+
const matchesSearch = searchTerm === "" || service.name.toLowerCase().includes(searchTerm.toLowerCase());
|
|
1061
|
+
const isArchived = service.archived === true;
|
|
1062
|
+
const matchesArchivedFilter = showArchived ? isArchived : !isArchived;
|
|
1063
|
+
return matchesSearch && matchesArchivedFilter;
|
|
1064
|
+
});
|
|
1065
|
+
const handleCreateClick = () => {
|
|
1066
|
+
if (onCreateService) {
|
|
1067
|
+
onCreateService();
|
|
1068
|
+
} else {
|
|
1069
|
+
onClose();
|
|
1070
|
+
if (onServiceCreated) {
|
|
1071
|
+
onServiceCreated();
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
return /* @__PURE__ */ jsxs4(
|
|
1076
|
+
Menu,
|
|
1077
|
+
{
|
|
1078
|
+
anchorEl,
|
|
1079
|
+
open,
|
|
1080
|
+
onClose,
|
|
1081
|
+
anchorOrigin: {
|
|
1082
|
+
vertical: "bottom",
|
|
1083
|
+
horizontal: "left"
|
|
1084
|
+
},
|
|
1085
|
+
transformOrigin: {
|
|
1086
|
+
vertical: "top",
|
|
1087
|
+
horizontal: "left"
|
|
1088
|
+
},
|
|
1089
|
+
PaperProps: {
|
|
1090
|
+
sx: {
|
|
1091
|
+
width,
|
|
1092
|
+
maxHeight: "80vh",
|
|
1093
|
+
borderRadius: 1,
|
|
1094
|
+
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.12)",
|
|
1095
|
+
overflow: "hidden",
|
|
1096
|
+
mt: 1
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
children: [
|
|
1100
|
+
selectedService && /* @__PURE__ */ jsx14(
|
|
1101
|
+
Box2,
|
|
1102
|
+
{
|
|
1103
|
+
sx: {
|
|
1104
|
+
paddingLeft: 2,
|
|
1105
|
+
paddingRight: 2,
|
|
1106
|
+
paddingTop: 0.5,
|
|
1107
|
+
borderBottom: 1,
|
|
1108
|
+
borderColor: "divider"
|
|
1109
|
+
},
|
|
1110
|
+
children: /* @__PURE__ */ jsx14(
|
|
1111
|
+
Box2,
|
|
1112
|
+
{
|
|
1113
|
+
sx: {
|
|
1114
|
+
display: "flex",
|
|
1115
|
+
alignItems: "center",
|
|
1116
|
+
justifyContent: "space-between",
|
|
1117
|
+
mb: 1.5
|
|
1118
|
+
},
|
|
1119
|
+
children: /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
1120
|
+
/* @__PURE__ */ jsx14(
|
|
1121
|
+
Avatar,
|
|
1122
|
+
{
|
|
1123
|
+
sx: {
|
|
1124
|
+
width: 32,
|
|
1125
|
+
height: 32,
|
|
1126
|
+
bgcolor: "primary.main",
|
|
1127
|
+
fontSize: "0.9rem",
|
|
1128
|
+
mr: 1.5
|
|
1129
|
+
},
|
|
1130
|
+
children: selectedService.name.charAt(0)
|
|
1131
|
+
}
|
|
1132
|
+
),
|
|
1133
|
+
/* @__PURE__ */ jsx14(Box2, { children: /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1134
|
+
/* @__PURE__ */ jsx14(Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
|
|
1135
|
+
/* @__PURE__ */ jsx14(
|
|
1136
|
+
Box2,
|
|
1137
|
+
{
|
|
1138
|
+
sx: {
|
|
1139
|
+
display: "inline-block",
|
|
1140
|
+
bgcolor: "rgba(0, 0, 0, 0.04)",
|
|
1141
|
+
color: "text.secondary",
|
|
1142
|
+
px: 1,
|
|
1143
|
+
py: 0.3,
|
|
1144
|
+
borderRadius: "12px",
|
|
1145
|
+
fontSize: "0.7rem",
|
|
1146
|
+
fontWeight: 500,
|
|
1147
|
+
lineHeight: 1
|
|
1148
|
+
},
|
|
1149
|
+
children: isManager ? "Manager" : "Viewer"
|
|
1150
|
+
}
|
|
1151
|
+
)
|
|
1152
|
+
] }) })
|
|
1153
|
+
] })
|
|
1154
|
+
}
|
|
1155
|
+
)
|
|
1156
|
+
}
|
|
1157
|
+
),
|
|
1158
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: { px: 2, pt: 2, pb: 1.5 }, children: [
|
|
1159
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", mb: 1.5 }, children: [
|
|
1160
|
+
/* @__PURE__ */ jsx14(
|
|
1161
|
+
TextField2,
|
|
1162
|
+
{
|
|
1163
|
+
size: "small",
|
|
1164
|
+
placeholder: "Search services...",
|
|
1165
|
+
value: searchTerm,
|
|
1166
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
1167
|
+
sx: { flex: 1 },
|
|
1168
|
+
InputProps: {
|
|
1169
|
+
startAdornment: /* @__PURE__ */ jsx14(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx14(SearchIcon2, { fontSize: "small", color: "action" }) }),
|
|
1170
|
+
sx: {
|
|
1171
|
+
borderRadius: 1.5,
|
|
1172
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)",
|
|
1173
|
+
"& fieldset": { border: "none" },
|
|
1174
|
+
py: 0.5
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
),
|
|
1179
|
+
/* @__PURE__ */ jsx14(Tooltip, { title: showArchived ? "Show active" : "Show archived", children: /* @__PURE__ */ jsx14(
|
|
1180
|
+
IconButton2,
|
|
1181
|
+
{
|
|
1182
|
+
size: "small",
|
|
1183
|
+
onClick: toggleArchived,
|
|
1184
|
+
color: showArchived ? "primary" : "default",
|
|
1185
|
+
sx: { ml: 1 },
|
|
1186
|
+
children: showArchived ? /* @__PURE__ */ jsx14(UnarchiveIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx14(ArchiveIcon, { fontSize: "small" })
|
|
1187
|
+
}
|
|
1188
|
+
) })
|
|
1189
|
+
] }),
|
|
1190
|
+
/* @__PURE__ */ jsx14(
|
|
1191
|
+
Box2,
|
|
1192
|
+
{
|
|
1193
|
+
sx: {
|
|
1194
|
+
maxHeight: 400,
|
|
1195
|
+
overflow: "auto",
|
|
1196
|
+
py: 1
|
|
1197
|
+
},
|
|
1198
|
+
children: loading ? /* @__PURE__ */ jsx14(Box2, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx14(Typography, { variant: "body2", color: "text.secondary", children: "Loading services..." }) }) : filteredServices.length === 0 ? /* @__PURE__ */ jsx14(Box2, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx14(Typography, { variant: "body2", color: "text.secondary", children: searchTerm ? `No ${showArchived ? "archived " : ""}services matching "${searchTerm}"` : showArchived ? "No archived services found" : "No active services found" }) }) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1199
|
+
/* @__PURE__ */ jsxs4(
|
|
1200
|
+
Typography,
|
|
1201
|
+
{
|
|
1202
|
+
variant: "caption",
|
|
1203
|
+
sx: {
|
|
1204
|
+
display: "block",
|
|
1205
|
+
px: 2.5,
|
|
1206
|
+
py: 0.5,
|
|
1207
|
+
color: "text.secondary",
|
|
1208
|
+
fontWeight: 600,
|
|
1209
|
+
textTransform: "uppercase",
|
|
1210
|
+
fontSize: "0.65rem",
|
|
1211
|
+
letterSpacing: 0.5
|
|
1212
|
+
},
|
|
1213
|
+
children: [
|
|
1214
|
+
"Services",
|
|
1215
|
+
showArchived && /* @__PURE__ */ jsx14(
|
|
1216
|
+
Chip,
|
|
1217
|
+
{
|
|
1218
|
+
size: "small",
|
|
1219
|
+
label: "Archived",
|
|
1220
|
+
color: "error",
|
|
1221
|
+
variant: "outlined",
|
|
1222
|
+
sx: {
|
|
1223
|
+
ml: 1,
|
|
1224
|
+
height: 20,
|
|
1225
|
+
fontSize: "0.6rem",
|
|
1226
|
+
"& .MuiChip-label": { px: 0.5 },
|
|
1227
|
+
"& .MuiChip-icon": { fontSize: "0.7rem", ml: 0.5 }
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
)
|
|
1231
|
+
]
|
|
1232
|
+
}
|
|
1233
|
+
),
|
|
1234
|
+
/* @__PURE__ */ jsx14(List2, { disablePadding: true, children: filteredServices.map((service) => /* @__PURE__ */ jsxs4(
|
|
1235
|
+
ListItem,
|
|
1236
|
+
{
|
|
1237
|
+
sx: {
|
|
1238
|
+
py: 0.75,
|
|
1239
|
+
px: 2,
|
|
1240
|
+
cursor: "pointer",
|
|
1241
|
+
"&:hover": {
|
|
1242
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
1243
|
+
},
|
|
1244
|
+
backgroundColor: service.id === selectedServiceId ? "rgba(25, 118, 210, 0.08)" : "transparent",
|
|
1245
|
+
position: "relative"
|
|
1246
|
+
},
|
|
1247
|
+
onClick: () => onSelectService(service.id),
|
|
1248
|
+
secondaryAction: service.id === selectedServiceId ? /* @__PURE__ */ jsx14(
|
|
1249
|
+
CheckIcon,
|
|
1250
|
+
{
|
|
1251
|
+
sx: {
|
|
1252
|
+
color: "primary.main",
|
|
1253
|
+
fontSize: "1.2rem"
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
) : null,
|
|
1257
|
+
children: [
|
|
1258
|
+
/* @__PURE__ */ jsx14(ListItemAvatar, { sx: { minWidth: 40 }, children: /* @__PURE__ */ jsx14(
|
|
1259
|
+
Avatar,
|
|
1260
|
+
{
|
|
1261
|
+
sx: {
|
|
1262
|
+
width: 26,
|
|
1263
|
+
height: 26,
|
|
1264
|
+
bgcolor: service.id === selectedServiceId ? "primary.main" : "grey.400",
|
|
1265
|
+
fontSize: "0.8rem"
|
|
1266
|
+
},
|
|
1267
|
+
src: service.avatar,
|
|
1268
|
+
children: service.name.charAt(0)
|
|
1269
|
+
}
|
|
1270
|
+
) }),
|
|
1271
|
+
/* @__PURE__ */ jsx14(
|
|
1272
|
+
ListItemText2,
|
|
1273
|
+
{
|
|
1274
|
+
primary: /* @__PURE__ */ jsx14(Box2, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx14(
|
|
1275
|
+
Typography,
|
|
1276
|
+
{
|
|
1277
|
+
variant: "body2",
|
|
1278
|
+
sx: {
|
|
1279
|
+
fontWeight: service.id === selectedServiceId ? 600 : 400,
|
|
1280
|
+
color: service.id === selectedServiceId ? "primary.main" : "text.primary"
|
|
1281
|
+
},
|
|
1282
|
+
children: service.name
|
|
1283
|
+
}
|
|
1284
|
+
) }),
|
|
1285
|
+
primaryTypographyProps: { sx: { fontWeight: 500 } },
|
|
1286
|
+
sx: { my: 0 }
|
|
1287
|
+
}
|
|
1288
|
+
)
|
|
1289
|
+
]
|
|
1290
|
+
},
|
|
1291
|
+
service.id
|
|
1292
|
+
)) })
|
|
1293
|
+
] })
|
|
1294
|
+
}
|
|
1295
|
+
),
|
|
1296
|
+
/* @__PURE__ */ jsx14(
|
|
1297
|
+
Box2,
|
|
1298
|
+
{
|
|
1299
|
+
sx: {
|
|
1300
|
+
paddingTop: 2,
|
|
1301
|
+
paddingLeft: 2,
|
|
1302
|
+
paddingRight: 2,
|
|
1303
|
+
borderTop: 1,
|
|
1304
|
+
borderColor: "divider"
|
|
1305
|
+
},
|
|
1306
|
+
children: /* @__PURE__ */ jsx14(
|
|
1307
|
+
Button2,
|
|
1308
|
+
{
|
|
1309
|
+
fullWidth: true,
|
|
1310
|
+
variant: "text",
|
|
1311
|
+
startIcon: /* @__PURE__ */ jsx14(AddIcon, {}),
|
|
1312
|
+
onClick: handleCreateClick,
|
|
1313
|
+
sx: {
|
|
1314
|
+
textTransform: "none",
|
|
1315
|
+
fontWeight: 500,
|
|
1316
|
+
justifyContent: "flex-start",
|
|
1317
|
+
color: "primary.main",
|
|
1318
|
+
py: 1,
|
|
1319
|
+
px: 1.5,
|
|
1320
|
+
"&:hover": {
|
|
1321
|
+
backgroundColor: "rgba(25, 118, 210, 0.08)"
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
children: "New Service"
|
|
1325
|
+
}
|
|
1326
|
+
)
|
|
1327
|
+
}
|
|
1328
|
+
)
|
|
1329
|
+
] })
|
|
1330
|
+
]
|
|
1331
|
+
}
|
|
1332
|
+
);
|
|
1333
|
+
};
|
|
1334
|
+
|
|
1335
|
+
// src/components/navigation/WorkspaceSelector.tsx
|
|
1336
|
+
import React2, { useState as useState2, useCallback as useCallback2 } from "react";
|
|
1337
|
+
import {
|
|
1338
|
+
Box as Box3,
|
|
1339
|
+
Typography as Typography2,
|
|
1340
|
+
Avatar as Avatar2,
|
|
1341
|
+
IconButton as IconButton3,
|
|
1342
|
+
Link as Link2,
|
|
1343
|
+
TextField as TextField3,
|
|
1344
|
+
InputAdornment as InputAdornment4,
|
|
1345
|
+
List as List3,
|
|
1346
|
+
ListItem as ListItem2,
|
|
1347
|
+
ListItemAvatar as ListItemAvatar2,
|
|
1348
|
+
ListItemText as ListItemText3,
|
|
1349
|
+
Button as Button3,
|
|
1350
|
+
Menu as Menu2
|
|
1351
|
+
} from "@mui/material";
|
|
1352
|
+
import KeyboardArrowDownIcon2 from "@mui/icons-material/KeyboardArrowDown";
|
|
1353
|
+
import SearchIcon3 from "@mui/icons-material/Search";
|
|
1354
|
+
import AddIcon2 from "@mui/icons-material/Add";
|
|
1355
|
+
import CheckIcon2 from "@mui/icons-material/Check";
|
|
1356
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1357
|
+
var WorkspaceSelectorButton = ({
|
|
1358
|
+
workspaces,
|
|
1359
|
+
selectedWorkspaceId,
|
|
1360
|
+
loading = false,
|
|
1361
|
+
onSelectWorkspace,
|
|
1362
|
+
onWorkspaceClick,
|
|
1363
|
+
onCreateWorkspace,
|
|
1364
|
+
sx = {},
|
|
1365
|
+
panelWidth = 350
|
|
1366
|
+
}) => {
|
|
1367
|
+
const [anchorEl, setAnchorEl] = useState2(null);
|
|
1368
|
+
const handleOpenSelector = (event) => {
|
|
1369
|
+
event.stopPropagation();
|
|
1370
|
+
setAnchorEl(event.currentTarget);
|
|
1371
|
+
};
|
|
1372
|
+
const handleClose = () => {
|
|
1373
|
+
setAnchorEl(null);
|
|
1374
|
+
};
|
|
1375
|
+
const handleSelectWorkspace = useCallback2(
|
|
1376
|
+
(workspaceId) => {
|
|
1377
|
+
handleClose();
|
|
1378
|
+
if (onSelectWorkspace) {
|
|
1379
|
+
onSelectWorkspace(workspaceId);
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
[onSelectWorkspace]
|
|
1383
|
+
);
|
|
1384
|
+
const selectedWorkspace = Array.isArray(workspaces) ? workspaces.find((w) => w.id === selectedWorkspaceId) : null;
|
|
1385
|
+
if (!workspaces || workspaces.length === 0) {
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1388
|
+
return /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
1389
|
+
/* @__PURE__ */ jsxs5(Box3, { sx: { display: "flex", alignItems: "center", ...sx }, children: [
|
|
1390
|
+
selectedWorkspace ? /* @__PURE__ */ jsx15(Fragment2, { children: /* @__PURE__ */ jsxs5(
|
|
1391
|
+
Link2,
|
|
1392
|
+
{
|
|
1393
|
+
underline: "hover",
|
|
1394
|
+
color: "inherit",
|
|
1395
|
+
onClick: (e) => {
|
|
1396
|
+
e.stopPropagation();
|
|
1397
|
+
if (onWorkspaceClick) {
|
|
1398
|
+
onWorkspaceClick(selectedWorkspace.id);
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
sx: {
|
|
1402
|
+
display: "flex",
|
|
1403
|
+
alignItems: "center",
|
|
1404
|
+
fontSize: "0.875rem",
|
|
1405
|
+
cursor: "pointer",
|
|
1406
|
+
mr: 0.5
|
|
1407
|
+
},
|
|
1408
|
+
children: [
|
|
1409
|
+
/* @__PURE__ */ jsx15(
|
|
1410
|
+
Avatar2,
|
|
1411
|
+
{
|
|
1412
|
+
sx: {
|
|
1413
|
+
width: 20,
|
|
1414
|
+
height: 20,
|
|
1415
|
+
bgcolor: "secondary.main",
|
|
1416
|
+
fontSize: "0.7rem",
|
|
1417
|
+
mr: 0.5
|
|
1418
|
+
},
|
|
1419
|
+
children: selectedWorkspace.name.charAt(0)
|
|
1420
|
+
}
|
|
1421
|
+
),
|
|
1422
|
+
selectedWorkspace.name
|
|
1423
|
+
]
|
|
1424
|
+
}
|
|
1425
|
+
) }) : /* @__PURE__ */ jsx15(
|
|
1426
|
+
Typography2,
|
|
1427
|
+
{
|
|
1428
|
+
variant: "body2",
|
|
1429
|
+
color: "text.secondary",
|
|
1430
|
+
sx: {
|
|
1431
|
+
fontSize: "0.875rem"
|
|
1432
|
+
},
|
|
1433
|
+
children: "Select Workspace"
|
|
1434
|
+
}
|
|
1435
|
+
),
|
|
1436
|
+
/* @__PURE__ */ jsx15(
|
|
1437
|
+
IconButton3,
|
|
1438
|
+
{
|
|
1439
|
+
onClick: handleOpenSelector,
|
|
1440
|
+
size: "small",
|
|
1441
|
+
sx: {
|
|
1442
|
+
p: 0.2,
|
|
1443
|
+
ml: 0.5,
|
|
1444
|
+
color: "text.secondary"
|
|
1445
|
+
},
|
|
1446
|
+
children: /* @__PURE__ */ jsx15(KeyboardArrowDownIcon2, { fontSize: "small" })
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
] }),
|
|
1450
|
+
/* @__PURE__ */ jsx15(
|
|
1451
|
+
WorkspaceSelectorPanel,
|
|
1452
|
+
{
|
|
1453
|
+
open: Boolean(anchorEl),
|
|
1454
|
+
anchorEl,
|
|
1455
|
+
onClose: handleClose,
|
|
1456
|
+
workspaces,
|
|
1457
|
+
selectedWorkspaceId,
|
|
1458
|
+
onSelectWorkspace: handleSelectWorkspace,
|
|
1459
|
+
onCreateWorkspace,
|
|
1460
|
+
loading,
|
|
1461
|
+
width: panelWidth
|
|
1462
|
+
}
|
|
1463
|
+
)
|
|
1464
|
+
] });
|
|
1465
|
+
};
|
|
1466
|
+
var WorkspaceSelectorPanel = ({
|
|
1467
|
+
open,
|
|
1468
|
+
anchorEl,
|
|
1469
|
+
onClose,
|
|
1470
|
+
workspaces,
|
|
1471
|
+
selectedWorkspaceId,
|
|
1472
|
+
onSelectWorkspace,
|
|
1473
|
+
onCreateWorkspace,
|
|
1474
|
+
loading = false,
|
|
1475
|
+
width = 350
|
|
1476
|
+
}) => {
|
|
1477
|
+
const [searchTerm, setSearchTerm] = useState2("");
|
|
1478
|
+
React2.useEffect(() => {
|
|
1479
|
+
if (open) {
|
|
1480
|
+
setSearchTerm("");
|
|
1481
|
+
}
|
|
1482
|
+
}, [open]);
|
|
1483
|
+
const filteredWorkspaces = workspaces.filter(
|
|
1484
|
+
(w) => w.name.toLowerCase().includes(searchTerm.toLowerCase())
|
|
1485
|
+
);
|
|
1486
|
+
const handleCreateClick = () => {
|
|
1487
|
+
onClose();
|
|
1488
|
+
if (onCreateWorkspace) {
|
|
1489
|
+
onCreateWorkspace();
|
|
1490
|
+
}
|
|
1491
|
+
};
|
|
1492
|
+
const handleSelect = (workspaceId) => {
|
|
1493
|
+
onSelectWorkspace(workspaceId);
|
|
1494
|
+
onClose();
|
|
1495
|
+
};
|
|
1496
|
+
return /* @__PURE__ */ jsx15(
|
|
1497
|
+
Menu2,
|
|
1498
|
+
{
|
|
1499
|
+
open,
|
|
1500
|
+
anchorEl,
|
|
1501
|
+
onClose,
|
|
1502
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1503
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
1504
|
+
PaperProps: {
|
|
1505
|
+
sx: {
|
|
1506
|
+
width,
|
|
1507
|
+
maxHeight: 600,
|
|
1508
|
+
mt: 1,
|
|
1509
|
+
borderRadius: 2
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
children: /* @__PURE__ */ jsxs5(Box3, { children: [
|
|
1513
|
+
/* @__PURE__ */ jsx15(Box3, { sx: { px: 2, pt: 2, pb: 1.5 }, children: /* @__PURE__ */ jsx15(
|
|
1514
|
+
TextField3,
|
|
1515
|
+
{
|
|
1516
|
+
fullWidth: true,
|
|
1517
|
+
size: "small",
|
|
1518
|
+
placeholder: "Search workspaces...",
|
|
1519
|
+
value: searchTerm,
|
|
1520
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
1521
|
+
InputProps: {
|
|
1522
|
+
startAdornment: /* @__PURE__ */ jsx15(InputAdornment4, { position: "start", children: /* @__PURE__ */ jsx15(SearchIcon3, { fontSize: "small" }) })
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
) }),
|
|
1526
|
+
/* @__PURE__ */ jsx15(Box3, { sx: { maxHeight: 400, overflowY: "auto" }, children: loading ? /* @__PURE__ */ jsx15(Box3, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx15(Typography2, { variant: "body2", color: "text.secondary", children: "Loading..." }) }) : filteredWorkspaces.length === 0 ? /* @__PURE__ */ jsx15(Box3, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx15(Typography2, { variant: "body2", color: "text.secondary", children: "No workspaces found" }) }) : /* @__PURE__ */ jsx15(List3, { dense: true, children: filteredWorkspaces.map((workspace) => /* @__PURE__ */ jsxs5(
|
|
1527
|
+
ListItem2,
|
|
1528
|
+
{
|
|
1529
|
+
onClick: () => handleSelect(workspace.id),
|
|
1530
|
+
sx: {
|
|
1531
|
+
py: 0.5,
|
|
1532
|
+
cursor: "pointer",
|
|
1533
|
+
bgcolor: workspace.id === selectedWorkspaceId ? "action.selected" : "transparent",
|
|
1534
|
+
"&:hover": {
|
|
1535
|
+
bgcolor: "action.hover"
|
|
1536
|
+
}
|
|
1537
|
+
},
|
|
1538
|
+
children: [
|
|
1539
|
+
/* @__PURE__ */ jsx15(ListItemAvatar2, { children: /* @__PURE__ */ jsx15(
|
|
1540
|
+
Avatar2,
|
|
1541
|
+
{
|
|
1542
|
+
sx: { width: 32, height: 32, bgcolor: "secondary.main" },
|
|
1543
|
+
children: workspace.name.charAt(0)
|
|
1544
|
+
}
|
|
1545
|
+
) }),
|
|
1546
|
+
/* @__PURE__ */ jsx15(
|
|
1547
|
+
ListItemText3,
|
|
1548
|
+
{
|
|
1549
|
+
primary: /* @__PURE__ */ jsxs5(Box3, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1550
|
+
/* @__PURE__ */ jsx15(Typography2, { variant: "body2", fontWeight: 500, children: workspace.name }),
|
|
1551
|
+
workspace.id === selectedWorkspaceId && /* @__PURE__ */ jsx15(CheckIcon2, { fontSize: "small", color: "primary" })
|
|
1552
|
+
] }),
|
|
1553
|
+
secondary: workspace.description
|
|
1554
|
+
}
|
|
1555
|
+
)
|
|
1556
|
+
]
|
|
1557
|
+
},
|
|
1558
|
+
workspace.id
|
|
1559
|
+
)) }) }),
|
|
1560
|
+
/* @__PURE__ */ jsx15(
|
|
1561
|
+
Box3,
|
|
1562
|
+
{
|
|
1563
|
+
sx: {
|
|
1564
|
+
paddingTop: 2,
|
|
1565
|
+
paddingLeft: 2,
|
|
1566
|
+
paddingRight: 2,
|
|
1567
|
+
borderTop: 1,
|
|
1568
|
+
borderColor: "divider"
|
|
1569
|
+
},
|
|
1570
|
+
children: /* @__PURE__ */ jsx15(
|
|
1571
|
+
Button3,
|
|
1572
|
+
{
|
|
1573
|
+
fullWidth: true,
|
|
1574
|
+
variant: "text",
|
|
1575
|
+
startIcon: /* @__PURE__ */ jsx15(AddIcon2, {}),
|
|
1576
|
+
onClick: handleCreateClick,
|
|
1577
|
+
sx: {
|
|
1578
|
+
textTransform: "none",
|
|
1579
|
+
fontWeight: 500,
|
|
1580
|
+
justifyContent: "flex-start",
|
|
1581
|
+
color: "primary.main",
|
|
1582
|
+
py: 1,
|
|
1583
|
+
px: 1.5,
|
|
1584
|
+
"&:hover": {
|
|
1585
|
+
backgroundColor: "rgba(25, 118, 210, 0.08)"
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
1588
|
+
children: "New Workspace"
|
|
1589
|
+
}
|
|
1590
|
+
)
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
] })
|
|
1594
|
+
}
|
|
1595
|
+
);
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
// src/components/navigation/Stepper.tsx
|
|
1599
|
+
import {
|
|
1600
|
+
Stepper as MuiStepper,
|
|
1601
|
+
Step as MuiStep,
|
|
1602
|
+
StepLabel as MuiStepLabel,
|
|
1603
|
+
StepContent as MuiStepContent,
|
|
1604
|
+
StepButton as MuiStepButton
|
|
1605
|
+
} from "@mui/material";
|
|
1606
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1607
|
+
var Stepper = (props) => {
|
|
1608
|
+
return /* @__PURE__ */ jsx16(MuiStepper, { ...props });
|
|
1609
|
+
};
|
|
1610
|
+
var Step = (props) => {
|
|
1611
|
+
return /* @__PURE__ */ jsx16(MuiStep, { ...props });
|
|
1612
|
+
};
|
|
1613
|
+
var StepLabel = (props) => {
|
|
1614
|
+
return /* @__PURE__ */ jsx16(MuiStepLabel, { ...props });
|
|
1615
|
+
};
|
|
1616
|
+
var StepContent = (props) => {
|
|
1617
|
+
return /* @__PURE__ */ jsx16(MuiStepContent, { ...props });
|
|
1618
|
+
};
|
|
1619
|
+
var StepButton = (props) => {
|
|
1620
|
+
return /* @__PURE__ */ jsx16(MuiStepButton, { ...props });
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1623
|
+
// src/components/feedback/Badge.tsx
|
|
1624
|
+
import MuiBadge from "@mui/material/Badge";
|
|
1625
|
+
import { styled as styled11 } from "@mui/material/styles";
|
|
1626
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1627
|
+
var getBadgeColor = (variant) => {
|
|
1628
|
+
switch (variant) {
|
|
1629
|
+
case "primary":
|
|
1630
|
+
return colors.primary.main;
|
|
1631
|
+
case "success":
|
|
1632
|
+
return colors.success.main;
|
|
1633
|
+
case "error":
|
|
1634
|
+
return colors.error.main;
|
|
1635
|
+
default:
|
|
1636
|
+
return colors.grey[400];
|
|
1637
|
+
}
|
|
1638
|
+
};
|
|
1639
|
+
var StyledBadge = styled11(MuiBadge, {
|
|
1640
|
+
shouldForwardProp: (prop) => prop !== "badgeVariant"
|
|
1641
|
+
})(({ badgeVariant = "default" }) => ({
|
|
1642
|
+
"& .MuiBadge-badge": {
|
|
1643
|
+
backgroundColor: getBadgeColor(badgeVariant),
|
|
1644
|
+
color: "#FFFFFF"
|
|
1645
|
+
}
|
|
1646
|
+
}));
|
|
1647
|
+
var Badge = ({
|
|
1648
|
+
variant = "default",
|
|
1649
|
+
children,
|
|
1650
|
+
badgeContent,
|
|
1651
|
+
...props
|
|
1652
|
+
}) => {
|
|
1653
|
+
return /* @__PURE__ */ jsx17(StyledBadge, { badgeVariant: variant, badgeContent, ...props, children });
|
|
1654
|
+
};
|
|
1655
|
+
|
|
1656
|
+
// src/components/feedback/Chip.tsx
|
|
1657
|
+
import MuiChip from "@mui/material/Chip";
|
|
1658
|
+
import { styled as styled12 } from "@mui/material/styles";
|
|
1659
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1660
|
+
var StyledDefaultChip = styled12(MuiChip)({
|
|
1661
|
+
backgroundColor: colors.grey[100],
|
|
1662
|
+
color: colors.text.primary,
|
|
1663
|
+
"&:hover": {
|
|
1664
|
+
backgroundColor: colors.grey[200]
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
var StyledActiveChip = styled12(MuiChip)({
|
|
1668
|
+
backgroundColor: colors.background.selected,
|
|
1669
|
+
color: colors.primary.main,
|
|
1670
|
+
"&:hover": {
|
|
1671
|
+
backgroundColor: colors.background.selected
|
|
1672
|
+
}
|
|
1673
|
+
});
|
|
1674
|
+
var Chip2 = ({
|
|
1675
|
+
variant = "default",
|
|
1676
|
+
...props
|
|
1677
|
+
}) => {
|
|
1678
|
+
if (variant === "active") {
|
|
1679
|
+
return /* @__PURE__ */ jsx18(StyledActiveChip, { ...props });
|
|
1680
|
+
}
|
|
1681
|
+
return /* @__PURE__ */ jsx18(StyledDefaultChip, { ...props });
|
|
1682
|
+
};
|
|
1683
|
+
|
|
1684
|
+
// src/components/feedback/Tooltip.tsx
|
|
1685
|
+
import MuiTooltip from "@mui/material/Tooltip";
|
|
1686
|
+
import { styled as styled13 } from "@mui/material/styles";
|
|
1687
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1688
|
+
var StyledTooltip = styled13(MuiTooltip)({
|
|
1689
|
+
"& .MuiTooltip-tooltip": {
|
|
1690
|
+
backgroundColor: colors.grey[800],
|
|
1691
|
+
color: "#FFFFFF",
|
|
1692
|
+
fontSize: "12px",
|
|
1693
|
+
padding: "8px 12px",
|
|
1694
|
+
borderRadius: "4px"
|
|
1695
|
+
},
|
|
1696
|
+
"& .MuiTooltip-arrow": {
|
|
1697
|
+
color: colors.grey[800]
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
var Tooltip2 = (props) => {
|
|
1701
|
+
return /* @__PURE__ */ jsx19(StyledTooltip, { ...props });
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
// src/components/feedback/Progress.tsx
|
|
1705
|
+
import {
|
|
1706
|
+
LinearProgress,
|
|
1707
|
+
CircularProgress,
|
|
1708
|
+
styled as styled14
|
|
1709
|
+
} from "@mui/material";
|
|
1710
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1711
|
+
var StyledLinearProgress = styled14(LinearProgress)({
|
|
1712
|
+
height: 4,
|
|
1713
|
+
borderRadius: 2,
|
|
1714
|
+
backgroundColor: colors.grey[200],
|
|
1715
|
+
"& .MuiLinearProgress-bar": {
|
|
1716
|
+
backgroundColor: colors.primary.main,
|
|
1717
|
+
borderRadius: 2
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
var StyledCircularProgress = styled14(CircularProgress)({
|
|
1721
|
+
color: colors.primary.main
|
|
1722
|
+
});
|
|
1723
|
+
var Progress = ({
|
|
1724
|
+
variant = "linear",
|
|
1725
|
+
value,
|
|
1726
|
+
size = 40,
|
|
1727
|
+
thickness = 4
|
|
1728
|
+
}) => {
|
|
1729
|
+
if (variant === "circular") {
|
|
1730
|
+
return /* @__PURE__ */ jsx20(StyledCircularProgress, { size, thickness });
|
|
1731
|
+
}
|
|
1732
|
+
return /* @__PURE__ */ jsx20(
|
|
1733
|
+
StyledLinearProgress,
|
|
1734
|
+
{
|
|
1735
|
+
variant: value !== void 0 ? "determinate" : "indeterminate",
|
|
1736
|
+
value
|
|
1737
|
+
}
|
|
1738
|
+
);
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
// src/components/navigation/Tab.tsx
|
|
1742
|
+
import MuiTab from "@mui/material/Tab";
|
|
1743
|
+
import { styled as styled15 } from "@mui/material/styles";
|
|
1744
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1745
|
+
var StyledTab = styled15(MuiTab)({
|
|
1746
|
+
textTransform: "none",
|
|
1747
|
+
minHeight: "48px",
|
|
1748
|
+
fontWeight: 400,
|
|
1749
|
+
color: colors.text.primary,
|
|
1750
|
+
borderBottom: "2px solid transparent",
|
|
1751
|
+
"&:hover": {
|
|
1752
|
+
color: colors.primary.main
|
|
1753
|
+
},
|
|
1754
|
+
"&.Mui-selected": {
|
|
1755
|
+
fontWeight: 600,
|
|
1756
|
+
color: colors.primary.main,
|
|
1757
|
+
borderBottom: `2px solid ${colors.primary.main}`
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1760
|
+
var Tab = ({
|
|
1761
|
+
badge,
|
|
1762
|
+
badgeVariant = "primary",
|
|
1763
|
+
label,
|
|
1764
|
+
...props
|
|
1765
|
+
}) => {
|
|
1766
|
+
const tabLabel = badge !== void 0 ? /* @__PURE__ */ jsx21(Badge, { variant: badgeVariant, badgeContent: badge, children: label }) : label;
|
|
1767
|
+
return /* @__PURE__ */ jsx21(StyledTab, { label: tabLabel, ...props });
|
|
1768
|
+
};
|
|
1769
|
+
|
|
1770
|
+
// src/components/navigation/Menu.tsx
|
|
1771
|
+
import {
|
|
1772
|
+
Menu as MuiMenu,
|
|
1773
|
+
MenuItem as MuiMenuItem,
|
|
1774
|
+
ListItemIcon as ListItemIcon2,
|
|
1775
|
+
ListItemText as ListItemText4,
|
|
1776
|
+
Divider
|
|
1777
|
+
} from "@mui/material";
|
|
1778
|
+
import { styled as styled16 } from "@mui/material/styles";
|
|
1779
|
+
import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1780
|
+
var StyledMenu = styled16(MuiMenu)({
|
|
1781
|
+
"& .MuiPaper-root": {
|
|
1782
|
+
borderRadius: 8,
|
|
1783
|
+
boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.15)",
|
|
1784
|
+
minWidth: 200
|
|
1785
|
+
},
|
|
1786
|
+
"& .MuiMenuItem-root": {
|
|
1787
|
+
padding: "8px 16px",
|
|
1788
|
+
"&:hover": {
|
|
1789
|
+
backgroundColor: colors.background.selected
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
var Menu3 = ({ anchorEl, onClose, children, ...props }) => {
|
|
1794
|
+
return /* @__PURE__ */ jsx22(
|
|
1795
|
+
StyledMenu,
|
|
1796
|
+
{
|
|
1797
|
+
anchorEl,
|
|
1798
|
+
open: Boolean(anchorEl),
|
|
1799
|
+
onClose,
|
|
1800
|
+
anchorOrigin: {
|
|
1801
|
+
vertical: "bottom",
|
|
1802
|
+
horizontal: "left"
|
|
1803
|
+
},
|
|
1804
|
+
transformOrigin: {
|
|
1805
|
+
vertical: "top",
|
|
1806
|
+
horizontal: "left"
|
|
1807
|
+
},
|
|
1808
|
+
...props,
|
|
1809
|
+
children
|
|
1810
|
+
}
|
|
1811
|
+
);
|
|
1812
|
+
};
|
|
1813
|
+
var MenuItem2 = ({
|
|
1814
|
+
icon,
|
|
1815
|
+
label,
|
|
1816
|
+
onClick,
|
|
1817
|
+
disabled = false,
|
|
1818
|
+
divider = false
|
|
1819
|
+
}) => {
|
|
1820
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1821
|
+
/* @__PURE__ */ jsxs6(MuiMenuItem, { onClick, disabled, children: [
|
|
1822
|
+
icon && /* @__PURE__ */ jsx22(ListItemIcon2, { children: icon }),
|
|
1823
|
+
/* @__PURE__ */ jsx22(ListItemText4, { children: label })
|
|
1824
|
+
] }),
|
|
1825
|
+
divider && /* @__PURE__ */ jsx22(Divider, {})
|
|
1826
|
+
] });
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1829
|
+
// src/components/navigation/Pagination.tsx
|
|
1830
|
+
import MuiPagination from "@mui/material/Pagination";
|
|
1831
|
+
import { styled as styled17 } from "@mui/material/styles";
|
|
1832
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1833
|
+
var StyledPagination = styled17(MuiPagination)({
|
|
1834
|
+
"& .MuiPaginationItem-root": {
|
|
1835
|
+
"&.Mui-selected": {
|
|
1836
|
+
backgroundColor: colors.primary.main,
|
|
1837
|
+
color: colors.primary.contrastText,
|
|
1838
|
+
"&:hover": {
|
|
1839
|
+
backgroundColor: colors.primary.light
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
"&:hover": {
|
|
1843
|
+
backgroundColor: colors.background.selected
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
var Pagination = ({ color = "primary", ...props }) => {
|
|
1848
|
+
return /* @__PURE__ */ jsx23(StyledPagination, { color, ...props });
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1851
|
+
// src/components/navigation/Selector.tsx
|
|
1852
|
+
import { useState as useState3 } from "react";
|
|
1853
|
+
import {
|
|
1854
|
+
Box as Box4,
|
|
1855
|
+
Typography as Typography3,
|
|
1856
|
+
Avatar as Avatar3,
|
|
1857
|
+
Menu as Menu4,
|
|
1858
|
+
InputAdornment as InputAdornment5,
|
|
1859
|
+
List as List4,
|
|
1860
|
+
ListItemButton as ListItemButton2,
|
|
1861
|
+
ListItemAvatar as ListItemAvatar3,
|
|
1862
|
+
ListItemText as ListItemText5,
|
|
1863
|
+
CircularProgress as CircularProgress2
|
|
1864
|
+
} from "@mui/material";
|
|
1865
|
+
import KeyboardArrowDownIcon3 from "@mui/icons-material/KeyboardArrowDown";
|
|
1866
|
+
import SearchIcon4 from "@mui/icons-material/Search";
|
|
1867
|
+
import AddIcon3 from "@mui/icons-material/Add";
|
|
1868
|
+
|
|
1869
|
+
// src/components/layout/Link.tsx
|
|
1870
|
+
import MuiLink from "@mui/material/Link";
|
|
1871
|
+
import { styled as styled18 } from "@mui/material/styles";
|
|
1872
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1873
|
+
var StyledLink = styled18(MuiLink)({
|
|
1874
|
+
color: colors.primary.main,
|
|
1875
|
+
"&:hover": {
|
|
1876
|
+
color: colors.primary.light
|
|
1877
|
+
}
|
|
1878
|
+
});
|
|
1879
|
+
var Link3 = ({ underline = "hover", ...props }) => {
|
|
1880
|
+
return /* @__PURE__ */ jsx24(StyledLink, { underline, ...props });
|
|
1881
|
+
};
|
|
1882
|
+
|
|
1883
|
+
// src/components/navigation/Selector.tsx
|
|
1884
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1885
|
+
var Selector = ({
|
|
1886
|
+
options,
|
|
1887
|
+
selectedId,
|
|
1888
|
+
onSelect,
|
|
1889
|
+
onCreate,
|
|
1890
|
+
loading = false,
|
|
1891
|
+
placeholder = "Select...",
|
|
1892
|
+
emptyMessage = "No items found",
|
|
1893
|
+
compact = false,
|
|
1894
|
+
renderSelected,
|
|
1895
|
+
width = 350
|
|
1896
|
+
}) => {
|
|
1897
|
+
const [anchorEl, setAnchorEl] = useState3(null);
|
|
1898
|
+
const [searchTerm, setSearchTerm] = useState3("");
|
|
1899
|
+
const open = Boolean(anchorEl);
|
|
1900
|
+
const selectedOption = options.find((opt) => opt.id === selectedId);
|
|
1901
|
+
const filteredOptions = options.filter(
|
|
1902
|
+
(opt) => opt.name.toLowerCase().includes(searchTerm.toLowerCase())
|
|
1903
|
+
);
|
|
1904
|
+
const handleOpen = (event) => {
|
|
1905
|
+
event.stopPropagation();
|
|
1906
|
+
setAnchorEl(event.currentTarget);
|
|
1907
|
+
};
|
|
1908
|
+
const handleClose = () => {
|
|
1909
|
+
setAnchorEl(null);
|
|
1910
|
+
setSearchTerm("");
|
|
1911
|
+
};
|
|
1912
|
+
const handleSelect = (id) => {
|
|
1913
|
+
onSelect(id);
|
|
1914
|
+
handleClose();
|
|
1915
|
+
};
|
|
1916
|
+
const defaultRenderSelected = (option) => /* @__PURE__ */ jsxs7(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1917
|
+
option.avatar ? /* @__PURE__ */ jsx25(Avatar3, { src: option.avatar, sx: { width: 20, height: 20 } }) : option.icon ? option.icon : /* @__PURE__ */ jsx25(Avatar3, { sx: { width: 20, height: 20, bgcolor: colors.primary.main, fontSize: "0.7rem" }, children: option.name.charAt(0) }),
|
|
1918
|
+
/* @__PURE__ */ jsx25(Typography3, { variant: "body2", children: option.name })
|
|
1919
|
+
] });
|
|
1920
|
+
if (compact) {
|
|
1921
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
1922
|
+
/* @__PURE__ */ jsx25(IconButton, { onClick: handleOpen, size: "small", children: selectedOption ? selectedOption.avatar ? /* @__PURE__ */ jsx25(Avatar3, { src: selectedOption.avatar, sx: { width: 32, height: 32 } }) : /* @__PURE__ */ jsx25(Avatar3, { sx: { width: 32, height: 32, bgcolor: colors.primary.main }, children: selectedOption.name.charAt(0) }) : /* @__PURE__ */ jsx25(Avatar3, { sx: { width: 32, height: 32, bgcolor: colors.grey[400] }, children: "?" }) }),
|
|
1923
|
+
/* @__PURE__ */ jsx25(
|
|
1924
|
+
Menu4,
|
|
1925
|
+
{
|
|
1926
|
+
anchorEl,
|
|
1927
|
+
open,
|
|
1928
|
+
onClose: handleClose,
|
|
1929
|
+
PaperProps: {
|
|
1930
|
+
sx: { width, maxHeight: 600, mt: 1 }
|
|
1931
|
+
},
|
|
1932
|
+
children: loading ? /* @__PURE__ */ jsx25(Box4, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx25(CircularProgress2, { size: 24 }) }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
1933
|
+
options.length > 5 && /* @__PURE__ */ jsx25(Box4, { sx: { p: 1, borderBottom: `1px solid ${colors.grey[200]}` }, children: /* @__PURE__ */ jsx25(
|
|
1934
|
+
TextField,
|
|
1935
|
+
{
|
|
1936
|
+
size: "small",
|
|
1937
|
+
fullWidth: true,
|
|
1938
|
+
placeholder: "Search...",
|
|
1939
|
+
value: searchTerm,
|
|
1940
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
1941
|
+
InputProps: {
|
|
1942
|
+
startAdornment: /* @__PURE__ */ jsx25(InputAdornment5, { position: "start", children: /* @__PURE__ */ jsx25(SearchIcon4, { fontSize: "small" }) })
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
) }),
|
|
1946
|
+
/* @__PURE__ */ jsxs7(List4, { sx: { maxHeight: 400, overflow: "auto" }, children: [
|
|
1947
|
+
filteredOptions.map((option) => /* @__PURE__ */ jsxs7(
|
|
1948
|
+
ListItemButton2,
|
|
1949
|
+
{
|
|
1950
|
+
selected: option.id === selectedId,
|
|
1951
|
+
onClick: () => handleSelect(option.id),
|
|
1952
|
+
disabled: option.disabled,
|
|
1953
|
+
children: [
|
|
1954
|
+
option.avatar ? /* @__PURE__ */ jsx25(ListItemAvatar3, { children: /* @__PURE__ */ jsx25(Avatar3, { src: option.avatar }) }) : option.icon ? /* @__PURE__ */ jsx25(ListItemAvatar3, { children: option.icon }) : /* @__PURE__ */ jsx25(ListItemAvatar3, { children: /* @__PURE__ */ jsx25(Avatar3, { sx: { bgcolor: colors.primary.main }, children: option.name.charAt(0) }) }),
|
|
1955
|
+
/* @__PURE__ */ jsx25(ListItemText5, { primary: option.name, secondary: option.description })
|
|
1956
|
+
]
|
|
1957
|
+
},
|
|
1958
|
+
option.id
|
|
1959
|
+
)),
|
|
1960
|
+
filteredOptions.length === 0 && /* @__PURE__ */ jsx25(Box4, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx25(Typography3, { variant: "body2", color: "text.secondary", children: emptyMessage }) })
|
|
1961
|
+
] }),
|
|
1962
|
+
onCreate && /* @__PURE__ */ jsx25(Box4, { sx: { p: 1, borderTop: `1px solid ${colors.grey[200]}` }, children: /* @__PURE__ */ jsx25(
|
|
1963
|
+
Button,
|
|
1964
|
+
{
|
|
1965
|
+
fullWidth: true,
|
|
1966
|
+
startIcon: /* @__PURE__ */ jsx25(AddIcon3, {}),
|
|
1967
|
+
onClick: () => {
|
|
1968
|
+
onCreate();
|
|
1969
|
+
handleClose();
|
|
1970
|
+
},
|
|
1971
|
+
children: "Create New"
|
|
1972
|
+
}
|
|
1973
|
+
) })
|
|
1974
|
+
] })
|
|
1975
|
+
}
|
|
1976
|
+
)
|
|
1977
|
+
] });
|
|
1978
|
+
}
|
|
1979
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
1980
|
+
/* @__PURE__ */ jsxs7(Box4, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
1981
|
+
selectedOption ? renderSelected ? /* @__PURE__ */ jsx25(Link3, { onClick: handleOpen, underline: "hover", children: renderSelected(selectedOption) }) : /* @__PURE__ */ jsx25(Link3, { onClick: handleOpen, underline: "hover", children: defaultRenderSelected(selectedOption) }) : /* @__PURE__ */ jsx25(Typography3, { variant: "body2", color: "text.secondary", children: placeholder }),
|
|
1982
|
+
/* @__PURE__ */ jsx25(IconButton, { onClick: handleOpen, size: "small", sx: { p: 0.2, ml: 0.5 }, children: /* @__PURE__ */ jsx25(KeyboardArrowDownIcon3, { fontSize: "small" }) })
|
|
1983
|
+
] }),
|
|
1984
|
+
/* @__PURE__ */ jsx25(
|
|
1985
|
+
Menu4,
|
|
1986
|
+
{
|
|
1987
|
+
anchorEl,
|
|
1988
|
+
open,
|
|
1989
|
+
onClose: handleClose,
|
|
1990
|
+
PaperProps: {
|
|
1991
|
+
sx: { width, maxHeight: 600, mt: 1 }
|
|
1992
|
+
},
|
|
1993
|
+
children: loading ? /* @__PURE__ */ jsx25(Box4, { sx: { display: "flex", justifyContent: "center", p: 2 }, children: /* @__PURE__ */ jsx25(CircularProgress2, { size: 24 }) }) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
1994
|
+
options.length > 5 && /* @__PURE__ */ jsx25(Box4, { sx: { p: 1, borderBottom: `1px solid ${colors.grey[200]}` }, children: /* @__PURE__ */ jsx25(
|
|
1995
|
+
TextField,
|
|
1996
|
+
{
|
|
1997
|
+
size: "small",
|
|
1998
|
+
fullWidth: true,
|
|
1999
|
+
placeholder: "Search...",
|
|
2000
|
+
value: searchTerm,
|
|
2001
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
2002
|
+
InputProps: {
|
|
2003
|
+
startAdornment: /* @__PURE__ */ jsx25(InputAdornment5, { position: "start", children: /* @__PURE__ */ jsx25(SearchIcon4, { fontSize: "small" }) })
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
) }),
|
|
2007
|
+
/* @__PURE__ */ jsxs7(List4, { sx: { maxHeight: 400, overflow: "auto" }, children: [
|
|
2008
|
+
filteredOptions.map((option) => /* @__PURE__ */ jsxs7(
|
|
2009
|
+
ListItemButton2,
|
|
2010
|
+
{
|
|
2011
|
+
selected: option.id === selectedId,
|
|
2012
|
+
onClick: () => handleSelect(option.id),
|
|
2013
|
+
disabled: option.disabled,
|
|
2014
|
+
children: [
|
|
2015
|
+
option.avatar ? /* @__PURE__ */ jsx25(ListItemAvatar3, { children: /* @__PURE__ */ jsx25(Avatar3, { src: option.avatar }) }) : option.icon ? /* @__PURE__ */ jsx25(ListItemAvatar3, { children: option.icon }) : /* @__PURE__ */ jsx25(ListItemAvatar3, { children: /* @__PURE__ */ jsx25(Avatar3, { sx: { bgcolor: colors.primary.main }, children: option.name.charAt(0) }) }),
|
|
2016
|
+
/* @__PURE__ */ jsx25(ListItemText5, { primary: option.name, secondary: option.description })
|
|
2017
|
+
]
|
|
2018
|
+
},
|
|
2019
|
+
option.id
|
|
2020
|
+
)),
|
|
2021
|
+
filteredOptions.length === 0 && /* @__PURE__ */ jsx25(Box4, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx25(Typography3, { variant: "body2", color: "text.secondary", children: emptyMessage }) })
|
|
2022
|
+
] }),
|
|
2023
|
+
onCreate && /* @__PURE__ */ jsx25(Box4, { sx: { p: 1, borderTop: `1px solid ${colors.grey[200]}` }, children: /* @__PURE__ */ jsx25(
|
|
2024
|
+
Button,
|
|
2025
|
+
{
|
|
2026
|
+
fullWidth: true,
|
|
2027
|
+
startIcon: /* @__PURE__ */ jsx25(AddIcon3, {}),
|
|
2028
|
+
onClick: () => {
|
|
2029
|
+
onCreate();
|
|
2030
|
+
handleClose();
|
|
2031
|
+
},
|
|
2032
|
+
children: "Create New"
|
|
2033
|
+
}
|
|
2034
|
+
) })
|
|
2035
|
+
] })
|
|
2036
|
+
}
|
|
2037
|
+
)
|
|
2038
|
+
] });
|
|
2039
|
+
};
|
|
2040
|
+
|
|
2041
|
+
// src/components/layout/Dialog.tsx
|
|
2042
|
+
import {
|
|
2043
|
+
Dialog as MuiDialog,
|
|
2044
|
+
DialogTitle,
|
|
2045
|
+
DialogContent,
|
|
2046
|
+
DialogActions,
|
|
2047
|
+
Button as Button4,
|
|
2048
|
+
IconButton as IconButton4,
|
|
2049
|
+
Box as Box5,
|
|
2050
|
+
Typography as Typography4,
|
|
2051
|
+
Divider as Divider2,
|
|
2052
|
+
CircularProgress as CircularProgress3
|
|
2053
|
+
} from "@mui/material";
|
|
2054
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
2055
|
+
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2056
|
+
var Dialog = ({
|
|
2057
|
+
open,
|
|
2058
|
+
title,
|
|
2059
|
+
onClose,
|
|
2060
|
+
onSubmit,
|
|
2061
|
+
submitLabel = "Save",
|
|
2062
|
+
cancelLabel = "Cancel",
|
|
2063
|
+
isLoading = false,
|
|
2064
|
+
disableSubmit = false,
|
|
2065
|
+
showActions = true,
|
|
2066
|
+
headerAction,
|
|
2067
|
+
fullWidth = true,
|
|
2068
|
+
maxWidth = "md",
|
|
2069
|
+
children,
|
|
2070
|
+
dividers = true,
|
|
2071
|
+
confirmBeforeClose = false,
|
|
2072
|
+
...dialogProps
|
|
2073
|
+
}) => {
|
|
2074
|
+
const handleCloseAttempt = (e) => {
|
|
2075
|
+
if (e) e.stopPropagation();
|
|
2076
|
+
onClose();
|
|
2077
|
+
};
|
|
2078
|
+
return /* @__PURE__ */ jsxs8(
|
|
2079
|
+
MuiDialog,
|
|
2080
|
+
{
|
|
2081
|
+
open,
|
|
2082
|
+
onClose: (_, reason) => {
|
|
2083
|
+
if (reason === "backdropClick" || reason === "escapeKeyDown" && !confirmBeforeClose) {
|
|
2084
|
+
onClose();
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
fullWidth,
|
|
2088
|
+
maxWidth,
|
|
2089
|
+
...dialogProps,
|
|
2090
|
+
PaperProps: {
|
|
2091
|
+
sx: { minHeight: dialogProps.fullScreen ? void 0 : "auto" },
|
|
2092
|
+
...dialogProps.PaperProps
|
|
2093
|
+
},
|
|
2094
|
+
children: [
|
|
2095
|
+
/* @__PURE__ */ jsxs8(DialogTitle, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", p: 2 }, children: [
|
|
2096
|
+
/* @__PURE__ */ jsx26(Box5, { sx: { display: "flex", alignItems: "center" }, children: typeof title === "string" ? /* @__PURE__ */ jsx26(Typography4, { variant: "h6", children: title }) : title }),
|
|
2097
|
+
/* @__PURE__ */ jsxs8(Box5, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
2098
|
+
headerAction,
|
|
2099
|
+
/* @__PURE__ */ jsx26(
|
|
2100
|
+
IconButton4,
|
|
2101
|
+
{
|
|
2102
|
+
edge: "end",
|
|
2103
|
+
color: "inherit",
|
|
2104
|
+
onClick: handleCloseAttempt,
|
|
2105
|
+
"aria-label": "close",
|
|
2106
|
+
children: /* @__PURE__ */ jsx26(CloseIcon, {})
|
|
2107
|
+
}
|
|
2108
|
+
)
|
|
2109
|
+
] })
|
|
2110
|
+
] }),
|
|
2111
|
+
dividers && /* @__PURE__ */ jsx26(Divider2, {}),
|
|
2112
|
+
/* @__PURE__ */ jsx26(DialogContent, { dividers, children }),
|
|
2113
|
+
showActions && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
2114
|
+
dividers && /* @__PURE__ */ jsx26(Divider2, {}),
|
|
2115
|
+
/* @__PURE__ */ jsxs8(DialogActions, { children: [
|
|
2116
|
+
/* @__PURE__ */ jsx26(
|
|
2117
|
+
Button4,
|
|
2118
|
+
{
|
|
2119
|
+
onClick: handleCloseAttempt,
|
|
2120
|
+
disabled: isLoading,
|
|
2121
|
+
children: cancelLabel
|
|
2122
|
+
}
|
|
2123
|
+
),
|
|
2124
|
+
onSubmit && /* @__PURE__ */ jsx26(
|
|
2125
|
+
Button4,
|
|
2126
|
+
{
|
|
2127
|
+
variant: "contained",
|
|
2128
|
+
color: "primary",
|
|
2129
|
+
onClick: onSubmit,
|
|
2130
|
+
disabled: disableSubmit || isLoading,
|
|
2131
|
+
startIcon: isLoading ? /* @__PURE__ */ jsx26(CircularProgress3, { size: 20 }) : void 0,
|
|
2132
|
+
children: submitLabel
|
|
2133
|
+
}
|
|
2134
|
+
)
|
|
2135
|
+
] })
|
|
2136
|
+
] })
|
|
2137
|
+
]
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
};
|
|
2141
|
+
|
|
2142
|
+
// src/components/layout/Drawer.tsx
|
|
2143
|
+
import MuiDrawer from "@mui/material/Drawer";
|
|
2144
|
+
import { styled as styled19 } from "@mui/material/styles";
|
|
2145
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2146
|
+
var StyledDrawer2 = styled19(MuiDrawer, {
|
|
2147
|
+
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed"
|
|
2148
|
+
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed }) => ({
|
|
2149
|
+
width: collapsed ? miniWidth : width,
|
|
2150
|
+
flexShrink: 0,
|
|
2151
|
+
"& .MuiDrawer-paper": {
|
|
2152
|
+
width: collapsed ? miniWidth : width,
|
|
2153
|
+
boxSizing: "border-box",
|
|
2154
|
+
boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
|
|
2155
|
+
transition: theme2.transitions.create("width", {
|
|
2156
|
+
easing: theme2.transitions.easing.sharp,
|
|
2157
|
+
duration: theme2.transitions.duration.enteringScreen
|
|
2158
|
+
}),
|
|
2159
|
+
overflow: collapsed ? "hidden" : "auto"
|
|
2160
|
+
}
|
|
2161
|
+
}));
|
|
2162
|
+
var Drawer2 = ({
|
|
2163
|
+
width = 240,
|
|
2164
|
+
miniWidth = 72,
|
|
2165
|
+
collapsed = false,
|
|
2166
|
+
...props
|
|
2167
|
+
}) => {
|
|
2168
|
+
return /* @__PURE__ */ jsx27(
|
|
2169
|
+
StyledDrawer2,
|
|
2170
|
+
{
|
|
2171
|
+
width,
|
|
2172
|
+
miniWidth,
|
|
2173
|
+
collapsed,
|
|
2174
|
+
...props
|
|
2175
|
+
}
|
|
2176
|
+
);
|
|
2177
|
+
};
|
|
2178
|
+
|
|
2179
|
+
// src/components/layout/Card.tsx
|
|
2180
|
+
import MuiCard from "@mui/material/Card";
|
|
2181
|
+
import MuiCardContent from "@mui/material/CardContent";
|
|
2182
|
+
import MuiCardHeader from "@mui/material/CardHeader";
|
|
2183
|
+
import MuiCardActions from "@mui/material/CardActions";
|
|
2184
|
+
import { styled as styled20 } from "@mui/material/styles";
|
|
2185
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2186
|
+
var StyledCard = styled20(MuiCard, {
|
|
2187
|
+
shouldForwardProp: (prop) => prop !== "hoverable" && prop !== "clickable"
|
|
2188
|
+
})(({ hoverable, clickable }) => ({
|
|
2189
|
+
borderRadius: 8,
|
|
2190
|
+
boxShadow: "0px 1px 3px rgba(0, 0, 0, 0.12)",
|
|
2191
|
+
transition: "all 0.2s ease-in-out",
|
|
2192
|
+
...clickable && {
|
|
2193
|
+
cursor: "pointer"
|
|
2194
|
+
},
|
|
2195
|
+
...hoverable && {
|
|
2196
|
+
"&:hover": {
|
|
2197
|
+
boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.15)",
|
|
2198
|
+
transform: "translateY(-2px)"
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}));
|
|
2202
|
+
var Card = ({ hoverable = false, clickable = false, children, ...props }) => {
|
|
2203
|
+
return /* @__PURE__ */ jsx28(StyledCard, { hoverable, clickable, ...props, children });
|
|
2204
|
+
};
|
|
2205
|
+
var CardContent = (props) => {
|
|
2206
|
+
return /* @__PURE__ */ jsx28(MuiCardContent, { ...props });
|
|
2207
|
+
};
|
|
2208
|
+
var CardHeader = (props) => {
|
|
2209
|
+
return /* @__PURE__ */ jsx28(MuiCardHeader, { ...props });
|
|
2210
|
+
};
|
|
2211
|
+
var CardActions = (props) => {
|
|
2212
|
+
return /* @__PURE__ */ jsx28(MuiCardActions, { ...props });
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
// src/components/layout/List.tsx
|
|
2216
|
+
import {
|
|
2217
|
+
List as MuiList,
|
|
2218
|
+
ListItem as MuiListItem,
|
|
2219
|
+
ListItemText as ListItemText6,
|
|
2220
|
+
ListItemIcon as ListItemIcon3,
|
|
2221
|
+
ListItemSecondaryAction
|
|
2222
|
+
} from "@mui/material";
|
|
2223
|
+
import { styled as styled21 } from "@mui/material/styles";
|
|
2224
|
+
import { jsx as jsx29, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2225
|
+
var List5 = (props) => {
|
|
2226
|
+
return /* @__PURE__ */ jsx29(MuiList, { ...props });
|
|
2227
|
+
};
|
|
2228
|
+
var StyledListItem = styled21(MuiListItem, {
|
|
2229
|
+
shouldForwardProp: (prop) => prop !== "hoverable"
|
|
2230
|
+
})(({ hoverable = true }) => ({
|
|
2231
|
+
border: `1px solid ${colors.grey[200]}`,
|
|
2232
|
+
borderRadius: 8,
|
|
2233
|
+
marginBottom: 8,
|
|
2234
|
+
...hoverable && {
|
|
2235
|
+
"&:hover": {
|
|
2236
|
+
backgroundColor: colors.grey[50]
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
}));
|
|
2240
|
+
var ListItem3 = ({
|
|
2241
|
+
primary,
|
|
2242
|
+
secondary,
|
|
2243
|
+
icon,
|
|
2244
|
+
action,
|
|
2245
|
+
hoverable = true,
|
|
2246
|
+
children,
|
|
2247
|
+
...props
|
|
2248
|
+
}) => {
|
|
2249
|
+
return /* @__PURE__ */ jsxs9(StyledListItem, { hoverable, ...props, children: [
|
|
2250
|
+
icon && /* @__PURE__ */ jsx29(ListItemIcon3, { children: icon }),
|
|
2251
|
+
(primary || secondary) && /* @__PURE__ */ jsx29(
|
|
2252
|
+
ListItemText6,
|
|
2253
|
+
{
|
|
2254
|
+
primary,
|
|
2255
|
+
secondary
|
|
2256
|
+
}
|
|
2257
|
+
),
|
|
2258
|
+
children,
|
|
2259
|
+
action && /* @__PURE__ */ jsx29(ListItemSecondaryAction, { children: action })
|
|
2260
|
+
] });
|
|
2261
|
+
};
|
|
2262
|
+
|
|
2263
|
+
// src/components/layout/Avatar.tsx
|
|
2264
|
+
import MuiAvatar from "@mui/material/Avatar";
|
|
2265
|
+
import { styled as styled22 } from "@mui/material/styles";
|
|
2266
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2267
|
+
var sizeMap = {
|
|
2268
|
+
small: 32,
|
|
2269
|
+
medium: 40,
|
|
2270
|
+
large: 56
|
|
2271
|
+
};
|
|
2272
|
+
var StyledAvatar = styled22(MuiAvatar, {
|
|
2273
|
+
shouldForwardProp: (prop) => prop !== "avatarSize"
|
|
2274
|
+
})(({ avatarSize = 40 }) => ({
|
|
2275
|
+
width: avatarSize,
|
|
2276
|
+
height: avatarSize,
|
|
2277
|
+
backgroundColor: colors.primary.main,
|
|
2278
|
+
color: colors.primary.contrastText,
|
|
2279
|
+
fontWeight: 600
|
|
2280
|
+
}));
|
|
2281
|
+
var Avatar4 = ({ size = "medium", ...props }) => {
|
|
2282
|
+
const avatarSize = typeof size === "number" ? size : sizeMap[size];
|
|
2283
|
+
return /* @__PURE__ */ jsx30(StyledAvatar, { avatarSize, ...props });
|
|
2284
|
+
};
|
|
2285
|
+
|
|
2286
|
+
// src/components/layout/Table.tsx
|
|
2287
|
+
import {
|
|
2288
|
+
Table as MuiTable,
|
|
2289
|
+
TableBody,
|
|
2290
|
+
TableCell,
|
|
2291
|
+
TableContainer,
|
|
2292
|
+
TableHead,
|
|
2293
|
+
TableRow,
|
|
2294
|
+
TableSortLabel
|
|
2295
|
+
} from "@mui/material";
|
|
2296
|
+
import { styled as styled23 } from "@mui/material/styles";
|
|
2297
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2298
|
+
var StyledTableContainer = styled23(TableContainer)({
|
|
2299
|
+
borderRadius: 8,
|
|
2300
|
+
border: `1px solid ${colors.grey[200]}`
|
|
2301
|
+
});
|
|
2302
|
+
var StyledTableHead = styled23(TableHead)({
|
|
2303
|
+
backgroundColor: colors.grey[50],
|
|
2304
|
+
"& .MuiTableCell-head": {
|
|
2305
|
+
fontWeight: 600,
|
|
2306
|
+
color: colors.text.primary
|
|
2307
|
+
}
|
|
2308
|
+
});
|
|
2309
|
+
var Table = ({ stickyHeader = false, children, ...props }) => {
|
|
2310
|
+
return /* @__PURE__ */ jsx31(StyledTableContainer, { children: /* @__PURE__ */ jsx31(MuiTable, { stickyHeader, ...props, children }) });
|
|
2311
|
+
};
|
|
2312
|
+
var TableHeader = ({
|
|
2313
|
+
columns,
|
|
2314
|
+
orderBy,
|
|
2315
|
+
order = "asc",
|
|
2316
|
+
onSort
|
|
2317
|
+
}) => {
|
|
2318
|
+
return /* @__PURE__ */ jsx31(StyledTableHead, { children: /* @__PURE__ */ jsx31(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx31(TableCell, { align: column.align || "left", children: column.sortable && onSort ? /* @__PURE__ */ jsx31(
|
|
2319
|
+
TableSortLabel,
|
|
2320
|
+
{
|
|
2321
|
+
active: orderBy === column.id,
|
|
2322
|
+
direction: orderBy === column.id ? order : "asc",
|
|
2323
|
+
onClick: () => onSort(column.id),
|
|
2324
|
+
children: column.label
|
|
2325
|
+
}
|
|
2326
|
+
) : column.label }, column.id)) }) });
|
|
2327
|
+
};
|
|
2328
|
+
|
|
2329
|
+
// src/components/layout/Grid.tsx
|
|
2330
|
+
import { Grid } from "@mui/material";
|
|
2331
|
+
|
|
2332
|
+
// src/components/layout/Breadcrumbs.tsx
|
|
2333
|
+
import MuiBreadcrumbs from "@mui/material/Breadcrumbs";
|
|
2334
|
+
import Link4 from "@mui/material/Link";
|
|
2335
|
+
import Typography5 from "@mui/material/Typography";
|
|
2336
|
+
import { styled as styled24 } from "@mui/material/styles";
|
|
2337
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2338
|
+
var StyledBreadcrumbs = styled24(MuiBreadcrumbs)({
|
|
2339
|
+
"& .MuiBreadcrumbs-ol": {
|
|
2340
|
+
flexWrap: "nowrap"
|
|
2341
|
+
},
|
|
2342
|
+
"& .MuiBreadcrumbs-separator": {
|
|
2343
|
+
color: colors.text.secondary
|
|
2344
|
+
}
|
|
2345
|
+
});
|
|
2346
|
+
var StyledLink2 = styled24(Link4)({
|
|
2347
|
+
color: colors.primary.main,
|
|
2348
|
+
textDecoration: "none",
|
|
2349
|
+
"&:hover": {
|
|
2350
|
+
textDecoration: "underline"
|
|
2351
|
+
}
|
|
2352
|
+
});
|
|
2353
|
+
var Breadcrumbs = ({ items, ...props }) => {
|
|
2354
|
+
return /* @__PURE__ */ jsx32(StyledBreadcrumbs, { ...props, children: items.map((item, index) => {
|
|
2355
|
+
const isLast = index === items.length - 1;
|
|
2356
|
+
if (isLast || !item.href && !item.onClick) {
|
|
2357
|
+
return /* @__PURE__ */ jsx32(Typography5, { color: "text.primary", children: item.label }, index);
|
|
2358
|
+
}
|
|
2359
|
+
return /* @__PURE__ */ jsx32(
|
|
2360
|
+
StyledLink2,
|
|
2361
|
+
{
|
|
2362
|
+
href: item.href,
|
|
2363
|
+
onClick: (e) => {
|
|
2364
|
+
if (item.onClick) {
|
|
2365
|
+
e.preventDefault();
|
|
2366
|
+
item.onClick();
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
children: item.label
|
|
2370
|
+
},
|
|
2371
|
+
index
|
|
2372
|
+
);
|
|
2373
|
+
}) });
|
|
2374
|
+
};
|
|
2375
|
+
|
|
2376
|
+
// src/components/layout/Accordion.tsx
|
|
2377
|
+
import {
|
|
2378
|
+
Accordion as MuiAccordion,
|
|
2379
|
+
AccordionSummary,
|
|
2380
|
+
AccordionDetails
|
|
2381
|
+
} from "@mui/material";
|
|
2382
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
2383
|
+
import { styled as styled25 } from "@mui/material/styles";
|
|
2384
|
+
import { jsx as jsx33, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2385
|
+
var StyledAccordion = styled25(MuiAccordion)({
|
|
2386
|
+
borderRadius: 8,
|
|
2387
|
+
boxShadow: "none",
|
|
2388
|
+
border: `1px solid ${colors.grey[200]}`,
|
|
2389
|
+
"&:before": {
|
|
2390
|
+
display: "none"
|
|
2391
|
+
},
|
|
2392
|
+
"&.Mui-expanded": {
|
|
2393
|
+
margin: 0
|
|
2394
|
+
}
|
|
2395
|
+
});
|
|
2396
|
+
var StyledAccordionSummary = styled25(AccordionSummary)({
|
|
2397
|
+
backgroundColor: colors.grey[50],
|
|
2398
|
+
borderRadius: "8px 8px 0 0",
|
|
2399
|
+
"&.Mui-expanded": {
|
|
2400
|
+
borderRadius: "8px 8px 0 0"
|
|
2401
|
+
},
|
|
2402
|
+
"& .MuiAccordionSummary-content": {
|
|
2403
|
+
margin: "12px 0"
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
var StyledAccordionDetails = styled25(AccordionDetails)({
|
|
2407
|
+
padding: "16px"
|
|
2408
|
+
});
|
|
2409
|
+
var Accordion = ({
|
|
2410
|
+
title,
|
|
2411
|
+
children,
|
|
2412
|
+
defaultExpanded = false,
|
|
2413
|
+
...props
|
|
2414
|
+
}) => {
|
|
2415
|
+
return /* @__PURE__ */ jsxs10(StyledAccordion, { defaultExpanded, ...props, children: [
|
|
2416
|
+
/* @__PURE__ */ jsx33(StyledAccordionSummary, { expandIcon: /* @__PURE__ */ jsx33(ExpandMoreIcon, {}), children: title }),
|
|
2417
|
+
/* @__PURE__ */ jsx33(StyledAccordionDetails, { children })
|
|
2418
|
+
] });
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
// src/components/layout/Paper.tsx
|
|
2422
|
+
import MuiPaper from "@mui/material/Paper";
|
|
2423
|
+
import { styled as styled26 } from "@mui/material/styles";
|
|
2424
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2425
|
+
var StyledPaper = styled26(MuiPaper)({
|
|
2426
|
+
borderRadius: 8,
|
|
2427
|
+
"&.MuiPaper-elevation": {
|
|
2428
|
+
boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.08)"
|
|
2429
|
+
},
|
|
2430
|
+
"&.MuiPaper-outlined": {
|
|
2431
|
+
border: `1px solid ${colors.grey[200]}`,
|
|
2432
|
+
boxShadow: "none"
|
|
2433
|
+
}
|
|
2434
|
+
});
|
|
2435
|
+
var Paper = ({ variant = "elevation", ...props }) => {
|
|
2436
|
+
return /* @__PURE__ */ jsx34(StyledPaper, { variant, elevation: variant === "elevation" ? 1 : 0, ...props });
|
|
2437
|
+
};
|
|
2438
|
+
|
|
2439
|
+
// src/components/layout/Divider.tsx
|
|
2440
|
+
import MuiDivider from "@mui/material/Divider";
|
|
2441
|
+
import { styled as styled27 } from "@mui/material/styles";
|
|
2442
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2443
|
+
var StyledDivider = styled27(MuiDivider)({
|
|
2444
|
+
borderColor: colors.grey[200]
|
|
2445
|
+
});
|
|
2446
|
+
var Divider3 = ({ ...props }) => {
|
|
2447
|
+
return /* @__PURE__ */ jsx35(StyledDivider, { ...props });
|
|
2448
|
+
};
|
|
2449
|
+
|
|
2450
|
+
// src/components/layout/Stack.tsx
|
|
2451
|
+
import { Stack } from "@mui/material";
|
|
2452
|
+
|
|
2453
|
+
// src/components/layout/Box.tsx
|
|
2454
|
+
import { Box as Box6 } from "@mui/material";
|
|
2455
|
+
|
|
2456
|
+
// src/components/layout/Typography.tsx
|
|
2457
|
+
import { Typography as Typography6 } from "@mui/material";
|
|
2458
|
+
|
|
2459
|
+
// src/components/layout/Container.tsx
|
|
2460
|
+
import { Container } from "@mui/material";
|
|
2461
|
+
|
|
2462
|
+
// src/components/layout/AppBar.tsx
|
|
2463
|
+
import {
|
|
2464
|
+
AppBar as MuiAppBar,
|
|
2465
|
+
Toolbar
|
|
2466
|
+
} from "@mui/material";
|
|
2467
|
+
import { styled as styled28 } from "@mui/material/styles";
|
|
2468
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2469
|
+
var StyledAppBar = styled28(MuiAppBar, {
|
|
2470
|
+
shouldForwardProp: (prop) => prop !== "appBarHeight"
|
|
2471
|
+
})(({ appBarHeight = 64 }) => ({
|
|
2472
|
+
backgroundColor: colors.background.paper,
|
|
2473
|
+
borderBottom: `1px solid ${colors.grey[200]}`,
|
|
2474
|
+
boxShadow: "none",
|
|
2475
|
+
height: appBarHeight,
|
|
2476
|
+
zIndex: 1300
|
|
2477
|
+
}));
|
|
2478
|
+
var StyledToolbar = styled28(Toolbar)(({ theme: theme2 }) => ({
|
|
2479
|
+
height: "100%",
|
|
2480
|
+
paddingLeft: theme2.spacing(2),
|
|
2481
|
+
paddingRight: theme2.spacing(2),
|
|
2482
|
+
gap: theme2.spacing(2)
|
|
2483
|
+
}));
|
|
2484
|
+
var AppBar = ({ height = 64, children, ...props }) => {
|
|
2485
|
+
return /* @__PURE__ */ jsx36(StyledAppBar, { position: "fixed", appBarHeight: height, ...props, children: /* @__PURE__ */ jsx36(StyledToolbar, { children }) });
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
// src/components/layout/Collapse.tsx
|
|
2489
|
+
import {
|
|
2490
|
+
Collapse as MuiCollapse
|
|
2491
|
+
} from "@mui/material";
|
|
2492
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2493
|
+
var Collapse = (props) => {
|
|
2494
|
+
return /* @__PURE__ */ jsx37(MuiCollapse, { ...props });
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
// src/components/feedback/Alert.tsx
|
|
2498
|
+
import MuiAlert from "@mui/material/Alert";
|
|
2499
|
+
import { AlertTitle as MuiAlertTitle } from "@mui/material";
|
|
2500
|
+
import MuiSnackbar from "@mui/material/Snackbar";
|
|
2501
|
+
import { styled as styled29 } from "@mui/material/styles";
|
|
2502
|
+
import { jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2503
|
+
var StyledAlert = styled29(MuiAlert)({
|
|
2504
|
+
borderRadius: 8,
|
|
2505
|
+
"&.MuiAlert-filled": {
|
|
2506
|
+
borderRadius: 8
|
|
2507
|
+
}
|
|
2508
|
+
});
|
|
2509
|
+
var Alert = ({
|
|
2510
|
+
severity = "info",
|
|
2511
|
+
title,
|
|
2512
|
+
children,
|
|
2513
|
+
...props
|
|
2514
|
+
}) => {
|
|
2515
|
+
return /* @__PURE__ */ jsxs11(StyledAlert, { severity, ...props, children: [
|
|
2516
|
+
title && /* @__PURE__ */ jsx38(MuiAlertTitle, { children: title }),
|
|
2517
|
+
children
|
|
2518
|
+
] });
|
|
2519
|
+
};
|
|
2520
|
+
var StyledSnackbar = styled29(MuiSnackbar)({});
|
|
2521
|
+
var Snackbar = ({
|
|
2522
|
+
message,
|
|
2523
|
+
severity = "info",
|
|
2524
|
+
title,
|
|
2525
|
+
variant = "filled",
|
|
2526
|
+
onClose,
|
|
2527
|
+
children,
|
|
2528
|
+
anchorOrigin = { vertical: "bottom", horizontal: "center" },
|
|
2529
|
+
autoHideDuration = 6e3,
|
|
2530
|
+
...props
|
|
2531
|
+
}) => {
|
|
2532
|
+
const content = children || (message ? /* @__PURE__ */ jsx38(
|
|
2533
|
+
Alert,
|
|
2534
|
+
{
|
|
2535
|
+
onClose,
|
|
2536
|
+
severity,
|
|
2537
|
+
variant,
|
|
2538
|
+
title,
|
|
2539
|
+
sx: { width: "100%", borderRadius: 2 },
|
|
2540
|
+
children: message
|
|
2541
|
+
}
|
|
2542
|
+
) : void 0);
|
|
2543
|
+
if (!content) {
|
|
2544
|
+
return null;
|
|
2545
|
+
}
|
|
2546
|
+
return /* @__PURE__ */ jsx38(
|
|
2547
|
+
StyledSnackbar,
|
|
2548
|
+
{
|
|
2549
|
+
anchorOrigin,
|
|
2550
|
+
autoHideDuration,
|
|
2551
|
+
onClose,
|
|
2552
|
+
...props,
|
|
2553
|
+
children: content
|
|
2554
|
+
}
|
|
2555
|
+
);
|
|
2556
|
+
};
|
|
2557
|
+
|
|
2558
|
+
// src/components/feedback/EmptyState.tsx
|
|
2559
|
+
import { Box as Box7, Typography as Typography7 } from "@mui/material";
|
|
2560
|
+
import { jsx as jsx39, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2561
|
+
var EmptyState = ({
|
|
2562
|
+
title = "No items found",
|
|
2563
|
+
description,
|
|
2564
|
+
icon,
|
|
2565
|
+
action
|
|
2566
|
+
}) => {
|
|
2567
|
+
return /* @__PURE__ */ jsxs12(
|
|
2568
|
+
Box7,
|
|
2569
|
+
{
|
|
2570
|
+
sx: {
|
|
2571
|
+
display: "flex",
|
|
2572
|
+
flexDirection: "column",
|
|
2573
|
+
alignItems: "center",
|
|
2574
|
+
justifyContent: "center",
|
|
2575
|
+
padding: 6,
|
|
2576
|
+
textAlign: "center",
|
|
2577
|
+
minHeight: 200
|
|
2578
|
+
},
|
|
2579
|
+
children: [
|
|
2580
|
+
icon && /* @__PURE__ */ jsx39(
|
|
2581
|
+
Box7,
|
|
2582
|
+
{
|
|
2583
|
+
sx: {
|
|
2584
|
+
color: colors.text.secondary,
|
|
2585
|
+
marginBottom: 2,
|
|
2586
|
+
fontSize: 64
|
|
2587
|
+
},
|
|
2588
|
+
children: icon
|
|
2589
|
+
}
|
|
2590
|
+
),
|
|
2591
|
+
/* @__PURE__ */ jsx39(Typography7, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
|
|
2592
|
+
description && /* @__PURE__ */ jsx39(Typography7, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
|
|
2593
|
+
action && /* @__PURE__ */ jsx39(Box7, { children: action })
|
|
2594
|
+
]
|
|
2595
|
+
}
|
|
2596
|
+
);
|
|
2597
|
+
};
|
|
2598
|
+
|
|
2599
|
+
// src/components/feedback/Loading.tsx
|
|
2600
|
+
import { Box as Box8, CircularProgress as CircularProgress4, Typography as Typography8 } from "@mui/material";
|
|
2601
|
+
import { jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2602
|
+
var Loading = ({
|
|
2603
|
+
message = "Loading...",
|
|
2604
|
+
size = 40,
|
|
2605
|
+
fullScreen = false
|
|
2606
|
+
}) => {
|
|
2607
|
+
const content = /* @__PURE__ */ jsxs13(
|
|
2608
|
+
Box8,
|
|
2609
|
+
{
|
|
2610
|
+
sx: {
|
|
2611
|
+
display: "flex",
|
|
2612
|
+
flexDirection: "column",
|
|
2613
|
+
justifyContent: "center",
|
|
2614
|
+
alignItems: "center",
|
|
2615
|
+
gap: 2,
|
|
2616
|
+
...fullScreen && {
|
|
2617
|
+
height: "100vh",
|
|
2618
|
+
width: "100vw",
|
|
2619
|
+
position: "fixed",
|
|
2620
|
+
top: 0,
|
|
2621
|
+
left: 0,
|
|
2622
|
+
backgroundColor: colors.background.default,
|
|
2623
|
+
zIndex: 9999
|
|
2624
|
+
},
|
|
2625
|
+
...!fullScreen && {
|
|
2626
|
+
padding: 4
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
children: [
|
|
2630
|
+
/* @__PURE__ */ jsx40(CircularProgress4, { size, thickness: 4 }),
|
|
2631
|
+
message && /* @__PURE__ */ jsx40(Typography8, { variant: "body2", color: "text.secondary", children: message })
|
|
2632
|
+
]
|
|
2633
|
+
}
|
|
2634
|
+
);
|
|
2635
|
+
return content;
|
|
2636
|
+
};
|
|
2637
|
+
|
|
2638
|
+
// src/components/feedback/AppLoading.tsx
|
|
2639
|
+
import { Box as Box9, CircularProgress as CircularProgress5, Typography as Typography9 } from "@mui/material";
|
|
2640
|
+
import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2641
|
+
var AppLoading = ({
|
|
2642
|
+
message = "Loading...",
|
|
2643
|
+
logo = "/icons/logo.png",
|
|
2644
|
+
sx = {}
|
|
2645
|
+
}) => {
|
|
2646
|
+
return /* @__PURE__ */ jsxs14(
|
|
2647
|
+
Box9,
|
|
2648
|
+
{
|
|
2649
|
+
sx: {
|
|
2650
|
+
display: "flex",
|
|
2651
|
+
flexDirection: "column",
|
|
2652
|
+
justifyContent: "center",
|
|
2653
|
+
alignItems: "center",
|
|
2654
|
+
height: "100vh",
|
|
2655
|
+
width: "100vw",
|
|
2656
|
+
position: "fixed",
|
|
2657
|
+
top: 0,
|
|
2658
|
+
left: 0,
|
|
2659
|
+
backgroundColor: "#f8f9fa",
|
|
2660
|
+
// Light background
|
|
2661
|
+
zIndex: 9999,
|
|
2662
|
+
...sx
|
|
2663
|
+
},
|
|
2664
|
+
children: [
|
|
2665
|
+
logo && /* @__PURE__ */ jsx41(
|
|
2666
|
+
Box9,
|
|
2667
|
+
{
|
|
2668
|
+
component: "img",
|
|
2669
|
+
src: logo,
|
|
2670
|
+
alt: "Logo",
|
|
2671
|
+
sx: {
|
|
2672
|
+
height: 80,
|
|
2673
|
+
width: "auto",
|
|
2674
|
+
mb: 4
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
),
|
|
2678
|
+
/* @__PURE__ */ jsx41(CircularProgress5, { size: 40, thickness: 4, sx: { mb: 2 } }),
|
|
2679
|
+
/* @__PURE__ */ jsx41(Typography9, { variant: "body1", color: "text.secondary", children: message })
|
|
2680
|
+
]
|
|
2681
|
+
}
|
|
2682
|
+
);
|
|
2683
|
+
};
|
|
2684
|
+
|
|
2685
|
+
// src/components/feedback/CircularProgress.tsx
|
|
2686
|
+
import {
|
|
2687
|
+
CircularProgress as MuiCircularProgress
|
|
2688
|
+
} from "@mui/material";
|
|
2689
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2690
|
+
var CircularProgress6 = ({
|
|
2691
|
+
size = 40,
|
|
2692
|
+
thickness = 4,
|
|
2693
|
+
...props
|
|
2694
|
+
}) => {
|
|
2695
|
+
return /* @__PURE__ */ jsx42(MuiCircularProgress, { size, thickness, ...props });
|
|
2696
|
+
};
|
|
2697
|
+
|
|
2698
|
+
// src/components/third-party/FlowEditor.tsx
|
|
2699
|
+
import { useCallback as useCallback3 } from "react";
|
|
2700
|
+
import ReactFlow, {
|
|
2701
|
+
Background,
|
|
2702
|
+
Controls,
|
|
2703
|
+
MiniMap,
|
|
2704
|
+
ReactFlowProvider,
|
|
2705
|
+
BackgroundVariant,
|
|
2706
|
+
ConnectionLineType
|
|
2707
|
+
} from "reactflow";
|
|
2708
|
+
import { Box as Box10 } from "@mui/material";
|
|
2709
|
+
import { useTheme } from "@mui/material/styles";
|
|
2710
|
+
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 jsxs15 } from "react/jsx-runtime";
|
|
2712
|
+
var FlowEditor = ({
|
|
2713
|
+
nodes,
|
|
2714
|
+
edges,
|
|
2715
|
+
onNodesChange,
|
|
2716
|
+
onEdgesChange,
|
|
2717
|
+
nodeTypes,
|
|
2718
|
+
edgeTypes,
|
|
2719
|
+
height = "600px",
|
|
2720
|
+
showBackground = true,
|
|
2721
|
+
backgroundVariant = BackgroundVariant.Dots,
|
|
2722
|
+
showControls = true,
|
|
2723
|
+
showMinimap = false,
|
|
2724
|
+
containerProps,
|
|
2725
|
+
onInit,
|
|
2726
|
+
...reactFlowProps
|
|
2727
|
+
}) => {
|
|
2728
|
+
const theme2 = useTheme();
|
|
2729
|
+
const handleInit = useCallback3(
|
|
2730
|
+
(instance) => {
|
|
2731
|
+
if (onInit) {
|
|
2732
|
+
onInit(instance);
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
[onInit]
|
|
2736
|
+
);
|
|
2737
|
+
return /* @__PURE__ */ jsx43(ReactFlowProvider, { children: /* @__PURE__ */ jsx43(
|
|
2738
|
+
Box10,
|
|
2739
|
+
{
|
|
2740
|
+
sx: {
|
|
2741
|
+
width: "100%",
|
|
2742
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
2743
|
+
border: `1px solid ${theme2.palette.divider}`,
|
|
2744
|
+
borderRadius: theme2.shape.borderRadius,
|
|
2745
|
+
overflow: "hidden",
|
|
2746
|
+
backgroundColor: theme2.palette.background.paper,
|
|
2747
|
+
...containerProps?.sx
|
|
2748
|
+
},
|
|
2749
|
+
...containerProps,
|
|
2750
|
+
children: /* @__PURE__ */ jsxs15(
|
|
2751
|
+
ReactFlow,
|
|
2752
|
+
{
|
|
2753
|
+
nodes,
|
|
2754
|
+
edges,
|
|
2755
|
+
onNodesChange,
|
|
2756
|
+
onEdgesChange,
|
|
2757
|
+
nodeTypes,
|
|
2758
|
+
edgeTypes,
|
|
2759
|
+
onInit: handleInit,
|
|
2760
|
+
connectionLineType: ConnectionLineType.SmoothStep,
|
|
2761
|
+
defaultEdgeOptions: {
|
|
2762
|
+
style: {
|
|
2763
|
+
stroke: theme2.palette.primary.main,
|
|
2764
|
+
strokeWidth: 2
|
|
2765
|
+
}
|
|
2766
|
+
},
|
|
2767
|
+
style: {
|
|
2768
|
+
backgroundColor: "transparent"
|
|
2769
|
+
},
|
|
2770
|
+
...reactFlowProps,
|
|
2771
|
+
children: [
|
|
2772
|
+
showBackground && /* @__PURE__ */ jsx43(
|
|
2773
|
+
Background,
|
|
2774
|
+
{
|
|
2775
|
+
variant: backgroundVariant,
|
|
2776
|
+
gap: 16,
|
|
2777
|
+
size: 1,
|
|
2778
|
+
color: theme2.palette.divider
|
|
2779
|
+
}
|
|
2780
|
+
),
|
|
2781
|
+
showControls && /* @__PURE__ */ jsx43(Controls, {}),
|
|
2782
|
+
showMinimap && /* @__PURE__ */ jsx43(
|
|
2783
|
+
MiniMap,
|
|
2784
|
+
{
|
|
2785
|
+
nodeColor: (node) => {
|
|
2786
|
+
const color = node.data?.color || theme2.palette.primary.main;
|
|
2787
|
+
return typeof color === "string" ? color : theme2.palette.primary.main;
|
|
2788
|
+
},
|
|
2789
|
+
nodeStrokeWidth: 3,
|
|
2790
|
+
nodeBorderRadius: 8,
|
|
2791
|
+
maskColor: `${theme2.palette.background.paper}80`,
|
|
2792
|
+
style: {
|
|
2793
|
+
backgroundColor: theme2.palette.background.paper
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
)
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
)
|
|
2800
|
+
}
|
|
2801
|
+
) });
|
|
2802
|
+
};
|
|
2803
|
+
|
|
2804
|
+
// src/components/third-party/CodeEditor.tsx
|
|
2805
|
+
import { useCallback as useCallback4, useEffect, useState as useState4, useRef } from "react";
|
|
2806
|
+
import Editor from "@monaco-editor/react";
|
|
2807
|
+
import { Box as Box11, IconButton as IconButton5, Tooltip as Tooltip3, Alert as Alert2 } from "@mui/material";
|
|
2808
|
+
import FullscreenIcon from "@mui/icons-material/Fullscreen";
|
|
2809
|
+
import FullscreenExitIcon from "@mui/icons-material/FullscreenExit";
|
|
2810
|
+
import { jsx as jsx44, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2811
|
+
var configureTypeScript = (monaco) => {
|
|
2812
|
+
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
|
|
2813
|
+
target: monaco.languages.typescript.ScriptTarget.ES2020,
|
|
2814
|
+
allowNonTsExtensions: true,
|
|
2815
|
+
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
|
|
2816
|
+
module: monaco.languages.typescript.ModuleKind.CommonJS,
|
|
2817
|
+
noEmit: false,
|
|
2818
|
+
lib: ["es2020", "dom"],
|
|
2819
|
+
noUnusedLocals: false,
|
|
2820
|
+
noUnusedParameters: false,
|
|
2821
|
+
noImplicitAny: false,
|
|
2822
|
+
noImplicitReturns: false,
|
|
2823
|
+
noFallthroughCasesInSwitch: false
|
|
2824
|
+
});
|
|
2825
|
+
monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
|
|
2826
|
+
noSemanticValidation: false,
|
|
2827
|
+
noSyntaxValidation: false,
|
|
2828
|
+
noSuggestionDiagnostics: true,
|
|
2829
|
+
diagnosticCodesToIgnore: [
|
|
2830
|
+
6133,
|
|
2831
|
+
// 'x' is declared but its value is never read
|
|
2832
|
+
6196
|
|
2833
|
+
// 'x' is declared but its value is never read (different variant)
|
|
2834
|
+
]
|
|
2835
|
+
});
|
|
2836
|
+
};
|
|
2837
|
+
var CodeEditor = ({
|
|
2838
|
+
value,
|
|
2839
|
+
onChange,
|
|
2840
|
+
language = "typescript",
|
|
2841
|
+
height = "400px",
|
|
2842
|
+
minHeight,
|
|
2843
|
+
theme: themeProp,
|
|
2844
|
+
lineNumbers = "on",
|
|
2845
|
+
options,
|
|
2846
|
+
onMount,
|
|
2847
|
+
onValidate,
|
|
2848
|
+
editorRef,
|
|
2849
|
+
monacoRef,
|
|
2850
|
+
onFullscreenChange,
|
|
2851
|
+
containerProps,
|
|
2852
|
+
typeDefinitions
|
|
2853
|
+
}) => {
|
|
2854
|
+
const [isEditorReady, setIsEditorReady] = useState4(false);
|
|
2855
|
+
const [validationErrors, setValidationErrors] = useState4([]);
|
|
2856
|
+
const [isFullscreen, setIsFullscreen] = useState4(false);
|
|
2857
|
+
const [tsCode, setTsCode] = useState4(value);
|
|
2858
|
+
const [actualHeight, setActualHeight] = useState4(
|
|
2859
|
+
typeof height === "number" ? `${height}px` : height
|
|
2860
|
+
);
|
|
2861
|
+
const internalEditorRef = useRef(null);
|
|
2862
|
+
const internalMonacoRef = useRef(null);
|
|
2863
|
+
const finalEditorRef = editorRef || internalEditorRef;
|
|
2864
|
+
const finalMonacoRef = monacoRef || internalMonacoRef;
|
|
2865
|
+
useEffect(() => {
|
|
2866
|
+
if (isFullscreen) {
|
|
2867
|
+
setActualHeight("100vh");
|
|
2868
|
+
} else {
|
|
2869
|
+
setActualHeight(typeof height === "number" ? `${height}px` : height);
|
|
2870
|
+
}
|
|
2871
|
+
}, [height, isFullscreen]);
|
|
2872
|
+
const toggleFullscreen = useCallback4(() => {
|
|
2873
|
+
const newFullscreenState = !isFullscreen;
|
|
2874
|
+
setIsFullscreen(newFullscreenState);
|
|
2875
|
+
if (onFullscreenChange) {
|
|
2876
|
+
onFullscreenChange(newFullscreenState);
|
|
2877
|
+
}
|
|
2878
|
+
}, [isFullscreen, onFullscreenChange]);
|
|
2879
|
+
useEffect(() => {
|
|
2880
|
+
if (!isFullscreen) return;
|
|
2881
|
+
function escapeHandler(event) {
|
|
2882
|
+
if (event.key === "Escape") {
|
|
2883
|
+
event.preventDefault();
|
|
2884
|
+
event.stopPropagation();
|
|
2885
|
+
setIsFullscreen(false);
|
|
2886
|
+
if (onFullscreenChange) {
|
|
2887
|
+
onFullscreenChange(false);
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
window.addEventListener("keydown", escapeHandler, { capture: true });
|
|
2892
|
+
return () => {
|
|
2893
|
+
window.removeEventListener("keydown", escapeHandler, { capture: true });
|
|
2894
|
+
};
|
|
2895
|
+
}, [isFullscreen, onFullscreenChange]);
|
|
2896
|
+
const handleEditorDidMount = useCallback4(
|
|
2897
|
+
(editor, monaco) => {
|
|
2898
|
+
console.log("CodeEditor: onMount called", { editor: !!editor, monaco: !!monaco });
|
|
2899
|
+
try {
|
|
2900
|
+
configureTypeScript(monaco);
|
|
2901
|
+
} catch (e) {
|
|
2902
|
+
console.error("CodeEditor: Failed to configure TypeScript", e);
|
|
2903
|
+
}
|
|
2904
|
+
if (finalEditorRef) {
|
|
2905
|
+
finalEditorRef.current = editor;
|
|
2906
|
+
}
|
|
2907
|
+
if (finalMonacoRef) {
|
|
2908
|
+
finalMonacoRef.current = monaco;
|
|
2909
|
+
}
|
|
2910
|
+
setIsEditorReady(true);
|
|
2911
|
+
console.log("CodeEditor: Editor ready");
|
|
2912
|
+
try {
|
|
2913
|
+
editor.addCommand(monaco.KeyCode.Escape, () => {
|
|
2914
|
+
if (isFullscreen) {
|
|
2915
|
+
setIsFullscreen(false);
|
|
2916
|
+
if (onFullscreenChange) {
|
|
2917
|
+
onFullscreenChange(false);
|
|
2918
|
+
}
|
|
2919
|
+
return true;
|
|
2920
|
+
}
|
|
2921
|
+
return false;
|
|
2922
|
+
});
|
|
2923
|
+
editor.onDidChangeModelDecorations(() => {
|
|
2924
|
+
const model2 = editor.getModel();
|
|
2925
|
+
if (model2 && onValidate) {
|
|
2926
|
+
const markers = monaco.editor.getModelMarkers({ resource: model2.uri });
|
|
2927
|
+
onValidate(markers);
|
|
2928
|
+
setValidationErrors(markers);
|
|
2929
|
+
}
|
|
2930
|
+
});
|
|
2931
|
+
const model = editor.getModel();
|
|
2932
|
+
if (model && onValidate) {
|
|
2933
|
+
const markers = monaco.editor.getModelMarkers({ resource: model.uri });
|
|
2934
|
+
onValidate(markers);
|
|
2935
|
+
setValidationErrors(markers);
|
|
2936
|
+
}
|
|
2937
|
+
} catch (e) {
|
|
2938
|
+
console.error("CodeEditor: Error setting up editor callbacks", e);
|
|
2939
|
+
}
|
|
2940
|
+
if (onMount) {
|
|
2941
|
+
try {
|
|
2942
|
+
onMount(editor, monaco);
|
|
2943
|
+
} catch (e) {
|
|
2944
|
+
console.error("CodeEditor: Error in custom onMount", e);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
},
|
|
2948
|
+
[isFullscreen, onFullscreenChange, onValidate, onMount, finalEditorRef, finalMonacoRef]
|
|
2949
|
+
);
|
|
2950
|
+
useEffect(() => {
|
|
2951
|
+
if (!isEditorReady || !finalMonacoRef?.current || !typeDefinitions) return;
|
|
2952
|
+
const monaco = finalMonacoRef.current;
|
|
2953
|
+
const definitions = Array.isArray(typeDefinitions) ? typeDefinitions : [typeDefinitions];
|
|
2954
|
+
const uris = [];
|
|
2955
|
+
try {
|
|
2956
|
+
definitions.forEach((def, index) => {
|
|
2957
|
+
if (def && def.trim()) {
|
|
2958
|
+
const uri = `ts:filename/custom-types-${index}.d.ts`;
|
|
2959
|
+
uris.push(uri);
|
|
2960
|
+
monaco.languages.typescript.typescriptDefaults.addExtraLib(def, uri);
|
|
2961
|
+
}
|
|
2962
|
+
});
|
|
2963
|
+
} catch (error) {
|
|
2964
|
+
console.error("CodeEditor: Error adding type definitions:", error);
|
|
2965
|
+
}
|
|
2966
|
+
}, [isEditorReady, finalMonacoRef, typeDefinitions]);
|
|
2967
|
+
const handleCodeChange = (newValue) => {
|
|
2968
|
+
const valueStr = newValue || "";
|
|
2969
|
+
setTsCode(valueStr);
|
|
2970
|
+
onChange(valueStr);
|
|
2971
|
+
};
|
|
2972
|
+
useEffect(() => {
|
|
2973
|
+
if (value !== tsCode) {
|
|
2974
|
+
setTsCode(value);
|
|
2975
|
+
if (isEditorReady && finalEditorRef?.current) {
|
|
2976
|
+
const editor = finalEditorRef.current;
|
|
2977
|
+
const currentValue = editor.getValue();
|
|
2978
|
+
if (currentValue !== value) {
|
|
2979
|
+
editor.setValue(value);
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
}, [value, tsCode, isEditorReady, finalEditorRef]);
|
|
2984
|
+
const editorMinHeight = minHeight ? typeof minHeight === "number" ? `${minHeight}px` : minHeight : "400px";
|
|
2985
|
+
const defaultOptions = {
|
|
2986
|
+
lineNumbers,
|
|
2987
|
+
minimap: { enabled: false },
|
|
2988
|
+
readOnly: false,
|
|
2989
|
+
wordWrap: "on",
|
|
2990
|
+
fontSize: 14,
|
|
2991
|
+
fontFamily: 'Monaco, Menlo, "Ubuntu Mono", Consolas, "source-code-pro", monospace',
|
|
2992
|
+
automaticLayout: true,
|
|
2993
|
+
scrollBeyondLastLine: false,
|
|
2994
|
+
theme: themeProp || "vs",
|
|
2995
|
+
...options
|
|
2996
|
+
};
|
|
2997
|
+
return /* @__PURE__ */ jsx44(
|
|
2998
|
+
Box11,
|
|
2999
|
+
{
|
|
3000
|
+
sx: {
|
|
3001
|
+
display: "flex",
|
|
3002
|
+
flexDirection: "column",
|
|
3003
|
+
height: "100%",
|
|
3004
|
+
minHeight: isFullscreen ? "100vh" : editorMinHeight,
|
|
3005
|
+
position: isFullscreen ? "fixed" : "relative",
|
|
3006
|
+
top: isFullscreen ? 0 : "auto",
|
|
3007
|
+
left: isFullscreen ? 0 : "auto",
|
|
3008
|
+
right: isFullscreen ? 0 : "auto",
|
|
3009
|
+
bottom: isFullscreen ? 0 : "auto",
|
|
3010
|
+
zIndex: isFullscreen ? 9999 : "auto",
|
|
3011
|
+
bgcolor: "background.paper",
|
|
3012
|
+
p: isFullscreen ? 2 : 0
|
|
3013
|
+
},
|
|
3014
|
+
children: /* @__PURE__ */ jsxs16(
|
|
3015
|
+
Box11,
|
|
3016
|
+
{
|
|
3017
|
+
sx: {
|
|
3018
|
+
flex: 1,
|
|
3019
|
+
border: 1,
|
|
3020
|
+
borderColor: validationErrors.length > 0 ? "error.main" : "divider",
|
|
3021
|
+
borderRadius: 1,
|
|
3022
|
+
minHeight: editorMinHeight,
|
|
3023
|
+
overflow: "hidden",
|
|
3024
|
+
position: "relative",
|
|
3025
|
+
display: "flex",
|
|
3026
|
+
flexDirection: "column"
|
|
3027
|
+
},
|
|
3028
|
+
...containerProps,
|
|
3029
|
+
children: [
|
|
3030
|
+
/* @__PURE__ */ jsx44(Tooltip3, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ jsx44(
|
|
3031
|
+
IconButton5,
|
|
3032
|
+
{
|
|
3033
|
+
onClick: toggleFullscreen,
|
|
3034
|
+
size: "small",
|
|
3035
|
+
sx: {
|
|
3036
|
+
position: "absolute",
|
|
3037
|
+
top: 8,
|
|
3038
|
+
right: 8,
|
|
3039
|
+
zIndex: 10,
|
|
3040
|
+
bgcolor: "rgba(255, 255, 255, 0.7)",
|
|
3041
|
+
"&:hover": {
|
|
3042
|
+
bgcolor: "rgba(255, 255, 255, 0.9)"
|
|
3043
|
+
},
|
|
3044
|
+
boxShadow: 1
|
|
3045
|
+
},
|
|
3046
|
+
children: isFullscreen ? /* @__PURE__ */ jsx44(FullscreenExitIcon, { fontSize: "small" }) : /* @__PURE__ */ jsx44(FullscreenIcon, { fontSize: "small" })
|
|
3047
|
+
}
|
|
3048
|
+
) }),
|
|
3049
|
+
/* @__PURE__ */ jsx44(
|
|
3050
|
+
Box11,
|
|
3051
|
+
{
|
|
3052
|
+
sx: {
|
|
3053
|
+
flex: 1,
|
|
3054
|
+
display: "flex",
|
|
3055
|
+
overflow: "hidden",
|
|
3056
|
+
minHeight: editorMinHeight,
|
|
3057
|
+
position: "relative"
|
|
3058
|
+
},
|
|
3059
|
+
children: /* @__PURE__ */ jsx44(
|
|
3060
|
+
Editor,
|
|
3061
|
+
{
|
|
3062
|
+
height: actualHeight,
|
|
3063
|
+
defaultLanguage: language,
|
|
3064
|
+
defaultValue: value,
|
|
3065
|
+
value: tsCode,
|
|
3066
|
+
onChange: handleCodeChange,
|
|
3067
|
+
onMount: handleEditorDidMount,
|
|
3068
|
+
theme: themeProp || "vs",
|
|
3069
|
+
options: defaultOptions,
|
|
3070
|
+
loading: /* @__PURE__ */ jsx44(Box11, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
|
|
3071
|
+
beforeMount: (monaco) => {
|
|
3072
|
+
console.log("CodeEditor: beforeMount called", { monaco: !!monaco });
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
)
|
|
3076
|
+
}
|
|
3077
|
+
),
|
|
3078
|
+
validationErrors.length > 0 && /* @__PURE__ */ jsxs16(
|
|
3079
|
+
Alert2,
|
|
3080
|
+
{
|
|
3081
|
+
severity: "error",
|
|
3082
|
+
sx: {
|
|
3083
|
+
position: "absolute",
|
|
3084
|
+
bottom: 8,
|
|
3085
|
+
left: 8,
|
|
3086
|
+
right: 8,
|
|
3087
|
+
zIndex: 20,
|
|
3088
|
+
boxShadow: 3,
|
|
3089
|
+
border: "1px solid",
|
|
3090
|
+
borderColor: "error.main",
|
|
3091
|
+
borderRadius: 1,
|
|
3092
|
+
maxHeight: "150px",
|
|
3093
|
+
overflow: "auto"
|
|
3094
|
+
},
|
|
3095
|
+
children: [
|
|
3096
|
+
/* @__PURE__ */ jsx44(Box11, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
|
|
3097
|
+
/* @__PURE__ */ jsxs16(Box11, { component: "ul", sx: { m: 0, pl: 2 }, children: [
|
|
3098
|
+
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ jsxs16(Box11, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3099
|
+
"Line ",
|
|
3100
|
+
error.startLineNumber,
|
|
3101
|
+
": ",
|
|
3102
|
+
error.message
|
|
3103
|
+
] }, index)),
|
|
3104
|
+
validationErrors.length > 3 && /* @__PURE__ */ jsxs16(Box11, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3105
|
+
validationErrors.length - 3,
|
|
3106
|
+
" more error",
|
|
3107
|
+
validationErrors.length - 3 > 1 ? "s" : "",
|
|
3108
|
+
"..."
|
|
3109
|
+
] })
|
|
3110
|
+
] })
|
|
3111
|
+
]
|
|
3112
|
+
}
|
|
3113
|
+
)
|
|
3114
|
+
]
|
|
3115
|
+
}
|
|
3116
|
+
)
|
|
3117
|
+
}
|
|
3118
|
+
);
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
// src/index.ts
|
|
3122
|
+
import { Panel as Panel2 } from "reactflow";
|
|
3123
|
+
export {
|
|
3124
|
+
Accordion,
|
|
3125
|
+
Alert,
|
|
3126
|
+
AppBar,
|
|
3127
|
+
AppLoading,
|
|
3128
|
+
Avatar4 as Avatar,
|
|
3129
|
+
Background2 as Background,
|
|
3130
|
+
BackgroundVariant2 as BackgroundVariant,
|
|
3131
|
+
Badge,
|
|
3132
|
+
Box6 as Box,
|
|
3133
|
+
Breadcrumbs,
|
|
3134
|
+
Button,
|
|
3135
|
+
ButtonGroup,
|
|
3136
|
+
Card,
|
|
3137
|
+
CardActions,
|
|
3138
|
+
CardContent,
|
|
3139
|
+
CardHeader,
|
|
3140
|
+
Checkbox,
|
|
3141
|
+
Chip2 as Chip,
|
|
3142
|
+
CircularProgress6 as CircularProgress,
|
|
3143
|
+
CodeEditor,
|
|
3144
|
+
Collapse,
|
|
3145
|
+
ConnectionLineType2 as ConnectionLineType,
|
|
3146
|
+
Container,
|
|
3147
|
+
Controls2 as Controls,
|
|
3148
|
+
Dialog,
|
|
3149
|
+
Divider3 as Divider,
|
|
3150
|
+
Drawer2 as Drawer,
|
|
3151
|
+
Dropdown,
|
|
3152
|
+
EmptyState,
|
|
3153
|
+
FlowEditor,
|
|
3154
|
+
FormControl,
|
|
3155
|
+
FormControlLabel,
|
|
3156
|
+
FormHelperText,
|
|
3157
|
+
FormLabel,
|
|
3158
|
+
Grid,
|
|
3159
|
+
IconButton,
|
|
3160
|
+
InputAdornment2 as InputAdornment,
|
|
3161
|
+
InputLabel,
|
|
3162
|
+
Link3 as Link,
|
|
3163
|
+
List5 as List,
|
|
3164
|
+
ListItem3 as ListItem,
|
|
3165
|
+
ListItemIcon3 as ListItemIcon,
|
|
3166
|
+
ListItemSecondaryAction,
|
|
3167
|
+
ListItemText6 as ListItemText,
|
|
3168
|
+
Loading,
|
|
3169
|
+
LoadingButton,
|
|
3170
|
+
Menu3 as Menu,
|
|
3171
|
+
MenuItem2 as MenuItem,
|
|
3172
|
+
MiniMap2 as MiniMap,
|
|
3173
|
+
Pagination,
|
|
3174
|
+
Panel2 as Panel,
|
|
3175
|
+
Paper,
|
|
3176
|
+
Progress,
|
|
3177
|
+
Radio,
|
|
3178
|
+
RadioGroup,
|
|
3179
|
+
SearchField,
|
|
3180
|
+
Selector,
|
|
3181
|
+
ServiceSelectorButton,
|
|
3182
|
+
Sidebar,
|
|
3183
|
+
SidebarItem,
|
|
3184
|
+
Snackbar,
|
|
3185
|
+
Stack,
|
|
3186
|
+
Step,
|
|
3187
|
+
StepButton,
|
|
3188
|
+
StepContent,
|
|
3189
|
+
StepLabel,
|
|
3190
|
+
Stepper,
|
|
3191
|
+
Switch,
|
|
3192
|
+
Tab,
|
|
3193
|
+
Table,
|
|
3194
|
+
TableHeader,
|
|
3195
|
+
TextField,
|
|
3196
|
+
ToggleButton,
|
|
3197
|
+
ToggleButtonGroup,
|
|
3198
|
+
Toolbar,
|
|
3199
|
+
Tooltip2 as Tooltip,
|
|
3200
|
+
Typography6 as Typography,
|
|
3201
|
+
WorkspaceSelectorButton,
|
|
3202
|
+
colors,
|
|
3203
|
+
theme
|
|
3204
|
+
};
|
|
3205
|
+
//# sourceMappingURL=index.mjs.map
|