@wso2/oxygen-ui 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppShell/AppShell.d.ts +8 -6
- package/dist/components/AppShell/context.d.ts +64 -0
- package/dist/components/AppShell/index.d.ts +1 -0
- package/dist/components/Header/HeaderToggle.d.ts +4 -4
- package/dist/components/NotificationPanel/NotificationPanel.d.ts +4 -4
- package/dist/components/Sidebar/SidebarItem.d.ts +10 -0
- package/dist/hooks/useAppShell/useAppShell.d.ts +43 -8
- package/dist/index.js +505 -390
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ var __objRest = (source, exclude) => {
|
|
|
130
130
|
// package.json
|
|
131
131
|
var package_default = {
|
|
132
132
|
name: "@wso2/oxygen-ui",
|
|
133
|
-
version: "0.
|
|
133
|
+
version: "0.7.0",
|
|
134
134
|
description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
|
|
135
135
|
type: "module",
|
|
136
136
|
main: "./dist/index.js",
|
|
@@ -379,6 +379,15 @@ var OxygenThemeBase = extendTheme({
|
|
|
379
379
|
clearIcon: React.createElement(X)
|
|
380
380
|
}
|
|
381
381
|
},
|
|
382
|
+
MuiInputLabel: {
|
|
383
|
+
styleOverrides: {
|
|
384
|
+
root: {
|
|
385
|
+
".MuiFormControl-root:has(.MuiSelect-select) &:not(.MuiInputLabel-shrink)": {
|
|
386
|
+
top: "-7px"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
382
391
|
MuiSelect: {
|
|
383
392
|
defaultProps: {
|
|
384
393
|
size: "small",
|
|
@@ -490,7 +499,7 @@ var AcrylicBaseTheme = extendTheme2(OxygenThemeBase_default, {
|
|
|
490
499
|
background: {
|
|
491
500
|
default: "#f5f5f5",
|
|
492
501
|
paper: "#ffffffe1",
|
|
493
|
-
acrylic: "#
|
|
502
|
+
acrylic: "#ffffff4a"
|
|
494
503
|
},
|
|
495
504
|
text: {
|
|
496
505
|
primary: "#40404B",
|
|
@@ -606,6 +615,15 @@ var AcrylicBaseTheme = extendTheme2(OxygenThemeBase_default, {
|
|
|
606
615
|
})
|
|
607
616
|
}
|
|
608
617
|
},
|
|
618
|
+
MuiSidebar: {
|
|
619
|
+
styleOverrides: {
|
|
620
|
+
root: ({ theme }) => ({
|
|
621
|
+
backgroundColor: theme.vars.palette.background.acrylic,
|
|
622
|
+
WebkitBackdropFilter: theme.blur.light,
|
|
623
|
+
backdropFilter: theme.blur.light
|
|
624
|
+
})
|
|
625
|
+
}
|
|
626
|
+
},
|
|
609
627
|
MuiAppBar: {
|
|
610
628
|
styleOverrides: {
|
|
611
629
|
root: ({ theme }) => ({
|
|
@@ -3013,7 +3031,7 @@ function SearchBar(_a) {
|
|
|
3013
3031
|
var SearchBar_default = SearchBar;
|
|
3014
3032
|
|
|
3015
3033
|
// src/components/Header/Header.tsx
|
|
3016
|
-
import * as
|
|
3034
|
+
import * as React9 from "react";
|
|
3017
3035
|
import AppBar from "@mui/material/AppBar";
|
|
3018
3036
|
import Toolbar from "@mui/material/Toolbar";
|
|
3019
3037
|
import Box11 from "@mui/material/Box";
|
|
@@ -3031,11 +3049,26 @@ var useHeader = () => {
|
|
|
3031
3049
|
};
|
|
3032
3050
|
|
|
3033
3051
|
// src/components/Header/HeaderToggle.tsx
|
|
3052
|
+
import * as React8 from "react";
|
|
3034
3053
|
import IconButton3 from "@mui/material/IconButton";
|
|
3035
3054
|
import Tooltip2 from "@mui/material/Tooltip";
|
|
3036
3055
|
import { styled as styled15 } from "@mui/material/styles";
|
|
3037
3056
|
import { Menu } from "@wso2/oxygen-ui-icons-react";
|
|
3057
|
+
|
|
3058
|
+
// src/components/AppShell/context.tsx
|
|
3059
|
+
import * as React7 from "react";
|
|
3038
3060
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3061
|
+
var AppShellContext = React7.createContext(void 0);
|
|
3062
|
+
var AppShellProvider = ({
|
|
3063
|
+
children,
|
|
3064
|
+
value
|
|
3065
|
+
}) => {
|
|
3066
|
+
return /* @__PURE__ */ jsx25(AppShellContext.Provider, { value, children });
|
|
3067
|
+
};
|
|
3068
|
+
AppShellProvider.displayName = "AppShellProvider";
|
|
3069
|
+
|
|
3070
|
+
// src/components/Header/HeaderToggle.tsx
|
|
3071
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3039
3072
|
var HeaderToggleRoot = styled15(IconButton3, {
|
|
3040
3073
|
name: "MuiHeader",
|
|
3041
3074
|
slot: "Toggle"
|
|
@@ -3043,15 +3076,20 @@ var HeaderToggleRoot = styled15(IconButton3, {
|
|
|
3043
3076
|
color: (theme.vars || theme).palette.text.secondary
|
|
3044
3077
|
}));
|
|
3045
3078
|
var HeaderToggle = ({
|
|
3046
|
-
collapsed,
|
|
3047
|
-
onToggle,
|
|
3079
|
+
collapsed: collapsedProp,
|
|
3080
|
+
onToggle: onToggleProp,
|
|
3048
3081
|
expandLabel = "Expand sidebar",
|
|
3049
3082
|
collapseLabel = "Collapse sidebar",
|
|
3050
3083
|
expandIcon,
|
|
3051
3084
|
collapseIcon,
|
|
3052
3085
|
sx
|
|
3053
3086
|
}) => {
|
|
3054
|
-
|
|
3087
|
+
var _a, _b;
|
|
3088
|
+
const appShellContext = React8.useContext(AppShellContext);
|
|
3089
|
+
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
3090
|
+
const onToggle = (_b = onToggleProp != null ? onToggleProp : appShellContext == null ? void 0 : appShellContext.actions.toggleSidebar) != null ? _b : (() => {
|
|
3091
|
+
});
|
|
3092
|
+
return /* @__PURE__ */ jsx26(Tooltip2, { title: collapsed ? expandLabel : collapseLabel, children: /* @__PURE__ */ jsx26(HeaderToggleRoot, { onClick: onToggle, size: "small", sx, children: collapsed ? expandIcon || /* @__PURE__ */ jsx26(Menu, { size: 20 }) : collapseIcon || /* @__PURE__ */ jsx26(Menu, { size: 20 }) }) });
|
|
3055
3093
|
};
|
|
3056
3094
|
|
|
3057
3095
|
// src/components/Header/HeaderBrand.tsx
|
|
@@ -3061,7 +3099,7 @@ import { styled as styled18 } from "@mui/material/styles";
|
|
|
3061
3099
|
// src/components/Header/HeaderBrandLogo.tsx
|
|
3062
3100
|
import Box7 from "@mui/material/Box";
|
|
3063
3101
|
import { styled as styled16 } from "@mui/material/styles";
|
|
3064
|
-
import { jsx as
|
|
3102
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3065
3103
|
var HeaderBrandLogoRoot = styled16(Box7, {
|
|
3066
3104
|
name: "MuiHeader",
|
|
3067
3105
|
slot: "BrandLogo"
|
|
@@ -3073,14 +3111,14 @@ var HeaderBrandLogo = ({
|
|
|
3073
3111
|
children,
|
|
3074
3112
|
sx
|
|
3075
3113
|
}) => {
|
|
3076
|
-
return /* @__PURE__ */
|
|
3114
|
+
return /* @__PURE__ */ jsx27(HeaderBrandLogoRoot, { sx, children });
|
|
3077
3115
|
};
|
|
3078
3116
|
HeaderBrandLogo.displayName = "HeaderBrandLogo";
|
|
3079
3117
|
|
|
3080
3118
|
// src/components/Header/HeaderBrandTitle.tsx
|
|
3081
3119
|
import Typography6 from "@mui/material/Typography";
|
|
3082
3120
|
import { styled as styled17 } from "@mui/material/styles";
|
|
3083
|
-
import { jsx as
|
|
3121
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3084
3122
|
var HeaderBrandTitleRoot = styled17(Typography6, {
|
|
3085
3123
|
name: "MuiHeader",
|
|
3086
3124
|
slot: "BrandTitle"
|
|
@@ -3098,12 +3136,12 @@ var HeaderBrandTitle = ({
|
|
|
3098
3136
|
children,
|
|
3099
3137
|
sx
|
|
3100
3138
|
}) => {
|
|
3101
|
-
return /* @__PURE__ */
|
|
3139
|
+
return /* @__PURE__ */ jsx28(HeaderBrandTitleRoot, { variant: "h6", component: "div", sx, children });
|
|
3102
3140
|
};
|
|
3103
3141
|
HeaderBrandTitle.displayName = "HeaderBrandTitle";
|
|
3104
3142
|
|
|
3105
3143
|
// src/components/Header/HeaderBrand.tsx
|
|
3106
|
-
import { jsx as
|
|
3144
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3107
3145
|
var HeaderBrandRoot = styled18(Box8, {
|
|
3108
3146
|
name: "MuiHeader",
|
|
3109
3147
|
slot: "Brand",
|
|
@@ -3119,7 +3157,7 @@ var HeaderBrand = ({
|
|
|
3119
3157
|
children,
|
|
3120
3158
|
sx
|
|
3121
3159
|
}) => {
|
|
3122
|
-
return /* @__PURE__ */
|
|
3160
|
+
return /* @__PURE__ */ jsx29(HeaderBrandRoot, { onClick, clickable: !!onClick, sx, children });
|
|
3123
3161
|
};
|
|
3124
3162
|
HeaderBrand.displayName = "HeaderBrand";
|
|
3125
3163
|
|
|
@@ -3127,7 +3165,7 @@ HeaderBrand.displayName = "HeaderBrand";
|
|
|
3127
3165
|
import Box9 from "@mui/material/Box";
|
|
3128
3166
|
import Divider2 from "@mui/material/Divider";
|
|
3129
3167
|
import { styled as styled19 } from "@mui/material/styles";
|
|
3130
|
-
import { jsx as
|
|
3168
|
+
import { jsx as jsx30, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3131
3169
|
var HeaderSwitchersRoot = styled19(Box9, {
|
|
3132
3170
|
name: "MuiHeader",
|
|
3133
3171
|
slot: "Switchers"
|
|
@@ -3157,7 +3195,7 @@ var HeaderSwitchers = ({
|
|
|
3157
3195
|
return null;
|
|
3158
3196
|
}
|
|
3159
3197
|
return /* @__PURE__ */ jsxs9(HeaderSwitchersRoot, { sx, children: [
|
|
3160
|
-
showDivider && /* @__PURE__ */
|
|
3198
|
+
showDivider && /* @__PURE__ */ jsx30(HeaderSwitchersDivider, { orientation: "vertical", flexItem: true }),
|
|
3161
3199
|
children
|
|
3162
3200
|
] });
|
|
3163
3201
|
};
|
|
@@ -3165,7 +3203,7 @@ var HeaderSwitchers = ({
|
|
|
3165
3203
|
// src/components/Header/HeaderActions.tsx
|
|
3166
3204
|
import Box10 from "@mui/material/Box";
|
|
3167
3205
|
import { styled as styled20 } from "@mui/material/styles";
|
|
3168
|
-
import { jsx as
|
|
3206
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3169
3207
|
var HeaderActionsRoot = styled20(Box10, {
|
|
3170
3208
|
name: "MuiHeader",
|
|
3171
3209
|
slot: "Actions"
|
|
@@ -3178,11 +3216,11 @@ var HeaderActions = ({
|
|
|
3178
3216
|
children,
|
|
3179
3217
|
sx
|
|
3180
3218
|
}) => {
|
|
3181
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ jsx31(HeaderActionsRoot, { sx, children });
|
|
3182
3220
|
};
|
|
3183
3221
|
|
|
3184
3222
|
// src/components/Header/Header.tsx
|
|
3185
|
-
import { jsx as
|
|
3223
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3186
3224
|
var HeaderRootStyled = styled21(AppBar, {
|
|
3187
3225
|
name: "MuiHeader",
|
|
3188
3226
|
slot: "Root"
|
|
@@ -3215,10 +3253,10 @@ var Header = ({
|
|
|
3215
3253
|
minimal = false,
|
|
3216
3254
|
sx
|
|
3217
3255
|
}) => {
|
|
3218
|
-
const contextValue =
|
|
3219
|
-
return /* @__PURE__ */
|
|
3256
|
+
const contextValue = React9.useMemo(() => ({ minimal }), [minimal]);
|
|
3257
|
+
return /* @__PURE__ */ jsx32(HeaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx32(HeaderRootStyled, { position: "static", color: "default", elevation: 0, sx, children: /* @__PURE__ */ jsx32(HeaderToolbar, { children }) }) });
|
|
3220
3258
|
};
|
|
3221
|
-
var HeaderSpacer = ({ sx }) => /* @__PURE__ */
|
|
3259
|
+
var HeaderSpacer = ({ sx }) => /* @__PURE__ */ jsx32(HeaderSpacerStyled, { sx });
|
|
3222
3260
|
Header.Toggle = HeaderToggle;
|
|
3223
3261
|
Header.Brand = HeaderBrand;
|
|
3224
3262
|
Header.BrandLogo = HeaderBrandLogo;
|
|
@@ -3229,15 +3267,15 @@ Header.Spacer = HeaderSpacer;
|
|
|
3229
3267
|
Header.displayName = "Header";
|
|
3230
3268
|
|
|
3231
3269
|
// src/components/Sidebar/Sidebar.tsx
|
|
3232
|
-
import * as
|
|
3270
|
+
import * as React17 from "react";
|
|
3233
3271
|
import Box17 from "@mui/material/Box";
|
|
3234
3272
|
import { styled as styled34 } from "@mui/material/styles";
|
|
3235
3273
|
|
|
3236
3274
|
// src/components/Sidebar/context.ts
|
|
3237
|
-
import * as
|
|
3238
|
-
var SidebarContext =
|
|
3275
|
+
import * as React10 from "react";
|
|
3276
|
+
var SidebarContext = React10.createContext(null);
|
|
3239
3277
|
var useSidebar = () => {
|
|
3240
|
-
const context =
|
|
3278
|
+
const context = React10.useContext(SidebarContext);
|
|
3241
3279
|
if (!context) {
|
|
3242
3280
|
throw new Error("Sidebar compound components must be used within Sidebar");
|
|
3243
3281
|
}
|
|
@@ -3245,11 +3283,11 @@ var useSidebar = () => {
|
|
|
3245
3283
|
};
|
|
3246
3284
|
|
|
3247
3285
|
// src/components/Sidebar/SidebarNav.tsx
|
|
3248
|
-
import * as
|
|
3286
|
+
import * as React11 from "react";
|
|
3249
3287
|
import Box12 from "@mui/material/Box";
|
|
3250
3288
|
import Divider3 from "@mui/material/Divider";
|
|
3251
3289
|
import { styled as styled22 } from "@mui/material/styles";
|
|
3252
|
-
import { jsx as
|
|
3290
|
+
import { jsx as jsx33, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3253
3291
|
var SidebarNavRoot = styled22(Box12, {
|
|
3254
3292
|
name: "MuiSidebar",
|
|
3255
3293
|
slot: "Nav"
|
|
@@ -3285,15 +3323,15 @@ var SidebarNav = ({
|
|
|
3285
3323
|
sx
|
|
3286
3324
|
}) => {
|
|
3287
3325
|
const { collapsed } = useSidebar();
|
|
3288
|
-
const childArray =
|
|
3289
|
-
return /* @__PURE__ */
|
|
3290
|
-
index > 0 && showDividers && !collapsed && /* @__PURE__ */
|
|
3326
|
+
const childArray = React11.Children.toArray(children);
|
|
3327
|
+
return /* @__PURE__ */ jsx33(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
|
|
3328
|
+
index > 0 && showDividers && !collapsed && /* @__PURE__ */ jsx33(SidebarNavDivider, {}),
|
|
3291
3329
|
child
|
|
3292
3330
|
] }, index)) });
|
|
3293
3331
|
};
|
|
3294
3332
|
|
|
3295
3333
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
3296
|
-
import * as
|
|
3334
|
+
import * as React12 from "react";
|
|
3297
3335
|
import Box13 from "@mui/material/Box";
|
|
3298
3336
|
import List from "@mui/material/List";
|
|
3299
3337
|
import { styled as styled24 } from "@mui/material/styles";
|
|
@@ -3301,7 +3339,7 @@ import { styled as styled24 } from "@mui/material/styles";
|
|
|
3301
3339
|
// src/components/Sidebar/SidebarCategoryLabel.tsx
|
|
3302
3340
|
import Typography7 from "@mui/material/Typography";
|
|
3303
3341
|
import { styled as styled23 } from "@mui/material/styles";
|
|
3304
|
-
import { jsx as
|
|
3342
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3305
3343
|
var SidebarCategoryLabelRoot = styled23(Typography7, {
|
|
3306
3344
|
name: "MuiSidebar",
|
|
3307
3345
|
slot: "CategoryLabel",
|
|
@@ -3327,12 +3365,12 @@ var SidebarCategoryLabelRoot = styled23(Typography7, {
|
|
|
3327
3365
|
}));
|
|
3328
3366
|
var SidebarCategoryLabel = ({ children, sx }) => {
|
|
3329
3367
|
const { collapsed } = useSidebar();
|
|
3330
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx34(SidebarCategoryLabelRoot, { variant: "caption", collapsed, sx, children });
|
|
3331
3369
|
};
|
|
3332
3370
|
SidebarCategoryLabel.displayName = "SidebarCategoryLabel";
|
|
3333
3371
|
|
|
3334
3372
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
3335
|
-
import { jsx as
|
|
3373
|
+
import { jsx as jsx35, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3336
3374
|
var SidebarCategoryRoot = styled24(Box13, {
|
|
3337
3375
|
name: "MuiSidebar",
|
|
3338
3376
|
slot: "Category"
|
|
@@ -3342,9 +3380,9 @@ var SidebarCategoryRoot = styled24(Box13, {
|
|
|
3342
3380
|
var separateChildren = (children) => {
|
|
3343
3381
|
let labelChild = null;
|
|
3344
3382
|
const otherChildren = [];
|
|
3345
|
-
|
|
3383
|
+
React12.Children.forEach(children, (child) => {
|
|
3346
3384
|
var _a;
|
|
3347
|
-
if (
|
|
3385
|
+
if (React12.isValidElement(child)) {
|
|
3348
3386
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3349
3387
|
if (displayName === "SidebarCategoryLabel") {
|
|
3350
3388
|
labelChild = child;
|
|
@@ -3364,13 +3402,13 @@ var SidebarCategory = ({
|
|
|
3364
3402
|
const { labelChild, otherChildren } = separateChildren(children);
|
|
3365
3403
|
return /* @__PURE__ */ jsxs11(SidebarCategoryRoot, { sx, children: [
|
|
3366
3404
|
labelChild,
|
|
3367
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ jsx35(List, { disablePadding: true, children: otherChildren })
|
|
3368
3406
|
] });
|
|
3369
3407
|
};
|
|
3370
3408
|
SidebarCategory.displayName = "SidebarCategory";
|
|
3371
3409
|
|
|
3372
3410
|
// src/components/Sidebar/SidebarItem.tsx
|
|
3373
|
-
import * as
|
|
3411
|
+
import * as React15 from "react";
|
|
3374
3412
|
import Box14 from "@mui/material/Box";
|
|
3375
3413
|
import List2 from "@mui/material/List";
|
|
3376
3414
|
import ListItem from "@mui/material/ListItem";
|
|
@@ -3384,11 +3422,11 @@ import { styled as styled28 } from "@mui/material/styles";
|
|
|
3384
3422
|
import { ChevronDown as ChevronDown2, ChevronUp } from "@wso2/oxygen-ui-icons-react";
|
|
3385
3423
|
|
|
3386
3424
|
// src/components/Sidebar/SidebarItemContext.tsx
|
|
3387
|
-
import * as
|
|
3388
|
-
import { jsx as
|
|
3389
|
-
var SidebarItemContext =
|
|
3425
|
+
import * as React13 from "react";
|
|
3426
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3427
|
+
var SidebarItemContext = React13.createContext(null);
|
|
3390
3428
|
var useSidebarItemContext = () => {
|
|
3391
|
-
const context =
|
|
3429
|
+
const context = React13.useContext(SidebarItemContext);
|
|
3392
3430
|
if (!context) {
|
|
3393
3431
|
throw new Error(
|
|
3394
3432
|
"useSidebarItemContext must be used within a SidebarItem component"
|
|
@@ -3397,14 +3435,14 @@ var useSidebarItemContext = () => {
|
|
|
3397
3435
|
return context;
|
|
3398
3436
|
};
|
|
3399
3437
|
var SidebarItemProvider = ({ value, children }) => {
|
|
3400
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ jsx36(SidebarItemContext.Provider, { value, children });
|
|
3401
3439
|
};
|
|
3402
3440
|
|
|
3403
3441
|
// src/components/Sidebar/SidebarItemIcon.tsx
|
|
3404
|
-
import * as
|
|
3442
|
+
import * as React14 from "react";
|
|
3405
3443
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
3406
3444
|
import { styled as styled25 } from "@mui/material/styles";
|
|
3407
|
-
import { jsx as
|
|
3445
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3408
3446
|
var SidebarItemIconRoot = styled25(ListItemIcon, {
|
|
3409
3447
|
name: "MuiSidebar",
|
|
3410
3448
|
slot: "ItemIcon",
|
|
@@ -3422,10 +3460,10 @@ var SidebarItemIcon = ({
|
|
|
3422
3460
|
var _a;
|
|
3423
3461
|
const { collapsed } = useSidebar();
|
|
3424
3462
|
const { isActive } = useSidebarItemContext();
|
|
3425
|
-
const iconWithSize =
|
|
3463
|
+
const iconWithSize = React14.isValidElement(children) ? React14.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
|
|
3426
3464
|
size: (_a = children.props.size) != null ? _a : 20
|
|
3427
3465
|
})) : children;
|
|
3428
|
-
return /* @__PURE__ */
|
|
3466
|
+
return /* @__PURE__ */ jsx37(
|
|
3429
3467
|
SidebarItemIconRoot,
|
|
3430
3468
|
{
|
|
3431
3469
|
ownerState: { collapsed, isActive },
|
|
@@ -3439,7 +3477,7 @@ SidebarItemIcon.displayName = "SidebarItemIcon";
|
|
|
3439
3477
|
// src/components/Sidebar/SidebarItemLabel.tsx
|
|
3440
3478
|
import ListItemText from "@mui/material/ListItemText";
|
|
3441
3479
|
import { styled as styled26 } from "@mui/material/styles";
|
|
3442
|
-
import { jsx as
|
|
3480
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3443
3481
|
var SidebarItemLabelRoot = styled26(ListItemText, {
|
|
3444
3482
|
name: "MuiSidebar",
|
|
3445
3483
|
slot: "ItemLabel",
|
|
@@ -3465,14 +3503,14 @@ var SidebarItemLabel = ({
|
|
|
3465
3503
|
}) => {
|
|
3466
3504
|
const { collapsed } = useSidebar();
|
|
3467
3505
|
const { isActive } = useSidebarItemContext();
|
|
3468
|
-
return /* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ jsx38(SidebarItemLabelRoot, { primary: children, ownerState: { isActive, collapsed }, sx });
|
|
3469
3507
|
};
|
|
3470
3508
|
SidebarItemLabel.displayName = "SidebarItemLabel";
|
|
3471
3509
|
|
|
3472
3510
|
// src/components/Sidebar/SidebarItemBadge.tsx
|
|
3473
3511
|
import Chip from "@mui/material/Chip";
|
|
3474
3512
|
import { styled as styled27 } from "@mui/material/styles";
|
|
3475
|
-
import { jsx as
|
|
3513
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3476
3514
|
var SidebarItemBadgeRoot = styled27(Chip, {
|
|
3477
3515
|
name: "MuiSidebar",
|
|
3478
3516
|
slot: "ItemBadge"
|
|
@@ -3490,12 +3528,12 @@ var SidebarItemBadge = ({
|
|
|
3490
3528
|
if (collapsed) {
|
|
3491
3529
|
return null;
|
|
3492
3530
|
}
|
|
3493
|
-
return /* @__PURE__ */
|
|
3531
|
+
return /* @__PURE__ */ jsx39(SidebarItemBadgeRoot, { label: children, size: "small", color, sx });
|
|
3494
3532
|
};
|
|
3495
3533
|
SidebarItemBadge.displayName = "SidebarItemBadge";
|
|
3496
3534
|
|
|
3497
3535
|
// src/components/Sidebar/SidebarItem.tsx
|
|
3498
|
-
import { Fragment as Fragment5, jsx as
|
|
3536
|
+
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3499
3537
|
var SidebarItemRoot = styled28(ListItem, {
|
|
3500
3538
|
name: "MuiSidebar",
|
|
3501
3539
|
slot: "Item"
|
|
@@ -3573,9 +3611,9 @@ var CHILD_DISPLAY_NAMES = [
|
|
|
3573
3611
|
var separateChildren2 = (children) => {
|
|
3574
3612
|
const composableChildren = [];
|
|
3575
3613
|
const nestedItems = [];
|
|
3576
|
-
|
|
3614
|
+
React15.Children.toArray(children).forEach((child) => {
|
|
3577
3615
|
var _a;
|
|
3578
|
-
if (
|
|
3616
|
+
if (React15.isValidElement(child)) {
|
|
3579
3617
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3580
3618
|
if (displayName && CHILD_DISPLAY_NAMES.includes(displayName)) {
|
|
3581
3619
|
composableChildren.push(child);
|
|
@@ -3590,9 +3628,9 @@ var separateChildren2 = (children) => {
|
|
|
3590
3628
|
};
|
|
3591
3629
|
var getTooltipLabel = (children) => {
|
|
3592
3630
|
let tooltipLabel = "";
|
|
3593
|
-
|
|
3631
|
+
React15.Children.forEach(children, (child) => {
|
|
3594
3632
|
var _a;
|
|
3595
|
-
if (
|
|
3633
|
+
if (React15.isValidElement(child)) {
|
|
3596
3634
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3597
3635
|
const props = child.props;
|
|
3598
3636
|
if (displayName === "SidebarItemLabel" && props.children) {
|
|
@@ -3605,9 +3643,9 @@ var getTooltipLabel = (children) => {
|
|
|
3605
3643
|
var extractItemContent = (itemChildren) => {
|
|
3606
3644
|
let icon = null;
|
|
3607
3645
|
let label = "";
|
|
3608
|
-
|
|
3646
|
+
React15.Children.forEach(itemChildren, (child) => {
|
|
3609
3647
|
var _a;
|
|
3610
|
-
if (
|
|
3648
|
+
if (React15.isValidElement(child)) {
|
|
3611
3649
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3612
3650
|
const props = child.props;
|
|
3613
3651
|
if (displayName === "SidebarItemIcon") {
|
|
@@ -3623,23 +3661,24 @@ var SidebarItem = ({
|
|
|
3623
3661
|
id,
|
|
3624
3662
|
children,
|
|
3625
3663
|
depth = 0,
|
|
3626
|
-
sx
|
|
3664
|
+
sx,
|
|
3665
|
+
link
|
|
3627
3666
|
}) => {
|
|
3628
3667
|
const { collapsed, activeItem, expandedMenus, onSelect, onToggleExpand } = useSidebar();
|
|
3629
3668
|
const { composableChildren, nestedItems } = separateChildren2(children);
|
|
3630
3669
|
const hasNestedItems = nestedItems.length > 0;
|
|
3631
3670
|
const isActive = activeItem === id;
|
|
3632
3671
|
const isExpanded = expandedMenus[id] || false;
|
|
3633
|
-
const hasActiveChild =
|
|
3672
|
+
const hasActiveChild = React15.useMemo(() => {
|
|
3634
3673
|
if (!hasNestedItems || !activeItem) return false;
|
|
3635
3674
|
return nestedItems.some((child) => {
|
|
3636
|
-
if (
|
|
3675
|
+
if (React15.isValidElement(child)) {
|
|
3637
3676
|
return child.props.id === activeItem;
|
|
3638
3677
|
}
|
|
3639
3678
|
return false;
|
|
3640
3679
|
});
|
|
3641
3680
|
}, [hasNestedItems, nestedItems, activeItem]);
|
|
3642
|
-
const [popoverAnchor, setPopoverAnchor] =
|
|
3681
|
+
const [popoverAnchor, setPopoverAnchor] = React15.useState(null);
|
|
3643
3682
|
const popoverOpen = Boolean(popoverAnchor);
|
|
3644
3683
|
const contextValue = {
|
|
3645
3684
|
id,
|
|
@@ -3666,7 +3705,7 @@ var SidebarItem = ({
|
|
|
3666
3705
|
const tooltipLabel = getTooltipLabel(children);
|
|
3667
3706
|
const ownerState = { collapsed, depth };
|
|
3668
3707
|
const shouldShowSelected = isActive && !hasNestedItems || collapsed && hasActiveChild;
|
|
3669
|
-
const buttonContent = /* @__PURE__ */
|
|
3708
|
+
const buttonContent = /* @__PURE__ */ jsx40(
|
|
3670
3709
|
SidebarItemButton,
|
|
3671
3710
|
{
|
|
3672
3711
|
selected: shouldShowSelected,
|
|
@@ -3675,18 +3714,19 @@ var SidebarItem = ({
|
|
|
3675
3714
|
sx,
|
|
3676
3715
|
children: /* @__PURE__ */ jsxs12(SidebarItemProvider, { value: contextValue, children: [
|
|
3677
3716
|
composableChildren,
|
|
3678
|
-
!collapsed && hasNestedItems && /* @__PURE__ */
|
|
3679
|
-
!collapsed && !hasNestedItems && /* @__PURE__ */
|
|
3717
|
+
!collapsed && hasNestedItems && /* @__PURE__ */ jsx40(SidebarItemChevron, { children: isExpanded ? /* @__PURE__ */ jsx40(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx40(ChevronDown2, { size: 16 }) }),
|
|
3718
|
+
!collapsed && !hasNestedItems && /* @__PURE__ */ jsx40(Box14, { sx: { ml: "auto", width: 16, pl: 1 } })
|
|
3680
3719
|
] })
|
|
3681
3720
|
}
|
|
3682
3721
|
);
|
|
3722
|
+
const wrappedContent = link ? /* @__PURE__ */ jsx40(Fragment5, { children: React15.cloneElement(link, {}, buttonContent) }) : buttonContent;
|
|
3683
3723
|
const collapsedWithNested = collapsed && hasNestedItems;
|
|
3684
3724
|
const handlePopoverItemClick = (itemId) => {
|
|
3685
3725
|
onSelect == null ? void 0 : onSelect(itemId);
|
|
3686
3726
|
setPopoverAnchor(null);
|
|
3687
3727
|
};
|
|
3688
3728
|
return /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
3689
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ jsx40(
|
|
3690
3730
|
SidebarItemRoot,
|
|
3691
3731
|
{
|
|
3692
3732
|
disablePadding: true,
|
|
@@ -3694,11 +3734,11 @@ var SidebarItem = ({
|
|
|
3694
3734
|
onMouseLeave: handleMouseLeave,
|
|
3695
3735
|
children: collapsed ? (
|
|
3696
3736
|
// When collapsed: show tooltip only for items without nested children
|
|
3697
|
-
collapsedWithNested ?
|
|
3698
|
-
) :
|
|
3737
|
+
collapsedWithNested ? wrappedContent : /* @__PURE__ */ jsx40(Tooltip3, { title: tooltipLabel, placement: "right", arrow: true, children: wrappedContent })
|
|
3738
|
+
) : wrappedContent
|
|
3699
3739
|
}
|
|
3700
3740
|
),
|
|
3701
|
-
collapsedWithNested && /* @__PURE__ */
|
|
3741
|
+
collapsedWithNested && /* @__PURE__ */ jsx40(
|
|
3702
3742
|
SidebarItemPopover,
|
|
3703
3743
|
{
|
|
3704
3744
|
open: popoverOpen,
|
|
@@ -3713,8 +3753,8 @@ var SidebarItem = ({
|
|
|
3713
3753
|
onMouseLeave: handleMouseLeave
|
|
3714
3754
|
}
|
|
3715
3755
|
},
|
|
3716
|
-
children: /* @__PURE__ */
|
|
3717
|
-
if (
|
|
3756
|
+
children: /* @__PURE__ */ jsx40(SidebarItemPopoverList, { disablePadding: true, children: nestedItems.map((child, index) => {
|
|
3757
|
+
if (React15.isValidElement(child)) {
|
|
3718
3758
|
const childProps = child.props;
|
|
3719
3759
|
const { icon, label } = extractItemContent(childProps.children);
|
|
3720
3760
|
const isItemActive = activeItem === childProps.id;
|
|
@@ -3724,8 +3764,8 @@ var SidebarItem = ({
|
|
|
3724
3764
|
selected: isItemActive,
|
|
3725
3765
|
onClick: () => handlePopoverItemClick(childProps.id),
|
|
3726
3766
|
children: [
|
|
3727
|
-
icon && /* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3767
|
+
icon && /* @__PURE__ */ jsx40(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
|
|
3768
|
+
/* @__PURE__ */ jsx40(ListItemText2, { primary: label })
|
|
3729
3769
|
]
|
|
3730
3770
|
},
|
|
3731
3771
|
childProps.id || index
|
|
@@ -3735,9 +3775,9 @@ var SidebarItem = ({
|
|
|
3735
3775
|
}) })
|
|
3736
3776
|
}
|
|
3737
3777
|
),
|
|
3738
|
-
hasNestedItems && !collapsed && /* @__PURE__ */
|
|
3739
|
-
if (
|
|
3740
|
-
return
|
|
3778
|
+
hasNestedItems && !collapsed && /* @__PURE__ */ jsx40(Collapse, { in: isExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx40(List2, { disablePadding: true, children: nestedItems.map((child, index) => {
|
|
3779
|
+
if (React15.isValidElement(child)) {
|
|
3780
|
+
return React15.cloneElement(child, {
|
|
3741
3781
|
key: child.key || index,
|
|
3742
3782
|
depth: depth + 1
|
|
3743
3783
|
});
|
|
@@ -3752,7 +3792,7 @@ SidebarItem.displayName = "SidebarItem";
|
|
|
3752
3792
|
import Box15 from "@mui/material/Box";
|
|
3753
3793
|
import Divider4 from "@mui/material/Divider";
|
|
3754
3794
|
import { styled as styled29 } from "@mui/material/styles";
|
|
3755
|
-
import { Fragment as Fragment6, jsx as
|
|
3795
|
+
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3756
3796
|
var SidebarFooterRoot = styled29(Box15, {
|
|
3757
3797
|
name: "MuiSidebar",
|
|
3758
3798
|
slot: "Footer"
|
|
@@ -3766,13 +3806,13 @@ var SidebarFooter = ({
|
|
|
3766
3806
|
sx
|
|
3767
3807
|
}) => {
|
|
3768
3808
|
return /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
3769
|
-
showDivider && /* @__PURE__ */
|
|
3770
|
-
/* @__PURE__ */
|
|
3809
|
+
showDivider && /* @__PURE__ */ jsx41(Divider4, {}),
|
|
3810
|
+
/* @__PURE__ */ jsx41(SidebarFooterRoot, { sx, children })
|
|
3771
3811
|
] });
|
|
3772
3812
|
};
|
|
3773
3813
|
|
|
3774
3814
|
// src/components/Sidebar/SidebarUser.tsx
|
|
3775
|
-
import * as
|
|
3815
|
+
import * as React16 from "react";
|
|
3776
3816
|
import Box16 from "@mui/material/Box";
|
|
3777
3817
|
import ListItemButton2 from "@mui/material/ListItemButton";
|
|
3778
3818
|
import Tooltip4 from "@mui/material/Tooltip";
|
|
@@ -3782,7 +3822,7 @@ import { styled as styled33 } from "@mui/material/styles";
|
|
|
3782
3822
|
// src/components/Sidebar/SidebarUserAvatar.tsx
|
|
3783
3823
|
import Avatar2 from "@mui/material/Avatar";
|
|
3784
3824
|
import { styled as styled30 } from "@mui/material/styles";
|
|
3785
|
-
import { jsx as
|
|
3825
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3786
3826
|
var SidebarUserAvatarRoot = styled30(Avatar2, {
|
|
3787
3827
|
name: "MuiSidebar",
|
|
3788
3828
|
slot: "UserAvatar"
|
|
@@ -3799,14 +3839,14 @@ var SidebarUserAvatar = ({
|
|
|
3799
3839
|
alt,
|
|
3800
3840
|
sx
|
|
3801
3841
|
}) => {
|
|
3802
|
-
return /* @__PURE__ */
|
|
3842
|
+
return /* @__PURE__ */ jsx42(SidebarUserAvatarRoot, { src, alt, sx, children });
|
|
3803
3843
|
};
|
|
3804
3844
|
SidebarUserAvatar.displayName = "SidebarUserAvatar";
|
|
3805
3845
|
|
|
3806
3846
|
// src/components/Sidebar/SidebarUserName.tsx
|
|
3807
3847
|
import Typography8 from "@mui/material/Typography";
|
|
3808
3848
|
import { styled as styled31 } from "@mui/material/styles";
|
|
3809
|
-
import { jsx as
|
|
3849
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3810
3850
|
var SidebarUserNameRoot = styled31(Typography8, {
|
|
3811
3851
|
name: "MuiSidebar",
|
|
3812
3852
|
slot: "UserName"
|
|
@@ -3824,14 +3864,14 @@ var SidebarUserName = ({
|
|
|
3824
3864
|
if (collapsed) {
|
|
3825
3865
|
return null;
|
|
3826
3866
|
}
|
|
3827
|
-
return /* @__PURE__ */
|
|
3867
|
+
return /* @__PURE__ */ jsx43(SidebarUserNameRoot, { variant: "body2", sx, children });
|
|
3828
3868
|
};
|
|
3829
3869
|
SidebarUserName.displayName = "SidebarUserName";
|
|
3830
3870
|
|
|
3831
3871
|
// src/components/Sidebar/SidebarUserEmail.tsx
|
|
3832
3872
|
import Typography9 from "@mui/material/Typography";
|
|
3833
3873
|
import { styled as styled32 } from "@mui/material/styles";
|
|
3834
|
-
import { jsx as
|
|
3874
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3835
3875
|
var SidebarUserEmailRoot = styled32(Typography9, {
|
|
3836
3876
|
name: "MuiSidebar",
|
|
3837
3877
|
slot: "UserEmail"
|
|
@@ -3850,12 +3890,12 @@ var SidebarUserEmail = ({
|
|
|
3850
3890
|
if (collapsed) {
|
|
3851
3891
|
return null;
|
|
3852
3892
|
}
|
|
3853
|
-
return /* @__PURE__ */
|
|
3893
|
+
return /* @__PURE__ */ jsx44(SidebarUserEmailRoot, { variant: "caption", sx, children });
|
|
3854
3894
|
};
|
|
3855
3895
|
SidebarUserEmail.displayName = "SidebarUserEmail";
|
|
3856
3896
|
|
|
3857
3897
|
// src/components/Sidebar/SidebarUser.tsx
|
|
3858
|
-
import { Fragment as Fragment7, jsx as
|
|
3898
|
+
import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3859
3899
|
var SidebarUserRoot = styled33(Box16, {
|
|
3860
3900
|
name: "MuiSidebar",
|
|
3861
3901
|
slot: "User"
|
|
@@ -3897,9 +3937,9 @@ var SidebarUserTextContainer = styled33(Box16, {
|
|
|
3897
3937
|
var separateChildren3 = (children) => {
|
|
3898
3938
|
let avatarChild = null;
|
|
3899
3939
|
const textChildren = [];
|
|
3900
|
-
|
|
3940
|
+
React16.Children.forEach(children, (child) => {
|
|
3901
3941
|
var _a;
|
|
3902
|
-
if (
|
|
3942
|
+
if (React16.isValidElement(child)) {
|
|
3903
3943
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3904
3944
|
if (displayName === "SidebarUserAvatar") {
|
|
3905
3945
|
avatarChild = child;
|
|
@@ -3912,9 +3952,9 @@ var separateChildren3 = (children) => {
|
|
|
3912
3952
|
};
|
|
3913
3953
|
var getTooltipText = (children) => {
|
|
3914
3954
|
let tooltipText = "";
|
|
3915
|
-
|
|
3955
|
+
React16.Children.forEach(children, (child) => {
|
|
3916
3956
|
var _a;
|
|
3917
|
-
if (
|
|
3957
|
+
if (React16.isValidElement(child)) {
|
|
3918
3958
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
3919
3959
|
const props = child.props;
|
|
3920
3960
|
if (displayName === "SidebarUserName" && props.children) {
|
|
@@ -3936,17 +3976,17 @@ var SidebarUser = ({
|
|
|
3936
3976
|
const ownerState = { collapsed };
|
|
3937
3977
|
const content = /* @__PURE__ */ jsxs14(SidebarUserButton, { onClick, ownerState, children: [
|
|
3938
3978
|
avatarChild,
|
|
3939
|
-
/* @__PURE__ */
|
|
3979
|
+
/* @__PURE__ */ jsx45(SidebarUserTextContainer, { collapsed, children: textChildren })
|
|
3940
3980
|
] });
|
|
3941
3981
|
return /* @__PURE__ */ jsxs14(Fragment7, { children: [
|
|
3942
|
-
showDivider && /* @__PURE__ */
|
|
3943
|
-
/* @__PURE__ */
|
|
3982
|
+
showDivider && /* @__PURE__ */ jsx45(Divider5, {}),
|
|
3983
|
+
/* @__PURE__ */ jsx45(SidebarUserRoot, { sx, children: collapsed ? /* @__PURE__ */ jsx45(Tooltip4, { title: tooltipText, placement: "right", arrow: true, children: content }) : content })
|
|
3944
3984
|
] });
|
|
3945
3985
|
};
|
|
3946
3986
|
SidebarUser.displayName = "SidebarUser";
|
|
3947
3987
|
|
|
3948
3988
|
// src/components/Sidebar/Sidebar.tsx
|
|
3949
|
-
import { jsx as
|
|
3989
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3950
3990
|
var SIDEBAR_WIDTH = 250;
|
|
3951
3991
|
var COLLAPSED_SIDEBAR_WIDTH = 64;
|
|
3952
3992
|
var SidebarRootStyled = styled34(Box17, {
|
|
@@ -3973,17 +4013,32 @@ var SidebarRootStyled = styled34(Box17, {
|
|
|
3973
4013
|
}
|
|
3974
4014
|
}));
|
|
3975
4015
|
var Sidebar = ({
|
|
3976
|
-
collapsed
|
|
3977
|
-
activeItem,
|
|
3978
|
-
expandedMenus
|
|
3979
|
-
onSelect,
|
|
3980
|
-
onToggleExpand,
|
|
4016
|
+
collapsed: collapsedProp,
|
|
4017
|
+
activeItem: activeItemProp,
|
|
4018
|
+
expandedMenus: expandedMenusProp,
|
|
4019
|
+
onSelect: onSelectProp,
|
|
4020
|
+
onToggleExpand: onToggleExpandProp,
|
|
3981
4021
|
children,
|
|
3982
|
-
width
|
|
3983
|
-
collapsedWidth
|
|
4022
|
+
width: widthProp,
|
|
4023
|
+
collapsedWidth: collapsedWidthProp,
|
|
3984
4024
|
sx
|
|
3985
4025
|
}) => {
|
|
3986
|
-
|
|
4026
|
+
var _a, _b, _c;
|
|
4027
|
+
const appShellContext = React17.useContext(AppShellContext);
|
|
4028
|
+
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
4029
|
+
const activeItem = activeItemProp != null ? activeItemProp : appShellContext == null ? void 0 : appShellContext.state.activeMenuItem;
|
|
4030
|
+
const expandedMenus = React17.useMemo(
|
|
4031
|
+
() => {
|
|
4032
|
+
var _a2;
|
|
4033
|
+
return (_a2 = expandedMenusProp != null ? expandedMenusProp : appShellContext == null ? void 0 : appShellContext.state.expandedMenus) != null ? _a2 : {};
|
|
4034
|
+
},
|
|
4035
|
+
[expandedMenusProp, appShellContext == null ? void 0 : appShellContext.state.expandedMenus]
|
|
4036
|
+
);
|
|
4037
|
+
const onSelect = onSelectProp != null ? onSelectProp : appShellContext == null ? void 0 : appShellContext.actions.setActiveMenuItem;
|
|
4038
|
+
const onToggleExpand = onToggleExpandProp != null ? onToggleExpandProp : appShellContext == null ? void 0 : appShellContext.actions.toggleMenu;
|
|
4039
|
+
const width = (_b = widthProp != null ? widthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarWidth) != null ? _b : SIDEBAR_WIDTH;
|
|
4040
|
+
const collapsedWidth = (_c = collapsedWidthProp != null ? collapsedWidthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsedWidth) != null ? _c : COLLAPSED_SIDEBAR_WIDTH;
|
|
4041
|
+
const contextValue = React17.useMemo(
|
|
3987
4042
|
() => ({
|
|
3988
4043
|
collapsed,
|
|
3989
4044
|
activeItem,
|
|
@@ -3994,7 +4049,7 @@ var Sidebar = ({
|
|
|
3994
4049
|
[collapsed, activeItem, expandedMenus, onSelect, onToggleExpand]
|
|
3995
4050
|
);
|
|
3996
4051
|
const ownerState = { collapsed, width, collapsedWidth };
|
|
3997
|
-
return /* @__PURE__ */
|
|
4052
|
+
return /* @__PURE__ */ jsx46(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx46(SidebarRootStyled, { component: "aside", ownerState, sx, children }) });
|
|
3998
4053
|
};
|
|
3999
4054
|
Sidebar.Nav = SidebarNav;
|
|
4000
4055
|
Sidebar.Category = SidebarCategory;
|
|
@@ -4011,15 +4066,15 @@ Sidebar.UserEmail = SidebarUserEmail;
|
|
|
4011
4066
|
Sidebar.displayName = "Sidebar";
|
|
4012
4067
|
|
|
4013
4068
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
4014
|
-
import * as
|
|
4069
|
+
import * as React23 from "react";
|
|
4015
4070
|
import Drawer from "@mui/material/Drawer";
|
|
4016
4071
|
import { styled as styled50 } from "@mui/material/styles";
|
|
4017
4072
|
|
|
4018
4073
|
// src/components/NotificationPanel/context.ts
|
|
4019
|
-
import * as
|
|
4020
|
-
var NotificationPanelContext =
|
|
4074
|
+
import * as React18 from "react";
|
|
4075
|
+
var NotificationPanelContext = React18.createContext(null);
|
|
4021
4076
|
var useNotificationPanel = () => {
|
|
4022
|
-
const context =
|
|
4077
|
+
const context = React18.useContext(NotificationPanelContext);
|
|
4023
4078
|
if (!context) {
|
|
4024
4079
|
throw new Error(
|
|
4025
4080
|
"NotificationPanel compound components must be used within NotificationPanel"
|
|
@@ -4029,10 +4084,10 @@ var useNotificationPanel = () => {
|
|
|
4029
4084
|
};
|
|
4030
4085
|
|
|
4031
4086
|
// src/components/NotificationPanel/NotificationHeader.tsx
|
|
4032
|
-
import * as
|
|
4087
|
+
import * as React19 from "react";
|
|
4033
4088
|
import Box18 from "@mui/material/Box";
|
|
4034
4089
|
import { styled as styled35 } from "@mui/material/styles";
|
|
4035
|
-
import { jsx as
|
|
4090
|
+
import { jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4036
4091
|
var NotificationHeaderRoot = styled35(Box18, {
|
|
4037
4092
|
name: "MuiNotificationPanel",
|
|
4038
4093
|
slot: "Header"
|
|
@@ -4054,9 +4109,9 @@ var NotificationHeaderContent = styled35(Box18, {
|
|
|
4054
4109
|
var separateChildren4 = (children) => {
|
|
4055
4110
|
const leftChildren = [];
|
|
4056
4111
|
let closeChild = null;
|
|
4057
|
-
|
|
4112
|
+
React19.Children.forEach(children, (child) => {
|
|
4058
4113
|
var _a;
|
|
4059
|
-
if (
|
|
4114
|
+
if (React19.isValidElement(child)) {
|
|
4060
4115
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4061
4116
|
if (displayName === "NotificationHeaderClose") {
|
|
4062
4117
|
closeChild = child;
|
|
@@ -4075,7 +4130,7 @@ var NotificationHeader = ({
|
|
|
4075
4130
|
}) => {
|
|
4076
4131
|
const { leftChildren, closeChild } = separateChildren4(children);
|
|
4077
4132
|
return /* @__PURE__ */ jsxs15(NotificationHeaderRoot, { sx, children: [
|
|
4078
|
-
/* @__PURE__ */
|
|
4133
|
+
/* @__PURE__ */ jsx47(NotificationHeaderContent, { children: leftChildren }),
|
|
4079
4134
|
closeChild
|
|
4080
4135
|
] });
|
|
4081
4136
|
};
|
|
@@ -4084,7 +4139,7 @@ NotificationHeader.displayName = "NotificationHeader";
|
|
|
4084
4139
|
// src/components/NotificationPanel/NotificationHeaderIcon.tsx
|
|
4085
4140
|
import Box19 from "@mui/material/Box";
|
|
4086
4141
|
import { styled as styled36 } from "@mui/material/styles";
|
|
4087
|
-
import { jsx as
|
|
4142
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
4088
4143
|
var NotificationHeaderIconRoot = styled36(Box19, {
|
|
4089
4144
|
name: "MuiNotificationPanel",
|
|
4090
4145
|
slot: "HeaderIcon"
|
|
@@ -4096,14 +4151,14 @@ var NotificationHeaderIcon = ({
|
|
|
4096
4151
|
children,
|
|
4097
4152
|
sx
|
|
4098
4153
|
}) => {
|
|
4099
|
-
return /* @__PURE__ */
|
|
4154
|
+
return /* @__PURE__ */ jsx48(NotificationHeaderIconRoot, { sx, children });
|
|
4100
4155
|
};
|
|
4101
4156
|
NotificationHeaderIcon.displayName = "NotificationHeaderIcon";
|
|
4102
4157
|
|
|
4103
4158
|
// src/components/NotificationPanel/NotificationHeaderTitle.tsx
|
|
4104
4159
|
import Typography10 from "@mui/material/Typography";
|
|
4105
4160
|
import { styled as styled37 } from "@mui/material/styles";
|
|
4106
|
-
import { jsx as
|
|
4161
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4107
4162
|
var NotificationHeaderTitleRoot = styled37(Typography10, {
|
|
4108
4163
|
name: "MuiNotificationPanel",
|
|
4109
4164
|
slot: "HeaderTitle"
|
|
@@ -4114,14 +4169,14 @@ var NotificationHeaderTitle = ({
|
|
|
4114
4169
|
children,
|
|
4115
4170
|
sx
|
|
4116
4171
|
}) => {
|
|
4117
|
-
return /* @__PURE__ */
|
|
4172
|
+
return /* @__PURE__ */ jsx49(NotificationHeaderTitleRoot, { variant: "h6", sx, children });
|
|
4118
4173
|
};
|
|
4119
4174
|
NotificationHeaderTitle.displayName = "NotificationHeaderTitle";
|
|
4120
4175
|
|
|
4121
4176
|
// src/components/NotificationPanel/NotificationHeaderBadge.tsx
|
|
4122
4177
|
import Chip2 from "@mui/material/Chip";
|
|
4123
4178
|
import { styled as styled38 } from "@mui/material/styles";
|
|
4124
|
-
import { jsx as
|
|
4179
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4125
4180
|
var NotificationHeaderBadgeRoot = styled38(Chip2, {
|
|
4126
4181
|
name: "MuiNotificationPanel",
|
|
4127
4182
|
slot: "HeaderBadge"
|
|
@@ -4137,7 +4192,7 @@ var NotificationHeaderBadge = ({
|
|
|
4137
4192
|
if (!children || children === 0 || children === "0") {
|
|
4138
4193
|
return null;
|
|
4139
4194
|
}
|
|
4140
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx50(NotificationHeaderBadgeRoot, { label: children, size: "small", color, sx });
|
|
4141
4196
|
};
|
|
4142
4197
|
NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
4143
4198
|
|
|
@@ -4145,7 +4200,7 @@ NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
|
4145
4200
|
import IconButton4 from "@mui/material/IconButton";
|
|
4146
4201
|
import { styled as styled39 } from "@mui/material/styles";
|
|
4147
4202
|
import { X as X2 } from "@wso2/oxygen-ui-icons-react";
|
|
4148
|
-
import { jsx as
|
|
4203
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4149
4204
|
var NotificationHeaderCloseRoot = styled39(IconButton4, {
|
|
4150
4205
|
name: "MuiNotificationPanel",
|
|
4151
4206
|
slot: "HeaderClose"
|
|
@@ -4163,7 +4218,7 @@ var NotificationHeaderClose = ({
|
|
|
4163
4218
|
onClose == null ? void 0 : onClose();
|
|
4164
4219
|
}
|
|
4165
4220
|
};
|
|
4166
|
-
return /* @__PURE__ */
|
|
4221
|
+
return /* @__PURE__ */ jsx51(NotificationHeaderCloseRoot, { onClick: handleClick, size: "small", sx, children: children || /* @__PURE__ */ jsx51(X2, { size: 20 }) });
|
|
4167
4222
|
};
|
|
4168
4223
|
NotificationHeaderClose.displayName = "NotificationHeaderClose";
|
|
4169
4224
|
|
|
@@ -4173,7 +4228,7 @@ import Tabs from "@mui/material/Tabs";
|
|
|
4173
4228
|
import Tab from "@mui/material/Tab";
|
|
4174
4229
|
import Chip3 from "@mui/material/Chip";
|
|
4175
4230
|
import { styled as styled40 } from "@mui/material/styles";
|
|
4176
|
-
import { jsx as
|
|
4231
|
+
import { jsx as jsx52, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4177
4232
|
var NotificationTabsRoot = styled40(Box20, {
|
|
4178
4233
|
name: "MuiNotificationPanel",
|
|
4179
4234
|
slot: "Tabs"
|
|
@@ -4212,18 +4267,18 @@ var NotificationTabs = ({
|
|
|
4212
4267
|
onChange,
|
|
4213
4268
|
sx
|
|
4214
4269
|
}) => {
|
|
4215
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsx52(NotificationTabsRoot, { sx, children: /* @__PURE__ */ jsx52(
|
|
4216
4271
|
NotificationTabsInner,
|
|
4217
4272
|
{
|
|
4218
4273
|
value,
|
|
4219
4274
|
onChange: (_, newValue) => onChange(newValue),
|
|
4220
4275
|
variant: "fullWidth",
|
|
4221
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
4276
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx52(
|
|
4222
4277
|
Tab,
|
|
4223
4278
|
{
|
|
4224
4279
|
label: /* @__PURE__ */ jsxs16(NotificationTabLabel, { children: [
|
|
4225
4280
|
tab.label,
|
|
4226
|
-
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */
|
|
4281
|
+
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */ jsx52(
|
|
4227
4282
|
NotificationTabCount,
|
|
4228
4283
|
{
|
|
4229
4284
|
label: tab.count,
|
|
@@ -4245,7 +4300,7 @@ import Box21 from "@mui/material/Box";
|
|
|
4245
4300
|
import Button3 from "@mui/material/Button";
|
|
4246
4301
|
import { styled as styled41 } from "@mui/material/styles";
|
|
4247
4302
|
import { CheckCheck, Trash2 } from "@wso2/oxygen-ui-icons-react";
|
|
4248
|
-
import { jsx as
|
|
4303
|
+
import { jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4249
4304
|
var NotificationActionsRoot = styled41(Box21, {
|
|
4250
4305
|
name: "MuiNotificationPanel",
|
|
4251
4306
|
slot: "Actions"
|
|
@@ -4272,20 +4327,20 @@ var NotificationActions = ({
|
|
|
4272
4327
|
sx
|
|
4273
4328
|
}) => {
|
|
4274
4329
|
return /* @__PURE__ */ jsxs17(NotificationActionsRoot, { sx, children: [
|
|
4275
|
-
hasUnread && onMarkAllRead && /* @__PURE__ */
|
|
4330
|
+
hasUnread && onMarkAllRead && /* @__PURE__ */ jsx53(
|
|
4276
4331
|
NotificationActionButton,
|
|
4277
4332
|
{
|
|
4278
4333
|
size: "small",
|
|
4279
|
-
startIcon: /* @__PURE__ */
|
|
4334
|
+
startIcon: /* @__PURE__ */ jsx53(CheckCheck, { size: 14 }),
|
|
4280
4335
|
onClick: onMarkAllRead,
|
|
4281
4336
|
children: "Mark all read"
|
|
4282
4337
|
}
|
|
4283
4338
|
),
|
|
4284
|
-
onClearAll && /* @__PURE__ */
|
|
4339
|
+
onClearAll && /* @__PURE__ */ jsx53(
|
|
4285
4340
|
NotificationActionButton,
|
|
4286
4341
|
{
|
|
4287
4342
|
size: "small",
|
|
4288
|
-
startIcon: /* @__PURE__ */
|
|
4343
|
+
startIcon: /* @__PURE__ */ jsx53(Trash2, { size: 14 }),
|
|
4289
4344
|
onClick: onClearAll,
|
|
4290
4345
|
color: "error",
|
|
4291
4346
|
children: "Clear all"
|
|
@@ -4295,12 +4350,12 @@ var NotificationActions = ({
|
|
|
4295
4350
|
};
|
|
4296
4351
|
|
|
4297
4352
|
// src/components/NotificationPanel/NotificationList.tsx
|
|
4298
|
-
import * as
|
|
4353
|
+
import * as React20 from "react";
|
|
4299
4354
|
import Box22 from "@mui/material/Box";
|
|
4300
4355
|
import List3 from "@mui/material/List";
|
|
4301
4356
|
import Divider6 from "@mui/material/Divider";
|
|
4302
4357
|
import { styled as styled42 } from "@mui/material/styles";
|
|
4303
|
-
import { jsx as
|
|
4358
|
+
import { jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4304
4359
|
var NotificationListRoot = styled42(Box22, {
|
|
4305
4360
|
name: "MuiNotificationPanel",
|
|
4306
4361
|
slot: "List"
|
|
@@ -4313,15 +4368,15 @@ var NotificationList = ({
|
|
|
4313
4368
|
showDividers = true,
|
|
4314
4369
|
sx
|
|
4315
4370
|
}) => {
|
|
4316
|
-
const childArray =
|
|
4317
|
-
return /* @__PURE__ */
|
|
4371
|
+
const childArray = React20.Children.toArray(children);
|
|
4372
|
+
return /* @__PURE__ */ jsx54(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx54(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs18(React20.Fragment, { children: [
|
|
4318
4373
|
child,
|
|
4319
|
-
showDividers && index < childArray.length - 1 && /* @__PURE__ */
|
|
4374
|
+
showDividers && index < childArray.length - 1 && /* @__PURE__ */ jsx54(Divider6, {})
|
|
4320
4375
|
] }, index)) }) });
|
|
4321
4376
|
};
|
|
4322
4377
|
|
|
4323
4378
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
4324
|
-
import * as
|
|
4379
|
+
import * as React22 from "react";
|
|
4325
4380
|
import Box23 from "@mui/material/Box";
|
|
4326
4381
|
import ListItem2 from "@mui/material/ListItem";
|
|
4327
4382
|
import ListItemButton3 from "@mui/material/ListItemButton";
|
|
@@ -4367,11 +4422,11 @@ var getNotificationTypeProps = (type) => {
|
|
|
4367
4422
|
};
|
|
4368
4423
|
|
|
4369
4424
|
// src/components/NotificationPanel/NotificationItemContext.tsx
|
|
4370
|
-
import * as
|
|
4371
|
-
import { jsx as
|
|
4372
|
-
var NotificationItemContext =
|
|
4425
|
+
import * as React21 from "react";
|
|
4426
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4427
|
+
var NotificationItemContext = React21.createContext(null);
|
|
4373
4428
|
var useNotificationItemContext = () => {
|
|
4374
|
-
const context =
|
|
4429
|
+
const context = React21.useContext(NotificationItemContext);
|
|
4375
4430
|
if (!context) {
|
|
4376
4431
|
throw new Error(
|
|
4377
4432
|
"useNotificationItemContext must be used within a NotificationItem component"
|
|
@@ -4380,11 +4435,11 @@ var useNotificationItemContext = () => {
|
|
|
4380
4435
|
return context;
|
|
4381
4436
|
};
|
|
4382
4437
|
var NotificationItemProvider = ({ value, children }) => {
|
|
4383
|
-
return /* @__PURE__ */
|
|
4438
|
+
return /* @__PURE__ */ jsx55(NotificationItemContext.Provider, { value, children });
|
|
4384
4439
|
};
|
|
4385
4440
|
|
|
4386
4441
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
4387
|
-
import { jsx as
|
|
4442
|
+
import { jsx as jsx56, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4388
4443
|
var NotificationItemRoot = styled43(ListItem2, {
|
|
4389
4444
|
name: "MuiNotificationPanel",
|
|
4390
4445
|
slot: "Item",
|
|
@@ -4425,9 +4480,9 @@ var separateChildren5 = (children) => {
|
|
|
4425
4480
|
let messageChild = null;
|
|
4426
4481
|
let timestampChild = null;
|
|
4427
4482
|
let actionChild = null;
|
|
4428
|
-
|
|
4483
|
+
React22.Children.forEach(children, (child) => {
|
|
4429
4484
|
var _a;
|
|
4430
|
-
if (
|
|
4485
|
+
if (React22.isValidElement(child)) {
|
|
4431
4486
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4432
4487
|
switch (displayName) {
|
|
4433
4488
|
case "NotificationItemAvatar":
|
|
@@ -4477,12 +4532,12 @@ var NotificationItem = ({
|
|
|
4477
4532
|
onAction == null ? void 0 : onAction();
|
|
4478
4533
|
};
|
|
4479
4534
|
const ownerState = { read };
|
|
4480
|
-
return /* @__PURE__ */
|
|
4535
|
+
return /* @__PURE__ */ jsx56(NotificationItemProvider, { value: contextValue, children: /* @__PURE__ */ jsx56(
|
|
4481
4536
|
NotificationItemRoot,
|
|
4482
4537
|
{
|
|
4483
4538
|
disablePadding: true,
|
|
4484
4539
|
ownerState,
|
|
4485
|
-
secondaryAction: onDismiss && /* @__PURE__ */
|
|
4540
|
+
secondaryAction: onDismiss && /* @__PURE__ */ jsx56(
|
|
4486
4541
|
NotificationItemDismiss,
|
|
4487
4542
|
{
|
|
4488
4543
|
size: "small",
|
|
@@ -4490,13 +4545,13 @@ var NotificationItem = ({
|
|
|
4490
4545
|
e.stopPropagation();
|
|
4491
4546
|
onDismiss(id);
|
|
4492
4547
|
},
|
|
4493
|
-
children: /* @__PURE__ */
|
|
4548
|
+
children: /* @__PURE__ */ jsx56(X3, { size: 16 })
|
|
4494
4549
|
}
|
|
4495
4550
|
),
|
|
4496
4551
|
sx,
|
|
4497
4552
|
children: /* @__PURE__ */ jsxs19(NotificationItemButton, { onClick: handleClick, children: [
|
|
4498
4553
|
avatarChild,
|
|
4499
|
-
/* @__PURE__ */
|
|
4554
|
+
/* @__PURE__ */ jsx56(
|
|
4500
4555
|
ListItemText3,
|
|
4501
4556
|
{
|
|
4502
4557
|
primary: titleChild,
|
|
@@ -4519,7 +4574,7 @@ NotificationItem.displayName = "NotificationItem";
|
|
|
4519
4574
|
import ListItemAvatar from "@mui/material/ListItemAvatar";
|
|
4520
4575
|
import Avatar3 from "@mui/material/Avatar";
|
|
4521
4576
|
import { styled as styled44 } from "@mui/material/styles";
|
|
4522
|
-
import { jsx as
|
|
4577
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
4523
4578
|
var NotificationItemAvatarStyled = styled44(Avatar3, {
|
|
4524
4579
|
name: "MuiNotificationPanel",
|
|
4525
4580
|
slot: "ItemAvatar",
|
|
@@ -4543,7 +4598,7 @@ var NotificationItemAvatar = ({
|
|
|
4543
4598
|
color: typeProps.color,
|
|
4544
4599
|
hasChildren: !!children
|
|
4545
4600
|
};
|
|
4546
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsx57(ListItemAvatar, { children: /* @__PURE__ */ jsx57(NotificationItemAvatarStyled, { ownerState, sx, children: children || /* @__PURE__ */ jsx57(Icon, { size: 20 }) }) });
|
|
4547
4602
|
};
|
|
4548
4603
|
NotificationItemAvatar.displayName = "NotificationItemAvatar";
|
|
4549
4604
|
|
|
@@ -4551,7 +4606,7 @@ NotificationItemAvatar.displayName = "NotificationItemAvatar";
|
|
|
4551
4606
|
import Box24 from "@mui/material/Box";
|
|
4552
4607
|
import Typography11 from "@mui/material/Typography";
|
|
4553
4608
|
import { styled as styled45 } from "@mui/material/styles";
|
|
4554
|
-
import { jsx as
|
|
4609
|
+
import { jsx as jsx58, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4555
4610
|
var NotificationItemTitleRoot = styled45(Box24, {
|
|
4556
4611
|
name: "MuiNotificationPanel",
|
|
4557
4612
|
slot: "ItemTitle"
|
|
@@ -4585,8 +4640,8 @@ var NotificationItemTitle = ({
|
|
|
4585
4640
|
}) => {
|
|
4586
4641
|
const { read } = useNotificationItemContext();
|
|
4587
4642
|
return /* @__PURE__ */ jsxs20(NotificationItemTitleRoot, { sx, children: [
|
|
4588
|
-
/* @__PURE__ */
|
|
4589
|
-
showUnreadIndicator && !read && /* @__PURE__ */
|
|
4643
|
+
/* @__PURE__ */ jsx58(NotificationItemTitleText, { variant: "body2", ownerState: { read }, children }),
|
|
4644
|
+
showUnreadIndicator && !read && /* @__PURE__ */ jsx58(NotificationItemUnreadDot, {})
|
|
4590
4645
|
] });
|
|
4591
4646
|
};
|
|
4592
4647
|
NotificationItemTitle.displayName = "NotificationItemTitle";
|
|
@@ -4594,7 +4649,7 @@ NotificationItemTitle.displayName = "NotificationItemTitle";
|
|
|
4594
4649
|
// src/components/NotificationPanel/NotificationItemMessage.tsx
|
|
4595
4650
|
import Typography12 from "@mui/material/Typography";
|
|
4596
4651
|
import { styled as styled46 } from "@mui/material/styles";
|
|
4597
|
-
import { jsx as
|
|
4652
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4598
4653
|
var NotificationItemMessageRoot = styled46(Typography12, {
|
|
4599
4654
|
name: "MuiNotificationPanel",
|
|
4600
4655
|
slot: "ItemMessage"
|
|
@@ -4607,14 +4662,14 @@ var NotificationItemMessage = ({
|
|
|
4607
4662
|
children,
|
|
4608
4663
|
sx
|
|
4609
4664
|
}) => {
|
|
4610
|
-
return /* @__PURE__ */
|
|
4665
|
+
return /* @__PURE__ */ jsx59(NotificationItemMessageRoot, { component: "span", variant: "caption", sx, children });
|
|
4611
4666
|
};
|
|
4612
4667
|
NotificationItemMessage.displayName = "NotificationItemMessage";
|
|
4613
4668
|
|
|
4614
4669
|
// src/components/NotificationPanel/NotificationItemTimestamp.tsx
|
|
4615
4670
|
import Typography13 from "@mui/material/Typography";
|
|
4616
4671
|
import { styled as styled47 } from "@mui/material/styles";
|
|
4617
|
-
import { jsx as
|
|
4672
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4618
4673
|
var NotificationItemTimestampRoot = styled47(Typography13, {
|
|
4619
4674
|
name: "MuiNotificationPanel",
|
|
4620
4675
|
slot: "ItemTimestamp"
|
|
@@ -4626,14 +4681,14 @@ var NotificationItemTimestamp = ({
|
|
|
4626
4681
|
children,
|
|
4627
4682
|
sx
|
|
4628
4683
|
}) => {
|
|
4629
|
-
return /* @__PURE__ */
|
|
4684
|
+
return /* @__PURE__ */ jsx60(NotificationItemTimestampRoot, { component: "span", variant: "caption", sx, children });
|
|
4630
4685
|
};
|
|
4631
4686
|
NotificationItemTimestamp.displayName = "NotificationItemTimestamp";
|
|
4632
4687
|
|
|
4633
4688
|
// src/components/NotificationPanel/NotificationItemAction.tsx
|
|
4634
4689
|
import Chip4 from "@mui/material/Chip";
|
|
4635
4690
|
import { styled as styled48 } from "@mui/material/styles";
|
|
4636
|
-
import { jsx as
|
|
4691
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4637
4692
|
var NotificationItemActionRoot = styled48(Chip4, {
|
|
4638
4693
|
name: "MuiNotificationPanel",
|
|
4639
4694
|
slot: "ItemAction"
|
|
@@ -4656,7 +4711,7 @@ var NotificationItemAction = ({
|
|
|
4656
4711
|
onAction == null ? void 0 : onAction();
|
|
4657
4712
|
}
|
|
4658
4713
|
};
|
|
4659
|
-
return /* @__PURE__ */
|
|
4714
|
+
return /* @__PURE__ */ jsx61(
|
|
4660
4715
|
NotificationItemActionRoot,
|
|
4661
4716
|
{
|
|
4662
4717
|
label: children,
|
|
@@ -4674,7 +4729,7 @@ import Box25 from "@mui/material/Box";
|
|
|
4674
4729
|
import Typography14 from "@mui/material/Typography";
|
|
4675
4730
|
import { styled as styled49 } from "@mui/material/styles";
|
|
4676
4731
|
import { BellOff } from "@wso2/oxygen-ui-icons-react";
|
|
4677
|
-
import { jsx as
|
|
4732
|
+
import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4678
4733
|
var NotificationEmptyStateRoot = styled49(Box25, {
|
|
4679
4734
|
name: "MuiNotificationPanel",
|
|
4680
4735
|
slot: "EmptyState"
|
|
@@ -4701,13 +4756,13 @@ var NotificationEmptyState = ({
|
|
|
4701
4756
|
sx
|
|
4702
4757
|
}) => {
|
|
4703
4758
|
return /* @__PURE__ */ jsxs21(NotificationEmptyStateRoot, { sx, children: [
|
|
4704
|
-
icon || /* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4759
|
+
icon || /* @__PURE__ */ jsx62(BellOff, { size: 48, style: { opacity: 0.3, marginBottom: 16 } }),
|
|
4760
|
+
/* @__PURE__ */ jsx62(NotificationEmptyStateMessage, { variant: "body2", children: message })
|
|
4706
4761
|
] });
|
|
4707
4762
|
};
|
|
4708
4763
|
|
|
4709
4764
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
4710
|
-
import { jsx as
|
|
4765
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4711
4766
|
var NotificationPanelRoot = styled50(Drawer, {
|
|
4712
4767
|
name: "MuiNotificationPanel",
|
|
4713
4768
|
slot: "Root",
|
|
@@ -4724,17 +4779,28 @@ var NotificationPanelRoot = styled50(Drawer, {
|
|
|
4724
4779
|
}
|
|
4725
4780
|
}));
|
|
4726
4781
|
var NotificationPanel = ({
|
|
4727
|
-
open,
|
|
4728
|
-
onClose,
|
|
4782
|
+
open: openProp,
|
|
4783
|
+
onClose: onCloseProp,
|
|
4729
4784
|
children,
|
|
4730
4785
|
width = 380,
|
|
4731
4786
|
anchor = "right",
|
|
4732
4787
|
variant = "temporary",
|
|
4733
4788
|
sx
|
|
4734
4789
|
}) => {
|
|
4735
|
-
|
|
4790
|
+
var _a;
|
|
4791
|
+
const appShellContext = React23.useContext(AppShellContext);
|
|
4792
|
+
const open = (_a = openProp != null ? openProp : appShellContext == null ? void 0 : appShellContext.state.notificationPanelOpen) != null ? _a : false;
|
|
4793
|
+
const onClose = React23.useMemo(
|
|
4794
|
+
() => {
|
|
4795
|
+
var _a2;
|
|
4796
|
+
return (_a2 = onCloseProp != null ? onCloseProp : appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel) != null ? _a2 : (() => {
|
|
4797
|
+
});
|
|
4798
|
+
},
|
|
4799
|
+
[onCloseProp, appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel]
|
|
4800
|
+
);
|
|
4801
|
+
const contextValue = React23.useMemo(() => ({ onClose }), [onClose]);
|
|
4736
4802
|
const ownerState = { width };
|
|
4737
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ jsx63(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx63(
|
|
4738
4804
|
NotificationPanelRoot,
|
|
4739
4805
|
{
|
|
4740
4806
|
anchor,
|
|
@@ -4765,14 +4831,14 @@ NotificationPanel.EmptyState = NotificationEmptyState;
|
|
|
4765
4831
|
NotificationPanel.displayName = "NotificationPanel";
|
|
4766
4832
|
|
|
4767
4833
|
// src/components/Footer/Footer.tsx
|
|
4768
|
-
import * as
|
|
4834
|
+
import * as React24 from "react";
|
|
4769
4835
|
import Box26 from "@mui/material/Box";
|
|
4770
4836
|
import { styled as styled54 } from "@mui/material/styles";
|
|
4771
4837
|
|
|
4772
4838
|
// src/components/Footer/FooterCopyright.tsx
|
|
4773
4839
|
import Typography15 from "@mui/material/Typography";
|
|
4774
4840
|
import { styled as styled51 } from "@mui/material/styles";
|
|
4775
|
-
import { jsx as
|
|
4841
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4776
4842
|
var StyledCopyrightText = styled51(Typography15, {
|
|
4777
4843
|
name: "MuiFooter",
|
|
4778
4844
|
slot: "CopyrightText"
|
|
@@ -4780,14 +4846,14 @@ var StyledCopyrightText = styled51(Typography15, {
|
|
|
4780
4846
|
color: (theme.vars || theme).palette.text.secondary
|
|
4781
4847
|
}));
|
|
4782
4848
|
var FooterCopyright = ({ children }) => {
|
|
4783
|
-
return /* @__PURE__ */
|
|
4849
|
+
return /* @__PURE__ */ jsx64(StyledCopyrightText, { variant: "caption", children });
|
|
4784
4850
|
};
|
|
4785
4851
|
FooterCopyright.displayName = "Footer.Copyright";
|
|
4786
4852
|
|
|
4787
4853
|
// src/components/Footer/FooterVersion.tsx
|
|
4788
4854
|
import Typography16 from "@mui/material/Typography";
|
|
4789
4855
|
import { styled as styled52 } from "@mui/material/styles";
|
|
4790
|
-
import { jsx as
|
|
4856
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
4791
4857
|
var StyledVersion = styled52(Typography16, {
|
|
4792
4858
|
name: "MuiFooter",
|
|
4793
4859
|
slot: "Version"
|
|
@@ -4797,14 +4863,14 @@ var StyledVersion = styled52(Typography16, {
|
|
|
4797
4863
|
fontSize: 11
|
|
4798
4864
|
}));
|
|
4799
4865
|
var FooterVersion = ({ children }) => {
|
|
4800
|
-
return /* @__PURE__ */
|
|
4866
|
+
return /* @__PURE__ */ jsx65(StyledVersion, { variant: "caption", children });
|
|
4801
4867
|
};
|
|
4802
4868
|
FooterVersion.displayName = "Footer.Version";
|
|
4803
4869
|
|
|
4804
4870
|
// src/components/Footer/FooterLink.tsx
|
|
4805
4871
|
import Link2 from "@mui/material/Link";
|
|
4806
4872
|
import { styled as styled53 } from "@mui/material/styles";
|
|
4807
|
-
import { jsx as
|
|
4873
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
4808
4874
|
var StyledLink = styled53(Link2, {
|
|
4809
4875
|
name: "MuiFooter",
|
|
4810
4876
|
slot: "Link"
|
|
@@ -4817,15 +4883,15 @@ var StyledLink = styled53(Link2, {
|
|
|
4817
4883
|
}));
|
|
4818
4884
|
var FooterLink = (_a) => {
|
|
4819
4885
|
var _b = _a, { children, href } = _b, props = __objRest(_b, ["children", "href"]);
|
|
4820
|
-
return /* @__PURE__ */
|
|
4886
|
+
return /* @__PURE__ */ jsx66(StyledLink, __spreadProps(__spreadValues({ href, underline: "hover" }, props), { children }));
|
|
4821
4887
|
};
|
|
4822
4888
|
FooterLink.displayName = "Footer.Link";
|
|
4823
4889
|
|
|
4824
4890
|
// src/components/Footer/FooterDivider.tsx
|
|
4825
4891
|
import Divider7 from "@mui/material/Divider";
|
|
4826
|
-
import { jsx as
|
|
4892
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
4827
4893
|
var FooterDivider = () => {
|
|
4828
|
-
return /* @__PURE__ */
|
|
4894
|
+
return /* @__PURE__ */ jsx67(
|
|
4829
4895
|
Divider7,
|
|
4830
4896
|
{
|
|
4831
4897
|
orientation: "vertical",
|
|
@@ -4837,7 +4903,7 @@ var FooterDivider = () => {
|
|
|
4837
4903
|
FooterDivider.displayName = "Footer.Divider";
|
|
4838
4904
|
|
|
4839
4905
|
// src/components/Footer/Footer.tsx
|
|
4840
|
-
import { jsx as
|
|
4906
|
+
import { jsx as jsx68, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4841
4907
|
var FooterRoot = styled54(Box26, {
|
|
4842
4908
|
name: "MuiFooter",
|
|
4843
4909
|
slot: "Root"
|
|
@@ -4884,11 +4950,11 @@ var FooterRight = styled54(Box26, {
|
|
|
4884
4950
|
flexWrap: "wrap"
|
|
4885
4951
|
}));
|
|
4886
4952
|
var Footer = ({ children, sx }) => {
|
|
4887
|
-
const childrenArray =
|
|
4953
|
+
const childrenArray = React24.Children.toArray(children);
|
|
4888
4954
|
const leftChildren = [];
|
|
4889
4955
|
const rightChildren = [];
|
|
4890
4956
|
childrenArray.forEach((child) => {
|
|
4891
|
-
if (
|
|
4957
|
+
if (React24.isValidElement(child)) {
|
|
4892
4958
|
if (child.type === FooterCopyright || child.type === FooterVersion || child.type === FooterDivider) {
|
|
4893
4959
|
leftChildren.push(child);
|
|
4894
4960
|
} else if (child.type === FooterLink) {
|
|
@@ -4896,9 +4962,9 @@ var Footer = ({ children, sx }) => {
|
|
|
4896
4962
|
}
|
|
4897
4963
|
}
|
|
4898
4964
|
});
|
|
4899
|
-
return /* @__PURE__ */
|
|
4900
|
-
leftChildren.length > 0 && /* @__PURE__ */
|
|
4901
|
-
rightChildren.length > 0 && /* @__PURE__ */
|
|
4965
|
+
return /* @__PURE__ */ jsx68(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs22(FooterContent, { children: [
|
|
4966
|
+
leftChildren.length > 0 && /* @__PURE__ */ jsx68(FooterLeft, { children: leftChildren }),
|
|
4967
|
+
rightChildren.length > 0 && /* @__PURE__ */ jsx68(FooterRight, { children: rightChildren })
|
|
4902
4968
|
] }) });
|
|
4903
4969
|
};
|
|
4904
4970
|
Footer.Copyright = FooterCopyright;
|
|
@@ -4908,14 +4974,14 @@ Footer.Divider = FooterDivider;
|
|
|
4908
4974
|
Footer.displayName = "Footer";
|
|
4909
4975
|
|
|
4910
4976
|
// src/components/UserMenu/UserMenu.tsx
|
|
4911
|
-
import * as
|
|
4977
|
+
import * as React28 from "react";
|
|
4912
4978
|
import Menu2 from "@mui/material/Menu";
|
|
4913
4979
|
|
|
4914
4980
|
// src/components/UserMenu/UserMenuContext.tsx
|
|
4915
|
-
import * as
|
|
4916
|
-
var UserMenuContext =
|
|
4981
|
+
import * as React25 from "react";
|
|
4982
|
+
var UserMenuContext = React25.createContext(void 0);
|
|
4917
4983
|
var useUserMenu = () => {
|
|
4918
|
-
const context =
|
|
4984
|
+
const context = React25.useContext(UserMenuContext);
|
|
4919
4985
|
if (!context) {
|
|
4920
4986
|
throw new Error("UserMenu sub-components must be used within a UserMenu component");
|
|
4921
4987
|
}
|
|
@@ -4928,7 +4994,7 @@ import Tooltip5 from "@mui/material/Tooltip";
|
|
|
4928
4994
|
import IconButton6 from "@mui/material/IconButton";
|
|
4929
4995
|
import Avatar4 from "@mui/material/Avatar";
|
|
4930
4996
|
import { styled as styled55 } from "@mui/material/styles";
|
|
4931
|
-
import { jsx as
|
|
4997
|
+
import { jsx as jsx69, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4932
4998
|
var StyledTrigger = styled55(IconButton6, {
|
|
4933
4999
|
name: "MuiUserMenu",
|
|
4934
5000
|
slot: "Trigger"
|
|
@@ -4964,7 +5030,7 @@ var StyledNameText = styled55("span", {
|
|
|
4964
5030
|
}));
|
|
4965
5031
|
var UserMenuTrigger = ({ name, avatar, showName = false }) => {
|
|
4966
5032
|
const { open, handleOpen } = useUserMenu();
|
|
4967
|
-
return /* @__PURE__ */
|
|
5033
|
+
return /* @__PURE__ */ jsx69(Tooltip5, { title: "Account", children: /* @__PURE__ */ jsxs23(
|
|
4968
5034
|
StyledTrigger,
|
|
4969
5035
|
{
|
|
4970
5036
|
onClick: handleOpen,
|
|
@@ -4975,8 +5041,8 @@ var UserMenuTrigger = ({ name, avatar, showName = false }) => {
|
|
|
4975
5041
|
"aria-haspopup": "true",
|
|
4976
5042
|
"aria-expanded": open ? "true" : void 0,
|
|
4977
5043
|
children: [
|
|
4978
|
-
/* @__PURE__ */
|
|
4979
|
-
showName && /* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ jsx69(StyledAvatar2, { src: avatar || void 0, alt: name, children: !avatar && name.charAt(0) }),
|
|
5045
|
+
showName && /* @__PURE__ */ jsx69(StyledNameText, { children: name })
|
|
4980
5046
|
]
|
|
4981
5047
|
}
|
|
4982
5048
|
) });
|
|
@@ -4990,7 +5056,7 @@ import Avatar5 from "@mui/material/Avatar";
|
|
|
4990
5056
|
import Typography17 from "@mui/material/Typography";
|
|
4991
5057
|
import Chip5 from "@mui/material/Chip";
|
|
4992
5058
|
import { styled as styled56 } from "@mui/material/styles";
|
|
4993
|
-
import { Fragment as Fragment9, jsx as
|
|
5059
|
+
import { Fragment as Fragment9, jsx as jsx70, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4994
5060
|
var StyledHeaderBox = styled56(Box27, {
|
|
4995
5061
|
name: "MuiUserMenu",
|
|
4996
5062
|
slot: "HeaderBox"
|
|
@@ -5064,12 +5130,12 @@ var StyledEmail = styled56(Typography17, {
|
|
|
5064
5130
|
}));
|
|
5065
5131
|
var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
5066
5132
|
return /* @__PURE__ */ jsxs24(Fragment9, { children: [
|
|
5067
|
-
/* @__PURE__ */
|
|
5068
|
-
/* @__PURE__ */
|
|
5133
|
+
/* @__PURE__ */ jsx70(StyledHeaderBox, { children: /* @__PURE__ */ jsxs24(StyledHeaderContent, { children: [
|
|
5134
|
+
/* @__PURE__ */ jsx70(StyledHeaderAvatar, { src: avatar || void 0, alt: name, children: !avatar && name.charAt(0) }),
|
|
5069
5135
|
/* @__PURE__ */ jsxs24(StyledUserInfo, { children: [
|
|
5070
5136
|
/* @__PURE__ */ jsxs24(StyledNameRow, { children: [
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
-
role && /* @__PURE__ */
|
|
5137
|
+
/* @__PURE__ */ jsx70(StyledName, { variant: "subtitle2", children: name }),
|
|
5138
|
+
role && /* @__PURE__ */ jsx70(
|
|
5073
5139
|
StyledRoleChip,
|
|
5074
5140
|
{
|
|
5075
5141
|
label: role,
|
|
@@ -5078,16 +5144,16 @@ var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
|
5078
5144
|
}
|
|
5079
5145
|
)
|
|
5080
5146
|
] }),
|
|
5081
|
-
/* @__PURE__ */
|
|
5147
|
+
/* @__PURE__ */ jsx70(StyledEmail, { variant: "caption", children: email })
|
|
5082
5148
|
] })
|
|
5083
5149
|
] }) }),
|
|
5084
|
-
/* @__PURE__ */
|
|
5150
|
+
/* @__PURE__ */ jsx70(Divider8, {})
|
|
5085
5151
|
] });
|
|
5086
5152
|
};
|
|
5087
5153
|
UserMenuHeader.displayName = "UserMenu.Header";
|
|
5088
5154
|
|
|
5089
5155
|
// src/components/UserMenu/UserMenuItem.tsx
|
|
5090
|
-
import * as
|
|
5156
|
+
import * as React26 from "react";
|
|
5091
5157
|
import MenuItem3 from "@mui/material/MenuItem";
|
|
5092
5158
|
import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
5093
5159
|
import ListItemText4 from "@mui/material/ListItemText";
|
|
@@ -5095,7 +5161,7 @@ import Box28 from "@mui/material/Box";
|
|
|
5095
5161
|
import Chip6 from "@mui/material/Chip";
|
|
5096
5162
|
import { styled as styled57 } from "@mui/material/styles";
|
|
5097
5163
|
import { ChevronRight } from "@wso2/oxygen-ui-icons-react";
|
|
5098
|
-
import { jsx as
|
|
5164
|
+
import { jsx as jsx71, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5099
5165
|
var StyledMenuItem2 = styled57(MenuItem3, {
|
|
5100
5166
|
name: "MuiUserMenu",
|
|
5101
5167
|
slot: "MenuItem"
|
|
@@ -5124,12 +5190,12 @@ var UserMenuItem = ({
|
|
|
5124
5190
|
onClick == null ? void 0 : onClick();
|
|
5125
5191
|
};
|
|
5126
5192
|
return /* @__PURE__ */ jsxs25(StyledMenuItem2, { onClick: handleClick, children: [
|
|
5127
|
-
icon && /* @__PURE__ */
|
|
5193
|
+
icon && /* @__PURE__ */ jsx71(ListItemIcon3, { children: React26.isValidElement(icon) ? React26.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
5128
5194
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
5129
5195
|
})) : icon }),
|
|
5130
|
-
/* @__PURE__ */
|
|
5196
|
+
/* @__PURE__ */ jsx71(ListItemText4, { primary: label }),
|
|
5131
5197
|
/* @__PURE__ */ jsxs25(Box28, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
5132
|
-
badge && /* @__PURE__ */
|
|
5198
|
+
badge && /* @__PURE__ */ jsx71(
|
|
5133
5199
|
StyledBillingChip,
|
|
5134
5200
|
{
|
|
5135
5201
|
label: badge,
|
|
@@ -5137,19 +5203,19 @@ var UserMenuItem = ({
|
|
|
5137
5203
|
variant: "outlined"
|
|
5138
5204
|
}
|
|
5139
5205
|
),
|
|
5140
|
-
/* @__PURE__ */
|
|
5206
|
+
/* @__PURE__ */ jsx71(ChevronRight, { size: 16, style: { color: "var(--mui-palette-text-secondary)" } })
|
|
5141
5207
|
] })
|
|
5142
5208
|
] });
|
|
5143
5209
|
};
|
|
5144
5210
|
UserMenuItem.displayName = "UserMenu.Item";
|
|
5145
5211
|
|
|
5146
5212
|
// src/components/UserMenu/UserMenuLogout.tsx
|
|
5147
|
-
import * as
|
|
5213
|
+
import * as React27 from "react";
|
|
5148
5214
|
import MenuItem4 from "@mui/material/MenuItem";
|
|
5149
5215
|
import ListItemIcon4 from "@mui/material/ListItemIcon";
|
|
5150
5216
|
import ListItemText5 from "@mui/material/ListItemText";
|
|
5151
5217
|
import { styled as styled58 } from "@mui/material/styles";
|
|
5152
|
-
import { jsx as
|
|
5218
|
+
import { jsx as jsx72, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5153
5219
|
var StyledLogoutItem = styled58(MenuItem4, {
|
|
5154
5220
|
name: "MuiUserMenu",
|
|
5155
5221
|
slot: "LogoutItem"
|
|
@@ -5177,24 +5243,24 @@ var UserMenuLogout = ({
|
|
|
5177
5243
|
onClick == null ? void 0 : onClick();
|
|
5178
5244
|
};
|
|
5179
5245
|
return /* @__PURE__ */ jsxs26(StyledLogoutItem, { onClick: handleClick, children: [
|
|
5180
|
-
icon && /* @__PURE__ */
|
|
5246
|
+
icon && /* @__PURE__ */ jsx72(ListItemIcon4, { children: React27.isValidElement(icon) ? React27.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
5181
5247
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
5182
5248
|
})) : icon }),
|
|
5183
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx72(ListItemText5, { primary: label })
|
|
5184
5250
|
] });
|
|
5185
5251
|
};
|
|
5186
5252
|
UserMenuLogout.displayName = "UserMenu.Logout";
|
|
5187
5253
|
|
|
5188
5254
|
// src/components/UserMenu/UserMenuDivider.tsx
|
|
5189
5255
|
import Divider9 from "@mui/material/Divider";
|
|
5190
|
-
import { jsx as
|
|
5191
|
-
var UserMenuDivider = () => /* @__PURE__ */
|
|
5256
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5257
|
+
var UserMenuDivider = () => /* @__PURE__ */ jsx73(Divider9, {});
|
|
5192
5258
|
UserMenuDivider.displayName = "UserMenu.Divider";
|
|
5193
5259
|
|
|
5194
5260
|
// src/components/UserMenu/UserMenu.tsx
|
|
5195
|
-
import { jsx as
|
|
5261
|
+
import { jsx as jsx74, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5196
5262
|
var UserMenu = ({ children }) => {
|
|
5197
|
-
const [anchorEl, setAnchorEl] =
|
|
5263
|
+
const [anchorEl, setAnchorEl] = React28.useState(null);
|
|
5198
5264
|
const open = Boolean(anchorEl);
|
|
5199
5265
|
const handleOpen = (event) => {
|
|
5200
5266
|
setAnchorEl(event.currentTarget);
|
|
@@ -5202,16 +5268,16 @@ var UserMenu = ({ children }) => {
|
|
|
5202
5268
|
const handleClose = () => {
|
|
5203
5269
|
setAnchorEl(null);
|
|
5204
5270
|
};
|
|
5205
|
-
const childrenArray =
|
|
5271
|
+
const childrenArray = React28.Children.toArray(children);
|
|
5206
5272
|
const triggerChild = childrenArray.find(
|
|
5207
|
-
(child) =>
|
|
5273
|
+
(child) => React28.isValidElement(child) && child.type === UserMenuTrigger
|
|
5208
5274
|
);
|
|
5209
5275
|
const menuChildren = childrenArray.filter(
|
|
5210
|
-
(child) =>
|
|
5276
|
+
(child) => React28.isValidElement(child) && child.type !== UserMenuTrigger
|
|
5211
5277
|
);
|
|
5212
5278
|
return /* @__PURE__ */ jsxs27(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
|
|
5213
5279
|
triggerChild,
|
|
5214
|
-
/* @__PURE__ */
|
|
5280
|
+
/* @__PURE__ */ jsx74(
|
|
5215
5281
|
Menu2,
|
|
5216
5282
|
{
|
|
5217
5283
|
id: "user-menu",
|
|
@@ -5241,14 +5307,14 @@ UserMenu.Divider = UserMenuDivider;
|
|
|
5241
5307
|
UserMenu.displayName = "UserMenu";
|
|
5242
5308
|
|
|
5243
5309
|
// src/components/NotificationBanner/NotificationBanner.tsx
|
|
5244
|
-
import * as
|
|
5310
|
+
import * as React29 from "react";
|
|
5245
5311
|
import Alert from "@mui/material/Alert";
|
|
5246
5312
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
5247
5313
|
import Collapse2 from "@mui/material/Collapse";
|
|
5248
5314
|
import Button4 from "@mui/material/Button";
|
|
5249
5315
|
import Box29 from "@mui/material/Box";
|
|
5250
5316
|
import { styled as styled59 } from "@mui/material/styles";
|
|
5251
|
-
import { jsx as
|
|
5317
|
+
import { jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5252
5318
|
var NotificationBannerAlert = styled59(Alert, {
|
|
5253
5319
|
name: "MuiNotificationBanner",
|
|
5254
5320
|
slot: "Root"
|
|
@@ -5297,22 +5363,22 @@ var NotificationBanner = ({
|
|
|
5297
5363
|
onDismiss,
|
|
5298
5364
|
sx
|
|
5299
5365
|
}) => {
|
|
5300
|
-
const [isVisible, setIsVisible] =
|
|
5301
|
-
|
|
5366
|
+
const [isVisible, setIsVisible] = React29.useState(visible);
|
|
5367
|
+
React29.useEffect(() => {
|
|
5302
5368
|
setIsVisible(visible);
|
|
5303
5369
|
}, [visible]);
|
|
5304
5370
|
const handleDismiss = () => {
|
|
5305
5371
|
setIsVisible(false);
|
|
5306
5372
|
onDismiss == null ? void 0 : onDismiss();
|
|
5307
5373
|
};
|
|
5308
|
-
return /* @__PURE__ */
|
|
5374
|
+
return /* @__PURE__ */ jsx75(Collapse2, { in: isVisible, children: /* @__PURE__ */ jsx75(
|
|
5309
5375
|
NotificationBannerAlert,
|
|
5310
5376
|
{
|
|
5311
5377
|
severity,
|
|
5312
5378
|
variant: "filled",
|
|
5313
5379
|
onClose: handleDismiss,
|
|
5314
5380
|
sx,
|
|
5315
|
-
action: actionLabel && onAction ? /* @__PURE__ */
|
|
5381
|
+
action: actionLabel && onAction ? /* @__PURE__ */ jsx75(
|
|
5316
5382
|
NotificationBannerAction,
|
|
5317
5383
|
{
|
|
5318
5384
|
color: "inherit",
|
|
@@ -5322,8 +5388,8 @@ var NotificationBanner = ({
|
|
|
5322
5388
|
}
|
|
5323
5389
|
) : void 0,
|
|
5324
5390
|
children: /* @__PURE__ */ jsxs28(NotificationBannerContent, { children: [
|
|
5325
|
-
title && /* @__PURE__ */
|
|
5326
|
-
/* @__PURE__ */
|
|
5391
|
+
title && /* @__PURE__ */ jsx75(AlertTitle, { sx: { mb: 0 }, children: title }),
|
|
5392
|
+
/* @__PURE__ */ jsx75(Box29, { component: "span", children: message })
|
|
5327
5393
|
] })
|
|
5328
5394
|
}
|
|
5329
5395
|
) });
|
|
@@ -5332,7 +5398,7 @@ var NotificationBanner = ({
|
|
|
5332
5398
|
// src/components/Form/CardButton.tsx
|
|
5333
5399
|
import { Card as Card2, ButtonBase, Box as Box30, styled as styled60 } from "@mui/material";
|
|
5334
5400
|
import { CardHeader, CardContent as CardContent2, CardActions, CardMedia } from "@mui/material";
|
|
5335
|
-
import { jsx as
|
|
5401
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
5336
5402
|
var StyledCardButton = styled60(Card2, {
|
|
5337
5403
|
shouldForwardProp: (prop) => prop !== "selected" && prop !== "disabled"
|
|
5338
5404
|
})(({ theme, selected, disabled, alignItems = "flex-start" }) => ({
|
|
@@ -5361,7 +5427,7 @@ var StyledCardButton = styled60(Card2, {
|
|
|
5361
5427
|
}));
|
|
5362
5428
|
var CardButton = (props) => {
|
|
5363
5429
|
const _a = props, { disabled, selected, alignItems = "flex-start" } = _a, rest = __objRest(_a, ["disabled", "selected", "alignItems"]);
|
|
5364
|
-
return /* @__PURE__ */
|
|
5430
|
+
return /* @__PURE__ */ jsx76(
|
|
5365
5431
|
StyledCardButton,
|
|
5366
5432
|
__spreadValues({
|
|
5367
5433
|
alignItems,
|
|
@@ -5371,36 +5437,36 @@ var CardButton = (props) => {
|
|
|
5371
5437
|
}, rest)
|
|
5372
5438
|
);
|
|
5373
5439
|
};
|
|
5374
|
-
var DisappearingCardButtonContent = (props) => /* @__PURE__ */
|
|
5440
|
+
var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx76(Box30, __spreadValues({ className: "creation-flow-card-actions" }, props));
|
|
5375
5441
|
|
|
5376
5442
|
// src/components/Form/Stack.tsx
|
|
5377
5443
|
import { Stack as OxygenStack } from "@mui/material";
|
|
5378
|
-
import { jsx as
|
|
5444
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
5379
5445
|
var Stack2 = (props) => {
|
|
5380
|
-
return /* @__PURE__ */
|
|
5446
|
+
return /* @__PURE__ */ jsx77(OxygenStack, __spreadValues({ spacing: 2 }, props));
|
|
5381
5447
|
};
|
|
5382
5448
|
|
|
5383
5449
|
// src/components/Form/Typography.tsx
|
|
5384
5450
|
import { Typography as Typography18 } from "@mui/material";
|
|
5385
|
-
import { jsx as
|
|
5451
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
5386
5452
|
var Header2 = (props) => {
|
|
5387
5453
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
5388
|
-
return /* @__PURE__ */
|
|
5454
|
+
return /* @__PURE__ */ jsx78(Typography18, __spreadProps(__spreadValues({}, rest), { variant: "h4", children }));
|
|
5389
5455
|
};
|
|
5390
5456
|
var Subheader = (props) => {
|
|
5391
5457
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
5392
|
-
return /* @__PURE__ */
|
|
5458
|
+
return /* @__PURE__ */ jsx78(Typography18, __spreadProps(__spreadValues({}, rest), { variant: "h5", children }));
|
|
5393
5459
|
};
|
|
5394
5460
|
var Body = (props) => {
|
|
5395
5461
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
5396
|
-
return /* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsx78(Typography18, __spreadProps(__spreadValues({}, rest), { variant: "body2", children }));
|
|
5397
5463
|
};
|
|
5398
5464
|
|
|
5399
5465
|
// src/components/Form/Section.tsx
|
|
5400
5466
|
import { Card as Card3, CardContent as CardContent3, Stack as Stack3 } from "@mui/material";
|
|
5401
|
-
import { jsx as
|
|
5467
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
5402
5468
|
var Section = ({ children }) => {
|
|
5403
|
-
return /* @__PURE__ */
|
|
5469
|
+
return /* @__PURE__ */ jsx79(Card3, { children: /* @__PURE__ */ jsx79(CardContent3, { children: /* @__PURE__ */ jsx79(Stack3, { direction: "column", spacing: 2, children }) }) });
|
|
5404
5470
|
};
|
|
5405
5471
|
|
|
5406
5472
|
// src/components/Form/Wizard.tsx
|
|
@@ -5414,28 +5480,28 @@ import {
|
|
|
5414
5480
|
} from "@mui/material";
|
|
5415
5481
|
import { styled as styled61 } from "@mui/material/styles";
|
|
5416
5482
|
import { useMemo as useMemo5 } from "react";
|
|
5417
|
-
import { jsx as
|
|
5483
|
+
import { jsx as jsx80, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5418
5484
|
var StyledWizardActionsStack = styled61(Stack2)(() => ({
|
|
5419
5485
|
justifyContent: "space-between",
|
|
5420
5486
|
flexGrow: 1
|
|
5421
5487
|
}));
|
|
5422
5488
|
function Wizard({ steps, activeStep, actions }) {
|
|
5423
5489
|
const step = useMemo5(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
|
|
5424
|
-
return /* @__PURE__ */
|
|
5425
|
-
/* @__PURE__ */
|
|
5426
|
-
/* @__PURE__ */
|
|
5427
|
-
/* @__PURE__ */
|
|
5428
|
-
/* @__PURE__ */
|
|
5490
|
+
return /* @__PURE__ */ jsx80(Card4, { children: /* @__PURE__ */ jsx80(CardContent4, { children: /* @__PURE__ */ jsxs29(Stack2, { children: [
|
|
5491
|
+
/* @__PURE__ */ jsx80(Stepper, { activeStep, children: steps.map((step2) => /* @__PURE__ */ jsx80(Step, { children: /* @__PURE__ */ jsx80(StepLabel, { children: step2.label }) }, step2.label)) }),
|
|
5492
|
+
/* @__PURE__ */ jsx80(Divider10, {}),
|
|
5493
|
+
/* @__PURE__ */ jsx80(Stack2, { direction: "row", children: step == null ? void 0 : step.component }),
|
|
5494
|
+
/* @__PURE__ */ jsx80(StyledWizardActionsStack, { direction: "row", children: actions })
|
|
5429
5495
|
] }) }) });
|
|
5430
5496
|
}
|
|
5431
5497
|
|
|
5432
5498
|
// src/components/Form/ElementWrapper.tsx
|
|
5433
5499
|
import { FormControl as FormControl3, FormLabel } from "@mui/material";
|
|
5434
|
-
import { jsx as
|
|
5500
|
+
import { jsx as jsx81, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5435
5501
|
var ElementWrapper = (props) => {
|
|
5436
5502
|
const { label, name, children } = props;
|
|
5437
5503
|
return /* @__PURE__ */ jsxs30(FormControl3, { fullWidth: true, children: [
|
|
5438
|
-
/* @__PURE__ */
|
|
5504
|
+
/* @__PURE__ */ jsx81(FormLabel, { htmlFor: name, children: label }),
|
|
5439
5505
|
children
|
|
5440
5506
|
] });
|
|
5441
5507
|
};
|
|
@@ -5459,15 +5525,15 @@ var Form = {
|
|
|
5459
5525
|
};
|
|
5460
5526
|
|
|
5461
5527
|
// src/components/AppShell/AppShell.tsx
|
|
5462
|
-
import * as
|
|
5528
|
+
import * as React31 from "react";
|
|
5463
5529
|
import Box35 from "@mui/material/Box";
|
|
5464
5530
|
|
|
5465
5531
|
// src/layouts/Layout.tsx
|
|
5466
5532
|
import Box31 from "@mui/material/Box";
|
|
5467
|
-
import { jsx as
|
|
5533
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
5468
5534
|
function Layout(_a) {
|
|
5469
5535
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
5470
|
-
return /* @__PURE__ */
|
|
5536
|
+
return /* @__PURE__ */ jsx82(
|
|
5471
5537
|
Box31,
|
|
5472
5538
|
__spreadProps(__spreadValues({
|
|
5473
5539
|
sx: __spreadValues({
|
|
@@ -5484,10 +5550,10 @@ var Layout_default = Layout;
|
|
|
5484
5550
|
|
|
5485
5551
|
// src/layouts/LayoutSidebar.tsx
|
|
5486
5552
|
import Box32 from "@mui/material/Box";
|
|
5487
|
-
import { jsx as
|
|
5553
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
5488
5554
|
function LayoutSidebar(_a) {
|
|
5489
5555
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
5490
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsx83(
|
|
5491
5557
|
Box32,
|
|
5492
5558
|
__spreadProps(__spreadValues({
|
|
5493
5559
|
sx: __spreadValues({
|
|
@@ -5511,10 +5577,10 @@ var LayoutNavbar_default = LayoutNavbar;
|
|
|
5511
5577
|
|
|
5512
5578
|
// src/layouts/LayoutContent.tsx
|
|
5513
5579
|
import Box33 from "@mui/material/Box";
|
|
5514
|
-
import { jsx as
|
|
5580
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
5515
5581
|
function LayoutContent(_a) {
|
|
5516
5582
|
var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
|
|
5517
|
-
return /* @__PURE__ */
|
|
5583
|
+
return /* @__PURE__ */ jsx84(
|
|
5518
5584
|
Box33,
|
|
5519
5585
|
__spreadProps(__spreadValues({
|
|
5520
5586
|
component: "main",
|
|
@@ -5534,10 +5600,10 @@ var LayoutContent_default = LayoutContent;
|
|
|
5534
5600
|
|
|
5535
5601
|
// src/layouts/LayoutHeader.tsx
|
|
5536
5602
|
import Box34 from "@mui/material/Box";
|
|
5537
|
-
import { jsx as
|
|
5603
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
5538
5604
|
function LayoutHeader(_a) {
|
|
5539
5605
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
5540
|
-
return /* @__PURE__ */
|
|
5606
|
+
return /* @__PURE__ */ jsx85(
|
|
5541
5607
|
Box34,
|
|
5542
5608
|
__spreadProps(__spreadValues({
|
|
5543
5609
|
sx: __spreadValues({
|
|
@@ -5561,42 +5627,140 @@ var Layout2 = Object.assign(Layout_default, {
|
|
|
5561
5627
|
var layouts_default = Layout2;
|
|
5562
5628
|
|
|
5563
5629
|
// src/components/AppShell/AppShellNavbar.tsx
|
|
5564
|
-
import { Fragment as Fragment10, jsx as
|
|
5630
|
+
import { Fragment as Fragment10, jsx as jsx86 } from "react/jsx-runtime";
|
|
5565
5631
|
var AppShellNavbar = ({ children }) => {
|
|
5566
|
-
return /* @__PURE__ */
|
|
5632
|
+
return /* @__PURE__ */ jsx86(Fragment10, { children });
|
|
5567
5633
|
};
|
|
5568
5634
|
AppShellNavbar.displayName = "AppShellNavbar";
|
|
5569
5635
|
|
|
5570
5636
|
// src/components/AppShell/AppShellSidebar.tsx
|
|
5571
|
-
import { Fragment as Fragment11, jsx as
|
|
5637
|
+
import { Fragment as Fragment11, jsx as jsx87 } from "react/jsx-runtime";
|
|
5572
5638
|
var AppShellSidebar = ({ children }) => {
|
|
5573
|
-
return /* @__PURE__ */
|
|
5639
|
+
return /* @__PURE__ */ jsx87(Fragment11, { children });
|
|
5574
5640
|
};
|
|
5575
5641
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
5576
5642
|
|
|
5577
5643
|
// src/components/AppShell/AppShellMain.tsx
|
|
5578
|
-
import { Fragment as Fragment12, jsx as
|
|
5644
|
+
import { Fragment as Fragment12, jsx as jsx88 } from "react/jsx-runtime";
|
|
5579
5645
|
var AppShellMain = ({ children }) => {
|
|
5580
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ jsx88(Fragment12, { children });
|
|
5581
5647
|
};
|
|
5582
5648
|
AppShellMain.displayName = "AppShellMain";
|
|
5583
5649
|
|
|
5584
5650
|
// src/components/AppShell/AppShellFooter.tsx
|
|
5585
|
-
import { Fragment as Fragment13, jsx as
|
|
5651
|
+
import { Fragment as Fragment13, jsx as jsx89 } from "react/jsx-runtime";
|
|
5586
5652
|
var AppShellFooter = ({ children }) => {
|
|
5587
|
-
return /* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ jsx89(Fragment13, { children });
|
|
5588
5654
|
};
|
|
5589
5655
|
AppShellFooter.displayName = "AppShellFooter";
|
|
5590
5656
|
|
|
5591
5657
|
// src/components/AppShell/AppShellNotificationPanel.tsx
|
|
5592
|
-
import { Fragment as Fragment14, jsx as
|
|
5658
|
+
import { Fragment as Fragment14, jsx as jsx90 } from "react/jsx-runtime";
|
|
5593
5659
|
var AppShellNotificationPanel = ({ children }) => {
|
|
5594
|
-
return /* @__PURE__ */
|
|
5660
|
+
return /* @__PURE__ */ jsx90(Fragment14, { children });
|
|
5595
5661
|
};
|
|
5596
5662
|
AppShellNotificationPanel.displayName = "AppShellNotificationPanel";
|
|
5597
5663
|
|
|
5664
|
+
// src/hooks/useAppShell/useAppShell.ts
|
|
5665
|
+
import * as React30 from "react";
|
|
5666
|
+
import useMediaQuery2 from "@mui/material/useMediaQuery";
|
|
5667
|
+
var useAppShell = (options) => {
|
|
5668
|
+
const contextValue = React30.useContext(AppShellContext);
|
|
5669
|
+
const {
|
|
5670
|
+
initialCollapsed = false,
|
|
5671
|
+
initialActiveItem = "dashboard",
|
|
5672
|
+
collapseOnSelectOnMobile = true,
|
|
5673
|
+
collapseOnMobile = true,
|
|
5674
|
+
sidebarWidth = 250,
|
|
5675
|
+
sidebarCollapsedWidth = 64
|
|
5676
|
+
} = options || {};
|
|
5677
|
+
const isMobile = useMediaQuery2((theme) => theme.breakpoints.down("md"));
|
|
5678
|
+
const [state, setState] = React30.useState({
|
|
5679
|
+
sidebarCollapsed: initialCollapsed,
|
|
5680
|
+
notificationPanelOpen: false,
|
|
5681
|
+
activeMenuItem: initialActiveItem,
|
|
5682
|
+
expandedMenus: {},
|
|
5683
|
+
sidebarWidth,
|
|
5684
|
+
sidebarCollapsedWidth
|
|
5685
|
+
});
|
|
5686
|
+
React30.useEffect(() => {
|
|
5687
|
+
if (options && collapseOnMobile && isMobile) {
|
|
5688
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
5689
|
+
}
|
|
5690
|
+
}, [options, collapseOnMobile, isMobile]);
|
|
5691
|
+
const toggleSidebar = React30.useCallback(() => {
|
|
5692
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
|
|
5693
|
+
}, []);
|
|
5694
|
+
const setSidebarCollapsed = React30.useCallback((collapsed) => {
|
|
5695
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: collapsed }));
|
|
5696
|
+
}, []);
|
|
5697
|
+
const collapseSidebar = React30.useCallback(() => {
|
|
5698
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
5699
|
+
}, []);
|
|
5700
|
+
const expandSidebar = React30.useCallback(() => {
|
|
5701
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: false }));
|
|
5702
|
+
}, []);
|
|
5703
|
+
const toggleNotificationPanel = React30.useCallback(() => {
|
|
5704
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
5705
|
+
notificationPanelOpen: !prev.notificationPanelOpen
|
|
5706
|
+
}));
|
|
5707
|
+
}, []);
|
|
5708
|
+
const setActiveMenuItem = React30.useCallback((id) => {
|
|
5709
|
+
setState((prev) => {
|
|
5710
|
+
const newState = __spreadProps(__spreadValues({}, prev), { activeMenuItem: id });
|
|
5711
|
+
if (collapseOnSelectOnMobile && isMobile && !prev.sidebarCollapsed) {
|
|
5712
|
+
newState.sidebarCollapsed = true;
|
|
5713
|
+
}
|
|
5714
|
+
return newState;
|
|
5715
|
+
});
|
|
5716
|
+
}, [collapseOnSelectOnMobile, isMobile]);
|
|
5717
|
+
const toggleMenu = React30.useCallback((id) => {
|
|
5718
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
5719
|
+
expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
|
|
5720
|
+
[id]: !prev.expandedMenus[id]
|
|
5721
|
+
})
|
|
5722
|
+
}));
|
|
5723
|
+
}, []);
|
|
5724
|
+
const actions = React30.useMemo(
|
|
5725
|
+
() => ({
|
|
5726
|
+
toggleSidebar,
|
|
5727
|
+
setSidebarCollapsed,
|
|
5728
|
+
collapseSidebar,
|
|
5729
|
+
expandSidebar,
|
|
5730
|
+
toggleNotificationPanel,
|
|
5731
|
+
setActiveMenuItem,
|
|
5732
|
+
toggleMenu
|
|
5733
|
+
}),
|
|
5734
|
+
[
|
|
5735
|
+
toggleSidebar,
|
|
5736
|
+
setSidebarCollapsed,
|
|
5737
|
+
collapseSidebar,
|
|
5738
|
+
expandSidebar,
|
|
5739
|
+
toggleNotificationPanel,
|
|
5740
|
+
setActiveMenuItem,
|
|
5741
|
+
toggleMenu
|
|
5742
|
+
]
|
|
5743
|
+
);
|
|
5744
|
+
const createdValue = React30.useMemo(
|
|
5745
|
+
() => ({
|
|
5746
|
+
state,
|
|
5747
|
+
actions
|
|
5748
|
+
}),
|
|
5749
|
+
[state, actions]
|
|
5750
|
+
);
|
|
5751
|
+
if (options === void 0) {
|
|
5752
|
+
if (!contextValue) {
|
|
5753
|
+
throw new Error(
|
|
5754
|
+
"useAppShell() must be used within an <AppShell> component. Either wrap your component tree with <AppShell> or pass options to create a new instance.\n\nExample usage:\n// As a child of AppShell (consumes context):\nfunction MyPage() {\n const { state, actions } = useAppShell();\n // ...\n}\n\n// Or create instance with options:\nconst shell = useAppShell({ initialCollapsed: false });"
|
|
5755
|
+
);
|
|
5756
|
+
}
|
|
5757
|
+
return contextValue;
|
|
5758
|
+
}
|
|
5759
|
+
return createdValue;
|
|
5760
|
+
};
|
|
5761
|
+
|
|
5598
5762
|
// src/components/AppShell/AppShell.tsx
|
|
5599
|
-
import { jsx as
|
|
5763
|
+
import { jsx as jsx91, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5600
5764
|
var SLOT_DISPLAY_NAMES = {
|
|
5601
5765
|
Navbar: "AppShellNavbar",
|
|
5602
5766
|
Sidebar: "AppShellSidebar",
|
|
@@ -5612,9 +5776,9 @@ var extractSlots = (children) => {
|
|
|
5612
5776
|
footer: null,
|
|
5613
5777
|
notificationPanel: null
|
|
5614
5778
|
};
|
|
5615
|
-
|
|
5779
|
+
React31.Children.forEach(children, (child) => {
|
|
5616
5780
|
var _a;
|
|
5617
|
-
if (
|
|
5781
|
+
if (React31.isValidElement(child)) {
|
|
5618
5782
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5619
5783
|
const childProps = child.props;
|
|
5620
5784
|
switch (displayName) {
|
|
@@ -5642,19 +5806,21 @@ var extractSlots = (children) => {
|
|
|
5642
5806
|
});
|
|
5643
5807
|
return slots;
|
|
5644
5808
|
};
|
|
5645
|
-
var AppShell = (
|
|
5809
|
+
var AppShell = (_a) => {
|
|
5810
|
+
var _b = _a, { children, sx } = _b, shellOptions = __objRest(_b, ["children", "sx"]);
|
|
5811
|
+
const shell = useAppShell(shellOptions);
|
|
5646
5812
|
const slots = extractSlots(children);
|
|
5647
|
-
return /* @__PURE__ */ jsxs31(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
|
|
5648
|
-
slots.navbar && /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsx91(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs31(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
|
|
5814
|
+
slots.navbar && /* @__PURE__ */ jsx91(layouts_default.Navbar, { children: slots.navbar }),
|
|
5649
5815
|
/* @__PURE__ */ jsxs31(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
|
|
5650
|
-
slots.sidebar && /* @__PURE__ */
|
|
5816
|
+
slots.sidebar && /* @__PURE__ */ jsx91(layouts_default.Sidebar, { children: slots.sidebar }),
|
|
5651
5817
|
/* @__PURE__ */ jsxs31(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column" }, children: [
|
|
5652
|
-
/* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ jsx91(Box35, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
|
|
5653
5819
|
slots.footer
|
|
5654
5820
|
] })
|
|
5655
5821
|
] }),
|
|
5656
5822
|
slots.notificationPanel
|
|
5657
|
-
] });
|
|
5823
|
+
] }) });
|
|
5658
5824
|
};
|
|
5659
5825
|
AppShell.Navbar = AppShellNavbar;
|
|
5660
5826
|
AppShell.Sidebar = AppShellSidebar;
|
|
@@ -5677,7 +5843,7 @@ var densityStyles = {
|
|
|
5677
5843
|
// src/components/ListingTable/ListingTable/ListingTableContainer.tsx
|
|
5678
5844
|
import MuiTableContainer from "@mui/material/TableContainer";
|
|
5679
5845
|
import Paper from "@mui/material/Paper";
|
|
5680
|
-
import { jsx as
|
|
5846
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5681
5847
|
function ListingTableContainer(_a) {
|
|
5682
5848
|
var _b = _a, {
|
|
5683
5849
|
elevation = 1,
|
|
@@ -5689,16 +5855,16 @@ function ListingTableContainer(_a) {
|
|
|
5689
5855
|
"children"
|
|
5690
5856
|
]);
|
|
5691
5857
|
if (disablePaper) {
|
|
5692
|
-
return /* @__PURE__ */
|
|
5858
|
+
return /* @__PURE__ */ jsx92(MuiTableContainer, __spreadProps(__spreadValues({ sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
5693
5859
|
}
|
|
5694
|
-
return /* @__PURE__ */
|
|
5860
|
+
return /* @__PURE__ */ jsx92(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
5695
5861
|
}
|
|
5696
5862
|
var ListingTableContainer_default = ListingTableContainer;
|
|
5697
5863
|
|
|
5698
5864
|
// src/components/ListingTable/ListingTable/ListingTableHead.tsx
|
|
5699
5865
|
import MuiTableHead from "@mui/material/TableHead";
|
|
5700
5866
|
import { styled as styled62 } from "@mui/material/styles";
|
|
5701
|
-
import { jsx as
|
|
5867
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
5702
5868
|
var StyledTableHead = styled62(MuiTableHead)(({ theme }) => ({
|
|
5703
5869
|
"& .MuiTableCell-head": __spreadValues(__spreadValues({
|
|
5704
5870
|
fontWeight: 600
|
|
@@ -5710,32 +5876,32 @@ var StyledTableHead = styled62(MuiTableHead)(({ theme }) => ({
|
|
|
5710
5876
|
}));
|
|
5711
5877
|
function ListingTableHead(_a) {
|
|
5712
5878
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5713
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ jsx93(StyledTableHead, __spreadProps(__spreadValues({}, props), { children }));
|
|
5714
5880
|
}
|
|
5715
5881
|
var ListingTableHead_default = ListingTableHead;
|
|
5716
5882
|
|
|
5717
5883
|
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
5718
5884
|
import MuiTableBody from "@mui/material/TableBody";
|
|
5719
|
-
import { jsx as
|
|
5885
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
5720
5886
|
function ListingTableBody(_a) {
|
|
5721
5887
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5722
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsx94(MuiTableBody, __spreadProps(__spreadValues({}, props), { children }));
|
|
5723
5889
|
}
|
|
5724
5890
|
var ListingTableBody_default = ListingTableBody;
|
|
5725
5891
|
|
|
5726
5892
|
// src/components/ListingTable/ListingTable/ListingTableFooter.tsx
|
|
5727
5893
|
import MuiTableFooter from "@mui/material/TableFooter";
|
|
5728
|
-
import { jsx as
|
|
5894
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
5729
5895
|
function ListingTableFooter(_a) {
|
|
5730
5896
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
5731
|
-
return /* @__PURE__ */
|
|
5897
|
+
return /* @__PURE__ */ jsx95(MuiTableFooter, __spreadProps(__spreadValues({}, props), { children }));
|
|
5732
5898
|
}
|
|
5733
5899
|
var ListingTableFooter_default = ListingTableFooter;
|
|
5734
5900
|
|
|
5735
5901
|
// src/components/ListingTable/ListingTable/ListingTableRow.tsx
|
|
5736
5902
|
import MuiTableRow from "@mui/material/TableRow";
|
|
5737
5903
|
import { styled as styled63, alpha } from "@mui/material/styles";
|
|
5738
|
-
import { jsx as
|
|
5904
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5739
5905
|
var StyledTableRow = styled63(MuiTableRow, {
|
|
5740
5906
|
shouldForwardProp: (prop) => !["clickable", "variant"].includes(prop)
|
|
5741
5907
|
})(({ theme: muiTheme, clickable, variant = "table" }) => {
|
|
@@ -5794,14 +5960,14 @@ function ListingTableRow(_a) {
|
|
|
5794
5960
|
"variant",
|
|
5795
5961
|
"children"
|
|
5796
5962
|
]);
|
|
5797
|
-
return /* @__PURE__ */
|
|
5963
|
+
return /* @__PURE__ */ jsx96(StyledTableRow, __spreadProps(__spreadValues({ clickable, variant }, props), { children }));
|
|
5798
5964
|
}
|
|
5799
5965
|
var ListingTableRow_default = ListingTableRow;
|
|
5800
5966
|
|
|
5801
5967
|
// src/components/ListingTable/ListingTable/ListingTableCell.tsx
|
|
5802
5968
|
import MuiTableCell from "@mui/material/TableCell";
|
|
5803
5969
|
import { styled as styled64 } from "@mui/material/styles";
|
|
5804
|
-
import { jsx as
|
|
5970
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
5805
5971
|
var StyledTableCell = styled64(MuiTableCell, {
|
|
5806
5972
|
shouldForwardProp: (prop) => {
|
|
5807
5973
|
const excludedProps = ["truncate", "maxWidth"];
|
|
@@ -5824,12 +5990,12 @@ function ListingTableCell(_a) {
|
|
|
5824
5990
|
"maxWidth",
|
|
5825
5991
|
"children"
|
|
5826
5992
|
]);
|
|
5827
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsx97(StyledTableCell, __spreadProps(__spreadValues({ truncate, maxWidth }, props), { children }));
|
|
5828
5994
|
}
|
|
5829
5995
|
var ListingTableCell_default = ListingTableCell;
|
|
5830
5996
|
|
|
5831
5997
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
5832
|
-
import { useState as
|
|
5998
|
+
import { useState as useState7, useCallback as useCallback2 } from "react";
|
|
5833
5999
|
import Box36 from "@mui/material/Box";
|
|
5834
6000
|
import TextField3 from "@mui/material/TextField";
|
|
5835
6001
|
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
@@ -5837,14 +6003,14 @@ import IconButton7 from "@mui/material/IconButton";
|
|
|
5837
6003
|
import { Search as Search3, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
5838
6004
|
|
|
5839
6005
|
// src/components/ListingTable/context.ts
|
|
5840
|
-
import * as
|
|
5841
|
-
var ListingTableContext =
|
|
6006
|
+
import * as React32 from "react";
|
|
6007
|
+
var ListingTableContext = React32.createContext(null);
|
|
5842
6008
|
ListingTableContext.displayName = "ListingTableContext";
|
|
5843
6009
|
var useListingTable = () => {
|
|
5844
|
-
return
|
|
6010
|
+
return React32.useContext(ListingTableContext);
|
|
5845
6011
|
};
|
|
5846
6012
|
var useListingTableRequired = () => {
|
|
5847
|
-
const context =
|
|
6013
|
+
const context = React32.useContext(ListingTableContext);
|
|
5848
6014
|
if (!context) {
|
|
5849
6015
|
throw new Error(
|
|
5850
6016
|
"useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
|
|
@@ -5854,7 +6020,7 @@ var useListingTableRequired = () => {
|
|
|
5854
6020
|
};
|
|
5855
6021
|
|
|
5856
6022
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
5857
|
-
import { Fragment as Fragment15, jsx as
|
|
6023
|
+
import { Fragment as Fragment15, jsx as jsx98, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5858
6024
|
function ListingTableToolbar({
|
|
5859
6025
|
showSearch = false,
|
|
5860
6026
|
searchSlot,
|
|
@@ -5868,13 +6034,13 @@ function ListingTableToolbar({
|
|
|
5868
6034
|
sx
|
|
5869
6035
|
}) {
|
|
5870
6036
|
const tableContext = useListingTable();
|
|
5871
|
-
const [internalSearchValue, setInternalSearchValue] =
|
|
6037
|
+
const [internalSearchValue, setInternalSearchValue] = useState7("");
|
|
5872
6038
|
const isControlledByProp = controlledSearchValue !== void 0;
|
|
5873
6039
|
const isControlledByContext = !isControlledByProp && (tableContext == null ? void 0 : tableContext.searchValue) !== void 0;
|
|
5874
6040
|
const isControlled = isControlledByProp || isControlledByContext;
|
|
5875
6041
|
const searchValue = isControlledByProp ? controlledSearchValue : isControlledByContext ? tableContext.searchValue : internalSearchValue;
|
|
5876
6042
|
const effectiveOnSearchChange = onSearchChange != null ? onSearchChange : tableContext == null ? void 0 : tableContext.onSearchChange;
|
|
5877
|
-
const handleSearchChange =
|
|
6043
|
+
const handleSearchChange = useCallback2(
|
|
5878
6044
|
(event) => {
|
|
5879
6045
|
const newValue = event.target.value;
|
|
5880
6046
|
if (!isControlled) {
|
|
@@ -5884,7 +6050,7 @@ function ListingTableToolbar({
|
|
|
5884
6050
|
},
|
|
5885
6051
|
[isControlled, effectiveOnSearchChange]
|
|
5886
6052
|
);
|
|
5887
|
-
const handleClearSearch =
|
|
6053
|
+
const handleClearSearch = useCallback2(() => {
|
|
5888
6054
|
if (!isControlled) {
|
|
5889
6055
|
setInternalSearchValue("");
|
|
5890
6056
|
}
|
|
@@ -5895,7 +6061,7 @@ function ListingTableToolbar({
|
|
|
5895
6061
|
return searchSlot;
|
|
5896
6062
|
}
|
|
5897
6063
|
if (showSearch) {
|
|
5898
|
-
return /* @__PURE__ */
|
|
6064
|
+
return /* @__PURE__ */ jsx98(
|
|
5899
6065
|
TextField3,
|
|
5900
6066
|
{
|
|
5901
6067
|
size: "small",
|
|
@@ -5907,8 +6073,8 @@ function ListingTableToolbar({
|
|
|
5907
6073
|
maxWidth: searchMaxWidth
|
|
5908
6074
|
},
|
|
5909
6075
|
InputProps: {
|
|
5910
|
-
startAdornment: /* @__PURE__ */
|
|
5911
|
-
endAdornment: searchValue ? /* @__PURE__ */
|
|
6076
|
+
startAdornment: /* @__PURE__ */ jsx98(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx98(Search3, { size: 18 }) }),
|
|
6077
|
+
endAdornment: searchValue ? /* @__PURE__ */ jsx98(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx98(IconButton7, { size: "small", onClick: handleClearSearch, edge: "end", children: /* @__PURE__ */ jsx98(X4, { size: 16 }) }) }) : null
|
|
5912
6078
|
}
|
|
5913
6079
|
}
|
|
5914
6080
|
);
|
|
@@ -5930,8 +6096,8 @@ function ListingTableToolbar({
|
|
|
5930
6096
|
renderSearch(),
|
|
5931
6097
|
children,
|
|
5932
6098
|
actions && /* @__PURE__ */ jsxs32(Fragment15, { children: [
|
|
5933
|
-
/* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
6099
|
+
/* @__PURE__ */ jsx98(Box36, { sx: { flex: 1 } }),
|
|
6100
|
+
/* @__PURE__ */ jsx98(Box36, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
5935
6101
|
] })
|
|
5936
6102
|
]
|
|
5937
6103
|
}
|
|
@@ -5942,7 +6108,7 @@ var ListingTableToolbar_default = ListingTableToolbar;
|
|
|
5942
6108
|
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
5943
6109
|
import Box37 from "@mui/material/Box";
|
|
5944
6110
|
import Typography19 from "@mui/material/Typography";
|
|
5945
|
-
import { jsx as
|
|
6111
|
+
import { jsx as jsx99, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5946
6112
|
function ListingTableEmptyState({
|
|
5947
6113
|
title = "No data available",
|
|
5948
6114
|
description,
|
|
@@ -5964,7 +6130,7 @@ function ListingTableEmptyState({
|
|
|
5964
6130
|
textAlign: "center"
|
|
5965
6131
|
}, sx),
|
|
5966
6132
|
children: [
|
|
5967
|
-
illustration && /* @__PURE__ */
|
|
6133
|
+
illustration && /* @__PURE__ */ jsx99(
|
|
5968
6134
|
Box37,
|
|
5969
6135
|
{
|
|
5970
6136
|
sx: {
|
|
@@ -5978,9 +6144,9 @@ function ListingTableEmptyState({
|
|
|
5978
6144
|
children: illustration
|
|
5979
6145
|
}
|
|
5980
6146
|
),
|
|
5981
|
-
/* @__PURE__ */
|
|
5982
|
-
description && /* @__PURE__ */
|
|
5983
|
-
action && /* @__PURE__ */
|
|
6147
|
+
/* @__PURE__ */ jsx99(Typography19, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
6148
|
+
description && /* @__PURE__ */ jsx99(Typography19, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
6149
|
+
action && /* @__PURE__ */ jsx99(Box37, { children: action })
|
|
5984
6150
|
]
|
|
5985
6151
|
}
|
|
5986
6152
|
);
|
|
@@ -5988,16 +6154,16 @@ function ListingTableEmptyState({
|
|
|
5988
6154
|
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
5989
6155
|
|
|
5990
6156
|
// src/components/ListingTable/shared/ListingTableDensityControl.tsx
|
|
5991
|
-
import { useCallback as
|
|
6157
|
+
import { useCallback as useCallback3 } from "react";
|
|
5992
6158
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
5993
6159
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
5994
6160
|
import Tooltip6 from "@mui/material/Tooltip";
|
|
5995
6161
|
import { AlignJustify, Menu as Menu3, List as List4 } from "@wso2/oxygen-ui-icons-react";
|
|
5996
|
-
import { jsx as
|
|
6162
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
5997
6163
|
var densityOptions = [
|
|
5998
|
-
{ value: "compact", label: "Compact", icon: /* @__PURE__ */
|
|
5999
|
-
{ value: "standard", label: "Standard", icon: /* @__PURE__ */
|
|
6000
|
-
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */
|
|
6164
|
+
{ value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx100(AlignJustify, { size: 18 }) },
|
|
6165
|
+
{ value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx100(Menu3, { size: 18 }) },
|
|
6166
|
+
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx100(List4, { size: 18 }) }
|
|
6001
6167
|
];
|
|
6002
6168
|
function ListingTableDensityControl({
|
|
6003
6169
|
value: valueProp,
|
|
@@ -6009,7 +6175,7 @@ function ListingTableDensityControl({
|
|
|
6009
6175
|
const tableContext = useListingTable();
|
|
6010
6176
|
const value = (_a = valueProp != null ? valueProp : tableContext == null ? void 0 : tableContext.density) != null ? _a : "standard";
|
|
6011
6177
|
const effectiveOnChange = onChangeProp != null ? onChangeProp : tableContext == null ? void 0 : tableContext.onDensityChange;
|
|
6012
|
-
const handleChange =
|
|
6178
|
+
const handleChange = useCallback3(
|
|
6013
6179
|
(_event, newDensity) => {
|
|
6014
6180
|
if (newDensity !== null) {
|
|
6015
6181
|
effectiveOnChange == null ? void 0 : effectiveOnChange(newDensity);
|
|
@@ -6017,15 +6183,15 @@ function ListingTableDensityControl({
|
|
|
6017
6183
|
},
|
|
6018
6184
|
[effectiveOnChange]
|
|
6019
6185
|
);
|
|
6020
|
-
return /* @__PURE__ */
|
|
6186
|
+
return /* @__PURE__ */ jsx100(ToggleButtonGroup, { value, exclusive: true, onChange: handleChange, size, sx, children: densityOptions.map((option) => /* @__PURE__ */ jsx100(ToggleButton, { value: option.value, children: /* @__PURE__ */ jsx100(Tooltip6, { title: option.label, children: /* @__PURE__ */ jsx100("span", { style: { display: "flex", alignItems: "center" }, children: option.icon }) }) }, option.value)) });
|
|
6021
6187
|
}
|
|
6022
6188
|
var ListingTableDensityControl_default = ListingTableDensityControl;
|
|
6023
6189
|
|
|
6024
6190
|
// src/components/ListingTable/shared/ListingTableSortLabel.tsx
|
|
6025
|
-
import { useCallback as
|
|
6191
|
+
import { useCallback as useCallback4 } from "react";
|
|
6026
6192
|
import MuiTableSortLabel from "@mui/material/TableSortLabel";
|
|
6027
6193
|
import { styled as styled65 } from "@mui/material/styles";
|
|
6028
|
-
import { jsx as
|
|
6194
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
6029
6195
|
var StyledTableSortLabel = styled65(MuiTableSortLabel)(({ theme }) => ({
|
|
6030
6196
|
color: "inherit !important",
|
|
6031
6197
|
"&.Mui-active": {
|
|
@@ -6056,7 +6222,7 @@ function ListingTableSortLabel(_a) {
|
|
|
6056
6222
|
const isActiveFromContext = field !== void 0 && (tableContext == null ? void 0 : tableContext.sortField) === field;
|
|
6057
6223
|
const active = activeProp != null ? activeProp : isActiveFromContext;
|
|
6058
6224
|
const direction = (_a2 = directionProp != null ? directionProp : isActiveFromContext ? tableContext == null ? void 0 : tableContext.sortDirection : void 0) != null ? _a2 : "asc";
|
|
6059
|
-
const handleClick =
|
|
6225
|
+
const handleClick = useCallback4(
|
|
6060
6226
|
(event) => {
|
|
6061
6227
|
if (onClickProp) {
|
|
6062
6228
|
onClickProp(event);
|
|
@@ -6069,13 +6235,13 @@ function ListingTableSortLabel(_a) {
|
|
|
6069
6235
|
},
|
|
6070
6236
|
[onClickProp, field, tableContext, active, direction]
|
|
6071
6237
|
);
|
|
6072
|
-
return /* @__PURE__ */
|
|
6238
|
+
return /* @__PURE__ */ jsx101(StyledTableSortLabel, __spreadProps(__spreadValues({ active, direction, onClick: handleClick, hideSortIcon }, props), { children }));
|
|
6073
6239
|
}
|
|
6074
6240
|
var ListingTableSortLabel_default = ListingTableSortLabel;
|
|
6075
6241
|
|
|
6076
6242
|
// src/components/ListingTable/shared/ListingTableRowActions.tsx
|
|
6077
6243
|
import Box38 from "@mui/material/Box";
|
|
6078
|
-
import { jsx as
|
|
6244
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
6079
6245
|
var alignmentMap = {
|
|
6080
6246
|
left: "flex-start",
|
|
6081
6247
|
center: "center",
|
|
@@ -6087,7 +6253,7 @@ function ListingTableRowActions({
|
|
|
6087
6253
|
align = "right",
|
|
6088
6254
|
sx
|
|
6089
6255
|
}) {
|
|
6090
|
-
return /* @__PURE__ */
|
|
6256
|
+
return /* @__PURE__ */ jsx102(
|
|
6091
6257
|
Box38,
|
|
6092
6258
|
{
|
|
6093
6259
|
className: "table-row-actions",
|
|
@@ -6113,7 +6279,7 @@ var ListingTableRowActions_default = ListingTableRowActions;
|
|
|
6113
6279
|
// src/components/ListingTable/shared/ListingTableCellIcon.tsx
|
|
6114
6280
|
import Box39 from "@mui/material/Box";
|
|
6115
6281
|
import Typography20 from "@mui/material/Typography";
|
|
6116
|
-
import { Fragment as Fragment16, jsx as
|
|
6282
|
+
import { Fragment as Fragment16, jsx as jsx103, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6117
6283
|
function ListingTableCellIcon({
|
|
6118
6284
|
icon,
|
|
6119
6285
|
primary,
|
|
@@ -6122,7 +6288,7 @@ function ListingTableCellIcon({
|
|
|
6122
6288
|
iconSx,
|
|
6123
6289
|
sx
|
|
6124
6290
|
}) {
|
|
6125
|
-
const iconElement = /* @__PURE__ */
|
|
6291
|
+
const iconElement = /* @__PURE__ */ jsx103(
|
|
6126
6292
|
Box39,
|
|
6127
6293
|
{
|
|
6128
6294
|
sx: __spreadValues({
|
|
@@ -6136,7 +6302,7 @@ function ListingTableCellIcon({
|
|
|
6136
6302
|
}
|
|
6137
6303
|
);
|
|
6138
6304
|
const textContent = /* @__PURE__ */ jsxs34(Box39, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
6139
|
-
/* @__PURE__ */
|
|
6305
|
+
/* @__PURE__ */ jsx103(
|
|
6140
6306
|
Typography20,
|
|
6141
6307
|
{
|
|
6142
6308
|
variant: "body2",
|
|
@@ -6150,7 +6316,7 @@ function ListingTableCellIcon({
|
|
|
6150
6316
|
children: primary
|
|
6151
6317
|
}
|
|
6152
6318
|
),
|
|
6153
|
-
secondary && /* @__PURE__ */
|
|
6319
|
+
secondary && /* @__PURE__ */ jsx103(
|
|
6154
6320
|
Typography20,
|
|
6155
6321
|
{
|
|
6156
6322
|
variant: "caption",
|
|
@@ -6165,7 +6331,7 @@ function ListingTableCellIcon({
|
|
|
6165
6331
|
}
|
|
6166
6332
|
)
|
|
6167
6333
|
] });
|
|
6168
|
-
return /* @__PURE__ */
|
|
6334
|
+
return /* @__PURE__ */ jsx103(
|
|
6169
6335
|
Box39,
|
|
6170
6336
|
{
|
|
6171
6337
|
sx: __spreadValues({
|
|
@@ -6187,8 +6353,8 @@ function ListingTableCellIcon({
|
|
|
6187
6353
|
var ListingTableCellIcon_default = ListingTableCellIcon;
|
|
6188
6354
|
|
|
6189
6355
|
// src/components/ListingTable/ListingTableProvider.tsx
|
|
6190
|
-
import { useMemo as
|
|
6191
|
-
import { jsx as
|
|
6356
|
+
import { useMemo as useMemo7 } from "react";
|
|
6357
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
6192
6358
|
function ListingTableProvider({
|
|
6193
6359
|
children,
|
|
6194
6360
|
// Search
|
|
@@ -6226,7 +6392,7 @@ function ListingTableProvider({
|
|
|
6226
6392
|
// Loading
|
|
6227
6393
|
loading
|
|
6228
6394
|
}) {
|
|
6229
|
-
const contextValue =
|
|
6395
|
+
const contextValue = useMemo7(
|
|
6230
6396
|
() => ({
|
|
6231
6397
|
// Search
|
|
6232
6398
|
searchValue,
|
|
@@ -6291,11 +6457,11 @@ function ListingTableProvider({
|
|
|
6291
6457
|
loading
|
|
6292
6458
|
]
|
|
6293
6459
|
);
|
|
6294
|
-
return /* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx104(ListingTableContext.Provider, { value: contextValue, children });
|
|
6295
6461
|
}
|
|
6296
6462
|
|
|
6297
6463
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
6298
|
-
import { jsx as
|
|
6464
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
6299
6465
|
var StyledTable = styled66(MuiTable, {
|
|
6300
6466
|
shouldForwardProp: (prop) => {
|
|
6301
6467
|
const excludedProps = ["variant", "density", "striped", "bordered"];
|
|
@@ -6349,7 +6515,7 @@ function ListingTable(_a) {
|
|
|
6349
6515
|
"children",
|
|
6350
6516
|
"sx"
|
|
6351
6517
|
]);
|
|
6352
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ jsx105(
|
|
6353
6519
|
StyledTable,
|
|
6354
6520
|
__spreadProps(__spreadValues({
|
|
6355
6521
|
variant,
|
|
@@ -6380,9 +6546,9 @@ var ListingTableCompound = Object.assign(ListingTable, {
|
|
|
6380
6546
|
var ListingTable_default = ListingTableCompound;
|
|
6381
6547
|
|
|
6382
6548
|
// src/animations/ParticleBackground/ParticleBackground.tsx
|
|
6383
|
-
import { useEffect as
|
|
6549
|
+
import { useEffect as useEffect5, useRef } from "react";
|
|
6384
6550
|
import { useColorScheme as useColorScheme3 } from "@mui/material/styles";
|
|
6385
|
-
import { jsx as
|
|
6551
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
6386
6552
|
var ParticleBackground = ({
|
|
6387
6553
|
opacity = 0.5,
|
|
6388
6554
|
baseDensity = 0.12,
|
|
@@ -6396,7 +6562,7 @@ var ParticleBackground = ({
|
|
|
6396
6562
|
}) => {
|
|
6397
6563
|
const canvasRef = useRef(null);
|
|
6398
6564
|
const { mode } = useColorScheme3();
|
|
6399
|
-
|
|
6565
|
+
useEffect5(() => {
|
|
6400
6566
|
const canvas = canvasRef.current;
|
|
6401
6567
|
if (!canvas) return;
|
|
6402
6568
|
const ctx = canvas.getContext("2d", { alpha: true });
|
|
@@ -6567,7 +6733,7 @@ var ParticleBackground = ({
|
|
|
6567
6733
|
cancelAnimationFrame(animationFrameId);
|
|
6568
6734
|
};
|
|
6569
6735
|
}, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
|
|
6570
|
-
return /* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ jsx106(
|
|
6571
6737
|
"canvas",
|
|
6572
6738
|
{
|
|
6573
6739
|
ref: canvasRef,
|
|
@@ -6594,96 +6760,45 @@ function useThemeContent(contentMap, fallback) {
|
|
|
6594
6760
|
}
|
|
6595
6761
|
var useThemeContent_default = useThemeContent;
|
|
6596
6762
|
|
|
6597
|
-
// src/hooks/useAppShell/useAppShell.ts
|
|
6598
|
-
import * as React30 from "react";
|
|
6599
|
-
var useAppShell = (options = {}) => {
|
|
6600
|
-
const {
|
|
6601
|
-
initialCollapsed = false,
|
|
6602
|
-
initialActiveItem = "dashboard"
|
|
6603
|
-
} = options;
|
|
6604
|
-
const [state, setState] = React30.useState({
|
|
6605
|
-
sidebarCollapsed: initialCollapsed,
|
|
6606
|
-
notificationPanelOpen: false,
|
|
6607
|
-
activeMenuItem: initialActiveItem,
|
|
6608
|
-
expandedMenus: {}
|
|
6609
|
-
});
|
|
6610
|
-
const toggleSidebar = React30.useCallback(() => {
|
|
6611
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
|
|
6612
|
-
}, []);
|
|
6613
|
-
const toggleNotificationPanel = React30.useCallback(() => {
|
|
6614
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6615
|
-
notificationPanelOpen: !prev.notificationPanelOpen
|
|
6616
|
-
}));
|
|
6617
|
-
}, []);
|
|
6618
|
-
const setActiveMenuItem = React30.useCallback((id) => {
|
|
6619
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), { activeMenuItem: id }));
|
|
6620
|
-
}, []);
|
|
6621
|
-
const toggleMenu = React30.useCallback((id) => {
|
|
6622
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6623
|
-
expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
|
|
6624
|
-
[id]: !prev.expandedMenus[id]
|
|
6625
|
-
})
|
|
6626
|
-
}));
|
|
6627
|
-
}, []);
|
|
6628
|
-
const actions = React30.useMemo(
|
|
6629
|
-
() => ({
|
|
6630
|
-
toggleSidebar,
|
|
6631
|
-
toggleNotificationPanel,
|
|
6632
|
-
setActiveMenuItem,
|
|
6633
|
-
toggleMenu
|
|
6634
|
-
}),
|
|
6635
|
-
[
|
|
6636
|
-
toggleSidebar,
|
|
6637
|
-
toggleNotificationPanel,
|
|
6638
|
-
setActiveMenuItem,
|
|
6639
|
-
toggleMenu
|
|
6640
|
-
]
|
|
6641
|
-
);
|
|
6642
|
-
return {
|
|
6643
|
-
state,
|
|
6644
|
-
actions
|
|
6645
|
-
};
|
|
6646
|
-
};
|
|
6647
|
-
|
|
6648
6763
|
// src/hooks/useNotifications/useNotifications.ts
|
|
6649
|
-
import * as
|
|
6764
|
+
import * as React33 from "react";
|
|
6650
6765
|
var generateId = () => {
|
|
6651
6766
|
return `notif-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
6652
6767
|
};
|
|
6653
6768
|
var useNotifications = (options = {}) => {
|
|
6654
6769
|
const { initialNotifications = [] } = options;
|
|
6655
|
-
const [notifications, setNotifications] =
|
|
6770
|
+
const [notifications, setNotifications] = React33.useState(
|
|
6656
6771
|
initialNotifications
|
|
6657
6772
|
);
|
|
6658
|
-
const markRead =
|
|
6773
|
+
const markRead = React33.useCallback((id) => {
|
|
6659
6774
|
setNotifications(
|
|
6660
6775
|
(prev) => prev.map((n) => n.id === id ? __spreadProps(__spreadValues({}, n), { read: true }) : n)
|
|
6661
6776
|
);
|
|
6662
6777
|
}, []);
|
|
6663
|
-
const dismiss =
|
|
6778
|
+
const dismiss = React33.useCallback((id) => {
|
|
6664
6779
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
6665
6780
|
}, []);
|
|
6666
|
-
const markAllRead =
|
|
6781
|
+
const markAllRead = React33.useCallback(() => {
|
|
6667
6782
|
setNotifications((prev) => prev.map((n) => __spreadProps(__spreadValues({}, n), { read: true })));
|
|
6668
6783
|
}, []);
|
|
6669
|
-
const clearAll =
|
|
6784
|
+
const clearAll = React33.useCallback(() => {
|
|
6670
6785
|
setNotifications([]);
|
|
6671
6786
|
}, []);
|
|
6672
|
-
const add =
|
|
6787
|
+
const add = React33.useCallback((notification) => {
|
|
6673
6788
|
const newNotification = __spreadProps(__spreadValues({}, notification), {
|
|
6674
6789
|
id: generateId()
|
|
6675
6790
|
});
|
|
6676
6791
|
setNotifications((prev) => [newNotification, ...prev]);
|
|
6677
6792
|
}, []);
|
|
6678
|
-
const unreadCount =
|
|
6793
|
+
const unreadCount = React33.useMemo(
|
|
6679
6794
|
() => notifications.filter((n) => !n.read).length,
|
|
6680
6795
|
[notifications]
|
|
6681
6796
|
);
|
|
6682
|
-
const unreadNotifications =
|
|
6797
|
+
const unreadNotifications = React33.useMemo(
|
|
6683
6798
|
() => notifications.filter((n) => !n.read),
|
|
6684
6799
|
[notifications]
|
|
6685
6800
|
);
|
|
6686
|
-
const actions =
|
|
6801
|
+
const actions = React33.useMemo(
|
|
6687
6802
|
() => ({
|
|
6688
6803
|
markRead,
|
|
6689
6804
|
dismiss,
|