@wso2/oxygen-ui 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/oxygen-component/SKILL.md +31 -3
- package/.claude/skills/oxygen-form/SKILL.md +21 -8
- package/.claude/skills/oxygen-layout/SKILL.md +128 -35
- package/dist/components/ListingTable/ListingTable/ListingTable.d.ts +2 -1
- package/dist/components/ListingTable/index.d.ts +2 -1
- package/dist/components/ListingTable/shared/ListingTableFilter.d.ts +80 -0
- package/dist/components/ListingTable/shared/ListingTableFilterMenu.d.ts +47 -0
- package/dist/components/ListingTable/shared/index.d.ts +2 -0
- package/dist/components/TimeRangeFilter/TimeRangeFilter.d.ts +185 -0
- package/dist/components/TimeRangeFilter/index.d.ts +2 -0
- package/dist/components/TrialBadge/TrialBadge.d.ts +192 -0
- package/dist/components/TrialBadge/index.d.ts +2 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/index.js +1841 -714
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -491,7 +491,7 @@ var init_createOxygenTheme = __esm({
|
|
|
491
491
|
// package.json
|
|
492
492
|
var package_default = {
|
|
493
493
|
name: "@wso2/oxygen-ui",
|
|
494
|
-
version: "0.
|
|
494
|
+
version: "0.18.0",
|
|
495
495
|
description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
|
|
496
496
|
type: "module",
|
|
497
497
|
main: "./dist/index.js",
|
|
@@ -1725,87 +1725,176 @@ var PaleIndigo_default = createOxygenTheme(PaleIndigoThemeConfig, PaleBaseTheme_
|
|
|
1725
1725
|
// src/styles/Themes/WSO2Theme.ts
|
|
1726
1726
|
init_OxygenThemeBase();
|
|
1727
1727
|
init_createOxygenTheme();
|
|
1728
|
+
var neutral = {
|
|
1729
|
+
50: "#F7F7F7",
|
|
1730
|
+
100: "#EBEBEB",
|
|
1731
|
+
200: "#D9D9D9",
|
|
1732
|
+
300: "#C2C2C2",
|
|
1733
|
+
400: "#A9A9A9",
|
|
1734
|
+
600: "#767676",
|
|
1735
|
+
700: "#5C5C5C",
|
|
1736
|
+
800: "#444444",
|
|
1737
|
+
900: "#2E2E2E",
|
|
1738
|
+
950: "#161616"
|
|
1739
|
+
};
|
|
1740
|
+
var blue = {
|
|
1741
|
+
50: "#DFF7FF",
|
|
1742
|
+
100: "#C5EAFF",
|
|
1743
|
+
200: "#A6D5FF",
|
|
1744
|
+
300: "#86BBFF",
|
|
1745
|
+
400: "#699FFF",
|
|
1746
|
+
500: "#325FEB",
|
|
1747
|
+
800: "#1432A4",
|
|
1748
|
+
900: "#091E7A",
|
|
1749
|
+
950: "#02074B"
|
|
1750
|
+
};
|
|
1751
|
+
var orange = {
|
|
1752
|
+
50: "#FFE6D6",
|
|
1753
|
+
100: "#FFD0B8",
|
|
1754
|
+
200: "#FFB292",
|
|
1755
|
+
300: "#FF906B",
|
|
1756
|
+
400: "#FF6E47",
|
|
1757
|
+
500: "#F14E23",
|
|
1758
|
+
600: "#D32F00",
|
|
1759
|
+
700: "#AF0700",
|
|
1760
|
+
800: "#890000",
|
|
1761
|
+
900: "#640000",
|
|
1762
|
+
950: "#3B0000"
|
|
1763
|
+
};
|
|
1764
|
+
var navy = {
|
|
1765
|
+
canvas: "#0B142B",
|
|
1766
|
+
// Page, header and sidebar
|
|
1767
|
+
raised: "#12203E",
|
|
1768
|
+
// Cards, menus, list rows and selected items
|
|
1769
|
+
textPrimary: "#E4ECFA",
|
|
1770
|
+
textSecondary: "rgba(228, 236, 250, 0.80)",
|
|
1771
|
+
accentLight: "#B9D8FF",
|
|
1772
|
+
accent: "#6FA8F5",
|
|
1773
|
+
accentDark: "#164C93"
|
|
1774
|
+
};
|
|
1775
|
+
var lightMesh = `radial-gradient(55% 50% at 8% 4%, ${orange[400]} 0%, ${orange[500]}6b 32%, ${orange[500]}00 66%),radial-gradient(50% 55% at 2% 96%, #FFFFFF 0%, #FFFFFF66 40%, #FFFFFF00 74%),radial-gradient(80% 85% at 96% 26%, ${blue[950]} 0%, ${blue[800]} 45%, ${blue[950]}00 88%),linear-gradient(120deg, ${orange[100]} 0%, #8891A8 52%, ${blue[950]} 100%)`;
|
|
1776
|
+
var lightWash = (alpha4) => `linear-gradient(rgba(255, 255, 255, ${alpha4}), rgba(255, 255, 255, ${alpha4})), ${lightMesh}`;
|
|
1777
|
+
var semantic = {
|
|
1778
|
+
error: "#E60000",
|
|
1779
|
+
warning: "#FFB400",
|
|
1780
|
+
success: "#00C853",
|
|
1781
|
+
// Darker shades for text on light surfaces; the base colors fall below 4.5:1 on white
|
|
1782
|
+
warningText: "#8A5A00",
|
|
1783
|
+
successText: "#007A33"
|
|
1784
|
+
};
|
|
1785
|
+
var grey = {
|
|
1786
|
+
50: neutral[50],
|
|
1787
|
+
100: neutral[100],
|
|
1788
|
+
200: neutral[200],
|
|
1789
|
+
300: neutral[300],
|
|
1790
|
+
400: neutral[400],
|
|
1791
|
+
600: neutral[600],
|
|
1792
|
+
700: neutral[700],
|
|
1793
|
+
800: neutral[800],
|
|
1794
|
+
900: neutral[900]
|
|
1795
|
+
};
|
|
1728
1796
|
var WSO2ThemeConfig = {
|
|
1729
1797
|
colorSchemes: {
|
|
1730
1798
|
light: {
|
|
1731
1799
|
palette: {
|
|
1732
1800
|
primary: {
|
|
1733
|
-
|
|
1801
|
+
light: orange[500],
|
|
1802
|
+
main: orange[600],
|
|
1734
1803
|
// WSO2 Orange
|
|
1804
|
+
dark: orange[700],
|
|
1805
|
+
contrastText: "#FFFFFF"
|
|
1735
1806
|
},
|
|
1736
1807
|
secondary: {
|
|
1737
|
-
|
|
1738
|
-
|
|
1808
|
+
light: blue[500],
|
|
1809
|
+
main: blue[800],
|
|
1810
|
+
// WSO2 Blue
|
|
1811
|
+
dark: blue[900],
|
|
1812
|
+
contrastText: "#FFFFFF"
|
|
1739
1813
|
},
|
|
1740
1814
|
success: {
|
|
1741
|
-
main:
|
|
1742
|
-
|
|
1743
|
-
contrastText:
|
|
1815
|
+
main: semantic.success,
|
|
1816
|
+
dark: semantic.successText,
|
|
1817
|
+
contrastText: neutral[950]
|
|
1744
1818
|
},
|
|
1745
1819
|
warning: {
|
|
1746
|
-
main:
|
|
1747
|
-
|
|
1748
|
-
contrastText:
|
|
1820
|
+
main: semantic.warning,
|
|
1821
|
+
dark: semantic.warningText,
|
|
1822
|
+
contrastText: neutral[950]
|
|
1749
1823
|
},
|
|
1750
1824
|
error: {
|
|
1751
|
-
main:
|
|
1752
|
-
|
|
1753
|
-
contrastText: "#ffffff"
|
|
1825
|
+
main: semantic.error,
|
|
1826
|
+
contrastText: "#FFFFFF"
|
|
1754
1827
|
},
|
|
1755
1828
|
info: {
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1829
|
+
light: blue[500],
|
|
1830
|
+
main: blue[800],
|
|
1831
|
+
dark: blue[900],
|
|
1832
|
+
contrastText: "#FFFFFF"
|
|
1759
1833
|
},
|
|
1834
|
+
grey,
|
|
1760
1835
|
background: {
|
|
1761
|
-
default: "#
|
|
1762
|
-
paper: "#
|
|
1763
|
-
acrylic: "#
|
|
1836
|
+
default: "#FFFFFF",
|
|
1837
|
+
paper: "#FFFFFF",
|
|
1838
|
+
acrylic: "#FFFFFF"
|
|
1764
1839
|
},
|
|
1765
1840
|
text: {
|
|
1766
|
-
primary:
|
|
1767
|
-
secondary:
|
|
1841
|
+
primary: blue[950],
|
|
1842
|
+
secondary: neutral[800]
|
|
1843
|
+
},
|
|
1844
|
+
divider: `${blue[950]}1f`,
|
|
1845
|
+
action: {
|
|
1846
|
+
selected: "#FFFFFF"
|
|
1768
1847
|
}
|
|
1769
1848
|
}
|
|
1770
1849
|
},
|
|
1771
1850
|
dark: {
|
|
1772
1851
|
palette: {
|
|
1773
1852
|
primary: {
|
|
1774
|
-
|
|
1775
|
-
|
|
1853
|
+
light: orange[500],
|
|
1854
|
+
main: orange[600],
|
|
1855
|
+
// WSO2 Orange, deepened so white text reads on navy
|
|
1856
|
+
dark: orange[700],
|
|
1857
|
+
contrastText: "#FFFFFF"
|
|
1776
1858
|
},
|
|
1777
1859
|
secondary: {
|
|
1778
|
-
|
|
1779
|
-
|
|
1860
|
+
light: navy.accentLight,
|
|
1861
|
+
main: navy.accent,
|
|
1862
|
+
// WSO2 Blue, lifted for contrast on navy
|
|
1863
|
+
dark: navy.accentDark,
|
|
1864
|
+
contrastText: neutral[950]
|
|
1780
1865
|
},
|
|
1781
1866
|
success: {
|
|
1782
|
-
main:
|
|
1783
|
-
|
|
1784
|
-
contrastText: "#ffffff"
|
|
1867
|
+
main: semantic.success,
|
|
1868
|
+
contrastText: neutral[950]
|
|
1785
1869
|
},
|
|
1786
1870
|
warning: {
|
|
1787
|
-
main:
|
|
1788
|
-
|
|
1789
|
-
contrastText: "#ffffff"
|
|
1871
|
+
main: semantic.warning,
|
|
1872
|
+
contrastText: neutral[950]
|
|
1790
1873
|
},
|
|
1791
1874
|
error: {
|
|
1792
|
-
main:
|
|
1793
|
-
|
|
1794
|
-
contrastText: "#ffffff"
|
|
1875
|
+
main: semantic.error,
|
|
1876
|
+
contrastText: "#FFFFFF"
|
|
1795
1877
|
},
|
|
1796
1878
|
info: {
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1879
|
+
light: navy.accentLight,
|
|
1880
|
+
main: navy.accent,
|
|
1881
|
+
dark: navy.accentDark,
|
|
1882
|
+
contrastText: neutral[950]
|
|
1800
1883
|
},
|
|
1884
|
+
grey,
|
|
1801
1885
|
background: {
|
|
1802
|
-
default:
|
|
1803
|
-
|
|
1804
|
-
|
|
1886
|
+
default: navy.canvas,
|
|
1887
|
+
// Navy night
|
|
1888
|
+
paper: navy.raised,
|
|
1889
|
+
acrylic: navy.raised
|
|
1805
1890
|
},
|
|
1806
1891
|
text: {
|
|
1807
|
-
primary:
|
|
1808
|
-
secondary:
|
|
1892
|
+
primary: navy.textPrimary,
|
|
1893
|
+
secondary: navy.textSecondary
|
|
1894
|
+
},
|
|
1895
|
+
divider: "rgba(255, 255, 255, 0.14)",
|
|
1896
|
+
action: {
|
|
1897
|
+
selected: navy.raised
|
|
1809
1898
|
}
|
|
1810
1899
|
}
|
|
1811
1900
|
}
|
|
@@ -1820,6 +1909,10 @@ var WSO2ThemeConfig = {
|
|
|
1820
1909
|
medium: "blur(16px)",
|
|
1821
1910
|
heavy: "blur(24px)"
|
|
1822
1911
|
},
|
|
1912
|
+
gradient: {
|
|
1913
|
+
// Signal: accent bars and 4px rules only
|
|
1914
|
+
primary: `linear-gradient(120deg, ${blue[500]} 0%, ${blue[300]} 50%, ${orange[500]} 100%)`
|
|
1915
|
+
},
|
|
1823
1916
|
syntax: {
|
|
1824
1917
|
light: {
|
|
1825
1918
|
background: "#f5f5f5"
|
|
@@ -1831,17 +1924,41 @@ var WSO2ThemeConfig = {
|
|
|
1831
1924
|
components: {
|
|
1832
1925
|
MuiCssBaseline: {
|
|
1833
1926
|
styleOverrides: {
|
|
1927
|
+
// Night: a single flat navy so the shell reads as one surface
|
|
1834
1928
|
"html[data-color-scheme='dark'] body": {
|
|
1835
|
-
|
|
1836
|
-
backgroundImage: "
|
|
1837
|
-
backgroundBlendMode: "screen"
|
|
1929
|
+
backgroundColor: navy.canvas,
|
|
1930
|
+
backgroundImage: "none"
|
|
1838
1931
|
},
|
|
1932
|
+
// Light: the washed mesh shows through the page behind the content
|
|
1839
1933
|
"html[data-color-scheme='light'] body": {
|
|
1840
1934
|
backgroundAttachment: "fixed",
|
|
1841
|
-
|
|
1935
|
+
backgroundColor: "#FFFFFF",
|
|
1936
|
+
backgroundImage: lightWash(0.9)
|
|
1842
1937
|
}
|
|
1843
1938
|
}
|
|
1844
1939
|
},
|
|
1940
|
+
// The header sits on the page color: it shows the washed mesh in light mode and the page navy in dark mode
|
|
1941
|
+
MuiHeader: {
|
|
1942
|
+
styleOverrides: {
|
|
1943
|
+
root: ({ theme }) => __spreadValues({
|
|
1944
|
+
backgroundColor: "transparent"
|
|
1945
|
+
}, theme.applyStyles("dark", {
|
|
1946
|
+
backgroundColor: theme.vars.palette.background.default
|
|
1947
|
+
}))
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
// The sidebar shows a little more of the mesh than the page in light mode and the page navy in dark mode
|
|
1951
|
+
MuiSidebar: {
|
|
1952
|
+
styleOverrides: {
|
|
1953
|
+
root: ({ theme }) => __spreadValues({
|
|
1954
|
+
backgroundAttachment: "fixed",
|
|
1955
|
+
backgroundImage: lightWash(0.86)
|
|
1956
|
+
}, theme.applyStyles("dark", {
|
|
1957
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
1958
|
+
backgroundImage: "none"
|
|
1959
|
+
}))
|
|
1960
|
+
}
|
|
1961
|
+
},
|
|
1845
1962
|
MuiPaper: {
|
|
1846
1963
|
styleOverrides: {
|
|
1847
1964
|
root: ({ theme }) => ({
|
|
@@ -1855,33 +1972,50 @@ var WSO2ThemeConfig = {
|
|
|
1855
1972
|
MuiButton: {
|
|
1856
1973
|
styleOverrides: {
|
|
1857
1974
|
root: {
|
|
1858
|
-
color: "#000000",
|
|
1859
1975
|
transition: "color 0.3s ease-in-out",
|
|
1976
|
+
// Show labels as written (sentence case) instead of MUI's default all caps
|
|
1977
|
+
textTransform: "none"
|
|
1978
|
+
},
|
|
1979
|
+
// Light mode Orange 500 needs dark text; darker hover and dark mode oranges need white text
|
|
1980
|
+
containedPrimary: ({ theme }) => ({
|
|
1981
|
+
color: theme.vars.palette.primary.contrastText,
|
|
1860
1982
|
"&:hover": {
|
|
1861
1983
|
color: "#FFFFFF"
|
|
1862
1984
|
}
|
|
1863
|
-
},
|
|
1985
|
+
}),
|
|
1864
1986
|
outlined: ({ theme }) => ({
|
|
1865
1987
|
color: theme.palette.primary.main,
|
|
1866
1988
|
"&:hover": {
|
|
1867
1989
|
color: theme.palette.primary.main
|
|
1868
1990
|
},
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1991
|
+
// Light mode labels use the darker shade so they meet 4.5:1 on white surfaces
|
|
1992
|
+
"&.MuiButton-colorSuccess": __spreadValues({
|
|
1993
|
+
color: theme.vars.palette.success.dark,
|
|
1994
|
+
borderColor: theme.vars.palette.success.main,
|
|
1872
1995
|
"&:hover": {
|
|
1873
|
-
color: theme.palette.success.
|
|
1874
|
-
borderColor: theme.palette.success.main
|
|
1996
|
+
color: theme.vars.palette.success.dark,
|
|
1997
|
+
borderColor: theme.vars.palette.success.main
|
|
1875
1998
|
}
|
|
1876
|
-
},
|
|
1877
|
-
|
|
1878
|
-
color: theme.palette.warning.main,
|
|
1879
|
-
borderColor: theme.palette.warning.main,
|
|
1999
|
+
}, theme.applyStyles("dark", {
|
|
2000
|
+
color: theme.vars.palette.success.main,
|
|
1880
2001
|
"&:hover": {
|
|
1881
|
-
color: theme.palette.
|
|
1882
|
-
borderColor: theme.palette.warning.main
|
|
2002
|
+
color: theme.vars.palette.success.main
|
|
1883
2003
|
}
|
|
1884
|
-
},
|
|
2004
|
+
})),
|
|
2005
|
+
// Light mode labels use the darker shade so they meet 4.5:1 on white surfaces
|
|
2006
|
+
"&.MuiButton-colorWarning": __spreadValues({
|
|
2007
|
+
color: theme.vars.palette.warning.dark,
|
|
2008
|
+
borderColor: theme.vars.palette.warning.main,
|
|
2009
|
+
"&:hover": {
|
|
2010
|
+
color: theme.vars.palette.warning.dark,
|
|
2011
|
+
borderColor: theme.vars.palette.warning.main
|
|
2012
|
+
}
|
|
2013
|
+
}, theme.applyStyles("dark", {
|
|
2014
|
+
color: theme.vars.palette.warning.main,
|
|
2015
|
+
"&:hover": {
|
|
2016
|
+
color: theme.vars.palette.warning.main
|
|
2017
|
+
}
|
|
2018
|
+
})),
|
|
1885
2019
|
"&.MuiButton-colorError": {
|
|
1886
2020
|
color: theme.palette.error.main,
|
|
1887
2021
|
borderColor: theme.palette.error.main,
|
|
@@ -3363,11 +3497,422 @@ var StatCard = (_a) => {
|
|
|
3363
3497
|
StatCard.displayName = "StatCard";
|
|
3364
3498
|
var StatCard_default = StatCard;
|
|
3365
3499
|
|
|
3500
|
+
// src/components/TrialBadge/TrialBadge.tsx
|
|
3501
|
+
import React6 from "react";
|
|
3502
|
+
import { Box as Box8, Button as Button2, Card as Card2, CardContent as CardContent2, CircularProgress, LinearProgress, Popper, Typography as Typography7 } from "@mui/material";
|
|
3503
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3504
|
+
function getTrialBadgeStatus(daysLeft, endingSoonThreshold = 7, criticalThreshold = 3) {
|
|
3505
|
+
if (daysLeft <= 0) return "expired";
|
|
3506
|
+
if (daysLeft <= criticalThreshold) return "critical";
|
|
3507
|
+
if (daysLeft <= endingSoonThreshold) return "ending-soon";
|
|
3508
|
+
return "active";
|
|
3509
|
+
}
|
|
3510
|
+
var STATUS_COLOR = {
|
|
3511
|
+
active: "primary",
|
|
3512
|
+
"ending-soon": "warning",
|
|
3513
|
+
critical: "error",
|
|
3514
|
+
expired: "error"
|
|
3515
|
+
};
|
|
3516
|
+
var RING_SIZE = 28;
|
|
3517
|
+
var RING_THICKNESS = 4;
|
|
3518
|
+
var POPPER_OPTIONS = {
|
|
3519
|
+
// Fixed positioning keeps the panel from being clipped by an overflow-hidden header.
|
|
3520
|
+
strategy: "fixed",
|
|
3521
|
+
modifiers: [{ name: "offset", options: { offset: [0, 10] } }]
|
|
3522
|
+
};
|
|
3523
|
+
var CLOSE_DELAY_MS = 120;
|
|
3524
|
+
var getUsageTone = (count, limit, warningThreshold, criticalThreshold) => {
|
|
3525
|
+
const share = limit > 0 ? count / limit : 1;
|
|
3526
|
+
if (share >= criticalThreshold) return "error";
|
|
3527
|
+
if (share > warningThreshold) return "warning";
|
|
3528
|
+
return "success";
|
|
3529
|
+
};
|
|
3530
|
+
var sumOf = (items, pick) => items.reduce((sum, item) => sum + Math.max(0, pick(item)), 0);
|
|
3531
|
+
var TrialBadgeUsagePanel = ({ usage }) => {
|
|
3532
|
+
var _a, _b, _c, _d, _e;
|
|
3533
|
+
const {
|
|
3534
|
+
footerText = "Unlimited on Pro",
|
|
3535
|
+
upgradeLabel = "Upgrade",
|
|
3536
|
+
onUpgrade,
|
|
3537
|
+
upgradeHref,
|
|
3538
|
+
warningThreshold = 0.5,
|
|
3539
|
+
criticalThreshold = 0.75
|
|
3540
|
+
} = usage;
|
|
3541
|
+
const sections = (_c = usage.sections) != null ? _c : [
|
|
3542
|
+
{ title: (_a = usage.title) != null ? _a : "Components left", items: (_b = usage.items) != null ? _b : [], totalSuffix: usage.totalSuffix }
|
|
3543
|
+
];
|
|
3544
|
+
const allItems = [].concat(...sections.map((section) => section.items));
|
|
3545
|
+
const totalTone = getUsageTone(
|
|
3546
|
+
sumOf(allItems, (item) => item.count),
|
|
3547
|
+
sumOf(allItems, (item) => item.limit),
|
|
3548
|
+
warningThreshold,
|
|
3549
|
+
criticalThreshold
|
|
3550
|
+
);
|
|
3551
|
+
const buttonLinkProps = upgradeHref ? { component: "a", href: upgradeHref } : {};
|
|
3552
|
+
const textOf = (node) => typeof node === "string" ? node : void 0;
|
|
3553
|
+
return /* @__PURE__ */ jsxs9(
|
|
3554
|
+
Card2,
|
|
3555
|
+
{
|
|
3556
|
+
role: "group",
|
|
3557
|
+
"aria-label": (_e = textOf((_d = sections[0]) == null ? void 0 : _d.title)) != null ? _e : "Usage",
|
|
3558
|
+
sx: {
|
|
3559
|
+
position: "relative",
|
|
3560
|
+
width: 280,
|
|
3561
|
+
overflow: "visible",
|
|
3562
|
+
// Opaque, so the arrow can blend into the card instead of showing the page through it.
|
|
3563
|
+
backgroundColor: "background.paper",
|
|
3564
|
+
backdropFilter: "none",
|
|
3565
|
+
WebkitBackdropFilter: "none"
|
|
3566
|
+
},
|
|
3567
|
+
children: [
|
|
3568
|
+
/* @__PURE__ */ jsx24(
|
|
3569
|
+
Box8,
|
|
3570
|
+
{
|
|
3571
|
+
"aria-hidden": "true",
|
|
3572
|
+
sx: {
|
|
3573
|
+
position: "absolute",
|
|
3574
|
+
top: -8,
|
|
3575
|
+
right: 22,
|
|
3576
|
+
width: 14,
|
|
3577
|
+
height: 7,
|
|
3578
|
+
bgcolor: "divider",
|
|
3579
|
+
clipPath: "polygon(50% 0, 0 100%, 100% 100%)"
|
|
3580
|
+
}
|
|
3581
|
+
}
|
|
3582
|
+
),
|
|
3583
|
+
/* @__PURE__ */ jsx24(
|
|
3584
|
+
Box8,
|
|
3585
|
+
{
|
|
3586
|
+
"aria-hidden": "true",
|
|
3587
|
+
sx: {
|
|
3588
|
+
position: "absolute",
|
|
3589
|
+
top: -7,
|
|
3590
|
+
right: 23,
|
|
3591
|
+
width: 12,
|
|
3592
|
+
height: 7,
|
|
3593
|
+
backgroundColor: "inherit",
|
|
3594
|
+
backgroundImage: "inherit",
|
|
3595
|
+
clipPath: "polygon(50% 0, 0 6px, 0 100%, 100% 100%, 100% 6px)"
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
),
|
|
3599
|
+
sections.map((section, index) => {
|
|
3600
|
+
var _a2, _b2;
|
|
3601
|
+
const sectionCount = sumOf(section.items, (item) => item.count);
|
|
3602
|
+
const sectionLimit = sumOf(section.items, (item) => item.limit);
|
|
3603
|
+
return /* @__PURE__ */ jsxs9(
|
|
3604
|
+
CardContent2,
|
|
3605
|
+
{
|
|
3606
|
+
role: "group",
|
|
3607
|
+
"aria-label": textOf(section.title),
|
|
3608
|
+
sx: {
|
|
3609
|
+
px: 2,
|
|
3610
|
+
py: 1.25,
|
|
3611
|
+
"&:last-child": { pb: 1.25 },
|
|
3612
|
+
borderTop: index > 0 ? "1px solid" : void 0,
|
|
3613
|
+
borderColor: "divider"
|
|
3614
|
+
},
|
|
3615
|
+
children: [
|
|
3616
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { display: "flex", alignItems: "baseline", justifyContent: "space-between", mb: 1 }, children: [
|
|
3617
|
+
/* @__PURE__ */ jsx24(Typography7, { variant: "body2", sx: { fontWeight: 700 }, children: section.title }),
|
|
3618
|
+
section.totalSuffix ? /* @__PURE__ */ jsxs9(Typography7, { variant: "body2", color: "text.secondary", children: [
|
|
3619
|
+
/* @__PURE__ */ jsx24(Box8, { component: "span", sx: { fontWeight: 700, color: "text.primary" }, children: sectionCount }),
|
|
3620
|
+
" ",
|
|
3621
|
+
"of ",
|
|
3622
|
+
sectionLimit,
|
|
3623
|
+
" ",
|
|
3624
|
+
section.totalSuffix
|
|
3625
|
+
] }) : null
|
|
3626
|
+
] }),
|
|
3627
|
+
/* @__PURE__ */ jsx24(Box8, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: section.items.map((item, itemIndex) => {
|
|
3628
|
+
var _a3, _b3, _c2;
|
|
3629
|
+
const count = Math.max(0, item.count);
|
|
3630
|
+
const tone = getUsageTone(count, item.limit, warningThreshold, criticalThreshold);
|
|
3631
|
+
const value = item.limit > 0 ? Math.min(100, count / item.limit * 100) : 0;
|
|
3632
|
+
return /* @__PURE__ */ jsxs9(
|
|
3633
|
+
Box8,
|
|
3634
|
+
{
|
|
3635
|
+
"data-tone": tone,
|
|
3636
|
+
sx: {
|
|
3637
|
+
display: "grid",
|
|
3638
|
+
gridTemplateColumns: "1fr 80px 32px",
|
|
3639
|
+
alignItems: "center",
|
|
3640
|
+
columnGap: 1.5
|
|
3641
|
+
},
|
|
3642
|
+
children: [
|
|
3643
|
+
/* @__PURE__ */ jsx24(Typography7, { variant: "caption", color: "text.secondary", noWrap: true, sx: { fontSize: "0.75rem" }, children: item.label }),
|
|
3644
|
+
/* @__PURE__ */ jsx24(
|
|
3645
|
+
LinearProgress,
|
|
3646
|
+
{
|
|
3647
|
+
variant: "determinate",
|
|
3648
|
+
value,
|
|
3649
|
+
color: tone,
|
|
3650
|
+
"aria-label": (_c2 = textOf(item.label)) != null ? _c2 : "Usage",
|
|
3651
|
+
sx: { height: 4, borderRadius: 999, bgcolor: "action.hover" }
|
|
3652
|
+
}
|
|
3653
|
+
),
|
|
3654
|
+
/* @__PURE__ */ jsxs9(
|
|
3655
|
+
Typography7,
|
|
3656
|
+
{
|
|
3657
|
+
variant: "caption",
|
|
3658
|
+
color: "text.secondary",
|
|
3659
|
+
sx: { textAlign: "right", fontSize: "0.75rem" },
|
|
3660
|
+
children: [
|
|
3661
|
+
/* @__PURE__ */ jsx24(Box8, { component: "span", sx: { fontWeight: 700, color: "text.primary" }, children: count }),
|
|
3662
|
+
"/",
|
|
3663
|
+
item.limit
|
|
3664
|
+
]
|
|
3665
|
+
}
|
|
3666
|
+
)
|
|
3667
|
+
]
|
|
3668
|
+
},
|
|
3669
|
+
(_b3 = (_a3 = item.key) != null ? _a3 : textOf(item.label)) != null ? _b3 : itemIndex
|
|
3670
|
+
);
|
|
3671
|
+
}) })
|
|
3672
|
+
]
|
|
3673
|
+
},
|
|
3674
|
+
(_b2 = (_a2 = section.key) != null ? _a2 : textOf(section.title)) != null ? _b2 : index
|
|
3675
|
+
);
|
|
3676
|
+
}),
|
|
3677
|
+
/* @__PURE__ */ jsxs9(
|
|
3678
|
+
CardContent2,
|
|
3679
|
+
{
|
|
3680
|
+
sx: {
|
|
3681
|
+
display: "flex",
|
|
3682
|
+
alignItems: "center",
|
|
3683
|
+
justifyContent: "space-between",
|
|
3684
|
+
gap: 2,
|
|
3685
|
+
px: 2,
|
|
3686
|
+
py: 1.25,
|
|
3687
|
+
"&:last-child": { pb: 1.25 },
|
|
3688
|
+
borderTop: "1px solid",
|
|
3689
|
+
borderColor: "divider"
|
|
3690
|
+
},
|
|
3691
|
+
children: [
|
|
3692
|
+
/* @__PURE__ */ jsx24(Typography7, { variant: "caption", color: "text.secondary", sx: { fontSize: "0.75rem" }, children: footerText }),
|
|
3693
|
+
/* @__PURE__ */ jsxs9(
|
|
3694
|
+
Button2,
|
|
3695
|
+
__spreadProps(__spreadValues({
|
|
3696
|
+
variant: "contained",
|
|
3697
|
+
color: totalTone,
|
|
3698
|
+
"data-tone": totalTone,
|
|
3699
|
+
size: "small",
|
|
3700
|
+
disableElevation: true,
|
|
3701
|
+
onClick: onUpgrade
|
|
3702
|
+
}, buttonLinkProps), {
|
|
3703
|
+
sx: {
|
|
3704
|
+
fontWeight: 700,
|
|
3705
|
+
fontSize: "0.75rem",
|
|
3706
|
+
textTransform: "none",
|
|
3707
|
+
color: "common.black",
|
|
3708
|
+
whiteSpace: "nowrap",
|
|
3709
|
+
py: 0.25,
|
|
3710
|
+
minHeight: 0
|
|
3711
|
+
},
|
|
3712
|
+
children: [
|
|
3713
|
+
upgradeLabel,
|
|
3714
|
+
" \u2192"
|
|
3715
|
+
]
|
|
3716
|
+
})
|
|
3717
|
+
)
|
|
3718
|
+
]
|
|
3719
|
+
}
|
|
3720
|
+
)
|
|
3721
|
+
]
|
|
3722
|
+
}
|
|
3723
|
+
);
|
|
3724
|
+
};
|
|
3725
|
+
var TrialBadge = (_a) => {
|
|
3726
|
+
var _b = _a, {
|
|
3727
|
+
daysLeft,
|
|
3728
|
+
totalDays = 14,
|
|
3729
|
+
endingSoonThreshold = 7,
|
|
3730
|
+
criticalThreshold = 3,
|
|
3731
|
+
onUpgrade,
|
|
3732
|
+
upgradeHref,
|
|
3733
|
+
showUpgrade = true,
|
|
3734
|
+
getTitle = (days) => `${days} ${days === 1 ? "day" : "days"} left`,
|
|
3735
|
+
expiredLabel = "Trial expired",
|
|
3736
|
+
subtitle = "of free trial",
|
|
3737
|
+
upgradeLabel = "Upgrade now",
|
|
3738
|
+
onClick,
|
|
3739
|
+
usage,
|
|
3740
|
+
sx
|
|
3741
|
+
} = _b, props = __objRest(_b, [
|
|
3742
|
+
"daysLeft",
|
|
3743
|
+
"totalDays",
|
|
3744
|
+
"endingSoonThreshold",
|
|
3745
|
+
"criticalThreshold",
|
|
3746
|
+
"onUpgrade",
|
|
3747
|
+
"upgradeHref",
|
|
3748
|
+
"showUpgrade",
|
|
3749
|
+
"getTitle",
|
|
3750
|
+
"expiredLabel",
|
|
3751
|
+
"subtitle",
|
|
3752
|
+
"upgradeLabel",
|
|
3753
|
+
"onClick",
|
|
3754
|
+
"usage",
|
|
3755
|
+
"sx"
|
|
3756
|
+
]);
|
|
3757
|
+
const [anchorEl, setAnchorEl] = React6.useState(null);
|
|
3758
|
+
const [panelOpen, setPanelOpen] = React6.useState(false);
|
|
3759
|
+
const closeTimer = React6.useRef(void 0);
|
|
3760
|
+
const openPanel = () => {
|
|
3761
|
+
clearTimeout(closeTimer.current);
|
|
3762
|
+
setPanelOpen(true);
|
|
3763
|
+
};
|
|
3764
|
+
const closePanelSoon = () => {
|
|
3765
|
+
clearTimeout(closeTimer.current);
|
|
3766
|
+
closeTimer.current = setTimeout(() => setPanelOpen(false), CLOSE_DELAY_MS);
|
|
3767
|
+
};
|
|
3768
|
+
React6.useEffect(() => () => clearTimeout(closeTimer.current), []);
|
|
3769
|
+
const exactDays = Math.max(0, Number.isFinite(daysLeft) ? daysLeft : 0);
|
|
3770
|
+
const days = Math.ceil(exactDays);
|
|
3771
|
+
const status = getTrialBadgeStatus(exactDays, endingSoonThreshold, criticalThreshold);
|
|
3772
|
+
const color = STATUS_COLOR[status];
|
|
3773
|
+
const isExpired = status === "expired";
|
|
3774
|
+
const upgradeVisible = showUpgrade && (status === "critical" || isExpired);
|
|
3775
|
+
const progress = totalDays > 0 ? Math.min(100, Math.max(0, exactDays / totalDays * 100)) : 0;
|
|
3776
|
+
const interactive = Boolean(onUpgrade || onClick || upgradeHref);
|
|
3777
|
+
const handleClick = (event) => {
|
|
3778
|
+
onClick == null ? void 0 : onClick(event);
|
|
3779
|
+
onUpgrade == null ? void 0 : onUpgrade(event);
|
|
3780
|
+
};
|
|
3781
|
+
const interactiveProps = interactive ? upgradeHref ? { component: "a", href: upgradeHref, onClick: handleClick } : { component: "button", type: "button", onClick: handleClick } : { role: "group", tabIndex: usage ? 0 : void 0 };
|
|
3782
|
+
const badge = /* @__PURE__ */ jsxs9(
|
|
3783
|
+
Box8,
|
|
3784
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, interactiveProps), {
|
|
3785
|
+
"data-status": status,
|
|
3786
|
+
sx: [
|
|
3787
|
+
(theme) => __spreadValues({
|
|
3788
|
+
display: "inline-flex",
|
|
3789
|
+
alignItems: "center",
|
|
3790
|
+
gap: 1,
|
|
3791
|
+
py: 0.25,
|
|
3792
|
+
pl: 0.5,
|
|
3793
|
+
pr: 1.5,
|
|
3794
|
+
borderRadius: 999,
|
|
3795
|
+
border: "1px solid",
|
|
3796
|
+
borderColor: `${theme.palette[color].main}`,
|
|
3797
|
+
bgcolor: `color-mix(in srgb, ${theme.palette[color].main} 12%, transparent)`,
|
|
3798
|
+
color: "text.primary",
|
|
3799
|
+
font: "inherit",
|
|
3800
|
+
textAlign: "left",
|
|
3801
|
+
textDecoration: "none"
|
|
3802
|
+
}, interactive && {
|
|
3803
|
+
cursor: "pointer",
|
|
3804
|
+
transition: "background-color 150ms",
|
|
3805
|
+
"&:hover": {
|
|
3806
|
+
bgcolor: `color-mix(in srgb, ${theme.palette[color].main} 20%, transparent)`
|
|
3807
|
+
},
|
|
3808
|
+
"&:focus-visible": {
|
|
3809
|
+
outline: "2px solid",
|
|
3810
|
+
outlineColor: theme.palette[color].main,
|
|
3811
|
+
outlineOffset: 2
|
|
3812
|
+
}
|
|
3813
|
+
}),
|
|
3814
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
3815
|
+
]
|
|
3816
|
+
}), props), {
|
|
3817
|
+
children: [
|
|
3818
|
+
/* @__PURE__ */ jsxs9(Box8, { "aria-hidden": "true", sx: { position: "relative", display: "inline-flex", flexShrink: 0 }, children: [
|
|
3819
|
+
/* @__PURE__ */ jsx24(
|
|
3820
|
+
CircularProgress,
|
|
3821
|
+
{
|
|
3822
|
+
variant: "determinate",
|
|
3823
|
+
value: 100,
|
|
3824
|
+
size: RING_SIZE,
|
|
3825
|
+
thickness: RING_THICKNESS,
|
|
3826
|
+
sx: { color: `${color}.main`, opacity: 0.25 }
|
|
3827
|
+
}
|
|
3828
|
+
),
|
|
3829
|
+
!isExpired && /* @__PURE__ */ jsx24(
|
|
3830
|
+
CircularProgress,
|
|
3831
|
+
{
|
|
3832
|
+
variant: "determinate",
|
|
3833
|
+
value: progress,
|
|
3834
|
+
size: RING_SIZE,
|
|
3835
|
+
thickness: RING_THICKNESS,
|
|
3836
|
+
sx: { color: `${color}.main`, position: "absolute", left: 0 }
|
|
3837
|
+
}
|
|
3838
|
+
),
|
|
3839
|
+
/* @__PURE__ */ jsx24(
|
|
3840
|
+
Box8,
|
|
3841
|
+
{
|
|
3842
|
+
sx: {
|
|
3843
|
+
position: "absolute",
|
|
3844
|
+
inset: 0,
|
|
3845
|
+
display: "flex",
|
|
3846
|
+
alignItems: "center",
|
|
3847
|
+
justifyContent: "center"
|
|
3848
|
+
},
|
|
3849
|
+
children: /* @__PURE__ */ jsx24(Typography7, { variant: "caption", sx: { fontWeight: 700, lineHeight: 1 }, children: days })
|
|
3850
|
+
}
|
|
3851
|
+
)
|
|
3852
|
+
] }),
|
|
3853
|
+
/* @__PURE__ */ jsxs9(Box8, { sx: { display: "flex", flexDirection: "column", lineHeight: 1.2 }, children: [
|
|
3854
|
+
/* @__PURE__ */ jsx24(Typography7, { variant: "body2", sx: { fontWeight: 700, fontSize: "0.8125rem", lineHeight: 1.2 }, children: isExpired ? expiredLabel : getTitle(days) }),
|
|
3855
|
+
/* @__PURE__ */ jsx24(
|
|
3856
|
+
Typography7,
|
|
3857
|
+
{
|
|
3858
|
+
variant: "caption",
|
|
3859
|
+
sx: {
|
|
3860
|
+
fontSize: "0.6875rem",
|
|
3861
|
+
lineHeight: 1.2,
|
|
3862
|
+
fontWeight: upgradeVisible ? 600 : 400,
|
|
3863
|
+
color: status === "active" ? "text.secondary" : `${color}.main`
|
|
3864
|
+
},
|
|
3865
|
+
children: upgradeVisible ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
3866
|
+
upgradeLabel,
|
|
3867
|
+
" \u2192"
|
|
3868
|
+
] }) : subtitle
|
|
3869
|
+
}
|
|
3870
|
+
)
|
|
3871
|
+
] })
|
|
3872
|
+
]
|
|
3873
|
+
})
|
|
3874
|
+
);
|
|
3875
|
+
if (!usage) return badge;
|
|
3876
|
+
return /* @__PURE__ */ jsxs9(
|
|
3877
|
+
Box8,
|
|
3878
|
+
{
|
|
3879
|
+
ref: setAnchorEl,
|
|
3880
|
+
sx: { display: "inline-flex" },
|
|
3881
|
+
onMouseEnter: openPanel,
|
|
3882
|
+
onMouseLeave: closePanelSoon,
|
|
3883
|
+
onFocus: openPanel,
|
|
3884
|
+
onBlur: (event) => {
|
|
3885
|
+
if (!event.currentTarget.contains(event.relatedTarget)) closePanelSoon();
|
|
3886
|
+
},
|
|
3887
|
+
onKeyDown: (event) => {
|
|
3888
|
+
if (event.key === "Escape") setPanelOpen(false);
|
|
3889
|
+
},
|
|
3890
|
+
children: [
|
|
3891
|
+
badge,
|
|
3892
|
+
/* @__PURE__ */ jsx24(
|
|
3893
|
+
Popper,
|
|
3894
|
+
{
|
|
3895
|
+
open: panelOpen,
|
|
3896
|
+
anchorEl,
|
|
3897
|
+
placement: "bottom-end",
|
|
3898
|
+
disablePortal: true,
|
|
3899
|
+
popperOptions: POPPER_OPTIONS,
|
|
3900
|
+
sx: (theme) => ({ zIndex: theme.zIndex.tooltip }),
|
|
3901
|
+
children: /* @__PURE__ */ jsx24(TrialBadgeUsagePanel, { usage })
|
|
3902
|
+
}
|
|
3903
|
+
)
|
|
3904
|
+
]
|
|
3905
|
+
}
|
|
3906
|
+
);
|
|
3907
|
+
};
|
|
3908
|
+
TrialBadge.displayName = "TrialBadge";
|
|
3909
|
+
var TrialBadge_default = TrialBadge;
|
|
3910
|
+
|
|
3366
3911
|
// src/components/ThemeSwitcher/ThemeSelect.tsx
|
|
3367
3912
|
import { useId as useId3 } from "react";
|
|
3368
3913
|
import { Select, MenuItem as MenuItem2, FormControl, InputLabel } from "@mui/material";
|
|
3369
3914
|
import { visuallyHidden as visuallyHidden2 } from "@mui/utils";
|
|
3370
|
-
import { jsx as
|
|
3915
|
+
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3371
3916
|
function ThemeSelect({
|
|
3372
3917
|
size = "small",
|
|
3373
3918
|
showLabel = false,
|
|
@@ -3380,23 +3925,23 @@ function ThemeSelect({
|
|
|
3380
3925
|
const handleChange = (event) => {
|
|
3381
3926
|
setTheme(event.target.value);
|
|
3382
3927
|
};
|
|
3383
|
-
return /* @__PURE__ */
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
3928
|
+
return /* @__PURE__ */ jsxs10(FormControl, { size, variant, sx: __spreadValues({ minWidth: 120 }, sx), children: [
|
|
3929
|
+
/* @__PURE__ */ jsx25(InputLabel, { id: labelId, sx: showLabel ? void 0 : visuallyHidden2, children: label }),
|
|
3930
|
+
/* @__PURE__ */ jsx25(
|
|
3386
3931
|
Select,
|
|
3387
3932
|
{
|
|
3388
3933
|
labelId,
|
|
3389
3934
|
value: currentTheme,
|
|
3390
3935
|
onChange: handleChange,
|
|
3391
3936
|
label,
|
|
3392
|
-
children: themes.map((themeOption) => /* @__PURE__ */
|
|
3937
|
+
children: themes.map((themeOption) => /* @__PURE__ */ jsx25(MenuItem2, { value: themeOption.key, children: themeOption.label }, themeOption.key))
|
|
3393
3938
|
}
|
|
3394
3939
|
)
|
|
3395
3940
|
] });
|
|
3396
3941
|
}
|
|
3397
3942
|
|
|
3398
3943
|
// src/components/ThemeSwitcher/ThemeSwitcher.tsx
|
|
3399
|
-
import { Fragment as
|
|
3944
|
+
import { Fragment as Fragment4, jsx as jsx26 } from "react/jsx-runtime";
|
|
3400
3945
|
function ThemeSwitcher({
|
|
3401
3946
|
children,
|
|
3402
3947
|
size,
|
|
@@ -3407,9 +3952,9 @@ function ThemeSwitcher({
|
|
|
3407
3952
|
}) {
|
|
3408
3953
|
const themeSwitcherContext = useThemeSwitcher();
|
|
3409
3954
|
if (children) {
|
|
3410
|
-
return /* @__PURE__ */
|
|
3955
|
+
return /* @__PURE__ */ jsx26(Fragment4, { children: children(themeSwitcherContext) });
|
|
3411
3956
|
}
|
|
3412
|
-
return /* @__PURE__ */
|
|
3957
|
+
return /* @__PURE__ */ jsx26(
|
|
3413
3958
|
ThemeSelect,
|
|
3414
3959
|
{
|
|
3415
3960
|
size,
|
|
@@ -3421,31 +3966,365 @@ function ThemeSwitcher({
|
|
|
3421
3966
|
);
|
|
3422
3967
|
}
|
|
3423
3968
|
|
|
3424
|
-
// src/components/
|
|
3969
|
+
// src/components/TimeRangeFilter/TimeRangeFilter.tsx
|
|
3425
3970
|
import * as React7 from "react";
|
|
3971
|
+
import Alert from "@mui/material/Alert";
|
|
3972
|
+
import Box9 from "@mui/material/Box";
|
|
3973
|
+
import Button3 from "@mui/material/Button";
|
|
3974
|
+
import MenuItem3 from "@mui/material/MenuItem";
|
|
3975
|
+
import MenuList from "@mui/material/MenuList";
|
|
3976
|
+
import Popover from "@mui/material/Popover";
|
|
3977
|
+
import Stack from "@mui/material/Stack";
|
|
3978
|
+
import Typography8 from "@mui/material/Typography";
|
|
3979
|
+
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
3980
|
+
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
3981
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
3982
|
+
import { TimePicker } from "@mui/x-date-pickers/TimePicker";
|
|
3983
|
+
import { ChevronDown as ChevronDown2 } from "@wso2/oxygen-ui-icons-react";
|
|
3984
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3985
|
+
var HOUR_MS = 60 * 60 * 1e3;
|
|
3986
|
+
var DAY_MS = 24 * HOUR_MS;
|
|
3987
|
+
var DEFAULT_PRESETS = [
|
|
3988
|
+
{ id: "1h", label: "Last hour", durationMs: HOUR_MS },
|
|
3989
|
+
{ id: "24h", label: "Last 24 hours", durationMs: DAY_MS },
|
|
3990
|
+
{ id: "7d", label: "Last 7 days", durationMs: 7 * DAY_MS },
|
|
3991
|
+
{ id: "30d", label: "Last 30 days", durationMs: 30 * DAY_MS }
|
|
3992
|
+
];
|
|
3993
|
+
var CUSTOM_ID = "custom";
|
|
3994
|
+
var describeSpan = (ms) => {
|
|
3995
|
+
const unit = (count, name) => `${count} ${name}${count === 1 ? "" : "s"}`;
|
|
3996
|
+
if (ms % DAY_MS === 0) return unit(ms / DAY_MS, "day");
|
|
3997
|
+
if (ms % HOUR_MS === 0) return unit(ms / HOUR_MS, "hour");
|
|
3998
|
+
return unit(Math.max(1, Math.round(ms / 6e4)), "minute");
|
|
3999
|
+
};
|
|
4000
|
+
var PRESET_END_TOLERANCE_MS = 5 * 60 * 1e3;
|
|
4001
|
+
var solidPaperSx = (theme) => {
|
|
4002
|
+
var _a;
|
|
4003
|
+
const palette = ((_a = theme.vars) != null ? _a : theme).palette;
|
|
4004
|
+
const channel = palette.background.paperChannel;
|
|
4005
|
+
return {
|
|
4006
|
+
backgroundColor: channel ? `rgb(${channel})` : palette.background.default,
|
|
4007
|
+
backdropFilter: "none",
|
|
4008
|
+
WebkitBackdropFilter: "none"
|
|
4009
|
+
};
|
|
4010
|
+
};
|
|
4011
|
+
var toPickerDate = (date) => new Date(
|
|
4012
|
+
date.getUTCFullYear(),
|
|
4013
|
+
date.getUTCMonth(),
|
|
4014
|
+
date.getUTCDate(),
|
|
4015
|
+
date.getUTCHours(),
|
|
4016
|
+
date.getUTCMinutes(),
|
|
4017
|
+
date.getUTCSeconds()
|
|
4018
|
+
);
|
|
4019
|
+
var fromPickerDate = (date) => new Date(
|
|
4020
|
+
Date.UTC(
|
|
4021
|
+
date.getFullYear(),
|
|
4022
|
+
date.getMonth(),
|
|
4023
|
+
date.getDate(),
|
|
4024
|
+
date.getHours(),
|
|
4025
|
+
date.getMinutes(),
|
|
4026
|
+
date.getSeconds()
|
|
4027
|
+
)
|
|
4028
|
+
);
|
|
4029
|
+
var toRangeEnd = (date) => {
|
|
4030
|
+
const picker = toPickerDate(date);
|
|
4031
|
+
return { date: picker, time: picker };
|
|
4032
|
+
};
|
|
4033
|
+
var validDate = (date) => date && !Number.isNaN(date.getTime()) ? date : null;
|
|
4034
|
+
var TimeRangeFilter = React7.forwardRef(
|
|
4035
|
+
(_a, ref) => {
|
|
4036
|
+
var _b = _a, {
|
|
4037
|
+
value,
|
|
4038
|
+
onChange,
|
|
4039
|
+
presets = DEFAULT_PRESETS,
|
|
4040
|
+
maxRangeMs,
|
|
4041
|
+
label = "Time range",
|
|
4042
|
+
customRangeLabel = "Custom",
|
|
4043
|
+
panelTitle = "Select date range",
|
|
4044
|
+
fromLabel = "Start from (UTC)",
|
|
4045
|
+
untilLabel = "End on (UTC)",
|
|
4046
|
+
dateLabel = "Date",
|
|
4047
|
+
timeLabel = "Time",
|
|
4048
|
+
applyLabel = "Apply",
|
|
4049
|
+
cancelLabel = "Cancel",
|
|
4050
|
+
invalidRangeLabel = "Choose a valid time range.",
|
|
4051
|
+
rangeTooLongLabel,
|
|
4052
|
+
adapterLocale,
|
|
4053
|
+
localeText,
|
|
4054
|
+
dateFormat = "dd MMM, yyyy",
|
|
4055
|
+
timeFormat = "HH:mm:ss",
|
|
4056
|
+
open: openProp,
|
|
4057
|
+
onOpen,
|
|
4058
|
+
onClose,
|
|
4059
|
+
anchorEl,
|
|
4060
|
+
onClick,
|
|
4061
|
+
sx
|
|
4062
|
+
} = _b, buttonProps = __objRest(_b, [
|
|
4063
|
+
"value",
|
|
4064
|
+
"onChange",
|
|
4065
|
+
"presets",
|
|
4066
|
+
"maxRangeMs",
|
|
4067
|
+
"label",
|
|
4068
|
+
"customRangeLabel",
|
|
4069
|
+
"panelTitle",
|
|
4070
|
+
"fromLabel",
|
|
4071
|
+
"untilLabel",
|
|
4072
|
+
"dateLabel",
|
|
4073
|
+
"timeLabel",
|
|
4074
|
+
"applyLabel",
|
|
4075
|
+
"cancelLabel",
|
|
4076
|
+
"invalidRangeLabel",
|
|
4077
|
+
"rangeTooLongLabel",
|
|
4078
|
+
"adapterLocale",
|
|
4079
|
+
"localeText",
|
|
4080
|
+
"dateFormat",
|
|
4081
|
+
"timeFormat",
|
|
4082
|
+
"open",
|
|
4083
|
+
"onOpen",
|
|
4084
|
+
"onClose",
|
|
4085
|
+
"anchorEl",
|
|
4086
|
+
"onClick",
|
|
4087
|
+
"sx"
|
|
4088
|
+
]);
|
|
4089
|
+
var _a2, _b2;
|
|
4090
|
+
const panelId = React7.useId();
|
|
4091
|
+
const panelHeadingId = React7.useId();
|
|
4092
|
+
const fromHeadingId = React7.useId();
|
|
4093
|
+
const untilHeadingId = React7.useId();
|
|
4094
|
+
const triggerRef = React7.useRef(null);
|
|
4095
|
+
const setTriggerRef = (element) => {
|
|
4096
|
+
triggerRef.current = element;
|
|
4097
|
+
if (typeof ref === "function") ref(element);
|
|
4098
|
+
else if (ref) ref.current = element;
|
|
4099
|
+
};
|
|
4100
|
+
const [ownOpen, setOwnOpen] = React7.useState(false);
|
|
4101
|
+
const open = openProp != null ? openProp : ownOpen;
|
|
4102
|
+
const [customOpen, setCustomOpen] = React7.useState(false);
|
|
4103
|
+
const [selection, setSelection] = React7.useState(null);
|
|
4104
|
+
const [from, setFrom] = React7.useState({ date: null, time: null });
|
|
4105
|
+
const [until, setUntil] = React7.useState({ date: null, time: null });
|
|
4106
|
+
const [error, setError] = React7.useState("");
|
|
4107
|
+
const activeId = !value ? null : selection && selection.start === value.start.getTime() && selection.end === value.end.getTime() ? selection.id : (_b2 = (_a2 = presets.find(
|
|
4108
|
+
(preset) => preset.durationMs === value.end.getTime() - value.start.getTime() && Math.abs(Date.now() - value.end.getTime()) <= PRESET_END_TOLERANCE_MS
|
|
4109
|
+
)) == null ? void 0 : _a2.id) != null ? _b2 : CUSTOM_ID;
|
|
4110
|
+
const close = () => {
|
|
4111
|
+
if (openProp === void 0) setOwnOpen(false);
|
|
4112
|
+
onClose == null ? void 0 : onClose();
|
|
4113
|
+
};
|
|
4114
|
+
const prepare = () => {
|
|
4115
|
+
var _a3, _b3;
|
|
4116
|
+
const end = (_a3 = value == null ? void 0 : value.end) != null ? _a3 : /* @__PURE__ */ new Date();
|
|
4117
|
+
const start = (_b3 = value == null ? void 0 : value.start) != null ? _b3 : new Date(end.getTime() - DAY_MS);
|
|
4118
|
+
setFrom(toRangeEnd(start));
|
|
4119
|
+
setUntil(toRangeEnd(end));
|
|
4120
|
+
setError("");
|
|
4121
|
+
setCustomOpen(activeId === CUSTOM_ID);
|
|
4122
|
+
};
|
|
4123
|
+
const latestPrepare = React7.useRef(prepare);
|
|
4124
|
+
React7.useLayoutEffect(() => {
|
|
4125
|
+
latestPrepare.current = prepare;
|
|
4126
|
+
});
|
|
4127
|
+
const wasOpen = React7.useRef(false);
|
|
4128
|
+
React7.useLayoutEffect(() => {
|
|
4129
|
+
if (open && !wasOpen.current) latestPrepare.current();
|
|
4130
|
+
wasOpen.current = open;
|
|
4131
|
+
}, [open]);
|
|
4132
|
+
const editFrom = (next) => {
|
|
4133
|
+
setFrom(next);
|
|
4134
|
+
setError("");
|
|
4135
|
+
};
|
|
4136
|
+
const editUntil = (next) => {
|
|
4137
|
+
setUntil(next);
|
|
4138
|
+
setError("");
|
|
4139
|
+
};
|
|
4140
|
+
const applyPreset = (preset) => {
|
|
4141
|
+
const end = /* @__PURE__ */ new Date();
|
|
4142
|
+
const start = new Date(end.getTime() - preset.durationMs);
|
|
4143
|
+
setSelection({ id: preset.id, start: start.getTime(), end: end.getTime() });
|
|
4144
|
+
close();
|
|
4145
|
+
onChange({ start, end });
|
|
4146
|
+
};
|
|
4147
|
+
const instantOf = (rangeEnd2) => {
|
|
4148
|
+
const date = validDate(rangeEnd2.date);
|
|
4149
|
+
const time = validDate(rangeEnd2.time);
|
|
4150
|
+
if (!date || !time) return null;
|
|
4151
|
+
return fromPickerDate(
|
|
4152
|
+
new Date(
|
|
4153
|
+
date.getFullYear(),
|
|
4154
|
+
date.getMonth(),
|
|
4155
|
+
date.getDate(),
|
|
4156
|
+
time.getHours(),
|
|
4157
|
+
time.getMinutes(),
|
|
4158
|
+
time.getSeconds()
|
|
4159
|
+
)
|
|
4160
|
+
);
|
|
4161
|
+
};
|
|
4162
|
+
const applyCustomRange = () => {
|
|
4163
|
+
const start = instantOf(from);
|
|
4164
|
+
const end = instantOf(until);
|
|
4165
|
+
const span = start && end ? end.getTime() - start.getTime() : NaN;
|
|
4166
|
+
if (!start || !end || !Number.isFinite(span) || span <= 0) {
|
|
4167
|
+
setError(invalidRangeLabel);
|
|
4168
|
+
return;
|
|
4169
|
+
}
|
|
4170
|
+
if (maxRangeMs !== void 0 && span > maxRangeMs) {
|
|
4171
|
+
setError(rangeTooLongLabel != null ? rangeTooLongLabel : `Choose a range of at most ${describeSpan(maxRangeMs)}.`);
|
|
4172
|
+
return;
|
|
4173
|
+
}
|
|
4174
|
+
setError("");
|
|
4175
|
+
setSelection({ id: CUSTOM_ID, start: start.getTime(), end: end.getTime() });
|
|
4176
|
+
close();
|
|
4177
|
+
onChange({ start, end });
|
|
4178
|
+
};
|
|
4179
|
+
const rangeEnd = (heading, headingId, end, setEnd) => /* @__PURE__ */ jsxs11(Box9, { role: "group", "aria-labelledby": headingId, children: [
|
|
4180
|
+
/* @__PURE__ */ jsx27(Typography8, { id: headingId, variant: "body2", sx: { mb: 1 }, children: heading }),
|
|
4181
|
+
/* @__PURE__ */ jsxs11(Stack, { direction: "row", gap: 1, children: [
|
|
4182
|
+
/* @__PURE__ */ jsx27(
|
|
4183
|
+
DatePicker,
|
|
4184
|
+
{
|
|
4185
|
+
label: dateLabel,
|
|
4186
|
+
format: dateFormat,
|
|
4187
|
+
value: end.date,
|
|
4188
|
+
onChange: (next) => setEnd(__spreadProps(__spreadValues({}, end), { date: next })),
|
|
4189
|
+
slotProps: {
|
|
4190
|
+
textField: { size: "small", sx: { flex: 1, minWidth: 150 } },
|
|
4191
|
+
desktopPaper: { sx: solidPaperSx },
|
|
4192
|
+
mobilePaper: { sx: solidPaperSx }
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
),
|
|
4196
|
+
/* @__PURE__ */ jsx27(
|
|
4197
|
+
TimePicker,
|
|
4198
|
+
{
|
|
4199
|
+
label: timeLabel,
|
|
4200
|
+
ampm: false,
|
|
4201
|
+
views: ["hours", "minutes", "seconds"],
|
|
4202
|
+
format: timeFormat,
|
|
4203
|
+
value: end.time,
|
|
4204
|
+
onChange: (next) => setEnd(__spreadProps(__spreadValues({}, end), { time: next })),
|
|
4205
|
+
slotProps: {
|
|
4206
|
+
textField: { size: "small", sx: { width: 130 } },
|
|
4207
|
+
desktopPaper: { sx: solidPaperSx },
|
|
4208
|
+
mobilePaper: { sx: solidPaperSx }
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
)
|
|
4212
|
+
] })
|
|
4213
|
+
] });
|
|
4214
|
+
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
4215
|
+
/* @__PURE__ */ jsx27(
|
|
4216
|
+
Button3,
|
|
4217
|
+
__spreadProps(__spreadValues({
|
|
4218
|
+
size: "small",
|
|
4219
|
+
variant: "text",
|
|
4220
|
+
color: "inherit"
|
|
4221
|
+
}, buttonProps), {
|
|
4222
|
+
sx: [{ textTransform: "none" }, ...Array.isArray(sx) ? sx : [sx]],
|
|
4223
|
+
ref: setTriggerRef,
|
|
4224
|
+
"aria-haspopup": "dialog",
|
|
4225
|
+
"aria-expanded": open,
|
|
4226
|
+
endIcon: /* @__PURE__ */ jsx27(ChevronDown2, { size: 14 }),
|
|
4227
|
+
onClick: (event) => {
|
|
4228
|
+
onClick == null ? void 0 : onClick(event);
|
|
4229
|
+
if (openProp === void 0) setOwnOpen(true);
|
|
4230
|
+
onOpen == null ? void 0 : onOpen();
|
|
4231
|
+
},
|
|
4232
|
+
children: label
|
|
4233
|
+
})
|
|
4234
|
+
),
|
|
4235
|
+
/* @__PURE__ */ jsx27(
|
|
4236
|
+
Popover,
|
|
4237
|
+
{
|
|
4238
|
+
anchorEl: anchorEl != null ? anchorEl : triggerRef.current,
|
|
4239
|
+
open,
|
|
4240
|
+
onClose: close,
|
|
4241
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4242
|
+
slotProps: { paper: { sx: solidPaperSx, role: "dialog", "aria-label": label } },
|
|
4243
|
+
children: /* @__PURE__ */ jsxs11(Box9, { sx: { display: "flex", flexWrap: "wrap" }, children: [
|
|
4244
|
+
/* @__PURE__ */ jsxs11(MenuList, { "aria-label": label, autoFocusItem: open, sx: { minWidth: 180, py: 1, alignSelf: "flex-start" }, children: [
|
|
4245
|
+
presets.map((preset) => /* @__PURE__ */ jsx27(
|
|
4246
|
+
MenuItem3,
|
|
4247
|
+
{
|
|
4248
|
+
selected: activeId === preset.id && !customOpen,
|
|
4249
|
+
onClick: () => applyPreset(preset),
|
|
4250
|
+
children: preset.label
|
|
4251
|
+
},
|
|
4252
|
+
preset.id
|
|
4253
|
+
)),
|
|
4254
|
+
/* @__PURE__ */ jsx27(
|
|
4255
|
+
MenuItem3,
|
|
4256
|
+
{
|
|
4257
|
+
selected: activeId === CUSTOM_ID || customOpen,
|
|
4258
|
+
"aria-controls": customOpen ? panelId : void 0,
|
|
4259
|
+
"aria-expanded": customOpen,
|
|
4260
|
+
onClick: () => setCustomOpen(true),
|
|
4261
|
+
children: customRangeLabel
|
|
4262
|
+
}
|
|
4263
|
+
)
|
|
4264
|
+
] }),
|
|
4265
|
+
customOpen && /* @__PURE__ */ jsxs11(
|
|
4266
|
+
Stack,
|
|
4267
|
+
{
|
|
4268
|
+
id: panelId,
|
|
4269
|
+
role: "group",
|
|
4270
|
+
"aria-labelledby": panelHeadingId,
|
|
4271
|
+
gap: 2,
|
|
4272
|
+
sx: {
|
|
4273
|
+
p: 2,
|
|
4274
|
+
width: 380,
|
|
4275
|
+
maxWidth: "100%",
|
|
4276
|
+
borderTop: { xs: 1, sm: 0 },
|
|
4277
|
+
borderLeft: { xs: 0, sm: 1 },
|
|
4278
|
+
borderColor: "divider"
|
|
4279
|
+
},
|
|
4280
|
+
children: [
|
|
4281
|
+
/* @__PURE__ */ jsx27(Typography8, { id: panelHeadingId, variant: "subtitle2", children: panelTitle }),
|
|
4282
|
+
/* @__PURE__ */ jsxs11(LocalizationProvider, { dateAdapter: AdapterDateFns, adapterLocale, localeText, children: [
|
|
4283
|
+
rangeEnd(fromLabel, fromHeadingId, from, editFrom),
|
|
4284
|
+
rangeEnd(untilLabel, untilHeadingId, until, editUntil)
|
|
4285
|
+
] }),
|
|
4286
|
+
error && /* @__PURE__ */ jsx27(Alert, { severity: "error", children: error }),
|
|
4287
|
+
/* @__PURE__ */ jsxs11(Stack, { direction: "row", justifyContent: "flex-end", gap: 1, children: [
|
|
4288
|
+
/* @__PURE__ */ jsx27(Button3, { variant: "outlined", color: "inherit", onClick: close, sx: { textTransform: "none" }, children: cancelLabel }),
|
|
4289
|
+
/* @__PURE__ */ jsx27(Button3, { variant: "contained", onClick: applyCustomRange, sx: { textTransform: "none" }, children: applyLabel })
|
|
4290
|
+
] })
|
|
4291
|
+
]
|
|
4292
|
+
}
|
|
4293
|
+
)
|
|
4294
|
+
] })
|
|
4295
|
+
}
|
|
4296
|
+
)
|
|
4297
|
+
] });
|
|
4298
|
+
}
|
|
4299
|
+
);
|
|
4300
|
+
TimeRangeFilter.displayName = "TimeRangeFilter";
|
|
4301
|
+
var TimeRangeFilter_default = TimeRangeFilter;
|
|
4302
|
+
|
|
4303
|
+
// src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
|
|
4304
|
+
import * as React9 from "react";
|
|
3426
4305
|
import TextField2 from "@mui/material/TextField";
|
|
3427
4306
|
import InputAdornment2 from "@mui/material/InputAdornment";
|
|
3428
|
-
import
|
|
4307
|
+
import Box10 from "@mui/material/Box";
|
|
3429
4308
|
import IconButton2 from "@mui/material/IconButton";
|
|
3430
|
-
import
|
|
3431
|
-
import
|
|
4309
|
+
import Popover2 from "@mui/material/Popover";
|
|
4310
|
+
import Typography9 from "@mui/material/Typography";
|
|
3432
4311
|
import Divider from "@mui/material/Divider";
|
|
3433
|
-
import
|
|
3434
|
-
import
|
|
4312
|
+
import Button4 from "@mui/material/Button";
|
|
4313
|
+
import Stack2 from "@mui/material/Stack";
|
|
3435
4314
|
import FormControl2 from "@mui/material/FormControl";
|
|
3436
4315
|
import InputLabel2 from "@mui/material/InputLabel";
|
|
3437
4316
|
import Select2 from "@mui/material/Select";
|
|
3438
|
-
import
|
|
4317
|
+
import MenuItem4 from "@mui/material/MenuItem";
|
|
3439
4318
|
import { ListFilter } from "@wso2/oxygen-ui-icons-react";
|
|
3440
4319
|
|
|
3441
4320
|
// src/components/SearchBar/SearchBarBase.tsx
|
|
3442
|
-
import * as
|
|
4321
|
+
import * as React8 from "react";
|
|
3443
4322
|
import TextField from "@mui/material/TextField";
|
|
3444
4323
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
3445
4324
|
import { Search } from "@wso2/oxygen-ui-icons-react";
|
|
3446
|
-
import { jsx as
|
|
4325
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3447
4326
|
var hasMeaningfulAriaValue = (value) => typeof value === "string" && value.trim().length > 0;
|
|
3448
|
-
var SearchBarBase =
|
|
4327
|
+
var SearchBarBase = React8.forwardRef(function SearchBarBase2(_a, ref) {
|
|
3449
4328
|
var _b = _a, {
|
|
3450
4329
|
placeholder = "Search",
|
|
3451
4330
|
endAdornment,
|
|
@@ -3468,7 +4347,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3468
4347
|
const hasAccessibleName = hasMeaningfulLabel || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-label"]) || hasMeaningfulAriaValue(htmlInputSlotProps == null ? void 0 : htmlInputSlotProps["aria-labelledby"]);
|
|
3469
4348
|
const shouldInjectPlaceholderLabel = !hasAccessibleName && hasMeaningfulAriaValue(placeholder);
|
|
3470
4349
|
const htmlInput = shouldInjectPlaceholderLabel || (slotProps == null ? void 0 : slotProps.htmlInput) || hasMeaningfulAriaValue(ariaLabel) || hasMeaningfulAriaValue(ariaLabelledBy) ? __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, slotProps == null ? void 0 : slotProps.htmlInput), hasMeaningfulAriaValue(ariaLabelledBy) ? { "aria-labelledby": ariaLabelledBy } : null), hasMeaningfulAriaValue(ariaLabel) ? { "aria-label": ariaLabel } : null), shouldInjectPlaceholderLabel ? { "aria-label": placeholder } : null) : void 0;
|
|
3471
|
-
return /* @__PURE__ */
|
|
4350
|
+
return /* @__PURE__ */ jsx28(
|
|
3472
4351
|
TextField,
|
|
3473
4352
|
__spreadProps(__spreadValues({}, props), {
|
|
3474
4353
|
ref,
|
|
@@ -3478,7 +4357,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3478
4357
|
size: "small",
|
|
3479
4358
|
slotProps: __spreadProps(__spreadValues(__spreadValues({}, slotProps), htmlInput ? { htmlInput } : null), {
|
|
3480
4359
|
input: __spreadProps(__spreadValues({}, slotProps == null ? void 0 : slotProps.input), {
|
|
3481
|
-
startAdornment: /* @__PURE__ */
|
|
4360
|
+
startAdornment: /* @__PURE__ */ jsx28(InputAdornment, { position: "start", children: /* @__PURE__ */ jsx28(Search, { fontSize: "small", "aria-hidden": "true" }) }),
|
|
3482
4361
|
endAdornment
|
|
3483
4362
|
})
|
|
3484
4363
|
}),
|
|
@@ -3495,7 +4374,7 @@ var SearchBarBase = React6.forwardRef(function SearchBarBase2(_a, ref) {
|
|
|
3495
4374
|
});
|
|
3496
4375
|
|
|
3497
4376
|
// src/components/SearchBar/SearchBarWithAdvancedFilter.tsx
|
|
3498
|
-
import { Fragment as
|
|
4377
|
+
import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3499
4378
|
function SearchBarWithAdvancedFilter(_a) {
|
|
3500
4379
|
var _b = _a, {
|
|
3501
4380
|
value,
|
|
@@ -3522,7 +4401,7 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3522
4401
|
"popoverWidth",
|
|
3523
4402
|
"sx"
|
|
3524
4403
|
]);
|
|
3525
|
-
const [anchorEl, setAnchorEl] =
|
|
4404
|
+
const [anchorEl, setAnchorEl] = React9.useState(null);
|
|
3526
4405
|
const open = Boolean(anchorEl);
|
|
3527
4406
|
const handleInputChange = (e) => {
|
|
3528
4407
|
onChange(e.target.value);
|
|
@@ -3548,17 +4427,17 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3548
4427
|
handleClose();
|
|
3549
4428
|
};
|
|
3550
4429
|
const popoverId = open ? "advanced-search-popover" : void 0;
|
|
3551
|
-
return /* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
4431
|
+
/* @__PURE__ */ jsx29(
|
|
3553
4432
|
SearchBarBase,
|
|
3554
4433
|
__spreadProps(__spreadValues({}, props), {
|
|
3555
4434
|
value,
|
|
3556
4435
|
onChange: handleInputChange,
|
|
3557
4436
|
placeholder,
|
|
3558
4437
|
sx,
|
|
3559
|
-
endAdornment: /* @__PURE__ */
|
|
3560
|
-
/* @__PURE__ */
|
|
3561
|
-
/* @__PURE__ */
|
|
4438
|
+
endAdornment: /* @__PURE__ */ jsx29(InputAdornment2, { position: "end", sx: { m: 0 }, children: /* @__PURE__ */ jsxs12(Box10, { sx: { display: "flex", alignItems: "center", height: "100%" }, children: [
|
|
4439
|
+
/* @__PURE__ */ jsx29(Divider, { orientation: "vertical", flexItem: true, sx: { mx: 0.5 } }),
|
|
4440
|
+
/* @__PURE__ */ jsx29(
|
|
3562
4441
|
IconButton2,
|
|
3563
4442
|
{
|
|
3564
4443
|
"aria-describedby": popoverId,
|
|
@@ -3566,14 +4445,14 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3566
4445
|
onClick: handleOpen,
|
|
3567
4446
|
size: "small",
|
|
3568
4447
|
sx: { mx: 0.5 },
|
|
3569
|
-
children: /* @__PURE__ */
|
|
4448
|
+
children: /* @__PURE__ */ jsx29(ListFilter, { fontSize: "tiny" })
|
|
3570
4449
|
}
|
|
3571
4450
|
)
|
|
3572
4451
|
] }) })
|
|
3573
4452
|
})
|
|
3574
4453
|
),
|
|
3575
|
-
/* @__PURE__ */
|
|
3576
|
-
|
|
4454
|
+
/* @__PURE__ */ jsxs12(
|
|
4455
|
+
Popover2,
|
|
3577
4456
|
{
|
|
3578
4457
|
id: popoverId,
|
|
3579
4458
|
open,
|
|
@@ -3589,45 +4468,45 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3589
4468
|
}
|
|
3590
4469
|
},
|
|
3591
4470
|
children: [
|
|
3592
|
-
/* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3596
|
-
/* @__PURE__ */
|
|
4471
|
+
/* @__PURE__ */ jsx29(Typography9, { variant: "subtitle2", sx: { fontWeight: 600 }, children: "Advanced search" }),
|
|
4472
|
+
/* @__PURE__ */ jsx29(Divider, { sx: { my: 1 } }),
|
|
4473
|
+
/* @__PURE__ */ jsxs12(Stack2, { spacing: 2, marginTop: 2, children: [
|
|
4474
|
+
/* @__PURE__ */ jsxs12(FormControl2, { fullWidth: true, size: "small", children: [
|
|
4475
|
+
/* @__PURE__ */ jsxs12(InputLabel2, { id: "adv-filter-attribute-label", children: [
|
|
3597
4476
|
"Filter attribute",
|
|
3598
4477
|
" ",
|
|
3599
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsx29(Box10, { component: "span", sx: { color: "error.main" }, children: "*" })
|
|
3600
4479
|
] }),
|
|
3601
|
-
/* @__PURE__ */
|
|
4480
|
+
/* @__PURE__ */ jsx29(
|
|
3602
4481
|
Select2,
|
|
3603
4482
|
{
|
|
3604
4483
|
labelId: "adv-filter-attribute-label",
|
|
3605
4484
|
value: advancedFilter.attribute,
|
|
3606
4485
|
label: "Filter attribute *",
|
|
3607
4486
|
onChange: handleAttrChange,
|
|
3608
|
-
children: attributeOptions.map((opt) => /* @__PURE__ */
|
|
4487
|
+
children: attributeOptions.map((opt) => /* @__PURE__ */ jsx29(MenuItem4, { value: opt.value, children: opt.label }, opt.value))
|
|
3609
4488
|
}
|
|
3610
4489
|
)
|
|
3611
4490
|
] }),
|
|
3612
|
-
/* @__PURE__ */
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
4491
|
+
/* @__PURE__ */ jsxs12(Box10, { sx: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 2 }, children: [
|
|
4492
|
+
/* @__PURE__ */ jsxs12(FormControl2, { fullWidth: true, size: "small", children: [
|
|
4493
|
+
/* @__PURE__ */ jsxs12(InputLabel2, { id: "adv-filter-condition-label", children: [
|
|
3615
4494
|
"Filter condition",
|
|
3616
4495
|
" ",
|
|
3617
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsx29(Box10, { component: "span", sx: { color: "error.main" }, children: "*" })
|
|
3618
4497
|
] }),
|
|
3619
|
-
/* @__PURE__ */
|
|
4498
|
+
/* @__PURE__ */ jsx29(
|
|
3620
4499
|
Select2,
|
|
3621
4500
|
{
|
|
3622
4501
|
labelId: "adv-filter-condition-label",
|
|
3623
4502
|
value: advancedFilter.condition,
|
|
3624
4503
|
label: "Filter condition *",
|
|
3625
4504
|
onChange: handleCondChange,
|
|
3626
|
-
children: conditionOptions.map((opt) => /* @__PURE__ */
|
|
4505
|
+
children: conditionOptions.map((opt) => /* @__PURE__ */ jsx29(MenuItem4, { value: opt.value, children: opt.label }, opt.value))
|
|
3627
4506
|
}
|
|
3628
4507
|
)
|
|
3629
4508
|
] }),
|
|
3630
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsx29(
|
|
3631
4510
|
TextField2,
|
|
3632
4511
|
{
|
|
3633
4512
|
size: "small",
|
|
@@ -3639,8 +4518,8 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3639
4518
|
}
|
|
3640
4519
|
)
|
|
3641
4520
|
] }),
|
|
3642
|
-
/* @__PURE__ */
|
|
3643
|
-
|
|
4521
|
+
/* @__PURE__ */ jsx29(Box10, { sx: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ jsx29(
|
|
4522
|
+
Button4,
|
|
3644
4523
|
{
|
|
3645
4524
|
variant: "contained",
|
|
3646
4525
|
onClick: handleAdvancedSearch,
|
|
@@ -3658,11 +4537,11 @@ function SearchBarWithAdvancedFilter(_a) {
|
|
|
3658
4537
|
var SearchBarWithAdvancedFilter_default = SearchBarWithAdvancedFilter;
|
|
3659
4538
|
|
|
3660
4539
|
// src/components/SearchBar/SearchBar.tsx
|
|
3661
|
-
import * as
|
|
3662
|
-
import { jsx as
|
|
3663
|
-
var SearchBar =
|
|
4540
|
+
import * as React10 from "react";
|
|
4541
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4542
|
+
var SearchBar = React10.forwardRef(function SearchBar2(_a, ref) {
|
|
3664
4543
|
var _b = _a, { placeholder = "Search" } = _b, props = __objRest(_b, ["placeholder"]);
|
|
3665
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ jsx30(
|
|
3666
4545
|
SearchBarBase,
|
|
3667
4546
|
__spreadProps(__spreadValues({}, props), {
|
|
3668
4547
|
ref,
|
|
@@ -3673,17 +4552,17 @@ var SearchBar = React8.forwardRef(function SearchBar2(_a, ref) {
|
|
|
3673
4552
|
var SearchBar_default = SearchBar;
|
|
3674
4553
|
|
|
3675
4554
|
// src/components/Header/Header.tsx
|
|
3676
|
-
import * as
|
|
4555
|
+
import * as React14 from "react";
|
|
3677
4556
|
import AppBar from "@mui/material/AppBar";
|
|
3678
4557
|
import Toolbar from "@mui/material/Toolbar";
|
|
3679
|
-
import
|
|
4558
|
+
import Box15 from "@mui/material/Box";
|
|
3680
4559
|
import { styled as styled22 } from "@mui/material/styles";
|
|
3681
4560
|
|
|
3682
4561
|
// src/components/Header/context.ts
|
|
3683
|
-
import * as
|
|
3684
|
-
var HeaderContext =
|
|
4562
|
+
import * as React11 from "react";
|
|
4563
|
+
var HeaderContext = React11.createContext(null);
|
|
3685
4564
|
var useHeader = () => {
|
|
3686
|
-
const context =
|
|
4565
|
+
const context = React11.useContext(HeaderContext);
|
|
3687
4566
|
if (!context) {
|
|
3688
4567
|
throw new Error("Header compound components must be used within Header");
|
|
3689
4568
|
}
|
|
@@ -3691,26 +4570,26 @@ var useHeader = () => {
|
|
|
3691
4570
|
};
|
|
3692
4571
|
|
|
3693
4572
|
// src/components/Header/HeaderToggle.tsx
|
|
3694
|
-
import * as
|
|
4573
|
+
import * as React13 from "react";
|
|
3695
4574
|
import IconButton3 from "@mui/material/IconButton";
|
|
3696
4575
|
import Tooltip3 from "@mui/material/Tooltip";
|
|
3697
4576
|
import { styled as styled16 } from "@mui/material/styles";
|
|
3698
4577
|
import { Menu as Menu2 } from "@wso2/oxygen-ui-icons-react";
|
|
3699
4578
|
|
|
3700
4579
|
// src/components/AppShell/context.tsx
|
|
3701
|
-
import * as
|
|
3702
|
-
import { jsx as
|
|
3703
|
-
var AppShellContext =
|
|
4580
|
+
import * as React12 from "react";
|
|
4581
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4582
|
+
var AppShellContext = React12.createContext(void 0);
|
|
3704
4583
|
var AppShellProvider = ({
|
|
3705
4584
|
children,
|
|
3706
4585
|
value
|
|
3707
4586
|
}) => {
|
|
3708
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx31(AppShellContext.Provider, { value, children });
|
|
3709
4588
|
};
|
|
3710
4589
|
AppShellProvider.displayName = "AppShellProvider";
|
|
3711
4590
|
|
|
3712
4591
|
// src/components/Header/HeaderToggle.tsx
|
|
3713
|
-
import { jsx as
|
|
4592
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3714
4593
|
var HeaderToggleRoot = styled16(IconButton3, {
|
|
3715
4594
|
name: "MuiHeader",
|
|
3716
4595
|
slot: "Toggle"
|
|
@@ -3727,11 +4606,11 @@ var HeaderToggle = ({
|
|
|
3727
4606
|
sx
|
|
3728
4607
|
}) => {
|
|
3729
4608
|
var _a, _b;
|
|
3730
|
-
const appShellContext =
|
|
4609
|
+
const appShellContext = React13.useContext(AppShellContext);
|
|
3731
4610
|
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
3732
4611
|
const onToggle = (_b = onToggleProp != null ? onToggleProp : appShellContext == null ? void 0 : appShellContext.actions.toggleSidebar) != null ? _b : (() => {
|
|
3733
4612
|
});
|
|
3734
|
-
return /* @__PURE__ */
|
|
4613
|
+
return /* @__PURE__ */ jsx32(Tooltip3, { title: collapsed ? expandLabel : collapseLabel, children: /* @__PURE__ */ jsx32(
|
|
3735
4614
|
HeaderToggleRoot,
|
|
3736
4615
|
{
|
|
3737
4616
|
onClick: onToggle,
|
|
@@ -3739,21 +4618,21 @@ var HeaderToggle = ({
|
|
|
3739
4618
|
sx,
|
|
3740
4619
|
"aria-label": collapsed ? expandLabel : collapseLabel,
|
|
3741
4620
|
"aria-expanded": !collapsed,
|
|
3742
|
-
children: /* @__PURE__ */
|
|
4621
|
+
children: /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: collapsed ? expandIcon || /* @__PURE__ */ jsx32(Menu2, { size: 20 }) : collapseIcon || /* @__PURE__ */ jsx32(Menu2, { size: 20 }) })
|
|
3743
4622
|
}
|
|
3744
4623
|
) });
|
|
3745
4624
|
};
|
|
3746
4625
|
|
|
3747
4626
|
// src/components/Header/HeaderBrand.tsx
|
|
3748
|
-
import
|
|
4627
|
+
import Box12 from "@mui/material/Box";
|
|
3749
4628
|
import ButtonBase from "@mui/material/ButtonBase";
|
|
3750
4629
|
import { styled as styled19 } from "@mui/material/styles";
|
|
3751
4630
|
|
|
3752
4631
|
// src/components/Header/HeaderBrandLogo.tsx
|
|
3753
|
-
import
|
|
4632
|
+
import Box11 from "@mui/material/Box";
|
|
3754
4633
|
import { styled as styled17 } from "@mui/material/styles";
|
|
3755
|
-
import { jsx as
|
|
3756
|
-
var HeaderBrandLogoRoot = styled17(
|
|
4634
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4635
|
+
var HeaderBrandLogoRoot = styled17(Box11, {
|
|
3757
4636
|
name: "MuiHeader",
|
|
3758
4637
|
slot: "BrandLogo"
|
|
3759
4638
|
})({
|
|
@@ -3764,15 +4643,15 @@ var HeaderBrandLogo = ({
|
|
|
3764
4643
|
children,
|
|
3765
4644
|
sx
|
|
3766
4645
|
}) => {
|
|
3767
|
-
return /* @__PURE__ */
|
|
4646
|
+
return /* @__PURE__ */ jsx33(HeaderBrandLogoRoot, { sx, children });
|
|
3768
4647
|
};
|
|
3769
4648
|
HeaderBrandLogo.displayName = "HeaderBrandLogo";
|
|
3770
4649
|
|
|
3771
4650
|
// src/components/Header/HeaderBrandTitle.tsx
|
|
3772
|
-
import
|
|
4651
|
+
import Typography10 from "@mui/material/Typography";
|
|
3773
4652
|
import { styled as styled18 } from "@mui/material/styles";
|
|
3774
|
-
import { jsx as
|
|
3775
|
-
var HeaderBrandTitleRoot = styled18(
|
|
4653
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4654
|
+
var HeaderBrandTitleRoot = styled18(Typography10, {
|
|
3776
4655
|
name: "MuiHeader",
|
|
3777
4656
|
slot: "BrandTitle"
|
|
3778
4657
|
})(({ theme }) => ({
|
|
@@ -3789,13 +4668,13 @@ var HeaderBrandTitle = ({
|
|
|
3789
4668
|
children,
|
|
3790
4669
|
sx
|
|
3791
4670
|
}) => {
|
|
3792
|
-
return /* @__PURE__ */
|
|
4671
|
+
return /* @__PURE__ */ jsx34(HeaderBrandTitleRoot, { variant: "h6", component: "div", sx, children });
|
|
3793
4672
|
};
|
|
3794
4673
|
HeaderBrandTitle.displayName = "HeaderBrandTitle";
|
|
3795
4674
|
|
|
3796
4675
|
// src/components/Header/HeaderBrand.tsx
|
|
3797
|
-
import { jsx as
|
|
3798
|
-
var HeaderBrandRoot = styled19(
|
|
4676
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4677
|
+
var HeaderBrandRoot = styled19(Box12, {
|
|
3799
4678
|
name: "MuiHeader",
|
|
3800
4679
|
slot: "Brand",
|
|
3801
4680
|
shouldForwardProp: (prop) => prop !== "clickable"
|
|
@@ -3821,18 +4700,18 @@ var HeaderBrand = ({
|
|
|
3821
4700
|
sx
|
|
3822
4701
|
}) => {
|
|
3823
4702
|
if (onClick) {
|
|
3824
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ jsx35(HeaderBrandButtonRoot, { onClick, "aria-label": ariaLabel, sx, children });
|
|
3825
4704
|
}
|
|
3826
|
-
return /* @__PURE__ */
|
|
4705
|
+
return /* @__PURE__ */ jsx35(HeaderBrandRoot, { clickable: false, sx, children });
|
|
3827
4706
|
};
|
|
3828
4707
|
HeaderBrand.displayName = "HeaderBrand";
|
|
3829
4708
|
|
|
3830
4709
|
// src/components/Header/HeaderSwitchers.tsx
|
|
3831
|
-
import
|
|
4710
|
+
import Box13 from "@mui/material/Box";
|
|
3832
4711
|
import Divider2 from "@mui/material/Divider";
|
|
3833
4712
|
import { styled as styled20 } from "@mui/material/styles";
|
|
3834
|
-
import { jsx as
|
|
3835
|
-
var HeaderSwitchersRoot = styled20(
|
|
4713
|
+
import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4714
|
+
var HeaderSwitchersRoot = styled20(Box13, {
|
|
3836
4715
|
name: "MuiHeader",
|
|
3837
4716
|
slot: "Switchers"
|
|
3838
4717
|
})(({ theme }) => ({
|
|
@@ -3860,17 +4739,17 @@ var HeaderSwitchers = ({
|
|
|
3860
4739
|
if (minimal) {
|
|
3861
4740
|
return null;
|
|
3862
4741
|
}
|
|
3863
|
-
return /* @__PURE__ */
|
|
3864
|
-
showDivider && /* @__PURE__ */
|
|
4742
|
+
return /* @__PURE__ */ jsxs13(HeaderSwitchersRoot, { sx, children: [
|
|
4743
|
+
showDivider && /* @__PURE__ */ jsx36(HeaderSwitchersDivider, { orientation: "vertical", flexItem: true }),
|
|
3865
4744
|
children
|
|
3866
4745
|
] });
|
|
3867
4746
|
};
|
|
3868
4747
|
|
|
3869
4748
|
// src/components/Header/HeaderActions.tsx
|
|
3870
|
-
import
|
|
4749
|
+
import Box14 from "@mui/material/Box";
|
|
3871
4750
|
import { styled as styled21 } from "@mui/material/styles";
|
|
3872
|
-
import { jsx as
|
|
3873
|
-
var HeaderActionsRoot = styled21(
|
|
4751
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4752
|
+
var HeaderActionsRoot = styled21(Box14, {
|
|
3874
4753
|
name: "MuiHeader",
|
|
3875
4754
|
slot: "Actions"
|
|
3876
4755
|
})(({ theme }) => ({
|
|
@@ -3882,11 +4761,11 @@ var HeaderActions = ({
|
|
|
3882
4761
|
children,
|
|
3883
4762
|
sx
|
|
3884
4763
|
}) => {
|
|
3885
|
-
return /* @__PURE__ */
|
|
4764
|
+
return /* @__PURE__ */ jsx37(HeaderActionsRoot, { sx, children });
|
|
3886
4765
|
};
|
|
3887
4766
|
|
|
3888
4767
|
// src/components/Header/Header.tsx
|
|
3889
|
-
import { jsx as
|
|
4768
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3890
4769
|
var HeaderRootStyled = styled22(AppBar, {
|
|
3891
4770
|
name: "MuiHeader",
|
|
3892
4771
|
slot: "Root"
|
|
@@ -3907,7 +4786,7 @@ var HeaderToolbar = styled22(Toolbar, {
|
|
|
3907
4786
|
paddingRight: theme.spacing(2)
|
|
3908
4787
|
}
|
|
3909
4788
|
}));
|
|
3910
|
-
var HeaderSpacerStyled = styled22(
|
|
4789
|
+
var HeaderSpacerStyled = styled22(Box15, {
|
|
3911
4790
|
name: "MuiHeader",
|
|
3912
4791
|
slot: "Spacer"
|
|
3913
4792
|
})({
|
|
@@ -3918,10 +4797,10 @@ var Header = ({
|
|
|
3918
4797
|
minimal = false,
|
|
3919
4798
|
sx
|
|
3920
4799
|
}) => {
|
|
3921
|
-
const contextValue =
|
|
3922
|
-
return /* @__PURE__ */
|
|
4800
|
+
const contextValue = React14.useMemo(() => ({ minimal }), [minimal]);
|
|
4801
|
+
return /* @__PURE__ */ jsx38(HeaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx38(HeaderRootStyled, { position: "static", color: "default", elevation: 0, sx, children: /* @__PURE__ */ jsx38(HeaderToolbar, { children }) }) });
|
|
3923
4802
|
};
|
|
3924
|
-
var HeaderSpacer = ({ sx }) => /* @__PURE__ */
|
|
4803
|
+
var HeaderSpacer = ({ sx }) => /* @__PURE__ */ jsx38(HeaderSpacerStyled, { sx });
|
|
3925
4804
|
Header.Toggle = HeaderToggle;
|
|
3926
4805
|
Header.Brand = HeaderBrand;
|
|
3927
4806
|
Header.BrandLogo = HeaderBrandLogo;
|
|
@@ -3932,31 +4811,31 @@ Header.Spacer = HeaderSpacer;
|
|
|
3932
4811
|
Header.displayName = "Header";
|
|
3933
4812
|
|
|
3934
4813
|
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
3935
|
-
import * as
|
|
3936
|
-
import
|
|
4814
|
+
import * as React20 from "react";
|
|
4815
|
+
import Popover3 from "@mui/material/Popover";
|
|
3937
4816
|
import { styled as styled27 } from "@mui/material/styles";
|
|
3938
4817
|
|
|
3939
4818
|
// src/components/AppSwitcher/context.ts
|
|
3940
|
-
import * as
|
|
3941
|
-
var AppSwitcherContext =
|
|
4819
|
+
import * as React15 from "react";
|
|
4820
|
+
var AppSwitcherContext = React15.createContext(null);
|
|
3942
4821
|
var useAppSwitcher = () => {
|
|
3943
|
-
const context =
|
|
4822
|
+
const context = React15.useContext(AppSwitcherContext);
|
|
3944
4823
|
if (!context) {
|
|
3945
4824
|
throw new Error("AppSwitcher sub-components must be used within an AppSwitcher component");
|
|
3946
4825
|
}
|
|
3947
4826
|
return context;
|
|
3948
4827
|
};
|
|
3949
4828
|
AppSwitcherContext.displayName = "AppSwitcher.Context";
|
|
3950
|
-
var AppSwitcherFooterContext =
|
|
4829
|
+
var AppSwitcherFooterContext = React15.createContext(false);
|
|
3951
4830
|
AppSwitcherFooterContext.displayName = "AppSwitcher.FooterContext";
|
|
3952
4831
|
|
|
3953
4832
|
// src/components/AppSwitcher/AppSwitcherTrigger.tsx
|
|
3954
|
-
import * as
|
|
4833
|
+
import * as React16 from "react";
|
|
3955
4834
|
import IconButton4 from "@mui/material/IconButton";
|
|
3956
4835
|
import Tooltip4 from "@mui/material/Tooltip";
|
|
3957
4836
|
import { styled as styled23 } from "@mui/material/styles";
|
|
3958
4837
|
import { Grip } from "@wso2/oxygen-ui-icons-react";
|
|
3959
|
-
import { jsx as
|
|
4838
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3960
4839
|
var DEFAULT_LABEL = "Switch Platforms";
|
|
3961
4840
|
var AppSwitcherTriggerRoot = styled23(IconButton4, {
|
|
3962
4841
|
name: "MuiAppSwitcher",
|
|
@@ -3972,13 +4851,13 @@ var AppSwitcherTriggerRoot = styled23(IconButton4, {
|
|
|
3972
4851
|
cursor: "pointer"
|
|
3973
4852
|
}
|
|
3974
4853
|
}));
|
|
3975
|
-
var AppSwitcherTrigger =
|
|
4854
|
+
var AppSwitcherTrigger = React16.forwardRef(
|
|
3976
4855
|
function AppSwitcherTrigger2(_a, ref) {
|
|
3977
4856
|
var _b = _a, { label = DEFAULT_LABEL, icon, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["label", "icon", "onClick", "aria-label"]);
|
|
3978
4857
|
const { open, popoverId, handleOpen } = useAppSwitcher();
|
|
3979
4858
|
const resolvedLabel = label.trim().length > 0 ? label : DEFAULT_LABEL;
|
|
3980
4859
|
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : resolvedLabel;
|
|
3981
|
-
return /* @__PURE__ */
|
|
4860
|
+
return /* @__PURE__ */ jsx39(Tooltip4, { title: resolvedLabel, children: /* @__PURE__ */ jsx39(
|
|
3982
4861
|
AppSwitcherTriggerRoot,
|
|
3983
4862
|
__spreadProps(__spreadValues({}, props), {
|
|
3984
4863
|
ref,
|
|
@@ -3990,7 +4869,7 @@ var AppSwitcherTrigger = React14.forwardRef(
|
|
|
3990
4869
|
"aria-controls": open ? popoverId : void 0,
|
|
3991
4870
|
"aria-haspopup": "true",
|
|
3992
4871
|
"aria-expanded": open,
|
|
3993
|
-
children: /* @__PURE__ */
|
|
4872
|
+
children: /* @__PURE__ */ jsx39("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: icon || /* @__PURE__ */ jsx39(Grip, { size: 24 }) })
|
|
3994
4873
|
})
|
|
3995
4874
|
) });
|
|
3996
4875
|
}
|
|
@@ -3998,20 +4877,20 @@ var AppSwitcherTrigger = React14.forwardRef(
|
|
|
3998
4877
|
AppSwitcherTrigger.displayName = "AppSwitcher.Trigger";
|
|
3999
4878
|
|
|
4000
4879
|
// src/components/AppSwitcher/AppSwitcherSection.tsx
|
|
4001
|
-
import * as
|
|
4002
|
-
import
|
|
4880
|
+
import * as React18 from "react";
|
|
4881
|
+
import Box17 from "@mui/material/Box";
|
|
4003
4882
|
import Skeleton from "@mui/material/Skeleton";
|
|
4004
|
-
import
|
|
4883
|
+
import Typography12 from "@mui/material/Typography";
|
|
4005
4884
|
import { styled as styled25 } from "@mui/material/styles";
|
|
4006
4885
|
|
|
4007
4886
|
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
4008
|
-
import * as
|
|
4009
|
-
import
|
|
4010
|
-
import
|
|
4887
|
+
import * as React17 from "react";
|
|
4888
|
+
import Box16 from "@mui/material/Box";
|
|
4889
|
+
import Card3 from "@mui/material/Card";
|
|
4011
4890
|
import ButtonBase2 from "@mui/material/ButtonBase";
|
|
4012
|
-
import
|
|
4891
|
+
import CircularProgress2 from "@mui/material/CircularProgress";
|
|
4013
4892
|
import Tooltip5 from "@mui/material/Tooltip";
|
|
4014
|
-
import
|
|
4893
|
+
import Typography11 from "@mui/material/Typography";
|
|
4015
4894
|
import { styled as styled24 } from "@mui/material/styles";
|
|
4016
4895
|
|
|
4017
4896
|
// src/components/AppSwitcher/brand.ts
|
|
@@ -4041,13 +4920,13 @@ var isSafeAppUrl = (url) => {
|
|
|
4041
4920
|
|
|
4042
4921
|
// src/components/AppSwitcher/AppSwitcherApp.tsx
|
|
4043
4922
|
import { WSO2 } from "@wso2/oxygen-ui-icons-react";
|
|
4044
|
-
import { jsx as
|
|
4923
|
+
import { jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4045
4924
|
var DEFAULT_UNAVAILABLE_LABEL = "Coming soon";
|
|
4046
4925
|
var APP_CARD_HEIGHT = {
|
|
4047
4926
|
platform: 13,
|
|
4048
4927
|
manage: 9
|
|
4049
4928
|
};
|
|
4050
|
-
var AppSwitcherAppRoot = styled24(
|
|
4929
|
+
var AppSwitcherAppRoot = styled24(Card3, {
|
|
4051
4930
|
name: "MuiAppSwitcher",
|
|
4052
4931
|
slot: "App",
|
|
4053
4932
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4119,7 +4998,7 @@ var AppSwitcherAppRoot = styled24(Card2, {
|
|
|
4119
4998
|
}
|
|
4120
4999
|
});
|
|
4121
5000
|
});
|
|
4122
|
-
var AppSwitcherAppIcon = styled24(
|
|
5001
|
+
var AppSwitcherAppIcon = styled24(Box16, {
|
|
4123
5002
|
name: "MuiAppSwitcher",
|
|
4124
5003
|
slot: "AppIcon",
|
|
4125
5004
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4147,7 +5026,7 @@ var AppSwitcherAppIcon = styled24(Box14, {
|
|
|
4147
5026
|
}
|
|
4148
5027
|
});
|
|
4149
5028
|
});
|
|
4150
|
-
var AppSwitcherAppName = styled24(
|
|
5029
|
+
var AppSwitcherAppName = styled24(Typography11, {
|
|
4151
5030
|
name: "MuiAppSwitcher",
|
|
4152
5031
|
slot: "AppName",
|
|
4153
5032
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4172,7 +5051,7 @@ var AppSwitcherAppName = styled24(Typography9, {
|
|
|
4172
5051
|
overflow: "hidden"
|
|
4173
5052
|
}));
|
|
4174
5053
|
var isModifiedClick = (event) => event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
|
4175
|
-
var AppSwitcherApp =
|
|
5054
|
+
var AppSwitcherApp = React17.forwardRef(
|
|
4176
5055
|
function AppSwitcherApp2({
|
|
4177
5056
|
id,
|
|
4178
5057
|
name,
|
|
@@ -4189,14 +5068,14 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4189
5068
|
onClick
|
|
4190
5069
|
}, ref) {
|
|
4191
5070
|
var _a;
|
|
4192
|
-
const inFooter =
|
|
5071
|
+
const inFooter = React17.useContext(AppSwitcherFooterContext);
|
|
4193
5072
|
const tone = toneProp != null ? toneProp : inFooter ? "manage" : "platform";
|
|
4194
|
-
const switcher =
|
|
5073
|
+
const switcher = React17.useContext(AppSwitcherContext);
|
|
4195
5074
|
const current = currentProp != null ? currentProp : id !== void 0 && id === (switcher == null ? void 0 : switcher.currentAppId);
|
|
4196
5075
|
const normalizedUrl = typeof url === "string" && url.trim() === "" ? null : url;
|
|
4197
5076
|
const unsafeUrl = Boolean(normalizedUrl) && !isSafeAppUrl(normalizedUrl);
|
|
4198
5077
|
const safeUrl = unsafeUrl ? void 0 : normalizedUrl || void 0;
|
|
4199
|
-
|
|
5078
|
+
React17.useEffect(() => {
|
|
4200
5079
|
if (unsafeUrl) {
|
|
4201
5080
|
console.warn(
|
|
4202
5081
|
`AppSwitcher.App: ignored the url of "${name}" because only http:, https: and relative URLs are allowed. The card renders disabled.`
|
|
@@ -4230,7 +5109,7 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4230
5109
|
event.preventDefault();
|
|
4231
5110
|
}
|
|
4232
5111
|
};
|
|
4233
|
-
const card = /* @__PURE__ */
|
|
5112
|
+
const card = /* @__PURE__ */ jsxs14(
|
|
4234
5113
|
AppSwitcherAppRoot,
|
|
4235
5114
|
__spreadProps(__spreadValues({}, anchorProps), {
|
|
4236
5115
|
ref,
|
|
@@ -4243,28 +5122,28 @@ var AppSwitcherApp = React15.forwardRef(
|
|
|
4243
5122
|
"aria-busy": busy ? "true" : void 0,
|
|
4244
5123
|
"aria-current": current ? "page" : void 0,
|
|
4245
5124
|
children: [
|
|
4246
|
-
/* @__PURE__ */
|
|
5125
|
+
/* @__PURE__ */ jsx40(AppSwitcherAppIcon, { ownerState, "aria-hidden": "true", children: busy ? (
|
|
4247
5126
|
// Same size as the mark, so the card does not reflow.
|
|
4248
|
-
/* @__PURE__ */
|
|
4249
|
-
) : icon != null ? icon : /* @__PURE__ */
|
|
4250
|
-
/* @__PURE__ */
|
|
5127
|
+
/* @__PURE__ */ jsx40(CircularProgress2, { color: "inherit", size: markSize, thickness: 5 })
|
|
5128
|
+
) : icon != null ? icon : /* @__PURE__ */ jsx40(WSO2, { size: markSize }) }),
|
|
5129
|
+
/* @__PURE__ */ jsx40(AppSwitcherAppName, { ownerState, children: name })
|
|
4251
5130
|
]
|
|
4252
5131
|
})
|
|
4253
5132
|
);
|
|
4254
|
-
return tooltip ? /* @__PURE__ */
|
|
5133
|
+
return tooltip ? /* @__PURE__ */ jsx40(Tooltip5, { title: tooltip, describeChild: true, children: card }) : card;
|
|
4255
5134
|
}
|
|
4256
5135
|
);
|
|
4257
5136
|
AppSwitcherApp.displayName = "AppSwitcher.App";
|
|
4258
5137
|
|
|
4259
5138
|
// src/components/AppSwitcher/AppSwitcherSection.tsx
|
|
4260
|
-
import { jsx as
|
|
4261
|
-
var AppSwitcherSectionRoot = styled25(
|
|
5139
|
+
import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5140
|
+
var AppSwitcherSectionRoot = styled25(Box17, {
|
|
4262
5141
|
name: "MuiAppSwitcher",
|
|
4263
5142
|
slot: "Section"
|
|
4264
5143
|
})(({ theme }) => ({
|
|
4265
5144
|
padding: theme.spacing(2)
|
|
4266
5145
|
}));
|
|
4267
|
-
var AppSwitcherSectionLabel = styled25(
|
|
5146
|
+
var AppSwitcherSectionLabel = styled25(Typography12, {
|
|
4268
5147
|
name: "MuiAppSwitcher",
|
|
4269
5148
|
slot: "SectionLabel"
|
|
4270
5149
|
})(({ theme }) => ({
|
|
@@ -4309,7 +5188,7 @@ var AppSwitcherAppSkeleton = styled25(Skeleton, {
|
|
|
4309
5188
|
var renderAppItems = (items, { missingUrlIsUnavailable }) => items.map((_a, index) => {
|
|
4310
5189
|
var _b = _a, { key, url } = _b, item = __objRest(_b, ["key", "url"]);
|
|
4311
5190
|
var _a2, _b2;
|
|
4312
|
-
return /* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ jsx41(
|
|
4313
5192
|
AppSwitcherApp,
|
|
4314
5193
|
__spreadProps(__spreadValues({}, item), {
|
|
4315
5194
|
url: url === void 0 && missingUrlIsUnavailable ? null : url
|
|
@@ -4325,10 +5204,10 @@ var AppSwitcherSection = ({
|
|
|
4325
5204
|
loading = false,
|
|
4326
5205
|
loadingCount
|
|
4327
5206
|
}) => {
|
|
4328
|
-
const labelId =
|
|
4329
|
-
const inFooter =
|
|
5207
|
+
const labelId = React18.useId();
|
|
5208
|
+
const inFooter = React18.useContext(AppSwitcherFooterContext);
|
|
4330
5209
|
const tone = inFooter ? "manage" : "platform";
|
|
4331
|
-
const gridRef =
|
|
5210
|
+
const gridRef = React18.useRef(null);
|
|
4332
5211
|
const handleKeyDown = (event) => {
|
|
4333
5212
|
var _a, _b;
|
|
4334
5213
|
const keys = ["ArrowRight", "ArrowLeft", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
@@ -4379,7 +5258,7 @@ var AppSwitcherSection = ({
|
|
|
4379
5258
|
event.preventDefault();
|
|
4380
5259
|
cards[nextIndex].focus();
|
|
4381
5260
|
};
|
|
4382
|
-
const content = loading ? Array.from({ length: loadingCount != null ? loadingCount : columns }, (_, index) => /* @__PURE__ */
|
|
5261
|
+
const content = loading ? Array.from({ length: loadingCount != null ? loadingCount : columns }, (_, index) => /* @__PURE__ */ jsx41(
|
|
4383
5262
|
AppSwitcherAppSkeleton,
|
|
4384
5263
|
{
|
|
4385
5264
|
ownerState: { tone },
|
|
@@ -4389,9 +5268,9 @@ var AppSwitcherSection = ({
|
|
|
4389
5268
|
},
|
|
4390
5269
|
index
|
|
4391
5270
|
)) : children != null ? children : apps && renderAppItems(apps, { missingUrlIsUnavailable: true });
|
|
4392
|
-
return /* @__PURE__ */
|
|
4393
|
-
label && /* @__PURE__ */
|
|
4394
|
-
/* @__PURE__ */
|
|
5271
|
+
return /* @__PURE__ */ jsxs15(AppSwitcherSectionRoot, { children: [
|
|
5272
|
+
label && /* @__PURE__ */ jsx41(AppSwitcherSectionLabel, { id: labelId, children: label }),
|
|
5273
|
+
/* @__PURE__ */ jsx41(
|
|
4395
5274
|
AppSwitcherSectionGrid,
|
|
4396
5275
|
{
|
|
4397
5276
|
ref: gridRef,
|
|
@@ -4400,9 +5279,9 @@ var AppSwitcherSection = ({
|
|
|
4400
5279
|
"aria-labelledby": label ? labelId : void 0,
|
|
4401
5280
|
"aria-busy": loading ? "true" : void 0,
|
|
4402
5281
|
onKeyDown: handleKeyDown,
|
|
4403
|
-
children:
|
|
5282
|
+
children: React18.Children.map(
|
|
4404
5283
|
content,
|
|
4405
|
-
(child) =>
|
|
5284
|
+
(child) => React18.isValidElement(child) ? /* @__PURE__ */ jsx41("li", { children: child }) : child
|
|
4406
5285
|
)
|
|
4407
5286
|
}
|
|
4408
5287
|
)
|
|
@@ -4411,11 +5290,11 @@ var AppSwitcherSection = ({
|
|
|
4411
5290
|
AppSwitcherSection.displayName = "AppSwitcher.Section";
|
|
4412
5291
|
|
|
4413
5292
|
// src/components/AppSwitcher/AppSwitcherFooter.tsx
|
|
4414
|
-
import * as
|
|
4415
|
-
import
|
|
5293
|
+
import * as React19 from "react";
|
|
5294
|
+
import Box18 from "@mui/material/Box";
|
|
4416
5295
|
import { alpha, styled as styled26 } from "@mui/material/styles";
|
|
4417
|
-
import { jsx as
|
|
4418
|
-
var AppSwitcherFooterRoot = styled26(
|
|
5296
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5297
|
+
var AppSwitcherFooterRoot = styled26(Box18, {
|
|
4419
5298
|
name: "MuiAppSwitcher",
|
|
4420
5299
|
slot: "Footer"
|
|
4421
5300
|
})(({ theme }) => ({
|
|
@@ -4434,10 +5313,10 @@ var AppSwitcherFooter = ({
|
|
|
4434
5313
|
loadingCount
|
|
4435
5314
|
}) => {
|
|
4436
5315
|
const cards = children != null ? children : links && renderAppItems(links, { missingUrlIsUnavailable: false });
|
|
4437
|
-
if (!loading &&
|
|
5316
|
+
if (!loading && React19.Children.toArray(cards).length === 0) {
|
|
4438
5317
|
return null;
|
|
4439
5318
|
}
|
|
4440
|
-
return /* @__PURE__ */
|
|
5319
|
+
return /* @__PURE__ */ jsx42(AppSwitcherFooterRoot, { children: /* @__PURE__ */ jsx42(AppSwitcherFooterContext.Provider, { value: true, children: /* @__PURE__ */ jsx42(
|
|
4441
5320
|
AppSwitcherSection,
|
|
4442
5321
|
{
|
|
4443
5322
|
label,
|
|
@@ -4451,8 +5330,8 @@ var AppSwitcherFooter = ({
|
|
|
4451
5330
|
AppSwitcherFooter.displayName = "AppSwitcher.Footer";
|
|
4452
5331
|
|
|
4453
5332
|
// src/components/AppSwitcher/AppSwitcher.tsx
|
|
4454
|
-
import { jsx as
|
|
4455
|
-
var AppSwitcherRoot = styled27(
|
|
5333
|
+
import { jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5334
|
+
var AppSwitcherRoot = styled27(Popover3, {
|
|
4456
5335
|
name: "MuiAppSwitcher",
|
|
4457
5336
|
slot: "Root",
|
|
4458
5337
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -4475,18 +5354,18 @@ var AppSwitcher = ({
|
|
|
4475
5354
|
currentAppId,
|
|
4476
5355
|
unavailableLabel
|
|
4477
5356
|
}) => {
|
|
4478
|
-
const [anchorEl, setAnchorEl] =
|
|
5357
|
+
const [anchorEl, setAnchorEl] = React20.useState(null);
|
|
4479
5358
|
const open = Boolean(anchorEl);
|
|
4480
|
-
const popoverId =
|
|
4481
|
-
const handleOpen =
|
|
5359
|
+
const popoverId = React20.useId();
|
|
5360
|
+
const handleOpen = React20.useCallback((event) => {
|
|
4482
5361
|
const target = event.currentTarget;
|
|
4483
5362
|
setAnchorEl((current) => current ? null : target);
|
|
4484
5363
|
}, []);
|
|
4485
|
-
const handleClose =
|
|
5364
|
+
const handleClose = React20.useCallback(() => {
|
|
4486
5365
|
setAnchorEl(null);
|
|
4487
5366
|
}, []);
|
|
4488
5367
|
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp : "Applications";
|
|
4489
|
-
const contextValue =
|
|
5368
|
+
const contextValue = React20.useMemo(
|
|
4490
5369
|
() => ({
|
|
4491
5370
|
open,
|
|
4492
5371
|
anchorEl,
|
|
@@ -4498,14 +5377,14 @@ var AppSwitcher = ({
|
|
|
4498
5377
|
}),
|
|
4499
5378
|
[open, anchorEl, popoverId, handleOpen, handleClose, currentAppId, unavailableLabel]
|
|
4500
5379
|
);
|
|
4501
|
-
const childrenArray =
|
|
5380
|
+
const childrenArray = React20.Children.toArray(children);
|
|
4502
5381
|
const triggerChild = childrenArray.find(
|
|
4503
|
-
(child) =>
|
|
5382
|
+
(child) => React20.isValidElement(child) && child.type === AppSwitcherTrigger
|
|
4504
5383
|
);
|
|
4505
5384
|
const popoverChildren = childrenArray.filter((child) => child !== triggerChild);
|
|
4506
|
-
return /* @__PURE__ */
|
|
5385
|
+
return /* @__PURE__ */ jsxs16(AppSwitcherContext.Provider, { value: contextValue, children: [
|
|
4507
5386
|
triggerChild,
|
|
4508
|
-
/* @__PURE__ */
|
|
5387
|
+
/* @__PURE__ */ jsx43(
|
|
4509
5388
|
AppSwitcherRoot,
|
|
4510
5389
|
{
|
|
4511
5390
|
id: popoverId,
|
|
@@ -4529,15 +5408,15 @@ AppSwitcher.Footer = AppSwitcherFooter;
|
|
|
4529
5408
|
AppSwitcher.displayName = "AppSwitcher";
|
|
4530
5409
|
|
|
4531
5410
|
// src/components/Sidebar/Sidebar.tsx
|
|
4532
|
-
import * as
|
|
4533
|
-
import
|
|
5411
|
+
import * as React28 from "react";
|
|
5412
|
+
import Box24 from "@mui/material/Box";
|
|
4534
5413
|
import { styled as styled40 } from "@mui/material/styles";
|
|
4535
5414
|
|
|
4536
5415
|
// src/components/Sidebar/context.ts
|
|
4537
|
-
import * as
|
|
4538
|
-
var SidebarContext =
|
|
5416
|
+
import * as React21 from "react";
|
|
5417
|
+
var SidebarContext = React21.createContext(null);
|
|
4539
5418
|
var useSidebar = () => {
|
|
4540
|
-
const context =
|
|
5419
|
+
const context = React21.useContext(SidebarContext);
|
|
4541
5420
|
if (!context) {
|
|
4542
5421
|
throw new Error("Sidebar compound components must be used within Sidebar");
|
|
4543
5422
|
}
|
|
@@ -4545,12 +5424,12 @@ var useSidebar = () => {
|
|
|
4545
5424
|
};
|
|
4546
5425
|
|
|
4547
5426
|
// src/components/Sidebar/SidebarNav.tsx
|
|
4548
|
-
import * as
|
|
4549
|
-
import
|
|
5427
|
+
import * as React22 from "react";
|
|
5428
|
+
import Box19 from "@mui/material/Box";
|
|
4550
5429
|
import Divider3 from "@mui/material/Divider";
|
|
4551
5430
|
import { styled as styled28 } from "@mui/material/styles";
|
|
4552
|
-
import { jsx as
|
|
4553
|
-
var SidebarNavRoot = styled28(
|
|
5431
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5432
|
+
var SidebarNavRoot = styled28(Box19, {
|
|
4554
5433
|
name: "MuiSidebar",
|
|
4555
5434
|
slot: "Nav"
|
|
4556
5435
|
})(({ theme }) => ({
|
|
@@ -4585,24 +5464,24 @@ var SidebarNav = ({
|
|
|
4585
5464
|
sx
|
|
4586
5465
|
}) => {
|
|
4587
5466
|
const { collapsed } = useSidebar();
|
|
4588
|
-
const childArray =
|
|
4589
|
-
return /* @__PURE__ */
|
|
4590
|
-
index > 0 && showDividers && !collapsed && /* @__PURE__ */
|
|
5467
|
+
const childArray = React22.Children.toArray(children);
|
|
5468
|
+
return /* @__PURE__ */ jsx44(SidebarNavRoot, { component: "nav", sx, children: childArray.map((child, index) => /* @__PURE__ */ jsxs17(React22.Fragment, { children: [
|
|
5469
|
+
index > 0 && showDividers && !collapsed && /* @__PURE__ */ jsx44(SidebarNavDivider, {}),
|
|
4591
5470
|
child
|
|
4592
5471
|
] }, index)) });
|
|
4593
5472
|
};
|
|
4594
5473
|
|
|
4595
5474
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
4596
|
-
import * as
|
|
4597
|
-
import
|
|
5475
|
+
import * as React23 from "react";
|
|
5476
|
+
import Box20 from "@mui/material/Box";
|
|
4598
5477
|
import List from "@mui/material/List";
|
|
4599
5478
|
import { styled as styled30 } from "@mui/material/styles";
|
|
4600
5479
|
|
|
4601
5480
|
// src/components/Sidebar/SidebarCategoryLabel.tsx
|
|
4602
|
-
import
|
|
5481
|
+
import Typography13 from "@mui/material/Typography";
|
|
4603
5482
|
import { styled as styled29 } from "@mui/material/styles";
|
|
4604
|
-
import { jsx as
|
|
4605
|
-
var SidebarCategoryLabelRoot = styled29(
|
|
5483
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
5484
|
+
var SidebarCategoryLabelRoot = styled29(Typography13, {
|
|
4606
5485
|
name: "MuiSidebar",
|
|
4607
5486
|
slot: "CategoryLabel",
|
|
4608
5487
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -4627,13 +5506,13 @@ var SidebarCategoryLabelRoot = styled29(Typography11, {
|
|
|
4627
5506
|
}));
|
|
4628
5507
|
var SidebarCategoryLabel = ({ children, sx }) => {
|
|
4629
5508
|
const { collapsed } = useSidebar();
|
|
4630
|
-
return /* @__PURE__ */
|
|
5509
|
+
return /* @__PURE__ */ jsx45(SidebarCategoryLabelRoot, { variant: "caption", collapsed, sx, children });
|
|
4631
5510
|
};
|
|
4632
5511
|
SidebarCategoryLabel.displayName = "SidebarCategoryLabel";
|
|
4633
5512
|
|
|
4634
5513
|
// src/components/Sidebar/SidebarCategory.tsx
|
|
4635
|
-
import { jsx as
|
|
4636
|
-
var SidebarCategoryRoot = styled30(
|
|
5514
|
+
import { jsx as jsx46, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5515
|
+
var SidebarCategoryRoot = styled30(Box20, {
|
|
4637
5516
|
name: "MuiSidebar",
|
|
4638
5517
|
slot: "Category"
|
|
4639
5518
|
})(({ theme }) => ({
|
|
@@ -4642,9 +5521,9 @@ var SidebarCategoryRoot = styled30(Box18, {
|
|
|
4642
5521
|
var separateChildren = (children) => {
|
|
4643
5522
|
let labelChild = null;
|
|
4644
5523
|
const otherChildren = [];
|
|
4645
|
-
|
|
5524
|
+
React23.Children.forEach(children, (child) => {
|
|
4646
5525
|
var _a;
|
|
4647
|
-
if (
|
|
5526
|
+
if (React23.isValidElement(child)) {
|
|
4648
5527
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4649
5528
|
if (displayName === "SidebarCategoryLabel") {
|
|
4650
5529
|
labelChild = child;
|
|
@@ -4662,35 +5541,35 @@ var SidebarCategory = ({
|
|
|
4662
5541
|
sx
|
|
4663
5542
|
}) => {
|
|
4664
5543
|
const { labelChild, otherChildren } = separateChildren(children);
|
|
4665
|
-
return /* @__PURE__ */
|
|
5544
|
+
return /* @__PURE__ */ jsxs18(SidebarCategoryRoot, { sx, children: [
|
|
4666
5545
|
labelChild,
|
|
4667
|
-
/* @__PURE__ */
|
|
5546
|
+
/* @__PURE__ */ jsx46(List, { disablePadding: true, children: otherChildren })
|
|
4668
5547
|
] });
|
|
4669
5548
|
};
|
|
4670
5549
|
SidebarCategory.displayName = "SidebarCategory";
|
|
4671
5550
|
|
|
4672
5551
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4673
|
-
import * as
|
|
4674
|
-
import
|
|
5552
|
+
import * as React26 from "react";
|
|
5553
|
+
import Box21 from "@mui/material/Box";
|
|
4675
5554
|
import List2 from "@mui/material/List";
|
|
4676
5555
|
import ListItem from "@mui/material/ListItem";
|
|
4677
5556
|
import ListItemButton from "@mui/material/ListItemButton";
|
|
4678
5557
|
import ListItemIcon2 from "@mui/material/ListItemIcon";
|
|
4679
5558
|
import ListItemText2 from "@mui/material/ListItemText";
|
|
4680
|
-
import
|
|
4681
|
-
import
|
|
5559
|
+
import MenuItem5 from "@mui/material/MenuItem";
|
|
5560
|
+
import MenuList2 from "@mui/material/MenuList";
|
|
4682
5561
|
import Collapse from "@mui/material/Collapse";
|
|
4683
5562
|
import Tooltip6 from "@mui/material/Tooltip";
|
|
4684
|
-
import
|
|
5563
|
+
import Popover4 from "@mui/material/Popover";
|
|
4685
5564
|
import { styled as styled34 } from "@mui/material/styles";
|
|
4686
|
-
import { ChevronDown as
|
|
5565
|
+
import { ChevronDown as ChevronDown3, ChevronUp } from "@wso2/oxygen-ui-icons-react";
|
|
4687
5566
|
|
|
4688
5567
|
// src/components/Sidebar/SidebarItemContext.tsx
|
|
4689
|
-
import * as
|
|
4690
|
-
import { jsx as
|
|
4691
|
-
var SidebarItemContext =
|
|
5568
|
+
import * as React24 from "react";
|
|
5569
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5570
|
+
var SidebarItemContext = React24.createContext(null);
|
|
4692
5571
|
var useSidebarItemContext = () => {
|
|
4693
|
-
const context =
|
|
5572
|
+
const context = React24.useContext(SidebarItemContext);
|
|
4694
5573
|
if (!context) {
|
|
4695
5574
|
throw new Error(
|
|
4696
5575
|
"useSidebarItemContext must be used within a SidebarItem component"
|
|
@@ -4699,14 +5578,14 @@ var useSidebarItemContext = () => {
|
|
|
4699
5578
|
return context;
|
|
4700
5579
|
};
|
|
4701
5580
|
var SidebarItemProvider = ({ value, children }) => {
|
|
4702
|
-
return /* @__PURE__ */
|
|
5581
|
+
return /* @__PURE__ */ jsx47(SidebarItemContext.Provider, { value, children });
|
|
4703
5582
|
};
|
|
4704
5583
|
|
|
4705
5584
|
// src/components/Sidebar/SidebarItemIcon.tsx
|
|
4706
|
-
import * as
|
|
5585
|
+
import * as React25 from "react";
|
|
4707
5586
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
4708
5587
|
import { styled as styled31 } from "@mui/material/styles";
|
|
4709
|
-
import { jsx as
|
|
5588
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
4710
5589
|
var SidebarItemIconRoot = styled31(ListItemIcon, {
|
|
4711
5590
|
name: "MuiSidebar",
|
|
4712
5591
|
slot: "ItemIcon",
|
|
@@ -4724,10 +5603,10 @@ var SidebarItemIcon = ({
|
|
|
4724
5603
|
var _a;
|
|
4725
5604
|
const { collapsed } = useSidebar();
|
|
4726
5605
|
const { isActive } = useSidebarItemContext();
|
|
4727
|
-
const iconWithSize =
|
|
5606
|
+
const iconWithSize = React25.isValidElement(children) ? React25.cloneElement(children, __spreadProps(__spreadValues({}, children.props), {
|
|
4728
5607
|
size: (_a = children.props.size) != null ? _a : 20
|
|
4729
5608
|
})) : children;
|
|
4730
|
-
return /* @__PURE__ */
|
|
5609
|
+
return /* @__PURE__ */ jsx48(
|
|
4731
5610
|
SidebarItemIconRoot,
|
|
4732
5611
|
{
|
|
4733
5612
|
ownerState: { collapsed, isActive },
|
|
@@ -4741,7 +5620,7 @@ SidebarItemIcon.displayName = "SidebarItemIcon";
|
|
|
4741
5620
|
// src/components/Sidebar/SidebarItemLabel.tsx
|
|
4742
5621
|
import ListItemText from "@mui/material/ListItemText";
|
|
4743
5622
|
import { styled as styled32 } from "@mui/material/styles";
|
|
4744
|
-
import { jsx as
|
|
5623
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4745
5624
|
var SidebarItemLabelRoot = styled32(ListItemText, {
|
|
4746
5625
|
name: "MuiSidebar",
|
|
4747
5626
|
slot: "ItemLabel",
|
|
@@ -4767,14 +5646,14 @@ var SidebarItemLabel = ({
|
|
|
4767
5646
|
}) => {
|
|
4768
5647
|
const { collapsed } = useSidebar();
|
|
4769
5648
|
const { isActive } = useSidebarItemContext();
|
|
4770
|
-
return /* @__PURE__ */
|
|
5649
|
+
return /* @__PURE__ */ jsx49(SidebarItemLabelRoot, { primary: children, ownerState: { isActive, collapsed }, sx });
|
|
4771
5650
|
};
|
|
4772
5651
|
SidebarItemLabel.displayName = "SidebarItemLabel";
|
|
4773
5652
|
|
|
4774
5653
|
// src/components/Sidebar/SidebarItemBadge.tsx
|
|
4775
5654
|
import Chip from "@mui/material/Chip";
|
|
4776
5655
|
import { styled as styled33 } from "@mui/material/styles";
|
|
4777
|
-
import { jsx as
|
|
5656
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4778
5657
|
var SidebarItemBadgeRoot = styled33(Chip, {
|
|
4779
5658
|
name: "MuiSidebar",
|
|
4780
5659
|
slot: "ItemBadge"
|
|
@@ -4792,12 +5671,12 @@ var SidebarItemBadge = ({
|
|
|
4792
5671
|
if (collapsed) {
|
|
4793
5672
|
return null;
|
|
4794
5673
|
}
|
|
4795
|
-
return /* @__PURE__ */
|
|
5674
|
+
return /* @__PURE__ */ jsx50(SidebarItemBadgeRoot, { label: children, size: "small", color, sx });
|
|
4796
5675
|
};
|
|
4797
5676
|
SidebarItemBadge.displayName = "SidebarItemBadge";
|
|
4798
5677
|
|
|
4799
5678
|
// src/components/Sidebar/SidebarItem.tsx
|
|
4800
|
-
import { Fragment as
|
|
5679
|
+
import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4801
5680
|
var SidebarItemRoot = styled34(ListItem, {
|
|
4802
5681
|
name: "MuiSidebar",
|
|
4803
5682
|
slot: "Item"
|
|
@@ -4829,7 +5708,7 @@ var SidebarItemButton = styled34(ListItemButton, {
|
|
|
4829
5708
|
}
|
|
4830
5709
|
}
|
|
4831
5710
|
}));
|
|
4832
|
-
var SidebarItemChevron = styled34(
|
|
5711
|
+
var SidebarItemChevron = styled34(Box21, {
|
|
4833
5712
|
name: "MuiSidebar",
|
|
4834
5713
|
slot: "ItemChevron"
|
|
4835
5714
|
})({
|
|
@@ -4838,20 +5717,20 @@ var SidebarItemChevron = styled34(Box19, {
|
|
|
4838
5717
|
display: "flex",
|
|
4839
5718
|
alignItems: "center"
|
|
4840
5719
|
});
|
|
4841
|
-
var SidebarItemPopover = styled34(
|
|
5720
|
+
var SidebarItemPopover = styled34(Popover4, {
|
|
4842
5721
|
name: "MuiSidebar",
|
|
4843
5722
|
slot: "ItemPopover"
|
|
4844
5723
|
})({
|
|
4845
5724
|
pointerEvents: "none"
|
|
4846
5725
|
});
|
|
4847
|
-
var SidebarItemPopoverList = styled34(
|
|
5726
|
+
var SidebarItemPopoverList = styled34(MenuList2, {
|
|
4848
5727
|
name: "MuiSidebar",
|
|
4849
5728
|
slot: "ItemPopoverList"
|
|
4850
5729
|
})(({ theme }) => ({
|
|
4851
5730
|
padding: theme.spacing(0.5),
|
|
4852
5731
|
pointerEvents: "auto"
|
|
4853
5732
|
}));
|
|
4854
|
-
var SidebarItemPopoverButton = styled34(
|
|
5733
|
+
var SidebarItemPopoverButton = styled34(MenuItem5, {
|
|
4855
5734
|
name: "MuiSidebar",
|
|
4856
5735
|
slot: "ItemPopoverButton"
|
|
4857
5736
|
})(({ theme }) => ({
|
|
@@ -4875,9 +5754,9 @@ var CHILD_DISPLAY_NAMES = [
|
|
|
4875
5754
|
var separateChildren2 = (children) => {
|
|
4876
5755
|
const composableChildren = [];
|
|
4877
5756
|
const nestedItems = [];
|
|
4878
|
-
|
|
5757
|
+
React26.Children.toArray(children).forEach((child) => {
|
|
4879
5758
|
var _a;
|
|
4880
|
-
if (
|
|
5759
|
+
if (React26.isValidElement(child)) {
|
|
4881
5760
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4882
5761
|
if (displayName && CHILD_DISPLAY_NAMES.includes(displayName)) {
|
|
4883
5762
|
composableChildren.push(child);
|
|
@@ -4892,9 +5771,9 @@ var separateChildren2 = (children) => {
|
|
|
4892
5771
|
};
|
|
4893
5772
|
var getTooltipLabel = (children) => {
|
|
4894
5773
|
let tooltipLabel = "";
|
|
4895
|
-
|
|
5774
|
+
React26.Children.forEach(children, (child) => {
|
|
4896
5775
|
var _a;
|
|
4897
|
-
if (
|
|
5776
|
+
if (React26.isValidElement(child)) {
|
|
4898
5777
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4899
5778
|
const props = child.props;
|
|
4900
5779
|
if (displayName === "SidebarItemLabel" && props.children) {
|
|
@@ -4907,9 +5786,9 @@ var getTooltipLabel = (children) => {
|
|
|
4907
5786
|
var extractItemContent = (itemChildren) => {
|
|
4908
5787
|
let icon = null;
|
|
4909
5788
|
let label = "";
|
|
4910
|
-
|
|
5789
|
+
React26.Children.forEach(itemChildren, (child) => {
|
|
4911
5790
|
var _a;
|
|
4912
|
-
if (
|
|
5791
|
+
if (React26.isValidElement(child)) {
|
|
4913
5792
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
4914
5793
|
const props = child.props;
|
|
4915
5794
|
if (displayName === "SidebarItemIcon") {
|
|
@@ -4933,33 +5812,33 @@ var SidebarItem = ({
|
|
|
4933
5812
|
const hasNestedItems = nestedItems.length > 0;
|
|
4934
5813
|
const isActive = activeItem === id;
|
|
4935
5814
|
const isExpanded = expandedMenus[id] || false;
|
|
4936
|
-
const hasActiveChild =
|
|
5815
|
+
const hasActiveChild = React26.useMemo(() => {
|
|
4937
5816
|
if (!hasNestedItems || !activeItem) return false;
|
|
4938
5817
|
return nestedItems.some((child) => {
|
|
4939
|
-
if (
|
|
5818
|
+
if (React26.isValidElement(child)) {
|
|
4940
5819
|
return child.props.id === activeItem;
|
|
4941
5820
|
}
|
|
4942
5821
|
return false;
|
|
4943
5822
|
});
|
|
4944
5823
|
}, [hasNestedItems, nestedItems, activeItem]);
|
|
4945
|
-
const [popoverAnchor, setPopoverAnchor] =
|
|
4946
|
-
const [popoverOpenedByClick, setPopoverOpenedByClick] =
|
|
4947
|
-
const closeTimeoutRef =
|
|
5824
|
+
const [popoverAnchor, setPopoverAnchor] = React26.useState(null);
|
|
5825
|
+
const [popoverOpenedByClick, setPopoverOpenedByClick] = React26.useState(false);
|
|
5826
|
+
const closeTimeoutRef = React26.useRef(null);
|
|
4948
5827
|
const popoverOpen = Boolean(popoverAnchor);
|
|
4949
|
-
const popoverId =
|
|
4950
|
-
const clearCloseTimeout =
|
|
5828
|
+
const popoverId = React26.useId();
|
|
5829
|
+
const clearCloseTimeout = React26.useCallback(() => {
|
|
4951
5830
|
if (closeTimeoutRef.current != null) {
|
|
4952
5831
|
clearTimeout(closeTimeoutRef.current);
|
|
4953
5832
|
closeTimeoutRef.current = null;
|
|
4954
5833
|
}
|
|
4955
5834
|
}, []);
|
|
4956
|
-
const closePopover =
|
|
5835
|
+
const closePopover = React26.useCallback(() => {
|
|
4957
5836
|
clearCloseTimeout();
|
|
4958
5837
|
setPopoverAnchor(null);
|
|
4959
5838
|
setPopoverOpenedByClick(false);
|
|
4960
5839
|
}, [clearCloseTimeout]);
|
|
4961
|
-
|
|
4962
|
-
|
|
5840
|
+
React26.useEffect(() => () => clearCloseTimeout(), [clearCloseTimeout]);
|
|
5841
|
+
React26.useEffect(() => {
|
|
4963
5842
|
if (!collapsed) {
|
|
4964
5843
|
closePopover();
|
|
4965
5844
|
}
|
|
@@ -5009,7 +5888,7 @@ var SidebarItem = ({
|
|
|
5009
5888
|
const tooltipLabel = getTooltipLabel(children);
|
|
5010
5889
|
const ownerState = { collapsed, depth };
|
|
5011
5890
|
const shouldShowSelected = isActive && !hasNestedItems || collapsed && hasActiveChild;
|
|
5012
|
-
const buttonContent = /* @__PURE__ */
|
|
5891
|
+
const buttonContent = /* @__PURE__ */ jsx51(
|
|
5013
5892
|
SidebarItemButton,
|
|
5014
5893
|
{
|
|
5015
5894
|
selected: shouldShowSelected,
|
|
@@ -5020,21 +5899,21 @@ var SidebarItem = ({
|
|
|
5020
5899
|
"aria-expanded": hasNestedItems ? collapsed ? popoverOpen : isExpanded : void 0,
|
|
5021
5900
|
"aria-haspopup": collapsed && hasNestedItems ? "menu" : void 0,
|
|
5022
5901
|
"aria-controls": popoverOpen ? popoverId : void 0,
|
|
5023
|
-
children: /* @__PURE__ */
|
|
5902
|
+
children: /* @__PURE__ */ jsxs19(SidebarItemProvider, { value: contextValue, children: [
|
|
5024
5903
|
composableChildren,
|
|
5025
|
-
!collapsed && hasNestedItems && /* @__PURE__ */
|
|
5026
|
-
!collapsed && !hasNestedItems && /* @__PURE__ */
|
|
5904
|
+
!collapsed && hasNestedItems && /* @__PURE__ */ jsx51(SidebarItemChevron, { "aria-hidden": "true", children: isExpanded ? /* @__PURE__ */ jsx51(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx51(ChevronDown3, { size: 16 }) }),
|
|
5905
|
+
!collapsed && !hasNestedItems && /* @__PURE__ */ jsx51(Box21, { sx: { ml: "auto", width: 16, pl: 1 } })
|
|
5027
5906
|
] })
|
|
5028
5907
|
}
|
|
5029
5908
|
);
|
|
5030
|
-
const wrappedContent = link ? /* @__PURE__ */
|
|
5909
|
+
const wrappedContent = link ? /* @__PURE__ */ jsx51(Fragment8, { children: React26.cloneElement(link, {}, buttonContent) }) : buttonContent;
|
|
5031
5910
|
const collapsedWithNested = collapsed && hasNestedItems;
|
|
5032
5911
|
const handlePopoverItemClick = (itemId) => {
|
|
5033
5912
|
onSelect == null ? void 0 : onSelect(itemId);
|
|
5034
5913
|
closePopover();
|
|
5035
5914
|
};
|
|
5036
|
-
return /* @__PURE__ */
|
|
5037
|
-
/* @__PURE__ */
|
|
5915
|
+
return /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
5916
|
+
/* @__PURE__ */ jsx51(
|
|
5038
5917
|
SidebarItemRoot,
|
|
5039
5918
|
{
|
|
5040
5919
|
disablePadding: true,
|
|
@@ -5042,11 +5921,11 @@ var SidebarItem = ({
|
|
|
5042
5921
|
onMouseLeave: handleMouseLeave,
|
|
5043
5922
|
children: collapsed ? (
|
|
5044
5923
|
// When collapsed: show tooltip only for items without nested children
|
|
5045
|
-
collapsedWithNested ? wrappedContent : /* @__PURE__ */
|
|
5924
|
+
collapsedWithNested ? wrappedContent : /* @__PURE__ */ jsx51(Tooltip6, { title: tooltipLabel, placement: "right", arrow: true, children: wrappedContent })
|
|
5046
5925
|
) : wrappedContent
|
|
5047
5926
|
}
|
|
5048
5927
|
),
|
|
5049
|
-
collapsedWithNested && /* @__PURE__ */
|
|
5928
|
+
collapsedWithNested && /* @__PURE__ */ jsx51(
|
|
5050
5929
|
SidebarItemPopover,
|
|
5051
5930
|
{
|
|
5052
5931
|
open: popoverOpen,
|
|
@@ -5063,25 +5942,25 @@ var SidebarItem = ({
|
|
|
5063
5942
|
onMouseLeave: handleMouseLeave
|
|
5064
5943
|
}
|
|
5065
5944
|
},
|
|
5066
|
-
children: /* @__PURE__ */
|
|
5945
|
+
children: /* @__PURE__ */ jsx51(
|
|
5067
5946
|
SidebarItemPopoverList,
|
|
5068
5947
|
{
|
|
5069
5948
|
id: popoverId,
|
|
5070
5949
|
autoFocusItem: popoverOpen && popoverOpenedByClick,
|
|
5071
5950
|
disablePadding: true,
|
|
5072
5951
|
children: nestedItems.map((child, index) => {
|
|
5073
|
-
if (
|
|
5952
|
+
if (React26.isValidElement(child)) {
|
|
5074
5953
|
const childProps = child.props;
|
|
5075
5954
|
const { icon, label } = extractItemContent(childProps.children);
|
|
5076
5955
|
const isItemActive = activeItem === childProps.id;
|
|
5077
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ jsxs19(
|
|
5078
5957
|
SidebarItemPopoverButton,
|
|
5079
5958
|
{
|
|
5080
5959
|
selected: isItemActive,
|
|
5081
5960
|
onClick: () => handlePopoverItemClick(childProps.id),
|
|
5082
5961
|
children: [
|
|
5083
|
-
icon && /* @__PURE__ */
|
|
5084
|
-
/* @__PURE__ */
|
|
5962
|
+
icon && /* @__PURE__ */ jsx51(ListItemIcon2, { sx: { minWidth: "auto" }, children: icon }),
|
|
5963
|
+
/* @__PURE__ */ jsx51(ListItemText2, { primary: label })
|
|
5085
5964
|
]
|
|
5086
5965
|
},
|
|
5087
5966
|
childProps.id || index
|
|
@@ -5093,9 +5972,9 @@ var SidebarItem = ({
|
|
|
5093
5972
|
)
|
|
5094
5973
|
}
|
|
5095
5974
|
),
|
|
5096
|
-
hasNestedItems && !collapsed && /* @__PURE__ */
|
|
5097
|
-
if (
|
|
5098
|
-
return
|
|
5975
|
+
hasNestedItems && !collapsed && /* @__PURE__ */ jsx51(Collapse, { component: "li", in: isExpanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx51(List2, { disablePadding: true, children: nestedItems.map((child, index) => {
|
|
5976
|
+
if (React26.isValidElement(child)) {
|
|
5977
|
+
return React26.cloneElement(child, {
|
|
5099
5978
|
key: child.key || index,
|
|
5100
5979
|
depth: depth + 1
|
|
5101
5980
|
});
|
|
@@ -5107,11 +5986,11 @@ var SidebarItem = ({
|
|
|
5107
5986
|
SidebarItem.displayName = "SidebarItem";
|
|
5108
5987
|
|
|
5109
5988
|
// src/components/Sidebar/SidebarFooter.tsx
|
|
5110
|
-
import
|
|
5989
|
+
import Box22 from "@mui/material/Box";
|
|
5111
5990
|
import Divider4 from "@mui/material/Divider";
|
|
5112
5991
|
import { styled as styled35 } from "@mui/material/styles";
|
|
5113
|
-
import { Fragment as
|
|
5114
|
-
var SidebarFooterRoot = styled35(
|
|
5992
|
+
import { Fragment as Fragment9, jsx as jsx52, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5993
|
+
var SidebarFooterRoot = styled35(Box22, {
|
|
5115
5994
|
name: "MuiSidebar",
|
|
5116
5995
|
slot: "Footer"
|
|
5117
5996
|
})(({ theme }) => ({
|
|
@@ -5123,15 +6002,15 @@ var SidebarFooter = ({
|
|
|
5123
6002
|
showDivider = true,
|
|
5124
6003
|
sx
|
|
5125
6004
|
}) => {
|
|
5126
|
-
return /* @__PURE__ */
|
|
5127
|
-
showDivider && /* @__PURE__ */
|
|
5128
|
-
/* @__PURE__ */
|
|
6005
|
+
return /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
6006
|
+
showDivider && /* @__PURE__ */ jsx52(Divider4, {}),
|
|
6007
|
+
/* @__PURE__ */ jsx52(SidebarFooterRoot, { sx, children })
|
|
5129
6008
|
] });
|
|
5130
6009
|
};
|
|
5131
6010
|
|
|
5132
6011
|
// src/components/Sidebar/SidebarUser.tsx
|
|
5133
|
-
import * as
|
|
5134
|
-
import
|
|
6012
|
+
import * as React27 from "react";
|
|
6013
|
+
import Box23 from "@mui/material/Box";
|
|
5135
6014
|
import ListItemButton2 from "@mui/material/ListItemButton";
|
|
5136
6015
|
import Tooltip7 from "@mui/material/Tooltip";
|
|
5137
6016
|
import Divider5 from "@mui/material/Divider";
|
|
@@ -5140,7 +6019,7 @@ import { styled as styled39 } from "@mui/material/styles";
|
|
|
5140
6019
|
// src/components/Sidebar/SidebarUserAvatar.tsx
|
|
5141
6020
|
import Avatar2 from "@mui/material/Avatar";
|
|
5142
6021
|
import { styled as styled36 } from "@mui/material/styles";
|
|
5143
|
-
import { jsx as
|
|
6022
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5144
6023
|
var SidebarUserAvatarRoot = styled36(Avatar2, {
|
|
5145
6024
|
name: "MuiSidebar",
|
|
5146
6025
|
slot: "UserAvatar"
|
|
@@ -5157,15 +6036,15 @@ var SidebarUserAvatar = ({
|
|
|
5157
6036
|
alt,
|
|
5158
6037
|
sx
|
|
5159
6038
|
}) => {
|
|
5160
|
-
return /* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsx53(SidebarUserAvatarRoot, { src, alt, sx, children });
|
|
5161
6040
|
};
|
|
5162
6041
|
SidebarUserAvatar.displayName = "SidebarUserAvatar";
|
|
5163
6042
|
|
|
5164
6043
|
// src/components/Sidebar/SidebarUserName.tsx
|
|
5165
|
-
import
|
|
6044
|
+
import Typography14 from "@mui/material/Typography";
|
|
5166
6045
|
import { styled as styled37 } from "@mui/material/styles";
|
|
5167
|
-
import { jsx as
|
|
5168
|
-
var SidebarUserNameRoot = styled37(
|
|
6046
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
6047
|
+
var SidebarUserNameRoot = styled37(Typography14, {
|
|
5169
6048
|
name: "MuiSidebar",
|
|
5170
6049
|
slot: "UserName"
|
|
5171
6050
|
})({
|
|
@@ -5182,15 +6061,15 @@ var SidebarUserName = ({
|
|
|
5182
6061
|
if (collapsed) {
|
|
5183
6062
|
return null;
|
|
5184
6063
|
}
|
|
5185
|
-
return /* @__PURE__ */
|
|
6064
|
+
return /* @__PURE__ */ jsx54(SidebarUserNameRoot, { variant: "body2", sx, children });
|
|
5186
6065
|
};
|
|
5187
6066
|
SidebarUserName.displayName = "SidebarUserName";
|
|
5188
6067
|
|
|
5189
6068
|
// src/components/Sidebar/SidebarUserEmail.tsx
|
|
5190
|
-
import
|
|
6069
|
+
import Typography15 from "@mui/material/Typography";
|
|
5191
6070
|
import { styled as styled38 } from "@mui/material/styles";
|
|
5192
|
-
import { jsx as
|
|
5193
|
-
var SidebarUserEmailRoot = styled38(
|
|
6071
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
6072
|
+
var SidebarUserEmailRoot = styled38(Typography15, {
|
|
5194
6073
|
name: "MuiSidebar",
|
|
5195
6074
|
slot: "UserEmail"
|
|
5196
6075
|
})(({ theme }) => ({
|
|
@@ -5208,13 +6087,13 @@ var SidebarUserEmail = ({
|
|
|
5208
6087
|
if (collapsed) {
|
|
5209
6088
|
return null;
|
|
5210
6089
|
}
|
|
5211
|
-
return /* @__PURE__ */
|
|
6090
|
+
return /* @__PURE__ */ jsx55(SidebarUserEmailRoot, { variant: "caption", sx, children });
|
|
5212
6091
|
};
|
|
5213
6092
|
SidebarUserEmail.displayName = "SidebarUserEmail";
|
|
5214
6093
|
|
|
5215
6094
|
// src/components/Sidebar/SidebarUser.tsx
|
|
5216
|
-
import { Fragment as
|
|
5217
|
-
var SidebarUserRoot = styled39(
|
|
6095
|
+
import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6096
|
+
var SidebarUserRoot = styled39(Box23, {
|
|
5218
6097
|
name: "MuiSidebar",
|
|
5219
6098
|
slot: "User"
|
|
5220
6099
|
})(({ theme }) => ({
|
|
@@ -5237,7 +6116,7 @@ var SidebarUserButton = styled39(ListItemButton2, {
|
|
|
5237
6116
|
duration: ownerState.collapsed ? theme.transitions.duration.leavingScreen : theme.transitions.duration.enteringScreen
|
|
5238
6117
|
})
|
|
5239
6118
|
}));
|
|
5240
|
-
var SidebarUserTextContainer = styled39(
|
|
6119
|
+
var SidebarUserTextContainer = styled39(Box23, {
|
|
5241
6120
|
name: "MuiSidebar",
|
|
5242
6121
|
slot: "UserTextContainer",
|
|
5243
6122
|
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
@@ -5255,9 +6134,9 @@ var SidebarUserTextContainer = styled39(Box21, {
|
|
|
5255
6134
|
var separateChildren3 = (children) => {
|
|
5256
6135
|
let avatarChild = null;
|
|
5257
6136
|
const textChildren = [];
|
|
5258
|
-
|
|
6137
|
+
React27.Children.forEach(children, (child) => {
|
|
5259
6138
|
var _a;
|
|
5260
|
-
if (
|
|
6139
|
+
if (React27.isValidElement(child)) {
|
|
5261
6140
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5262
6141
|
if (displayName === "SidebarUserAvatar") {
|
|
5263
6142
|
avatarChild = child;
|
|
@@ -5270,9 +6149,9 @@ var separateChildren3 = (children) => {
|
|
|
5270
6149
|
};
|
|
5271
6150
|
var getTooltipText = (children) => {
|
|
5272
6151
|
let tooltipText = "";
|
|
5273
|
-
|
|
6152
|
+
React27.Children.forEach(children, (child) => {
|
|
5274
6153
|
var _a;
|
|
5275
|
-
if (
|
|
6154
|
+
if (React27.isValidElement(child)) {
|
|
5276
6155
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5277
6156
|
const props = child.props;
|
|
5278
6157
|
if (displayName === "SidebarUserName" && props.children) {
|
|
@@ -5292,22 +6171,22 @@ var SidebarUser = ({
|
|
|
5292
6171
|
const { avatarChild, textChildren } = separateChildren3(children);
|
|
5293
6172
|
const tooltipText = getTooltipText(children);
|
|
5294
6173
|
const ownerState = { collapsed };
|
|
5295
|
-
const content = /* @__PURE__ */
|
|
6174
|
+
const content = /* @__PURE__ */ jsxs21(SidebarUserButton, { onClick, ownerState, children: [
|
|
5296
6175
|
avatarChild,
|
|
5297
|
-
/* @__PURE__ */
|
|
6176
|
+
/* @__PURE__ */ jsx56(SidebarUserTextContainer, { collapsed, children: textChildren })
|
|
5298
6177
|
] });
|
|
5299
|
-
return /* @__PURE__ */
|
|
5300
|
-
showDivider && /* @__PURE__ */
|
|
5301
|
-
/* @__PURE__ */
|
|
6178
|
+
return /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
6179
|
+
showDivider && /* @__PURE__ */ jsx56(Divider5, {}),
|
|
6180
|
+
/* @__PURE__ */ jsx56(SidebarUserRoot, { sx, children: collapsed ? /* @__PURE__ */ jsx56(Tooltip7, { title: tooltipText, placement: "right", arrow: true, children: content }) : content })
|
|
5302
6181
|
] });
|
|
5303
6182
|
};
|
|
5304
6183
|
SidebarUser.displayName = "SidebarUser";
|
|
5305
6184
|
|
|
5306
6185
|
// src/components/Sidebar/Sidebar.tsx
|
|
5307
|
-
import { jsx as
|
|
6186
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
5308
6187
|
var SIDEBAR_WIDTH = 250;
|
|
5309
6188
|
var COLLAPSED_SIDEBAR_WIDTH = 64;
|
|
5310
|
-
var SidebarRootStyled = styled40(
|
|
6189
|
+
var SidebarRootStyled = styled40(Box24, {
|
|
5311
6190
|
name: "MuiSidebar",
|
|
5312
6191
|
slot: "Root",
|
|
5313
6192
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5342,10 +6221,10 @@ var Sidebar = ({
|
|
|
5342
6221
|
sx
|
|
5343
6222
|
}) => {
|
|
5344
6223
|
var _a, _b, _c;
|
|
5345
|
-
const appShellContext =
|
|
6224
|
+
const appShellContext = React28.useContext(AppShellContext);
|
|
5346
6225
|
const collapsed = (_a = collapsedProp != null ? collapsedProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsed) != null ? _a : false;
|
|
5347
6226
|
const activeItem = activeItemProp != null ? activeItemProp : appShellContext == null ? void 0 : appShellContext.state.activeMenuItem;
|
|
5348
|
-
const expandedMenus =
|
|
6227
|
+
const expandedMenus = React28.useMemo(
|
|
5349
6228
|
() => {
|
|
5350
6229
|
var _a2;
|
|
5351
6230
|
return (_a2 = expandedMenusProp != null ? expandedMenusProp : appShellContext == null ? void 0 : appShellContext.state.expandedMenus) != null ? _a2 : {};
|
|
@@ -5356,7 +6235,7 @@ var Sidebar = ({
|
|
|
5356
6235
|
const onToggleExpand = onToggleExpandProp != null ? onToggleExpandProp : appShellContext == null ? void 0 : appShellContext.actions.toggleMenu;
|
|
5357
6236
|
const width = (_b = widthProp != null ? widthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarWidth) != null ? _b : SIDEBAR_WIDTH;
|
|
5358
6237
|
const collapsedWidth = (_c = collapsedWidthProp != null ? collapsedWidthProp : appShellContext == null ? void 0 : appShellContext.state.sidebarCollapsedWidth) != null ? _c : COLLAPSED_SIDEBAR_WIDTH;
|
|
5359
|
-
const contextValue =
|
|
6238
|
+
const contextValue = React28.useMemo(
|
|
5360
6239
|
() => ({
|
|
5361
6240
|
collapsed,
|
|
5362
6241
|
activeItem,
|
|
@@ -5367,7 +6246,7 @@ var Sidebar = ({
|
|
|
5367
6246
|
[collapsed, activeItem, expandedMenus, onSelect, onToggleExpand]
|
|
5368
6247
|
);
|
|
5369
6248
|
const ownerState = { collapsed, width, collapsedWidth };
|
|
5370
|
-
return /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsx57(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx57(SidebarRootStyled, { component: "aside", ownerState, sx, children }) });
|
|
5371
6250
|
};
|
|
5372
6251
|
Sidebar.Nav = SidebarNav;
|
|
5373
6252
|
Sidebar.Category = SidebarCategory;
|
|
@@ -5384,17 +6263,17 @@ Sidebar.UserEmail = SidebarUserEmail;
|
|
|
5384
6263
|
Sidebar.displayName = "Sidebar";
|
|
5385
6264
|
|
|
5386
6265
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
5387
|
-
import * as
|
|
5388
|
-
import
|
|
6266
|
+
import * as React34 from "react";
|
|
6267
|
+
import Box33 from "@mui/material/Box";
|
|
5389
6268
|
import Drawer from "@mui/material/Drawer";
|
|
5390
6269
|
import { styled as styled56 } from "@mui/material/styles";
|
|
5391
6270
|
import { visuallyHidden as visuallyHidden3 } from "@mui/utils";
|
|
5392
6271
|
|
|
5393
6272
|
// src/components/NotificationPanel/context.ts
|
|
5394
|
-
import * as
|
|
5395
|
-
var NotificationPanelContext =
|
|
6273
|
+
import * as React29 from "react";
|
|
6274
|
+
var NotificationPanelContext = React29.createContext(null);
|
|
5396
6275
|
var useNotificationPanel = () => {
|
|
5397
|
-
const context =
|
|
6276
|
+
const context = React29.useContext(NotificationPanelContext);
|
|
5398
6277
|
if (!context) {
|
|
5399
6278
|
throw new Error(
|
|
5400
6279
|
"NotificationPanel compound components must be used within NotificationPanel"
|
|
@@ -5404,11 +6283,11 @@ var useNotificationPanel = () => {
|
|
|
5404
6283
|
};
|
|
5405
6284
|
|
|
5406
6285
|
// src/components/NotificationPanel/NotificationHeader.tsx
|
|
5407
|
-
import * as
|
|
5408
|
-
import
|
|
6286
|
+
import * as React30 from "react";
|
|
6287
|
+
import Box25 from "@mui/material/Box";
|
|
5409
6288
|
import { styled as styled41 } from "@mui/material/styles";
|
|
5410
|
-
import { jsx as
|
|
5411
|
-
var NotificationHeaderRoot = styled41(
|
|
6289
|
+
import { jsx as jsx58, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6290
|
+
var NotificationHeaderRoot = styled41(Box25, {
|
|
5412
6291
|
name: "MuiNotificationPanel",
|
|
5413
6292
|
slot: "Header"
|
|
5414
6293
|
})(({ theme }) => ({
|
|
@@ -5418,7 +6297,7 @@ var NotificationHeaderRoot = styled41(Box23, {
|
|
|
5418
6297
|
padding: theme.spacing(2),
|
|
5419
6298
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
|
5420
6299
|
}));
|
|
5421
|
-
var NotificationHeaderContent = styled41(
|
|
6300
|
+
var NotificationHeaderContent = styled41(Box25, {
|
|
5422
6301
|
name: "MuiNotificationPanel",
|
|
5423
6302
|
slot: "HeaderContent"
|
|
5424
6303
|
})(({ theme }) => ({
|
|
@@ -5429,9 +6308,9 @@ var NotificationHeaderContent = styled41(Box23, {
|
|
|
5429
6308
|
var separateChildren4 = (children) => {
|
|
5430
6309
|
const leftChildren = [];
|
|
5431
6310
|
let closeChild = null;
|
|
5432
|
-
|
|
6311
|
+
React30.Children.forEach(children, (child) => {
|
|
5433
6312
|
var _a;
|
|
5434
|
-
if (
|
|
6313
|
+
if (React30.isValidElement(child)) {
|
|
5435
6314
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5436
6315
|
if (displayName === "NotificationHeaderClose") {
|
|
5437
6316
|
closeChild = child;
|
|
@@ -5449,18 +6328,18 @@ var NotificationHeader = ({
|
|
|
5449
6328
|
sx
|
|
5450
6329
|
}) => {
|
|
5451
6330
|
const { leftChildren, closeChild } = separateChildren4(children);
|
|
5452
|
-
return /* @__PURE__ */
|
|
5453
|
-
/* @__PURE__ */
|
|
6331
|
+
return /* @__PURE__ */ jsxs22(NotificationHeaderRoot, { sx, children: [
|
|
6332
|
+
/* @__PURE__ */ jsx58(NotificationHeaderContent, { children: leftChildren }),
|
|
5454
6333
|
closeChild
|
|
5455
6334
|
] });
|
|
5456
6335
|
};
|
|
5457
6336
|
NotificationHeader.displayName = "NotificationHeader";
|
|
5458
6337
|
|
|
5459
6338
|
// src/components/NotificationPanel/NotificationHeaderIcon.tsx
|
|
5460
|
-
import
|
|
6339
|
+
import Box26 from "@mui/material/Box";
|
|
5461
6340
|
import { styled as styled42 } from "@mui/material/styles";
|
|
5462
|
-
import { jsx as
|
|
5463
|
-
var NotificationHeaderIconRoot = styled42(
|
|
6341
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6342
|
+
var NotificationHeaderIconRoot = styled42(Box26, {
|
|
5464
6343
|
name: "MuiNotificationPanel",
|
|
5465
6344
|
slot: "HeaderIcon"
|
|
5466
6345
|
})({
|
|
@@ -5471,15 +6350,15 @@ var NotificationHeaderIcon = ({
|
|
|
5471
6350
|
children,
|
|
5472
6351
|
sx
|
|
5473
6352
|
}) => {
|
|
5474
|
-
return /* @__PURE__ */
|
|
6353
|
+
return /* @__PURE__ */ jsx59(NotificationHeaderIconRoot, { sx, children });
|
|
5475
6354
|
};
|
|
5476
6355
|
NotificationHeaderIcon.displayName = "NotificationHeaderIcon";
|
|
5477
6356
|
|
|
5478
6357
|
// src/components/NotificationPanel/NotificationHeaderTitle.tsx
|
|
5479
|
-
import
|
|
6358
|
+
import Typography16 from "@mui/material/Typography";
|
|
5480
6359
|
import { styled as styled43 } from "@mui/material/styles";
|
|
5481
|
-
import { jsx as
|
|
5482
|
-
var NotificationHeaderTitleRoot = styled43(
|
|
6360
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
6361
|
+
var NotificationHeaderTitleRoot = styled43(Typography16, {
|
|
5483
6362
|
name: "MuiNotificationPanel",
|
|
5484
6363
|
slot: "HeaderTitle"
|
|
5485
6364
|
})({
|
|
@@ -5489,14 +6368,14 @@ var NotificationHeaderTitle = ({
|
|
|
5489
6368
|
children,
|
|
5490
6369
|
sx
|
|
5491
6370
|
}) => {
|
|
5492
|
-
return /* @__PURE__ */
|
|
6371
|
+
return /* @__PURE__ */ jsx60(NotificationHeaderTitleRoot, { variant: "h6", sx, children });
|
|
5493
6372
|
};
|
|
5494
6373
|
NotificationHeaderTitle.displayName = "NotificationHeaderTitle";
|
|
5495
6374
|
|
|
5496
6375
|
// src/components/NotificationPanel/NotificationHeaderBadge.tsx
|
|
5497
6376
|
import Chip2 from "@mui/material/Chip";
|
|
5498
6377
|
import { styled as styled44 } from "@mui/material/styles";
|
|
5499
|
-
import { jsx as
|
|
6378
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
5500
6379
|
var NotificationHeaderBadgeRoot = styled44(Chip2, {
|
|
5501
6380
|
name: "MuiNotificationPanel",
|
|
5502
6381
|
slot: "HeaderBadge"
|
|
@@ -5512,7 +6391,7 @@ var NotificationHeaderBadge = ({
|
|
|
5512
6391
|
if (!children || children === 0 || children === "0") {
|
|
5513
6392
|
return null;
|
|
5514
6393
|
}
|
|
5515
|
-
return /* @__PURE__ */
|
|
6394
|
+
return /* @__PURE__ */ jsx61(NotificationHeaderBadgeRoot, { label: children, size: "small", color, sx });
|
|
5516
6395
|
};
|
|
5517
6396
|
NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
5518
6397
|
|
|
@@ -5520,7 +6399,7 @@ NotificationHeaderBadge.displayName = "NotificationHeaderBadge";
|
|
|
5520
6399
|
import IconButton5 from "@mui/material/IconButton";
|
|
5521
6400
|
import { styled as styled45 } from "@mui/material/styles";
|
|
5522
6401
|
import { X as X2 } from "@wso2/oxygen-ui-icons-react";
|
|
5523
|
-
import { jsx as
|
|
6402
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
5524
6403
|
var NotificationHeaderCloseRoot = styled45(IconButton5, {
|
|
5525
6404
|
name: "MuiNotificationPanel",
|
|
5526
6405
|
slot: "HeaderClose"
|
|
@@ -5538,27 +6417,27 @@ var NotificationHeaderClose = ({
|
|
|
5538
6417
|
onClose == null ? void 0 : onClose();
|
|
5539
6418
|
}
|
|
5540
6419
|
};
|
|
5541
|
-
return /* @__PURE__ */
|
|
6420
|
+
return /* @__PURE__ */ jsx62(
|
|
5542
6421
|
NotificationHeaderCloseRoot,
|
|
5543
6422
|
{
|
|
5544
6423
|
onClick: handleClick,
|
|
5545
6424
|
size: "small",
|
|
5546
6425
|
sx,
|
|
5547
6426
|
"aria-label": "Close notifications",
|
|
5548
|
-
children: children || /* @__PURE__ */
|
|
6427
|
+
children: children || /* @__PURE__ */ jsx62(X2, { size: 20, "aria-hidden": "true" })
|
|
5549
6428
|
}
|
|
5550
6429
|
);
|
|
5551
6430
|
};
|
|
5552
6431
|
NotificationHeaderClose.displayName = "NotificationHeaderClose";
|
|
5553
6432
|
|
|
5554
6433
|
// src/components/NotificationPanel/NotificationTabs.tsx
|
|
5555
|
-
import
|
|
6434
|
+
import Box27 from "@mui/material/Box";
|
|
5556
6435
|
import Tabs from "@mui/material/Tabs";
|
|
5557
6436
|
import Tab from "@mui/material/Tab";
|
|
5558
6437
|
import Chip3 from "@mui/material/Chip";
|
|
5559
6438
|
import { styled as styled46 } from "@mui/material/styles";
|
|
5560
|
-
import { jsx as
|
|
5561
|
-
var NotificationTabsRoot = styled46(
|
|
6439
|
+
import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6440
|
+
var NotificationTabsRoot = styled46(Box27, {
|
|
5562
6441
|
name: "MuiNotificationPanel",
|
|
5563
6442
|
slot: "Tabs"
|
|
5564
6443
|
})(({ theme }) => ({
|
|
@@ -5575,7 +6454,7 @@ var NotificationTabsInner = styled46(Tabs, {
|
|
|
5575
6454
|
fontWeight: 500
|
|
5576
6455
|
}
|
|
5577
6456
|
});
|
|
5578
|
-
var NotificationTabLabel = styled46(
|
|
6457
|
+
var NotificationTabLabel = styled46(Box27, {
|
|
5579
6458
|
name: "MuiNotificationPanel",
|
|
5580
6459
|
slot: "TabLabel"
|
|
5581
6460
|
})(({ theme }) => ({
|
|
@@ -5596,18 +6475,18 @@ var NotificationTabs = ({
|
|
|
5596
6475
|
onChange,
|
|
5597
6476
|
sx
|
|
5598
6477
|
}) => {
|
|
5599
|
-
return /* @__PURE__ */
|
|
6478
|
+
return /* @__PURE__ */ jsx63(NotificationTabsRoot, { sx, children: /* @__PURE__ */ jsx63(
|
|
5600
6479
|
NotificationTabsInner,
|
|
5601
6480
|
{
|
|
5602
6481
|
value,
|
|
5603
6482
|
onChange: (_, newValue) => onChange(newValue),
|
|
5604
6483
|
variant: "fullWidth",
|
|
5605
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
6484
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx63(
|
|
5606
6485
|
Tab,
|
|
5607
6486
|
{
|
|
5608
|
-
label: /* @__PURE__ */
|
|
6487
|
+
label: /* @__PURE__ */ jsxs23(NotificationTabLabel, { children: [
|
|
5609
6488
|
tab.label,
|
|
5610
|
-
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */
|
|
6489
|
+
tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */ jsx63(
|
|
5611
6490
|
NotificationTabCount,
|
|
5612
6491
|
{
|
|
5613
6492
|
label: tab.count,
|
|
@@ -5625,12 +6504,12 @@ var NotificationTabs = ({
|
|
|
5625
6504
|
};
|
|
5626
6505
|
|
|
5627
6506
|
// src/components/NotificationPanel/NotificationActions.tsx
|
|
5628
|
-
import
|
|
5629
|
-
import
|
|
6507
|
+
import Box28 from "@mui/material/Box";
|
|
6508
|
+
import Button5 from "@mui/material/Button";
|
|
5630
6509
|
import { styled as styled47 } from "@mui/material/styles";
|
|
5631
6510
|
import { CheckCheck, Trash2 } from "@wso2/oxygen-ui-icons-react";
|
|
5632
|
-
import { jsx as
|
|
5633
|
-
var NotificationActionsRoot = styled47(
|
|
6511
|
+
import { jsx as jsx64, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6512
|
+
var NotificationActionsRoot = styled47(Box28, {
|
|
5634
6513
|
name: "MuiNotificationPanel",
|
|
5635
6514
|
slot: "Actions"
|
|
5636
6515
|
})(({ theme }) => ({
|
|
@@ -5642,7 +6521,7 @@ var NotificationActionsRoot = styled47(Box26, {
|
|
|
5642
6521
|
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
5643
6522
|
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
5644
6523
|
}));
|
|
5645
|
-
var NotificationActionButton = styled47(
|
|
6524
|
+
var NotificationActionButton = styled47(Button5, {
|
|
5646
6525
|
name: "MuiNotificationPanel",
|
|
5647
6526
|
slot: "ActionButton"
|
|
5648
6527
|
})({
|
|
@@ -5655,21 +6534,21 @@ var NotificationActions = ({
|
|
|
5655
6534
|
onClearAll,
|
|
5656
6535
|
sx
|
|
5657
6536
|
}) => {
|
|
5658
|
-
return /* @__PURE__ */
|
|
5659
|
-
hasUnread && onMarkAllRead && /* @__PURE__ */
|
|
6537
|
+
return /* @__PURE__ */ jsxs24(NotificationActionsRoot, { sx, children: [
|
|
6538
|
+
hasUnread && onMarkAllRead && /* @__PURE__ */ jsx64(
|
|
5660
6539
|
NotificationActionButton,
|
|
5661
6540
|
{
|
|
5662
6541
|
size: "small",
|
|
5663
|
-
startIcon: /* @__PURE__ */
|
|
6542
|
+
startIcon: /* @__PURE__ */ jsx64(CheckCheck, { size: 14 }),
|
|
5664
6543
|
onClick: onMarkAllRead,
|
|
5665
6544
|
children: "Mark all read"
|
|
5666
6545
|
}
|
|
5667
6546
|
),
|
|
5668
|
-
onClearAll && /* @__PURE__ */
|
|
6547
|
+
onClearAll && /* @__PURE__ */ jsx64(
|
|
5669
6548
|
NotificationActionButton,
|
|
5670
6549
|
{
|
|
5671
6550
|
size: "small",
|
|
5672
|
-
startIcon: /* @__PURE__ */
|
|
6551
|
+
startIcon: /* @__PURE__ */ jsx64(Trash2, { size: 14 }),
|
|
5673
6552
|
onClick: onClearAll,
|
|
5674
6553
|
color: "error",
|
|
5675
6554
|
children: "Clear all"
|
|
@@ -5679,13 +6558,13 @@ var NotificationActions = ({
|
|
|
5679
6558
|
};
|
|
5680
6559
|
|
|
5681
6560
|
// src/components/NotificationPanel/NotificationList.tsx
|
|
5682
|
-
import * as
|
|
5683
|
-
import
|
|
6561
|
+
import * as React31 from "react";
|
|
6562
|
+
import Box29 from "@mui/material/Box";
|
|
5684
6563
|
import List3 from "@mui/material/List";
|
|
5685
6564
|
import Divider6 from "@mui/material/Divider";
|
|
5686
6565
|
import { styled as styled48 } from "@mui/material/styles";
|
|
5687
|
-
import { jsx as
|
|
5688
|
-
var NotificationListRoot = styled48(
|
|
6566
|
+
import { jsx as jsx65, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6567
|
+
var NotificationListRoot = styled48(Box29, {
|
|
5689
6568
|
name: "MuiNotificationPanel",
|
|
5690
6569
|
slot: "List"
|
|
5691
6570
|
})({
|
|
@@ -5697,16 +6576,16 @@ var NotificationList = ({
|
|
|
5697
6576
|
showDividers = true,
|
|
5698
6577
|
sx
|
|
5699
6578
|
}) => {
|
|
5700
|
-
const childArray =
|
|
5701
|
-
return /* @__PURE__ */
|
|
6579
|
+
const childArray = React31.Children.toArray(children);
|
|
6580
|
+
return /* @__PURE__ */ jsx65(NotificationListRoot, { sx, children: /* @__PURE__ */ jsx65(List3, { disablePadding: true, children: childArray.map((child, index) => /* @__PURE__ */ jsxs25(React31.Fragment, { children: [
|
|
5702
6581
|
child,
|
|
5703
|
-
showDividers && index < childArray.length - 1 && /* @__PURE__ */
|
|
6582
|
+
showDividers && index < childArray.length - 1 && /* @__PURE__ */ jsx65(Divider6, {})
|
|
5704
6583
|
] }, index)) }) });
|
|
5705
6584
|
};
|
|
5706
6585
|
|
|
5707
6586
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5708
|
-
import * as
|
|
5709
|
-
import
|
|
6587
|
+
import * as React33 from "react";
|
|
6588
|
+
import Box30 from "@mui/material/Box";
|
|
5710
6589
|
import ListItem2 from "@mui/material/ListItem";
|
|
5711
6590
|
import ListItemButton3 from "@mui/material/ListItemButton";
|
|
5712
6591
|
import ListItemText3 from "@mui/material/ListItemText";
|
|
@@ -5751,11 +6630,11 @@ var getNotificationTypeProps = (type) => {
|
|
|
5751
6630
|
};
|
|
5752
6631
|
|
|
5753
6632
|
// src/components/NotificationPanel/NotificationItemContext.tsx
|
|
5754
|
-
import * as
|
|
5755
|
-
import { jsx as
|
|
5756
|
-
var NotificationItemContext =
|
|
6633
|
+
import * as React32 from "react";
|
|
6634
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
6635
|
+
var NotificationItemContext = React32.createContext(null);
|
|
5757
6636
|
var useNotificationItemContext = () => {
|
|
5758
|
-
const context =
|
|
6637
|
+
const context = React32.useContext(NotificationItemContext);
|
|
5759
6638
|
if (!context) {
|
|
5760
6639
|
throw new Error(
|
|
5761
6640
|
"useNotificationItemContext must be used within a NotificationItem component"
|
|
@@ -5764,11 +6643,11 @@ var useNotificationItemContext = () => {
|
|
|
5764
6643
|
return context;
|
|
5765
6644
|
};
|
|
5766
6645
|
var NotificationItemProvider = ({ value, children }) => {
|
|
5767
|
-
return /* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ jsx66(NotificationItemContext.Provider, { value, children });
|
|
5768
6647
|
};
|
|
5769
6648
|
|
|
5770
6649
|
// src/components/NotificationPanel/NotificationItem.tsx
|
|
5771
|
-
import { jsx as
|
|
6650
|
+
import { jsx as jsx67, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5772
6651
|
var NotificationItemRoot = styled49(ListItem2, {
|
|
5773
6652
|
name: "MuiNotificationPanel",
|
|
5774
6653
|
slot: "Item",
|
|
@@ -5794,7 +6673,7 @@ var NotificationItemDismiss = styled49(IconButton6, {
|
|
|
5794
6673
|
opacity: 1
|
|
5795
6674
|
}
|
|
5796
6675
|
});
|
|
5797
|
-
var NotificationItemFooter = styled49(
|
|
6676
|
+
var NotificationItemFooter = styled49(Box30, {
|
|
5798
6677
|
name: "MuiNotificationPanel",
|
|
5799
6678
|
slot: "ItemFooter"
|
|
5800
6679
|
})(({ theme }) => ({
|
|
@@ -5809,9 +6688,9 @@ var separateChildren5 = (children) => {
|
|
|
5809
6688
|
let messageChild = null;
|
|
5810
6689
|
let timestampChild = null;
|
|
5811
6690
|
let actionChild = null;
|
|
5812
|
-
|
|
6691
|
+
React33.Children.forEach(children, (child) => {
|
|
5813
6692
|
var _a;
|
|
5814
|
-
if (
|
|
6693
|
+
if (React33.isValidElement(child)) {
|
|
5815
6694
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
5816
6695
|
switch (displayName) {
|
|
5817
6696
|
case "NotificationItemAvatar":
|
|
@@ -5861,12 +6740,12 @@ var NotificationItem = ({
|
|
|
5861
6740
|
onAction == null ? void 0 : onAction();
|
|
5862
6741
|
};
|
|
5863
6742
|
const ownerState = { read };
|
|
5864
|
-
return /* @__PURE__ */
|
|
6743
|
+
return /* @__PURE__ */ jsx67(NotificationItemProvider, { value: contextValue, children: /* @__PURE__ */ jsx67(
|
|
5865
6744
|
NotificationItemRoot,
|
|
5866
6745
|
{
|
|
5867
6746
|
disablePadding: true,
|
|
5868
6747
|
ownerState,
|
|
5869
|
-
secondaryAction: onDismiss && /* @__PURE__ */
|
|
6748
|
+
secondaryAction: onDismiss && /* @__PURE__ */ jsx67(
|
|
5870
6749
|
NotificationItemDismiss,
|
|
5871
6750
|
{
|
|
5872
6751
|
size: "small",
|
|
@@ -5875,19 +6754,19 @@ var NotificationItem = ({
|
|
|
5875
6754
|
e.stopPropagation();
|
|
5876
6755
|
onDismiss(id);
|
|
5877
6756
|
},
|
|
5878
|
-
children: /* @__PURE__ */
|
|
6757
|
+
children: /* @__PURE__ */ jsx67(X3, { size: 16, "aria-hidden": "true" })
|
|
5879
6758
|
}
|
|
5880
6759
|
),
|
|
5881
6760
|
sx,
|
|
5882
|
-
children: /* @__PURE__ */
|
|
6761
|
+
children: /* @__PURE__ */ jsxs26(NotificationItemButton, { onClick: handleClick, children: [
|
|
5883
6762
|
avatarChild,
|
|
5884
|
-
/* @__PURE__ */
|
|
6763
|
+
/* @__PURE__ */ jsx67(
|
|
5885
6764
|
ListItemText3,
|
|
5886
6765
|
{
|
|
5887
6766
|
primary: titleChild,
|
|
5888
|
-
secondary: /* @__PURE__ */
|
|
6767
|
+
secondary: /* @__PURE__ */ jsxs26(Box30, { component: "span", children: [
|
|
5889
6768
|
messageChild,
|
|
5890
|
-
/* @__PURE__ */
|
|
6769
|
+
/* @__PURE__ */ jsxs26(NotificationItemFooter, { children: [
|
|
5891
6770
|
timestampChild,
|
|
5892
6771
|
actionChild
|
|
5893
6772
|
] })
|
|
@@ -5904,7 +6783,7 @@ NotificationItem.displayName = "NotificationItem";
|
|
|
5904
6783
|
import ListItemAvatar from "@mui/material/ListItemAvatar";
|
|
5905
6784
|
import Avatar3 from "@mui/material/Avatar";
|
|
5906
6785
|
import { styled as styled50 } from "@mui/material/styles";
|
|
5907
|
-
import { jsx as
|
|
6786
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
5908
6787
|
var NotificationItemAvatarStyled = styled50(Avatar3, {
|
|
5909
6788
|
name: "MuiNotificationPanel",
|
|
5910
6789
|
slot: "ItemAvatar",
|
|
@@ -5928,16 +6807,16 @@ var NotificationItemAvatar = ({
|
|
|
5928
6807
|
color: typeProps.color,
|
|
5929
6808
|
hasChildren: !!children
|
|
5930
6809
|
};
|
|
5931
|
-
return /* @__PURE__ */
|
|
6810
|
+
return /* @__PURE__ */ jsx68(ListItemAvatar, { children: /* @__PURE__ */ jsx68(NotificationItemAvatarStyled, { ownerState, sx, children: children || /* @__PURE__ */ jsx68(Icon, { size: 20 }) }) });
|
|
5932
6811
|
};
|
|
5933
6812
|
NotificationItemAvatar.displayName = "NotificationItemAvatar";
|
|
5934
6813
|
|
|
5935
6814
|
// src/components/NotificationPanel/NotificationItemTitle.tsx
|
|
5936
|
-
import
|
|
5937
|
-
import
|
|
6815
|
+
import Box31 from "@mui/material/Box";
|
|
6816
|
+
import Typography17 from "@mui/material/Typography";
|
|
5938
6817
|
import { styled as styled51 } from "@mui/material/styles";
|
|
5939
|
-
import { jsx as
|
|
5940
|
-
var NotificationItemTitleRoot = styled51(
|
|
6818
|
+
import { jsx as jsx69, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6819
|
+
var NotificationItemTitleRoot = styled51(Box31, {
|
|
5941
6820
|
name: "MuiNotificationPanel",
|
|
5942
6821
|
slot: "ItemTitle"
|
|
5943
6822
|
})(({ theme }) => ({
|
|
@@ -5945,7 +6824,7 @@ var NotificationItemTitleRoot = styled51(Box29, {
|
|
|
5945
6824
|
alignItems: "center",
|
|
5946
6825
|
gap: theme.spacing(1)
|
|
5947
6826
|
}));
|
|
5948
|
-
var NotificationItemTitleText = styled51(
|
|
6827
|
+
var NotificationItemTitleText = styled51(Typography17, {
|
|
5949
6828
|
name: "MuiNotificationPanel",
|
|
5950
6829
|
slot: "ItemTitleText",
|
|
5951
6830
|
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
@@ -5953,7 +6832,7 @@ var NotificationItemTitleText = styled51(Typography15, {
|
|
|
5953
6832
|
fontWeight: ownerState.read ? 400 : 600,
|
|
5954
6833
|
flex: 1
|
|
5955
6834
|
}));
|
|
5956
|
-
var NotificationItemUnreadDot = styled51(
|
|
6835
|
+
var NotificationItemUnreadDot = styled51(Box31, {
|
|
5957
6836
|
name: "MuiNotificationPanel",
|
|
5958
6837
|
slot: "ItemUnreadDot"
|
|
5959
6838
|
})(({ theme }) => ({
|
|
@@ -5969,18 +6848,18 @@ var NotificationItemTitle = ({
|
|
|
5969
6848
|
sx
|
|
5970
6849
|
}) => {
|
|
5971
6850
|
const { read } = useNotificationItemContext();
|
|
5972
|
-
return /* @__PURE__ */
|
|
5973
|
-
/* @__PURE__ */
|
|
5974
|
-
showUnreadIndicator && !read && /* @__PURE__ */
|
|
6851
|
+
return /* @__PURE__ */ jsxs27(NotificationItemTitleRoot, { sx, children: [
|
|
6852
|
+
/* @__PURE__ */ jsx69(NotificationItemTitleText, { variant: "body2", ownerState: { read }, children }),
|
|
6853
|
+
showUnreadIndicator && !read && /* @__PURE__ */ jsx69(NotificationItemUnreadDot, {})
|
|
5975
6854
|
] });
|
|
5976
6855
|
};
|
|
5977
6856
|
NotificationItemTitle.displayName = "NotificationItemTitle";
|
|
5978
6857
|
|
|
5979
6858
|
// src/components/NotificationPanel/NotificationItemMessage.tsx
|
|
5980
|
-
import
|
|
6859
|
+
import Typography18 from "@mui/material/Typography";
|
|
5981
6860
|
import { styled as styled52 } from "@mui/material/styles";
|
|
5982
|
-
import { jsx as
|
|
5983
|
-
var NotificationItemMessageRoot = styled52(
|
|
6861
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
6862
|
+
var NotificationItemMessageRoot = styled52(Typography18, {
|
|
5984
6863
|
name: "MuiNotificationPanel",
|
|
5985
6864
|
slot: "ItemMessage"
|
|
5986
6865
|
})(({ theme }) => ({
|
|
@@ -5992,15 +6871,15 @@ var NotificationItemMessage = ({
|
|
|
5992
6871
|
children,
|
|
5993
6872
|
sx
|
|
5994
6873
|
}) => {
|
|
5995
|
-
return /* @__PURE__ */
|
|
6874
|
+
return /* @__PURE__ */ jsx70(NotificationItemMessageRoot, { component: "span", variant: "caption", sx, children });
|
|
5996
6875
|
};
|
|
5997
6876
|
NotificationItemMessage.displayName = "NotificationItemMessage";
|
|
5998
6877
|
|
|
5999
6878
|
// src/components/NotificationPanel/NotificationItemTimestamp.tsx
|
|
6000
|
-
import
|
|
6879
|
+
import Typography19 from "@mui/material/Typography";
|
|
6001
6880
|
import { styled as styled53 } from "@mui/material/styles";
|
|
6002
|
-
import { jsx as
|
|
6003
|
-
var NotificationItemTimestampRoot = styled53(
|
|
6881
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
6882
|
+
var NotificationItemTimestampRoot = styled53(Typography19, {
|
|
6004
6883
|
name: "MuiNotificationPanel",
|
|
6005
6884
|
slot: "ItemTimestamp"
|
|
6006
6885
|
})(({ theme }) => ({
|
|
@@ -6011,14 +6890,14 @@ var NotificationItemTimestamp = ({
|
|
|
6011
6890
|
children,
|
|
6012
6891
|
sx
|
|
6013
6892
|
}) => {
|
|
6014
|
-
return /* @__PURE__ */
|
|
6893
|
+
return /* @__PURE__ */ jsx71(NotificationItemTimestampRoot, { component: "span", variant: "caption", sx, children });
|
|
6015
6894
|
};
|
|
6016
6895
|
NotificationItemTimestamp.displayName = "NotificationItemTimestamp";
|
|
6017
6896
|
|
|
6018
6897
|
// src/components/NotificationPanel/NotificationItemAction.tsx
|
|
6019
6898
|
import Chip4 from "@mui/material/Chip";
|
|
6020
6899
|
import { styled as styled54 } from "@mui/material/styles";
|
|
6021
|
-
import { jsx as
|
|
6900
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
6022
6901
|
var NotificationItemActionRoot = styled54(Chip4, {
|
|
6023
6902
|
name: "MuiNotificationPanel",
|
|
6024
6903
|
slot: "ItemAction"
|
|
@@ -6041,7 +6920,7 @@ var NotificationItemAction = ({
|
|
|
6041
6920
|
onAction == null ? void 0 : onAction();
|
|
6042
6921
|
}
|
|
6043
6922
|
};
|
|
6044
|
-
return /* @__PURE__ */
|
|
6923
|
+
return /* @__PURE__ */ jsx72(
|
|
6045
6924
|
NotificationItemActionRoot,
|
|
6046
6925
|
{
|
|
6047
6926
|
label: children,
|
|
@@ -6055,12 +6934,12 @@ var NotificationItemAction = ({
|
|
|
6055
6934
|
NotificationItemAction.displayName = "NotificationItemAction";
|
|
6056
6935
|
|
|
6057
6936
|
// src/components/NotificationPanel/NotificationEmptyState.tsx
|
|
6058
|
-
import
|
|
6059
|
-
import
|
|
6937
|
+
import Box32 from "@mui/material/Box";
|
|
6938
|
+
import Typography20 from "@mui/material/Typography";
|
|
6060
6939
|
import { styled as styled55 } from "@mui/material/styles";
|
|
6061
6940
|
import { BellOff } from "@wso2/oxygen-ui-icons-react";
|
|
6062
|
-
import { jsx as
|
|
6063
|
-
var NotificationEmptyStateRoot = styled55(
|
|
6941
|
+
import { jsx as jsx73, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6942
|
+
var NotificationEmptyStateRoot = styled55(Box32, {
|
|
6064
6943
|
name: "MuiNotificationPanel",
|
|
6065
6944
|
slot: "EmptyState"
|
|
6066
6945
|
})(({ theme }) => ({
|
|
@@ -6074,7 +6953,7 @@ var NotificationEmptyStateRoot = styled55(Box30, {
|
|
|
6074
6953
|
paddingRight: theme.spacing(3),
|
|
6075
6954
|
textAlign: "center"
|
|
6076
6955
|
}));
|
|
6077
|
-
var NotificationEmptyStateMessage = styled55(
|
|
6956
|
+
var NotificationEmptyStateMessage = styled55(Typography20, {
|
|
6078
6957
|
name: "MuiNotificationPanel",
|
|
6079
6958
|
slot: "EmptyStateMessage"
|
|
6080
6959
|
})(({ theme }) => ({
|
|
@@ -6085,14 +6964,14 @@ var NotificationEmptyState = ({
|
|
|
6085
6964
|
icon,
|
|
6086
6965
|
sx
|
|
6087
6966
|
}) => {
|
|
6088
|
-
return /* @__PURE__ */
|
|
6089
|
-
icon || /* @__PURE__ */
|
|
6090
|
-
/* @__PURE__ */
|
|
6967
|
+
return /* @__PURE__ */ jsxs28(NotificationEmptyStateRoot, { sx, children: [
|
|
6968
|
+
icon || /* @__PURE__ */ jsx73(BellOff, { size: 48, style: { opacity: 0.3, marginBottom: 16 } }),
|
|
6969
|
+
/* @__PURE__ */ jsx73(NotificationEmptyStateMessage, { variant: "body2", children: message })
|
|
6091
6970
|
] });
|
|
6092
6971
|
};
|
|
6093
6972
|
|
|
6094
6973
|
// src/components/NotificationPanel/NotificationPanel.tsx
|
|
6095
|
-
import { jsx as
|
|
6974
|
+
import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6096
6975
|
var NotificationPanelRoot = styled56(Drawer, {
|
|
6097
6976
|
name: "MuiNotificationPanel",
|
|
6098
6977
|
slot: "Root",
|
|
@@ -6120,9 +6999,9 @@ var NotificationPanel = ({
|
|
|
6120
6999
|
sx
|
|
6121
7000
|
}) => {
|
|
6122
7001
|
var _a;
|
|
6123
|
-
const appShellContext =
|
|
7002
|
+
const appShellContext = React34.useContext(AppShellContext);
|
|
6124
7003
|
const open = (_a = openProp != null ? openProp : appShellContext == null ? void 0 : appShellContext.state.notificationPanelOpen) != null ? _a : false;
|
|
6125
|
-
const onClose =
|
|
7004
|
+
const onClose = React34.useMemo(
|
|
6126
7005
|
() => {
|
|
6127
7006
|
var _a2;
|
|
6128
7007
|
return (_a2 = onCloseProp != null ? onCloseProp : appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel) != null ? _a2 : (() => {
|
|
@@ -6131,10 +7010,10 @@ var NotificationPanel = ({
|
|
|
6131
7010
|
[onCloseProp, appShellContext == null ? void 0 : appShellContext.actions.toggleNotificationPanel]
|
|
6132
7011
|
);
|
|
6133
7012
|
const ariaLabel = typeof ariaLabelProp === "string" && ariaLabelProp.trim().length > 0 ? ariaLabelProp.trim() : "Notifications";
|
|
6134
|
-
const [liveAnnouncement, setLiveAnnouncementState] =
|
|
6135
|
-
const [liveAnnouncementNonce, setLiveAnnouncementNonce] =
|
|
6136
|
-
const prevLiveAnnouncementPropRef =
|
|
6137
|
-
const publishLiveAnnouncement =
|
|
7013
|
+
const [liveAnnouncement, setLiveAnnouncementState] = React34.useState("");
|
|
7014
|
+
const [liveAnnouncementNonce, setLiveAnnouncementNonce] = React34.useState(0);
|
|
7015
|
+
const prevLiveAnnouncementPropRef = React34.useRef(void 0);
|
|
7016
|
+
const publishLiveAnnouncement = React34.useCallback(
|
|
6138
7017
|
(message) => {
|
|
6139
7018
|
if (!open) return;
|
|
6140
7019
|
setLiveAnnouncementState(message);
|
|
@@ -6142,7 +7021,7 @@ var NotificationPanel = ({
|
|
|
6142
7021
|
},
|
|
6143
7022
|
[open]
|
|
6144
7023
|
);
|
|
6145
|
-
|
|
7024
|
+
React34.useEffect(() => {
|
|
6146
7025
|
if (!open) {
|
|
6147
7026
|
setLiveAnnouncementState("");
|
|
6148
7027
|
prevLiveAnnouncementPropRef.current = liveAnnouncementProp;
|
|
@@ -6160,12 +7039,12 @@ var NotificationPanel = ({
|
|
|
6160
7039
|
publishLiveAnnouncement(liveAnnouncementProp);
|
|
6161
7040
|
}
|
|
6162
7041
|
}, [open, liveAnnouncementProp, publishLiveAnnouncement]);
|
|
6163
|
-
const contextValue =
|
|
7042
|
+
const contextValue = React34.useMemo(
|
|
6164
7043
|
() => ({ onClose, open, setLiveAnnouncement: publishLiveAnnouncement }),
|
|
6165
7044
|
[onClose, open, publishLiveAnnouncement]
|
|
6166
7045
|
);
|
|
6167
7046
|
const ownerState = { width };
|
|
6168
|
-
return /* @__PURE__ */
|
|
7047
|
+
return /* @__PURE__ */ jsx74(NotificationPanelContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs29(
|
|
6169
7048
|
NotificationPanelRoot,
|
|
6170
7049
|
{
|
|
6171
7050
|
anchor,
|
|
@@ -6180,8 +7059,8 @@ var NotificationPanel = ({
|
|
|
6180
7059
|
}
|
|
6181
7060
|
},
|
|
6182
7061
|
children: [
|
|
6183
|
-
/* @__PURE__ */
|
|
6184
|
-
|
|
7062
|
+
/* @__PURE__ */ jsx74(
|
|
7063
|
+
Box33,
|
|
6185
7064
|
{
|
|
6186
7065
|
component: "div",
|
|
6187
7066
|
role: "status",
|
|
@@ -6216,30 +7095,30 @@ NotificationPanel.EmptyState = NotificationEmptyState;
|
|
|
6216
7095
|
NotificationPanel.displayName = "NotificationPanel";
|
|
6217
7096
|
|
|
6218
7097
|
// src/components/Footer/Footer.tsx
|
|
6219
|
-
import * as
|
|
6220
|
-
import
|
|
7098
|
+
import * as React35 from "react";
|
|
7099
|
+
import Box34 from "@mui/material/Box";
|
|
6221
7100
|
import { styled as styled60 } from "@mui/material/styles";
|
|
6222
7101
|
|
|
6223
7102
|
// src/components/Footer/FooterCopyright.tsx
|
|
6224
|
-
import
|
|
7103
|
+
import Typography21 from "@mui/material/Typography";
|
|
6225
7104
|
import { styled as styled57 } from "@mui/material/styles";
|
|
6226
|
-
import { jsx as
|
|
6227
|
-
var StyledCopyrightText = styled57(
|
|
7105
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
7106
|
+
var StyledCopyrightText = styled57(Typography21, {
|
|
6228
7107
|
name: "MuiFooter",
|
|
6229
7108
|
slot: "CopyrightText"
|
|
6230
7109
|
})(({ theme }) => ({
|
|
6231
7110
|
color: (theme.vars || theme).palette.text.secondary
|
|
6232
7111
|
}));
|
|
6233
7112
|
var FooterCopyright = ({ children }) => {
|
|
6234
|
-
return /* @__PURE__ */
|
|
7113
|
+
return /* @__PURE__ */ jsx75(StyledCopyrightText, { variant: "caption", children });
|
|
6235
7114
|
};
|
|
6236
7115
|
FooterCopyright.displayName = "Footer.Copyright";
|
|
6237
7116
|
|
|
6238
7117
|
// src/components/Footer/FooterVersion.tsx
|
|
6239
|
-
import
|
|
7118
|
+
import Typography22 from "@mui/material/Typography";
|
|
6240
7119
|
import { styled as styled58 } from "@mui/material/styles";
|
|
6241
|
-
import { jsx as
|
|
6242
|
-
var StyledVersion = styled58(
|
|
7120
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
7121
|
+
var StyledVersion = styled58(Typography22, {
|
|
6243
7122
|
name: "MuiFooter",
|
|
6244
7123
|
slot: "Version"
|
|
6245
7124
|
})(({ theme }) => ({
|
|
@@ -6250,14 +7129,14 @@ var StyledVersion = styled58(Typography20, {
|
|
|
6250
7129
|
fontSize: 11
|
|
6251
7130
|
}));
|
|
6252
7131
|
var FooterVersion = ({ children }) => {
|
|
6253
|
-
return /* @__PURE__ */
|
|
7132
|
+
return /* @__PURE__ */ jsx76(StyledVersion, { variant: "caption", children });
|
|
6254
7133
|
};
|
|
6255
7134
|
FooterVersion.displayName = "Footer.Version";
|
|
6256
7135
|
|
|
6257
7136
|
// src/components/Footer/FooterLink.tsx
|
|
6258
7137
|
import Link2 from "@mui/material/Link";
|
|
6259
7138
|
import { styled as styled59 } from "@mui/material/styles";
|
|
6260
|
-
import { jsx as
|
|
7139
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
6261
7140
|
var StyledLink = styled59(Link2, {
|
|
6262
7141
|
name: "MuiFooter",
|
|
6263
7142
|
slot: "Link"
|
|
@@ -6270,15 +7149,15 @@ var StyledLink = styled59(Link2, {
|
|
|
6270
7149
|
}));
|
|
6271
7150
|
var FooterLink = (_a) => {
|
|
6272
7151
|
var _b = _a, { children, href } = _b, props = __objRest(_b, ["children", "href"]);
|
|
6273
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsx77(StyledLink, __spreadProps(__spreadValues({ href, underline: "hover" }, props), { children }));
|
|
6274
7153
|
};
|
|
6275
7154
|
FooterLink.displayName = "Footer.Link";
|
|
6276
7155
|
|
|
6277
7156
|
// src/components/Footer/FooterDivider.tsx
|
|
6278
7157
|
import Divider7 from "@mui/material/Divider";
|
|
6279
|
-
import { jsx as
|
|
7158
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
6280
7159
|
var FooterDivider = () => {
|
|
6281
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx78(
|
|
6282
7161
|
Divider7,
|
|
6283
7162
|
{
|
|
6284
7163
|
orientation: "vertical",
|
|
@@ -6290,8 +7169,8 @@ var FooterDivider = () => {
|
|
|
6290
7169
|
FooterDivider.displayName = "Footer.Divider";
|
|
6291
7170
|
|
|
6292
7171
|
// src/components/Footer/Footer.tsx
|
|
6293
|
-
import { jsx as
|
|
6294
|
-
var FooterRoot = styled60(
|
|
7172
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7173
|
+
var FooterRoot = styled60(Box34, {
|
|
6295
7174
|
name: "MuiFooter",
|
|
6296
7175
|
slot: "Root"
|
|
6297
7176
|
})(({ theme }) => ({
|
|
@@ -6304,7 +7183,7 @@ var FooterRoot = styled60(Box32, {
|
|
|
6304
7183
|
borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
6305
7184
|
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
6306
7185
|
}));
|
|
6307
|
-
var FooterContent = styled60(
|
|
7186
|
+
var FooterContent = styled60(Box34, {
|
|
6308
7187
|
name: "MuiFooter",
|
|
6309
7188
|
slot: "Content"
|
|
6310
7189
|
})(({ theme }) => ({
|
|
@@ -6318,7 +7197,7 @@ var FooterContent = styled60(Box32, {
|
|
|
6318
7197
|
alignItems: "center"
|
|
6319
7198
|
}
|
|
6320
7199
|
}));
|
|
6321
|
-
var FooterLeft = styled60(
|
|
7200
|
+
var FooterLeft = styled60(Box34, {
|
|
6322
7201
|
name: "MuiFooter",
|
|
6323
7202
|
slot: "Left"
|
|
6324
7203
|
})(({ theme }) => ({
|
|
@@ -6327,7 +7206,7 @@ var FooterLeft = styled60(Box32, {
|
|
|
6327
7206
|
gap: theme.spacing(2),
|
|
6328
7207
|
flexWrap: "wrap"
|
|
6329
7208
|
}));
|
|
6330
|
-
var FooterRight = styled60(
|
|
7209
|
+
var FooterRight = styled60(Box34, {
|
|
6331
7210
|
name: "MuiFooter",
|
|
6332
7211
|
slot: "Right"
|
|
6333
7212
|
})(({ theme }) => ({
|
|
@@ -6337,11 +7216,11 @@ var FooterRight = styled60(Box32, {
|
|
|
6337
7216
|
flexWrap: "wrap"
|
|
6338
7217
|
}));
|
|
6339
7218
|
var Footer = ({ children, sx }) => {
|
|
6340
|
-
const childrenArray =
|
|
7219
|
+
const childrenArray = React35.Children.toArray(children);
|
|
6341
7220
|
const leftChildren = [];
|
|
6342
7221
|
const rightChildren = [];
|
|
6343
7222
|
childrenArray.forEach((child) => {
|
|
6344
|
-
if (
|
|
7223
|
+
if (React35.isValidElement(child)) {
|
|
6345
7224
|
if (child.type === FooterCopyright || child.type === FooterVersion || child.type === FooterDivider) {
|
|
6346
7225
|
leftChildren.push(child);
|
|
6347
7226
|
} else if (child.type === FooterLink) {
|
|
@@ -6349,9 +7228,9 @@ var Footer = ({ children, sx }) => {
|
|
|
6349
7228
|
}
|
|
6350
7229
|
}
|
|
6351
7230
|
});
|
|
6352
|
-
return /* @__PURE__ */
|
|
6353
|
-
leftChildren.length > 0 && /* @__PURE__ */
|
|
6354
|
-
rightChildren.length > 0 && /* @__PURE__ */
|
|
7231
|
+
return /* @__PURE__ */ jsx79(FooterRoot, { component: "footer", sx, children: /* @__PURE__ */ jsxs30(FooterContent, { children: [
|
|
7232
|
+
leftChildren.length > 0 && /* @__PURE__ */ jsx79(FooterLeft, { children: leftChildren }),
|
|
7233
|
+
rightChildren.length > 0 && /* @__PURE__ */ jsx79(FooterRight, { children: rightChildren })
|
|
6355
7234
|
] }) });
|
|
6356
7235
|
};
|
|
6357
7236
|
Footer.Copyright = FooterCopyright;
|
|
@@ -6361,14 +7240,14 @@ Footer.Divider = FooterDivider;
|
|
|
6361
7240
|
Footer.displayName = "Footer";
|
|
6362
7241
|
|
|
6363
7242
|
// src/components/UserMenu/UserMenu.tsx
|
|
6364
|
-
import * as
|
|
7243
|
+
import * as React40 from "react";
|
|
6365
7244
|
import Menu3 from "@mui/material/Menu";
|
|
6366
7245
|
|
|
6367
7246
|
// src/components/UserMenu/UserMenuContext.tsx
|
|
6368
|
-
import * as
|
|
6369
|
-
var UserMenuContext =
|
|
7247
|
+
import * as React36 from "react";
|
|
7248
|
+
var UserMenuContext = React36.createContext(void 0);
|
|
6370
7249
|
var useUserMenu = () => {
|
|
6371
|
-
const context =
|
|
7250
|
+
const context = React36.useContext(UserMenuContext);
|
|
6372
7251
|
if (!context) {
|
|
6373
7252
|
throw new Error("UserMenu sub-components must be used within a UserMenu component");
|
|
6374
7253
|
}
|
|
@@ -6377,7 +7256,7 @@ var useUserMenu = () => {
|
|
|
6377
7256
|
UserMenuContext.displayName = "UserMenu.Context";
|
|
6378
7257
|
|
|
6379
7258
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
6380
|
-
import * as
|
|
7259
|
+
import * as React37 from "react";
|
|
6381
7260
|
import Tooltip8 from "@mui/material/Tooltip";
|
|
6382
7261
|
import IconButton7 from "@mui/material/IconButton";
|
|
6383
7262
|
import Avatar4 from "@mui/material/Avatar";
|
|
@@ -6403,7 +7282,7 @@ function getUserMenuAvatarProps(name, avatar) {
|
|
|
6403
7282
|
}
|
|
6404
7283
|
|
|
6405
7284
|
// src/components/UserMenu/UserMenuTrigger.tsx
|
|
6406
|
-
import { jsx as
|
|
7285
|
+
import { jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6407
7286
|
var StyledTrigger = styled61(IconButton7, {
|
|
6408
7287
|
name: "MuiUserMenu",
|
|
6409
7288
|
slot: "Trigger",
|
|
@@ -6438,14 +7317,14 @@ var StyledNameText = styled61("span", {
|
|
|
6438
7317
|
display: "block"
|
|
6439
7318
|
}
|
|
6440
7319
|
}));
|
|
6441
|
-
var UserMenuTrigger =
|
|
7320
|
+
var UserMenuTrigger = React37.forwardRef(
|
|
6442
7321
|
function UserMenuTrigger2(_a, ref) {
|
|
6443
7322
|
var _b = _a, { name, avatar, showName = false, onClick, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "avatar", "showName", "onClick", "aria-label"]);
|
|
6444
7323
|
const { open, handleOpen } = useUserMenu();
|
|
6445
7324
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
6446
7325
|
const defaultAriaLabel = showName ? name : "Account";
|
|
6447
7326
|
const resolvedAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : defaultAriaLabel;
|
|
6448
|
-
return /* @__PURE__ */
|
|
7327
|
+
return /* @__PURE__ */ jsx80(Tooltip8, { title: "Account", children: /* @__PURE__ */ jsxs31(
|
|
6449
7328
|
StyledTrigger,
|
|
6450
7329
|
__spreadProps(__spreadValues({}, props), {
|
|
6451
7330
|
ref,
|
|
@@ -6460,8 +7339,8 @@ var UserMenuTrigger = React35.forwardRef(
|
|
|
6460
7339
|
"aria-haspopup": "true",
|
|
6461
7340
|
"aria-expanded": open ? "true" : void 0,
|
|
6462
7341
|
children: [
|
|
6463
|
-
/* @__PURE__ */
|
|
6464
|
-
showName && /* @__PURE__ */
|
|
7342
|
+
/* @__PURE__ */ jsx80(StyledAvatar2, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
7343
|
+
showName && /* @__PURE__ */ jsx80(StyledNameText, { children: name })
|
|
6465
7344
|
]
|
|
6466
7345
|
})
|
|
6467
7346
|
) });
|
|
@@ -6471,20 +7350,20 @@ UserMenuTrigger.displayName = "UserMenu.Trigger";
|
|
|
6471
7350
|
|
|
6472
7351
|
// src/components/UserMenu/UserMenuHeader.tsx
|
|
6473
7352
|
import Divider8 from "@mui/material/Divider";
|
|
6474
|
-
import
|
|
7353
|
+
import Box35 from "@mui/material/Box";
|
|
6475
7354
|
import Avatar5 from "@mui/material/Avatar";
|
|
6476
|
-
import
|
|
7355
|
+
import Typography23 from "@mui/material/Typography";
|
|
6477
7356
|
import Chip5 from "@mui/material/Chip";
|
|
6478
7357
|
import { styled as styled62 } from "@mui/material/styles";
|
|
6479
|
-
import { Fragment as
|
|
6480
|
-
var StyledHeaderBox = styled62(
|
|
7358
|
+
import { Fragment as Fragment12, jsx as jsx81, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7359
|
+
var StyledHeaderBox = styled62(Box35, {
|
|
6481
7360
|
name: "MuiUserMenu",
|
|
6482
7361
|
slot: "HeaderBox"
|
|
6483
7362
|
})(({ theme }) => ({
|
|
6484
7363
|
padding: theme.spacing(2),
|
|
6485
7364
|
paddingBottom: theme.spacing(1.5)
|
|
6486
7365
|
}));
|
|
6487
|
-
var StyledHeaderContent = styled62(
|
|
7366
|
+
var StyledHeaderContent = styled62(Box35, {
|
|
6488
7367
|
name: "MuiUserMenu",
|
|
6489
7368
|
slot: "HeaderContent"
|
|
6490
7369
|
})(({ theme }) => ({
|
|
@@ -6503,7 +7382,7 @@ var StyledHeaderAvatar = styled62(Avatar5, {
|
|
|
6503
7382
|
fontSize: 16,
|
|
6504
7383
|
fontWeight: 600
|
|
6505
7384
|
}));
|
|
6506
|
-
var StyledUserInfo = styled62(
|
|
7385
|
+
var StyledUserInfo = styled62(Box35, {
|
|
6507
7386
|
name: "MuiUserMenu",
|
|
6508
7387
|
slot: "UserInfo"
|
|
6509
7388
|
})(({ theme }) => ({
|
|
@@ -6513,7 +7392,7 @@ var StyledUserInfo = styled62(Box33, {
|
|
|
6513
7392
|
flex: 1,
|
|
6514
7393
|
minWidth: 0
|
|
6515
7394
|
}));
|
|
6516
|
-
var StyledNameRow = styled62(
|
|
7395
|
+
var StyledNameRow = styled62(Box35, {
|
|
6517
7396
|
name: "MuiUserMenu",
|
|
6518
7397
|
slot: "NameRow"
|
|
6519
7398
|
})(({ theme }) => ({
|
|
@@ -6521,7 +7400,7 @@ var StyledNameRow = styled62(Box33, {
|
|
|
6521
7400
|
alignItems: "center",
|
|
6522
7401
|
gap: theme.spacing(1)
|
|
6523
7402
|
}));
|
|
6524
|
-
var StyledName = styled62(
|
|
7403
|
+
var StyledName = styled62(Typography23, {
|
|
6525
7404
|
name: "MuiUserMenu",
|
|
6526
7405
|
slot: "Name"
|
|
6527
7406
|
})({
|
|
@@ -6538,7 +7417,7 @@ var StyledRoleChip = styled62(Chip5, {
|
|
|
6538
7417
|
fontSize: 11,
|
|
6539
7418
|
fontWeight: 600
|
|
6540
7419
|
});
|
|
6541
|
-
var StyledEmail = styled62(
|
|
7420
|
+
var StyledEmail = styled62(Typography23, {
|
|
6542
7421
|
name: "MuiUserMenu",
|
|
6543
7422
|
slot: "Email"
|
|
6544
7423
|
})(({ theme }) => ({
|
|
@@ -6550,13 +7429,13 @@ var StyledEmail = styled62(Typography21, {
|
|
|
6550
7429
|
}));
|
|
6551
7430
|
var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
6552
7431
|
const avatarProps = getUserMenuAvatarProps(name, avatar);
|
|
6553
|
-
return /* @__PURE__ */
|
|
6554
|
-
/* @__PURE__ */
|
|
6555
|
-
/* @__PURE__ */
|
|
6556
|
-
/* @__PURE__ */
|
|
6557
|
-
/* @__PURE__ */
|
|
6558
|
-
/* @__PURE__ */
|
|
6559
|
-
role && /* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
7433
|
+
/* @__PURE__ */ jsx81(StyledHeaderBox, { children: /* @__PURE__ */ jsxs32(StyledHeaderContent, { children: [
|
|
7434
|
+
/* @__PURE__ */ jsx81(StyledHeaderAvatar, { src: avatarProps.src, alt: name, children: avatarProps.children }),
|
|
7435
|
+
/* @__PURE__ */ jsxs32(StyledUserInfo, { children: [
|
|
7436
|
+
/* @__PURE__ */ jsxs32(StyledNameRow, { children: [
|
|
7437
|
+
/* @__PURE__ */ jsx81(StyledName, { variant: "subtitle2", children: name }),
|
|
7438
|
+
role && /* @__PURE__ */ jsx81(
|
|
6560
7439
|
StyledRoleChip,
|
|
6561
7440
|
{
|
|
6562
7441
|
label: role,
|
|
@@ -6565,25 +7444,25 @@ var UserMenuHeader = ({ name, email, avatar, role }) => {
|
|
|
6565
7444
|
}
|
|
6566
7445
|
)
|
|
6567
7446
|
] }),
|
|
6568
|
-
/* @__PURE__ */
|
|
7447
|
+
/* @__PURE__ */ jsx81(StyledEmail, { variant: "caption", children: email })
|
|
6569
7448
|
] })
|
|
6570
7449
|
] }) }),
|
|
6571
|
-
/* @__PURE__ */
|
|
7450
|
+
/* @__PURE__ */ jsx81(Divider8, {})
|
|
6572
7451
|
] });
|
|
6573
7452
|
};
|
|
6574
7453
|
UserMenuHeader.displayName = "UserMenu.Header";
|
|
6575
7454
|
|
|
6576
7455
|
// src/components/UserMenu/UserMenuItem.tsx
|
|
6577
|
-
import * as
|
|
6578
|
-
import
|
|
7456
|
+
import * as React38 from "react";
|
|
7457
|
+
import MenuItem6 from "@mui/material/MenuItem";
|
|
6579
7458
|
import ListItemIcon3 from "@mui/material/ListItemIcon";
|
|
6580
7459
|
import ListItemText4 from "@mui/material/ListItemText";
|
|
6581
|
-
import
|
|
7460
|
+
import Box36 from "@mui/material/Box";
|
|
6582
7461
|
import Chip6 from "@mui/material/Chip";
|
|
6583
7462
|
import { styled as styled63 } from "@mui/material/styles";
|
|
6584
7463
|
import { ChevronRight as ChevronRight2 } from "@wso2/oxygen-ui-icons-react";
|
|
6585
|
-
import { jsx as
|
|
6586
|
-
var StyledMenuItem2 = styled63(
|
|
7464
|
+
import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7465
|
+
var StyledMenuItem2 = styled63(MenuItem6, {
|
|
6587
7466
|
name: "MuiUserMenu",
|
|
6588
7467
|
slot: "MenuItem"
|
|
6589
7468
|
})(({ theme }) => ({
|
|
@@ -6610,13 +7489,13 @@ var UserMenuItem = ({
|
|
|
6610
7489
|
handleClose();
|
|
6611
7490
|
onClick == null ? void 0 : onClick();
|
|
6612
7491
|
};
|
|
6613
|
-
return /* @__PURE__ */
|
|
6614
|
-
icon && /* @__PURE__ */
|
|
7492
|
+
return /* @__PURE__ */ jsxs33(StyledMenuItem2, { onClick: handleClick, children: [
|
|
7493
|
+
icon && /* @__PURE__ */ jsx82(ListItemIcon3, { children: React38.isValidElement(icon) ? React38.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
6615
7494
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
6616
7495
|
})) : icon }),
|
|
6617
|
-
/* @__PURE__ */
|
|
6618
|
-
/* @__PURE__ */
|
|
6619
|
-
badge && /* @__PURE__ */
|
|
7496
|
+
/* @__PURE__ */ jsx82(ListItemText4, { primary: label }),
|
|
7497
|
+
/* @__PURE__ */ jsxs33(Box36, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
7498
|
+
badge && /* @__PURE__ */ jsx82(
|
|
6620
7499
|
StyledBillingChip,
|
|
6621
7500
|
{
|
|
6622
7501
|
label: badge,
|
|
@@ -6624,20 +7503,20 @@ var UserMenuItem = ({
|
|
|
6624
7503
|
variant: "outlined"
|
|
6625
7504
|
}
|
|
6626
7505
|
),
|
|
6627
|
-
/* @__PURE__ */
|
|
7506
|
+
/* @__PURE__ */ jsx82(ChevronRight2, { size: 16, style: { color: "var(--mui-palette-text-secondary)" } })
|
|
6628
7507
|
] })
|
|
6629
7508
|
] });
|
|
6630
7509
|
};
|
|
6631
7510
|
UserMenuItem.displayName = "UserMenu.Item";
|
|
6632
7511
|
|
|
6633
7512
|
// src/components/UserMenu/UserMenuLogout.tsx
|
|
6634
|
-
import * as
|
|
6635
|
-
import
|
|
7513
|
+
import * as React39 from "react";
|
|
7514
|
+
import MenuItem7 from "@mui/material/MenuItem";
|
|
6636
7515
|
import ListItemIcon4 from "@mui/material/ListItemIcon";
|
|
6637
7516
|
import ListItemText5 from "@mui/material/ListItemText";
|
|
6638
7517
|
import { styled as styled64 } from "@mui/material/styles";
|
|
6639
|
-
import { jsx as
|
|
6640
|
-
var StyledLogoutItem = styled64(
|
|
7518
|
+
import { jsx as jsx83, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7519
|
+
var StyledLogoutItem = styled64(MenuItem7, {
|
|
6641
7520
|
name: "MuiUserMenu",
|
|
6642
7521
|
slot: "LogoutItem"
|
|
6643
7522
|
})(({ theme }) => ({
|
|
@@ -6655,25 +7534,25 @@ var UserMenuLogout = ({
|
|
|
6655
7534
|
handleClose();
|
|
6656
7535
|
onClick == null ? void 0 : onClick();
|
|
6657
7536
|
};
|
|
6658
|
-
return /* @__PURE__ */
|
|
6659
|
-
icon && /* @__PURE__ */
|
|
7537
|
+
return /* @__PURE__ */ jsxs34(StyledLogoutItem, { onClick: handleClick, children: [
|
|
7538
|
+
icon && /* @__PURE__ */ jsx83(ListItemIcon4, { children: React39.isValidElement(icon) ? React39.cloneElement(icon, __spreadProps(__spreadValues({}, icon.props), {
|
|
6660
7539
|
size: (_a = icon.props.size) != null ? _a : 18
|
|
6661
7540
|
})) : icon }),
|
|
6662
|
-
/* @__PURE__ */
|
|
7541
|
+
/* @__PURE__ */ jsx83(ListItemText5, { primary: label })
|
|
6663
7542
|
] });
|
|
6664
7543
|
};
|
|
6665
7544
|
UserMenuLogout.displayName = "UserMenu.Logout";
|
|
6666
7545
|
|
|
6667
7546
|
// src/components/UserMenu/UserMenuDivider.tsx
|
|
6668
7547
|
import Divider9 from "@mui/material/Divider";
|
|
6669
|
-
import { jsx as
|
|
6670
|
-
var UserMenuDivider = () => /* @__PURE__ */
|
|
7548
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
7549
|
+
var UserMenuDivider = () => /* @__PURE__ */ jsx84(Divider9, {});
|
|
6671
7550
|
UserMenuDivider.displayName = "UserMenu.Divider";
|
|
6672
7551
|
|
|
6673
7552
|
// src/components/UserMenu/UserMenu.tsx
|
|
6674
|
-
import { jsx as
|
|
7553
|
+
import { jsx as jsx85, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6675
7554
|
var UserMenu = ({ children }) => {
|
|
6676
|
-
const [anchorEl, setAnchorEl] =
|
|
7555
|
+
const [anchorEl, setAnchorEl] = React40.useState(null);
|
|
6677
7556
|
const open = Boolean(anchorEl);
|
|
6678
7557
|
const handleOpen = (event) => {
|
|
6679
7558
|
setAnchorEl(event.currentTarget);
|
|
@@ -6681,16 +7560,16 @@ var UserMenu = ({ children }) => {
|
|
|
6681
7560
|
const handleClose = () => {
|
|
6682
7561
|
setAnchorEl(null);
|
|
6683
7562
|
};
|
|
6684
|
-
const childrenArray =
|
|
7563
|
+
const childrenArray = React40.Children.toArray(children);
|
|
6685
7564
|
const triggerChild = childrenArray.find(
|
|
6686
|
-
(child) =>
|
|
7565
|
+
(child) => React40.isValidElement(child) && child.type === UserMenuTrigger
|
|
6687
7566
|
);
|
|
6688
7567
|
const menuChildren = childrenArray.filter(
|
|
6689
|
-
(child) =>
|
|
7568
|
+
(child) => React40.isValidElement(child) && child.type !== UserMenuTrigger
|
|
6690
7569
|
);
|
|
6691
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ jsxs35(UserMenuContext.Provider, { value: { open, anchorEl, handleOpen, handleClose }, children: [
|
|
6692
7571
|
triggerChild,
|
|
6693
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ jsx85(
|
|
6694
7573
|
Menu3,
|
|
6695
7574
|
{
|
|
6696
7575
|
id: "user-menu",
|
|
@@ -6720,15 +7599,15 @@ UserMenu.Divider = UserMenuDivider;
|
|
|
6720
7599
|
UserMenu.displayName = "UserMenu";
|
|
6721
7600
|
|
|
6722
7601
|
// src/components/NotificationBanner/NotificationBanner.tsx
|
|
6723
|
-
import * as
|
|
6724
|
-
import
|
|
7602
|
+
import * as React41 from "react";
|
|
7603
|
+
import Alert2 from "@mui/material/Alert";
|
|
6725
7604
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
6726
7605
|
import Collapse2 from "@mui/material/Collapse";
|
|
6727
|
-
import
|
|
6728
|
-
import
|
|
7606
|
+
import Button6 from "@mui/material/Button";
|
|
7607
|
+
import Box37 from "@mui/material/Box";
|
|
6729
7608
|
import { styled as styled65 } from "@mui/material/styles";
|
|
6730
|
-
import { jsx as
|
|
6731
|
-
var NotificationBannerAlert = styled65(
|
|
7609
|
+
import { jsx as jsx86, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7610
|
+
var NotificationBannerAlert = styled65(Alert2, {
|
|
6732
7611
|
name: "MuiNotificationBanner",
|
|
6733
7612
|
slot: "Root"
|
|
6734
7613
|
})(({ theme }) => __spreadValues({
|
|
@@ -6756,7 +7635,7 @@ var NotificationBannerAlert = styled65(Alert, {
|
|
|
6756
7635
|
}
|
|
6757
7636
|
}
|
|
6758
7637
|
})));
|
|
6759
|
-
var NotificationBannerContent = styled65(
|
|
7638
|
+
var NotificationBannerContent = styled65(Box37, {
|
|
6760
7639
|
name: "MuiNotificationBanner",
|
|
6761
7640
|
slot: "Content"
|
|
6762
7641
|
})({
|
|
@@ -6765,7 +7644,7 @@ var NotificationBannerContent = styled65(Box35, {
|
|
|
6765
7644
|
gap: 2,
|
|
6766
7645
|
flex: 1
|
|
6767
7646
|
});
|
|
6768
|
-
var NotificationBannerAction = styled65(
|
|
7647
|
+
var NotificationBannerAction = styled65(Button6, {
|
|
6769
7648
|
name: "MuiNotificationBanner",
|
|
6770
7649
|
slot: "Action"
|
|
6771
7650
|
})({
|
|
@@ -6786,22 +7665,22 @@ var NotificationBanner = ({
|
|
|
6786
7665
|
onDismiss,
|
|
6787
7666
|
sx
|
|
6788
7667
|
}) => {
|
|
6789
|
-
const [isVisible, setIsVisible] =
|
|
6790
|
-
|
|
7668
|
+
const [isVisible, setIsVisible] = React41.useState(visible);
|
|
7669
|
+
React41.useEffect(() => {
|
|
6791
7670
|
setIsVisible(visible);
|
|
6792
7671
|
}, [visible]);
|
|
6793
7672
|
const handleDismiss = () => {
|
|
6794
7673
|
setIsVisible(false);
|
|
6795
7674
|
onDismiss == null ? void 0 : onDismiss();
|
|
6796
7675
|
};
|
|
6797
|
-
return /* @__PURE__ */
|
|
7676
|
+
return /* @__PURE__ */ jsx86(Collapse2, { in: isVisible, children: /* @__PURE__ */ jsx86(
|
|
6798
7677
|
NotificationBannerAlert,
|
|
6799
7678
|
{
|
|
6800
7679
|
severity,
|
|
6801
7680
|
variant: "filled",
|
|
6802
7681
|
onClose: handleDismiss,
|
|
6803
7682
|
sx,
|
|
6804
|
-
action: actionLabel && onAction ? /* @__PURE__ */
|
|
7683
|
+
action: actionLabel && onAction ? /* @__PURE__ */ jsx86(
|
|
6805
7684
|
NotificationBannerAction,
|
|
6806
7685
|
{
|
|
6807
7686
|
color: "inherit",
|
|
@@ -6810,19 +7689,19 @@ var NotificationBanner = ({
|
|
|
6810
7689
|
children: actionLabel
|
|
6811
7690
|
}
|
|
6812
7691
|
) : void 0,
|
|
6813
|
-
children: /* @__PURE__ */
|
|
6814
|
-
title && /* @__PURE__ */
|
|
6815
|
-
/* @__PURE__ */
|
|
7692
|
+
children: /* @__PURE__ */ jsxs36(NotificationBannerContent, { children: [
|
|
7693
|
+
title && /* @__PURE__ */ jsx86(AlertTitle, { sx: { mb: 0 }, children: title }),
|
|
7694
|
+
/* @__PURE__ */ jsx86(Box37, { component: "span", children: message })
|
|
6816
7695
|
] })
|
|
6817
7696
|
}
|
|
6818
7697
|
) });
|
|
6819
7698
|
};
|
|
6820
7699
|
|
|
6821
7700
|
// src/components/Form/CardButton.tsx
|
|
6822
|
-
import { Card as
|
|
6823
|
-
import { CardHeader, CardContent as
|
|
6824
|
-
import { jsx as
|
|
6825
|
-
var StyledCardButton = styled66(
|
|
7701
|
+
import { Card as Card4, ButtonBase as ButtonBase3, Box as Box38, styled as styled66 } from "@mui/material";
|
|
7702
|
+
import { CardHeader, CardContent as CardContent3, CardActions, CardMedia } from "@mui/material";
|
|
7703
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
7704
|
+
var StyledCardButton = styled66(Card4, {
|
|
6826
7705
|
shouldForwardProp: (prop) => prop !== "selected" && prop !== "disabled"
|
|
6827
7706
|
})(({ theme, selected, disabled, alignItems = "flex-start" }) => ({
|
|
6828
7707
|
flexDirection: "column",
|
|
@@ -6850,7 +7729,7 @@ var StyledCardButton = styled66(Card3, {
|
|
|
6850
7729
|
}));
|
|
6851
7730
|
var CardButton = (props) => {
|
|
6852
7731
|
const _a = props, { disabled, selected, alignItems = "flex-start" } = _a, rest = __objRest(_a, ["disabled", "selected", "alignItems"]);
|
|
6853
|
-
return /* @__PURE__ */
|
|
7732
|
+
return /* @__PURE__ */ jsx87(
|
|
6854
7733
|
StyledCardButton,
|
|
6855
7734
|
__spreadValues({
|
|
6856
7735
|
alignItems,
|
|
@@ -6860,42 +7739,42 @@ var CardButton = (props) => {
|
|
|
6860
7739
|
}, rest)
|
|
6861
7740
|
);
|
|
6862
7741
|
};
|
|
6863
|
-
var DisappearingCardButtonContent = (props) => /* @__PURE__ */
|
|
7742
|
+
var DisappearingCardButtonContent = (props) => /* @__PURE__ */ jsx87(Box38, __spreadValues({ className: "creation-flow-card-actions" }, props));
|
|
6864
7743
|
|
|
6865
7744
|
// src/components/Form/Stack.tsx
|
|
6866
7745
|
import { Stack as OxygenStack } from "@mui/material";
|
|
6867
|
-
import { jsx as
|
|
6868
|
-
var
|
|
6869
|
-
return /* @__PURE__ */
|
|
7746
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
7747
|
+
var Stack3 = (props) => {
|
|
7748
|
+
return /* @__PURE__ */ jsx88(OxygenStack, __spreadValues({ spacing: 2 }, props));
|
|
6870
7749
|
};
|
|
6871
7750
|
|
|
6872
7751
|
// src/components/Form/Typography.tsx
|
|
6873
|
-
import { Typography as
|
|
6874
|
-
import { jsx as
|
|
7752
|
+
import { Typography as Typography24 } from "@mui/material";
|
|
7753
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
6875
7754
|
var Header2 = (props) => {
|
|
6876
7755
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6877
|
-
return /* @__PURE__ */
|
|
7756
|
+
return /* @__PURE__ */ jsx89(Typography24, __spreadProps(__spreadValues({}, rest), { variant: "h4", children }));
|
|
6878
7757
|
};
|
|
6879
7758
|
var Subheader = (props) => {
|
|
6880
7759
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6881
|
-
return /* @__PURE__ */
|
|
7760
|
+
return /* @__PURE__ */ jsx89(Typography24, __spreadProps(__spreadValues({}, rest), { variant: "h5", children }));
|
|
6882
7761
|
};
|
|
6883
7762
|
var Body = (props) => {
|
|
6884
7763
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
6885
|
-
return /* @__PURE__ */
|
|
7764
|
+
return /* @__PURE__ */ jsx89(Typography24, __spreadProps(__spreadValues({}, rest), { variant: "body2", children }));
|
|
6886
7765
|
};
|
|
6887
7766
|
|
|
6888
7767
|
// src/components/Form/Section.tsx
|
|
6889
|
-
import { Card as
|
|
6890
|
-
import { jsx as
|
|
7768
|
+
import { Card as Card5, CardContent as CardContent4, Stack as Stack4 } from "@mui/material";
|
|
7769
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
6891
7770
|
var Section = ({ children }) => {
|
|
6892
|
-
return /* @__PURE__ */
|
|
7771
|
+
return /* @__PURE__ */ jsx90(Card5, { children: /* @__PURE__ */ jsx90(CardContent4, { children: /* @__PURE__ */ jsx90(Stack4, { direction: "column", spacing: 2, children }) }) });
|
|
6893
7772
|
};
|
|
6894
7773
|
|
|
6895
7774
|
// src/components/Form/Wizard.tsx
|
|
6896
7775
|
import {
|
|
6897
|
-
Card as
|
|
6898
|
-
CardContent as
|
|
7776
|
+
Card as Card6,
|
|
7777
|
+
CardContent as CardContent5,
|
|
6899
7778
|
StepLabel,
|
|
6900
7779
|
Step,
|
|
6901
7780
|
Stepper,
|
|
@@ -6903,37 +7782,37 @@ import {
|
|
|
6903
7782
|
} from "@mui/material";
|
|
6904
7783
|
import { styled as styled67 } from "@mui/material/styles";
|
|
6905
7784
|
import { useMemo as useMemo7 } from "react";
|
|
6906
|
-
import { jsx as
|
|
6907
|
-
var StyledWizardActionsStack = styled67(
|
|
7785
|
+
import { jsx as jsx91, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7786
|
+
var StyledWizardActionsStack = styled67(Stack3)(() => ({
|
|
6908
7787
|
justifyContent: "space-between",
|
|
6909
7788
|
flexGrow: 1
|
|
6910
7789
|
}));
|
|
6911
7790
|
function Wizard({ steps, activeStep, actions }) {
|
|
6912
7791
|
const step = useMemo7(() => activeStep < steps.length ? steps[activeStep] : null, [steps, activeStep]);
|
|
6913
|
-
return /* @__PURE__ */
|
|
6914
|
-
/* @__PURE__ */
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
/* @__PURE__ */
|
|
6917
|
-
/* @__PURE__ */
|
|
7792
|
+
return /* @__PURE__ */ jsx91(Card6, { children: /* @__PURE__ */ jsx91(CardContent5, { children: /* @__PURE__ */ jsxs37(Stack3, { children: [
|
|
7793
|
+
/* @__PURE__ */ jsx91(Stepper, { activeStep, children: steps.map((step2) => /* @__PURE__ */ jsx91(Step, { children: /* @__PURE__ */ jsx91(StepLabel, { children: step2.label }) }, step2.label)) }),
|
|
7794
|
+
/* @__PURE__ */ jsx91(Divider10, {}),
|
|
7795
|
+
/* @__PURE__ */ jsx91(Stack3, { direction: "row", children: step == null ? void 0 : step.component }),
|
|
7796
|
+
/* @__PURE__ */ jsx91(StyledWizardActionsStack, { direction: "row", children: actions })
|
|
6918
7797
|
] }) }) });
|
|
6919
7798
|
}
|
|
6920
7799
|
|
|
6921
7800
|
// src/components/Form/ElementWrapper.tsx
|
|
6922
7801
|
import { FormControl as FormControl3, FormLabel } from "@mui/material";
|
|
6923
|
-
import
|
|
6924
|
-
import { jsx as
|
|
7802
|
+
import React42 from "react";
|
|
7803
|
+
import { jsx as jsx92, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6925
7804
|
var ElementWrapper = (props) => {
|
|
6926
7805
|
const { label, name, children } = props;
|
|
6927
7806
|
const labelId = `${name}-label`;
|
|
6928
|
-
const enhancedChildren =
|
|
7807
|
+
const enhancedChildren = React42.Children.map(children, (child) => {
|
|
6929
7808
|
var _a;
|
|
6930
|
-
if (
|
|
6931
|
-
return
|
|
7809
|
+
if (React42.isValidElement(child) && ((_a = child.type) == null ? void 0 : _a.muiName) === "Select" && !child.props.labelId) {
|
|
7810
|
+
return React42.cloneElement(child, { labelId });
|
|
6932
7811
|
}
|
|
6933
7812
|
return child;
|
|
6934
7813
|
});
|
|
6935
|
-
return /* @__PURE__ */
|
|
6936
|
-
/* @__PURE__ */
|
|
7814
|
+
return /* @__PURE__ */ jsxs38(FormControl3, { fullWidth: true, children: [
|
|
7815
|
+
/* @__PURE__ */ jsx92(FormLabel, { id: labelId, htmlFor: name, children: label }),
|
|
6937
7816
|
enhancedChildren
|
|
6938
7817
|
] });
|
|
6939
7818
|
};
|
|
@@ -6943,10 +7822,10 @@ var Form = {
|
|
|
6943
7822
|
CardButton,
|
|
6944
7823
|
DisappearingCardButtonContent,
|
|
6945
7824
|
CardHeader,
|
|
6946
|
-
CardContent:
|
|
7825
|
+
CardContent: CardContent3,
|
|
6947
7826
|
CardActions,
|
|
6948
7827
|
CardMedia,
|
|
6949
|
-
Stack:
|
|
7828
|
+
Stack: Stack3,
|
|
6950
7829
|
Header: Header2,
|
|
6951
7830
|
Subheader,
|
|
6952
7831
|
Body,
|
|
@@ -6957,16 +7836,16 @@ var Form = {
|
|
|
6957
7836
|
};
|
|
6958
7837
|
|
|
6959
7838
|
// src/components/AppShell/AppShell.tsx
|
|
6960
|
-
import * as
|
|
6961
|
-
import
|
|
7839
|
+
import * as React44 from "react";
|
|
7840
|
+
import Box43 from "@mui/material/Box";
|
|
6962
7841
|
|
|
6963
7842
|
// src/layouts/Layout.tsx
|
|
6964
|
-
import
|
|
6965
|
-
import { jsx as
|
|
7843
|
+
import Box39 from "@mui/material/Box";
|
|
7844
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
6966
7845
|
function Layout(_a) {
|
|
6967
7846
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6968
|
-
return /* @__PURE__ */
|
|
6969
|
-
|
|
7847
|
+
return /* @__PURE__ */ jsx93(
|
|
7848
|
+
Box39,
|
|
6970
7849
|
__spreadProps(__spreadValues({
|
|
6971
7850
|
sx: __spreadValues({
|
|
6972
7851
|
display: "flex",
|
|
@@ -6981,12 +7860,12 @@ Layout.displayName = "Layout";
|
|
|
6981
7860
|
var Layout_default = Layout;
|
|
6982
7861
|
|
|
6983
7862
|
// src/layouts/LayoutSidebar.tsx
|
|
6984
|
-
import
|
|
6985
|
-
import { jsx as
|
|
7863
|
+
import Box40 from "@mui/material/Box";
|
|
7864
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
6986
7865
|
function LayoutSidebar(_a) {
|
|
6987
7866
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
6988
|
-
return /* @__PURE__ */
|
|
6989
|
-
|
|
7867
|
+
return /* @__PURE__ */ jsx94(
|
|
7868
|
+
Box40,
|
|
6990
7869
|
__spreadProps(__spreadValues({
|
|
6991
7870
|
sx: __spreadValues({
|
|
6992
7871
|
display: "flex",
|
|
@@ -7008,12 +7887,12 @@ LayoutNavbar.displayName = "Layout.Navbar";
|
|
|
7008
7887
|
var LayoutNavbar_default = LayoutNavbar;
|
|
7009
7888
|
|
|
7010
7889
|
// src/layouts/LayoutContent.tsx
|
|
7011
|
-
import
|
|
7012
|
-
import { jsx as
|
|
7890
|
+
import Box41 from "@mui/material/Box";
|
|
7891
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
7013
7892
|
function LayoutContent(_a) {
|
|
7014
7893
|
var _b = _a, { children = null } = _b, rest = __objRest(_b, ["children"]);
|
|
7015
|
-
return /* @__PURE__ */
|
|
7016
|
-
|
|
7894
|
+
return /* @__PURE__ */ jsx95(
|
|
7895
|
+
Box41,
|
|
7017
7896
|
__spreadProps(__spreadValues({
|
|
7018
7897
|
component: "main",
|
|
7019
7898
|
sx: {
|
|
@@ -7031,12 +7910,12 @@ LayoutContent.displayName = "Layout.Content";
|
|
|
7031
7910
|
var LayoutContent_default = LayoutContent;
|
|
7032
7911
|
|
|
7033
7912
|
// src/layouts/LayoutHeader.tsx
|
|
7034
|
-
import
|
|
7035
|
-
import { jsx as
|
|
7913
|
+
import Box42 from "@mui/material/Box";
|
|
7914
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
7036
7915
|
function LayoutHeader(_a) {
|
|
7037
7916
|
var _b = _a, { children = null, sx } = _b, rest = __objRest(_b, ["children", "sx"]);
|
|
7038
|
-
return /* @__PURE__ */
|
|
7039
|
-
|
|
7917
|
+
return /* @__PURE__ */ jsx96(
|
|
7918
|
+
Box42,
|
|
7040
7919
|
__spreadProps(__spreadValues({
|
|
7041
7920
|
sx: __spreadValues({
|
|
7042
7921
|
display: "flex"
|
|
@@ -7059,45 +7938,45 @@ var Layout2 = Object.assign(Layout_default, {
|
|
|
7059
7938
|
var layouts_default = Layout2;
|
|
7060
7939
|
|
|
7061
7940
|
// src/components/AppShell/AppShellNavbar.tsx
|
|
7062
|
-
import { Fragment as
|
|
7941
|
+
import { Fragment as Fragment13, jsx as jsx97 } from "react/jsx-runtime";
|
|
7063
7942
|
var AppShellNavbar = ({ children }) => {
|
|
7064
|
-
return /* @__PURE__ */
|
|
7943
|
+
return /* @__PURE__ */ jsx97(Fragment13, { children });
|
|
7065
7944
|
};
|
|
7066
7945
|
AppShellNavbar.displayName = "AppShellNavbar";
|
|
7067
7946
|
|
|
7068
7947
|
// src/components/AppShell/AppShellSidebar.tsx
|
|
7069
|
-
import { Fragment as
|
|
7948
|
+
import { Fragment as Fragment14, jsx as jsx98 } from "react/jsx-runtime";
|
|
7070
7949
|
var AppShellSidebar = ({ children }) => {
|
|
7071
|
-
return /* @__PURE__ */
|
|
7950
|
+
return /* @__PURE__ */ jsx98(Fragment14, { children });
|
|
7072
7951
|
};
|
|
7073
7952
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
7074
7953
|
|
|
7075
7954
|
// src/components/AppShell/AppShellMain.tsx
|
|
7076
|
-
import { Fragment as
|
|
7955
|
+
import { Fragment as Fragment15, jsx as jsx99 } from "react/jsx-runtime";
|
|
7077
7956
|
var AppShellMain = ({ children }) => {
|
|
7078
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ jsx99(Fragment15, { children });
|
|
7079
7958
|
};
|
|
7080
7959
|
AppShellMain.displayName = "AppShellMain";
|
|
7081
7960
|
|
|
7082
7961
|
// src/components/AppShell/AppShellFooter.tsx
|
|
7083
|
-
import { Fragment as
|
|
7962
|
+
import { Fragment as Fragment16, jsx as jsx100 } from "react/jsx-runtime";
|
|
7084
7963
|
var AppShellFooter = ({ children }) => {
|
|
7085
|
-
return /* @__PURE__ */
|
|
7964
|
+
return /* @__PURE__ */ jsx100(Fragment16, { children });
|
|
7086
7965
|
};
|
|
7087
7966
|
AppShellFooter.displayName = "AppShellFooter";
|
|
7088
7967
|
|
|
7089
7968
|
// src/components/AppShell/AppShellNotificationPanel.tsx
|
|
7090
|
-
import { Fragment as
|
|
7969
|
+
import { Fragment as Fragment17, jsx as jsx101 } from "react/jsx-runtime";
|
|
7091
7970
|
var AppShellNotificationPanel = ({ children }) => {
|
|
7092
|
-
return /* @__PURE__ */
|
|
7971
|
+
return /* @__PURE__ */ jsx101(Fragment17, { children });
|
|
7093
7972
|
};
|
|
7094
7973
|
AppShellNotificationPanel.displayName = "AppShellNotificationPanel";
|
|
7095
7974
|
|
|
7096
7975
|
// src/hooks/useAppShell/useAppShell.ts
|
|
7097
|
-
import * as
|
|
7976
|
+
import * as React43 from "react";
|
|
7098
7977
|
import useMediaQuery3 from "@mui/material/useMediaQuery";
|
|
7099
7978
|
var useAppShell = (options) => {
|
|
7100
|
-
const contextValue =
|
|
7979
|
+
const contextValue = React43.useContext(AppShellContext);
|
|
7101
7980
|
const {
|
|
7102
7981
|
initialCollapsed = false,
|
|
7103
7982
|
initialActiveItem = "dashboard",
|
|
@@ -7108,7 +7987,7 @@ var useAppShell = (options) => {
|
|
|
7108
7987
|
} = options || {};
|
|
7109
7988
|
const isMobile = useMediaQuery3((theme) => theme.breakpoints.down("md"));
|
|
7110
7989
|
const isCreateMode = options !== void 0;
|
|
7111
|
-
const [state, setState] =
|
|
7990
|
+
const [state, setState] = React43.useState({
|
|
7112
7991
|
sidebarCollapsed: initialCollapsed,
|
|
7113
7992
|
notificationPanelOpen: false,
|
|
7114
7993
|
activeMenuItem: initialActiveItem,
|
|
@@ -7116,29 +7995,29 @@ var useAppShell = (options) => {
|
|
|
7116
7995
|
sidebarWidth,
|
|
7117
7996
|
sidebarCollapsedWidth
|
|
7118
7997
|
});
|
|
7119
|
-
|
|
7998
|
+
React43.useEffect(() => {
|
|
7120
7999
|
if (isCreateMode && collapseOnMobile && isMobile) {
|
|
7121
8000
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
7122
8001
|
}
|
|
7123
8002
|
}, [isCreateMode, collapseOnMobile, isMobile]);
|
|
7124
|
-
const toggleSidebar =
|
|
8003
|
+
const toggleSidebar = React43.useCallback(() => {
|
|
7125
8004
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: !prev.sidebarCollapsed }));
|
|
7126
8005
|
}, []);
|
|
7127
|
-
const setSidebarCollapsed =
|
|
8006
|
+
const setSidebarCollapsed = React43.useCallback((collapsed) => {
|
|
7128
8007
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: collapsed }));
|
|
7129
8008
|
}, []);
|
|
7130
|
-
const collapseSidebar =
|
|
8009
|
+
const collapseSidebar = React43.useCallback(() => {
|
|
7131
8010
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: true }));
|
|
7132
8011
|
}, []);
|
|
7133
|
-
const expandSidebar =
|
|
8012
|
+
const expandSidebar = React43.useCallback(() => {
|
|
7134
8013
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { sidebarCollapsed: false }));
|
|
7135
8014
|
}, []);
|
|
7136
|
-
const toggleNotificationPanel =
|
|
8015
|
+
const toggleNotificationPanel = React43.useCallback(() => {
|
|
7137
8016
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
7138
8017
|
notificationPanelOpen: !prev.notificationPanelOpen
|
|
7139
8018
|
}));
|
|
7140
8019
|
}, []);
|
|
7141
|
-
const setActiveMenuItem =
|
|
8020
|
+
const setActiveMenuItem = React43.useCallback((id) => {
|
|
7142
8021
|
setState((prev) => {
|
|
7143
8022
|
const newState = __spreadProps(__spreadValues({}, prev), { activeMenuItem: id });
|
|
7144
8023
|
if (collapseOnSelectOnMobile && isMobile && !prev.sidebarCollapsed) {
|
|
@@ -7147,14 +8026,14 @@ var useAppShell = (options) => {
|
|
|
7147
8026
|
return newState;
|
|
7148
8027
|
});
|
|
7149
8028
|
}, [collapseOnSelectOnMobile, isMobile]);
|
|
7150
|
-
const toggleMenu =
|
|
8029
|
+
const toggleMenu = React43.useCallback((id) => {
|
|
7151
8030
|
setState((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
7152
8031
|
expandedMenus: __spreadProps(__spreadValues({}, prev.expandedMenus), {
|
|
7153
8032
|
[id]: !prev.expandedMenus[id]
|
|
7154
8033
|
})
|
|
7155
8034
|
}));
|
|
7156
8035
|
}, []);
|
|
7157
|
-
const actions =
|
|
8036
|
+
const actions = React43.useMemo(
|
|
7158
8037
|
() => ({
|
|
7159
8038
|
toggleSidebar,
|
|
7160
8039
|
setSidebarCollapsed,
|
|
@@ -7174,7 +8053,7 @@ var useAppShell = (options) => {
|
|
|
7174
8053
|
toggleMenu
|
|
7175
8054
|
]
|
|
7176
8055
|
);
|
|
7177
|
-
const createdValue =
|
|
8056
|
+
const createdValue = React43.useMemo(
|
|
7178
8057
|
() => ({
|
|
7179
8058
|
state,
|
|
7180
8059
|
actions
|
|
@@ -7193,7 +8072,7 @@ var useAppShell = (options) => {
|
|
|
7193
8072
|
};
|
|
7194
8073
|
|
|
7195
8074
|
// src/components/AppShell/AppShell.tsx
|
|
7196
|
-
import { jsx as
|
|
8075
|
+
import { jsx as jsx102, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
7197
8076
|
var SLOT_DISPLAY_NAMES = {
|
|
7198
8077
|
Navbar: "AppShellNavbar",
|
|
7199
8078
|
Sidebar: "AppShellSidebar",
|
|
@@ -7209,9 +8088,9 @@ var extractSlots = (children) => {
|
|
|
7209
8088
|
footer: null,
|
|
7210
8089
|
notificationPanel: null
|
|
7211
8090
|
};
|
|
7212
|
-
|
|
8091
|
+
React44.Children.forEach(children, (child) => {
|
|
7213
8092
|
var _a;
|
|
7214
|
-
if (
|
|
8093
|
+
if (React44.isValidElement(child)) {
|
|
7215
8094
|
const displayName = (_a = child.type) == null ? void 0 : _a.displayName;
|
|
7216
8095
|
const childProps = child.props;
|
|
7217
8096
|
switch (displayName) {
|
|
@@ -7243,12 +8122,12 @@ var AppShell = (_a) => {
|
|
|
7243
8122
|
var _b = _a, { children, sx } = _b, shellOptions = __objRest(_b, ["children", "sx"]);
|
|
7244
8123
|
const shell = useAppShell(shellOptions);
|
|
7245
8124
|
const slots = extractSlots(children);
|
|
7246
|
-
return /* @__PURE__ */
|
|
7247
|
-
slots.navbar && /* @__PURE__ */
|
|
7248
|
-
/* @__PURE__ */
|
|
7249
|
-
slots.sidebar && /* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7251
|
-
/* @__PURE__ */
|
|
8125
|
+
return /* @__PURE__ */ jsx102(AppShellContext.Provider, { value: shell, children: /* @__PURE__ */ jsxs39(layouts_default, { sx: __spreadValues({ height: "100vh", flexDirection: "column" }, sx), children: [
|
|
8126
|
+
slots.navbar && /* @__PURE__ */ jsx102(layouts_default.Navbar, { children: slots.navbar }),
|
|
8127
|
+
/* @__PURE__ */ jsxs39(layouts_default, { sx: { flex: 1, overflow: "hidden" }, children: [
|
|
8128
|
+
slots.sidebar && /* @__PURE__ */ jsx102(layouts_default.Sidebar, { children: slots.sidebar }),
|
|
8129
|
+
/* @__PURE__ */ jsxs39(layouts_default.Content, { sx: { flex: 1, display: "flex", flexDirection: "column", overflow: "auto" }, children: [
|
|
8130
|
+
/* @__PURE__ */ jsx102(Box43, { sx: { flex: 1, overflow: "auto", display: "flex" }, children: slots.main }),
|
|
7252
8131
|
slots.footer
|
|
7253
8132
|
] })
|
|
7254
8133
|
] }),
|
|
@@ -7276,7 +8155,7 @@ var densityStyles = {
|
|
|
7276
8155
|
// src/components/ListingTable/ListingTable/ListingTableContainer.tsx
|
|
7277
8156
|
import MuiTableContainer from "@mui/material/TableContainer";
|
|
7278
8157
|
import Paper from "@mui/material/Paper";
|
|
7279
|
-
import { jsx as
|
|
8158
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
7280
8159
|
function ListingTableContainer(_a) {
|
|
7281
8160
|
var _b = _a, {
|
|
7282
8161
|
elevation = 1,
|
|
@@ -7288,16 +8167,16 @@ function ListingTableContainer(_a) {
|
|
|
7288
8167
|
"children"
|
|
7289
8168
|
]);
|
|
7290
8169
|
if (disablePaper) {
|
|
7291
|
-
return /* @__PURE__ */
|
|
8170
|
+
return /* @__PURE__ */ jsx103(MuiTableContainer, __spreadProps(__spreadValues({ sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
7292
8171
|
}
|
|
7293
|
-
return /* @__PURE__ */
|
|
8172
|
+
return /* @__PURE__ */ jsx103(MuiTableContainer, __spreadProps(__spreadValues({ component: Paper, elevation, sx: __spreadValues({ width: "100%" }, props.sx) }, props), { children }));
|
|
7294
8173
|
}
|
|
7295
8174
|
var ListingTableContainer_default = ListingTableContainer;
|
|
7296
8175
|
|
|
7297
8176
|
// src/components/ListingTable/ListingTable/ListingTableHead.tsx
|
|
7298
8177
|
import MuiTableHead from "@mui/material/TableHead";
|
|
7299
8178
|
import { styled as styled68 } from "@mui/material/styles";
|
|
7300
|
-
import { jsx as
|
|
8179
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
7301
8180
|
var StyledTableHead = styled68(MuiTableHead)(({ theme }) => ({
|
|
7302
8181
|
"& .MuiTableCell-head": __spreadValues(__spreadValues({
|
|
7303
8182
|
fontWeight: 600
|
|
@@ -7309,27 +8188,27 @@ var StyledTableHead = styled68(MuiTableHead)(({ theme }) => ({
|
|
|
7309
8188
|
}));
|
|
7310
8189
|
function ListingTableHead(_a) {
|
|
7311
8190
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
7312
|
-
return /* @__PURE__ */
|
|
8191
|
+
return /* @__PURE__ */ jsx104(StyledTableHead, __spreadProps(__spreadValues({}, props), { children }));
|
|
7313
8192
|
}
|
|
7314
8193
|
var ListingTableHead_default = ListingTableHead;
|
|
7315
8194
|
|
|
7316
8195
|
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
7317
|
-
import { Children as Children15, Fragment as
|
|
8196
|
+
import { Children as Children15, Fragment as Fragment18, isValidElement as isValidElement15 } from "react";
|
|
7318
8197
|
import MuiTableBody from "@mui/material/TableBody";
|
|
7319
8198
|
import MuiTableRow from "@mui/material/TableRow";
|
|
7320
8199
|
import MuiTableCell from "@mui/material/TableCell";
|
|
7321
|
-
import
|
|
8200
|
+
import Box45 from "@mui/material/Box";
|
|
7322
8201
|
import { Search as Search2 } from "@wso2/oxygen-ui-icons-react";
|
|
7323
8202
|
|
|
7324
8203
|
// src/components/ListingTable/context.ts
|
|
7325
|
-
import * as
|
|
7326
|
-
var ListingTableContext =
|
|
8204
|
+
import * as React45 from "react";
|
|
8205
|
+
var ListingTableContext = React45.createContext(null);
|
|
7327
8206
|
ListingTableContext.displayName = "ListingTableContext";
|
|
7328
8207
|
var useListingTable = () => {
|
|
7329
|
-
return
|
|
8208
|
+
return React45.useContext(ListingTableContext);
|
|
7330
8209
|
};
|
|
7331
8210
|
var useListingTableRequired = () => {
|
|
7332
|
-
const context =
|
|
8211
|
+
const context = React45.useContext(ListingTableContext);
|
|
7333
8212
|
if (!context) {
|
|
7334
8213
|
throw new Error(
|
|
7335
8214
|
"useListingTableRequired must be used within a ListingTable.Provider. Use useListingTable() for optional context access."
|
|
@@ -7339,9 +8218,9 @@ var useListingTableRequired = () => {
|
|
|
7339
8218
|
};
|
|
7340
8219
|
|
|
7341
8220
|
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
7342
|
-
import
|
|
7343
|
-
import
|
|
7344
|
-
import { jsx as
|
|
8221
|
+
import Box44 from "@mui/material/Box";
|
|
8222
|
+
import Typography25 from "@mui/material/Typography";
|
|
8223
|
+
import { jsx as jsx105, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7345
8224
|
function ListingTableEmptyState({
|
|
7346
8225
|
title = "No data available",
|
|
7347
8226
|
description,
|
|
@@ -7350,8 +8229,8 @@ function ListingTableEmptyState({
|
|
|
7350
8229
|
minHeight = 300,
|
|
7351
8230
|
sx
|
|
7352
8231
|
}) {
|
|
7353
|
-
return /* @__PURE__ */
|
|
7354
|
-
|
|
8232
|
+
return /* @__PURE__ */ jsxs40(
|
|
8233
|
+
Box44,
|
|
7355
8234
|
{
|
|
7356
8235
|
sx: __spreadValues({
|
|
7357
8236
|
display: "flex",
|
|
@@ -7363,8 +8242,8 @@ function ListingTableEmptyState({
|
|
|
7363
8242
|
textAlign: "center"
|
|
7364
8243
|
}, sx),
|
|
7365
8244
|
children: [
|
|
7366
|
-
illustration && /* @__PURE__ */
|
|
7367
|
-
|
|
8245
|
+
illustration && /* @__PURE__ */ jsx105(
|
|
8246
|
+
Box44,
|
|
7368
8247
|
{
|
|
7369
8248
|
sx: {
|
|
7370
8249
|
mb: 2,
|
|
@@ -7377,9 +8256,9 @@ function ListingTableEmptyState({
|
|
|
7377
8256
|
children: illustration
|
|
7378
8257
|
}
|
|
7379
8258
|
),
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
description && /* @__PURE__ */
|
|
7382
|
-
action && /* @__PURE__ */
|
|
8259
|
+
/* @__PURE__ */ jsx105(Typography25, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
8260
|
+
description && /* @__PURE__ */ jsx105(Typography25, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
8261
|
+
action && /* @__PURE__ */ jsx105(Box44, { children: action })
|
|
7383
8262
|
]
|
|
7384
8263
|
}
|
|
7385
8264
|
);
|
|
@@ -7387,10 +8266,10 @@ function ListingTableEmptyState({
|
|
|
7387
8266
|
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
7388
8267
|
|
|
7389
8268
|
// src/components/ListingTable/ListingTable/ListingTableBody.tsx
|
|
7390
|
-
import { jsx as
|
|
8269
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
7391
8270
|
function hasContent(node) {
|
|
7392
8271
|
return Children15.toArray(node).some(
|
|
7393
|
-
(child) => isValidElement15(child) && child.type ===
|
|
8272
|
+
(child) => isValidElement15(child) && child.type === Fragment18 ? hasContent(child.props.children) : true
|
|
7394
8273
|
);
|
|
7395
8274
|
}
|
|
7396
8275
|
function ListingTableBody(_a) {
|
|
@@ -7400,7 +8279,7 @@ function ListingTableBody(_a) {
|
|
|
7400
8279
|
loading,
|
|
7401
8280
|
noSearchResultsText = "No results found",
|
|
7402
8281
|
noSearchResultsDescription = "Try a different keyword",
|
|
7403
|
-
noSearchResultsIcon = /* @__PURE__ */
|
|
8282
|
+
noSearchResultsIcon = /* @__PURE__ */ jsx106(Search2, {}),
|
|
7404
8283
|
emptyStateColSpan = 1e3
|
|
7405
8284
|
} = _b, props = __objRest(_b, [
|
|
7406
8285
|
"children",
|
|
@@ -7417,7 +8296,7 @@ function ListingTableBody(_a) {
|
|
|
7417
8296
|
const isLoading = (_b2 = loading != null ? loading : context == null ? void 0 : context.loading) != null ? _b2 : false;
|
|
7418
8297
|
const hasRows = hasContent(children);
|
|
7419
8298
|
if (isSearching && !isLoading && !hasRows) {
|
|
7420
|
-
return /* @__PURE__ */
|
|
8299
|
+
return /* @__PURE__ */ jsx106(MuiTableBody, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx106(MuiTableRow, { children: /* @__PURE__ */ jsx106(MuiTableCell, { colSpan: emptyStateColSpan, sx: { border: 0 }, children: /* @__PURE__ */ jsx106(Box45, { role: "status", "aria-live": "polite", children: /* @__PURE__ */ jsx106(
|
|
7421
8300
|
ListingTableEmptyState,
|
|
7422
8301
|
{
|
|
7423
8302
|
title: noSearchResultsText,
|
|
@@ -7426,23 +8305,23 @@ function ListingTableBody(_a) {
|
|
|
7426
8305
|
}
|
|
7427
8306
|
) }) }) }) }));
|
|
7428
8307
|
}
|
|
7429
|
-
return /* @__PURE__ */
|
|
8308
|
+
return /* @__PURE__ */ jsx106(MuiTableBody, __spreadProps(__spreadValues({}, props), { children }));
|
|
7430
8309
|
}
|
|
7431
8310
|
var ListingTableBody_default = ListingTableBody;
|
|
7432
8311
|
|
|
7433
8312
|
// src/components/ListingTable/ListingTable/ListingTableFooter.tsx
|
|
7434
8313
|
import MuiTableFooter from "@mui/material/TableFooter";
|
|
7435
|
-
import { jsx as
|
|
8314
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
7436
8315
|
function ListingTableFooter(_a) {
|
|
7437
8316
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
7438
|
-
return /* @__PURE__ */
|
|
8317
|
+
return /* @__PURE__ */ jsx107(MuiTableFooter, __spreadProps(__spreadValues({}, props), { children }));
|
|
7439
8318
|
}
|
|
7440
8319
|
var ListingTableFooter_default = ListingTableFooter;
|
|
7441
8320
|
|
|
7442
8321
|
// src/components/ListingTable/ListingTable/ListingTableRow.tsx
|
|
7443
8322
|
import MuiTableRow2 from "@mui/material/TableRow";
|
|
7444
8323
|
import { styled as styled69, alpha as alpha2 } from "@mui/material/styles";
|
|
7445
|
-
import { jsx as
|
|
8324
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
7446
8325
|
var StyledTableRow = styled69(MuiTableRow2, {
|
|
7447
8326
|
shouldForwardProp: (prop) => !["clickable", "variant"].includes(prop)
|
|
7448
8327
|
})(({ theme: muiTheme, clickable, variant = "table" }) => {
|
|
@@ -7501,14 +8380,14 @@ function ListingTableRow(_a) {
|
|
|
7501
8380
|
"variant",
|
|
7502
8381
|
"children"
|
|
7503
8382
|
]);
|
|
7504
|
-
return /* @__PURE__ */
|
|
8383
|
+
return /* @__PURE__ */ jsx108(StyledTableRow, __spreadProps(__spreadValues({ clickable, variant }, props), { children }));
|
|
7505
8384
|
}
|
|
7506
8385
|
var ListingTableRow_default = ListingTableRow;
|
|
7507
8386
|
|
|
7508
8387
|
// src/components/ListingTable/ListingTable/ListingTableCell.tsx
|
|
7509
8388
|
import MuiTableCell2 from "@mui/material/TableCell";
|
|
7510
8389
|
import { styled as styled70 } from "@mui/material/styles";
|
|
7511
|
-
import { jsx as
|
|
8390
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
7512
8391
|
var StyledTableCell = styled70(MuiTableCell2, {
|
|
7513
8392
|
shouldForwardProp: (prop) => {
|
|
7514
8393
|
const excludedProps = ["truncate", "maxWidth"];
|
|
@@ -7531,7 +8410,7 @@ function ListingTableCell(_a) {
|
|
|
7531
8410
|
"maxWidth",
|
|
7532
8411
|
"children"
|
|
7533
8412
|
]);
|
|
7534
|
-
return /* @__PURE__ */
|
|
8413
|
+
return /* @__PURE__ */ jsx109(StyledTableCell, __spreadProps(__spreadValues({ truncate, maxWidth }, props), { children }));
|
|
7535
8414
|
}
|
|
7536
8415
|
var ListingTableCell_default = ListingTableCell;
|
|
7537
8416
|
|
|
@@ -7539,7 +8418,7 @@ var ListingTableCell_default = ListingTableCell;
|
|
|
7539
8418
|
import { useCallback as useCallback5 } from "react";
|
|
7540
8419
|
import { DataGrid } from "@mui/x-data-grid";
|
|
7541
8420
|
import { styled as styled71, alpha as alpha3 } from "@mui/material/styles";
|
|
7542
|
-
import { jsx as
|
|
8421
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
7543
8422
|
var StyledDataGrid = styled71(DataGrid)(({ theme }) => ({
|
|
7544
8423
|
// Remove outer border for seamless integration within ListingTable.Container
|
|
7545
8424
|
border: "none",
|
|
@@ -7697,7 +8576,7 @@ function ListingTableDataGrid(_a) {
|
|
|
7697
8576
|
"& .MuiDataGrid-cell": { padding: cellPadding }
|
|
7698
8577
|
};
|
|
7699
8578
|
const mergedSx = variant === "card" ? [cardSx, densitySx, ...Array.isArray(sx) ? sx : [sx]] : [densitySx, ...Array.isArray(sx) ? sx : [sx]];
|
|
7700
|
-
return /* @__PURE__ */
|
|
8579
|
+
return /* @__PURE__ */ jsx110(
|
|
7701
8580
|
StyledDataGrid,
|
|
7702
8581
|
__spreadValues({
|
|
7703
8582
|
density,
|
|
@@ -7712,13 +8591,13 @@ function ListingTableDataGrid(_a) {
|
|
|
7712
8591
|
var ListingTableDataGrid_default = ListingTableDataGrid;
|
|
7713
8592
|
|
|
7714
8593
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
7715
|
-
import { useState as
|
|
7716
|
-
import
|
|
8594
|
+
import { useState as useState11, useCallback as useCallback6 } from "react";
|
|
8595
|
+
import Box46 from "@mui/material/Box";
|
|
7717
8596
|
import TextField3 from "@mui/material/TextField";
|
|
7718
8597
|
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
7719
8598
|
import IconButton8 from "@mui/material/IconButton";
|
|
7720
8599
|
import { Search as Search3, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
7721
|
-
import { Fragment as
|
|
8600
|
+
import { Fragment as Fragment19, jsx as jsx111, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7722
8601
|
function ListingTableToolbar({
|
|
7723
8602
|
showSearch = false,
|
|
7724
8603
|
searchSlot,
|
|
@@ -7732,7 +8611,7 @@ function ListingTableToolbar({
|
|
|
7732
8611
|
sx
|
|
7733
8612
|
}) {
|
|
7734
8613
|
const tableContext = useListingTable();
|
|
7735
|
-
const [internalSearchValue, setInternalSearchValue] =
|
|
8614
|
+
const [internalSearchValue, setInternalSearchValue] = useState11("");
|
|
7736
8615
|
const isControlledByProp = controlledSearchValue !== void 0;
|
|
7737
8616
|
const isControlledByContext = !isControlledByProp && (tableContext == null ? void 0 : tableContext.searchValue) !== void 0;
|
|
7738
8617
|
const isControlled = isControlledByProp || isControlledByContext;
|
|
@@ -7759,7 +8638,7 @@ function ListingTableToolbar({
|
|
|
7759
8638
|
return searchSlot;
|
|
7760
8639
|
}
|
|
7761
8640
|
if (showSearch) {
|
|
7762
|
-
return /* @__PURE__ */
|
|
8641
|
+
return /* @__PURE__ */ jsx111(
|
|
7763
8642
|
TextField3,
|
|
7764
8643
|
{
|
|
7765
8644
|
size: "small",
|
|
@@ -7775,8 +8654,8 @@ function ListingTableToolbar({
|
|
|
7775
8654
|
"aria-label": searchPlaceholder || "Search"
|
|
7776
8655
|
},
|
|
7777
8656
|
input: {
|
|
7778
|
-
startAdornment: /* @__PURE__ */
|
|
7779
|
-
endAdornment: searchValue ? /* @__PURE__ */
|
|
8657
|
+
startAdornment: /* @__PURE__ */ jsx111(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx111(Search3, { size: 18, "aria-hidden": "true" }) }),
|
|
8658
|
+
endAdornment: searchValue ? /* @__PURE__ */ jsx111(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx111(IconButton8, { size: "small", onClick: handleClearSearch, edge: "end", "aria-label": "Clear search", children: /* @__PURE__ */ jsx111(X4, { size: 16, "aria-hidden": "true" }) }) }) : null
|
|
7780
8659
|
}
|
|
7781
8660
|
}
|
|
7782
8661
|
}
|
|
@@ -7784,8 +8663,8 @@ function ListingTableToolbar({
|
|
|
7784
8663
|
}
|
|
7785
8664
|
return null;
|
|
7786
8665
|
};
|
|
7787
|
-
return /* @__PURE__ */
|
|
7788
|
-
|
|
8666
|
+
return /* @__PURE__ */ jsxs41(
|
|
8667
|
+
Box46,
|
|
7789
8668
|
{
|
|
7790
8669
|
role: "toolbar",
|
|
7791
8670
|
"aria-label": "Table toolbar",
|
|
@@ -7800,9 +8679,9 @@ function ListingTableToolbar({
|
|
|
7800
8679
|
children: [
|
|
7801
8680
|
renderSearch(),
|
|
7802
8681
|
children,
|
|
7803
|
-
actions && /* @__PURE__ */
|
|
7804
|
-
/* @__PURE__ */
|
|
7805
|
-
/* @__PURE__ */
|
|
8682
|
+
actions && /* @__PURE__ */ jsxs41(Fragment19, { children: [
|
|
8683
|
+
/* @__PURE__ */ jsx111(Box46, { sx: { flex: 1 } }),
|
|
8684
|
+
/* @__PURE__ */ jsx111(Box46, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
7806
8685
|
] })
|
|
7807
8686
|
]
|
|
7808
8687
|
}
|
|
@@ -7816,11 +8695,11 @@ import ToggleButton from "@mui/material/ToggleButton";
|
|
|
7816
8695
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
7817
8696
|
import Tooltip9 from "@mui/material/Tooltip";
|
|
7818
8697
|
import { AlignJustify, Menu as Menu4, List as List4 } from "@wso2/oxygen-ui-icons-react";
|
|
7819
|
-
import { jsx as
|
|
8698
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
7820
8699
|
var densityOptions = [
|
|
7821
|
-
{ value: "compact", label: "Compact", icon: /* @__PURE__ */
|
|
7822
|
-
{ value: "standard", label: "Standard", icon: /* @__PURE__ */
|
|
7823
|
-
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */
|
|
8700
|
+
{ value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx112(AlignJustify, { size: 18 }) },
|
|
8701
|
+
{ value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx112(Menu4, { size: 18 }) },
|
|
8702
|
+
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx112(List4, { size: 18 }) }
|
|
7824
8703
|
];
|
|
7825
8704
|
function ListingTableDensityControl({
|
|
7826
8705
|
value: valueProp,
|
|
@@ -7840,7 +8719,7 @@ function ListingTableDensityControl({
|
|
|
7840
8719
|
},
|
|
7841
8720
|
[effectiveOnChange]
|
|
7842
8721
|
);
|
|
7843
|
-
return /* @__PURE__ */
|
|
8722
|
+
return /* @__PURE__ */ jsx112(
|
|
7844
8723
|
ToggleButtonGroup,
|
|
7845
8724
|
{
|
|
7846
8725
|
value,
|
|
@@ -7849,7 +8728,7 @@ function ListingTableDensityControl({
|
|
|
7849
8728
|
size,
|
|
7850
8729
|
sx,
|
|
7851
8730
|
"aria-label": "Table density",
|
|
7852
|
-
children: densityOptions.map((option) => /* @__PURE__ */
|
|
8731
|
+
children: densityOptions.map((option) => /* @__PURE__ */ jsx112(ToggleButton, { value: option.value, "aria-label": option.label, children: /* @__PURE__ */ jsx112(Tooltip9, { title: option.label, children: /* @__PURE__ */ jsx112("span", { style: { display: "flex", alignItems: "center" }, "aria-hidden": "true", children: option.icon }) }) }, option.value))
|
|
7853
8732
|
}
|
|
7854
8733
|
);
|
|
7855
8734
|
}
|
|
@@ -7859,7 +8738,7 @@ var ListingTableDensityControl_default = ListingTableDensityControl;
|
|
|
7859
8738
|
import { useCallback as useCallback8 } from "react";
|
|
7860
8739
|
import MuiTableSortLabel from "@mui/material/TableSortLabel";
|
|
7861
8740
|
import { styled as styled72 } from "@mui/material/styles";
|
|
7862
|
-
import { jsx as
|
|
8741
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
7863
8742
|
var StyledTableSortLabel = styled72(MuiTableSortLabel)(({ theme }) => ({
|
|
7864
8743
|
color: "inherit !important",
|
|
7865
8744
|
"&.Mui-active": {
|
|
@@ -7903,13 +8782,257 @@ function ListingTableSortLabel(_a) {
|
|
|
7903
8782
|
},
|
|
7904
8783
|
[onClickProp, field, tableContext, active, direction]
|
|
7905
8784
|
);
|
|
7906
|
-
return /* @__PURE__ */
|
|
8785
|
+
return /* @__PURE__ */ jsx113(StyledTableSortLabel, __spreadProps(__spreadValues({ active, direction, onClick: handleClick, hideSortIcon }, props), { children }));
|
|
7907
8786
|
}
|
|
7908
8787
|
var ListingTableSortLabel_default = ListingTableSortLabel;
|
|
7909
8788
|
|
|
8789
|
+
// src/components/ListingTable/shared/ListingTableFilter.tsx
|
|
8790
|
+
import * as React47 from "react";
|
|
8791
|
+
import IconButton9 from "@mui/material/IconButton";
|
|
8792
|
+
import Tooltip10 from "@mui/material/Tooltip";
|
|
8793
|
+
import { ListFilter as ListFilter2 } from "@wso2/oxygen-ui-icons-react";
|
|
8794
|
+
|
|
8795
|
+
// src/components/ListingTable/shared/ListingTableFilterMenu.tsx
|
|
8796
|
+
import * as React46 from "react";
|
|
8797
|
+
import Box47 from "@mui/material/Box";
|
|
8798
|
+
import MenuItem8 from "@mui/material/MenuItem";
|
|
8799
|
+
import MenuList3 from "@mui/material/MenuList";
|
|
8800
|
+
import Popover5 from "@mui/material/Popover";
|
|
8801
|
+
import Typography26 from "@mui/material/Typography";
|
|
8802
|
+
import { Check } from "@wso2/oxygen-ui-icons-react";
|
|
8803
|
+
import { jsx as jsx114, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8804
|
+
var MenuContent = ({
|
|
8805
|
+
open,
|
|
8806
|
+
onClose,
|
|
8807
|
+
options,
|
|
8808
|
+
value,
|
|
8809
|
+
onChange,
|
|
8810
|
+
searchable = false,
|
|
8811
|
+
label,
|
|
8812
|
+
listId,
|
|
8813
|
+
allLabel,
|
|
8814
|
+
searchPlaceholder,
|
|
8815
|
+
noMatchLabel
|
|
8816
|
+
}) => {
|
|
8817
|
+
const [query, setQuery] = React46.useState("");
|
|
8818
|
+
React46.useLayoutEffect(() => {
|
|
8819
|
+
if (open) setQuery("");
|
|
8820
|
+
}, [open]);
|
|
8821
|
+
const listRef = React46.useRef(null);
|
|
8822
|
+
const searchRef = React46.useRef(null);
|
|
8823
|
+
const current = value != null ? value : "";
|
|
8824
|
+
const needle = query.trim().toLowerCase();
|
|
8825
|
+
const matching = options.filter(
|
|
8826
|
+
(option) => option.value !== "" && option.label.toLowerCase().includes(needle)
|
|
8827
|
+
);
|
|
8828
|
+
const shown = [{ value: "", label: allLabel }, ...matching];
|
|
8829
|
+
const pick = (option) => {
|
|
8830
|
+
onChange(option.value === "" ? null : option.value);
|
|
8831
|
+
onClose();
|
|
8832
|
+
};
|
|
8833
|
+
const handleListKeyDown = (event) => {
|
|
8834
|
+
var _a, _b, _c;
|
|
8835
|
+
const first = (_a = listRef.current) == null ? void 0 : _a.querySelector('[role="menuitemradio"]');
|
|
8836
|
+
if (searchable && event.key === "ArrowUp" && document.activeElement === first) {
|
|
8837
|
+
event.preventDefault();
|
|
8838
|
+
event.stopPropagation();
|
|
8839
|
+
(_c = (_b = searchRef.current) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
|
|
8840
|
+
}
|
|
8841
|
+
};
|
|
8842
|
+
const focusFirst = () => {
|
|
8843
|
+
var _a, _b;
|
|
8844
|
+
return (_b = (_a = listRef.current) == null ? void 0 : _a.querySelector('[role="menuitemradio"]')) == null ? void 0 : _b.focus();
|
|
8845
|
+
};
|
|
8846
|
+
return /* @__PURE__ */ jsxs42(Box47, { sx: { minWidth: 240, maxWidth: 320 }, children: [
|
|
8847
|
+
searchable && /* @__PURE__ */ jsx114(Box47, { ref: searchRef, sx: { p: 1 }, children: /* @__PURE__ */ jsx114(
|
|
8848
|
+
SearchBarBase,
|
|
8849
|
+
{
|
|
8850
|
+
autoFocus: true,
|
|
8851
|
+
fullWidth: true,
|
|
8852
|
+
value: query,
|
|
8853
|
+
placeholder: searchPlaceholder,
|
|
8854
|
+
"aria-label": label,
|
|
8855
|
+
onChange: (event) => setQuery(event.target.value),
|
|
8856
|
+
onKeyDown: (event) => {
|
|
8857
|
+
if (event.key === "ArrowDown") {
|
|
8858
|
+
event.preventDefault();
|
|
8859
|
+
focusFirst();
|
|
8860
|
+
} else if (event.key === "Enter" && matching.length > 0) {
|
|
8861
|
+
event.preventDefault();
|
|
8862
|
+
pick(matching[0]);
|
|
8863
|
+
}
|
|
8864
|
+
},
|
|
8865
|
+
sx: {
|
|
8866
|
+
"& .MuiOutlinedInput-root": { height: 32, fontSize: "0.8125rem" },
|
|
8867
|
+
"& .MuiInputBase-input": { padding: "4px 8px" }
|
|
8868
|
+
}
|
|
8869
|
+
}
|
|
8870
|
+
) }),
|
|
8871
|
+
/* @__PURE__ */ jsxs42(MenuList3, { ref: listRef, id: listId, "aria-label": label, autoFocusItem: !searchable, onKeyDownCapture: handleListKeyDown, sx: { py: 0.5, maxHeight: 320, overflow: "auto" }, children: [
|
|
8872
|
+
shown.map((option) => {
|
|
8873
|
+
const selected = option.value === current;
|
|
8874
|
+
return /* @__PURE__ */ jsxs42(
|
|
8875
|
+
MenuItem8,
|
|
8876
|
+
{
|
|
8877
|
+
role: "menuitemradio",
|
|
8878
|
+
"aria-checked": selected,
|
|
8879
|
+
selected,
|
|
8880
|
+
onClick: () => pick(option),
|
|
8881
|
+
sx: { justifyContent: "space-between", gap: 2 },
|
|
8882
|
+
children: [
|
|
8883
|
+
option.label,
|
|
8884
|
+
selected && /* @__PURE__ */ jsx114(Check, { size: 16, "aria-hidden": "true" })
|
|
8885
|
+
]
|
|
8886
|
+
},
|
|
8887
|
+
option.value
|
|
8888
|
+
);
|
|
8889
|
+
}),
|
|
8890
|
+
needle !== "" && matching.length === 0 && // A list item, not a paragraph, because it sits directly in the list.
|
|
8891
|
+
/* @__PURE__ */ jsx114(Typography26, { component: "li", role: "presentation", variant: "body2", color: "text.secondary", sx: { px: 2, py: 1, listStyle: "none" }, children: noMatchLabel })
|
|
8892
|
+
] })
|
|
8893
|
+
] });
|
|
8894
|
+
};
|
|
8895
|
+
var ListingTableFilterMenu = (_a) => {
|
|
8896
|
+
var _b = _a, {
|
|
8897
|
+
open,
|
|
8898
|
+
anchorEl,
|
|
8899
|
+
onClose
|
|
8900
|
+
} = _b, content = __objRest(_b, [
|
|
8901
|
+
"open",
|
|
8902
|
+
"anchorEl",
|
|
8903
|
+
"onClose"
|
|
8904
|
+
]);
|
|
8905
|
+
return /* @__PURE__ */ jsx114(
|
|
8906
|
+
Popover5,
|
|
8907
|
+
{
|
|
8908
|
+
anchorEl,
|
|
8909
|
+
open,
|
|
8910
|
+
onClose,
|
|
8911
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
8912
|
+
children: /* @__PURE__ */ jsx114(MenuContent, __spreadValues({ open, onClose }, content))
|
|
8913
|
+
}
|
|
8914
|
+
);
|
|
8915
|
+
};
|
|
8916
|
+
ListingTableFilterMenu.displayName = "ListingTableFilterMenu";
|
|
8917
|
+
|
|
8918
|
+
// src/components/ListingTable/shared/ListingTableFilter.tsx
|
|
8919
|
+
import { Fragment as Fragment20, jsx as jsx115, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
8920
|
+
var ListingTableFilter = React47.forwardRef(
|
|
8921
|
+
function ListingTableFilter2(_a, ref) {
|
|
8922
|
+
var _b = _a, {
|
|
8923
|
+
field,
|
|
8924
|
+
options,
|
|
8925
|
+
value: valueProp,
|
|
8926
|
+
onChange: onChangeProp,
|
|
8927
|
+
searchable = false,
|
|
8928
|
+
label = "Filter",
|
|
8929
|
+
allLabel = "Any",
|
|
8930
|
+
searchPlaceholder = "Search",
|
|
8931
|
+
noMatchLabel = "No matches",
|
|
8932
|
+
alwaysShowIcon = false,
|
|
8933
|
+
onClick,
|
|
8934
|
+
sx
|
|
8935
|
+
} = _b, buttonProps = __objRest(_b, [
|
|
8936
|
+
"field",
|
|
8937
|
+
"options",
|
|
8938
|
+
"value",
|
|
8939
|
+
"onChange",
|
|
8940
|
+
"searchable",
|
|
8941
|
+
"label",
|
|
8942
|
+
"allLabel",
|
|
8943
|
+
"searchPlaceholder",
|
|
8944
|
+
"noMatchLabel",
|
|
8945
|
+
"alwaysShowIcon",
|
|
8946
|
+
"onClick",
|
|
8947
|
+
"sx"
|
|
8948
|
+
]);
|
|
8949
|
+
var _a2;
|
|
8950
|
+
const tableContext = useListingTable();
|
|
8951
|
+
const [anchor, setAnchor] = React47.useState(null);
|
|
8952
|
+
const listId = React47.useId();
|
|
8953
|
+
const fromContext = field !== void 0 ? (_a2 = tableContext == null ? void 0 : tableContext.filters) == null ? void 0 : _a2[field] : void 0;
|
|
8954
|
+
const value = valueProp !== void 0 ? valueProp : typeof fromContext === "string" ? fromContext : null;
|
|
8955
|
+
const applied = value !== null && value !== "";
|
|
8956
|
+
const change = (next) => {
|
|
8957
|
+
if (onChangeProp) onChangeProp(next);
|
|
8958
|
+
else if (field && (tableContext == null ? void 0 : tableContext.onFilterChange)) tableContext.onFilterChange(field, next);
|
|
8959
|
+
else {
|
|
8960
|
+
console.warn(
|
|
8961
|
+
"ListingTable.Filter: a choice was picked but nothing handles it. Pass `onChange`, or give `field` inside a ListingTable.Provider that has `onFilterChange`."
|
|
8962
|
+
);
|
|
8963
|
+
}
|
|
8964
|
+
};
|
|
8965
|
+
const resting = applied ? 1 : alwaysShowIcon ? 0.5 : 0;
|
|
8966
|
+
return /* @__PURE__ */ jsxs43(Fragment20, { children: [
|
|
8967
|
+
/* @__PURE__ */ jsx115(Tooltip10, { title: label, describeChild: true, children: /* @__PURE__ */ jsx115("span", { children: /* @__PURE__ */ jsx115(
|
|
8968
|
+
IconButton9,
|
|
8969
|
+
__spreadProps(__spreadValues({
|
|
8970
|
+
size: "small",
|
|
8971
|
+
color: applied ? "primary" : "default"
|
|
8972
|
+
}, buttonProps), {
|
|
8973
|
+
ref,
|
|
8974
|
+
"aria-label": label,
|
|
8975
|
+
"aria-haspopup": "menu",
|
|
8976
|
+
"aria-expanded": Boolean(anchor),
|
|
8977
|
+
"aria-controls": anchor ? listId : void 0,
|
|
8978
|
+
onClick: (event) => {
|
|
8979
|
+
onClick == null ? void 0 : onClick(event);
|
|
8980
|
+
setAnchor(event.currentTarget);
|
|
8981
|
+
},
|
|
8982
|
+
sx: [
|
|
8983
|
+
(theme) => ({
|
|
8984
|
+
p: 0.25,
|
|
8985
|
+
opacity: resting,
|
|
8986
|
+
transition: theme.transitions.create("opacity", {
|
|
8987
|
+
duration: theme.transitions.duration.shorter
|
|
8988
|
+
}),
|
|
8989
|
+
".MuiTableCell-root:hover &": { opacity: applied ? 1 : 0.5 },
|
|
8990
|
+
// Inside a cell, the full-strength states repeat under the cell, so they match the
|
|
8991
|
+
// specificity of the cell-hover rule above and come after it.
|
|
8992
|
+
[[
|
|
8993
|
+
"&:hover",
|
|
8994
|
+
"&:focus-visible",
|
|
8995
|
+
'&[aria-expanded="true"]',
|
|
8996
|
+
".MuiTableCell-root &:hover",
|
|
8997
|
+
".MuiTableCell-root &:focus-visible",
|
|
8998
|
+
'.MuiTableCell-root &[aria-expanded="true"]',
|
|
8999
|
+
".MuiTableCell-root:focus-within &"
|
|
9000
|
+
].join(", ")]: {
|
|
9001
|
+
opacity: 1
|
|
9002
|
+
},
|
|
9003
|
+
"@media (hover: none)": { opacity: applied ? 1 : 0.5 }
|
|
9004
|
+
}),
|
|
9005
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
9006
|
+
],
|
|
9007
|
+
children: /* @__PURE__ */ jsx115(ListFilter2, { size: 14 })
|
|
9008
|
+
})
|
|
9009
|
+
) }) }),
|
|
9010
|
+
/* @__PURE__ */ jsx115(
|
|
9011
|
+
ListingTableFilterMenu,
|
|
9012
|
+
{
|
|
9013
|
+
open: Boolean(anchor),
|
|
9014
|
+
anchorEl: anchor,
|
|
9015
|
+
onClose: () => setAnchor(null),
|
|
9016
|
+
options,
|
|
9017
|
+
value,
|
|
9018
|
+
onChange: change,
|
|
9019
|
+
searchable,
|
|
9020
|
+
label,
|
|
9021
|
+
listId,
|
|
9022
|
+
allLabel,
|
|
9023
|
+
searchPlaceholder,
|
|
9024
|
+
noMatchLabel
|
|
9025
|
+
}
|
|
9026
|
+
)
|
|
9027
|
+
] });
|
|
9028
|
+
}
|
|
9029
|
+
);
|
|
9030
|
+
ListingTableFilter.displayName = "ListingTableFilter";
|
|
9031
|
+
var ListingTableFilter_default = ListingTableFilter;
|
|
9032
|
+
|
|
7910
9033
|
// src/components/ListingTable/shared/ListingTableRowActions.tsx
|
|
7911
|
-
import
|
|
7912
|
-
import { jsx as
|
|
9034
|
+
import Box48 from "@mui/material/Box";
|
|
9035
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
7913
9036
|
var alignmentMap = {
|
|
7914
9037
|
left: "flex-start",
|
|
7915
9038
|
center: "center",
|
|
@@ -7921,8 +9044,8 @@ function ListingTableRowActions({
|
|
|
7921
9044
|
align = "right",
|
|
7922
9045
|
sx
|
|
7923
9046
|
}) {
|
|
7924
|
-
return /* @__PURE__ */
|
|
7925
|
-
|
|
9047
|
+
return /* @__PURE__ */ jsx116(
|
|
9048
|
+
Box48,
|
|
7926
9049
|
{
|
|
7927
9050
|
className: "table-row-actions",
|
|
7928
9051
|
sx: __spreadValues(__spreadValues({
|
|
@@ -7945,9 +9068,9 @@ function ListingTableRowActions({
|
|
|
7945
9068
|
var ListingTableRowActions_default = ListingTableRowActions;
|
|
7946
9069
|
|
|
7947
9070
|
// src/components/ListingTable/shared/ListingTableCellIcon.tsx
|
|
7948
|
-
import
|
|
7949
|
-
import
|
|
7950
|
-
import { Fragment as
|
|
9071
|
+
import Box49 from "@mui/material/Box";
|
|
9072
|
+
import Typography27 from "@mui/material/Typography";
|
|
9073
|
+
import { Fragment as Fragment21, jsx as jsx117, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7951
9074
|
function ListingTableCellIcon({
|
|
7952
9075
|
icon,
|
|
7953
9076
|
primary,
|
|
@@ -7956,8 +9079,8 @@ function ListingTableCellIcon({
|
|
|
7956
9079
|
iconSx,
|
|
7957
9080
|
sx
|
|
7958
9081
|
}) {
|
|
7959
|
-
const iconElement = /* @__PURE__ */
|
|
7960
|
-
|
|
9082
|
+
const iconElement = /* @__PURE__ */ jsx117(
|
|
9083
|
+
Box49,
|
|
7961
9084
|
{
|
|
7962
9085
|
sx: __spreadValues({
|
|
7963
9086
|
display: "flex",
|
|
@@ -7969,9 +9092,9 @@ function ListingTableCellIcon({
|
|
|
7969
9092
|
children: icon
|
|
7970
9093
|
}
|
|
7971
9094
|
);
|
|
7972
|
-
const textContent = /* @__PURE__ */
|
|
7973
|
-
/* @__PURE__ */
|
|
7974
|
-
|
|
9095
|
+
const textContent = /* @__PURE__ */ jsxs44(Box49, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
9096
|
+
/* @__PURE__ */ jsx117(
|
|
9097
|
+
Typography27,
|
|
7975
9098
|
{
|
|
7976
9099
|
variant: "body2",
|
|
7977
9100
|
component: "div",
|
|
@@ -7984,8 +9107,8 @@ function ListingTableCellIcon({
|
|
|
7984
9107
|
children: primary
|
|
7985
9108
|
}
|
|
7986
9109
|
),
|
|
7987
|
-
secondary && /* @__PURE__ */
|
|
7988
|
-
|
|
9110
|
+
secondary && /* @__PURE__ */ jsx117(
|
|
9111
|
+
Typography27,
|
|
7989
9112
|
{
|
|
7990
9113
|
variant: "caption",
|
|
7991
9114
|
component: "div",
|
|
@@ -7999,8 +9122,8 @@ function ListingTableCellIcon({
|
|
|
7999
9122
|
}
|
|
8000
9123
|
)
|
|
8001
9124
|
] });
|
|
8002
|
-
return /* @__PURE__ */
|
|
8003
|
-
|
|
9125
|
+
return /* @__PURE__ */ jsx117(
|
|
9126
|
+
Box49,
|
|
8004
9127
|
{
|
|
8005
9128
|
sx: __spreadValues({
|
|
8006
9129
|
display: "flex",
|
|
@@ -8008,10 +9131,10 @@ function ListingTableCellIcon({
|
|
|
8008
9131
|
gap: 1.5,
|
|
8009
9132
|
minWidth: 0
|
|
8010
9133
|
}, sx),
|
|
8011
|
-
children: iconPosition === "left" ? /* @__PURE__ */
|
|
9134
|
+
children: iconPosition === "left" ? /* @__PURE__ */ jsxs44(Fragment21, { children: [
|
|
8012
9135
|
iconElement,
|
|
8013
9136
|
textContent
|
|
8014
|
-
] }) : /* @__PURE__ */
|
|
9137
|
+
] }) : /* @__PURE__ */ jsxs44(Fragment21, { children: [
|
|
8015
9138
|
textContent,
|
|
8016
9139
|
iconElement
|
|
8017
9140
|
] })
|
|
@@ -8022,7 +9145,7 @@ var ListingTableCellIcon_default = ListingTableCellIcon;
|
|
|
8022
9145
|
|
|
8023
9146
|
// src/components/ListingTable/ListingTableProvider.tsx
|
|
8024
9147
|
import { useMemo as useMemo9 } from "react";
|
|
8025
|
-
import { jsx as
|
|
9148
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
8026
9149
|
function ListingTableProvider({
|
|
8027
9150
|
children,
|
|
8028
9151
|
// Search
|
|
@@ -8125,11 +9248,11 @@ function ListingTableProvider({
|
|
|
8125
9248
|
loading
|
|
8126
9249
|
]
|
|
8127
9250
|
);
|
|
8128
|
-
return /* @__PURE__ */
|
|
9251
|
+
return /* @__PURE__ */ jsx118(ListingTableContext.Provider, { value: contextValue, children });
|
|
8129
9252
|
}
|
|
8130
9253
|
|
|
8131
9254
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
8132
|
-
import { jsx as
|
|
9255
|
+
import { jsx as jsx119 } from "react/jsx-runtime";
|
|
8133
9256
|
var StyledTable = styled73(MuiTable, {
|
|
8134
9257
|
shouldForwardProp: (prop) => {
|
|
8135
9258
|
const excludedProps = ["variant", "density", "striped", "bordered"];
|
|
@@ -8183,7 +9306,7 @@ function ListingTable(_a) {
|
|
|
8183
9306
|
"children",
|
|
8184
9307
|
"sx"
|
|
8185
9308
|
]);
|
|
8186
|
-
return /* @__PURE__ */
|
|
9309
|
+
return /* @__PURE__ */ jsx119(
|
|
8187
9310
|
StyledTable,
|
|
8188
9311
|
__spreadProps(__spreadValues({
|
|
8189
9312
|
variant,
|
|
@@ -8209,15 +9332,16 @@ var ListingTableCompound = Object.assign(ListingTable, {
|
|
|
8209
9332
|
EmptyState: ListingTableEmptyState_default,
|
|
8210
9333
|
Toolbar: ListingTableToolbar_default,
|
|
8211
9334
|
SortLabel: ListingTableSortLabel_default,
|
|
9335
|
+
Filter: ListingTableFilter_default,
|
|
8212
9336
|
DensityControl: ListingTableDensityControl_default,
|
|
8213
9337
|
DataGrid: ListingTableDataGrid_default
|
|
8214
9338
|
});
|
|
8215
9339
|
var ListingTable_default = ListingTableCompound;
|
|
8216
9340
|
|
|
8217
9341
|
// src/animations/ParticleBackground/ParticleBackground.tsx
|
|
8218
|
-
import { useEffect as useEffect8, useRef as
|
|
9342
|
+
import { useEffect as useEffect8, useRef as useRef6 } from "react";
|
|
8219
9343
|
import { useColorScheme as useColorScheme4 } from "@mui/material/styles";
|
|
8220
|
-
import { jsx as
|
|
9344
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
8221
9345
|
var ParticleBackground = ({
|
|
8222
9346
|
opacity = 0.5,
|
|
8223
9347
|
baseDensity = 0.12,
|
|
@@ -8229,7 +9353,7 @@ var ParticleBackground = ({
|
|
|
8229
9353
|
repelStrength = 0.35,
|
|
8230
9354
|
clickBurst = 120
|
|
8231
9355
|
}) => {
|
|
8232
|
-
const canvasRef =
|
|
9356
|
+
const canvasRef = useRef6(null);
|
|
8233
9357
|
const { mode } = useColorScheme4();
|
|
8234
9358
|
useEffect8(() => {
|
|
8235
9359
|
const canvas = canvasRef.current;
|
|
@@ -8428,7 +9552,7 @@ var ParticleBackground = ({
|
|
|
8428
9552
|
cancelAnimationFrame(animationFrameId);
|
|
8429
9553
|
};
|
|
8430
9554
|
}, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
|
|
8431
|
-
return /* @__PURE__ */
|
|
9555
|
+
return /* @__PURE__ */ jsx120(
|
|
8432
9556
|
"canvas",
|
|
8433
9557
|
{
|
|
8434
9558
|
ref: canvasRef,
|
|
@@ -8457,44 +9581,44 @@ function useThemeContent(contentMap, fallback) {
|
|
|
8457
9581
|
var useThemeContent_default = useThemeContent;
|
|
8458
9582
|
|
|
8459
9583
|
// src/hooks/useNotifications/useNotifications.ts
|
|
8460
|
-
import * as
|
|
9584
|
+
import * as React48 from "react";
|
|
8461
9585
|
var generateId = () => {
|
|
8462
9586
|
return `notif-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
8463
9587
|
};
|
|
8464
9588
|
var useNotifications = (options = {}) => {
|
|
8465
9589
|
const { initialNotifications = [] } = options;
|
|
8466
|
-
const [notifications, setNotifications] =
|
|
9590
|
+
const [notifications, setNotifications] = React48.useState(
|
|
8467
9591
|
initialNotifications
|
|
8468
9592
|
);
|
|
8469
|
-
const markRead =
|
|
9593
|
+
const markRead = React48.useCallback((id) => {
|
|
8470
9594
|
setNotifications(
|
|
8471
9595
|
(prev) => prev.map((n) => n.id === id ? __spreadProps(__spreadValues({}, n), { read: true }) : n)
|
|
8472
9596
|
);
|
|
8473
9597
|
}, []);
|
|
8474
|
-
const dismiss =
|
|
9598
|
+
const dismiss = React48.useCallback((id) => {
|
|
8475
9599
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
8476
9600
|
}, []);
|
|
8477
|
-
const markAllRead =
|
|
9601
|
+
const markAllRead = React48.useCallback(() => {
|
|
8478
9602
|
setNotifications((prev) => prev.map((n) => __spreadProps(__spreadValues({}, n), { read: true })));
|
|
8479
9603
|
}, []);
|
|
8480
|
-
const clearAll =
|
|
9604
|
+
const clearAll = React48.useCallback(() => {
|
|
8481
9605
|
setNotifications([]);
|
|
8482
9606
|
}, []);
|
|
8483
|
-
const add =
|
|
9607
|
+
const add = React48.useCallback((notification) => {
|
|
8484
9608
|
const newNotification = __spreadProps(__spreadValues({}, notification), {
|
|
8485
9609
|
id: generateId()
|
|
8486
9610
|
});
|
|
8487
9611
|
setNotifications((prev) => [newNotification, ...prev]);
|
|
8488
9612
|
}, []);
|
|
8489
|
-
const unreadCount =
|
|
9613
|
+
const unreadCount = React48.useMemo(
|
|
8490
9614
|
() => notifications.filter((n) => !n.read).length,
|
|
8491
9615
|
[notifications]
|
|
8492
9616
|
);
|
|
8493
|
-
const unreadNotifications =
|
|
9617
|
+
const unreadNotifications = React48.useMemo(
|
|
8494
9618
|
() => notifications.filter((n) => !n.read),
|
|
8495
9619
|
[notifications]
|
|
8496
9620
|
);
|
|
8497
|
-
const actions =
|
|
9621
|
+
const actions = React48.useMemo(
|
|
8498
9622
|
() => ({
|
|
8499
9623
|
markRead,
|
|
8500
9624
|
dismiss,
|
|
@@ -8518,13 +9642,13 @@ export * from "@mui/material";
|
|
|
8518
9642
|
import * as colors from "@mui/material/colors";
|
|
8519
9643
|
import * as DataGrid2 from "@mui/x-data-grid";
|
|
8520
9644
|
import * as DatePickers from "@mui/x-date-pickers";
|
|
8521
|
-
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
9645
|
+
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
8522
9646
|
import * as TreeView from "@mui/x-tree-view";
|
|
8523
9647
|
var version = package_default.version;
|
|
8524
9648
|
export {
|
|
8525
9649
|
AcrylicOrangeTheme_default as AcrylicOrangeTheme,
|
|
8526
9650
|
AcrylicPurpleTheme_default as AcrylicPurpleTheme,
|
|
8527
|
-
AdapterDateFns,
|
|
9651
|
+
AdapterDateFns2 as AdapterDateFns,
|
|
8528
9652
|
AppBreadcrumbs,
|
|
8529
9653
|
AppShell,
|
|
8530
9654
|
AppSwitcher,
|
|
@@ -8562,13 +9686,16 @@ export {
|
|
|
8562
9686
|
StatCard_default as StatCard,
|
|
8563
9687
|
ThemeSelect,
|
|
8564
9688
|
ThemeSwitcher,
|
|
9689
|
+
TimeRangeFilter_default as TimeRangeFilter,
|
|
8565
9690
|
TreeView,
|
|
9691
|
+
TrialBadge_default as TrialBadge,
|
|
8566
9692
|
UserMenu,
|
|
8567
9693
|
WSO2Theme_default as WSO2Theme,
|
|
8568
9694
|
colors,
|
|
8569
9695
|
default2 as createEmotionCache,
|
|
8570
9696
|
createOxygenTheme,
|
|
8571
9697
|
formatRelativeTime,
|
|
9698
|
+
getTrialBadgeStatus,
|
|
8572
9699
|
pxToRem,
|
|
8573
9700
|
useAppShell,
|
|
8574
9701
|
useListingTable,
|