@wso2/oxygen-ui 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/oxygen-component/SKILL.md +31 -3
- package/.claude/skills/oxygen-form/SKILL.md +21 -8
- package/.claude/skills/oxygen-layout/SKILL.md +170 -33
- package/dist/components/Header/HeaderToggle.d.ts +2 -2
- package/dist/components/ListingTable/ListingTable/ListingTable.d.ts +2 -1
- package/dist/components/ListingTable/ListingTable/ListingTableBody.d.ts +14 -2
- package/dist/components/ListingTable/index.d.ts +2 -1
- package/dist/components/ListingTable/shared/ListingTableFilter.d.ts +80 -0
- package/dist/components/ListingTable/shared/ListingTableFilterMenu.d.ts +47 -0
- package/dist/components/ListingTable/shared/index.d.ts +2 -0
- package/dist/components/RelativeTime/RelativeTime.d.ts +61 -0
- package/dist/components/RelativeTime/index.d.ts +2 -0
- package/dist/components/TimeRangeFilter/TimeRangeFilter.d.ts +185 -0
- package/dist/components/TimeRangeFilter/index.d.ts +2 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/index.js +1412 -718
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -205,6 +205,25 @@ var init_OxygenThemeBase = __esm({
|
|
|
205
205
|
})
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
|
+
MuiBreadcrumbs: {
|
|
209
|
+
styleOverrides: {
|
|
210
|
+
// Only the current (last) level is highlighted; parent levels are muted.
|
|
211
|
+
li: ({ theme }) => __spreadValues({
|
|
212
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
213
|
+
"&:last-child": {
|
|
214
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
215
|
+
fontWeight: theme.typography.fontWeightBold
|
|
216
|
+
}
|
|
217
|
+
}, theme.applyStyles("dark", {
|
|
218
|
+
"&:not(:last-child)": {
|
|
219
|
+
opacity: 0.7
|
|
220
|
+
}
|
|
221
|
+
})),
|
|
222
|
+
separator: ({ theme }) => ({
|
|
223
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
},
|
|
208
227
|
MuiCssBaseline: {
|
|
209
228
|
styleOverrides: {
|
|
210
229
|
// Honor the user's OS-level reduced-motion preference (WCAG 2.3.3):
|
|
@@ -472,7 +491,7 @@ var init_createOxygenTheme = __esm({
|
|
|
472
491
|
// package.json
|
|
473
492
|
var package_default = {
|
|
474
493
|
name: "@wso2/oxygen-ui",
|
|
475
|
-
version: "0.
|
|
494
|
+
version: "0.17.0",
|
|
476
495
|
description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
|
|
477
496
|
type: "module",
|
|
478
497
|
main: "./dist/index.js",
|
|
@@ -3258,9 +3277,62 @@ PageTitle.Link = PageTitleLink_default;
|
|
|
3258
3277
|
PageTitle.displayName = "PageTitle";
|
|
3259
3278
|
var PageTitle_default = PageTitle;
|
|
3260
3279
|
|
|
3280
|
+
// src/components/RelativeTime/RelativeTime.tsx
|
|
3281
|
+
import Box6 from "@mui/material/Box";
|
|
3282
|
+
import Tooltip2 from "@mui/material/Tooltip";
|
|
3283
|
+
import Typography5 from "@mui/material/Typography";
|
|
3284
|
+
import { Clock } from "@wso2/oxygen-ui-icons-react";
|
|
3285
|
+
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3286
|
+
var SIZES = {
|
|
3287
|
+
small: { variant: "caption", iconSize: 14, gap: 0.5 },
|
|
3288
|
+
medium: { variant: "body2", iconSize: 16, gap: 0.75 }
|
|
3289
|
+
};
|
|
3290
|
+
var RelativeTime = ({
|
|
3291
|
+
time,
|
|
3292
|
+
action,
|
|
3293
|
+
dateTime,
|
|
3294
|
+
tooltip,
|
|
3295
|
+
icon,
|
|
3296
|
+
hideIcon = false,
|
|
3297
|
+
size = "medium",
|
|
3298
|
+
sx
|
|
3299
|
+
}) => {
|
|
3300
|
+
const { variant, iconSize, gap } = SIZES[size];
|
|
3301
|
+
const content = /* @__PURE__ */ jsxs7(
|
|
3302
|
+
Box6,
|
|
3303
|
+
{
|
|
3304
|
+
sx: [
|
|
3305
|
+
{
|
|
3306
|
+
display: "inline-flex",
|
|
3307
|
+
alignItems: "center",
|
|
3308
|
+
gap,
|
|
3309
|
+
color: "text.secondary"
|
|
3310
|
+
},
|
|
3311
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
3312
|
+
],
|
|
3313
|
+
children: [
|
|
3314
|
+
!hideIcon && /* @__PURE__ */ jsx22(Box6, { "aria-hidden": "true", sx: { display: "inline-flex", flexShrink: 0 }, children: icon != null ? icon : /* @__PURE__ */ jsx22(Clock, { size: iconSize }) }),
|
|
3315
|
+
/* @__PURE__ */ jsxs7(Typography5, { variant, component: "span", color: "inherit", children: [
|
|
3316
|
+
action && /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
3317
|
+
action,
|
|
3318
|
+
" "
|
|
3319
|
+
] }),
|
|
3320
|
+
/* @__PURE__ */ jsx22("time", { dateTime, children: time })
|
|
3321
|
+
] })
|
|
3322
|
+
]
|
|
3323
|
+
}
|
|
3324
|
+
);
|
|
3325
|
+
if (!tooltip) {
|
|
3326
|
+
return content;
|
|
3327
|
+
}
|
|
3328
|
+
return /* @__PURE__ */ jsx22(Tooltip2, { title: tooltip, describeChild: true, children: /* @__PURE__ */ jsx22(Box6, { component: "span", tabIndex: 0, sx: { display: "inline-flex" }, children: content }) });
|
|
3329
|
+
};
|
|
3330
|
+
RelativeTime.displayName = "RelativeTime";
|
|
3331
|
+
var RelativeTime_default = RelativeTime;
|
|
3332
|
+
|
|
3261
3333
|
// src/components/StatCard/StatCard.tsx
|
|
3262
|
-
import { Card, CardContent, Box as
|
|
3263
|
-
import { jsx as
|
|
3334
|
+
import { Card, CardContent, Box as Box7, Typography as Typography6 } from "@mui/material";
|
|
3335
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3264
3336
|
var StatCard = (_a) => {
|
|
3265
3337
|
var _b = _a, {
|
|
3266
3338
|
value,
|
|
@@ -3273,18 +3345,18 @@ var StatCard = (_a) => {
|
|
|
3273
3345
|
"icon",
|
|
3274
3346
|
"iconColor"
|
|
3275
3347
|
]);
|
|
3276
|
-
return /* @__PURE__ */
|
|
3277
|
-
icon && /* @__PURE__ */
|
|
3278
|
-
|
|
3348
|
+
return /* @__PURE__ */ jsx23(Card, __spreadProps(__spreadValues({ variant: "outlined" }, props), { children: /* @__PURE__ */ jsx23(CardContent, { children: /* @__PURE__ */ jsxs8(Box7, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
|
|
3349
|
+
icon && /* @__PURE__ */ jsx23(
|
|
3350
|
+
Box7,
|
|
3279
3351
|
{
|
|
3280
3352
|
"aria-hidden": "true",
|
|
3281
3353
|
sx: { color: (theme) => theme.palette[iconColor].main, display: "flex", alignItems: "center" },
|
|
3282
3354
|
children: icon
|
|
3283
3355
|
}
|
|
3284
3356
|
),
|
|
3285
|
-
/* @__PURE__ */
|
|
3286
|
-
/* @__PURE__ */
|
|
3287
|
-
/* @__PURE__ */
|
|
3357
|
+
/* @__PURE__ */ jsxs8(Box7, { children: [
|
|
3358
|
+
/* @__PURE__ */ jsx23(Typography6, { variant: "h5", children: value }),
|
|
3359
|
+
/* @__PURE__ */ jsx23(Typography6, { variant: "body2", color: "text.secondary", children: label })
|
|
3288
3360
|
] })
|
|
3289
3361
|
] }) }) }));
|
|
3290
3362
|
};
|
|
@@ -3295,7 +3367,7 @@ var StatCard_default = StatCard;
|
|
|
3295
3367
|
import { useId as useId3 } from "react";
|
|
3296
3368
|
import { Select, MenuItem as MenuItem2, FormControl, InputLabel } from "@mui/material";
|
|
3297
3369
|
import { visuallyHidden as visuallyHidden2 } from "@mui/utils";
|
|
3298
|
-
import { jsx as
|
|
3370
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3299
3371
|
function ThemeSelect({
|
|
3300
3372
|
size = "small",
|
|
3301
3373
|
showLabel = false,
|
|
@@ -3308,23 +3380,23 @@ function ThemeSelect({
|
|
|
3308
3380
|
const handleChange = (event) => {
|
|
3309
3381
|
setTheme(event.target.value);
|
|
3310
3382
|
};
|
|
3311
|
-
return /* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3313
|
-
/* @__PURE__ */
|
|
3383
|
+
return /* @__PURE__ */ jsxs9(FormControl, { size, variant, sx: __spreadValues({ minWidth: 120 }, sx), children: [
|
|
3384
|
+
/* @__PURE__ */ jsx24(InputLabel, { id: labelId, sx: showLabel ? void 0 : visuallyHidden2, children: label }),
|
|
3385
|
+
/* @__PURE__ */ jsx24(
|
|
3314
3386
|
Select,
|
|
3315
3387
|
{
|
|
3316
3388
|
labelId,
|
|
3317
3389
|
value: currentTheme,
|
|
3318
3390
|
onChange: handleChange,
|
|
3319
3391
|
label,
|
|
3320
|
-
children: themes.map((themeOption) => /* @__PURE__ */
|
|
3392
|
+
children: themes.map((themeOption) => /* @__PURE__ */ jsx24(MenuItem2, { value: themeOption.key, children: themeOption.label }, themeOption.key))
|
|
3321
3393
|
}
|
|
3322
3394
|
)
|
|
3323
3395
|
] });
|
|
3324
3396
|
}
|
|
3325
3397
|
|
|
3326
3398
|
// src/components/ThemeSwitcher/ThemeSwitcher.tsx
|
|
3327
|
-
import { Fragment as
|
|
3399
|
+
import { Fragment as Fragment3, jsx as jsx25 } from "react/jsx-runtime";
|
|
3328
3400
|
function ThemeSwitcher({
|
|
3329
3401
|
children,
|
|
3330
3402
|
size,
|
|
@@ -3335,9 +3407,9 @@ function ThemeSwitcher({
|
|
|
3335
3407
|
}) {
|
|
3336
3408
|
const themeSwitcherContext = useThemeSwitcher();
|
|
3337
3409
|
if (children) {
|
|
3338
|
-
return /* @__PURE__ */
|
|
3410
|
+
return /* @__PURE__ */ jsx25(Fragment3, { children: children(themeSwitcherContext) });
|
|
3339
3411
|
}
|
|
3340
|
-
return /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ jsx25(
|
|
3341
3413
|
ThemeSelect,
|
|
3342
3414
|
{
|
|
3343
3415
|
size,
|
|
@@ -3349,31 +3421,365 @@ function ThemeSwitcher({
|
|
|
3349
3421
|
);
|
|
3350
3422
|
}
|
|
3351
3423
|
|
|
3424
|
+
// src/components/TimeRangeFilter/TimeRangeFilter.tsx
|
|
3425
|
+
import * as React6 from "react";
|
|
3426
|
+
import Alert from "@mui/material/Alert";
|
|
3427
|
+
import Box8 from "@mui/material/Box";
|
|
3428
|
+
import Button2 from "@mui/material/Button";
|
|
3429
|
+
import MenuItem3 from "@mui/material/MenuItem";
|
|
3430
|
+
import MenuList from "@mui/material/MenuList";
|
|
3431
|
+
import Popover from "@mui/material/Popover";
|
|
3432
|
+
import Stack from "@mui/material/Stack";
|
|
3433
|
+
import Typography7 from "@mui/material/Typography";
|
|
3434
|
+
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
3435
|
+
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
3436
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
3437
|
+
import { TimePicker } from "@mui/x-date-pickers/TimePicker";
|
|
3438
|
+
import { ChevronDown as ChevronDown2 } from "@wso2/oxygen-ui-icons-react";
|
|
3439
|
+
import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3440
|
+
var HOUR_MS = 60 * 60 * 1e3;
|
|
3441
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
3442
|
+
var DEFAULT_PRESETS = [
|
|
3443
|
+
{ id: "1h", label: "Last hour", durationMs: HOUR_MS },
|
|
3444
|
+
{ id: "24h", label: "Last 24 hours", durationMs: DAY_MS },
|
|
3445
|
+
{ id: "7d", label: "Last 7 days", durationMs: 7 * DAY_MS },
|
|
3446
|
+
{ id: "30d", label: "Last 30 days", durationMs: 30 * DAY_MS }
|
|
3447
|
+
];
|
|
3448
|
+
var CUSTOM_ID = "custom";
|
|
3449
|
+
var describeSpan = (ms) => {
|
|
3450
|
+
const unit = (count, name) => `${count} ${name}${count === 1 ? "" : "s"}`;
|
|
3451
|
+
if (ms % DAY_MS === 0) return unit(ms / DAY_MS, "day");
|
|
3452
|
+
if (ms % HOUR_MS === 0) return unit(ms / HOUR_MS, "hour");
|
|
3453
|
+
return unit(Math.max(1, Math.round(ms / 6e4)), "minute");
|
|
3454
|
+
};
|
|
3455
|
+
var PRESET_END_TOLERANCE_MS = 5 * 60 * 1e3;
|
|
3456
|
+
var solidPaperSx = (theme) => {
|
|
3457
|
+
var _a;
|
|
3458
|
+
const palette = ((_a = theme.vars) != null ? _a : theme).palette;
|
|
3459
|
+
const channel = palette.background.paperChannel;
|
|
3460
|
+
return {
|
|
3461
|
+
backgroundColor: channel ? `rgb(${channel})` : palette.background.default,
|
|
3462
|
+
backdropFilter: "none",
|
|
3463
|
+
WebkitBackdropFilter: "none"
|
|
3464
|
+
};
|
|
3465
|
+
};
|
|
3466
|
+
var toPickerDate = (date) => new Date(
|
|
3467
|
+
date.getUTCFullYear(),
|
|
3468
|
+
date.getUTCMonth(),
|
|
3469
|
+
date.getUTCDate(),
|
|
3470
|
+
date.getUTCHours(),
|
|
3471
|
+
date.getUTCMinutes(),
|
|
3472
|
+
date.getUTCSeconds()
|
|
3473
|
+
);
|
|
3474
|
+
var fromPickerDate = (date) => new Date(
|
|
3475
|
+
Date.UTC(
|
|
3476
|
+
date.getFullYear(),
|
|
3477
|
+
date.getMonth(),
|
|
3478
|
+
date.getDate(),
|
|
3479
|
+
date.getHours(),
|
|
3480
|
+
date.getMinutes(),
|
|
3481
|
+
date.getSeconds()
|
|
3482
|
+
)
|
|
3483
|
+
);
|
|
3484
|
+
var toRangeEnd = (date) => {
|
|
3485
|
+
const picker = toPickerDate(date);
|
|
3486
|
+
return { date: picker, time: picker };
|
|
3487
|
+
};
|
|
3488
|
+
var validDate = (date) => date && !Number.isNaN(date.getTime()) ? date : null;
|
|
3489
|
+
var TimeRangeFilter = React6.forwardRef(
|
|
3490
|
+
(_a, ref) => {
|
|
3491
|
+
var _b = _a, {
|
|
3492
|
+
value,
|
|
3493
|
+
onChange,
|
|
3494
|
+
presets = DEFAULT_PRESETS,
|
|
3495
|
+
maxRangeMs,
|
|
3496
|
+
label = "Time range",
|
|
3497
|
+
customRangeLabel = "Custom",
|
|
3498
|
+
panelTitle = "Select date range",
|
|
3499
|
+
fromLabel = "Start from (UTC)",
|
|
3500
|
+
untilLabel = "End on (UTC)",
|
|
3501
|
+
dateLabel = "Date",
|
|
3502
|
+
timeLabel = "Time",
|
|
3503
|
+
applyLabel = "Apply",
|
|
3504
|
+
cancelLabel = "Cancel",
|
|
3505
|
+
invalidRangeLabel = "Choose a valid time range.",
|
|
3506
|
+
rangeTooLongLabel,
|
|
3507
|
+
adapterLocale,
|
|
3508
|
+
localeText,
|
|
3509
|
+
dateFormat = "dd MMM, yyyy",
|
|
3510
|
+
timeFormat = "HH:mm:ss",
|
|
3511
|
+
open: openProp,
|
|
3512
|
+
onOpen,
|
|
3513
|
+
onClose,
|
|
3514
|
+
anchorEl,
|
|
3515
|
+
onClick,
|
|
3516
|
+
sx
|
|
3517
|
+
} = _b, buttonProps = __objRest(_b, [
|
|
3518
|
+
"value",
|
|
3519
|
+
"onChange",
|
|
3520
|
+
"presets",
|
|
3521
|
+
"maxRangeMs",
|
|
3522
|
+
"label",
|
|
3523
|
+
"customRangeLabel",
|
|
3524
|
+
"panelTitle",
|
|
3525
|
+
"fromLabel",
|
|
3526
|
+
"untilLabel",
|
|
3527
|
+
"dateLabel",
|
|
3528
|
+
"timeLabel",
|
|
3529
|
+
"applyLabel",
|
|
3530
|
+
"cancelLabel",
|
|
3531
|
+
"invalidRangeLabel",
|
|
3532
|
+
"rangeTooLongLabel",
|
|
3533
|
+
"adapterLocale",
|
|
3534
|
+
"localeText",
|
|
3535
|
+
"dateFormat",
|
|
3536
|
+
"timeFormat",
|
|
3537
|
+
"open",
|
|
3538
|
+
"onOpen",
|
|
3539
|
+
"onClose",
|
|
3540
|
+
"anchorEl",
|
|
3541
|
+
"onClick",
|
|
3542
|
+
"sx"
|
|
3543
|
+
]);
|
|
3544
|
+
var _a2, _b2;
|
|
3545
|
+
const panelId = React6.useId();
|
|
3546
|
+
const panelHeadingId = React6.useId();
|
|
3547
|
+
const fromHeadingId = React6.useId();
|
|
3548
|
+
const untilHeadingId = React6.useId();
|
|
3549
|
+
const triggerRef = React6.useRef(null);
|
|
3550
|
+
const setTriggerRef = (element) => {
|
|
3551
|
+
triggerRef.current = element;
|
|
3552
|
+
if (typeof ref === "function") ref(element);
|
|
3553
|
+
else if (ref) ref.current = element;
|
|
3554
|
+
};
|
|
3555
|
+
const [ownOpen, setOwnOpen] = React6.useState(false);
|
|
3556
|
+
const open = openProp != null ? openProp : ownOpen;
|
|
3557
|
+
const [customOpen, setCustomOpen] = React6.useState(false);
|
|
3558
|
+
const [selection, setSelection] = React6.useState(null);
|
|
3559
|
+
const [from, setFrom] = React6.useState({ date: null, time: null });
|
|
3560
|
+
const [until, setUntil] = React6.useState({ date: null, time: null });
|
|
3561
|
+
const [error, setError] = React6.useState("");
|
|
3562
|
+
const activeId = !value ? null : selection && selection.start === value.start.getTime() && selection.end === value.end.getTime() ? selection.id : (_b2 = (_a2 = presets.find(
|
|
3563
|
+
(preset) => preset.durationMs === value.end.getTime() - value.start.getTime() && Math.abs(Date.now() - value.end.getTime()) <= PRESET_END_TOLERANCE_MS
|
|
3564
|
+
)) == null ? void 0 : _a2.id) != null ? _b2 : CUSTOM_ID;
|
|
3565
|
+
const close = () => {
|
|
3566
|
+
if (openProp === void 0) setOwnOpen(false);
|
|
3567
|
+
onClose == null ? void 0 : onClose();
|
|
3568
|
+
};
|
|
3569
|
+
const prepare = () => {
|
|
3570
|
+
var _a3, _b3;
|
|
3571
|
+
const end = (_a3 = value == null ? void 0 : value.end) != null ? _a3 : /* @__PURE__ */ new Date();
|
|
3572
|
+
const start = (_b3 = value == null ? void 0 : value.start) != null ? _b3 : new Date(end.getTime() - DAY_MS);
|
|
3573
|
+
setFrom(toRangeEnd(start));
|
|
3574
|
+
setUntil(toRangeEnd(end));
|
|
3575
|
+
setError("");
|
|
3576
|
+
setCustomOpen(activeId === CUSTOM_ID);
|
|
3577
|
+
};
|
|
3578
|
+
const latestPrepare = React6.useRef(prepare);
|
|
3579
|
+
React6.useLayoutEffect(() => {
|
|
3580
|
+
latestPrepare.current = prepare;
|
|
3581
|
+
});
|
|
3582
|
+
const wasOpen = React6.useRef(false);
|
|
3583
|
+
React6.useLayoutEffect(() => {
|
|
3584
|
+
if (open && !wasOpen.current) latestPrepare.current();
|
|
3585
|
+
wasOpen.current = open;
|
|
3586
|
+
}, [open]);
|
|
3587
|
+
const editFrom = (next) => {
|
|
3588
|
+
setFrom(next);
|
|
3589
|
+
setError("");
|
|
3590
|
+
};
|
|
3591
|
+
const editUntil = (next) => {
|
|
3592
|
+
setUntil(next);
|
|
3593
|
+
setError("");
|
|
3594
|
+
};
|
|
3595
|
+
const applyPreset = (preset) => {
|
|
3596
|
+
const end = /* @__PURE__ */ new Date();
|
|
3597
|
+
const start = new Date(end.getTime() - preset.durationMs);
|
|
3598
|
+
setSelection({ id: preset.id, start: start.getTime(), end: end.getTime() });
|
|
3599
|
+
close();
|
|
3600
|
+
onChange({ start, end });
|
|
3601
|
+
};
|
|
3602
|
+
const instantOf = (rangeEnd2) => {
|
|
3603
|
+
const date = validDate(rangeEnd2.date);
|
|
3604
|
+
const time = validDate(rangeEnd2.time);
|
|
3605
|
+
if (!date || !time) return null;
|
|
3606
|
+
return fromPickerDate(
|
|
3607
|
+
new Date(
|
|
3608
|
+
date.getFullYear(),
|
|
3609
|
+
date.getMonth(),
|
|
3610
|
+
date.getDate(),
|
|
3611
|
+
time.getHours(),
|
|
3612
|
+
time.getMinutes(),
|
|
3613
|
+
time.getSeconds()
|
|
3614
|
+
)
|
|
3615
|
+
);
|
|
3616
|
+
};
|
|
3617
|
+
const applyCustomRange = () => {
|
|
3618
|
+
const start = instantOf(from);
|
|
3619
|
+
const end = instantOf(until);
|
|
3620
|
+
const span = start && end ? end.getTime() - start.getTime() : NaN;
|
|
3621
|
+
if (!start || !end || !Number.isFinite(span) || span <= 0) {
|
|
3622
|
+
setError(invalidRangeLabel);
|
|
3623
|
+
return;
|
|
3624
|
+
}
|
|
3625
|
+
if (maxRangeMs !== void 0 && span > maxRangeMs) {
|
|
3626
|
+
setError(rangeTooLongLabel != null ? rangeTooLongLabel : `Choose a range of at most ${describeSpan(maxRangeMs)}.`);
|
|
3627
|
+
return;
|
|
3628
|
+
}
|
|
3629
|
+
setError("");
|
|
3630
|
+
setSelection({ id: CUSTOM_ID, start: start.getTime(), end: end.getTime() });
|
|
3631
|
+
close();
|
|
3632
|
+
onChange({ start, end });
|
|
3633
|
+
};
|
|
3634
|
+
const rangeEnd = (heading, headingId, end, setEnd) => /* @__PURE__ */ jsxs10(Box8, { role: "group", "aria-labelledby": headingId, children: [
|
|
3635
|
+
/* @__PURE__ */ jsx26(Typography7, { id: headingId, variant: "body2", sx: { mb: 1 }, children: heading }),
|
|
3636
|
+
/* @__PURE__ */ jsxs10(Stack, { direction: "row", gap: 1, children: [
|
|
3637
|
+
/* @__PURE__ */ jsx26(
|
|
3638
|
+
DatePicker,
|
|
3639
|
+
{
|
|
3640
|
+
label: dateLabel,
|
|
3641
|
+
format: dateFormat,
|
|
3642
|
+
value: end.date,
|
|
3643
|
+
onChange: (next) => setEnd(__spreadProps(__spreadValues({}, end), { date: next })),
|
|
3644
|
+
slotProps: {
|
|
3645
|
+
textField: { size: "small", sx: { flex: 1, minWidth: 150 } },
|
|
3646
|
+
desktopPaper: { sx: solidPaperSx },
|
|
3647
|
+
mobilePaper: { sx: solidPaperSx }
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
),
|
|
3651
|
+
/* @__PURE__ */ jsx26(
|
|
3652
|
+
TimePicker,
|
|
3653
|
+
{
|
|
3654
|
+
label: timeLabel,
|
|
3655
|
+
ampm: false,
|
|
3656
|
+
views: ["hours", "minutes", "seconds"],
|
|
3657
|
+
format: timeFormat,
|
|
3658
|
+
value: end.time,
|
|
3659
|
+
onChange: (next) => setEnd(__spreadProps(__spreadValues({}, end), { time: next })),
|
|
3660
|
+
slotProps: {
|
|
3661
|
+
textField: { size: "small", sx: { width: 130 } },
|
|
3662
|
+
desktopPaper: { sx: solidPaperSx },
|
|
3663
|
+
mobilePaper: { sx: solidPaperSx }
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
)
|
|
3667
|
+
] })
|
|
3668
|
+
] });
|
|
3669
|
+
return /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
3670
|
+
/* @__PURE__ */ jsx26(
|
|
3671
|
+
Button2,
|
|
3672
|
+
__spreadProps(__spreadValues({
|
|
3673
|
+
size: "small",
|
|
3674
|
+
variant: "text",
|
|
3675
|
+
color: "inherit"
|
|
3676
|
+
}, buttonProps), {
|
|
3677
|
+
sx: [{ textTransform: "none" }, ...Array.isArray(sx) ? sx : [sx]],
|
|
3678
|
+
ref: setTriggerRef,
|
|
3679
|
+
"aria-haspopup": "dialog",
|
|
3680
|
+
"aria-expanded": open,
|
|
3681
|
+
endIcon: /* @__PURE__ */ jsx26(ChevronDown2, { size: 14 }),
|
|
3682
|
+
onClick: (event) => {
|
|
3683
|
+
onClick == null ? void 0 : onClick(event);
|
|
3684
|
+
if (openProp === void 0) setOwnOpen(true);
|
|
3685
|
+
onOpen == null ? void 0 : onOpen();
|
|
3686
|
+
},
|
|
3687
|
+
children: label
|
|
3688
|
+
})
|
|
3689
|
+
),
|
|
3690
|
+
/* @__PURE__ */ jsx26(
|
|
3691
|
+
Popover,
|
|
3692
|
+
{
|
|
3693
|
+
anchorEl: anchorEl != null ? anchorEl : triggerRef.current,
|
|
3694
|
+
open,
|
|
3695
|
+
onClose: close,
|
|
3696
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3697
|
+
slotProps: { paper: { sx: solidPaperSx, role: "dialog", "aria-label": label } },
|
|
3698
|
+
children: /* @__PURE__ */ jsxs10(Box8, { sx: { display: "flex", flexWrap: "wrap" }, children: [
|
|
3699
|
+
/* @__PURE__ */ jsxs10(MenuList, { "aria-label": label, autoFocusItem: open, sx: { minWidth: 180, py: 1, alignSelf: "flex-start" }, children: [
|
|
3700
|
+
presets.map((preset) => /* @__PURE__ */ jsx26(
|
|
3701
|
+
MenuItem3,
|
|
3702
|
+
{
|
|
3703
|
+
selected: activeId === preset.id && !customOpen,
|
|
3704
|
+
onClick: () => applyPreset(preset),
|
|
3705
|
+
children: preset.label
|
|
3706
|
+
},
|
|
3707
|
+
preset.id
|
|
3708
|
+
)),
|
|
3709
|
+
/* @__PURE__ */ jsx26(
|
|
3710
|
+
MenuItem3,
|
|
3711
|
+
{
|
|
3712
|
+
selected: activeId === CUSTOM_ID || customOpen,
|
|
3713
|
+
"aria-controls": customOpen ? panelId : void 0,
|
|
3714
|
+
"aria-expanded": customOpen,
|
|
3715
|
+
onClick: () => setCustomOpen(true),
|
|
3716
|
+
children: customRangeLabel
|
|
3717
|
+
}
|
|
3718
|
+
)
|
|
3719
|
+
] }),
|
|
3720
|
+
customOpen && /* @__PURE__ */ jsxs10(
|
|
3721
|
+
Stack,
|
|
3722
|
+
{
|
|
3723
|
+
id: panelId,
|
|
3724
|
+
role: "group",
|
|
3725
|
+
"aria-labelledby": panelHeadingId,
|
|
3726
|
+
gap: 2,
|
|
3727
|
+
sx: {
|
|
3728
|
+
p: 2,
|
|
3729
|
+
width: 380,
|
|
3730
|
+
maxWidth: "100%",
|
|
3731
|
+
borderTop: { xs: 1, sm: 0 },
|
|
3732
|
+
borderLeft: { xs: 0, sm: 1 },
|
|
3733
|
+
borderColor: "divider"
|
|
3734
|
+
},
|
|
3735
|
+
children: [
|
|
3736
|
+
/* @__PURE__ */ jsx26(Typography7, { id: panelHeadingId, variant: "subtitle2", children: panelTitle }),
|
|
3737
|
+
/* @__PURE__ */ jsxs10(LocalizationProvider, { dateAdapter: AdapterDateFns, adapterLocale, localeText, children: [
|
|
3738
|
+
rangeEnd(fromLabel, fromHeadingId, from, editFrom),
|
|
3739
|
+
rangeEnd(untilLabel, untilHeadingId, until, editUntil)
|
|
3740
|
+
] }),
|
|
3741
|
+
error && /* @__PURE__ */ jsx26(Alert, { severity: "error", children: error }),
|
|
3742
|
+
/* @__PURE__ */ jsxs10(Stack, { direction: "row", justifyContent: "flex-end", gap: 1, children: [
|
|
3743
|
+
/* @__PURE__ */ jsx26(Button2, { variant: "outlined", color: "inherit", onClick: close, sx: { textTransform: "none" }, children: cancelLabel }),
|
|
3744
|
+
/* @__PURE__ */ jsx26(Button2, { variant: "contained", onClick: applyCustomRange, sx: { textTransform: "none" }, children: applyLabel })
|
|
3745
|
+
] })
|
|
3746
|
+
]
|
|
3747
|
+
}
|
|
3748
|
+
)
|
|
3749
|
+
] })
|
|
3750
|
+
}
|
|
3751
|
+
)
|
|
3752
|
+
] });
|
|
3753
|
+
}
|
|
3754
|
+
);
|
|
3755
|
+
TimeRangeFilter.displayName = "TimeRangeFilter";
|
|
3756
|
+
var TimeRangeFilter_default = TimeRangeFilter;
|
|
3757
|
+
|
|
3352
3758
|
// src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
|
|
3353
|
-
import * as
|
|
3759
|
+
import * as React8 from "react";
|
|
3354
3760
|
import TextField2 from "@mui/material/TextField";
|
|
3355
3761
|
import InputAdornment2 from "@mui/material/InputAdornment";
|
|
3356
|
-
import
|
|
3762
|
+
import Box9 from "@mui/material/Box";
|
|
3357
3763
|
import IconButton2 from "@mui/material/IconButton";
|
|
3358
|
-
import
|
|
3359
|
-
import
|
|
3764
|
+
import Popover2 from "@mui/material/Popover";
|
|
3765
|
+
import Typography8 from "@mui/material/Typography";
|
|
3360
3766
|
import Divider from "@mui/material/Divider";
|
|
3361
|
-
import
|
|
3362
|
-
import
|
|
3767
|
+
import Button3 from "@mui/material/Button";
|
|
3768
|
+
import Stack2 from "@mui/material/Stack";
|
|
3363
3769
|
import FormControl2 from "@mui/material/FormControl";
|
|
3364
3770
|
import InputLabel2 from "@mui/material/InputLabel";
|
|
3365
3771
|
import Select2 from "@mui/material/Select";
|
|
3366
|
-
import
|
|
3772
|
+
import MenuItem4 from "@mui/material/MenuItem";
|
|
3367
3773
|
import { ListFilter } from "@wso2/oxygen-ui-icons-react";
|
|
3368
3774
|
|
|
3369
3775
|
// src/components/SearchBar/SearchBarBase.tsx
|
|
3370
|
-
import * as
|
|
3776
|
+
import * as React7 from "react";
|
|
3371
3777
|
import TextField from "@mui/material/TextField";
|
|
3372
3778
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
3373
3779
|
import { Search } from "@wso2/oxygen-ui-icons-react";
|
|
3374
|
-
import { jsx as
|
|
3780
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3375
3781
|
var hasMeaningfulAriaValue = (value) => typeof value === "string" && value.trim().length > 0;
|
|
3376
|
-
var SearchBarBase =
|
|
3782
|
+
var SearchBarBase = React7.forwardRef(function SearchBarBase2(_a, ref) {
|
|
3377
3783
|
var _b = _a, {
|
|
3378
3784
|
placeholder = "Search",
|
|
3379
3785
|
endAdornment,
|
|
@@ -3396,7 +3802,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3396
3802
|
const hasAccessibleName = hasMeaningfulLabel || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-label"]) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-labelledby"]);
|
|
3397
3803
|
const shouldInjectPlaceholderLabel = !hasAccessibleName && hasMeaningfulAriaValue(placeholder);
|
|
3398
3804
|
const htmlInput = shouldInjectPlaceholderLabel || (slotProps == null ? void 0 : slotProps.htmlInput) || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) ? __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, slotProps == null ? void 0 : slotProps.htmlInput), hasMeaningfulAriaValue(ariaLabelledBy) ? { "aria-labelledby": ariaLabelledBy } : null), hasMeaningfulAriaValue(ariaLabel) ? { "aria-label": ariaLabel } : null), shouldInjectPlaceholderLabel ? { "aria-label": placeholder } : null) : void 0;
|
|
3399
|
-
return /* @__PURE__ */
|
|
3805
|
+
return /* @__PURE__ */ jsx27(
|
|
3400
3806
|
TextField,
|
|
3401
3807
|
__spreadProps(__spreadValues({}, props), {
|
|
3402
3808
|
ref,
|
|
@@ -3406,7 +3812,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3406
3812
|
size: "small",
|
|
3407
3813
|
slotProps: __spreadProps(__spreadValues(__spreadValues({}, slotProps), htmlInput ? { htmlInput } : null), {
|
|
3408
3814
|
input: __spreadProps(__spreadValues({}, slotProps == null ? void 0 : slotProps.input), {
|
|
3409
|
-
startAdornment: /* @__PURE__ */
|
|
3815
|
+
startAdornment: /* @__PURE__ */ jsx27(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx27(Search, { fontSize: "small", "aria-hidden": "true" }) }),
|
|
3410
3816
|
endAdornment
|
|
3411
3817
|
})
|
|
3412
3818
|
}),
|
|
@@ -3423,7 +3829,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3423
3829
|
});
|
|
3424
3830
|
|
|
3425
3831
|
// src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
|
|
3426
|
-
import { Fragment as
|
|
3832
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3427
3833
|
function SearchBarWithAdvancedFilter(_a) {
|
|
3428
3834
|
var _b = _a, {
|
|
3429
3835
|
value,
|
|
@@ -3450,7 +3856,7 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3450
3856
|
"popoverWidth",
|
|
3451
3857
|
"sx"
|
|
3452
3858
|
]);
|
|
3453
|
-
const [anchorEl, setAnchorEl] =
|
|
3859
|
+
const [anchorEl, setAnchorEl] = React8.useState(null);
|
|
3454
3860
|
const open = Boolean(anchorEl);
|
|
3455
3861
|
const handleInputChange = (e) => {
|
|
3456
3862
|
onChange(e.target.value);
|
|
@@ -3476,17 +3882,17 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3476
3882
|
handleClose();
|
|
3477
3883
|
};
|
|
3478
3884
|
const popoverId = open ? "advanced-search-popover" : void 0;
|
|
3479
|
-
return /* @__PURE__ */
|
|
3480
|
-
/* @__PURE__ */
|
|
3885
|
+
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
3886
|
+
/* @__PURE__ */ jsx28(
|
|
3481
3887
|
SearchBarBase,
|
|
3482
3888
|
__spreadProps(__spreadValues({}, props), {
|
|
3483
3889
|
value,
|
|
3484
3890
|
onChange: handleInputChange,
|
|
3485
3891
|
placeholder,
|
|
3486
3892
|
sx,
|
|
3487
|
-
endAdornment: /* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
/* @__PURE__ */
|
|
3893
|
+
endAdornment: /* @__PURE__ */ jsx28(InputAdornment2, { position: "end", sx: { m: 0 }, children: /* @__PURE__ */ jsxs11(Box9, { sx: { display: "flex", alignItems: "center", height: "100%" }, children: [
|
|
3894
|
+
/* @__PURE__ */ jsx28(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 0.5 } }),
|
|
3895
|
+
/* @__PURE__ */ jsx28(
|
|
3490
3896
|
IconButton2,
|
|
3491
3897
|
{
|
|
3492
3898
|
"aria-describedby": popoverId,
|
|
@@ -3494,14 +3900,14 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3494
3900
|
onClick: handleOpen,
|
|
3495
3901
|
size: "small",
|
|
3496
3902
|
sx: { mx: 0.5 },
|
|
3497
|
-
children: /* @__PURE__ */
|
|
3903
|
+
children: /* @__PURE__ */ jsx28(ListFilter, { fontSize: "tiny" })
|
|
3498
3904
|
}
|
|
3499
3905
|
)
|
|
3500
3906
|
] }) })
|
|
3501
3907
|
})
|
|
3502
3908
|
),
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
|
|
3909
|
+
/* @__PURE__ */ jsxs11(
|
|
3910
|
+
Popover2,
|
|
3505
3911
|
{
|
|
3506
3912
|
id: popoverId,
|
|
3507
3913
|
open,
|
|
@@ -3517,45 +3923,45 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3517
3923
|
}
|
|
3518
3924
|
},
|
|
3519
3925
|
children: [
|
|
3520
|
-
/* @__PURE__ */
|
|
3521
|
-
/* @__PURE__ */
|
|
3522
|
-
/* @__PURE__ */
|
|
3523
|
-
/* @__PURE__ */
|
|
3524
|
-
/* @__PURE__ */
|
|
3926
|
+
/* @__PURE__ */ jsx28(Typography8, { variant: "subtitle2", sx: { fontWeight: 600 }, children: "Advanced search" }),
|
|
3927
|
+
/* @__PURE__ */ jsx28(Divider, { sx: { my: 1 } }),
|
|
3928
|
+
/* @__PURE__ */ jsxs11(Stack2, { spacing: 2, marginTop: 2, children: [
|
|
3929
|
+
/* @__PURE__ */ jsxs11(FormControl2, { fullWidth: true, size: "small", children: [
|
|
3930
|
+
/* @__PURE__ */ jsxs11(InputLabel2, { id: "adv-filter-attribute-label", children: [
|
|
3525
3931
|
"Filter attribute",
|
|
3526
3932
|
" ",
|
|
3527
|
-
/* @__PURE__ */
|
|
3933
|
+
/* @__PURE__ */ jsx28(Box9, { component: "span", sx: { color: "error.main" }, children: "*" })
|
|
3528
3934
|
] }),
|
|
3529
|
-
/* @__PURE__ */
|
|
3935
|
+
/* @__PURE__ */ jsx28(
|
|
3530
3936
|
Select2,
|
|
3531
3937
|
{
|
|
3532
3938
|
labelId: "adv-filter-attribute-label",
|
|
3533
3939
|
value: advancedFilter.attribute,
|
|
3534
3940
|
label: "Filter attribute *",
|
|
3535
3941
|
onChange: handleAttrChange,
|
|
3536
|
-
children: attributeOptions.map((opt) => /* @__PURE__ */
|
|
3942
|
+
children: attributeOptions.map((opt) => /* @__PURE__ */ jsx28(MenuItem4, { value: opt.value, children: opt.label }, opt.value))
|
|
3537
3943
|
}
|
|
3538
3944
|
)
|
|
3539
3945
|
] }),
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
/* @__PURE__ */
|
|
3542
|
-
/* @__PURE__ */
|
|
3946
|
+
/* @__PURE__ */ jsxs11(Box9, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 2 }, children: [
|
|
3947
|
+
/* @__PURE__ */ jsxs11(FormControl2, { fullWidth: true, size: "small", children: [
|
|
3948
|
+
/* @__PURE__ */ jsxs11(InputLabel2, { id: "adv-filter-condition-label", children: [
|
|
3543
3949
|
"Filter condition",
|
|
3544
3950
|
" ",
|
|
3545
|
-
/* @__PURE__ */
|
|
3951
|
+
/* @__PURE__ */ jsx28(Box9, { component: "span", sx: { color: "error.main" }, children: "*" })
|
|
3546
3952
|
] }),
|
|
3547
|
-
/* @__PURE__ */
|
|
3953
|
+
/* @__PURE__ */ jsx28(
|
|
3548
3954
|
Select2,
|
|
3549
3955
|
{
|
|
3550
3956
|
labelId: "adv-filter-condition-label",
|
|
3551
3957
|
value: advancedFilter.condition,
|
|
3552
3958
|
label: "Filter condition *",
|
|
3553
3959
|
onChange: handleCondChange,
|
|
3554
|
-
children: conditionOptions.map((opt) => /* @__PURE__ */
|
|
3960
|
+
children: conditionOptions.map((opt) => /* @__PURE__ */ jsx28(MenuItem4, { value: opt.value, children: opt.label }, opt.value))
|
|
3555
3961
|
}
|
|
3556
3962
|
)
|
|
3557
3963
|
] }),
|
|
3558
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsx28(
|
|
3559
3965
|
TextField2,
|
|
3560
3966
|
{
|
|
3561
3967
|
size: "small",
|
|
@@ -3567,8 +3973,8 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3567
3973
|
}
|
|
3568
3974
|
)
|
|
3569
3975
|
] }),
|
|
3570
|
-
/* @__PURE__ */
|
|
3571
|
-
|
|
3976
|
+
/* @__PURE__ */ jsx28(Box9, { sx: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ jsx28(
|
|
3977
|
+
Button3,
|
|
3572
3978
|
{
|
|
3573
3979
|
variant: "contained",
|
|
3574
3980
|
onClick: handleAdvancedSearch,
|
|
@@ -3586,11 +3992,11 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3586
3992
|
var SearchBarWithAdvancedFilter_default = SearchBarWithAdvancedFilter;
|
|
3587
3993
|
|
|
3588
3994
|
// src/components/SearchBar/SearchBar.tsx
|
|
3589
|
-
import * as
|
|
3590
|
-
import { jsx as
|
|
3591
|
-
var SearchBar =
|
|
3995
|
+
import * as React9 from "react";
|
|
3996
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3997
|
+
var SearchBar = React9.forwardRef(function SearchBar2(_a, ref) {
|
|
3592
3998
|
var _b = _a, { placeholder = "Search" } = _b, props = __objRest(_b, ["placeholder"]);
|
|
3593
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ jsx29(
|
|
3594
4000
|
SearchBarBase,
|
|
3595
4001
|
__spreadProps(__spreadValues({}, props), {
|
|
3596
4002
|
ref,
|
|
@@ -3601,17 +4007,17 @@ var SearchBar = React8.forwardRef(function SearchBar2(_a, ref) {
|
|
|
3601
4007
|
var SearchBar_default = SearchBar;
|
|
3602
4008
|
|
|
3603
4009
|
// src/components/Header/Header.tsx
|
|
3604
|
-
import * as
|
|
4010
|
+
import * as React13 from "react";
|
|
3605
4011
|
import AppBar from "@mui/material/AppBar";
|
|
3606
4012
|
import Toolbar from "@mui/material/Toolbar";
|
|
3607
|
-
import
|
|
4013
|
+
import Box14 from "@mui/material/Box";
|
|
3608
4014
|
import { styled as styled22 } from "@mui/material/styles";
|
|
3609
4015
|
|
|
3610
4016
|
// src/components/Header/context.ts
|
|
3611
|
-
import * as
|
|
3612
|
-
var HeaderContext =
|
|
4017
|
+
import * as React10 from "react";
|
|
4018
|
+
var HeaderContext = React10.createContext(null);
|
|
3613
4019
|
var useHeader = () => {
|
|
3614
|
-
const context =
|
|
4020
|
+
const context = React10.useContext(HeaderContext);
|
|
3615
4021
|
if (!context) {
|
|
3616
4022
|
throw new Error("Header compound components must be used within Header");
|
|
3617
4023
|
}
|
|
@@ -3619,26 +4025,26 @@ var useHeader = () => {
|
|
|
3619
4025
|
};
|
|
3620
4026
|
|
|
3621
4027
|
// src/components/Header/HeaderToggle.tsx
|
|
3622
|
-
import * as
|
|
4028
|
+
import * as React12 from "react";
|
|
3623
4029
|
import IconButton3 from "@mui/material/IconButton";
|
|
3624
|
-
import
|
|
4030
|
+
import Tooltip3 from "@mui/material/Tooltip";
|
|
3625
4031
|
import { styled as styled16 } from "@mui/material/styles";
|
|
3626
|
-
import { Menu as Menu2
|
|
4032
|
+
import { Menu as Menu2 } from "@wso2/oxygen-ui-icons-react";
|
|
3627
4033
|
|
|
3628
4034
|
// src/components/AppShell/context.tsx
|
|
3629
|
-
import * as
|
|
3630
|
-
import { jsx as
|
|
3631
|
-
var AppShellContext =
|
|
4035
|
+
import * as React11 from "react";
|
|
4036
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4037
|
+
var AppShellContext = React11.createContext(void 0);
|
|
3632
4038
|
var AppShellProvider = ({
|
|
3633
4039
|
children,
|
|
3634
4040
|
value
|
|
3635
4041
|
}) => {
|
|
3636
|
-
return /* @__PURE__ */
|
|
4042
|
+
return /* @__PURE__ */ jsx30(AppShellContext.Provider, { value, children });
|
|
3637
4043
|
};
|
|
3638
4044
|
AppShellProvider.displayName = "AppShellProvider";
|
|
3639
4045
|
|
|
3640
4046
|
// src/components/Header/HeaderToggle.tsx
|
|
3641
|
-
import { jsx as
|
|
4047
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3642
4048
|
var HeaderToggleRoot = styled16(IconButton3, {
|
|
3643
4049
|
name: "MuiHeader",
|
|
3644
4050
|
slot: "Toggle"
|
|
@@ -3655,11 +4061,11 @@ var HeaderToggle = ({
|
|
|
3655
4061
|
sx
|
|
3656
4062
|
}) => {
|
|
3657
4063
|
var _a, _b;
|
|
3658
|
-
const appShellContext =
|
|
4064
|
+
const appShellContext = React12.useContext(AppShellContext);
|
|
3659
4065
|
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
3660
4066
|
const onToggle = (_b = onToggleProp != null ? onToggleProp : appShellContext == null ? void 0 : appShellContext.actions.toggleSidebar) != null ? _b : (() => {
|
|
3661
4067
|
});
|
|
3662
|
-
return /* @__PURE__ */
|
|
4068
|
+
return /* @__PURE__ */ jsx31(Tooltip3, { title: collapsed ? expandLabel : collapseLabel, children: /* @__PURE__ */ jsx31(
|
|
3663
4069
|
HeaderToggleRoot,
|
|
3664
4070
|
{
|
|
3665
4071
|
onClick: onToggle,
|
|
@@ -3667,21 +4073,21 @@ var HeaderToggle = ({
|
|
|
3667
4073
|
sx,
|
|
3668
4074
|
"aria-label": collapsed ? expandLabel : collapseLabel,
|
|
3669
4075
|
"aria-expanded": !collapsed,
|
|
3670
|
-
children: /* @__PURE__ */
|
|
4076
|
+
children: /* @__PURE__ */ jsx31("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: collapsed ? expandIcon || /* @__PURE__ */ jsx31(Menu2, { size: 20 }) : collapseIcon || /* @__PURE__ */ jsx31(Menu2, { size: 20 }) })
|
|
3671
4077
|
}
|
|
3672
4078
|
) });
|
|
3673
4079
|
};
|
|
3674
4080
|
|
|
3675
4081
|
// src/components/Header/HeaderBrand.tsx
|
|
3676
|
-
import
|
|
4082
|
+
import Box11 from "@mui/material/Box";
|
|
3677
4083
|
import ButtonBase from "@mui/material/ButtonBase";
|
|
3678
4084
|
import { styled as styled19 } from "@mui/material/styles";
|
|
3679
4085
|
|
|
3680
4086
|
// src/components/Header/HeaderBrandLogo.tsx
|
|
3681
|
-
import
|
|
4087
|
+
import Box10 from "@mui/material/Box";
|
|
3682
4088
|
import { styled as styled17 } from "@mui/material/styles";
|
|
3683
|
-
import { jsx as
|
|
3684
|
-
var HeaderBrandLogoRoot = styled17(
|
|
4089
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4090
|
+
var HeaderBrandLogoRoot = styled17(Box10, {
|
|
3685
4091
|
name: "MuiHeader",
|
|
3686
4092
|
slot: "BrandLogo"
|
|
3687
4093
|
})({
|
|
@@ -3692,15 +4098,15 @@ var HeaderBrandLogo = ({
|
|
|
3692
4098
|
children,
|
|
3693
4099
|
sx
|
|
3694
4100
|
}) => {
|
|
3695
|
-
return /* @__PURE__ */
|
|
4101
|
+
return /* @__PURE__ */ jsx32(HeaderBrandLogoRoot, { sx, children });
|
|
3696
4102
|
};
|
|
3697
4103
|
HeaderBrandLogo.displayName = "HeaderBrandLogo";
|
|
3698
4104
|
|
|
3699
4105
|
// src/components/Header/HeaderBrandTitle.tsx
|
|
3700
|
-
import
|
|
4106
|
+
import Typography9 from "@mui/material/Typography";
|
|
3701
4107
|
import { styled as styled18 } from "@mui/material/styles";
|
|
3702
|
-
import { jsx as
|
|
3703
|
-
var HeaderBrandTitleRoot = styled18(
|
|
4108
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4109
|
+
var HeaderBrandTitleRoot = styled18(Typography9, {
|
|
3704
4110
|
name: "MuiHeader",
|
|
3705
4111
|
slot: "BrandTitle"
|
|
3706
4112
|
})(({ theme }) => ({
|
|
@@ -3717,13 +4123,13 @@ var HeaderBrandTitle = ({
|
|
|
3717
4123
|
children,
|
|
3718
4124
|
sx
|
|
3719
4125
|
}) => {
|
|
3720
|
-
return /* @__PURE__ */
|
|
4126
|
+
return /* @__PURE__ */ jsx33(HeaderBrandTitleRoot, { variant: "h6", component: "div", sx, children });
|
|
3721
4127
|
};
|
|
3722
4128
|
HeaderBrandTitle.displayName = "HeaderBrandTitle";
|
|
3723
4129
|
|
|
3724
4130
|
// src/components/Header/HeaderBrand.tsx
|
|
3725
|
-
import { jsx as
|
|
3726
|
-
var HeaderBrandRoot = styled19(
|
|
4131
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4132
|
+
var HeaderBrandRoot = styled19(Box11, {
|
|
3727
4133
|
name: "MuiHeader",
|
|
3728
4134
|
slot: "Brand",
|
|
3729
4135
|
shouldForwardProp: (prop) => prop !== "clickable"
|
|
@@ -3749,18 +4155,18 @@ var HeaderBrand = ({
|
|
|
3749
4155
|
sx
|
|
3750
4156
|
}) => {
|
|
3751
4157
|
if (onClick) {
|
|
3752
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ jsx34(HeaderBrandButtonRoot, { onClick, "aria-label": ariaLabel, sx, children });
|
|
3753
4159
|
}
|
|
3754
|
-
return /* @__PURE__ */
|
|
4160
|
+
return /* @__PURE__ */ jsx34(HeaderBrandRoot, { clickable: false, sx, children });
|
|
3755
4161
|
};
|
|
3756
4162
|
HeaderBrand.displayName = "HeaderBrand";
|
|
3757
4163
|
|
|
3758
4164
|
// src/components/Header/HeaderSwitchers.tsx
|
|
3759
|
-
import
|
|
4165
|
+
import Box12 from "@mui/material/Box";
|
|
3760
4166
|
import Divider2 from "@mui/material/Divider";
|
|
3761
4167
|
import { styled as styled20 } from "@mui/material/styles";
|
|
3762
|
-
import { jsx as
|
|
3763
|
-
var HeaderSwitchersRoot = styled20(
|
|
4168
|
+
import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4169
|
+
var HeaderSwitchersRoot = styled20(Box12, {
|
|
3764
4170
|
name: "MuiHeader",
|
|
3765
4171
|
slot: "Switchers"
|
|
3766
4172
|
})(({ theme }) => ({
|
|
@@ -3788,17 +4194,17 @@ var HeaderSwitchers = ({
|
|
|
3788
4194
|
if (minimal) {
|
|
3789
4195
|
return null;
|
|
3790
4196
|
}
|
|
3791
|
-
return /* @__PURE__ */
|
|
3792
|
-
showDivider && /* @__PURE__ */
|
|
4197
|
+
return /* @__PURE__ */ jsxs12(HeaderSwitchersRoot, { sx, children: [
|
|
4198
|
+
showDivider && /* @__PURE__ */ jsx35(HeaderSwitchersDivider, { orientation: "vertical", flexItem: true }),
|
|
3793
4199
|
children
|
|
3794
4200
|
] });
|
|
3795
4201
|
};
|
|
3796
4202
|
|
|
3797
4203
|
// src/components/Header/HeaderActions.tsx
|
|
3798
|
-
import
|
|
4204
|
+
import Box13 from "@mui/material/Box";
|
|
3799
4205
|
import { styled as styled21 } from "@mui/material/styles";
|
|
3800
|
-
import { jsx as
|
|
3801
|
-
var HeaderActionsRoot = styled21(
|
|
4206
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4207
|
+
var HeaderActionsRoot = styled21(Box13, {
|
|
3802
4208
|
name: "MuiHeader",
|
|
3803
4209
|
slot: "Actions"
|
|
3804
4210
|
})(({ theme }) => ({
|
|
@@ -3810,11 +4216,11 @@ var HeaderActions = ({
|
|
|
3810
4216
|
children,
|
|
3811
4217
|
sx
|
|
3812
4218
|
}) => {
|
|
3813
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsx36(HeaderActionsRoot, { sx, children });
|
|
3814
4220
|
};
|
|
3815
4221
|
|
|
3816
4222
|
// src/components/Header/Header.tsx
|
|
3817
|
-
import { jsx as
|
|
4223
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3818
4224
|
var HeaderRootStyled = styled22(AppBar, {
|
|
3819
4225
|
name: "MuiHeader",
|
|
3820
4226
|
slot: "Root"
|
|
@@ -3835,7 +4241,7 @@ var HeaderToolbar = styled22(Toolbar, {
|
|
|
3835
4241
|
paddingRight: theme.spacing(2)
|
|
3836
4242
|
}
|
|
3837
4243
|
}));
|
|
3838
|
-
var HeaderSpacerStyled = styled22(
|
|
4244
|
+
var HeaderSpacerStyled = styled22(Box14, {
|
|
3839
4245
|
name: "MuiHeader",
|
|
3840
4246
|
slot: "Spacer"
|
|
3841
4247
|
})({
|
|
@@ -3846,10 +4252,10 @@ var Header = ({
|
|
|
3846
4252
|
minimal = false,
|
|
3847
4253
|
sx
|
|
3848
4254
|
}) => {
|
|
3849
|
-
const contextValue =
|
|
3850
|
-
return /* @__PURE__ */
|
|
4255
|
+
const contextValue = React13.useMemo(() => ({ minimal }), [minimal]);
|
|
4256
|
+
return /* @__PURE__ */ jsx37(HeaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx37(HeaderRootStyled, { position: "static", color: "default", elevation: 0, sx, children: /* @__PURE__ */ jsx37(HeaderToolbar, { children }) }) });
|
|
3851
4257
|
};
|
|
3852
|
-
var HeaderSpacer = ({ sx }) => /* @__PURE__ */
|
|
4258
|
+
var HeaderSpacer = ({ sx }) => /* @__PURE__ */ jsx37(HeaderSpacerStyled, { sx });
|
|
3853
4259
|
Header.Toggle = HeaderToggle;
|
|
3854
4260
|
Header.Brand = HeaderBrand;
|
|
3855
4261
|
Header.BrandLogo = HeaderBrandLogo;
|
|
@@ -3860,31 +4266,31 @@ Header.Spacer = HeaderSpacer;
|
|
|
3860
4266
|
Header.displayName = "Header";
|
|
3861
4267
|
|
|
3862
4268
|
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
3863
|
-
import * as
|
|
3864
|
-
import
|
|
4269
|
+
import * as React19 from "react";
|
|
4270
|
+
import Popover3 from "@mui/material/Popover";
|
|
3865
4271
|
import { styled as styled27 } from "@mui/material/styles";
|
|
3866
4272
|
|
|
3867
4273
|
// src/components/AppSwitcher/context.ts
|
|
3868
|
-
import * as
|
|
3869
|
-
var AppSwitcherContext =
|
|
4274
|
+
import * as React14 from "react";
|
|
4275
|
+
var AppSwitcherContext = React14.createContext(null);
|
|
3870
4276
|
var useAppSwitcher = () => {
|
|
3871
|
-
const context =
|
|
4277
|
+
const context = React14.useContext(AppSwitcherContext);
|
|
3872
4278
|
if (!context) {
|
|
3873
4279
|
throw new Error("AppSwitcher sub-components must be used within an AppSwitcher component");
|
|
3874
4280
|
}
|
|
3875
4281
|
return context;
|
|
3876
4282
|
};
|
|
3877
4283
|
AppSwitcherContext.displayName = "AppSwitcher.Context";
|
|
3878
|
-
var AppSwitcherFooterContext =
|
|
4284
|
+
var AppSwitcherFooterContext = React14.createContext(false);
|
|
3879
4285
|
AppSwitcherFooterContext.displayName = "AppSwitcher.FooterContext";
|
|
3880
4286
|
|
|
3881
4287
|
// src/components/AppSwitcher/AppSwitcherTrigger.tsx
|
|
3882
|
-
import * as
|
|
4288
|
+
import * as React15 from "react";
|
|
3883
4289
|
import IconButton4 from "@mui/material/IconButton";
|
|
3884
|
-
import
|
|
4290
|
+
import Tooltip4 from "@mui/material/Tooltip";
|
|
3885
4291
|
import { styled as styled23 } from "@mui/material/styles";
|
|
3886
4292
|
import { Grip } from "@wso2/oxygen-ui-icons-react";
|
|
3887
|
-
import { jsx as
|
|
4293
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3888
4294
|
var DEFAULT_LABEL = "Switch Platforms";
|
|
3889
4295
|
var AppSwitcherTriggerRoot = styled23(IconButton4, {
|
|
3890
4296
|
name: "MuiAppSwitcher",
|
|
@@ -3900,13 +4306,13 @@ var AppSwitcherTriggerRoot = styled23(IconButton4, {
|
|
|
3900
4306
|
cursor: "pointer"
|
|
3901
4307
|
}
|
|
3902
4308
|
}));
|
|
3903
|
-
var AppSwitcherTrigger =
|
|
4309
|
+
var AppSwitcherTrigger = React15.forwardRef(
|
|
3904
4310
|
function AppSwitcherTrigger2(_a, ref) {
|
|
3905
4311
|
var _b = _a, { label = DEFAULT_LABEL, icon, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["label", "icon", "onClick", "aria-label"]);
|
|
3906
4312
|
const { open, popoverId, handleOpen } = useAppSwitcher();
|
|
3907
4313
|
const resolvedLabel = label.trim().length > 0 ? label : DEFAULT_LABEL;
|
|
3908
4314
|
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : resolvedLabel;
|
|
3909
|
-
return /* @__PURE__ */
|
|
4315
|
+
return /* @__PURE__ */ jsx38(Tooltip4, { title: resolvedLabel, children: /* @__PURE__ */ jsx38(
|
|
3910
4316
|
AppSwitcherTriggerRoot,
|
|
3911
4317
|
__spreadProps(__spreadValues({}, props), {
|
|
3912
4318
|
ref,
|
|
@@ -3918,7 +4324,7 @@ var AppSwitcherTrigger = React14.forwardRef(
|
|
|
3918
4324
|
"aria-controls": open ? popoverId : void 0,
|
|
3919
4325
|
"aria-haspopup": "true",
|
|
3920
4326
|
"aria-expanded": open,
|
|
3921
|
-
children: /* @__PURE__ */
|
|
4327
|
+
children: /* @__PURE__ */ jsx38("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: icon || /* @__PURE__ */ jsx38(Grip, { size: 24 }) })
|
|
3922
4328
|
})
|
|
3923
4329
|
) });
|
|
3924
4330
|
}
|
|
@@ -3926,20 +4332,20 @@ var AppSwitcherTrigger = React14.forwardRef(
|
|
|
3926
4332
|
AppSwitcherTrigger.displayName = "AppSwitcher.Trigger";
|
|
3927
4333
|
|
|
3928
4334
|
// src/components/AppSwitcher/AppSwitcherSection.tsx
|
|
3929
|
-
import * as
|
|
3930
|
-
import
|
|
4335
|
+
import * as React17 from "react";
|
|
4336
|
+
import Box16 from "@mui/material/Box";
|
|
3931
4337
|
import Skeleton from "@mui/material/Skeleton";
|
|
3932
|
-
import
|
|
4338
|
+
import Typography11 from "@mui/material/Typography";
|
|
3933
4339
|
import { styled as styled25 } from "@mui/material/styles";
|
|
3934
4340
|
|
|
3935
4341
|
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
3936
|
-
import * as
|
|
3937
|
-
import
|
|
4342
|
+
import * as React16 from "react";
|
|
4343
|
+
import Box15 from "@mui/material/Box";
|
|
3938
4344
|
import Card2 from "@mui/material/Card";
|
|
3939
4345
|
import ButtonBase2 from "@mui/material/ButtonBase";
|
|
3940
4346
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
3941
|
-
import
|
|
3942
|
-
import
|
|
4347
|
+
import Tooltip5 from "@mui/material/Tooltip";
|
|
4348
|
+
import Typography10 from "@mui/material/Typography";
|
|
3943
4349
|
import { styled as styled24 } from "@mui/material/styles";
|
|
3944
4350
|
|
|
3945
4351
|
// src/components/AppSwitcher/brand.ts
|
|
@@ -3969,7 +4375,7 @@ var isSafeAppUrl = (url) => {
|
|
|
3969
4375
|
|
|
3970
4376
|
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
3971
4377
|
import { WSO2 } from "@wso2/oxygen-ui-icons-react";
|
|
3972
|
-
import { jsx as
|
|
4378
|
+
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3973
4379
|
var DEFAULT_UNAVAILABLE_LABEL = "Coming soon";
|
|
3974
4380
|
var APP_CARD_HEIGHT = {
|
|
3975
4381
|
platform: 13,
|
|
@@ -4047,7 +4453,7 @@ var AppSwitcherAppRoot = styled24(Card2, {
|
|
|
4047
4453
|
}
|
|
4048
4454
|
});
|
|
4049
4455
|
});
|
|
4050
|
-
var AppSwitcherAppIcon = styled24(
|
|
4456
|
+
var AppSwitcherAppIcon = styled24(Box15, {
|
|
4051
4457
|
name: "MuiAppSwitcher",
|
|
4052
4458
|
slot: "AppIcon",
|
|
4053
4459
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4075,7 +4481,7 @@ var AppSwitcherAppIcon = styled24(Box13, {
|
|
|
4075
4481
|
}
|
|
4076
4482
|
});
|
|
4077
4483
|
});
|
|
4078
|
-
var AppSwitcherAppName = styled24(
|
|
4484
|
+
var AppSwitcherAppName = styled24(Typography10, {
|
|
4079
4485
|
name: "MuiAppSwitcher",
|
|
4080
4486
|
slot: "AppName",
|
|
4081
4487
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4100,7 +4506,7 @@ var AppSwitcherAppName = styled24(Typography8, {
|
|
|
4100
4506
|
overflow: "hidden"
|
|
4101
4507
|
}));
|
|
4102
4508
|
var isModifiedClick = (event) => event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
|
4103
|
-
var AppSwitcherApp =
|
|
4509
|
+
var AppSwitcherApp = React16.forwardRef(
|
|
4104
4510
|
function AppSwitcherApp2({
|
|
4105
4511
|
id,
|
|
4106
4512
|
name,
|
|
@@ -4117,14 +4523,14 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4117
4523
|
onClick
|
|
4118
4524
|
}, ref) {
|
|
4119
4525
|
var _a;
|
|
4120
|
-
const inFooter =
|
|
4526
|
+
const inFooter = React16.useContext(AppSwitcherFooterContext);
|
|
4121
4527
|
const tone = toneProp != null ? toneProp : inFooter ? "manage" : "platform";
|
|
4122
|
-
const switcher =
|
|
4528
|
+
const switcher = React16.useContext(AppSwitcherContext);
|
|
4123
4529
|
const current = currentProp != null ? currentProp : id !== void 0 && id === (switcher == null ? void 0 : switcher.currentAppId);
|
|
4124
4530
|
const normalizedUrl = typeof url === "string" && url.trim() === "" ? null : url;
|
|
4125
4531
|
const unsafeUrl = Boolean(normalizedUrl) && !isSafeAppUrl(normalizedUrl);
|
|
4126
4532
|
const safeUrl = unsafeUrl ? void 0 : normalizedUrl || void 0;
|
|
4127
|
-
|
|
4533
|
+
React16.useEffect(() => {
|
|
4128
4534
|
if (unsafeUrl) {
|
|
4129
4535
|
console.warn(
|
|
4130
4536
|
`AppSwitcher.App: ignored the url of "${name}" because only http:, https: and relative URLs are allowed. The card renders disabled.`
|
|
@@ -4158,7 +4564,7 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4158
4564
|
event.preventDefault();
|
|
4159
4565
|
}
|
|
4160
4566
|
};
|
|
4161
|
-
const card = /* @__PURE__ */
|
|
4567
|
+
const card = /* @__PURE__ */ jsxs13(
|
|
4162
4568
|
AppSwitcherAppRoot,
|
|
4163
4569
|
__spreadProps(__spreadValues({}, anchorProps), {
|
|
4164
4570
|
ref,
|
|
@@ -4171,28 +4577,28 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4171
4577
|
"aria-busy": busy ? "true" : void 0,
|
|
4172
4578
|
"aria-current": current ? "page" : void 0,
|
|
4173
4579
|
children: [
|
|
4174
|
-
/* @__PURE__ */
|
|
4580
|
+
/* @__PURE__ */ jsx39(AppSwitcherAppIcon, { ownerState, "aria-hidden": "true", children: busy ? (
|
|
4175
4581
|
// Same size as the mark, so the card does not reflow.
|
|
4176
|
-
/* @__PURE__ */
|
|
4177
|
-
) : icon != null ? icon : /* @__PURE__ */
|
|
4178
|
-
/* @__PURE__ */
|
|
4582
|
+
/* @__PURE__ */ jsx39(CircularProgress, { color: "inherit", size: markSize, thickness: 5 })
|
|
4583
|
+
) : icon != null ? icon : /* @__PURE__ */ jsx39(WSO2, { size: markSize }) }),
|
|
4584
|
+
/* @__PURE__ */ jsx39(AppSwitcherAppName, { ownerState, children: name })
|
|
4179
4585
|
]
|
|
4180
4586
|
})
|
|
4181
4587
|
);
|
|
4182
|
-
return tooltip ? /* @__PURE__ */
|
|
4588
|
+
return tooltip ? /* @__PURE__ */ jsx39(Tooltip5, { title: tooltip, describeChild: true, children: card }) : card;
|
|
4183
4589
|
}
|
|
4184
4590
|
);
|
|
4185
4591
|
AppSwitcherApp.displayName = "AppSwitcher.App";
|
|
4186
4592
|
|
|
4187
4593
|
// src/components/AppSwitcher/AppSwitcherSection.tsx
|
|
4188
|
-
import { jsx as
|
|
4189
|
-
var AppSwitcherSectionRoot = styled25(
|
|
4594
|
+
import { jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4595
|
+
var AppSwitcherSectionRoot = styled25(Box16, {
|
|
4190
4596
|
name: "MuiAppSwitcher",
|
|
4191
4597
|
slot: "Section"
|
|
4192
4598
|
})(({ theme }) => ({
|
|
4193
4599
|
padding: theme.spacing(2)
|
|
4194
4600
|
}));
|
|
4195
|
-
var AppSwitcherSectionLabel = styled25(
|
|
4601
|
+
var AppSwitcherSectionLabel = styled25(Typography11, {
|
|
4196
4602
|
name: "MuiAppSwitcher",
|
|
4197
4603
|
slot: "SectionLabel"
|
|
4198
4604
|
})(({ theme }) => ({
|
|
@@ -4237,7 +4643,7 @@ var AppSwitcherAppSkeleton = styled25(Skeleton, {
|
|
|
4237
4643
|
var renderAppItems = (items, { missingUrlIsUnavailable }) => items.map((_a, index) => {
|
|
4238
4644
|
var _b = _a, { key, url } = _b, item = __objRest(_b, ["key", "url"]);
|
|
4239
4645
|
var _a2, _b2;
|
|
4240
|
-
return /* @__PURE__ */
|
|
4646
|
+
return /* @__PURE__ */ jsx40(
|
|
4241
4647
|
AppSwitcherApp,
|
|
4242
4648
|
__spreadProps(__spreadValues({}, item), {
|
|
4243
4649
|
url: url === void 0 && missingUrlIsUnavailable ? null : url
|
|
@@ -4253,10 +4659,10 @@ var AppSwitcherSection = ({
|
|
|
4253
4659
|
loading = false,
|
|
4254
4660
|
loadingCount
|
|
4255
4661
|
}) => {
|
|
4256
|
-
const labelId =
|
|
4257
|
-
const inFooter =
|
|
4662
|
+
const labelId = React17.useId();
|
|
4663
|
+
const inFooter = React17.useContext(AppSwitcherFooterContext);
|
|
4258
4664
|
const tone = inFooter ? "manage" : "platform";
|
|
4259
|
-
const gridRef =
|
|
4665
|
+
const gridRef = React17.useRef(null);
|
|
4260
4666
|
const handleKeyDown = (event) => {
|
|
4261
4667
|
var _a, _b;
|
|
4262
4668
|
const keys = ["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
@@ -4307,7 +4713,7 @@ var AppSwitcherSection = ({
|
|
|
4307
4713
|
event.preventDefault();
|
|
4308
4714
|
cards[nextIndex].focus();
|
|
4309
4715
|
};
|
|
4310
|
-
const content = loading ? Array.from({ length: loadingCount != null ? loadingCount : columns }, (_, index) => /* @__PURE__ */
|
|
4716
|
+
const content = loading ? Array.from({ length: loadingCount != null ? loadingCount : columns }, (_, index) => /* @__PURE__ */ jsx40(
|
|
4311
4717
|
AppSwitcherAppSkeleton,
|
|
4312
4718
|
{
|
|
4313
4719
|
ownerState: { tone },
|
|
@@ -4317,9 +4723,9 @@ var AppSwitcherSection = ({
|
|
|
4317
4723
|
},
|
|
4318
4724
|
index
|
|
4319
4725
|
)) : children != null ? children : apps && renderAppItems(apps, { missingUrlIsUnavailable: true });
|
|
4320
|
-
return /* @__PURE__ */
|
|
4321
|
-
label && /* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ jsxs14(AppSwitcherSectionRoot, { children: [
|
|
4727
|
+
label && /* @__PURE__ */ jsx40(AppSwitcherSectionLabel, { id: labelId, children: label }),
|
|
4728
|
+
/* @__PURE__ */ jsx40(
|
|
4323
4729
|
AppSwitcherSectionGrid,
|
|
4324
4730
|
{
|
|
4325
4731
|
ref: gridRef,
|
|
@@ -4328,9 +4734,9 @@ var AppSwitcherSection = ({
|
|
|
4328
4734
|
"aria-labelledby": label ? labelId : void 0,
|
|
4329
4735
|
"aria-busy": loading ? "true" : void 0,
|
|
4330
4736
|
onKeyDown: handleKeyDown,
|
|
4331
|
-
children:
|
|
4737
|
+
children: React17.Children.map(
|
|
4332
4738
|
content,
|
|
4333
|
-
(child) =>
|
|
4739
|
+
(child) => React17.isValidElement(child) ? /* @__PURE__ */ jsx40("li", { children: child }) : child
|
|
4334
4740
|
)
|
|
4335
4741
|
}
|
|
4336
4742
|
)
|
|
@@ -4339,11 +4745,11 @@ var AppSwitcherSection = ({
|
|
|
4339
4745
|
AppSwitcherSection.displayName = "AppSwitcher.Section";
|
|
4340
4746
|
|
|
4341
4747
|
// src/components/AppSwitcher/AppSwitcherFooter.tsx
|
|
4342
|
-
import * as
|
|
4343
|
-
import
|
|
4748
|
+
import * as React18 from "react";
|
|
4749
|
+
import Box17 from "@mui/material/Box";
|
|
4344
4750
|
import { alpha, styled as styled26 } from "@mui/material/styles";
|
|
4345
|
-
import { jsx as
|
|
4346
|
-
var AppSwitcherFooterRoot = styled26(
|
|
4751
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4752
|
+
var AppSwitcherFooterRoot = styled26(Box17, {
|
|
4347
4753
|
name: "MuiAppSwitcher",
|
|
4348
4754
|
slot: "Footer"
|
|
4349
4755
|
})(({ theme }) => ({
|
|
@@ -4362,10 +4768,10 @@ var AppSwitcherFooter = ({
|
|
|
4362
4768
|
loadingCount
|
|
4363
4769
|
}) => {
|
|
4364
4770
|
const cards = children != null ? children : links && renderAppItems(links, { missingUrlIsUnavailable: false });
|
|
4365
|
-
if (!loading &&
|
|
4771
|
+
if (!loading && React18.Children.toArray(cards).length === 0) {
|
|
4366
4772
|
return null;
|
|
4367
4773
|
}
|
|
4368
|
-
return /* @__PURE__ */
|
|
4774
|
+
return /* @__PURE__ */ jsx41(AppSwitcherFooterRoot, { children: /* @__PURE__ */ jsx41(AppSwitcherFooterContext.Provider, { value: true, children: /* @__PURE__ */ jsx41(
|
|
4369
4775
|
AppSwitcherSection,
|
|
4370
4776
|
{
|
|
4371
4777
|
label,
|
|
@@ -4379,8 +4785,8 @@ var AppSwitcherFooter = ({
|
|
|
4379
4785
|
AppSwitcherFooter.displayName = "AppSwitcher.Footer";
|
|
4380
4786
|
|
|
4381
4787
|
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
4382
|
-
import { jsx as
|
|
4383
|
-
var AppSwitcherRoot = styled27(
|
|
4788
|
+
import { jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4789
|
+
var AppSwitcherRoot = styled27(Popover3, {
|
|
4384
4790
|
name: "MuiAppSwitcher",
|
|
4385
4791
|
slot: "Root",
|
|
4386
4792
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4403,18 +4809,18 @@ var AppSwitcher = ({
|
|
|
4403
4809
|
currentAppId,
|
|
4404
4810
|
unavailableLabel
|
|
4405
4811
|
}) => {
|
|
4406
|
-
const [anchorEl, setAnchorEl] =
|
|
4812
|
+
const [anchorEl, setAnchorEl] = React19.useState(null);
|
|
4407
4813
|
const open = Boolean(anchorEl);
|
|
4408
|
-
const popoverId =
|
|
4409
|
-
const handleOpen =
|
|
4814
|
+
const popoverId = React19.useId();
|
|
4815
|
+
const handleOpen = React19.useCallback((event) => {
|
|
4410
4816
|
const target = event.currentTarget;
|
|
4411
4817
|
setAnchorEl((current) => current ? null : target);
|
|
4412
4818
|
}, []);
|
|
4413
|
-
const handleClose =
|
|
4819
|
+
const handleClose = React19.useCallback(() => {
|
|
4414
4820
|
setAnchorEl(null);
|
|
4415
4821
|
}, []);
|
|
4416
4822
|
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp : "Applications";
|
|
4417
|
-
const contextValue =
|
|
4823
|
+
const contextValue = React19.useMemo(
|
|
4418
4824
|
() => ({
|
|
4419
4825
|
open,
|
|
4420
4826
|
anchorEl,
|
|
@@ -4426,14 +4832,14 @@ var AppSwitcher = ({
|
|
|
4426
4832
|
}),
|
|
4427
4833
|
[open, anchorEl, popoverId, handleOpen, handleClose, currentAppId, unavailableLabel]
|
|
4428
4834
|
);
|
|
4429
|
-
const childrenArray =
|
|
4835
|
+
const childrenArray = React19.Children.toArray(children);
|
|
4430
4836
|
const triggerChild = childrenArray.find(
|
|
4431
|
-
(child) =>
|
|
4837
|
+
(child) => React19.isValidElement(child) && child.type === AppSwitcherTrigger
|
|
4432
4838
|
);
|
|
4433
4839
|
const popoverChildren = childrenArray.filter((child) => child !== triggerChild);
|
|
4434
|
-
return /* @__PURE__ */
|
|
4840
|
+
return /* @__PURE__ */ jsxs15(AppSwitcherContext.Provider, { value: contextValue, children: [
|
|
4435
4841
|
triggerChild,
|
|
4436
|
-
/* @__PURE__ */
|
|
4842
|
+
/* @__PURE__ */ jsx42(
|
|
4437
4843
|
AppSwitcherRoot,
|
|
4438
4844
|
{
|
|
4439
4845
|
id: popoverId,
|
|
@@ -4457,15 +4863,15 @@ AppSwitcher.Footer = AppSwitcherFooter;
|
|
|
4457
4863
|
AppSwitcher.displayName = "AppSwitcher";
|
|
4458
4864
|
|
|
4459
4865
|
// src/components/Sidebar/Sidebar.tsx
|
|
4460
|
-
import * as
|
|
4461
|
-
import
|
|
4866
|
+
import * as React27 from "react";
|
|
4867
|
+
import Box23 from "@mui/material/Box";
|
|
4462
4868
|
import { styled as styled40 } from "@mui/material/styles";
|
|
4463
4869
|
|
|
4464
4870
|
// src/components/Sidebar/context.ts
|
|
4465
|
-
import * as
|
|
4466
|
-
var SidebarContext =
|
|
4871
|
+
import * as React20 from "react";
|
|
4872
|
+
var SidebarContext = React20.createContext(null);
|
|
4467
4873
|
var useSidebar = () => {
|
|
4468
|
-
const context =
|
|
4874
|
+
const context = React20.useContext(SidebarContext);
|
|
4469
4875
|
if (!context) {
|
|
4470
4876
|
throw new Error("Sidebar compound components must be used within Sidebar");
|
|
4471
4877
|
}
|
|
@@ -4473,12 +4879,12 @@ var useSidebar = () => {
|
|
|
4473
4879
|
};
|
|
4474
4880
|
|
|
4475
4881
|
// src/components/Sidebar/SidebarNav.tsx
|
|
4476
|
-
import * as
|
|
4477
|
-
import
|
|
4882
|
+
import * as React21 from "react";
|
|
4883
|
+
import Box18 from "@mui/material/Box";
|
|
4478
4884
|
import Divider3 from "@mui/material/Divider";
|
|
4479
4885
|
import { styled as styled28 } from "@mui/material/styles";
|
|
4480
|
-
import { jsx as
|
|
4481
|
-
var SidebarNavRoot = styled28(
|
|
4886
|
+
import { jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4887
|
+
var SidebarNavRoot = styled28(Box18, {
|
|
4482
4888
|
name: "MuiSidebar",
|
|
4483
4889
|
slot: "Nav"
|
|
4484
4890
|
})(({ theme }) => ({
|
|
@@ -4513,24 +4919,24 @@ var SidebarNav = ({
|
|
|
4513
4919
|
sx
|
|
4514
4920
|
}) => {
|
|
4515
4921
|
const { collapsed } = useSidebar();
|
|
4516
|
-
const childArray =
|
|
4517
|
-
return /* @__PURE__ */
|
|
4518
|
-
index > 0 && showDividers && !collapsed && /* @__PURE__ */
|
|
4922
|
+
const childArray = React21.Children.toArray(children);
|
|
4923
|
+
return /* @__PURE__ */ jsx43(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs16(React21.Fragment, { children: [
|
|
4924
|
+
index > 0 && showDividers && !collapsed && /* @__PURE__ */ jsx43(SidebarNavDivider, {}),
|
|
4519
4925
|
child
|
|
4520
4926
|
] }, index)) });
|
|
4521
4927
|
};
|
|
4522
4928
|
|
|
4523
4929
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
4524
|
-
import * as
|
|
4525
|
-
import
|
|
4930
|
+
import * as React22 from "react";
|
|
4931
|
+
import Box19 from "@mui/material/Box";
|
|
4526
4932
|
import List from "@mui/material/List";
|
|
4527
4933
|
import { styled as styled30 } from "@mui/material/styles";
|
|
4528
4934
|
|
|
4529
4935
|
// src/components/Sidebar/SidebarCategoryLabel.tsx
|
|
4530
|
-
import
|
|
4936
|
+
import Typography12 from "@mui/material/Typography";
|
|
4531
4937
|
import { styled as styled29 } from "@mui/material/styles";
|
|
4532
|
-
import { jsx as
|
|
4533
|
-
var SidebarCategoryLabelRoot = styled29(
|
|
4938
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
4939
|
+
var SidebarCategoryLabelRoot = styled29(Typography12, {
|
|
4534
4940
|
name: "MuiSidebar",
|
|
4535
4941
|
slot: "CategoryLabel",
|
|
4536
4942
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -4555,13 +4961,13 @@ var SidebarCategoryLabelRoot = styled29(Typography10, {
|
|
|
4555
4961
|
}));
|
|
4556
4962
|
var SidebarCategoryLabel = ({ children, sx }) => {
|
|
4557
4963
|
const { collapsed } = useSidebar();
|
|
4558
|
-
return /* @__PURE__ */
|
|
4964
|
+
return /* @__PURE__ */ jsx44(SidebarCategoryLabelRoot, { variant: "caption", collapsed, sx, children });
|
|
4559
4965
|
};
|
|
4560
4966
|
SidebarCategoryLabel.displayName = "SidebarCategoryLabel";
|
|
4561
4967
|
|
|
4562
4968
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
4563
|
-
import { jsx as
|
|
4564
|
-
var SidebarCategoryRoot = styled30(
|
|
4969
|
+
import { jsx as jsx45, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4970
|
+
var SidebarCategoryRoot = styled30(Box19, {
|
|
4565
4971
|
name: "MuiSidebar",
|
|
4566
4972
|
slot: "Category"
|
|
4567
4973
|
})(({ theme }) => ({
|
|
@@ -4570,9 +4976,9 @@ var SidebarCategoryRoot = styled30(Box17, {
|
|
|
4570
4976
|
var separateChildren = (children) => {
|
|
4571
4977
|
let labelChild = null;
|
|
4572
4978
|
const otherChildren = [];
|
|
4573
|
-
|
|
4979
|
+
React22.Children.forEach(children, (child) => {
|
|
4574
4980
|
var _a;
|
|
4575
|
-
if (
|
|
4981
|
+
if (React22.isValidElement(child)) {
|
|
4576
4982
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4577
4983
|
if (displayName === "SidebarCategoryLabel") {
|
|
4578
4984
|
labelChild = child;
|
|
@@ -4590,35 +4996,35 @@ var SidebarCategory = ({
|
|
|
4590
4996
|
sx
|
|
4591
4997
|
}) => {
|
|
4592
4998
|
const { labelChild, otherChildren } = separateChildren(children);
|
|
4593
|
-
return /* @__PURE__ */
|
|
4999
|
+
return /* @__PURE__ */ jsxs17(SidebarCategoryRoot, { sx, children: [
|
|
4594
5000
|
labelChild,
|
|
4595
|
-
/* @__PURE__ */
|
|
5001
|
+
/* @__PURE__ */ jsx45(List, { disablePadding: true, children: otherChildren })
|
|
4596
5002
|
] });
|
|
4597
5003
|
};
|
|
4598
5004
|
SidebarCategory.displayName = "SidebarCategory";
|
|
4599
5005
|
|
|
4600
5006
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4601
|
-
import * as
|
|
4602
|
-
import
|
|
5007
|
+
import * as React25 from "react";
|
|
5008
|
+
import Box20 from "@mui/material/Box";
|
|
4603
5009
|
import List2 from "@mui/material/List";
|
|
4604
5010
|
import ListItem from "@mui/material/ListItem";
|
|
4605
5011
|
import ListItemButton from "@mui/material/ListItemButton";
|
|
4606
5012
|
import ListItemIcon2 from "@mui/material/ListItemIcon";
|
|
4607
5013
|
import ListItemText2 from "@mui/material/ListItemText";
|
|
4608
|
-
import
|
|
4609
|
-
import
|
|
5014
|
+
import MenuItem5 from "@mui/material/MenuItem";
|
|
5015
|
+
import MenuList2 from "@mui/material/MenuList";
|
|
4610
5016
|
import Collapse from "@mui/material/Collapse";
|
|
4611
|
-
import
|
|
4612
|
-
import
|
|
5017
|
+
import Tooltip6 from "@mui/material/Tooltip";
|
|
5018
|
+
import Popover4 from "@mui/material/Popover";
|
|
4613
5019
|
import { styled as styled34 } from "@mui/material/styles";
|
|
4614
|
-
import { ChevronDown as
|
|
5020
|
+
import { ChevronDown as ChevronDown3, ChevronUp } from "@wso2/oxygen-ui-icons-react";
|
|
4615
5021
|
|
|
4616
5022
|
// src/components/Sidebar/SidebarItemContext.tsx
|
|
4617
|
-
import * as
|
|
4618
|
-
import { jsx as
|
|
4619
|
-
var SidebarItemContext =
|
|
5023
|
+
import * as React23 from "react";
|
|
5024
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
5025
|
+
var SidebarItemContext = React23.createContext(null);
|
|
4620
5026
|
var useSidebarItemContext = () => {
|
|
4621
|
-
const context =
|
|
5027
|
+
const context = React23.useContext(SidebarItemContext);
|
|
4622
5028
|
if (!context) {
|
|
4623
5029
|
throw new Error(
|
|
4624
5030
|
"useSidebarItemContext must be used within a SidebarItem component"
|
|
@@ -4627,14 +5033,14 @@ var useSidebarItemContext = () => {
|
|
|
4627
5033
|
return context;
|
|
4628
5034
|
};
|
|
4629
5035
|
var SidebarItemProvider = ({ value, children }) => {
|
|
4630
|
-
return /* @__PURE__ */
|
|
5036
|
+
return /* @__PURE__ */ jsx46(SidebarItemContext.Provider, { value, children });
|
|
4631
5037
|
};
|
|
4632
5038
|
|
|
4633
5039
|
// src/components/Sidebar/SidebarItemIcon.tsx
|
|
4634
|
-
import * as
|
|
5040
|
+
import * as React24 from "react";
|
|
4635
5041
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
4636
5042
|
import { styled as styled31 } from "@mui/material/styles";
|
|
4637
|
-
import { jsx as
|
|
5043
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4638
5044
|
var SidebarItemIconRoot = styled31(ListItemIcon, {
|
|
4639
5045
|
name: "MuiSidebar",
|
|
4640
5046
|
slot: "ItemIcon",
|
|
@@ -4652,10 +5058,10 @@ var SidebarItemIcon = ({
|
|
|
4652
5058
|
var _a;
|
|
4653
5059
|
const { collapsed } = useSidebar();
|
|
4654
5060
|
const { isActive } = useSidebarItemContext();
|
|
4655
|
-
const iconWithSize =
|
|
5061
|
+
const iconWithSize = React24.isValidElement(children) ? React24.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
|
|
4656
5062
|
size: (_a = children.props.size) != null ? _a : 20
|
|
4657
5063
|
})) : children;
|
|
4658
|
-
return /* @__PURE__ */
|
|
5064
|
+
return /* @__PURE__ */ jsx47(
|
|
4659
5065
|
SidebarItemIconRoot,
|
|
4660
5066
|
{
|
|
4661
5067
|
ownerState: { collapsed, isActive },
|
|
@@ -4669,7 +5075,7 @@ SidebarItemIcon.displayName = "SidebarItemIcon";
|
|
|
4669
5075
|
// src/components/Sidebar/SidebarItemLabel.tsx
|
|
4670
5076
|
import ListItemText from "@mui/material/ListItemText";
|
|
4671
5077
|
import { styled as styled32 } from "@mui/material/styles";
|
|
4672
|
-
import { jsx as
|
|
5078
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
4673
5079
|
var SidebarItemLabelRoot = styled32(ListItemText, {
|
|
4674
5080
|
name: "MuiSidebar",
|
|
4675
5081
|
slot: "ItemLabel",
|
|
@@ -4695,14 +5101,14 @@ var SidebarItemLabel = ({
|
|
|
4695
5101
|
}) => {
|
|
4696
5102
|
const { collapsed } = useSidebar();
|
|
4697
5103
|
const { isActive } = useSidebarItemContext();
|
|
4698
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsx48(SidebarItemLabelRoot, { primary: children, ownerState: { isActive, collapsed }, sx });
|
|
4699
5105
|
};
|
|
4700
5106
|
SidebarItemLabel.displayName = "SidebarItemLabel";
|
|
4701
5107
|
|
|
4702
5108
|
// src/components/Sidebar/SidebarItemBadge.tsx
|
|
4703
5109
|
import Chip from "@mui/material/Chip";
|
|
4704
5110
|
import { styled as styled33 } from "@mui/material/styles";
|
|
4705
|
-
import { jsx as
|
|
5111
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4706
5112
|
var SidebarItemBadgeRoot = styled33(Chip, {
|
|
4707
5113
|
name: "MuiSidebar",
|
|
4708
5114
|
slot: "ItemBadge"
|
|
@@ -4720,12 +5126,12 @@ var SidebarItemBadge = ({
|
|
|
4720
5126
|
if (collapsed) {
|
|
4721
5127
|
return null;
|
|
4722
5128
|
}
|
|
4723
|
-
return /* @__PURE__ */
|
|
5129
|
+
return /* @__PURE__ */ jsx49(SidebarItemBadgeRoot, { label: children, size: "small", color, sx });
|
|
4724
5130
|
};
|
|
4725
5131
|
SidebarItemBadge.displayName = "SidebarItemBadge";
|
|
4726
5132
|
|
|
4727
5133
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4728
|
-
import { Fragment as
|
|
5134
|
+
import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4729
5135
|
var SidebarItemRoot = styled34(ListItem, {
|
|
4730
5136
|
name: "MuiSidebar",
|
|
4731
5137
|
slot: "Item"
|
|
@@ -4757,7 +5163,7 @@ var SidebarItemButton = styled34(ListItemButton, {
|
|
|
4757
5163
|
}
|
|
4758
5164
|
}
|
|
4759
5165
|
}));
|
|
4760
|
-
var SidebarItemChevron = styled34(
|
|
5166
|
+
var SidebarItemChevron = styled34(Box20, {
|
|
4761
5167
|
name: "MuiSidebar",
|
|
4762
5168
|
slot: "ItemChevron"
|
|
4763
5169
|
})({
|
|
@@ -4766,20 +5172,20 @@ var SidebarItemChevron = styled34(Box18, {
|
|
|
4766
5172
|
display: "flex",
|
|
4767
5173
|
alignItems: "center"
|
|
4768
5174
|
});
|
|
4769
|
-
var SidebarItemPopover = styled34(
|
|
5175
|
+
var SidebarItemPopover = styled34(Popover4, {
|
|
4770
5176
|
name: "MuiSidebar",
|
|
4771
5177
|
slot: "ItemPopover"
|
|
4772
5178
|
})({
|
|
4773
5179
|
pointerEvents: "none"
|
|
4774
5180
|
});
|
|
4775
|
-
var SidebarItemPopoverList = styled34(
|
|
5181
|
+
var SidebarItemPopoverList = styled34(MenuList2, {
|
|
4776
5182
|
name: "MuiSidebar",
|
|
4777
5183
|
slot: "ItemPopoverList"
|
|
4778
5184
|
})(({ theme }) => ({
|
|
4779
5185
|
padding: theme.spacing(0.5),
|
|
4780
5186
|
pointerEvents: "auto"
|
|
4781
5187
|
}));
|
|
4782
|
-
var SidebarItemPopoverButton = styled34(
|
|
5188
|
+
var SidebarItemPopoverButton = styled34(MenuItem5, {
|
|
4783
5189
|
name: "MuiSidebar",
|
|
4784
5190
|
slot: "ItemPopoverButton"
|
|
4785
5191
|
})(({ theme }) => ({
|
|
@@ -4803,9 +5209,9 @@ var CHILD_DISPLAY_NAMES = [
|
|
|
4803
5209
|
var separateChildren2 = (children) => {
|
|
4804
5210
|
const composableChildren = [];
|
|
4805
5211
|
const nestedItems = [];
|
|
4806
|
-
|
|
5212
|
+
React25.Children.toArray(children).forEach((child) => {
|
|
4807
5213
|
var _a;
|
|
4808
|
-
if (
|
|
5214
|
+
if (React25.isValidElement(child)) {
|
|
4809
5215
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4810
5216
|
if (displayName && CHILD_DISPLAY_NAMES.includes(displayName)) {
|
|
4811
5217
|
composableChildren.push(child);
|
|
@@ -4820,9 +5226,9 @@ var separateChildren2 = (children) => {
|
|
|
4820
5226
|
};
|
|
4821
5227
|
var getTooltipLabel = (children) => {
|
|
4822
5228
|
let tooltipLabel = "";
|
|
4823
|
-
|
|
5229
|
+
React25.Children.forEach(children, (child) => {
|
|
4824
5230
|
var _a;
|
|
4825
|
-
if (
|
|
5231
|
+
if (React25.isValidElement(child)) {
|
|
4826
5232
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4827
5233
|
const props = child.props;
|
|
4828
5234
|
if (displayName === "SidebarItemLabel" && props.children) {
|
|
@@ -4835,9 +5241,9 @@ var getTooltipLabel = (children) => {
|
|
|
4835
5241
|
var extractItemContent = (itemChildren) => {
|
|
4836
5242
|
let icon = null;
|
|
4837
5243
|
let label = "";
|
|
4838
|
-
|
|
5244
|
+
React25.Children.forEach(itemChildren, (child) => {
|
|
4839
5245
|
var _a;
|
|
4840
|
-
if (
|
|
5246
|
+
if (React25.isValidElement(child)) {
|
|
4841
5247
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4842
5248
|
const props = child.props;
|
|
4843
5249
|
if (displayName === "SidebarItemIcon") {
|
|
@@ -4861,33 +5267,33 @@ var SidebarItem = ({
|
|
|
4861
5267
|
const hasNestedItems = nestedItems.length > 0;
|
|
4862
5268
|
const isActive = activeItem === id;
|
|
4863
5269
|
const isExpanded = expandedMenus[id] || false;
|
|
4864
|
-
const hasActiveChild =
|
|
5270
|
+
const hasActiveChild = React25.useMemo(() => {
|
|
4865
5271
|
if (!hasNestedItems || !activeItem) return false;
|
|
4866
5272
|
return nestedItems.some((child) => {
|
|
4867
|
-
if (
|
|
5273
|
+
if (React25.isValidElement(child)) {
|
|
4868
5274
|
return child.props.id === activeItem;
|
|
4869
5275
|
}
|
|
4870
5276
|
return false;
|
|
4871
5277
|
});
|
|
4872
5278
|
}, [hasNestedItems, nestedItems, activeItem]);
|
|
4873
|
-
const [popoverAnchor, setPopoverAnchor] =
|
|
4874
|
-
const [popoverOpenedByClick, setPopoverOpenedByClick] =
|
|
4875
|
-
const closeTimeoutRef =
|
|
5279
|
+
const [popoverAnchor, setPopoverAnchor] = React25.useState(null);
|
|
5280
|
+
const [popoverOpenedByClick, setPopoverOpenedByClick] = React25.useState(false);
|
|
5281
|
+
const closeTimeoutRef = React25.useRef(null);
|
|
4876
5282
|
const popoverOpen = Boolean(popoverAnchor);
|
|
4877
|
-
const popoverId =
|
|
4878
|
-
const clearCloseTimeout =
|
|
5283
|
+
const popoverId = React25.useId();
|
|
5284
|
+
const clearCloseTimeout = React25.useCallback(() => {
|
|
4879
5285
|
if (closeTimeoutRef.current != null) {
|
|
4880
5286
|
clearTimeout(closeTimeoutRef.current);
|
|
4881
5287
|
closeTimeoutRef.current = null;
|
|
4882
5288
|
}
|
|
4883
5289
|
}, []);
|
|
4884
|
-
const closePopover =
|
|
5290
|
+
const closePopover = React25.useCallback(() => {
|
|
4885
5291
|
clearCloseTimeout();
|
|
4886
5292
|
setPopoverAnchor(null);
|
|
4887
5293
|
setPopoverOpenedByClick(false);
|
|
4888
5294
|
}, [clearCloseTimeout]);
|
|
4889
|
-
|
|
4890
|
-
|
|
5295
|
+
React25.useEffect(() => () => clearCloseTimeout(), [clearCloseTimeout]);
|
|
5296
|
+
React25.useEffect(() => {
|
|
4891
5297
|
if (!collapsed) {
|
|
4892
5298
|
closePopover();
|
|
4893
5299
|
}
|
|
@@ -4937,7 +5343,7 @@ var SidebarItem = ({
|
|
|
4937
5343
|
const tooltipLabel = getTooltipLabel(children);
|
|
4938
5344
|
const ownerState = { collapsed, depth };
|
|
4939
5345
|
const shouldShowSelected = isActive && !hasNestedItems || collapsed && hasActiveChild;
|
|
4940
|
-
const buttonContent = /* @__PURE__ */
|
|
5346
|
+
const buttonContent = /* @__PURE__ */ jsx50(
|
|
4941
5347
|
SidebarItemButton,
|
|
4942
5348
|
{
|
|
4943
5349
|
selected: shouldShowSelected,
|
|
@@ -4948,21 +5354,21 @@ var SidebarItem = ({
|
|
|
4948
5354
|
"aria-expanded": hasNestedItems ? collapsed ? popoverOpen : isExpanded : void 0,
|
|
4949
5355
|
"aria-haspopup": collapsed && hasNestedItems ? "menu" : void 0,
|
|
4950
5356
|
"aria-controls": popoverOpen ? popoverId : void 0,
|
|
4951
|
-
children: /* @__PURE__ */
|
|
5357
|
+
children: /* @__PURE__ */ jsxs18(SidebarItemProvider, { value: contextValue, children: [
|
|
4952
5358
|
composableChildren,
|
|
4953
|
-
!collapsed && hasNestedItems && /* @__PURE__ */
|
|
4954
|
-
!collapsed && !hasNestedItems && /* @__PURE__ */
|
|
5359
|
+
!collapsed && hasNestedItems && /* @__PURE__ */ jsx50(SidebarItemChevron, { "aria-hidden": "true", children: isExpanded ? /* @__PURE__ */ jsx50(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx50(ChevronDown3, { size: 16 }) }),
|
|
5360
|
+
!collapsed && !hasNestedItems && /* @__PURE__ */ jsx50(Box20, { sx: { ml: "auto", width: 16, pl: 1 } })
|
|
4955
5361
|
] })
|
|
4956
5362
|
}
|
|
4957
5363
|
);
|
|
4958
|
-
const wrappedContent = link ? /* @__PURE__ */
|
|
5364
|
+
const wrappedContent = link ? /* @__PURE__ */ jsx50(Fragment7, { children: React25.cloneElement(link, {}, buttonContent) }) : buttonContent;
|
|
4959
5365
|
const collapsedWithNested = collapsed && hasNestedItems;
|
|
4960
5366
|
const handlePopoverItemClick = (itemId) => {
|
|
4961
5367
|
onSelect == null ? void 0 : onSelect(itemId);
|
|
4962
5368
|
closePopover();
|
|
4963
5369
|
};
|
|
4964
|
-
return /* @__PURE__ */
|
|
4965
|
-
/* @__PURE__ */
|
|
5370
|
+
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
5371
|
+
/* @__PURE__ */ jsx50(
|
|
4966
5372
|
SidebarItemRoot,
|
|
4967
5373
|
{
|
|
4968
5374
|
disablePadding: true,
|
|
@@ -4970,11 +5376,11 @@ var SidebarItem = ({
|
|
|
4970
5376
|
onMouseLeave: handleMouseLeave,
|
|
4971
5377
|
children: collapsed ? (
|
|
4972
5378
|
// When collapsed: show tooltip only for items without nested children
|
|
4973
|
-
collapsedWithNested ? wrappedContent : /* @__PURE__ */
|
|
5379
|
+
collapsedWithNested ? wrappedContent : /* @__PURE__ */ jsx50(Tooltip6, { title: tooltipLabel, placement: "right", arrow: true, children: wrappedContent })
|
|
4974
5380
|
) : wrappedContent
|
|
4975
5381
|
}
|
|
4976
5382
|
),
|
|
4977
|
-
collapsedWithNested && /* @__PURE__ */
|
|
5383
|
+
collapsedWithNested && /* @__PURE__ */ jsx50(
|
|
4978
5384
|
SidebarItemPopover,
|
|
4979
5385
|
{
|
|
4980
5386
|
open: popoverOpen,
|
|
@@ -4991,25 +5397,25 @@ var SidebarItem = ({
|
|
|
4991
5397
|
onMouseLeave: handleMouseLeave
|
|
4992
5398
|
}
|
|
4993
5399
|
},
|
|
4994
|
-
children: /* @__PURE__ */
|
|
5400
|
+
children: /* @__PURE__ */ jsx50(
|
|
4995
5401
|
SidebarItemPopoverList,
|
|
4996
5402
|
{
|
|
4997
5403
|
id: popoverId,
|
|
4998
5404
|
autoFocusItem: popoverOpen && popoverOpenedByClick,
|
|
4999
5405
|
disablePadding: true,
|
|
5000
5406
|
children: nestedItems.map((child, index) => {
|
|
5001
|
-
if (
|
|
5407
|
+
if (React25.isValidElement(child)) {
|
|
5002
5408
|
const childProps = child.props;
|
|
5003
5409
|
const { icon, label } = extractItemContent(childProps.children);
|
|
5004
5410
|
const isItemActive = activeItem === childProps.id;
|
|
5005
|
-
return /* @__PURE__ */
|
|
5411
|
+
return /* @__PURE__ */ jsxs18(
|
|
5006
5412
|
SidebarItemPopoverButton,
|
|
5007
5413
|
{
|
|
5008
5414
|
selected: isItemActive,
|
|
5009
5415
|
onClick: () => handlePopoverItemClick(childProps.id),
|
|
5010
5416
|
children: [
|
|
5011
|
-
icon && /* @__PURE__ */
|
|
5012
|
-
/* @__PURE__ */
|
|
5417
|
+
icon && /* @__PURE__ */ jsx50(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
|
|
5418
|
+
/* @__PURE__ */ jsx50(ListItemText2, { primary: label })
|
|
5013
5419
|
]
|
|
5014
5420
|
},
|
|
5015
5421
|
childProps.id || index
|
|
@@ -5021,9 +5427,9 @@ var SidebarItem = ({
|
|
|
5021
5427
|
)
|
|
5022
5428
|
}
|
|
5023
5429
|
),
|
|
5024
|
-
hasNestedItems && !collapsed && /* @__PURE__ */
|
|
5025
|
-
if (
|
|
5026
|
-
return
|
|
5430
|
+
hasNestedItems && !collapsed && /* @__PURE__ */ jsx50(Collapse, { component: "li", in: isExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx50(List2, { disablePadding: true, children: nestedItems.map((child, index) => {
|
|
5431
|
+
if (React25.isValidElement(child)) {
|
|
5432
|
+
return React25.cloneElement(child, {
|
|
5027
5433
|
key: child.key || index,
|
|
5028
5434
|
depth: depth + 1
|
|
5029
5435
|
});
|
|
@@ -5035,11 +5441,11 @@ var SidebarItem = ({
|
|
|
5035
5441
|
SidebarItem.displayName = "SidebarItem";
|
|
5036
5442
|
|
|
5037
5443
|
// src/components/Sidebar/SidebarFooter.tsx
|
|
5038
|
-
import
|
|
5444
|
+
import Box21 from "@mui/material/Box";
|
|
5039
5445
|
import Divider4 from "@mui/material/Divider";
|
|
5040
5446
|
import { styled as styled35 } from "@mui/material/styles";
|
|
5041
|
-
import { Fragment as
|
|
5042
|
-
var SidebarFooterRoot = styled35(
|
|
5447
|
+
import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5448
|
+
var SidebarFooterRoot = styled35(Box21, {
|
|
5043
5449
|
name: "MuiSidebar",
|
|
5044
5450
|
slot: "Footer"
|
|
5045
5451
|
})(({ theme }) => ({
|
|
@@ -5051,24 +5457,24 @@ var SidebarFooter = ({
|
|
|
5051
5457
|
showDivider = true,
|
|
5052
5458
|
sx
|
|
5053
5459
|
}) => {
|
|
5054
|
-
return /* @__PURE__ */
|
|
5055
|
-
showDivider && /* @__PURE__ */
|
|
5056
|
-
/* @__PURE__ */
|
|
5460
|
+
return /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
5461
|
+
showDivider && /* @__PURE__ */ jsx51(Divider4, {}),
|
|
5462
|
+
/* @__PURE__ */ jsx51(SidebarFooterRoot, { sx, children })
|
|
5057
5463
|
] });
|
|
5058
5464
|
};
|
|
5059
5465
|
|
|
5060
5466
|
// src/components/Sidebar/SidebarUser.tsx
|
|
5061
|
-
import * as
|
|
5062
|
-
import
|
|
5467
|
+
import * as React26 from "react";
|
|
5468
|
+
import Box22 from "@mui/material/Box";
|
|
5063
5469
|
import ListItemButton2 from "@mui/material/ListItemButton";
|
|
5064
|
-
import
|
|
5470
|
+
import Tooltip7 from "@mui/material/Tooltip";
|
|
5065
5471
|
import Divider5 from "@mui/material/Divider";
|
|
5066
5472
|
import { styled as styled39 } from "@mui/material/styles";
|
|
5067
5473
|
|
|
5068
5474
|
// src/components/Sidebar/SidebarUserAvatar.tsx
|
|
5069
5475
|
import Avatar2 from "@mui/material/Avatar";
|
|
5070
5476
|
import { styled as styled36 } from "@mui/material/styles";
|
|
5071
|
-
import { jsx as
|
|
5477
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
5072
5478
|
var SidebarUserAvatarRoot = styled36(Avatar2, {
|
|
5073
5479
|
name: "MuiSidebar",
|
|
5074
5480
|
slot: "UserAvatar"
|
|
@@ -5085,15 +5491,15 @@ var SidebarUserAvatar = ({
|
|
|
5085
5491
|
alt,
|
|
5086
5492
|
sx
|
|
5087
5493
|
}) => {
|
|
5088
|
-
return /* @__PURE__ */
|
|
5494
|
+
return /* @__PURE__ */ jsx52(SidebarUserAvatarRoot, { src, alt, sx, children });
|
|
5089
5495
|
};
|
|
5090
5496
|
SidebarUserAvatar.displayName = "SidebarUserAvatar";
|
|
5091
5497
|
|
|
5092
5498
|
// src/components/Sidebar/SidebarUserName.tsx
|
|
5093
|
-
import
|
|
5499
|
+
import Typography13 from "@mui/material/Typography";
|
|
5094
5500
|
import { styled as styled37 } from "@mui/material/styles";
|
|
5095
|
-
import { jsx as
|
|
5096
|
-
var SidebarUserNameRoot = styled37(
|
|
5501
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5502
|
+
var SidebarUserNameRoot = styled37(Typography13, {
|
|
5097
5503
|
name: "MuiSidebar",
|
|
5098
5504
|
slot: "UserName"
|
|
5099
5505
|
})({
|
|
@@ -5110,15 +5516,15 @@ var SidebarUserName = ({
|
|
|
5110
5516
|
if (collapsed) {
|
|
5111
5517
|
return null;
|
|
5112
5518
|
}
|
|
5113
|
-
return /* @__PURE__ */
|
|
5519
|
+
return /* @__PURE__ */ jsx53(SidebarUserNameRoot, { variant: "body2", sx, children });
|
|
5114
5520
|
};
|
|
5115
5521
|
SidebarUserName.displayName = "SidebarUserName";
|
|
5116
5522
|
|
|
5117
5523
|
// src/components/Sidebar/SidebarUserEmail.tsx
|
|
5118
|
-
import
|
|
5524
|
+
import Typography14 from "@mui/material/Typography";
|
|
5119
5525
|
import { styled as styled38 } from "@mui/material/styles";
|
|
5120
|
-
import { jsx as
|
|
5121
|
-
var SidebarUserEmailRoot = styled38(
|
|
5526
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5527
|
+
var SidebarUserEmailRoot = styled38(Typography14, {
|
|
5122
5528
|
name: "MuiSidebar",
|
|
5123
5529
|
slot: "UserEmail"
|
|
5124
5530
|
})(({ theme }) => ({
|
|
@@ -5136,13 +5542,13 @@ var SidebarUserEmail = ({
|
|
|
5136
5542
|
if (collapsed) {
|
|
5137
5543
|
return null;
|
|
5138
5544
|
}
|
|
5139
|
-
return /* @__PURE__ */
|
|
5545
|
+
return /* @__PURE__ */ jsx54(SidebarUserEmailRoot, { variant: "caption", sx, children });
|
|
5140
5546
|
};
|
|
5141
5547
|
SidebarUserEmail.displayName = "SidebarUserEmail";
|
|
5142
5548
|
|
|
5143
5549
|
// src/components/Sidebar/SidebarUser.tsx
|
|
5144
|
-
import { Fragment as
|
|
5145
|
-
var SidebarUserRoot = styled39(
|
|
5550
|
+
import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5551
|
+
var SidebarUserRoot = styled39(Box22, {
|
|
5146
5552
|
name: "MuiSidebar",
|
|
5147
5553
|
slot: "User"
|
|
5148
5554
|
})(({ theme }) => ({
|
|
@@ -5165,7 +5571,7 @@ var SidebarUserButton = styled39(ListItemButton2, {
|
|
|
5165
5571
|
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
5166
5572
|
})
|
|
5167
5573
|
}));
|
|
5168
|
-
var SidebarUserTextContainer = styled39(
|
|
5574
|
+
var SidebarUserTextContainer = styled39(Box22, {
|
|
5169
5575
|
name: "MuiSidebar",
|
|
5170
5576
|
slot: "UserTextContainer",
|
|
5171
5577
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -5183,9 +5589,9 @@ var SidebarUserTextContainer = styled39(Box20, {
|
|
|
5183
5589
|
var separateChildren3 = (children) => {
|
|
5184
5590
|
let avatarChild = null;
|
|
5185
5591
|
const textChildren = [];
|
|
5186
|
-
|
|
5592
|
+
React26.Children.forEach(children, (child) => {
|
|
5187
5593
|
var _a;
|
|
5188
|
-
if (
|
|
5594
|
+
if (React26.isValidElement(child)) {
|
|
5189
5595
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5190
5596
|
if (displayName === "SidebarUserAvatar") {
|
|
5191
5597
|
avatarChild = child;
|
|
@@ -5198,9 +5604,9 @@ var separateChildren3 = (children) => {
|
|
|
5198
5604
|
};
|
|
5199
5605
|
var getTooltipText = (children) => {
|
|
5200
5606
|
let tooltipText = "";
|
|
5201
|
-
|
|
5607
|
+
React26.Children.forEach(children, (child) => {
|
|
5202
5608
|
var _a;
|
|
5203
|
-
if (
|
|
5609
|
+
if (React26.isValidElement(child)) {
|
|
5204
5610
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5205
5611
|
const props = child.props;
|
|
5206
5612
|
if (displayName === "SidebarUserName" && props.children) {
|
|
@@ -5220,22 +5626,22 @@ var SidebarUser = ({
|
|
|
5220
5626
|
const { avatarChild, textChildren } = separateChildren3(children);
|
|
5221
5627
|
const tooltipText = getTooltipText(children);
|
|
5222
5628
|
const ownerState = { collapsed };
|
|
5223
|
-
const content = /* @__PURE__ */
|
|
5629
|
+
const content = /* @__PURE__ */ jsxs20(SidebarUserButton, { onClick, ownerState, children: [
|
|
5224
5630
|
avatarChild,
|
|
5225
|
-
/* @__PURE__ */
|
|
5631
|
+
/* @__PURE__ */ jsx55(SidebarUserTextContainer, { collapsed, children: textChildren })
|
|
5226
5632
|
] });
|
|
5227
|
-
return /* @__PURE__ */
|
|
5228
|
-
showDivider && /* @__PURE__ */
|
|
5229
|
-
/* @__PURE__ */
|
|
5633
|
+
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
5634
|
+
showDivider && /* @__PURE__ */ jsx55(Divider5, {}),
|
|
5635
|
+
/* @__PURE__ */ jsx55(SidebarUserRoot, { sx, children: collapsed ? /* @__PURE__ */ jsx55(Tooltip7, { title: tooltipText, placement: "right", arrow: true, children: content }) : content })
|
|
5230
5636
|
] });
|
|
5231
5637
|
};
|
|
5232
5638
|
SidebarUser.displayName = "SidebarUser";
|
|
5233
5639
|
|
|
5234
5640
|
// src/components/Sidebar/Sidebar.tsx
|
|
5235
|
-
import { jsx as
|
|
5641
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5236
5642
|
var SIDEBAR_WIDTH = 250;
|
|
5237
5643
|
var COLLAPSED_SIDEBAR_WIDTH = 64;
|
|
5238
|
-
var SidebarRootStyled = styled40(
|
|
5644
|
+
var SidebarRootStyled = styled40(Box23, {
|
|
5239
5645
|
name: "MuiSidebar",
|
|
5240
5646
|
slot: "Root",
|
|
5241
5647
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5270,10 +5676,10 @@ var Sidebar = ({
|
|
|
5270
5676
|
sx
|
|
5271
5677
|
}) => {
|
|
5272
5678
|
var _a, _b, _c;
|
|
5273
|
-
const appShellContext =
|
|
5679
|
+
const appShellContext = React27.useContext(AppShellContext);
|
|
5274
5680
|
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
5275
5681
|
const activeItem = activeItemProp != null ? activeItemProp : appShellContext == null ? void 0 : appShellContext.state.activeMenuItem;
|
|
5276
|
-
const expandedMenus =
|
|
5682
|
+
const expandedMenus = React27.useMemo(
|
|
5277
5683
|
() => {
|
|
5278
5684
|
var _a2;
|
|
5279
5685
|
return (_a2 = expandedMenusProp != null ? expandedMenusProp : appShellContext == null ? void 0 : appShellContext.state.expandedMenus) != null ? _a2 : {};
|
|
@@ -5284,7 +5690,7 @@ var Sidebar = ({
|
|
|
5284
5690
|
const onToggleExpand = onToggleExpandProp != null ? onToggleExpandProp : appShellContext == null ? void 0 : appShellContext.actions.toggleMenu;
|
|
5285
5691
|
const width = (_b = widthProp != null ? widthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarWidth) != null ? _b : SIDEBAR_WIDTH;
|
|
5286
5692
|
const collapsedWidth = (_c = collapsedWidthProp != null ? collapsedWidthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsedWidth) != null ? _c : COLLAPSED_SIDEBAR_WIDTH;
|
|
5287
|
-
const contextValue =
|
|
5693
|
+
const contextValue = React27.useMemo(
|
|
5288
5694
|
() => ({
|
|
5289
5695
|
collapsed,
|
|
5290
5696
|
activeItem,
|
|
@@ -5295,7 +5701,7 @@ var Sidebar = ({
|
|
|
5295
5701
|
[collapsed, activeItem, expandedMenus, onSelect, onToggleExpand]
|
|
5296
5702
|
);
|
|
5297
5703
|
const ownerState = { collapsed, width, collapsedWidth };
|
|
5298
|
-
return /* @__PURE__ */
|
|
5704
|
+
return /* @__PURE__ */ jsx56(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx56(SidebarRootStyled, { component: "aside", ownerState, sx, children }) });
|
|
5299
5705
|
};
|
|
5300
5706
|
Sidebar.Nav = SidebarNav;
|
|
5301
5707
|
Sidebar.Category = SidebarCategory;
|
|
@@ -5312,17 +5718,17 @@ Sidebar.UserEmail = SidebarUserEmail;
|
|
|
5312
5718
|
Sidebar.displayName = "Sidebar";
|
|
5313
5719
|
|
|
5314
5720
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
5315
|
-
import * as
|
|
5316
|
-
import
|
|
5721
|
+
import * as React33 from "react";
|
|
5722
|
+
import Box32 from "@mui/material/Box";
|
|
5317
5723
|
import Drawer from "@mui/material/Drawer";
|
|
5318
5724
|
import { styled as styled56 } from "@mui/material/styles";
|
|
5319
5725
|
import { visuallyHidden as visuallyHidden3 } from "@mui/utils";
|
|
5320
5726
|
|
|
5321
5727
|
// src/components/NotificationPanel/context.ts
|
|
5322
|
-
import * as
|
|
5323
|
-
var NotificationPanelContext =
|
|
5728
|
+
import * as React28 from "react";
|
|
5729
|
+
var NotificationPanelContext = React28.createContext(null);
|
|
5324
5730
|
var useNotificationPanel = () => {
|
|
5325
|
-
const context =
|
|
5731
|
+
const context = React28.useContext(NotificationPanelContext);
|
|
5326
5732
|
if (!context) {
|
|
5327
5733
|
throw new Error(
|
|
5328
5734
|
"NotificationPanel compound components must be used within NotificationPanel"
|
|
@@ -5332,11 +5738,11 @@ var useNotificationPanel = () => {
|
|
|
5332
5738
|
};
|
|
5333
5739
|
|
|
5334
5740
|
// src/components/NotificationPanel/NotificationHeader.tsx
|
|
5335
|
-
import * as
|
|
5336
|
-
import
|
|
5337
|
-
import { styled as styled41 } from "@mui/material/styles";
|
|
5338
|
-
import { jsx as
|
|
5339
|
-
var NotificationHeaderRoot = styled41(
|
|
5741
|
+
import * as React29 from "react";
|
|
5742
|
+
import Box24 from "@mui/material/Box";
|
|
5743
|
+
import { styled as styled41 } from "@mui/material/styles";
|
|
5744
|
+
import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5745
|
+
var NotificationHeaderRoot = styled41(Box24, {
|
|
5340
5746
|
name: "MuiNotificationPanel",
|
|
5341
5747
|
slot: "Header"
|
|
5342
5748
|
})(({ theme }) => ({
|
|
@@ -5346,7 +5752,7 @@ var NotificationHeaderRoot = styled41(Box22, {
|
|
|
5346
5752
|
padding: theme.spacing(2),
|
|
5347
5753
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
5348
5754
|
}));
|
|
5349
|
-
var NotificationHeaderContent = styled41(
|
|
5755
|
+
var NotificationHeaderContent = styled41(Box24, {
|
|
5350
5756
|
name: "MuiNotificationPanel",
|
|
5351
5757
|
slot: "HeaderContent"
|
|
5352
5758
|
})(({ theme }) => ({
|
|
@@ -5357,9 +5763,9 @@ var NotificationHeaderContent = styled41(Box22, {
|
|
|
5357
5763
|
var separateChildren4 = (children) => {
|
|
5358
5764
|
const leftChildren = [];
|
|
5359
5765
|
let closeChild = null;
|
|
5360
|
-
|
|
5766
|
+
React29.Children.forEach(children, (child) => {
|
|
5361
5767
|
var _a;
|
|
5362
|
-
if (
|
|
5768
|
+
if (React29.isValidElement(child)) {
|
|
5363
5769
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5364
5770
|
if (displayName === "NotificationHeaderClose") {
|
|
5365
5771
|
closeChild = child;
|
|
@@ -5377,18 +5783,18 @@ var NotificationHeader = ({
|
|
|
5377
5783
|
sx
|
|
5378
5784
|
}) => {
|
|
5379
5785
|
const { leftChildren, closeChild } = separateChildren4(children);
|
|
5380
|
-
return /* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5786
|
+
return /* @__PURE__ */ jsxs21(NotificationHeaderRoot, { sx, children: [
|
|
5787
|
+
/* @__PURE__ */ jsx57(NotificationHeaderContent, { children: leftChildren }),
|
|
5382
5788
|
closeChild
|
|
5383
5789
|
] });
|
|
5384
5790
|
};
|
|
5385
5791
|
NotificationHeader.displayName = "NotificationHeader";
|
|
5386
5792
|
|
|
5387
5793
|
// src/components/NotificationPanel/NotificationHeaderIcon.tsx
|
|
5388
|
-
import
|
|
5794
|
+
import Box25 from "@mui/material/Box";
|
|
5389
5795
|
import { styled as styled42 } from "@mui/material/styles";
|
|
5390
|
-
import { jsx as
|
|
5391
|
-
var NotificationHeaderIconRoot = styled42(
|
|
5796
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5797
|
+
var NotificationHeaderIconRoot = styled42(Box25, {
|
|
5392
5798
|
name: "MuiNotificationPanel",
|
|
5393
5799
|
slot: "HeaderIcon"
|
|
5394
5800
|
})({
|
|
@@ -5399,15 +5805,15 @@ var NotificationHeaderIcon = ({
|
|
|
5399
5805
|
children,
|
|
5400
5806
|
sx
|
|
5401
5807
|
}) => {
|
|
5402
|
-
return /* @__PURE__ */
|
|
5808
|
+
return /* @__PURE__ */ jsx58(NotificationHeaderIconRoot, { sx, children });
|
|
5403
5809
|
};
|
|
5404
5810
|
NotificationHeaderIcon.displayName = "NotificationHeaderIcon";
|
|
5405
5811
|
|
|
5406
5812
|
// src/components/NotificationPanel/NotificationHeaderTitle.tsx
|
|
5407
|
-
import
|
|
5813
|
+
import Typography15 from "@mui/material/Typography";
|
|
5408
5814
|
import { styled as styled43 } from "@mui/material/styles";
|
|
5409
|
-
import { jsx as
|
|
5410
|
-
var NotificationHeaderTitleRoot = styled43(
|
|
5815
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
5816
|
+
var NotificationHeaderTitleRoot = styled43(Typography15, {
|
|
5411
5817
|
name: "MuiNotificationPanel",
|
|
5412
5818
|
slot: "HeaderTitle"
|
|
5413
5819
|
})({
|
|
@@ -5417,14 +5823,14 @@ var NotificationHeaderTitle = ({
|
|
|
5417
5823
|
children,
|
|
5418
5824
|
sx
|
|
5419
5825
|
}) => {
|
|
5420
|
-
return /* @__PURE__ */
|
|
5826
|
+
return /* @__PURE__ */ jsx59(NotificationHeaderTitleRoot, { variant: "h6", sx, children });
|
|
5421
5827
|
};
|
|
5422
5828
|
NotificationHeaderTitle.displayName = "NotificationHeaderTitle";
|
|
5423
5829
|
|
|
5424
5830
|
// src/components/NotificationPanel/NotificationHeaderBadge.tsx
|
|
5425
5831
|
import Chip2 from "@mui/material/Chip";
|
|
5426
5832
|
import { styled as styled44 } from "@mui/material/styles";
|
|
5427
|
-
import { jsx as
|
|
5833
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
5428
5834
|
var NotificationHeaderBadgeRoot = styled44(Chip2, {
|
|
5429
5835
|
name: "MuiNotificationPanel",
|
|
5430
5836
|
slot: "HeaderBadge"
|
|
@@ -5440,7 +5846,7 @@ var NotificationHeaderBadge = ({
|
|
|
5440
5846
|
if (!children || children === 0 || children === "0") {
|
|
5441
5847
|
return null;
|
|
5442
5848
|
}
|
|
5443
|
-
return /* @__PURE__ */
|
|
5849
|
+
return /* @__PURE__ */ jsx60(NotificationHeaderBadgeRoot, { label: children, size: "small", color, sx });
|
|
5444
5850
|
};
|
|
5445
5851
|
NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
5446
5852
|
|
|
@@ -5448,7 +5854,7 @@ NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
|
5448
5854
|
import IconButton5 from "@mui/material/IconButton";
|
|
5449
5855
|
import { styled as styled45 } from "@mui/material/styles";
|
|
5450
5856
|
import { X as X2 } from "@wso2/oxygen-ui-icons-react";
|
|
5451
|
-
import { jsx as
|
|
5857
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
5452
5858
|
var NotificationHeaderCloseRoot = styled45(IconButton5, {
|
|
5453
5859
|
name: "MuiNotificationPanel",
|
|
5454
5860
|
slot: "HeaderClose"
|
|
@@ -5466,27 +5872,27 @@ var NotificationHeaderClose = ({
|
|
|
5466
5872
|
onClose == null ? void 0 : onClose();
|
|
5467
5873
|
}
|
|
5468
5874
|
};
|
|
5469
|
-
return /* @__PURE__ */
|
|
5875
|
+
return /* @__PURE__ */ jsx61(
|
|
5470
5876
|
NotificationHeaderCloseRoot,
|
|
5471
5877
|
{
|
|
5472
5878
|
onClick: handleClick,
|
|
5473
5879
|
size: "small",
|
|
5474
5880
|
sx,
|
|
5475
5881
|
"aria-label": "Close notifications",
|
|
5476
|
-
children: children || /* @__PURE__ */
|
|
5882
|
+
children: children || /* @__PURE__ */ jsx61(X2, { size: 20, "aria-hidden": "true" })
|
|
5477
5883
|
}
|
|
5478
5884
|
);
|
|
5479
5885
|
};
|
|
5480
5886
|
NotificationHeaderClose.displayName = "NotificationHeaderClose";
|
|
5481
5887
|
|
|
5482
5888
|
// src/components/NotificationPanel/NotificationTabs.tsx
|
|
5483
|
-
import
|
|
5889
|
+
import Box26 from "@mui/material/Box";
|
|
5484
5890
|
import Tabs from "@mui/material/Tabs";
|
|
5485
5891
|
import Tab from "@mui/material/Tab";
|
|
5486
5892
|
import Chip3 from "@mui/material/Chip";
|
|
5487
5893
|
import { styled as styled46 } from "@mui/material/styles";
|
|
5488
|
-
import { jsx as
|
|
5489
|
-
var NotificationTabsRoot = styled46(
|
|
5894
|
+
import { jsx as jsx62, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5895
|
+
var NotificationTabsRoot = styled46(Box26, {
|
|
5490
5896
|
name: "MuiNotificationPanel",
|
|
5491
5897
|
slot: "Tabs"
|
|
5492
5898
|
})(({ theme }) => ({
|
|
@@ -5503,7 +5909,7 @@ var NotificationTabsInner = styled46(Tabs, {
|
|
|
5503
5909
|
fontWeight: 500
|
|
5504
5910
|
}
|
|
5505
5911
|
});
|
|
5506
|
-
var NotificationTabLabel = styled46(
|
|
5912
|
+
var NotificationTabLabel = styled46(Box26, {
|
|
5507
5913
|
name: "MuiNotificationPanel",
|
|
5508
5914
|
slot: "TabLabel"
|
|
5509
5915
|
})(({ theme }) => ({
|
|
@@ -5524,18 +5930,18 @@ var NotificationTabs = ({
|
|
|
5524
5930
|
onChange,
|
|
5525
5931
|
sx
|
|
5526
5932
|
}) => {
|
|
5527
|
-
return /* @__PURE__ */
|
|
5933
|
+
return /* @__PURE__ */ jsx62(NotificationTabsRoot, { sx, children: /* @__PURE__ */ jsx62(
|
|
5528
5934
|
NotificationTabsInner,
|
|
5529
5935
|
{
|
|
5530
5936
|
value,
|
|
5531
5937
|
onChange: (_, newValue) => onChange(newValue),
|
|
5532
5938
|
variant: "fullWidth",
|
|
5533
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
5939
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx62(
|
|
5534
5940
|
Tab,
|
|
5535
5941
|
{
|
|
5536
|
-
label: /* @__PURE__ */
|
|
5942
|
+
label: /* @__PURE__ */ jsxs22(NotificationTabLabel, { children: [
|
|
5537
5943
|
tab.label,
|
|
5538
|
-
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */
|
|
5944
|
+
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */ jsx62(
|
|
5539
5945
|
NotificationTabCount,
|
|
5540
5946
|
{
|
|
5541
5947
|
label: tab.count,
|
|
@@ -5553,12 +5959,12 @@ var NotificationTabs = ({
|
|
|
5553
5959
|
};
|
|
5554
5960
|
|
|
5555
5961
|
// src/components/NotificationPanel/NotificationActions.tsx
|
|
5556
|
-
import
|
|
5557
|
-
import
|
|
5962
|
+
import Box27 from "@mui/material/Box";
|
|
5963
|
+
import Button4 from "@mui/material/Button";
|
|
5558
5964
|
import { styled as styled47 } from "@mui/material/styles";
|
|
5559
5965
|
import { CheckCheck, Trash2 } from "@wso2/oxygen-ui-icons-react";
|
|
5560
|
-
import { jsx as
|
|
5561
|
-
var NotificationActionsRoot = styled47(
|
|
5966
|
+
import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5967
|
+
var NotificationActionsRoot = styled47(Box27, {
|
|
5562
5968
|
name: "MuiNotificationPanel",
|
|
5563
5969
|
slot: "Actions"
|
|
5564
5970
|
})(({ theme }) => ({
|
|
@@ -5570,7 +5976,7 @@ var NotificationActionsRoot = styled47(Box25, {
|
|
|
5570
5976
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
5571
5977
|
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
5572
5978
|
}));
|
|
5573
|
-
var NotificationActionButton = styled47(
|
|
5979
|
+
var NotificationActionButton = styled47(Button4, {
|
|
5574
5980
|
name: "MuiNotificationPanel",
|
|
5575
5981
|
slot: "ActionButton"
|
|
5576
5982
|
})({
|
|
@@ -5583,21 +5989,21 @@ var NotificationActions = ({
|
|
|
5583
5989
|
onClearAll,
|
|
5584
5990
|
sx
|
|
5585
5991
|
}) => {
|
|
5586
|
-
return /* @__PURE__ */
|
|
5587
|
-
hasUnread && onMarkAllRead && /* @__PURE__ */
|
|
5992
|
+
return /* @__PURE__ */ jsxs23(NotificationActionsRoot, { sx, children: [
|
|
5993
|
+
hasUnread && onMarkAllRead && /* @__PURE__ */ jsx63(
|
|
5588
5994
|
NotificationActionButton,
|
|
5589
5995
|
{
|
|
5590
5996
|
size: "small",
|
|
5591
|
-
startIcon: /* @__PURE__ */
|
|
5997
|
+
startIcon: /* @__PURE__ */ jsx63(CheckCheck, { size: 14 }),
|
|
5592
5998
|
onClick: onMarkAllRead,
|
|
5593
5999
|
children: "Mark all read"
|
|
5594
6000
|
}
|
|
5595
6001
|
),
|
|
5596
|
-
onClearAll && /* @__PURE__ */
|
|
6002
|
+
onClearAll && /* @__PURE__ */ jsx63(
|
|
5597
6003
|
NotificationActionButton,
|
|
5598
6004
|
{
|
|
5599
6005
|
size: "small",
|
|
5600
|
-
startIcon: /* @__PURE__ */
|
|
6006
|
+
startIcon: /* @__PURE__ */ jsx63(Trash2, { size: 14 }),
|
|
5601
6007
|
onClick: onClearAll,
|
|
5602
6008
|
color: "error",
|
|
5603
6009
|
children: "Clear all"
|
|
@@ -5607,13 +6013,13 @@ var NotificationActions = ({
|
|
|
5607
6013
|
};
|
|
5608
6014
|
|
|
5609
6015
|
// src/components/NotificationPanel/NotificationList.tsx
|
|
5610
|
-
import * as
|
|
5611
|
-
import
|
|
6016
|
+
import * as React30 from "react";
|
|
6017
|
+
import Box28 from "@mui/material/Box";
|
|
5612
6018
|
import List3 from "@mui/material/List";
|
|
5613
6019
|
import Divider6 from "@mui/material/Divider";
|
|
5614
6020
|
import { styled as styled48 } from "@mui/material/styles";
|
|
5615
|
-
import { jsx as
|
|
5616
|
-
var NotificationListRoot = styled48(
|
|
6021
|
+
import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6022
|
+
var NotificationListRoot = styled48(Box28, {
|
|
5617
6023
|
name: "MuiNotificationPanel",
|
|
5618
6024
|
slot: "List"
|
|
5619
6025
|
})({
|
|
@@ -5625,16 +6031,16 @@ var NotificationList = ({
|
|
|
5625
6031
|
showDividers = true,
|
|
5626
6032
|
sx
|
|
5627
6033
|
}) => {
|
|
5628
|
-
const childArray =
|
|
5629
|
-
return /* @__PURE__ */
|
|
6034
|
+
const childArray = React30.Children.toArray(children);
|
|
6035
|
+
return /* @__PURE__ */ jsx64(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx64(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs24(React30.Fragment, { children: [
|
|
5630
6036
|
child,
|
|
5631
|
-
showDividers && index < childArray.length - 1 && /* @__PURE__ */
|
|
6037
|
+
showDividers && index < childArray.length - 1 && /* @__PURE__ */ jsx64(Divider6, {})
|
|
5632
6038
|
] }, index)) }) });
|
|
5633
6039
|
};
|
|
5634
6040
|
|
|
5635
6041
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5636
|
-
import * as
|
|
5637
|
-
import
|
|
6042
|
+
import * as React32 from "react";
|
|
6043
|
+
import Box29 from "@mui/material/Box";
|
|
5638
6044
|
import ListItem2 from "@mui/material/ListItem";
|
|
5639
6045
|
import ListItemButton3 from "@mui/material/ListItemButton";
|
|
5640
6046
|
import ListItemText3 from "@mui/material/ListItemText";
|
|
@@ -5679,11 +6085,11 @@ var getNotificationTypeProps = (type) => {
|
|
|
5679
6085
|
};
|
|
5680
6086
|
|
|
5681
6087
|
// src/components/NotificationPanel/NotificationItemContext.tsx
|
|
5682
|
-
import * as
|
|
5683
|
-
import { jsx as
|
|
5684
|
-
var NotificationItemContext =
|
|
6088
|
+
import * as React31 from "react";
|
|
6089
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
6090
|
+
var NotificationItemContext = React31.createContext(null);
|
|
5685
6091
|
var useNotificationItemContext = () => {
|
|
5686
|
-
const context =
|
|
6092
|
+
const context = React31.useContext(NotificationItemContext);
|
|
5687
6093
|
if (!context) {
|
|
5688
6094
|
throw new Error(
|
|
5689
6095
|
"useNotificationItemContext must be used within a NotificationItem component"
|
|
@@ -5692,11 +6098,11 @@ var useNotificationItemContext = () => {
|
|
|
5692
6098
|
return context;
|
|
5693
6099
|
};
|
|
5694
6100
|
var NotificationItemProvider = ({ value, children }) => {
|
|
5695
|
-
return /* @__PURE__ */
|
|
6101
|
+
return /* @__PURE__ */ jsx65(NotificationItemContext.Provider, { value, children });
|
|
5696
6102
|
};
|
|
5697
6103
|
|
|
5698
6104
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5699
|
-
import { jsx as
|
|
6105
|
+
import { jsx as jsx66, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5700
6106
|
var NotificationItemRoot = styled49(ListItem2, {
|
|
5701
6107
|
name: "MuiNotificationPanel",
|
|
5702
6108
|
slot: "Item",
|
|
@@ -5722,7 +6128,7 @@ var NotificationItemDismiss = styled49(IconButton6, {
|
|
|
5722
6128
|
opacity: 1
|
|
5723
6129
|
}
|
|
5724
6130
|
});
|
|
5725
|
-
var NotificationItemFooter = styled49(
|
|
6131
|
+
var NotificationItemFooter = styled49(Box29, {
|
|
5726
6132
|
name: "MuiNotificationPanel",
|
|
5727
6133
|
slot: "ItemFooter"
|
|
5728
6134
|
})(({ theme }) => ({
|
|
@@ -5737,9 +6143,9 @@ var separateChildren5 = (children) => {
|
|
|
5737
6143
|
let messageChild = null;
|
|
5738
6144
|
let timestampChild = null;
|
|
5739
6145
|
let actionChild = null;
|
|
5740
|
-
|
|
6146
|
+
React32.Children.forEach(children, (child) => {
|
|
5741
6147
|
var _a;
|
|
5742
|
-
if (
|
|
6148
|
+
if (React32.isValidElement(child)) {
|
|
5743
6149
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5744
6150
|
switch (displayName) {
|
|
5745
6151
|
case "NotificationItemAvatar":
|
|
@@ -5789,12 +6195,12 @@ var NotificationItem = ({
|
|
|
5789
6195
|
onAction == null ? void 0 : onAction();
|
|
5790
6196
|
};
|
|
5791
6197
|
const ownerState = { read };
|
|
5792
|
-
return /* @__PURE__ */
|
|
6198
|
+
return /* @__PURE__ */ jsx66(NotificationItemProvider, { value: contextValue, children: /* @__PURE__ */ jsx66(
|
|
5793
6199
|
NotificationItemRoot,
|
|
5794
6200
|
{
|
|
5795
6201
|
disablePadding: true,
|
|
5796
6202
|
ownerState,
|
|
5797
|
-
secondaryAction: onDismiss && /* @__PURE__ */
|
|
6203
|
+
secondaryAction: onDismiss && /* @__PURE__ */ jsx66(
|
|
5798
6204
|
NotificationItemDismiss,
|
|
5799
6205
|
{
|
|
5800
6206
|
size: "small",
|
|
@@ -5803,19 +6209,19 @@ var NotificationItem = ({
|
|
|
5803
6209
|
e.stopPropagation();
|
|
5804
6210
|
onDismiss(id);
|
|
5805
6211
|
},
|
|
5806
|
-
children: /* @__PURE__ */
|
|
6212
|
+
children: /* @__PURE__ */ jsx66(X3, { size: 16, "aria-hidden": "true" })
|
|
5807
6213
|
}
|
|
5808
6214
|
),
|
|
5809
6215
|
sx,
|
|
5810
|
-
children: /* @__PURE__ */
|
|
6216
|
+
children: /* @__PURE__ */ jsxs25(NotificationItemButton, { onClick: handleClick, children: [
|
|
5811
6217
|
avatarChild,
|
|
5812
|
-
/* @__PURE__ */
|
|
6218
|
+
/* @__PURE__ */ jsx66(
|
|
5813
6219
|
ListItemText3,
|
|
5814
6220
|
{
|
|
5815
6221
|
primary: titleChild,
|
|
5816
|
-
secondary: /* @__PURE__ */
|
|
6222
|
+
secondary: /* @__PURE__ */ jsxs25(Box29, { component: "span", children: [
|
|
5817
6223
|
messageChild,
|
|
5818
|
-
/* @__PURE__ */
|
|
6224
|
+
/* @__PURE__ */ jsxs25(NotificationItemFooter, { children: [
|
|
5819
6225
|
timestampChild,
|
|
5820
6226
|
actionChild
|
|
5821
6227
|
] })
|
|
@@ -5832,7 +6238,7 @@ NotificationItem.displayName = "NotificationItem";
|
|
|
5832
6238
|
import ListItemAvatar from "@mui/material/ListItemAvatar";
|
|
5833
6239
|
import Avatar3 from "@mui/material/Avatar";
|
|
5834
6240
|
import { styled as styled50 } from "@mui/material/styles";
|
|
5835
|
-
import { jsx as
|
|
6241
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
5836
6242
|
var NotificationItemAvatarStyled = styled50(Avatar3, {
|
|
5837
6243
|
name: "MuiNotificationPanel",
|
|
5838
6244
|
slot: "ItemAvatar",
|
|
@@ -5856,16 +6262,16 @@ var NotificationItemAvatar = ({
|
|
|
5856
6262
|
color: typeProps.color,
|
|
5857
6263
|
hasChildren: !!children
|
|
5858
6264
|
};
|
|
5859
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ jsx67(ListItemAvatar, { children: /* @__PURE__ */ jsx67(NotificationItemAvatarStyled, { ownerState, sx, children: children || /* @__PURE__ */ jsx67(Icon, { size: 20 }) }) });
|
|
5860
6266
|
};
|
|
5861
6267
|
NotificationItemAvatar.displayName = "NotificationItemAvatar";
|
|
5862
6268
|
|
|
5863
6269
|
// src/components/NotificationPanel/NotificationItemTitle.tsx
|
|
5864
|
-
import
|
|
5865
|
-
import
|
|
6270
|
+
import Box30 from "@mui/material/Box";
|
|
6271
|
+
import Typography16 from "@mui/material/Typography";
|
|
5866
6272
|
import { styled as styled51 } from "@mui/material/styles";
|
|
5867
|
-
import { jsx as
|
|
5868
|
-
var NotificationItemTitleRoot = styled51(
|
|
6273
|
+
import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6274
|
+
var NotificationItemTitleRoot = styled51(Box30, {
|
|
5869
6275
|
name: "MuiNotificationPanel",
|
|
5870
6276
|
slot: "ItemTitle"
|
|
5871
6277
|
})(({ theme }) => ({
|
|
@@ -5873,7 +6279,7 @@ var NotificationItemTitleRoot = styled51(Box28, {
|
|
|
5873
6279
|
alignItems: "center",
|
|
5874
6280
|
gap: theme.spacing(1)
|
|
5875
6281
|
}));
|
|
5876
|
-
var NotificationItemTitleText = styled51(
|
|
6282
|
+
var NotificationItemTitleText = styled51(Typography16, {
|
|
5877
6283
|
name: "MuiNotificationPanel",
|
|
5878
6284
|
slot: "ItemTitleText",
|
|
5879
6285
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5881,7 +6287,7 @@ var NotificationItemTitleText = styled51(Typography14, {
|
|
|
5881
6287
|
fontWeight: ownerState.read ? 400 : 600,
|
|
5882
6288
|
flex: 1
|
|
5883
6289
|
}));
|
|
5884
|
-
var NotificationItemUnreadDot = styled51(
|
|
6290
|
+
var NotificationItemUnreadDot = styled51(Box30, {
|
|
5885
6291
|
name: "MuiNotificationPanel",
|
|
5886
6292
|
slot: "ItemUnreadDot"
|
|
5887
6293
|
})(({ theme }) => ({
|
|
@@ -5897,18 +6303,18 @@ var NotificationItemTitle = ({
|
|
|
5897
6303
|
sx
|
|
5898
6304
|
}) => {
|
|
5899
6305
|
const { read } = useNotificationItemContext();
|
|
5900
|
-
return /* @__PURE__ */
|
|
5901
|
-
/* @__PURE__ */
|
|
5902
|
-
showUnreadIndicator && !read && /* @__PURE__ */
|
|
6306
|
+
return /* @__PURE__ */ jsxs26(NotificationItemTitleRoot, { sx, children: [
|
|
6307
|
+
/* @__PURE__ */ jsx68(NotificationItemTitleText, { variant: "body2", ownerState: { read }, children }),
|
|
6308
|
+
showUnreadIndicator && !read && /* @__PURE__ */ jsx68(NotificationItemUnreadDot, {})
|
|
5903
6309
|
] });
|
|
5904
6310
|
};
|
|
5905
6311
|
NotificationItemTitle.displayName = "NotificationItemTitle";
|
|
5906
6312
|
|
|
5907
6313
|
// src/components/NotificationPanel/NotificationItemMessage.tsx
|
|
5908
|
-
import
|
|
6314
|
+
import Typography17 from "@mui/material/Typography";
|
|
5909
6315
|
import { styled as styled52 } from "@mui/material/styles";
|
|
5910
|
-
import { jsx as
|
|
5911
|
-
var NotificationItemMessageRoot = styled52(
|
|
6316
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
6317
|
+
var NotificationItemMessageRoot = styled52(Typography17, {
|
|
5912
6318
|
name: "MuiNotificationPanel",
|
|
5913
6319
|
slot: "ItemMessage"
|
|
5914
6320
|
})(({ theme }) => ({
|
|
@@ -5920,15 +6326,15 @@ var NotificationItemMessage = ({
|
|
|
5920
6326
|
children,
|
|
5921
6327
|
sx
|
|
5922
6328
|
}) => {
|
|
5923
|
-
return /* @__PURE__ */
|
|
6329
|
+
return /* @__PURE__ */ jsx69(NotificationItemMessageRoot, { component: "span", variant: "caption", sx, children });
|
|
5924
6330
|
};
|
|
5925
6331
|
NotificationItemMessage.displayName = "NotificationItemMessage";
|
|
5926
6332
|
|
|
5927
6333
|
// src/components/NotificationPanel/NotificationItemTimestamp.tsx
|
|
5928
|
-
import
|
|
6334
|
+
import Typography18 from "@mui/material/Typography";
|
|
5929
6335
|
import { styled as styled53 } from "@mui/material/styles";
|
|
5930
|
-
import { jsx as
|
|
5931
|
-
var NotificationItemTimestampRoot = styled53(
|
|
6336
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
6337
|
+
var NotificationItemTimestampRoot = styled53(Typography18, {
|
|
5932
6338
|
name: "MuiNotificationPanel",
|
|
5933
6339
|
slot: "ItemTimestamp"
|
|
5934
6340
|
})(({ theme }) => ({
|
|
@@ -5939,14 +6345,14 @@ var NotificationItemTimestamp = ({
|
|
|
5939
6345
|
children,
|
|
5940
6346
|
sx
|
|
5941
6347
|
}) => {
|
|
5942
|
-
return /* @__PURE__ */
|
|
6348
|
+
return /* @__PURE__ */ jsx70(NotificationItemTimestampRoot, { component: "span", variant: "caption", sx, children });
|
|
5943
6349
|
};
|
|
5944
6350
|
NotificationItemTimestamp.displayName = "NotificationItemTimestamp";
|
|
5945
6351
|
|
|
5946
6352
|
// src/components/NotificationPanel/NotificationItemAction.tsx
|
|
5947
6353
|
import Chip4 from "@mui/material/Chip";
|
|
5948
6354
|
import { styled as styled54 } from "@mui/material/styles";
|
|
5949
|
-
import { jsx as
|
|
6355
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
5950
6356
|
var NotificationItemActionRoot = styled54(Chip4, {
|
|
5951
6357
|
name: "MuiNotificationPanel",
|
|
5952
6358
|
slot: "ItemAction"
|
|
@@ -5969,7 +6375,7 @@ var NotificationItemAction = ({
|
|
|
5969
6375
|
onAction == null ? void 0 : onAction();
|
|
5970
6376
|
}
|
|
5971
6377
|
};
|
|
5972
|
-
return /* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ jsx71(
|
|
5973
6379
|
NotificationItemActionRoot,
|
|
5974
6380
|
{
|
|
5975
6381
|
label: children,
|
|
@@ -5983,12 +6389,12 @@ var NotificationItemAction = ({
|
|
|
5983
6389
|
NotificationItemAction.displayName = "NotificationItemAction";
|
|
5984
6390
|
|
|
5985
6391
|
// src/components/NotificationPanel/NotificationEmptyState.tsx
|
|
5986
|
-
import
|
|
5987
|
-
import
|
|
6392
|
+
import Box31 from "@mui/material/Box";
|
|
6393
|
+
import Typography19 from "@mui/material/Typography";
|
|
5988
6394
|
import { styled as styled55 } from "@mui/material/styles";
|
|
5989
6395
|
import { BellOff } from "@wso2/oxygen-ui-icons-react";
|
|
5990
|
-
import { jsx as
|
|
5991
|
-
var NotificationEmptyStateRoot = styled55(
|
|
6396
|
+
import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6397
|
+
var NotificationEmptyStateRoot = styled55(Box31, {
|
|
5992
6398
|
name: "MuiNotificationPanel",
|
|
5993
6399
|
slot: "EmptyState"
|
|
5994
6400
|
})(({ theme }) => ({
|
|
@@ -6002,7 +6408,7 @@ var NotificationEmptyStateRoot = styled55(Box29, {
|
|
|
6002
6408
|
paddingRight: theme.spacing(3),
|
|
6003
6409
|
textAlign: "center"
|
|
6004
6410
|
}));
|
|
6005
|
-
var NotificationEmptyStateMessage = styled55(
|
|
6411
|
+
var NotificationEmptyStateMessage = styled55(Typography19, {
|
|
6006
6412
|
name: "MuiNotificationPanel",
|
|
6007
6413
|
slot: "EmptyStateMessage"
|
|
6008
6414
|
})(({ theme }) => ({
|
|
@@ -6013,14 +6419,14 @@ var NotificationEmptyState = ({
|
|
|
6013
6419
|
icon,
|
|
6014
6420
|
sx
|
|
6015
6421
|
}) => {
|
|
6016
|
-
return /* @__PURE__ */
|
|
6017
|
-
icon || /* @__PURE__ */
|
|
6018
|
-
/* @__PURE__ */
|
|
6422
|
+
return /* @__PURE__ */ jsxs27(NotificationEmptyStateRoot, { sx, children: [
|
|
6423
|
+
icon || /* @__PURE__ */ jsx72(BellOff, { size: 48, style: { opacity: 0.3, marginBottom: 16 } }),
|
|
6424
|
+
/* @__PURE__ */ jsx72(NotificationEmptyStateMessage, { variant: "body2", children: message })
|
|
6019
6425
|
] });
|
|
6020
6426
|
};
|
|
6021
6427
|
|
|
6022
6428
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
6023
|
-
import { jsx as
|
|
6429
|
+
import { jsx as jsx73, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6024
6430
|
var NotificationPanelRoot = styled56(Drawer, {
|
|
6025
6431
|
name: "MuiNotificationPanel",
|
|
6026
6432
|
slot: "Root",
|
|
@@ -6048,9 +6454,9 @@ var NotificationPanel = ({
|
|
|
6048
6454
|
sx
|
|
6049
6455
|
}) => {
|
|
6050
6456
|
var _a;
|
|
6051
|
-
const appShellContext =
|
|
6457
|
+
const appShellContext = React33.useContext(AppShellContext);
|
|
6052
6458
|
const open = (_a = openProp != null ? openProp : appShellContext == null ? void 0 : appShellContext.state.notificationPanelOpen) != null ? _a : false;
|
|
6053
|
-
const onClose =
|
|
6459
|
+
const onClose = React33.useMemo(
|
|
6054
6460
|
() => {
|
|
6055
6461
|
var _a2;
|
|
6056
6462
|
return (_a2 = onCloseProp != null ? onCloseProp : appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel) != null ? _a2 : (() => {
|
|
@@ -6059,10 +6465,10 @@ var NotificationPanel = ({
|
|
|
6059
6465
|
[onCloseProp, appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel]
|
|
6060
6466
|
);
|
|
6061
6467
|
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp.trim() : "Notifications";
|
|
6062
|
-
const [liveAnnouncement, setLiveAnnouncementState] =
|
|
6063
|
-
const [liveAnnouncementNonce, setLiveAnnouncementNonce] =
|
|
6064
|
-
const prevLiveAnnouncementPropRef =
|
|
6065
|
-
const publishLiveAnnouncement =
|
|
6468
|
+
const [liveAnnouncement, setLiveAnnouncementState] = React33.useState("");
|
|
6469
|
+
const [liveAnnouncementNonce, setLiveAnnouncementNonce] = React33.useState(0);
|
|
6470
|
+
const prevLiveAnnouncementPropRef = React33.useRef(void 0);
|
|
6471
|
+
const publishLiveAnnouncement = React33.useCallback(
|
|
6066
6472
|
(message) => {
|
|
6067
6473
|
if (!open) return;
|
|
6068
6474
|
setLiveAnnouncementState(message);
|
|
@@ -6070,7 +6476,7 @@ var NotificationPanel = ({
|
|
|
6070
6476
|
},
|
|
6071
6477
|
[open]
|
|
6072
6478
|
);
|
|
6073
|
-
|
|
6479
|
+
React33.useEffect(() => {
|
|
6074
6480
|
if (!open) {
|
|
6075
6481
|
setLiveAnnouncementState("");
|
|
6076
6482
|
prevLiveAnnouncementPropRef.current = liveAnnouncementProp;
|
|
@@ -6088,12 +6494,12 @@ var NotificationPanel = ({
|
|
|
6088
6494
|
publishLiveAnnouncement(liveAnnouncementProp);
|
|
6089
6495
|
}
|
|
6090
6496
|
}, [open, liveAnnouncementProp, publishLiveAnnouncement]);
|
|
6091
|
-
const contextValue =
|
|
6497
|
+
const contextValue = React33.useMemo(
|
|
6092
6498
|
() => ({ onClose, open, setLiveAnnouncement: publishLiveAnnouncement }),
|
|
6093
6499
|
[onClose, open, publishLiveAnnouncement]
|
|
6094
6500
|
);
|
|
6095
6501
|
const ownerState = { width };
|
|
6096
|
-
return /* @__PURE__ */
|
|
6502
|
+
return /* @__PURE__ */ jsx73(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs28(
|
|
6097
6503
|
NotificationPanelRoot,
|
|
6098
6504
|
{
|
|
6099
6505
|
anchor,
|
|
@@ -6108,8 +6514,8 @@ var NotificationPanel = ({
|
|
|
6108
6514
|
}
|
|
6109
6515
|
},
|
|
6110
6516
|
children: [
|
|
6111
|
-
/* @__PURE__ */
|
|
6112
|
-
|
|
6517
|
+
/* @__PURE__ */ jsx73(
|
|
6518
|
+
Box32,
|
|
6113
6519
|
{
|
|
6114
6520
|
component: "div",
|
|
6115
6521
|
role: "status",
|
|
@@ -6144,30 +6550,30 @@ NotificationPanel.EmptyState = NotificationEmptyState;
|
|
|
6144
6550
|
NotificationPanel.displayName = "NotificationPanel";
|
|
6145
6551
|
|
|
6146
6552
|
// src/components/Footer/Footer.tsx
|
|
6147
|
-
import * as
|
|
6148
|
-
import
|
|
6553
|
+
import * as React34 from "react";
|
|
6554
|
+
import Box33 from "@mui/material/Box";
|
|
6149
6555
|
import { styled as styled60 } from "@mui/material/styles";
|
|
6150
6556
|
|
|
6151
6557
|
// src/components/Footer/FooterCopyright.tsx
|
|
6152
|
-
import
|
|
6558
|
+
import Typography20 from "@mui/material/Typography";
|
|
6153
6559
|
import { styled as styled57 } from "@mui/material/styles";
|
|
6154
|
-
import { jsx as
|
|
6155
|
-
var StyledCopyrightText = styled57(
|
|
6560
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
6561
|
+
var StyledCopyrightText = styled57(Typography20, {
|
|
6156
6562
|
name: "MuiFooter",
|
|
6157
6563
|
slot: "CopyrightText"
|
|
6158
6564
|
})(({ theme }) => ({
|
|
6159
6565
|
color: (theme.vars || theme).palette.text.secondary
|
|
6160
6566
|
}));
|
|
6161
6567
|
var FooterCopyright = ({ children }) => {
|
|
6162
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ jsx74(StyledCopyrightText, { variant: "caption", children });
|
|
6163
6569
|
};
|
|
6164
6570
|
FooterCopyright.displayName = "Footer.Copyright";
|
|
6165
6571
|
|
|
6166
6572
|
// src/components/Footer/FooterVersion.tsx
|
|
6167
|
-
import
|
|
6573
|
+
import Typography21 from "@mui/material/Typography";
|
|
6168
6574
|
import { styled as styled58 } from "@mui/material/styles";
|
|
6169
|
-
import { jsx as
|
|
6170
|
-
var StyledVersion = styled58(
|
|
6575
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
6576
|
+
var StyledVersion = styled58(Typography21, {
|
|
6171
6577
|
name: "MuiFooter",
|
|
6172
6578
|
slot: "Version"
|
|
6173
6579
|
})(({ theme }) => ({
|
|
@@ -6178,14 +6584,14 @@ var StyledVersion = styled58(Typography19, {
|
|
|
6178
6584
|
fontSize: 11
|
|
6179
6585
|
}));
|
|
6180
6586
|
var FooterVersion = ({ children }) => {
|
|
6181
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsx75(StyledVersion, { variant: "caption", children });
|
|
6182
6588
|
};
|
|
6183
6589
|
FooterVersion.displayName = "Footer.Version";
|
|
6184
6590
|
|
|
6185
6591
|
// src/components/Footer/FooterLink.tsx
|
|
6186
6592
|
import Link2 from "@mui/material/Link";
|
|
6187
6593
|
import { styled as styled59 } from "@mui/material/styles";
|
|
6188
|
-
import { jsx as
|
|
6594
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
6189
6595
|
var StyledLink = styled59(Link2, {
|
|
6190
6596
|
name: "MuiFooter",
|
|
6191
6597
|
slot: "Link"
|
|
@@ -6198,15 +6604,15 @@ var StyledLink = styled59(Link2, {
|
|
|
6198
6604
|
}));
|
|
6199
6605
|
var FooterLink = (_a) => {
|
|
6200
6606
|
var _b = _a, { children, href } = _b, props = __objRest(_b, ["children", "href"]);
|
|
6201
|
-
return /* @__PURE__ */
|
|
6607
|
+
return /* @__PURE__ */ jsx76(StyledLink, __spreadProps(__spreadValues({ href, underline: "hover" }, props), { children }));
|
|
6202
6608
|
};
|
|
6203
6609
|
FooterLink.displayName = "Footer.Link";
|
|
6204
6610
|
|
|
6205
6611
|
// src/components/Footer/FooterDivider.tsx
|
|
6206
6612
|
import Divider7 from "@mui/material/Divider";
|
|
6207
|
-
import { jsx as
|
|
6613
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
6208
6614
|
var FooterDivider = () => {
|
|
6209
|
-
return /* @__PURE__ */
|
|
6615
|
+
return /* @__PURE__ */ jsx77(
|
|
6210
6616
|
Divider7,
|
|
6211
6617
|
{
|
|
6212
6618
|
orientation: "vertical",
|
|
@@ -6218,8 +6624,8 @@ var FooterDivider = () => {
|
|
|
6218
6624
|
FooterDivider.displayName = "Footer.Divider";
|
|
6219
6625
|
|
|
6220
6626
|
// src/components/Footer/Footer.tsx
|
|
6221
|
-
import { jsx as
|
|
6222
|
-
var FooterRoot = styled60(
|
|
6627
|
+
import { jsx as jsx78, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6628
|
+
var FooterRoot = styled60(Box33, {
|
|
6223
6629
|
name: "MuiFooter",
|
|
6224
6630
|
slot: "Root"
|
|
6225
6631
|
})(({ theme }) => ({
|
|
@@ -6232,7 +6638,7 @@ var FooterRoot = styled60(Box31, {
|
|
|
6232
6638
|
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
6233
6639
|
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
6234
6640
|
}));
|
|
6235
|
-
var FooterContent = styled60(
|
|
6641
|
+
var FooterContent = styled60(Box33, {
|
|
6236
6642
|
name: "MuiFooter",
|
|
6237
6643
|
slot: "Content"
|
|
6238
6644
|
})(({ theme }) => ({
|
|
@@ -6246,7 +6652,7 @@ var FooterContent = styled60(Box31, {
|
|
|
6246
6652
|
alignItems: "center"
|
|
6247
6653
|
}
|
|
6248
6654
|
}));
|
|
6249
|
-
var FooterLeft = styled60(
|
|
6655
|
+
var FooterLeft = styled60(Box33, {
|
|
6250
6656
|
name: "MuiFooter",
|
|
6251
6657
|
slot: "Left"
|
|
6252
6658
|
})(({ theme }) => ({
|
|
@@ -6255,7 +6661,7 @@ var FooterLeft = styled60(Box31, {
|
|
|
6255
6661
|
gap: theme.spacing(2),
|
|
6256
6662
|
flexWrap: "wrap"
|
|
6257
6663
|
}));
|
|
6258
|
-
var FooterRight = styled60(
|
|
6664
|
+
var FooterRight = styled60(Box33, {
|
|
6259
6665
|
name: "MuiFooter",
|
|
6260
6666
|
slot: "Right"
|
|
6261
6667
|
})(({ theme }) => ({
|
|
@@ -6265,11 +6671,11 @@ var FooterRight = styled60(Box31, {
|
|
|
6265
6671
|
flexWrap: "wrap"
|
|
6266
6672
|
}));
|
|
6267
6673
|
var Footer = ({ children, sx }) => {
|
|
6268
|
-
const childrenArray =
|
|
6674
|
+
const childrenArray = React34.Children.toArray(children);
|
|
6269
6675
|
const leftChildren = [];
|
|
6270
6676
|
const rightChildren = [];
|
|
6271
6677
|
childrenArray.forEach((child) => {
|
|
6272
|
-
if (
|
|
6678
|
+
if (React34.isValidElement(child)) {
|
|
6273
6679
|
if (child.type === FooterCopyright || child.type === FooterVersion || child.type === FooterDivider) {
|
|
6274
6680
|
leftChildren.push(child);
|
|
6275
6681
|
} else if (child.type === FooterLink) {
|
|
@@ -6277,9 +6683,9 @@ var Footer = ({ children, sx }) => {
|
|
|
6277
6683
|
}
|
|
6278
6684
|
}
|
|
6279
6685
|
});
|
|
6280
|
-
return /* @__PURE__ */
|
|
6281
|
-
leftChildren.length > 0 && /* @__PURE__ */
|
|
6282
|
-
rightChildren.length > 0 && /* @__PURE__ */
|
|
6686
|
+
return /* @__PURE__ */ jsx78(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs29(FooterContent, { children: [
|
|
6687
|
+
leftChildren.length > 0 && /* @__PURE__ */ jsx78(FooterLeft, { children: leftChildren }),
|
|
6688
|
+
rightChildren.length > 0 && /* @__PURE__ */ jsx78(FooterRight, { children: rightChildren })
|
|
6283
6689
|
] }) });
|
|
6284
6690
|
};
|
|
6285
6691
|
Footer.Copyright = FooterCopyright;
|
|
@@ -6289,14 +6695,14 @@ Footer.Divider = FooterDivider;
|
|
|
6289
6695
|
Footer.displayName = "Footer";
|
|
6290
6696
|
|
|
6291
6697
|
// src/components/UserMenu/UserMenu.tsx
|
|
6292
|
-
import * as
|
|
6698
|
+
import * as React39 from "react";
|
|
6293
6699
|
import Menu3 from "@mui/material/Menu";
|
|
6294
6700
|
|
|
6295
6701
|
// src/components/UserMenu/UserMenuContext.tsx
|
|
6296
|
-
import * as
|
|
6297
|
-
var UserMenuContext =
|
|
6702
|
+
import * as React35 from "react";
|
|
6703
|
+
var UserMenuContext = React35.createContext(void 0);
|
|
6298
6704
|
var useUserMenu = () => {
|
|
6299
|
-
const context =
|
|
6705
|
+
const context = React35.useContext(UserMenuContext);
|
|
6300
6706
|
if (!context) {
|
|
6301
6707
|
throw new Error("UserMenu sub-components must be used within a UserMenu component");
|
|
6302
6708
|
}
|
|
@@ -6305,8 +6711,8 @@ var useUserMenu = () => {
|
|
|
6305
6711
|
UserMenuContext.displayName = "UserMenu.Context";
|
|
6306
6712
|
|
|
6307
6713
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
6308
|
-
import * as
|
|
6309
|
-
import
|
|
6714
|
+
import * as React36 from "react";
|
|
6715
|
+
import Tooltip8 from "@mui/material/Tooltip";
|
|
6310
6716
|
import IconButton7 from "@mui/material/IconButton";
|
|
6311
6717
|
import Avatar4 from "@mui/material/Avatar";
|
|
6312
6718
|
import { styled as styled61 } from "@mui/material/styles";
|
|
@@ -6331,7 +6737,7 @@ function getUserMenuAvatarProps(name, avatar) {
|
|
|
6331
6737
|
}
|
|
6332
6738
|
|
|
6333
6739
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
6334
|
-
import { jsx as
|
|
6740
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6335
6741
|
var StyledTrigger = styled61(IconButton7, {
|
|
6336
6742
|
name: "MuiUserMenu",
|
|
6337
6743
|
slot: "Trigger",
|
|
@@ -6366,14 +6772,14 @@ var StyledNameText = styled61("span", {
|
|
|
6366
6772
|
display: "block"
|
|
6367
6773
|
}
|
|
6368
6774
|
}));
|
|
6369
|
-
var UserMenuTrigger =
|
|
6775
|
+
var UserMenuTrigger = React36.forwardRef(
|
|
6370
6776
|
function UserMenuTrigger2(_a, ref) {
|
|
6371
6777
|
var _b = _a, { name, avatar, showName = false, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "avatar", "showName", "onClick", "aria-label"]);
|
|
6372
6778
|
const { open, handleOpen } = useUserMenu();
|
|
6373
6779
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
6374
6780
|
const defaultAriaLabel = showName ? name : "Account";
|
|
6375
6781
|
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : defaultAriaLabel;
|
|
6376
|
-
return /* @__PURE__ */
|
|
6782
|
+
return /* @__PURE__ */ jsx79(Tooltip8, { title: "Account", children: /* @__PURE__ */ jsxs30(
|
|
6377
6783
|
StyledTrigger,
|
|
6378
6784
|
__spreadProps(__spreadValues({}, props), {
|
|
6379
6785
|
ref,
|
|
@@ -6388,8 +6794,8 @@ var UserMenuTrigger = React35.forwardRef(
|
|
|
6388
6794
|
"aria-haspopup": "true",
|
|
6389
6795
|
"aria-expanded": open ? "true" : void 0,
|
|
6390
6796
|
children: [
|
|
6391
|
-
/* @__PURE__ */
|
|
6392
|
-
showName && /* @__PURE__ */
|
|
6797
|
+
/* @__PURE__ */ jsx79(StyledAvatar2, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
6798
|
+
showName && /* @__PURE__ */ jsx79(StyledNameText, { children: name })
|
|
6393
6799
|
]
|
|
6394
6800
|
})
|
|
6395
6801
|
) });
|
|
@@ -6399,20 +6805,20 @@ UserMenuTrigger.displayName = "UserMenu.Trigger";
|
|
|
6399
6805
|
|
|
6400
6806
|
// src/components/UserMenu/UserMenuHeader.tsx
|
|
6401
6807
|
import Divider8 from "@mui/material/Divider";
|
|
6402
|
-
import
|
|
6808
|
+
import Box34 from "@mui/material/Box";
|
|
6403
6809
|
import Avatar5 from "@mui/material/Avatar";
|
|
6404
|
-
import
|
|
6810
|
+
import Typography22 from "@mui/material/Typography";
|
|
6405
6811
|
import Chip5 from "@mui/material/Chip";
|
|
6406
6812
|
import { styled as styled62 } from "@mui/material/styles";
|
|
6407
|
-
import { Fragment as
|
|
6408
|
-
var StyledHeaderBox = styled62(
|
|
6813
|
+
import { Fragment as Fragment11, jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6814
|
+
var StyledHeaderBox = styled62(Box34, {
|
|
6409
6815
|
name: "MuiUserMenu",
|
|
6410
6816
|
slot: "HeaderBox"
|
|
6411
6817
|
})(({ theme }) => ({
|
|
6412
6818
|
padding: theme.spacing(2),
|
|
6413
6819
|
paddingBottom: theme.spacing(1.5)
|
|
6414
6820
|
}));
|
|
6415
|
-
var StyledHeaderContent = styled62(
|
|
6821
|
+
var StyledHeaderContent = styled62(Box34, {
|
|
6416
6822
|
name: "MuiUserMenu",
|
|
6417
6823
|
slot: "HeaderContent"
|
|
6418
6824
|
})(({ theme }) => ({
|
|
@@ -6431,7 +6837,7 @@ var StyledHeaderAvatar = styled62(Avatar5, {
|
|
|
6431
6837
|
fontSize: 16,
|
|
6432
6838
|
fontWeight: 600
|
|
6433
6839
|
}));
|
|
6434
|
-
var StyledUserInfo = styled62(
|
|
6840
|
+
var StyledUserInfo = styled62(Box34, {
|
|
6435
6841
|
name: "MuiUserMenu",
|
|
6436
6842
|
slot: "UserInfo"
|
|
6437
6843
|
})(({ theme }) => ({
|
|
@@ -6441,7 +6847,7 @@ var StyledUserInfo = styled62(Box32, {
|
|
|
6441
6847
|
flex: 1,
|
|
6442
6848
|
minWidth: 0
|
|
6443
6849
|
}));
|
|
6444
|
-
var StyledNameRow = styled62(
|
|
6850
|
+
var StyledNameRow = styled62(Box34, {
|
|
6445
6851
|
name: "MuiUserMenu",
|
|
6446
6852
|
slot: "NameRow"
|
|
6447
6853
|
})(({ theme }) => ({
|
|
@@ -6449,7 +6855,7 @@ var StyledNameRow = styled62(Box32, {
|
|
|
6449
6855
|
alignItems: "center",
|
|
6450
6856
|
gap: theme.spacing(1)
|
|
6451
6857
|
}));
|
|
6452
|
-
var StyledName = styled62(
|
|
6858
|
+
var StyledName = styled62(Typography22, {
|
|
6453
6859
|
name: "MuiUserMenu",
|
|
6454
6860
|
slot: "Name"
|
|
6455
6861
|
})({
|
|
@@ -6466,7 +6872,7 @@ var StyledRoleChip = styled62(Chip5, {
|
|
|
6466
6872
|
fontSize: 11,
|
|
6467
6873
|
fontWeight: 600
|
|
6468
6874
|
});
|
|
6469
|
-
var StyledEmail = styled62(
|
|
6875
|
+
var StyledEmail = styled62(Typography22, {
|
|
6470
6876
|
name: "MuiUserMenu",
|
|
6471
6877
|
slot: "Email"
|
|
6472
6878
|
})(({ theme }) => ({
|
|
@@ -6478,13 +6884,13 @@ var StyledEmail = styled62(Typography20, {
|
|
|
6478
6884
|
}));
|
|
6479
6885
|
var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
6480
6886
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
6481
|
-
return /* @__PURE__ */
|
|
6482
|
-
/* @__PURE__ */
|
|
6483
|
-
/* @__PURE__ */
|
|
6484
|
-
/* @__PURE__ */
|
|
6485
|
-
/* @__PURE__ */
|
|
6486
|
-
/* @__PURE__ */
|
|
6487
|
-
role && /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
6888
|
+
/* @__PURE__ */ jsx80(StyledHeaderBox, { children: /* @__PURE__ */ jsxs31(StyledHeaderContent, { children: [
|
|
6889
|
+
/* @__PURE__ */ jsx80(StyledHeaderAvatar, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
6890
|
+
/* @__PURE__ */ jsxs31(StyledUserInfo, { children: [
|
|
6891
|
+
/* @__PURE__ */ jsxs31(StyledNameRow, { children: [
|
|
6892
|
+
/* @__PURE__ */ jsx80(StyledName, { variant: "subtitle2", children: name }),
|
|
6893
|
+
role && /* @__PURE__ */ jsx80(
|
|
6488
6894
|
StyledRoleChip,
|
|
6489
6895
|
{
|
|
6490
6896
|
label: role,
|
|
@@ -6493,25 +6899,25 @@ var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
|
6493
6899
|
}
|
|
6494
6900
|
)
|
|
6495
6901
|
] }),
|
|
6496
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsx80(StyledEmail, { variant: "caption", children: email })
|
|
6497
6903
|
] })
|
|
6498
6904
|
] }) }),
|
|
6499
|
-
/* @__PURE__ */
|
|
6905
|
+
/* @__PURE__ */ jsx80(Divider8, {})
|
|
6500
6906
|
] });
|
|
6501
6907
|
};
|
|
6502
6908
|
UserMenuHeader.displayName = "UserMenu.Header";
|
|
6503
6909
|
|
|
6504
6910
|
// src/components/UserMenu/UserMenuItem.tsx
|
|
6505
|
-
import * as
|
|
6506
|
-
import
|
|
6911
|
+
import * as React37 from "react";
|
|
6912
|
+
import MenuItem6 from "@mui/material/MenuItem";
|
|
6507
6913
|
import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
6508
6914
|
import ListItemText4 from "@mui/material/ListItemText";
|
|
6509
|
-
import
|
|
6915
|
+
import Box35 from "@mui/material/Box";
|
|
6510
6916
|
import Chip6 from "@mui/material/Chip";
|
|
6511
6917
|
import { styled as styled63 } from "@mui/material/styles";
|
|
6512
6918
|
import { ChevronRight as ChevronRight2 } from "@wso2/oxygen-ui-icons-react";
|
|
6513
|
-
import { jsx as
|
|
6514
|
-
var StyledMenuItem2 = styled63(
|
|
6919
|
+
import { jsx as jsx81, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6920
|
+
var StyledMenuItem2 = styled63(MenuItem6, {
|
|
6515
6921
|
name: "MuiUserMenu",
|
|
6516
6922
|
slot: "MenuItem"
|
|
6517
6923
|
})(({ theme }) => ({
|
|
@@ -6538,13 +6944,13 @@ var UserMenuItem = ({
|
|
|
6538
6944
|
handleClose();
|
|
6539
6945
|
onClick == null ? void 0 : onClick();
|
|
6540
6946
|
};
|
|
6541
|
-
return /* @__PURE__ */
|
|
6542
|
-
icon && /* @__PURE__ */
|
|
6947
|
+
return /* @__PURE__ */ jsxs32(StyledMenuItem2, { onClick: handleClick, children: [
|
|
6948
|
+
icon && /* @__PURE__ */ jsx81(ListItemIcon3, { children: React37.isValidElement(icon) ? React37.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
6543
6949
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
6544
6950
|
})) : icon }),
|
|
6545
|
-
/* @__PURE__ */
|
|
6546
|
-
/* @__PURE__ */
|
|
6547
|
-
badge && /* @__PURE__ */
|
|
6951
|
+
/* @__PURE__ */ jsx81(ListItemText4, { primary: label }),
|
|
6952
|
+
/* @__PURE__ */ jsxs32(Box35, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
6953
|
+
badge && /* @__PURE__ */ jsx81(
|
|
6548
6954
|
StyledBillingChip,
|
|
6549
6955
|
{
|
|
6550
6956
|
label: badge,
|
|
@@ -6552,20 +6958,20 @@ var UserMenuItem = ({
|
|
|
6552
6958
|
variant: "outlined"
|
|
6553
6959
|
}
|
|
6554
6960
|
),
|
|
6555
|
-
/* @__PURE__ */
|
|
6961
|
+
/* @__PURE__ */ jsx81(ChevronRight2, { size: 16, style: { color: "var(--mui-palette-text-secondary)" } })
|
|
6556
6962
|
] })
|
|
6557
6963
|
] });
|
|
6558
6964
|
};
|
|
6559
6965
|
UserMenuItem.displayName = "UserMenu.Item";
|
|
6560
6966
|
|
|
6561
6967
|
// src/components/UserMenu/UserMenuLogout.tsx
|
|
6562
|
-
import * as
|
|
6563
|
-
import
|
|
6968
|
+
import * as React38 from "react";
|
|
6969
|
+
import MenuItem7 from "@mui/material/MenuItem";
|
|
6564
6970
|
import ListItemIcon4 from "@mui/material/ListItemIcon";
|
|
6565
6971
|
import ListItemText5 from "@mui/material/ListItemText";
|
|
6566
6972
|
import { styled as styled64 } from "@mui/material/styles";
|
|
6567
|
-
import { jsx as
|
|
6568
|
-
var StyledLogoutItem = styled64(
|
|
6973
|
+
import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6974
|
+
var StyledLogoutItem = styled64(MenuItem7, {
|
|
6569
6975
|
name: "MuiUserMenu",
|
|
6570
6976
|
slot: "LogoutItem"
|
|
6571
6977
|
})(({ theme }) => ({
|
|
@@ -6583,25 +6989,25 @@ var UserMenuLogout = ({
|
|
|
6583
6989
|
handleClose();
|
|
6584
6990
|
onClick == null ? void 0 : onClick();
|
|
6585
6991
|
};
|
|
6586
|
-
return /* @__PURE__ */
|
|
6587
|
-
icon && /* @__PURE__ */
|
|
6992
|
+
return /* @__PURE__ */ jsxs33(StyledLogoutItem, { onClick: handleClick, children: [
|
|
6993
|
+
icon && /* @__PURE__ */ jsx82(ListItemIcon4, { children: React38.isValidElement(icon) ? React38.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
6588
6994
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
6589
6995
|
})) : icon }),
|
|
6590
|
-
/* @__PURE__ */
|
|
6996
|
+
/* @__PURE__ */ jsx82(ListItemText5, { primary: label })
|
|
6591
6997
|
] });
|
|
6592
6998
|
};
|
|
6593
6999
|
UserMenuLogout.displayName = "UserMenu.Logout";
|
|
6594
7000
|
|
|
6595
7001
|
// src/components/UserMenu/UserMenuDivider.tsx
|
|
6596
7002
|
import Divider9 from "@mui/material/Divider";
|
|
6597
|
-
import { jsx as
|
|
6598
|
-
var UserMenuDivider = () => /* @__PURE__ */
|
|
7003
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
7004
|
+
var UserMenuDivider = () => /* @__PURE__ */ jsx83(Divider9, {});
|
|
6599
7005
|
UserMenuDivider.displayName = "UserMenu.Divider";
|
|
6600
7006
|
|
|
6601
7007
|
// src/components/UserMenu/UserMenu.tsx
|
|
6602
|
-
import { jsx as
|
|
7008
|
+
import { jsx as jsx84, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6603
7009
|
var UserMenu = ({ children }) => {
|
|
6604
|
-
const [anchorEl, setAnchorEl] =
|
|
7010
|
+
const [anchorEl, setAnchorEl] = React39.useState(null);
|
|
6605
7011
|
const open = Boolean(anchorEl);
|
|
6606
7012
|
const handleOpen = (event) => {
|
|
6607
7013
|
setAnchorEl(event.currentTarget);
|
|
@@ -6609,16 +7015,16 @@ var UserMenu = ({ children }) => {
|
|
|
6609
7015
|
const handleClose = () => {
|
|
6610
7016
|
setAnchorEl(null);
|
|
6611
7017
|
};
|
|
6612
|
-
const childrenArray =
|
|
7018
|
+
const childrenArray = React39.Children.toArray(children);
|
|
6613
7019
|
const triggerChild = childrenArray.find(
|
|
6614
|
-
(child) =>
|
|
7020
|
+
(child) => React39.isValidElement(child) && child.type === UserMenuTrigger
|
|
6615
7021
|
);
|
|
6616
7022
|
const menuChildren = childrenArray.filter(
|
|
6617
|
-
(child) =>
|
|
7023
|
+
(child) => React39.isValidElement(child) && child.type !== UserMenuTrigger
|
|
6618
7024
|
);
|
|
6619
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsxs34(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
|
|
6620
7026
|
triggerChild,
|
|
6621
|
-
/* @__PURE__ */
|
|
7027
|
+
/* @__PURE__ */ jsx84(
|
|
6622
7028
|
Menu3,
|
|
6623
7029
|
{
|
|
6624
7030
|
id: "user-menu",
|
|
@@ -6648,15 +7054,15 @@ UserMenu.Divider = UserMenuDivider;
|
|
|
6648
7054
|
UserMenu.displayName = "UserMenu";
|
|
6649
7055
|
|
|
6650
7056
|
// src/components/NotificationBanner/NotificationBanner.tsx
|
|
6651
|
-
import * as
|
|
6652
|
-
import
|
|
7057
|
+
import * as React40 from "react";
|
|
7058
|
+
import Alert2 from "@mui/material/Alert";
|
|
6653
7059
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
6654
7060
|
import Collapse2 from "@mui/material/Collapse";
|
|
6655
|
-
import
|
|
6656
|
-
import
|
|
7061
|
+
import Button5 from "@mui/material/Button";
|
|
7062
|
+
import Box36 from "@mui/material/Box";
|
|
6657
7063
|
import { styled as styled65 } from "@mui/material/styles";
|
|
6658
|
-
import { jsx as
|
|
6659
|
-
var NotificationBannerAlert = styled65(
|
|
7064
|
+
import { jsx as jsx85, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7065
|
+
var NotificationBannerAlert = styled65(Alert2, {
|
|
6660
7066
|
name: "MuiNotificationBanner",
|
|
6661
7067
|
slot: "Root"
|
|
6662
7068
|
})(({ theme }) => __spreadValues({
|
|
@@ -6684,7 +7090,7 @@ var NotificationBannerAlert = styled65(Alert, {
|
|
|
6684
7090
|
}
|
|
6685
7091
|
}
|
|
6686
7092
|
})));
|
|
6687
|
-
var NotificationBannerContent = styled65(
|
|
7093
|
+
var NotificationBannerContent = styled65(Box36, {
|
|
6688
7094
|
name: "MuiNotificationBanner",
|
|
6689
7095
|
slot: "Content"
|
|
6690
7096
|
})({
|
|
@@ -6693,7 +7099,7 @@ var NotificationBannerContent = styled65(Box34, {
|
|
|
6693
7099
|
gap: 2,
|
|
6694
7100
|
flex: 1
|
|
6695
7101
|
});
|
|
6696
|
-
var NotificationBannerAction = styled65(
|
|
7102
|
+
var NotificationBannerAction = styled65(Button5, {
|
|
6697
7103
|
name: "MuiNotificationBanner",
|
|
6698
7104
|
slot: "Action"
|
|
6699
7105
|
})({
|
|
@@ -6714,22 +7120,22 @@ var NotificationBanner = ({
|
|
|
6714
7120
|
onDismiss,
|
|
6715
7121
|
sx
|
|
6716
7122
|
}) => {
|
|
6717
|
-
const [isVisible, setIsVisible] =
|
|
6718
|
-
|
|
7123
|
+
const [isVisible, setIsVisible] = React40.useState(visible);
|
|
7124
|
+
React40.useEffect(() => {
|
|
6719
7125
|
setIsVisible(visible);
|
|
6720
7126
|
}, [visible]);
|
|
6721
7127
|
const handleDismiss = () => {
|
|
6722
7128
|
setIsVisible(false);
|
|
6723
7129
|
onDismiss == null ? void 0 : onDismiss();
|
|
6724
7130
|
};
|
|
6725
|
-
return /* @__PURE__ */
|
|
7131
|
+
return /* @__PURE__ */ jsx85(Collapse2, { in: isVisible, children: /* @__PURE__ */ jsx85(
|
|
6726
7132
|
NotificationBannerAlert,
|
|
6727
7133
|
{
|
|
6728
7134
|
severity,
|
|
6729
7135
|
variant: "filled",
|
|
6730
7136
|
onClose: handleDismiss,
|
|
6731
7137
|
sx,
|
|
6732
|
-
action: actionLabel && onAction ? /* @__PURE__ */
|
|
7138
|
+
action: actionLabel && onAction ? /* @__PURE__ */ jsx85(
|
|
6733
7139
|
NotificationBannerAction,
|
|
6734
7140
|
{
|
|
6735
7141
|
color: "inherit",
|
|
@@ -6738,18 +7144,18 @@ var NotificationBanner = ({
|
|
|
6738
7144
|
children: actionLabel
|
|
6739
7145
|
}
|
|
6740
7146
|
) : void 0,
|
|
6741
|
-
children: /* @__PURE__ */
|
|
6742
|
-
title && /* @__PURE__ */
|
|
6743
|
-
/* @__PURE__ */
|
|
7147
|
+
children: /* @__PURE__ */ jsxs35(NotificationBannerContent, { children: [
|
|
7148
|
+
title && /* @__PURE__ */ jsx85(AlertTitle, { sx: { mb: 0 }, children: title }),
|
|
7149
|
+
/* @__PURE__ */ jsx85(Box36, { component: "span", children: message })
|
|
6744
7150
|
] })
|
|
6745
7151
|
}
|
|
6746
7152
|
) });
|
|
6747
7153
|
};
|
|
6748
7154
|
|
|
6749
7155
|
// src/components/Form/CardButton.tsx
|
|
6750
|
-
import { Card as Card3, ButtonBase as ButtonBase3, Box as
|
|
7156
|
+
import { Card as Card3, ButtonBase as ButtonBase3, Box as Box37, styled as styled66 } from "@mui/material";
|
|
6751
7157
|
import { CardHeader, CardContent as CardContent2, CardActions, CardMedia } from "@mui/material";
|
|
6752
|
-
import { jsx as
|
|
7158
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
6753
7159
|
var StyledCardButton = styled66(Card3, {
|
|
6754
7160
|
shouldForwardProp: (prop) => prop !== "selected" && prop !== "disabled"
|
|
6755
7161
|
})(({ theme, selected, disabled, alignItems = "flex-start" }) => ({
|
|
@@ -6778,7 +7184,7 @@ var StyledCardButton = styled66(Card3, {
|
|
|
6778
7184
|
}));
|
|
6779
7185
|
var CardButton = (props) => {
|
|
6780
7186
|
const _a = props, { disabled, selected, alignItems = "flex-start" } = _a, rest = __objRest(_a, ["disabled", "selected", "alignItems"]);
|
|
6781
|
-
return /* @__PURE__ */
|
|
7187
|
+
return /* @__PURE__ */ jsx86(
|
|
6782
7188
|
StyledCardButton,
|
|
6783
7189
|
__spreadValues({
|
|
6784
7190
|
alignItems,
|
|
@@ -6788,36 +7194,36 @@ var CardButton = (props) => {
|
|
|
6788
7194
|
}, rest)
|
|
6789
7195
|
);
|
|
6790
7196
|
};
|
|
6791
|
-
var DisappearingCardButtonContent = (props) => /* @__PURE__ */
|
|
7197
|
+
var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx86(Box37, __spreadValues({ className: "creation-flow-card-actions" }, props));
|
|
6792
7198
|
|
|
6793
7199
|
// src/components/Form/Stack.tsx
|
|
6794
7200
|
import { Stack as OxygenStack } from "@mui/material";
|
|
6795
|
-
import { jsx as
|
|
6796
|
-
var
|
|
6797
|
-
return /* @__PURE__ */
|
|
7201
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
7202
|
+
var Stack3 = (props) => {
|
|
7203
|
+
return /* @__PURE__ */ jsx87(OxygenStack, __spreadValues({ spacing: 2 }, props));
|
|
6798
7204
|
};
|
|
6799
7205
|
|
|
6800
7206
|
// src/components/Form/Typography.tsx
|
|
6801
|
-
import { Typography as
|
|
6802
|
-
import { jsx as
|
|
7207
|
+
import { Typography as Typography23 } from "@mui/material";
|
|
7208
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
6803
7209
|
var Header2 = (props) => {
|
|
6804
7210
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6805
|
-
return /* @__PURE__ */
|
|
7211
|
+
return /* @__PURE__ */ jsx88(Typography23, __spreadProps(__spreadValues({}, rest), { variant: "h4", children }));
|
|
6806
7212
|
};
|
|
6807
7213
|
var Subheader = (props) => {
|
|
6808
7214
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6809
|
-
return /* @__PURE__ */
|
|
7215
|
+
return /* @__PURE__ */ jsx88(Typography23, __spreadProps(__spreadValues({}, rest), { variant: "h5", children }));
|
|
6810
7216
|
};
|
|
6811
7217
|
var Body = (props) => {
|
|
6812
7218
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6813
|
-
return /* @__PURE__ */
|
|
7219
|
+
return /* @__PURE__ */ jsx88(Typography23, __spreadProps(__spreadValues({}, rest), { variant: "body2", children }));
|
|
6814
7220
|
};
|
|
6815
7221
|
|
|
6816
7222
|
// src/components/Form/Section.tsx
|
|
6817
|
-
import { Card as Card4, CardContent as CardContent3, Stack as
|
|
6818
|
-
import { jsx as
|
|
7223
|
+
import { Card as Card4, CardContent as CardContent3, Stack as Stack4 } from "@mui/material";
|
|
7224
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
6819
7225
|
var Section = ({ children }) => {
|
|
6820
|
-
return /* @__PURE__ */
|
|
7226
|
+
return /* @__PURE__ */ jsx89(Card4, { children: /* @__PURE__ */ jsx89(CardContent3, { children: /* @__PURE__ */ jsx89(Stack4, { direction: "column", spacing: 2, children }) }) });
|
|
6821
7227
|
};
|
|
6822
7228
|
|
|
6823
7229
|
// src/components/Form/Wizard.tsx
|
|
@@ -6831,37 +7237,37 @@ import {
|
|
|
6831
7237
|
} from "@mui/material";
|
|
6832
7238
|
import { styled as styled67 } from "@mui/material/styles";
|
|
6833
7239
|
import { useMemo as useMemo7 } from "react";
|
|
6834
|
-
import { jsx as
|
|
6835
|
-
var StyledWizardActionsStack = styled67(
|
|
7240
|
+
import { jsx as jsx90, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7241
|
+
var StyledWizardActionsStack = styled67(Stack3)(() => ({
|
|
6836
7242
|
justifyContent: "space-between",
|
|
6837
7243
|
flexGrow: 1
|
|
6838
7244
|
}));
|
|
6839
7245
|
function Wizard({ steps, activeStep, actions }) {
|
|
6840
7246
|
const step = useMemo7(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
|
|
6841
|
-
return /* @__PURE__ */
|
|
6842
|
-
/* @__PURE__ */
|
|
6843
|
-
/* @__PURE__ */
|
|
6844
|
-
/* @__PURE__ */
|
|
6845
|
-
/* @__PURE__ */
|
|
7247
|
+
return /* @__PURE__ */ jsx90(Card5, { children: /* @__PURE__ */ jsx90(CardContent4, { children: /* @__PURE__ */ jsxs36(Stack3, { children: [
|
|
7248
|
+
/* @__PURE__ */ jsx90(Stepper, { activeStep, children: steps.map((step2) => /* @__PURE__ */ jsx90(Step, { children: /* @__PURE__ */ jsx90(StepLabel, { children: step2.label }) }, step2.label)) }),
|
|
7249
|
+
/* @__PURE__ */ jsx90(Divider10, {}),
|
|
7250
|
+
/* @__PURE__ */ jsx90(Stack3, { direction: "row", children: step == null ? void 0 : step.component }),
|
|
7251
|
+
/* @__PURE__ */ jsx90(StyledWizardActionsStack, { direction: "row", children: actions })
|
|
6846
7252
|
] }) }) });
|
|
6847
7253
|
}
|
|
6848
7254
|
|
|
6849
7255
|
// src/components/Form/ElementWrapper.tsx
|
|
6850
7256
|
import { FormControl as FormControl3, FormLabel } from "@mui/material";
|
|
6851
|
-
import
|
|
6852
|
-
import { jsx as
|
|
7257
|
+
import React41 from "react";
|
|
7258
|
+
import { jsx as jsx91, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6853
7259
|
var ElementWrapper = (props) => {
|
|
6854
7260
|
const { label, name, children } = props;
|
|
6855
7261
|
const labelId = `${name}-label`;
|
|
6856
|
-
const enhancedChildren =
|
|
7262
|
+
const enhancedChildren = React41.Children.map(children, (child) => {
|
|
6857
7263
|
var _a;
|
|
6858
|
-
if (
|
|
6859
|
-
return
|
|
7264
|
+
if (React41.isValidElement(child) && ((_a = child.type) == null ? void 0 : _a.muiName) === "Select" && !child.props.labelId) {
|
|
7265
|
+
return React41.cloneElement(child, { labelId });
|
|
6860
7266
|
}
|
|
6861
7267
|
return child;
|
|
6862
7268
|
});
|
|
6863
|
-
return /* @__PURE__ */
|
|
6864
|
-
/* @__PURE__ */
|
|
7269
|
+
return /* @__PURE__ */ jsxs37(FormControl3, { fullWidth: true, children: [
|
|
7270
|
+
/* @__PURE__ */ jsx91(FormLabel, { id: labelId, htmlFor: name, children: label }),
|
|
6865
7271
|
enhancedChildren
|
|
6866
7272
|
] });
|
|
6867
7273
|
};
|
|
@@ -6874,7 +7280,7 @@ var Form = {
|
|
|
6874
7280
|
CardContent: CardContent2,
|
|
6875
7281
|
CardActions,
|
|
6876
7282
|
CardMedia,
|
|
6877
|
-
Stack:
|
|
7283
|
+
Stack: Stack3,
|
|
6878
7284
|
Header: Header2,
|
|
6879
7285
|
Subheader,
|
|
6880
7286
|
Body,
|
|
@@ -6885,16 +7291,16 @@ var Form = {
|
|
|
6885
7291
|
};
|
|
6886
7292
|
|
|
6887
7293
|
// src/components/AppShell/AppShell.tsx
|
|
6888
|
-
import * as
|
|
6889
|
-
import
|
|
7294
|
+
import * as React43 from "react";
|
|
7295
|
+
import Box42 from "@mui/material/Box";
|
|
6890
7296
|
|
|
6891
7297
|
// src/layouts/Layout.tsx
|
|
6892
|
-
import
|
|
6893
|
-
import { jsx as
|
|
7298
|
+
import Box38 from "@mui/material/Box";
|
|
7299
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
6894
7300
|
function Layout(_a) {
|
|
6895
7301
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6896
|
-
return /* @__PURE__ */
|
|
6897
|
-
|
|
7302
|
+
return /* @__PURE__ */ jsx92(
|
|
7303
|
+
Box38,
|
|
6898
7304
|
__spreadProps(__spreadValues({
|
|
6899
7305
|
sx: __spreadValues({
|
|
6900
7306
|
display: "flex",
|
|
@@ -6909,12 +7315,12 @@ Layout.displayName = "Layout";
|
|
|
6909
7315
|
var Layout_default = Layout;
|
|
6910
7316
|
|
|
6911
7317
|
// src/layouts/LayoutSidebar.tsx
|
|
6912
|
-
import
|
|
6913
|
-
import { jsx as
|
|
7318
|
+
import Box39 from "@mui/material/Box";
|
|
7319
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
6914
7320
|
function LayoutSidebar(_a) {
|
|
6915
7321
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6916
|
-
return /* @__PURE__ */
|
|
6917
|
-
|
|
7322
|
+
return /* @__PURE__ */ jsx93(
|
|
7323
|
+
Box39,
|
|
6918
7324
|
__spreadProps(__spreadValues({
|
|
6919
7325
|
sx: __spreadValues({
|
|
6920
7326
|
display: "flex",
|
|
@@ -6936,12 +7342,12 @@ LayoutNavbar.displayName = "Layout.Navbar";
|
|
|
6936
7342
|
var LayoutNavbar_default = LayoutNavbar;
|
|
6937
7343
|
|
|
6938
7344
|
// src/layouts/LayoutContent.tsx
|
|
6939
|
-
import
|
|
6940
|
-
import { jsx as
|
|
7345
|
+
import Box40 from "@mui/material/Box";
|
|
7346
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
6941
7347
|
function LayoutContent(_a) {
|
|
6942
7348
|
var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
|
|
6943
|
-
return /* @__PURE__ */
|
|
6944
|
-
|
|
7349
|
+
return /* @__PURE__ */ jsx94(
|
|
7350
|
+
Box40,
|
|
6945
7351
|
__spreadProps(__spreadValues({
|
|
6946
7352
|
component: "main",
|
|
6947
7353
|
sx: {
|
|
@@ -6959,12 +7365,12 @@ LayoutContent.displayName = "Layout.Content";
|
|
|
6959
7365
|
var LayoutContent_default = LayoutContent;
|
|
6960
7366
|
|
|
6961
7367
|
// src/layouts/LayoutHeader.tsx
|
|
6962
|
-
import
|
|
6963
|
-
import { jsx as
|
|
7368
|
+
import Box41 from "@mui/material/Box";
|
|
7369
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
6964
7370
|
function LayoutHeader(_a) {
|
|
6965
7371
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6966
|
-
return /* @__PURE__ */
|
|
6967
|
-
|
|
7372
|
+
return /* @__PURE__ */ jsx95(
|
|
7373
|
+
Box41,
|
|
6968
7374
|
__spreadProps(__spreadValues({
|
|
6969
7375
|
sx: __spreadValues({
|
|
6970
7376
|
display: "flex"
|
|
@@ -6987,45 +7393,45 @@ var Layout2 = Object.assign(Layout_default, {
|
|
|
6987
7393
|
var layouts_default = Layout2;
|
|
6988
7394
|
|
|
6989
7395
|
// src/components/AppShell/AppShellNavbar.tsx
|
|
6990
|
-
import { Fragment as
|
|
7396
|
+
import { Fragment as Fragment12, jsx as jsx96 } from "react/jsx-runtime";
|
|
6991
7397
|
var AppShellNavbar = ({ children }) => {
|
|
6992
|
-
return /* @__PURE__ */
|
|
7398
|
+
return /* @__PURE__ */ jsx96(Fragment12, { children });
|
|
6993
7399
|
};
|
|
6994
7400
|
AppShellNavbar.displayName = "AppShellNavbar";
|
|
6995
7401
|
|
|
6996
7402
|
// src/components/AppShell/AppShellSidebar.tsx
|
|
6997
|
-
import { Fragment as
|
|
7403
|
+
import { Fragment as Fragment13, jsx as jsx97 } from "react/jsx-runtime";
|
|
6998
7404
|
var AppShellSidebar = ({ children }) => {
|
|
6999
|
-
return /* @__PURE__ */
|
|
7405
|
+
return /* @__PURE__ */ jsx97(Fragment13, { children });
|
|
7000
7406
|
};
|
|
7001
7407
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
7002
7408
|
|
|
7003
7409
|
// src/components/AppShell/AppShellMain.tsx
|
|
7004
|
-
import { Fragment as
|
|
7410
|
+
import { Fragment as Fragment14, jsx as jsx98 } from "react/jsx-runtime";
|
|
7005
7411
|
var AppShellMain = ({ children }) => {
|
|
7006
|
-
return /* @__PURE__ */
|
|
7412
|
+
return /* @__PURE__ */ jsx98(Fragment14, { children });
|
|
7007
7413
|
};
|
|
7008
7414
|
AppShellMain.displayName = "AppShellMain";
|
|
7009
7415
|
|
|
7010
7416
|
// src/components/AppShell/AppShellFooter.tsx
|
|
7011
|
-
import { Fragment as
|
|
7417
|
+
import { Fragment as Fragment15, jsx as jsx99 } from "react/jsx-runtime";
|
|
7012
7418
|
var AppShellFooter = ({ children }) => {
|
|
7013
|
-
return /* @__PURE__ */
|
|
7419
|
+
return /* @__PURE__ */ jsx99(Fragment15, { children });
|
|
7014
7420
|
};
|
|
7015
7421
|
AppShellFooter.displayName = "AppShellFooter";
|
|
7016
7422
|
|
|
7017
7423
|
// src/components/AppShell/AppShellNotificationPanel.tsx
|
|
7018
|
-
import { Fragment as
|
|
7424
|
+
import { Fragment as Fragment16, jsx as jsx100 } from "react/jsx-runtime";
|
|
7019
7425
|
var AppShellNotificationPanel = ({ children }) => {
|
|
7020
|
-
return /* @__PURE__ */
|
|
7426
|
+
return /* @__PURE__ */ jsx100(Fragment16, { children });
|
|
7021
7427
|
};
|
|
7022
7428
|
AppShellNotificationPanel.displayName = "AppShellNotificationPanel";
|
|
7023
7429
|
|
|
7024
7430
|
// src/hooks/useAppShell/useAppShell.ts
|
|
7025
|
-
import * as
|
|
7431
|
+
import * as React42 from "react";
|
|
7026
7432
|
import useMediaQuery3 from "@mui/material/useMediaQuery";
|
|
7027
7433
|
var useAppShell = (options) => {
|
|
7028
|
-
const contextValue =
|
|
7434
|
+
const contextValue = React42.useContext(AppShellContext);
|
|
7029
7435
|
const {
|
|
7030
7436
|
initialCollapsed = false,
|
|
7031
7437
|
initialActiveItem = "dashboard",
|
|
@@ -7036,7 +7442,7 @@ var useAppShell = (options) => {
|
|
|
7036
7442
|
} = options || {};
|
|
7037
7443
|
const isMobile = useMediaQuery3((theme) => theme.breakpoints.down("md"));
|
|
7038
7444
|
const isCreateMode = options !== void 0;
|
|
7039
|
-
const [state, setState] =
|
|
7445
|
+
const [state, setState] = React42.useState({
|
|
7040
7446
|
sidebarCollapsed: initialCollapsed,
|
|
7041
7447
|
notificationPanelOpen: false,
|
|
7042
7448
|
activeMenuItem: initialActiveItem,
|
|
@@ -7044,29 +7450,29 @@ var useAppShell = (options) => {
|
|
|
7044
7450
|
sidebarWidth,
|
|
7045
7451
|
sidebarCollapsedWidth
|
|
7046
7452
|
});
|
|
7047
|
-
|
|
7453
|
+
React42.useEffect(() => {
|
|
7048
7454
|
if (isCreateMode && collapseOnMobile && isMobile) {
|
|
7049
7455
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
7050
7456
|
}
|
|
7051
7457
|
}, [isCreateMode, collapseOnMobile, isMobile]);
|
|
7052
|
-
const toggleSidebar =
|
|
7458
|
+
const toggleSidebar = React42.useCallback(() => {
|
|
7053
7459
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
|
|
7054
7460
|
}, []);
|
|
7055
|
-
const setSidebarCollapsed =
|
|
7461
|
+
const setSidebarCollapsed = React42.useCallback((collapsed) => {
|
|
7056
7462
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: collapsed }));
|
|
7057
7463
|
}, []);
|
|
7058
|
-
const collapseSidebar =
|
|
7464
|
+
const collapseSidebar = React42.useCallback(() => {
|
|
7059
7465
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
7060
7466
|
}, []);
|
|
7061
|
-
const expandSidebar =
|
|
7467
|
+
const expandSidebar = React42.useCallback(() => {
|
|
7062
7468
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: false }));
|
|
7063
7469
|
}, []);
|
|
7064
|
-
const toggleNotificationPanel =
|
|
7470
|
+
const toggleNotificationPanel = React42.useCallback(() => {
|
|
7065
7471
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
7066
7472
|
notificationPanelOpen: !prev.notificationPanelOpen
|
|
7067
7473
|
}));
|
|
7068
7474
|
}, []);
|
|
7069
|
-
const setActiveMenuItem =
|
|
7475
|
+
const setActiveMenuItem = React42.useCallback((id) => {
|
|
7070
7476
|
setState((prev) => {
|
|
7071
7477
|
const newState = __spreadProps(__spreadValues({}, prev), { activeMenuItem: id });
|
|
7072
7478
|
if (collapseOnSelectOnMobile && isMobile && !prev.sidebarCollapsed) {
|
|
@@ -7075,14 +7481,14 @@ var useAppShell = (options) => {
|
|
|
7075
7481
|
return newState;
|
|
7076
7482
|
});
|
|
7077
7483
|
}, [collapseOnSelectOnMobile, isMobile]);
|
|
7078
|
-
const toggleMenu =
|
|
7484
|
+
const toggleMenu = React42.useCallback((id) => {
|
|
7079
7485
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
7080
7486
|
expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
|
|
7081
7487
|
[id]: !prev.expandedMenus[id]
|
|
7082
7488
|
})
|
|
7083
7489
|
}));
|
|
7084
7490
|
}, []);
|
|
7085
|
-
const actions =
|
|
7491
|
+
const actions = React42.useMemo(
|
|
7086
7492
|
() => ({
|
|
7087
7493
|
toggleSidebar,
|
|
7088
7494
|
setSidebarCollapsed,
|
|
@@ -7102,7 +7508,7 @@ var useAppShell = (options) => {
|
|
|
7102
7508
|
toggleMenu
|
|
7103
7509
|
]
|
|
7104
7510
|
);
|
|
7105
|
-
const createdValue =
|
|
7511
|
+
const createdValue = React42.useMemo(
|
|
7106
7512
|
() => ({
|
|
7107
7513
|
state,
|
|
7108
7514
|
actions
|
|
@@ -7121,7 +7527,7 @@ var useAppShell = (options) => {
|
|
|
7121
7527
|
};
|
|
7122
7528
|
|
|
7123
7529
|
// src/components/AppShell/AppShell.tsx
|
|
7124
|
-
import { jsx as
|
|
7530
|
+
import { jsx as jsx101, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7125
7531
|
var SLOT_DISPLAY_NAMES = {
|
|
7126
7532
|
Navbar: "AppShellNavbar",
|
|
7127
7533
|
Sidebar: "AppShellSidebar",
|
|
@@ -7137,9 +7543,9 @@ var extractSlots = (children) => {
|
|
|
7137
7543
|
footer: null,
|
|
7138
7544
|
notificationPanel: null
|
|
7139
7545
|
};
|
|
7140
|
-
|
|
7546
|
+
React43.Children.forEach(children, (child) => {
|
|
7141
7547
|
var _a;
|
|
7142
|
-
if (
|
|
7548
|
+
if (React43.isValidElement(child)) {
|
|
7143
7549
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
7144
7550
|
const childProps = child.props;
|
|
7145
7551
|
switch (displayName) {
|
|
@@ -7171,12 +7577,12 @@ var AppShell = (_a) => {
|
|
|
7171
7577
|
var _b = _a, { children, sx } = _b, shellOptions = __objRest(_b, ["children", "sx"]);
|
|
7172
7578
|
const shell = useAppShell(shellOptions);
|
|
7173
7579
|
const slots = extractSlots(children);
|
|
7174
|
-
return /* @__PURE__ */
|
|
7175
|
-
slots.navbar && /* @__PURE__ */
|
|
7176
|
-
/* @__PURE__ */
|
|
7177
|
-
slots.sidebar && /* @__PURE__ */
|
|
7178
|
-
/* @__PURE__ */
|
|
7179
|
-
/* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ jsx101(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs38(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
|
|
7581
|
+
slots.navbar && /* @__PURE__ */ jsx101(layouts_default.Navbar, { children: slots.navbar }),
|
|
7582
|
+
/* @__PURE__ */ jsxs38(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
|
|
7583
|
+
slots.sidebar && /* @__PURE__ */ jsx101(layouts_default.Sidebar, { children: slots.sidebar }),
|
|
7584
|
+
/* @__PURE__ */ jsxs38(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column", overflow: "auto" }, children: [
|
|
7585
|
+
/* @__PURE__ */ jsx101(Box42, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
|
|
7180
7586
|
slots.footer
|
|
7181
7587
|
] })
|
|
7182
7588
|
] }),
|
|
@@ -7204,7 +7610,7 @@ var densityStyles = {
|
|
|
7204
7610
|
// src/components/ListingTable/ListingTable/ListingTableContainer.tsx
|
|
7205
7611
|
import MuiTableContainer from "@mui/material/TableContainer";
|
|
7206
7612
|
import Paper from "@mui/material/Paper";
|
|
7207
|
-
import { jsx as
|
|
7613
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
7208
7614
|
function ListingTableContainer(_a) {
|
|
7209
7615
|
var _b = _a, {
|
|
7210
7616
|
elevation = 1,
|
|
@@ -7216,16 +7622,16 @@ function ListingTableContainer(_a) {
|
|
|
7216
7622
|
"children"
|
|
7217
7623
|
]);
|
|
7218
7624
|
if (disablePaper) {
|
|
7219
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ jsx102(MuiTableContainer, __spreadProps(__spreadValues({ sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
7220
7626
|
}
|
|
7221
|
-
return /* @__PURE__ */
|
|
7627
|
+
return /* @__PURE__ */ jsx102(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
7222
7628
|
}
|
|
7223
7629
|
var ListingTableContainer_default = ListingTableContainer;
|
|
7224
7630
|
|
|
7225
7631
|
// src/components/ListingTable/ListingTable/ListingTableHead.tsx
|
|
7226
7632
|
import MuiTableHead from "@mui/material/TableHead";
|
|
7227
7633
|
import { styled as styled68 } from "@mui/material/styles";
|
|
7228
|
-
import { jsx as
|
|
7634
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
7229
7635
|
var StyledTableHead = styled68(MuiTableHead)(({ theme }) => ({
|
|
7230
7636
|
"& .MuiTableCell-head": __spreadValues(__spreadValues({
|
|
7231
7637
|
fontWeight: 600
|
|
@@ -7237,33 +7643,141 @@ var StyledTableHead = styled68(MuiTableHead)(({ theme }) => ({
|
|
|
7237
7643
|
}));
|
|
7238
7644
|
function ListingTableHead(_a) {
|
|
7239
7645
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
7240
|
-
return /* @__PURE__ */
|
|
7646
|
+
return /* @__PURE__ */ jsx103(StyledTableHead, __spreadProps(__spreadValues({}, props), { children }));
|
|
7241
7647
|
}
|
|
7242
7648
|
var ListingTableHead_default = ListingTableHead;
|
|
7243
7649
|
|
|
7244
7650
|
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
7651
|
+
import { Children as Children15, Fragment as Fragment17, isValidElement as isValidElement15 } from "react";
|
|
7245
7652
|
import MuiTableBody from "@mui/material/TableBody";
|
|
7246
|
-
import
|
|
7653
|
+
import MuiTableRow from "@mui/material/TableRow";
|
|
7654
|
+
import MuiTableCell from "@mui/material/TableCell";
|
|
7655
|
+
import Box44 from "@mui/material/Box";
|
|
7656
|
+
import { Search as Search2 } from "@wso2/oxygen-ui-icons-react";
|
|
7657
|
+
|
|
7658
|
+
// src/components/ListingTable/context.ts
|
|
7659
|
+
import * as React44 from "react";
|
|
7660
|
+
var ListingTableContext = React44.createContext(null);
|
|
7661
|
+
ListingTableContext.displayName = "ListingTableContext";
|
|
7662
|
+
var useListingTable = () => {
|
|
7663
|
+
return React44.useContext(ListingTableContext);
|
|
7664
|
+
};
|
|
7665
|
+
var useListingTableRequired = () => {
|
|
7666
|
+
const context = React44.useContext(ListingTableContext);
|
|
7667
|
+
if (!context) {
|
|
7668
|
+
throw new Error(
|
|
7669
|
+
"useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
|
|
7670
|
+
);
|
|
7671
|
+
}
|
|
7672
|
+
return context;
|
|
7673
|
+
};
|
|
7674
|
+
|
|
7675
|
+
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
7676
|
+
import Box43 from "@mui/material/Box";
|
|
7677
|
+
import Typography24 from "@mui/material/Typography";
|
|
7678
|
+
import { jsx as jsx104, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7679
|
+
function ListingTableEmptyState({
|
|
7680
|
+
title = "No data available",
|
|
7681
|
+
description,
|
|
7682
|
+
illustration,
|
|
7683
|
+
action,
|
|
7684
|
+
minHeight = 300,
|
|
7685
|
+
sx
|
|
7686
|
+
}) {
|
|
7687
|
+
return /* @__PURE__ */ jsxs39(
|
|
7688
|
+
Box43,
|
|
7689
|
+
{
|
|
7690
|
+
sx: __spreadValues({
|
|
7691
|
+
display: "flex",
|
|
7692
|
+
flexDirection: "column",
|
|
7693
|
+
alignItems: "center",
|
|
7694
|
+
justifyContent: "center",
|
|
7695
|
+
minHeight: typeof minHeight === "number" ? `${minHeight}px` : minHeight,
|
|
7696
|
+
p: 4,
|
|
7697
|
+
textAlign: "center"
|
|
7698
|
+
}, sx),
|
|
7699
|
+
children: [
|
|
7700
|
+
illustration && /* @__PURE__ */ jsx104(
|
|
7701
|
+
Box43,
|
|
7702
|
+
{
|
|
7703
|
+
sx: {
|
|
7704
|
+
mb: 2,
|
|
7705
|
+
color: "text.secondary",
|
|
7706
|
+
"& svg": {
|
|
7707
|
+
width: 64,
|
|
7708
|
+
height: 64
|
|
7709
|
+
}
|
|
7710
|
+
},
|
|
7711
|
+
children: illustration
|
|
7712
|
+
}
|
|
7713
|
+
),
|
|
7714
|
+
/* @__PURE__ */ jsx104(Typography24, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
7715
|
+
description && /* @__PURE__ */ jsx104(Typography24, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
7716
|
+
action && /* @__PURE__ */ jsx104(Box43, { children: action })
|
|
7717
|
+
]
|
|
7718
|
+
}
|
|
7719
|
+
);
|
|
7720
|
+
}
|
|
7721
|
+
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
7722
|
+
|
|
7723
|
+
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
7724
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
7725
|
+
function hasContent(node) {
|
|
7726
|
+
return Children15.toArray(node).some(
|
|
7727
|
+
(child) => isValidElement15(child) && child.type === Fragment17 ? hasContent(child.props.children) : true
|
|
7728
|
+
);
|
|
7729
|
+
}
|
|
7247
7730
|
function ListingTableBody(_a) {
|
|
7248
|
-
var _b = _a, {
|
|
7249
|
-
|
|
7731
|
+
var _b = _a, {
|
|
7732
|
+
children,
|
|
7733
|
+
searchValue,
|
|
7734
|
+
loading,
|
|
7735
|
+
noSearchResultsText = "No results found",
|
|
7736
|
+
noSearchResultsDescription = "Try a different keyword",
|
|
7737
|
+
noSearchResultsIcon = /* @__PURE__ */ jsx105(Search2, {}),
|
|
7738
|
+
emptyStateColSpan = 1e3
|
|
7739
|
+
} = _b, props = __objRest(_b, [
|
|
7740
|
+
"children",
|
|
7741
|
+
"searchValue",
|
|
7742
|
+
"loading",
|
|
7743
|
+
"noSearchResultsText",
|
|
7744
|
+
"noSearchResultsDescription",
|
|
7745
|
+
"noSearchResultsIcon",
|
|
7746
|
+
"emptyStateColSpan"
|
|
7747
|
+
]);
|
|
7748
|
+
var _a2, _b2;
|
|
7749
|
+
const context = useListingTable();
|
|
7750
|
+
const isSearching = Boolean((_a2 = searchValue != null ? searchValue : context == null ? void 0 : context.searchValue) == null ? void 0 : _a2.trim());
|
|
7751
|
+
const isLoading = (_b2 = loading != null ? loading : context == null ? void 0 : context.loading) != null ? _b2 : false;
|
|
7752
|
+
const hasRows = hasContent(children);
|
|
7753
|
+
if (isSearching && !isLoading && !hasRows) {
|
|
7754
|
+
return /* @__PURE__ */ jsx105(MuiTableBody, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx105(MuiTableRow, { children: /* @__PURE__ */ jsx105(MuiTableCell, { colSpan: emptyStateColSpan, sx: { border: 0 }, children: /* @__PURE__ */ jsx105(Box44, { role: "status", "aria-live": "polite", children: /* @__PURE__ */ jsx105(
|
|
7755
|
+
ListingTableEmptyState,
|
|
7756
|
+
{
|
|
7757
|
+
title: noSearchResultsText,
|
|
7758
|
+
description: noSearchResultsDescription,
|
|
7759
|
+
illustration: noSearchResultsIcon
|
|
7760
|
+
}
|
|
7761
|
+
) }) }) }) }));
|
|
7762
|
+
}
|
|
7763
|
+
return /* @__PURE__ */ jsx105(MuiTableBody, __spreadProps(__spreadValues({}, props), { children }));
|
|
7250
7764
|
}
|
|
7251
7765
|
var ListingTableBody_default = ListingTableBody;
|
|
7252
7766
|
|
|
7253
7767
|
// src/components/ListingTable/ListingTable/ListingTableFooter.tsx
|
|
7254
7768
|
import MuiTableFooter from "@mui/material/TableFooter";
|
|
7255
|
-
import { jsx as
|
|
7769
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7256
7770
|
function ListingTableFooter(_a) {
|
|
7257
7771
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
7258
|
-
return /* @__PURE__ */
|
|
7772
|
+
return /* @__PURE__ */ jsx106(MuiTableFooter, __spreadProps(__spreadValues({}, props), { children }));
|
|
7259
7773
|
}
|
|
7260
7774
|
var ListingTableFooter_default = ListingTableFooter;
|
|
7261
7775
|
|
|
7262
7776
|
// src/components/ListingTable/ListingTable/ListingTableRow.tsx
|
|
7263
|
-
import
|
|
7777
|
+
import MuiTableRow2 from "@mui/material/TableRow";
|
|
7264
7778
|
import { styled as styled69, alpha as alpha2 } from "@mui/material/styles";
|
|
7265
|
-
import { jsx as
|
|
7266
|
-
var StyledTableRow = styled69(
|
|
7779
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
7780
|
+
var StyledTableRow = styled69(MuiTableRow2, {
|
|
7267
7781
|
shouldForwardProp: (prop) => !["clickable", "variant"].includes(prop)
|
|
7268
7782
|
})(({ theme: muiTheme, clickable, variant = "table" }) => {
|
|
7269
7783
|
const theme = muiTheme;
|
|
@@ -7321,15 +7835,15 @@ function ListingTableRow(_a) {
|
|
|
7321
7835
|
"variant",
|
|
7322
7836
|
"children"
|
|
7323
7837
|
]);
|
|
7324
|
-
return /* @__PURE__ */
|
|
7838
|
+
return /* @__PURE__ */ jsx107(StyledTableRow, __spreadProps(__spreadValues({ clickable, variant }, props), { children }));
|
|
7325
7839
|
}
|
|
7326
7840
|
var ListingTableRow_default = ListingTableRow;
|
|
7327
7841
|
|
|
7328
7842
|
// src/components/ListingTable/ListingTable/ListingTableCell.tsx
|
|
7329
|
-
import
|
|
7843
|
+
import MuiTableCell2 from "@mui/material/TableCell";
|
|
7330
7844
|
import { styled as styled70 } from "@mui/material/styles";
|
|
7331
|
-
import { jsx as
|
|
7332
|
-
var StyledTableCell = styled70(
|
|
7845
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
7846
|
+
var StyledTableCell = styled70(MuiTableCell2, {
|
|
7333
7847
|
shouldForwardProp: (prop) => {
|
|
7334
7848
|
const excludedProps = ["truncate", "maxWidth"];
|
|
7335
7849
|
return !excludedProps.some((excluded) => excluded === prop);
|
|
@@ -7351,7 +7865,7 @@ function ListingTableCell(_a) {
|
|
|
7351
7865
|
"maxWidth",
|
|
7352
7866
|
"children"
|
|
7353
7867
|
]);
|
|
7354
|
-
return /* @__PURE__ */
|
|
7868
|
+
return /* @__PURE__ */ jsx108(StyledTableCell, __spreadProps(__spreadValues({ truncate, maxWidth }, props), { children }));
|
|
7355
7869
|
}
|
|
7356
7870
|
var ListingTableCell_default = ListingTableCell;
|
|
7357
7871
|
|
|
@@ -7359,26 +7873,7 @@ var ListingTableCell_default = ListingTableCell;
|
|
|
7359
7873
|
import { useCallback as useCallback5 } from "react";
|
|
7360
7874
|
import { DataGrid } from "@mui/x-data-grid";
|
|
7361
7875
|
import { styled as styled71, alpha as alpha3 } from "@mui/material/styles";
|
|
7362
|
-
|
|
7363
|
-
// src/components/ListingTable/context.ts
|
|
7364
|
-
import * as React43 from "react";
|
|
7365
|
-
var ListingTableContext = React43.createContext(null);
|
|
7366
|
-
ListingTableContext.displayName = "ListingTableContext";
|
|
7367
|
-
var useListingTable = () => {
|
|
7368
|
-
return React43.useContext(ListingTableContext);
|
|
7369
|
-
};
|
|
7370
|
-
var useListingTableRequired = () => {
|
|
7371
|
-
const context = React43.useContext(ListingTableContext);
|
|
7372
|
-
if (!context) {
|
|
7373
|
-
throw new Error(
|
|
7374
|
-
"useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
|
|
7375
|
-
);
|
|
7376
|
-
}
|
|
7377
|
-
return context;
|
|
7378
|
-
};
|
|
7379
|
-
|
|
7380
|
-
// src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
|
|
7381
|
-
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7876
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
7382
7877
|
var StyledDataGrid = styled71(DataGrid)(({ theme }) => ({
|
|
7383
7878
|
// Remove outer border for seamless integration within ListingTable.Container
|
|
7384
7879
|
border: "none",
|
|
@@ -7536,7 +8031,7 @@ function ListingTableDataGrid(_a) {
|
|
|
7536
8031
|
"& .MuiDataGrid-cell": { padding: cellPadding }
|
|
7537
8032
|
};
|
|
7538
8033
|
const mergedSx = variant === "card" ? [cardSx, densitySx, ...Array.isArray(sx) ? sx : [sx]] : [densitySx, ...Array.isArray(sx) ? sx : [sx]];
|
|
7539
|
-
return /* @__PURE__ */
|
|
8034
|
+
return /* @__PURE__ */ jsx109(
|
|
7540
8035
|
StyledDataGrid,
|
|
7541
8036
|
__spreadValues({
|
|
7542
8037
|
density,
|
|
@@ -7551,13 +8046,13 @@ function ListingTableDataGrid(_a) {
|
|
|
7551
8046
|
var ListingTableDataGrid_default = ListingTableDataGrid;
|
|
7552
8047
|
|
|
7553
8048
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
7554
|
-
import { useState as
|
|
7555
|
-
import
|
|
8049
|
+
import { useState as useState11, useCallback as useCallback6 } from "react";
|
|
8050
|
+
import Box45 from "@mui/material/Box";
|
|
7556
8051
|
import TextField3 from "@mui/material/TextField";
|
|
7557
8052
|
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
7558
8053
|
import IconButton8 from "@mui/material/IconButton";
|
|
7559
|
-
import { Search as
|
|
7560
|
-
import { Fragment as
|
|
8054
|
+
import { Search as Search3, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
8055
|
+
import { Fragment as Fragment18, jsx as jsx110, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7561
8056
|
function ListingTableToolbar({
|
|
7562
8057
|
showSearch = false,
|
|
7563
8058
|
searchSlot,
|
|
@@ -7571,7 +8066,7 @@ function ListingTableToolbar({
|
|
|
7571
8066
|
sx
|
|
7572
8067
|
}) {
|
|
7573
8068
|
const tableContext = useListingTable();
|
|
7574
|
-
const [internalSearchValue, setInternalSearchValue] =
|
|
8069
|
+
const [internalSearchValue, setInternalSearchValue] = useState11("");
|
|
7575
8070
|
const isControlledByProp = controlledSearchValue !== void 0;
|
|
7576
8071
|
const isControlledByContext = !isControlledByProp && (tableContext == null ? void 0 : tableContext.searchValue) !== void 0;
|
|
7577
8072
|
const isControlled = isControlledByProp || isControlledByContext;
|
|
@@ -7598,7 +8093,7 @@ function ListingTableToolbar({
|
|
|
7598
8093
|
return searchSlot;
|
|
7599
8094
|
}
|
|
7600
8095
|
if (showSearch) {
|
|
7601
|
-
return /* @__PURE__ */
|
|
8096
|
+
return /* @__PURE__ */ jsx110(
|
|
7602
8097
|
TextField3,
|
|
7603
8098
|
{
|
|
7604
8099
|
size: "small",
|
|
@@ -7614,8 +8109,8 @@ function ListingTableToolbar({
|
|
|
7614
8109
|
"aria-label": searchPlaceholder || "Search"
|
|
7615
8110
|
},
|
|
7616
8111
|
input: {
|
|
7617
|
-
startAdornment: /* @__PURE__ */
|
|
7618
|
-
endAdornment: searchValue ? /* @__PURE__ */
|
|
8112
|
+
startAdornment: /* @__PURE__ */ jsx110(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx110(Search3, { size: 18, "aria-hidden": "true" }) }),
|
|
8113
|
+
endAdornment: searchValue ? /* @__PURE__ */ jsx110(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx110(IconButton8, { size: "small", onClick: handleClearSearch, edge: "end", "aria-label": "Clear search", children: /* @__PURE__ */ jsx110(X4, { size: 16, "aria-hidden": "true" }) }) }) : null
|
|
7619
8114
|
}
|
|
7620
8115
|
}
|
|
7621
8116
|
}
|
|
@@ -7623,8 +8118,8 @@ function ListingTableToolbar({
|
|
|
7623
8118
|
}
|
|
7624
8119
|
return null;
|
|
7625
8120
|
};
|
|
7626
|
-
return /* @__PURE__ */
|
|
7627
|
-
|
|
8121
|
+
return /* @__PURE__ */ jsxs40(
|
|
8122
|
+
Box45,
|
|
7628
8123
|
{
|
|
7629
8124
|
role: "toolbar",
|
|
7630
8125
|
"aria-label": "Table toolbar",
|
|
@@ -7639,9 +8134,9 @@ function ListingTableToolbar({
|
|
|
7639
8134
|
children: [
|
|
7640
8135
|
renderSearch(),
|
|
7641
8136
|
children,
|
|
7642
|
-
actions && /* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7644
|
-
/* @__PURE__ */
|
|
8137
|
+
actions && /* @__PURE__ */ jsxs40(Fragment18, { children: [
|
|
8138
|
+
/* @__PURE__ */ jsx110(Box45, { sx: { flex: 1 } }),
|
|
8139
|
+
/* @__PURE__ */ jsx110(Box45, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
7645
8140
|
] })
|
|
7646
8141
|
]
|
|
7647
8142
|
}
|
|
@@ -7649,65 +8144,17 @@ function ListingTableToolbar({
|
|
|
7649
8144
|
}
|
|
7650
8145
|
var ListingTableToolbar_default = ListingTableToolbar;
|
|
7651
8146
|
|
|
7652
|
-
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
7653
|
-
import Box42 from "@mui/material/Box";
|
|
7654
|
-
import Typography22 from "@mui/material/Typography";
|
|
7655
|
-
import { jsx as jsx108, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7656
|
-
function ListingTableEmptyState({
|
|
7657
|
-
title = "No data available",
|
|
7658
|
-
description,
|
|
7659
|
-
illustration,
|
|
7660
|
-
action,
|
|
7661
|
-
minHeight = 300,
|
|
7662
|
-
sx
|
|
7663
|
-
}) {
|
|
7664
|
-
return /* @__PURE__ */ jsxs38(
|
|
7665
|
-
Box42,
|
|
7666
|
-
{
|
|
7667
|
-
sx: __spreadValues({
|
|
7668
|
-
display: "flex",
|
|
7669
|
-
flexDirection: "column",
|
|
7670
|
-
alignItems: "center",
|
|
7671
|
-
justifyContent: "center",
|
|
7672
|
-
minHeight: typeof minHeight === "number" ? `${minHeight}px` : minHeight,
|
|
7673
|
-
p: 4,
|
|
7674
|
-
textAlign: "center"
|
|
7675
|
-
}, sx),
|
|
7676
|
-
children: [
|
|
7677
|
-
illustration && /* @__PURE__ */ jsx108(
|
|
7678
|
-
Box42,
|
|
7679
|
-
{
|
|
7680
|
-
sx: {
|
|
7681
|
-
mb: 2,
|
|
7682
|
-
color: "text.secondary",
|
|
7683
|
-
"& svg": {
|
|
7684
|
-
width: 64,
|
|
7685
|
-
height: 64
|
|
7686
|
-
}
|
|
7687
|
-
},
|
|
7688
|
-
children: illustration
|
|
7689
|
-
}
|
|
7690
|
-
),
|
|
7691
|
-
/* @__PURE__ */ jsx108(Typography22, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
7692
|
-
description && /* @__PURE__ */ jsx108(Typography22, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
7693
|
-
action && /* @__PURE__ */ jsx108(Box42, { children: action })
|
|
7694
|
-
]
|
|
7695
|
-
}
|
|
7696
|
-
);
|
|
7697
|
-
}
|
|
7698
|
-
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
7699
|
-
|
|
7700
8147
|
// src/components/ListingTable/shared/ListingTableDensityControl.tsx
|
|
7701
8148
|
import { useCallback as useCallback7 } from "react";
|
|
7702
8149
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
7703
8150
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
7704
|
-
import
|
|
8151
|
+
import Tooltip9 from "@mui/material/Tooltip";
|
|
7705
8152
|
import { AlignJustify, Menu as Menu4, List as List4 } from "@wso2/oxygen-ui-icons-react";
|
|
7706
|
-
import { jsx as
|
|
8153
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
7707
8154
|
var densityOptions = [
|
|
7708
|
-
{ value: "compact", label: "Compact", icon: /* @__PURE__ */
|
|
7709
|
-
{ value: "standard", label: "Standard", icon: /* @__PURE__ */
|
|
7710
|
-
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */
|
|
8155
|
+
{ value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx111(AlignJustify, { size: 18 }) },
|
|
8156
|
+
{ value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx111(Menu4, { size: 18 }) },
|
|
8157
|
+
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx111(List4, { size: 18 }) }
|
|
7711
8158
|
];
|
|
7712
8159
|
function ListingTableDensityControl({
|
|
7713
8160
|
value: valueProp,
|
|
@@ -7727,7 +8174,7 @@ function ListingTableDensityControl({
|
|
|
7727
8174
|
},
|
|
7728
8175
|
[effectiveOnChange]
|
|
7729
8176
|
);
|
|
7730
|
-
return /* @__PURE__ */
|
|
8177
|
+
return /* @__PURE__ */ jsx111(
|
|
7731
8178
|
ToggleButtonGroup,
|
|
7732
8179
|
{
|
|
7733
8180
|
value,
|
|
@@ -7736,7 +8183,7 @@ function ListingTableDensityControl({
|
|
|
7736
8183
|
size,
|
|
7737
8184
|
sx,
|
|
7738
8185
|
"aria-label": "Table density",
|
|
7739
|
-
children: densityOptions.map((option) => /* @__PURE__ */
|
|
8186
|
+
children: densityOptions.map((option) => /* @__PURE__ */ jsx111(ToggleButton, { value: option.value, "aria-label": option.label, children: /* @__PURE__ */ jsx111(Tooltip9, { title: option.label, children: /* @__PURE__ */ jsx111("span", { style: { display: "flex", alignItems: "center" }, "aria-hidden": "true", children: option.icon }) }) }, option.value))
|
|
7740
8187
|
}
|
|
7741
8188
|
);
|
|
7742
8189
|
}
|
|
@@ -7746,7 +8193,7 @@ var ListingTableDensityControl_default = ListingTableDensityControl;
|
|
|
7746
8193
|
import { useCallback as useCallback8 } from "react";
|
|
7747
8194
|
import MuiTableSortLabel from "@mui/material/TableSortLabel";
|
|
7748
8195
|
import { styled as styled72 } from "@mui/material/styles";
|
|
7749
|
-
import { jsx as
|
|
8196
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
7750
8197
|
var StyledTableSortLabel = styled72(MuiTableSortLabel)(({ theme }) => ({
|
|
7751
8198
|
color: "inherit !important",
|
|
7752
8199
|
"&.Mui-active": {
|
|
@@ -7790,13 +8237,257 @@ function ListingTableSortLabel(_a) {
|
|
|
7790
8237
|
},
|
|
7791
8238
|
[onClickProp, field, tableContext, active, direction]
|
|
7792
8239
|
);
|
|
7793
|
-
return /* @__PURE__ */
|
|
8240
|
+
return /* @__PURE__ */ jsx112(StyledTableSortLabel, __spreadProps(__spreadValues({ active, direction, onClick: handleClick, hideSortIcon }, props), { children }));
|
|
7794
8241
|
}
|
|
7795
8242
|
var ListingTableSortLabel_default = ListingTableSortLabel;
|
|
7796
8243
|
|
|
8244
|
+
// src/components/ListingTable/shared/ListingTableFilter.tsx
|
|
8245
|
+
import * as React46 from "react";
|
|
8246
|
+
import IconButton9 from "@mui/material/IconButton";
|
|
8247
|
+
import Tooltip10 from "@mui/material/Tooltip";
|
|
8248
|
+
import { ListFilter as ListFilter2 } from "@wso2/oxygen-ui-icons-react";
|
|
8249
|
+
|
|
8250
|
+
// src/components/ListingTable/shared/ListingTableFilterMenu.tsx
|
|
8251
|
+
import * as React45 from "react";
|
|
8252
|
+
import Box46 from "@mui/material/Box";
|
|
8253
|
+
import MenuItem8 from "@mui/material/MenuItem";
|
|
8254
|
+
import MenuList3 from "@mui/material/MenuList";
|
|
8255
|
+
import Popover5 from "@mui/material/Popover";
|
|
8256
|
+
import Typography25 from "@mui/material/Typography";
|
|
8257
|
+
import { Check } from "@wso2/oxygen-ui-icons-react";
|
|
8258
|
+
import { jsx as jsx113, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8259
|
+
var MenuContent = ({
|
|
8260
|
+
open,
|
|
8261
|
+
onClose,
|
|
8262
|
+
options,
|
|
8263
|
+
value,
|
|
8264
|
+
onChange,
|
|
8265
|
+
searchable = false,
|
|
8266
|
+
label,
|
|
8267
|
+
listId,
|
|
8268
|
+
allLabel,
|
|
8269
|
+
searchPlaceholder,
|
|
8270
|
+
noMatchLabel
|
|
8271
|
+
}) => {
|
|
8272
|
+
const [query, setQuery] = React45.useState("");
|
|
8273
|
+
React45.useLayoutEffect(() => {
|
|
8274
|
+
if (open) setQuery("");
|
|
8275
|
+
}, [open]);
|
|
8276
|
+
const listRef = React45.useRef(null);
|
|
8277
|
+
const searchRef = React45.useRef(null);
|
|
8278
|
+
const current = value != null ? value : "";
|
|
8279
|
+
const needle = query.trim().toLowerCase();
|
|
8280
|
+
const matching = options.filter(
|
|
8281
|
+
(option) => option.value !== "" && option.label.toLowerCase().includes(needle)
|
|
8282
|
+
);
|
|
8283
|
+
const shown = [{ value: "", label: allLabel }, ...matching];
|
|
8284
|
+
const pick = (option) => {
|
|
8285
|
+
onChange(option.value === "" ? null : option.value);
|
|
8286
|
+
onClose();
|
|
8287
|
+
};
|
|
8288
|
+
const handleListKeyDown = (event) => {
|
|
8289
|
+
var _a, _b, _c;
|
|
8290
|
+
const first = (_a = listRef.current) == null ? void 0 : _a.querySelector('[role="menuitemradio"]');
|
|
8291
|
+
if (searchable && event.key === "ArrowUp" && document.activeElement === first) {
|
|
8292
|
+
event.preventDefault();
|
|
8293
|
+
event.stopPropagation();
|
|
8294
|
+
(_c = (_b = searchRef.current) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
|
|
8295
|
+
}
|
|
8296
|
+
};
|
|
8297
|
+
const focusFirst = () => {
|
|
8298
|
+
var _a, _b;
|
|
8299
|
+
return (_b = (_a = listRef.current) == null ? void 0 : _a.querySelector('[role="menuitemradio"]')) == null ? void 0 : _b.focus();
|
|
8300
|
+
};
|
|
8301
|
+
return /* @__PURE__ */ jsxs41(Box46, { sx: { minWidth: 240, maxWidth: 320 }, children: [
|
|
8302
|
+
searchable && /* @__PURE__ */ jsx113(Box46, { ref: searchRef, sx: { p: 1 }, children: /* @__PURE__ */ jsx113(
|
|
8303
|
+
SearchBarBase,
|
|
8304
|
+
{
|
|
8305
|
+
autoFocus: true,
|
|
8306
|
+
fullWidth: true,
|
|
8307
|
+
value: query,
|
|
8308
|
+
placeholder: searchPlaceholder,
|
|
8309
|
+
"aria-label": label,
|
|
8310
|
+
onChange: (event) => setQuery(event.target.value),
|
|
8311
|
+
onKeyDown: (event) => {
|
|
8312
|
+
if (event.key === "ArrowDown") {
|
|
8313
|
+
event.preventDefault();
|
|
8314
|
+
focusFirst();
|
|
8315
|
+
} else if (event.key === "Enter" && matching.length > 0) {
|
|
8316
|
+
event.preventDefault();
|
|
8317
|
+
pick(matching[0]);
|
|
8318
|
+
}
|
|
8319
|
+
},
|
|
8320
|
+
sx: {
|
|
8321
|
+
"& .MuiOutlinedInput-root": { height: 32, fontSize: "0.8125rem" },
|
|
8322
|
+
"& .MuiInputBase-input": { padding: "4px 8px" }
|
|
8323
|
+
}
|
|
8324
|
+
}
|
|
8325
|
+
) }),
|
|
8326
|
+
/* @__PURE__ */ jsxs41(MenuList3, { ref: listRef, id: listId, "aria-label": label, autoFocusItem: !searchable, onKeyDownCapture: handleListKeyDown, sx: { py: 0.5, maxHeight: 320, overflow: "auto" }, children: [
|
|
8327
|
+
shown.map((option) => {
|
|
8328
|
+
const selected = option.value === current;
|
|
8329
|
+
return /* @__PURE__ */ jsxs41(
|
|
8330
|
+
MenuItem8,
|
|
8331
|
+
{
|
|
8332
|
+
role: "menuitemradio",
|
|
8333
|
+
"aria-checked": selected,
|
|
8334
|
+
selected,
|
|
8335
|
+
onClick: () => pick(option),
|
|
8336
|
+
sx: { justifyContent: "space-between", gap: 2 },
|
|
8337
|
+
children: [
|
|
8338
|
+
option.label,
|
|
8339
|
+
selected && /* @__PURE__ */ jsx113(Check, { size: 16, "aria-hidden": "true" })
|
|
8340
|
+
]
|
|
8341
|
+
},
|
|
8342
|
+
option.value
|
|
8343
|
+
);
|
|
8344
|
+
}),
|
|
8345
|
+
needle !== "" && matching.length === 0 && // A list item, not a paragraph, because it sits directly in the list.
|
|
8346
|
+
/* @__PURE__ */ jsx113(Typography25, { component: "li", role: "presentation", variant: "body2", color: "text.secondary", sx: { px: 2, py: 1, listStyle: "none" }, children: noMatchLabel })
|
|
8347
|
+
] })
|
|
8348
|
+
] });
|
|
8349
|
+
};
|
|
8350
|
+
var ListingTableFilterMenu = (_a) => {
|
|
8351
|
+
var _b = _a, {
|
|
8352
|
+
open,
|
|
8353
|
+
anchorEl,
|
|
8354
|
+
onClose
|
|
8355
|
+
} = _b, content = __objRest(_b, [
|
|
8356
|
+
"open",
|
|
8357
|
+
"anchorEl",
|
|
8358
|
+
"onClose"
|
|
8359
|
+
]);
|
|
8360
|
+
return /* @__PURE__ */ jsx113(
|
|
8361
|
+
Popover5,
|
|
8362
|
+
{
|
|
8363
|
+
anchorEl,
|
|
8364
|
+
open,
|
|
8365
|
+
onClose,
|
|
8366
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
8367
|
+
children: /* @__PURE__ */ jsx113(MenuContent, __spreadValues({ open, onClose }, content))
|
|
8368
|
+
}
|
|
8369
|
+
);
|
|
8370
|
+
};
|
|
8371
|
+
ListingTableFilterMenu.displayName = "ListingTableFilterMenu";
|
|
8372
|
+
|
|
8373
|
+
// src/components/ListingTable/shared/ListingTableFilter.tsx
|
|
8374
|
+
import { Fragment as Fragment19, jsx as jsx114, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8375
|
+
var ListingTableFilter = React46.forwardRef(
|
|
8376
|
+
function ListingTableFilter2(_a, ref) {
|
|
8377
|
+
var _b = _a, {
|
|
8378
|
+
field,
|
|
8379
|
+
options,
|
|
8380
|
+
value: valueProp,
|
|
8381
|
+
onChange: onChangeProp,
|
|
8382
|
+
searchable = false,
|
|
8383
|
+
label = "Filter",
|
|
8384
|
+
allLabel = "Any",
|
|
8385
|
+
searchPlaceholder = "Search",
|
|
8386
|
+
noMatchLabel = "No matches",
|
|
8387
|
+
alwaysShowIcon = false,
|
|
8388
|
+
onClick,
|
|
8389
|
+
sx
|
|
8390
|
+
} = _b, buttonProps = __objRest(_b, [
|
|
8391
|
+
"field",
|
|
8392
|
+
"options",
|
|
8393
|
+
"value",
|
|
8394
|
+
"onChange",
|
|
8395
|
+
"searchable",
|
|
8396
|
+
"label",
|
|
8397
|
+
"allLabel",
|
|
8398
|
+
"searchPlaceholder",
|
|
8399
|
+
"noMatchLabel",
|
|
8400
|
+
"alwaysShowIcon",
|
|
8401
|
+
"onClick",
|
|
8402
|
+
"sx"
|
|
8403
|
+
]);
|
|
8404
|
+
var _a2;
|
|
8405
|
+
const tableContext = useListingTable();
|
|
8406
|
+
const [anchor, setAnchor] = React46.useState(null);
|
|
8407
|
+
const listId = React46.useId();
|
|
8408
|
+
const fromContext = field !== void 0 ? (_a2 = tableContext == null ? void 0 : tableContext.filters) == null ? void 0 : _a2[field] : void 0;
|
|
8409
|
+
const value = valueProp !== void 0 ? valueProp : typeof fromContext === "string" ? fromContext : null;
|
|
8410
|
+
const applied = value !== null && value !== "";
|
|
8411
|
+
const change = (next) => {
|
|
8412
|
+
if (onChangeProp) onChangeProp(next);
|
|
8413
|
+
else if (field && (tableContext == null ? void 0 : tableContext.onFilterChange)) tableContext.onFilterChange(field, next);
|
|
8414
|
+
else {
|
|
8415
|
+
console.warn(
|
|
8416
|
+
"ListingTable.Filter: a choice was picked but nothing handles it. Pass `onChange`, or give `field` inside a ListingTable.Provider that has `onFilterChange`."
|
|
8417
|
+
);
|
|
8418
|
+
}
|
|
8419
|
+
};
|
|
8420
|
+
const resting = applied ? 1 : alwaysShowIcon ? 0.5 : 0;
|
|
8421
|
+
return /* @__PURE__ */ jsxs42(Fragment19, { children: [
|
|
8422
|
+
/* @__PURE__ */ jsx114(Tooltip10, { title: label, describeChild: true, children: /* @__PURE__ */ jsx114("span", { children: /* @__PURE__ */ jsx114(
|
|
8423
|
+
IconButton9,
|
|
8424
|
+
__spreadProps(__spreadValues({
|
|
8425
|
+
size: "small",
|
|
8426
|
+
color: applied ? "primary" : "default"
|
|
8427
|
+
}, buttonProps), {
|
|
8428
|
+
ref,
|
|
8429
|
+
"aria-label": label,
|
|
8430
|
+
"aria-haspopup": "menu",
|
|
8431
|
+
"aria-expanded": Boolean(anchor),
|
|
8432
|
+
"aria-controls": anchor ? listId : void 0,
|
|
8433
|
+
onClick: (event) => {
|
|
8434
|
+
onClick == null ? void 0 : onClick(event);
|
|
8435
|
+
setAnchor(event.currentTarget);
|
|
8436
|
+
},
|
|
8437
|
+
sx: [
|
|
8438
|
+
(theme) => ({
|
|
8439
|
+
p: 0.25,
|
|
8440
|
+
opacity: resting,
|
|
8441
|
+
transition: theme.transitions.create("opacity", {
|
|
8442
|
+
duration: theme.transitions.duration.shorter
|
|
8443
|
+
}),
|
|
8444
|
+
".MuiTableCell-root:hover &": { opacity: applied ? 1 : 0.5 },
|
|
8445
|
+
// Inside a cell, the full-strength states repeat under the cell, so they match the
|
|
8446
|
+
// specificity of the cell-hover rule above and come after it.
|
|
8447
|
+
[[
|
|
8448
|
+
"&:hover",
|
|
8449
|
+
"&:focus-visible",
|
|
8450
|
+
'&[aria-expanded="true"]',
|
|
8451
|
+
".MuiTableCell-root &:hover",
|
|
8452
|
+
".MuiTableCell-root &:focus-visible",
|
|
8453
|
+
'.MuiTableCell-root &[aria-expanded="true"]',
|
|
8454
|
+
".MuiTableCell-root:focus-within &"
|
|
8455
|
+
].join(", ")]: {
|
|
8456
|
+
opacity: 1
|
|
8457
|
+
},
|
|
8458
|
+
"@media (hover: none)": { opacity: applied ? 1 : 0.5 }
|
|
8459
|
+
}),
|
|
8460
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
8461
|
+
],
|
|
8462
|
+
children: /* @__PURE__ */ jsx114(ListFilter2, { size: 14 })
|
|
8463
|
+
})
|
|
8464
|
+
) }) }),
|
|
8465
|
+
/* @__PURE__ */ jsx114(
|
|
8466
|
+
ListingTableFilterMenu,
|
|
8467
|
+
{
|
|
8468
|
+
open: Boolean(anchor),
|
|
8469
|
+
anchorEl: anchor,
|
|
8470
|
+
onClose: () => setAnchor(null),
|
|
8471
|
+
options,
|
|
8472
|
+
value,
|
|
8473
|
+
onChange: change,
|
|
8474
|
+
searchable,
|
|
8475
|
+
label,
|
|
8476
|
+
listId,
|
|
8477
|
+
allLabel,
|
|
8478
|
+
searchPlaceholder,
|
|
8479
|
+
noMatchLabel
|
|
8480
|
+
}
|
|
8481
|
+
)
|
|
8482
|
+
] });
|
|
8483
|
+
}
|
|
8484
|
+
);
|
|
8485
|
+
ListingTableFilter.displayName = "ListingTableFilter";
|
|
8486
|
+
var ListingTableFilter_default = ListingTableFilter;
|
|
8487
|
+
|
|
7797
8488
|
// src/components/ListingTable/shared/ListingTableRowActions.tsx
|
|
7798
|
-
import
|
|
7799
|
-
import { jsx as
|
|
8489
|
+
import Box47 from "@mui/material/Box";
|
|
8490
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
7800
8491
|
var alignmentMap = {
|
|
7801
8492
|
left: "flex-start",
|
|
7802
8493
|
center: "center",
|
|
@@ -7808,8 +8499,8 @@ function ListingTableRowActions({
|
|
|
7808
8499
|
align = "right",
|
|
7809
8500
|
sx
|
|
7810
8501
|
}) {
|
|
7811
|
-
return /* @__PURE__ */
|
|
7812
|
-
|
|
8502
|
+
return /* @__PURE__ */ jsx115(
|
|
8503
|
+
Box47,
|
|
7813
8504
|
{
|
|
7814
8505
|
className: "table-row-actions",
|
|
7815
8506
|
sx: __spreadValues(__spreadValues({
|
|
@@ -7832,9 +8523,9 @@ function ListingTableRowActions({
|
|
|
7832
8523
|
var ListingTableRowActions_default = ListingTableRowActions;
|
|
7833
8524
|
|
|
7834
8525
|
// src/components/ListingTable/shared/ListingTableCellIcon.tsx
|
|
7835
|
-
import
|
|
7836
|
-
import
|
|
7837
|
-
import { Fragment as
|
|
8526
|
+
import Box48 from "@mui/material/Box";
|
|
8527
|
+
import Typography26 from "@mui/material/Typography";
|
|
8528
|
+
import { Fragment as Fragment20, jsx as jsx116, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7838
8529
|
function ListingTableCellIcon({
|
|
7839
8530
|
icon,
|
|
7840
8531
|
primary,
|
|
@@ -7843,8 +8534,8 @@ function ListingTableCellIcon({
|
|
|
7843
8534
|
iconSx,
|
|
7844
8535
|
sx
|
|
7845
8536
|
}) {
|
|
7846
|
-
const iconElement = /* @__PURE__ */
|
|
7847
|
-
|
|
8537
|
+
const iconElement = /* @__PURE__ */ jsx116(
|
|
8538
|
+
Box48,
|
|
7848
8539
|
{
|
|
7849
8540
|
sx: __spreadValues({
|
|
7850
8541
|
display: "flex",
|
|
@@ -7856,9 +8547,9 @@ function ListingTableCellIcon({
|
|
|
7856
8547
|
children: icon
|
|
7857
8548
|
}
|
|
7858
8549
|
);
|
|
7859
|
-
const textContent = /* @__PURE__ */
|
|
7860
|
-
/* @__PURE__ */
|
|
7861
|
-
|
|
8550
|
+
const textContent = /* @__PURE__ */ jsxs43(Box48, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
8551
|
+
/* @__PURE__ */ jsx116(
|
|
8552
|
+
Typography26,
|
|
7862
8553
|
{
|
|
7863
8554
|
variant: "body2",
|
|
7864
8555
|
component: "div",
|
|
@@ -7871,8 +8562,8 @@ function ListingTableCellIcon({
|
|
|
7871
8562
|
children: primary
|
|
7872
8563
|
}
|
|
7873
8564
|
),
|
|
7874
|
-
secondary && /* @__PURE__ */
|
|
7875
|
-
|
|
8565
|
+
secondary && /* @__PURE__ */ jsx116(
|
|
8566
|
+
Typography26,
|
|
7876
8567
|
{
|
|
7877
8568
|
variant: "caption",
|
|
7878
8569
|
component: "div",
|
|
@@ -7886,8 +8577,8 @@ function ListingTableCellIcon({
|
|
|
7886
8577
|
}
|
|
7887
8578
|
)
|
|
7888
8579
|
] });
|
|
7889
|
-
return /* @__PURE__ */
|
|
7890
|
-
|
|
8580
|
+
return /* @__PURE__ */ jsx116(
|
|
8581
|
+
Box48,
|
|
7891
8582
|
{
|
|
7892
8583
|
sx: __spreadValues({
|
|
7893
8584
|
display: "flex",
|
|
@@ -7895,10 +8586,10 @@ function ListingTableCellIcon({
|
|
|
7895
8586
|
gap: 1.5,
|
|
7896
8587
|
minWidth: 0
|
|
7897
8588
|
}, sx),
|
|
7898
|
-
children: iconPosition === "left" ? /* @__PURE__ */
|
|
8589
|
+
children: iconPosition === "left" ? /* @__PURE__ */ jsxs43(Fragment20, { children: [
|
|
7899
8590
|
iconElement,
|
|
7900
8591
|
textContent
|
|
7901
|
-
] }) : /* @__PURE__ */
|
|
8592
|
+
] }) : /* @__PURE__ */ jsxs43(Fragment20, { children: [
|
|
7902
8593
|
textContent,
|
|
7903
8594
|
iconElement
|
|
7904
8595
|
] })
|
|
@@ -7909,7 +8600,7 @@ var ListingTableCellIcon_default = ListingTableCellIcon;
|
|
|
7909
8600
|
|
|
7910
8601
|
// src/components/ListingTable/ListingTableProvider.tsx
|
|
7911
8602
|
import { useMemo as useMemo9 } from "react";
|
|
7912
|
-
import { jsx as
|
|
8603
|
+
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
7913
8604
|
function ListingTableProvider({
|
|
7914
8605
|
children,
|
|
7915
8606
|
// Search
|
|
@@ -8012,11 +8703,11 @@ function ListingTableProvider({
|
|
|
8012
8703
|
loading
|
|
8013
8704
|
]
|
|
8014
8705
|
);
|
|
8015
|
-
return /* @__PURE__ */
|
|
8706
|
+
return /* @__PURE__ */ jsx117(ListingTableContext.Provider, { value: contextValue, children });
|
|
8016
8707
|
}
|
|
8017
8708
|
|
|
8018
8709
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
8019
|
-
import { jsx as
|
|
8710
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
8020
8711
|
var StyledTable = styled73(MuiTable, {
|
|
8021
8712
|
shouldForwardProp: (prop) => {
|
|
8022
8713
|
const excludedProps = ["variant", "density", "striped", "bordered"];
|
|
@@ -8070,7 +8761,7 @@ function ListingTable(_a) {
|
|
|
8070
8761
|
"children",
|
|
8071
8762
|
"sx"
|
|
8072
8763
|
]);
|
|
8073
|
-
return /* @__PURE__ */
|
|
8764
|
+
return /* @__PURE__ */ jsx118(
|
|
8074
8765
|
StyledTable,
|
|
8075
8766
|
__spreadProps(__spreadValues({
|
|
8076
8767
|
variant,
|
|
@@ -8096,15 +8787,16 @@ var ListingTableCompound = Object.assign(ListingTable, {
|
|
|
8096
8787
|
EmptyState: ListingTableEmptyState_default,
|
|
8097
8788
|
Toolbar: ListingTableToolbar_default,
|
|
8098
8789
|
SortLabel: ListingTableSortLabel_default,
|
|
8790
|
+
Filter: ListingTableFilter_default,
|
|
8099
8791
|
DensityControl: ListingTableDensityControl_default,
|
|
8100
8792
|
DataGrid: ListingTableDataGrid_default
|
|
8101
8793
|
});
|
|
8102
8794
|
var ListingTable_default = ListingTableCompound;
|
|
8103
8795
|
|
|
8104
8796
|
// src/animations/ParticleBackground/ParticleBackground.tsx
|
|
8105
|
-
import { useEffect as useEffect8, useRef as
|
|
8797
|
+
import { useEffect as useEffect8, useRef as useRef6 } from "react";
|
|
8106
8798
|
import { useColorScheme as useColorScheme4 } from "@mui/material/styles";
|
|
8107
|
-
import { jsx as
|
|
8799
|
+
import { jsx as jsx119 } from "react/jsx-runtime";
|
|
8108
8800
|
var ParticleBackground = ({
|
|
8109
8801
|
opacity = 0.5,
|
|
8110
8802
|
baseDensity = 0.12,
|
|
@@ -8116,7 +8808,7 @@ var ParticleBackground = ({
|
|
|
8116
8808
|
repelStrength = 0.35,
|
|
8117
8809
|
clickBurst = 120
|
|
8118
8810
|
}) => {
|
|
8119
|
-
const canvasRef =
|
|
8811
|
+
const canvasRef = useRef6(null);
|
|
8120
8812
|
const { mode } = useColorScheme4();
|
|
8121
8813
|
useEffect8(() => {
|
|
8122
8814
|
const canvas = canvasRef.current;
|
|
@@ -8315,7 +9007,7 @@ var ParticleBackground = ({
|
|
|
8315
9007
|
cancelAnimationFrame(animationFrameId);
|
|
8316
9008
|
};
|
|
8317
9009
|
}, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
|
|
8318
|
-
return /* @__PURE__ */
|
|
9010
|
+
return /* @__PURE__ */ jsx119(
|
|
8319
9011
|
"canvas",
|
|
8320
9012
|
{
|
|
8321
9013
|
ref: canvasRef,
|
|
@@ -8344,44 +9036,44 @@ function useThemeContent(contentMap, fallback) {
|
|
|
8344
9036
|
var useThemeContent_default = useThemeContent;
|
|
8345
9037
|
|
|
8346
9038
|
// src/hooks/useNotifications/useNotifications.ts
|
|
8347
|
-
import * as
|
|
9039
|
+
import * as React47 from "react";
|
|
8348
9040
|
var generateId = () => {
|
|
8349
9041
|
return `notif-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
8350
9042
|
};
|
|
8351
9043
|
var useNotifications = (options = {}) => {
|
|
8352
9044
|
const { initialNotifications = [] } = options;
|
|
8353
|
-
const [notifications, setNotifications] =
|
|
9045
|
+
const [notifications, setNotifications] = React47.useState(
|
|
8354
9046
|
initialNotifications
|
|
8355
9047
|
);
|
|
8356
|
-
const markRead =
|
|
9048
|
+
const markRead = React47.useCallback((id) => {
|
|
8357
9049
|
setNotifications(
|
|
8358
9050
|
(prev) => prev.map((n) => n.id === id ? __spreadProps(__spreadValues({}, n), { read: true }) : n)
|
|
8359
9051
|
);
|
|
8360
9052
|
}, []);
|
|
8361
|
-
const dismiss =
|
|
9053
|
+
const dismiss = React47.useCallback((id) => {
|
|
8362
9054
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
8363
9055
|
}, []);
|
|
8364
|
-
const markAllRead =
|
|
9056
|
+
const markAllRead = React47.useCallback(() => {
|
|
8365
9057
|
setNotifications((prev) => prev.map((n) => __spreadProps(__spreadValues({}, n), { read: true })));
|
|
8366
9058
|
}, []);
|
|
8367
|
-
const clearAll =
|
|
9059
|
+
const clearAll = React47.useCallback(() => {
|
|
8368
9060
|
setNotifications([]);
|
|
8369
9061
|
}, []);
|
|
8370
|
-
const add =
|
|
9062
|
+
const add = React47.useCallback((notification) => {
|
|
8371
9063
|
const newNotification = __spreadProps(__spreadValues({}, notification), {
|
|
8372
9064
|
id: generateId()
|
|
8373
9065
|
});
|
|
8374
9066
|
setNotifications((prev) => [newNotification, ...prev]);
|
|
8375
9067
|
}, []);
|
|
8376
|
-
const unreadCount =
|
|
9068
|
+
const unreadCount = React47.useMemo(
|
|
8377
9069
|
() => notifications.filter((n) => !n.read).length,
|
|
8378
9070
|
[notifications]
|
|
8379
9071
|
);
|
|
8380
|
-
const unreadNotifications =
|
|
9072
|
+
const unreadNotifications = React47.useMemo(
|
|
8381
9073
|
() => notifications.filter((n) => !n.read),
|
|
8382
9074
|
[notifications]
|
|
8383
9075
|
);
|
|
8384
|
-
const actions =
|
|
9076
|
+
const actions = React47.useMemo(
|
|
8385
9077
|
() => ({
|
|
8386
9078
|
markRead,
|
|
8387
9079
|
dismiss,
|
|
@@ -8405,13 +9097,13 @@ export * from "@mui/material";
|
|
|
8405
9097
|
import * as colors from "@mui/material/colors";
|
|
8406
9098
|
import * as DataGrid2 from "@mui/x-data-grid";
|
|
8407
9099
|
import * as DatePickers from "@mui/x-date-pickers";
|
|
8408
|
-
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
9100
|
+
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
8409
9101
|
import * as TreeView from "@mui/x-tree-view";
|
|
8410
9102
|
var version = package_default.version;
|
|
8411
9103
|
export {
|
|
8412
9104
|
AcrylicOrangeTheme_default as AcrylicOrangeTheme,
|
|
8413
9105
|
AcrylicPurpleTheme_default as AcrylicPurpleTheme,
|
|
8414
|
-
AdapterDateFns,
|
|
9106
|
+
AdapterDateFns2 as AdapterDateFns,
|
|
8415
9107
|
AppBreadcrumbs,
|
|
8416
9108
|
AppShell,
|
|
8417
9109
|
AppSwitcher,
|
|
@@ -8442,12 +9134,14 @@ export {
|
|
|
8442
9134
|
PaleGray_default as PaleGrayTheme,
|
|
8443
9135
|
PaleIndigo_default as PaleIndigoTheme,
|
|
8444
9136
|
ParticleBackground,
|
|
9137
|
+
RelativeTime_default as RelativeTime,
|
|
8445
9138
|
SearchBar_default as SearchBar,
|
|
8446
9139
|
SearchBarWithAdvancedFilter_default as SearchBarWithAdvancedFilter,
|
|
8447
9140
|
Sidebar,
|
|
8448
9141
|
StatCard_default as StatCard,
|
|
8449
9142
|
ThemeSelect,
|
|
8450
9143
|
ThemeSwitcher,
|
|
9144
|
+
TimeRangeFilter_default as TimeRangeFilter,
|
|
8451
9145
|
TreeView,
|
|
8452
9146
|
UserMenu,
|
|
8453
9147
|
WSO2Theme_default as WSO2Theme,
|