@wso2/oxygen-ui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ListingTable/ListingTable/ListingTable.d.ts +2 -0
- package/dist/components/ListingTable/ListingTable/ListingTableDataGrid.d.ts +47 -0
- package/dist/components/ListingTable/ListingTable/index.d.ts +3 -0
- package/dist/components/ListingTable/index.d.ts +1 -0
- package/dist/components/ListingTable/shared/types.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/index.js +225 -56
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
|
@@ -7,6 +7,7 @@ import ListingTableBody from './ListingTableBody';
|
|
|
7
7
|
import ListingTableFooter from './ListingTableFooter';
|
|
8
8
|
import ListingTableRow from './ListingTableRow';
|
|
9
9
|
import ListingTableCell from './ListingTableCell';
|
|
10
|
+
import ListingTableDataGrid from './ListingTableDataGrid';
|
|
10
11
|
import { ListingTableCellIcon, ListingTableRowActions, ListingTableEmptyState, ListingTableToolbar, ListingTableSortLabel, ListingTableDensityControl } from '../shared';
|
|
11
12
|
import { ListingTableProvider } from '../ListingTableProvider';
|
|
12
13
|
export interface ListingTableProps extends MuiTableProps {
|
|
@@ -49,6 +50,7 @@ interface ListingTableComponent {
|
|
|
49
50
|
Toolbar: typeof ListingTableToolbar;
|
|
50
51
|
SortLabel: typeof ListingTableSortLabel;
|
|
51
52
|
DensityControl: typeof ListingTableDensityControl;
|
|
53
|
+
DataGrid: typeof ListingTableDataGrid;
|
|
52
54
|
}
|
|
53
55
|
declare const ListingTableCompound: ListingTableComponent;
|
|
54
56
|
export default ListingTableCompound;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { DataGridProps } from '@mui/x-data-grid';
|
|
3
|
+
import { ListingTableDensity } from '../shared/types';
|
|
4
|
+
export interface ListingTableDataGridProps extends Omit<DataGridProps, 'density'> {
|
|
5
|
+
/**
|
|
6
|
+
* Density control - affects row padding.
|
|
7
|
+
* Maps directly to DataGrid density values.
|
|
8
|
+
* Falls back to the parent ListingTable.Provider density if not provided.
|
|
9
|
+
* @default 'standard'
|
|
10
|
+
*/
|
|
11
|
+
density?: ListingTableDensity;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A `ListingTable` variant that renders an MUI DataGrid instead of a traditional HTML table.
|
|
15
|
+
* Useful when built-in column sorting, filtering, virtual scrolling, or advanced row selection
|
|
16
|
+
* are needed without manual wiring.
|
|
17
|
+
*
|
|
18
|
+
* Supports two display variants controlled via `ListingTable.Provider`:
|
|
19
|
+
* - **`data-grid`** (default): standard grid rows separated by dividers
|
|
20
|
+
* - **`data-grid-card`**: each row is rendered as a floating card with rounded corners and acrylic background
|
|
21
|
+
*
|
|
22
|
+
* Integrates with `ListingTable.Provider` context:
|
|
23
|
+
* - `density` is read from context when not explicitly provided
|
|
24
|
+
* - `loading` is read from context when not explicitly provided
|
|
25
|
+
* - `variant` is driven by the parent `ListingTable.Provider` — use `'data-grid-card'` for card rows
|
|
26
|
+
*
|
|
27
|
+
* @example Table variant (default)
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <ListingTable.Provider density="compact" loading={isFetching}>
|
|
30
|
+
* <ListingTable.Container>
|
|
31
|
+
* <ListingTable.Toolbar showSearch />
|
|
32
|
+
* <ListingTable.DataGrid rows={rows} columns={columns} autoHeight />
|
|
33
|
+
* </ListingTable.Container>
|
|
34
|
+
* </ListingTable.Provider>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example Card variant
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <ListingTable.Provider variant="data-grid-card">
|
|
40
|
+
* <ListingTable.Container disablePaper>
|
|
41
|
+
* <ListingTable.DataGrid rows={rows} columns={columns} autoHeight />
|
|
42
|
+
* </ListingTable.Container>
|
|
43
|
+
* </ListingTable.Provider>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function ListingTableDataGrid({ density: densityProp, loading: loadingProp, getRowSpacing: getRowSpacingProp, filterModel: filterModelProp, sx, ...props }: ListingTableDataGridProps): ReactElement;
|
|
47
|
+
export default ListingTableDataGrid;
|
|
@@ -19,3 +19,6 @@ export type { ListingTableRowProps } from './ListingTableRow';
|
|
|
19
19
|
export { default as ListingTableCell } from './ListingTableCell';
|
|
20
20
|
export { ListingTableCell as Cell } from './ListingTableCell';
|
|
21
21
|
export type { ListingTableCellProps } from './ListingTableCell';
|
|
22
|
+
export { default as ListingTableDataGrid } from './ListingTableDataGrid';
|
|
23
|
+
export { ListingTableDataGrid as DataGrid } from './ListingTableDataGrid';
|
|
24
|
+
export type { ListingTableDataGridProps } from './ListingTableDataGrid';
|
|
@@ -7,6 +7,7 @@ export type { ListingTableBodyProps } from './ListingTable';
|
|
|
7
7
|
export type { ListingTableFooterProps } from './ListingTable';
|
|
8
8
|
export type { ListingTableRowProps } from './ListingTable';
|
|
9
9
|
export type { ListingTableCellProps } from './ListingTable';
|
|
10
|
+
export type { ListingTableDataGridProps } from './ListingTable';
|
|
10
11
|
export { ListingTableContext, useListingTable, useListingTableRequired } from './context';
|
|
11
12
|
export type { ListingTableContextValue, ListingTableSortDirection } from './context';
|
|
12
13
|
export { ListingTableProvider } from './ListingTableProvider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ListingTableDensity = 'compact' | 'standard' | 'comfortable';
|
|
2
|
-
export type ListingTableVariant = 'table' | 'card';
|
|
2
|
+
export type ListingTableVariant = 'table' | 'card' | 'data-grid' | 'data-grid-card';
|
|
3
3
|
export declare const densityStyles: Record<ListingTableDensity, {
|
|
4
4
|
padding: string;
|
|
5
5
|
}>;
|
|
@@ -51,4 +51,4 @@ export { AppShell } from './AppShell';
|
|
|
51
51
|
export type { AppShellProps } from './AppShell';
|
|
52
52
|
export { default as ListingTable } from './ListingTable';
|
|
53
53
|
export { useListingTable, useListingTableRequired, ListingTableContext, ListingTableProvider, } from './ListingTable';
|
|
54
|
-
export type { ListingTableProps, ListingTableContainerProps, ListingTableHeadProps, ListingTableBodyProps, ListingTableFooterProps, ListingTableRowProps, ListingTableCellProps, ListingTableDensity, ListingTableVariant, ListingTableToolbarProps, ListingTableEmptyStateProps, ListingTableDensityControlProps, ListingTableSortLabelProps, ListingSortDirection, ListingTableRowActionsProps, ListingTableCellIconProps, ListingTableContextValue, ListingTableSortDirection, ListingTableProviderProps, } from './ListingTable';
|
|
54
|
+
export type { ListingTableProps, ListingTableContainerProps, ListingTableHeadProps, ListingTableBodyProps, ListingTableFooterProps, ListingTableRowProps, ListingTableCellProps, ListingTableDensity, ListingTableVariant, ListingTableToolbarProps, ListingTableEmptyStateProps, ListingTableDensityControlProps, ListingTableSortLabelProps, ListingSortDirection, ListingTableRowActionsProps, ListingTableCellIconProps, ListingTableContextValue, ListingTableSortDirection, ListingTableProviderProps, ListingTableDataGridProps, } from './ListingTable';
|
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ var __objRest = (source, exclude) => {
|
|
|
130
130
|
// package.json
|
|
131
131
|
var package_default = {
|
|
132
132
|
name: "@wso2/oxygen-ui",
|
|
133
|
-
version: "0.
|
|
133
|
+
version: "0.8.0",
|
|
134
134
|
description: "WSO2 Oxygen UI | Design System - Powered with Material-UI component library with TypeScript support",
|
|
135
135
|
type: "module",
|
|
136
136
|
main: "./dist/index.js",
|
|
@@ -5831,7 +5831,7 @@ AppShell.displayName = "AppShell";
|
|
|
5831
5831
|
|
|
5832
5832
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
5833
5833
|
import MuiTable from "@mui/material/Table";
|
|
5834
|
-
import { styled as
|
|
5834
|
+
import { styled as styled67 } from "@mui/material/styles";
|
|
5835
5835
|
|
|
5836
5836
|
// src/components/ListingTable/shared/types.ts
|
|
5837
5837
|
var densityStyles = {
|
|
@@ -5994,13 +5994,10 @@ function ListingTableCell(_a) {
|
|
|
5994
5994
|
}
|
|
5995
5995
|
var ListingTableCell_default = ListingTableCell;
|
|
5996
5996
|
|
|
5997
|
-
// src/components/ListingTable/
|
|
5998
|
-
import {
|
|
5999
|
-
import
|
|
6000
|
-
import
|
|
6001
|
-
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
6002
|
-
import IconButton7 from "@mui/material/IconButton";
|
|
6003
|
-
import { Search as Search3, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
5997
|
+
// src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
|
|
5998
|
+
import { useCallback as useCallback2 } from "react";
|
|
5999
|
+
import { DataGrid } from "@mui/x-data-grid";
|
|
6000
|
+
import { styled as styled65, alpha as alpha2 } from "@mui/material/styles";
|
|
6004
6001
|
|
|
6005
6002
|
// src/components/ListingTable/context.ts
|
|
6006
6003
|
import * as React32 from "react";
|
|
@@ -6019,8 +6016,179 @@ var useListingTableRequired = () => {
|
|
|
6019
6016
|
return context;
|
|
6020
6017
|
};
|
|
6021
6018
|
|
|
6019
|
+
// src/components/ListingTable/ListingTable/ListingTableDataGrid.tsx
|
|
6020
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
6021
|
+
var StyledDataGrid = styled65(DataGrid)(({ theme }) => ({
|
|
6022
|
+
// Remove outer border for seamless integration within ListingTable.Container
|
|
6023
|
+
border: "none",
|
|
6024
|
+
// Ensure the grid fills its container
|
|
6025
|
+
width: "100%",
|
|
6026
|
+
// Pin row divider color to theme.palette.divider — matches MUI TableCell default border
|
|
6027
|
+
"--DataGrid-rowBorderColor": theme.palette.divider,
|
|
6028
|
+
// Column headers: match ListingTableHead — grey[50] light / rgba dark background + bottom divider
|
|
6029
|
+
"& .MuiDataGrid-columnHeaders": __spreadValues(__spreadValues({
|
|
6030
|
+
borderBottom: `1px solid ${theme.palette.divider}`
|
|
6031
|
+
}, theme.applyStyles("light", {
|
|
6032
|
+
backgroundColor: theme.palette.grey[50]
|
|
6033
|
+
})), theme.applyStyles("dark", {
|
|
6034
|
+
backgroundColor: "rgba(255, 255, 255, 0.04)"
|
|
6035
|
+
})),
|
|
6036
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
6037
|
+
fontWeight: 600
|
|
6038
|
+
},
|
|
6039
|
+
// Only the checkbox header column needs this — sortable/menu columns manage their own layout
|
|
6040
|
+
"& .MuiDataGrid-columnHeaderCheckbox .MuiDataGrid-columnHeaderDraggableContainer": {
|
|
6041
|
+
width: "unset",
|
|
6042
|
+
height: "unset"
|
|
6043
|
+
},
|
|
6044
|
+
// DataGrid v8 uses CSS :hover on rows (Mui-hovered JS class was removed)
|
|
6045
|
+
"& .MuiDataGrid-row:hover": {
|
|
6046
|
+
backgroundColor: theme.palette.action.hover
|
|
6047
|
+
},
|
|
6048
|
+
// Selected row — match MUI Table Mui-selected appearance
|
|
6049
|
+
"& .MuiDataGrid-row.Mui-selected": {
|
|
6050
|
+
backgroundColor: theme.palette.action.selected,
|
|
6051
|
+
"&:hover": {
|
|
6052
|
+
backgroundColor: alpha2(
|
|
6053
|
+
theme.palette.primary.main,
|
|
6054
|
+
theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity
|
|
6055
|
+
)
|
|
6056
|
+
}
|
|
6057
|
+
},
|
|
6058
|
+
// Remove default cell focus outline, rely on theme focus ring
|
|
6059
|
+
"& .MuiDataGrid-cell": {
|
|
6060
|
+
display: "flex",
|
|
6061
|
+
alignItems: "center"
|
|
6062
|
+
},
|
|
6063
|
+
"& .MuiDataGrid-cell:focus, & .MuiDataGrid-cell:focus-within": {
|
|
6064
|
+
outline: "none"
|
|
6065
|
+
},
|
|
6066
|
+
"& .MuiDataGrid-columnHeader:focus, & .MuiDataGrid-columnHeader:focus-within": {
|
|
6067
|
+
outline: "none"
|
|
6068
|
+
}
|
|
6069
|
+
}));
|
|
6070
|
+
function ListingTableDataGrid(_a) {
|
|
6071
|
+
var _b = _a, {
|
|
6072
|
+
density: densityProp,
|
|
6073
|
+
loading: loadingProp,
|
|
6074
|
+
getRowSpacing: getRowSpacingProp,
|
|
6075
|
+
filterModel: filterModelProp,
|
|
6076
|
+
sx
|
|
6077
|
+
} = _b, props = __objRest(_b, [
|
|
6078
|
+
"density",
|
|
6079
|
+
"loading",
|
|
6080
|
+
"getRowSpacing",
|
|
6081
|
+
"filterModel",
|
|
6082
|
+
"sx"
|
|
6083
|
+
]);
|
|
6084
|
+
var _a2, _b2, _c, _d;
|
|
6085
|
+
const context = useListingTable();
|
|
6086
|
+
const density = (_a2 = densityProp != null ? densityProp : context == null ? void 0 : context.density) != null ? _a2 : "standard";
|
|
6087
|
+
const loading = loadingProp !== void 0 ? loadingProp : (_b2 = context == null ? void 0 : context.loading) != null ? _b2 : false;
|
|
6088
|
+
const variant = (context == null ? void 0 : context.variant) === "data-grid-card" ? "card" : "table";
|
|
6089
|
+
const searchValue = (_c = context == null ? void 0 : context.searchValue) != null ? _c : "";
|
|
6090
|
+
const filterModel = filterModelProp != null ? filterModelProp : {
|
|
6091
|
+
items: [],
|
|
6092
|
+
quickFilterValues: searchValue ? [searchValue] : []
|
|
6093
|
+
};
|
|
6094
|
+
const defaultCardRowSpacing = useCallback2(
|
|
6095
|
+
(params) => ({ top: params.isFirstVisible ? 0 : 12, bottom: 0 }),
|
|
6096
|
+
[]
|
|
6097
|
+
);
|
|
6098
|
+
const cardSx = (muiTheme) => {
|
|
6099
|
+
var _a3, _b3, _c2, _d2;
|
|
6100
|
+
return {
|
|
6101
|
+
// Header: transparent background, no bottom divider, secondary-coloured labels — same as card table header
|
|
6102
|
+
"& .MuiDataGrid-columnHeaders": {
|
|
6103
|
+
backgroundColor: "transparent",
|
|
6104
|
+
borderBottom: "none",
|
|
6105
|
+
paddingBottom: "8px"
|
|
6106
|
+
},
|
|
6107
|
+
// Hide column resize handle/separator icon between headers
|
|
6108
|
+
"& .MuiDataGrid-columnSeparator": {
|
|
6109
|
+
visibility: "hidden"
|
|
6110
|
+
},
|
|
6111
|
+
// Remove borders from individual column header cells (MuiDataGrid-withBorderColor adds these)
|
|
6112
|
+
"& .MuiDataGrid-columnHeader": {
|
|
6113
|
+
border: "none"
|
|
6114
|
+
},
|
|
6115
|
+
// MuiDataGrid-withBorderColor is applied to headers and cells; zero out the CSS var
|
|
6116
|
+
// and the border shorthand so nothing leaks through in any DataGrid version
|
|
6117
|
+
"& .MuiDataGrid-withBorderColor": {
|
|
6118
|
+
"--DataGrid-rowBorderColor": "transparent",
|
|
6119
|
+
borderColor: "transparent",
|
|
6120
|
+
border: "none"
|
|
6121
|
+
},
|
|
6122
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
6123
|
+
color: (muiTheme.vars || muiTheme).palette.text.secondary,
|
|
6124
|
+
fontWeight: 600
|
|
6125
|
+
},
|
|
6126
|
+
// Card row: acrylic background + blur + rounded corners, no border
|
|
6127
|
+
"& .MuiDataGrid-row": {
|
|
6128
|
+
borderRadius: "8px",
|
|
6129
|
+
border: "none",
|
|
6130
|
+
backgroundColor: (_b3 = (_a3 = muiTheme.vars) == null ? void 0 : _a3.palette.background.acrylic) != null ? _b3 : (muiTheme.vars || muiTheme).palette.background.paper,
|
|
6131
|
+
backdropFilter: (_c2 = muiTheme.blur) == null ? void 0 : _c2.light,
|
|
6132
|
+
WebkitBackdropFilter: (_d2 = muiTheme.blur) == null ? void 0 : _d2.light,
|
|
6133
|
+
"&:hover": {
|
|
6134
|
+
backgroundColor: (muiTheme.vars || muiTheme).palette.action.hover
|
|
6135
|
+
},
|
|
6136
|
+
"&.Mui-selected": {
|
|
6137
|
+
border: "none",
|
|
6138
|
+
backgroundColor: (muiTheme.vars || muiTheme).palette.action.selected,
|
|
6139
|
+
"&:hover": {
|
|
6140
|
+
backgroundColor: alpha2(
|
|
6141
|
+
muiTheme.palette.primary.main,
|
|
6142
|
+
muiTheme.palette.action.selectedOpacity + muiTheme.palette.action.hoverOpacity
|
|
6143
|
+
)
|
|
6144
|
+
}
|
|
6145
|
+
}
|
|
6146
|
+
},
|
|
6147
|
+
// Remove ALL internal cell dividers and ensure vertical centering
|
|
6148
|
+
"& .MuiDataGrid-cell": {
|
|
6149
|
+
border: "none",
|
|
6150
|
+
display: "flex",
|
|
6151
|
+
alignItems: "center"
|
|
6152
|
+
},
|
|
6153
|
+
// Remove vertical column separator lines inside card rows
|
|
6154
|
+
"& .MuiDataGrid-cell--withRightBorder": {
|
|
6155
|
+
borderRight: "none"
|
|
6156
|
+
},
|
|
6157
|
+
// Footer spaced away from the last card row
|
|
6158
|
+
"& .MuiDataGrid-footerContainer": {
|
|
6159
|
+
borderTop: `1px solid ${(muiTheme.vars || muiTheme).palette.divider}`,
|
|
6160
|
+
marginTop: "12px"
|
|
6161
|
+
}
|
|
6162
|
+
};
|
|
6163
|
+
};
|
|
6164
|
+
const resolvedDensity = (_d = densityProp != null ? densityProp : context == null ? void 0 : context.density) != null ? _d : "standard";
|
|
6165
|
+
const { padding: cellPadding } = densityStyles[resolvedDensity];
|
|
6166
|
+
const densitySx = {
|
|
6167
|
+
"& .MuiDataGrid-columnHeader": { padding: cellPadding },
|
|
6168
|
+
"& .MuiDataGrid-cell": { padding: cellPadding }
|
|
6169
|
+
};
|
|
6170
|
+
const mergedSx = variant === "card" ? [cardSx, densitySx, ...Array.isArray(sx) ? sx : [sx]] : [densitySx, ...Array.isArray(sx) ? sx : [sx]];
|
|
6171
|
+
return /* @__PURE__ */ jsx98(
|
|
6172
|
+
StyledDataGrid,
|
|
6173
|
+
__spreadValues({
|
|
6174
|
+
density,
|
|
6175
|
+
loading,
|
|
6176
|
+
filterModel,
|
|
6177
|
+
getRowSpacing: variant === "card" ? getRowSpacingProp != null ? getRowSpacingProp : defaultCardRowSpacing : getRowSpacingProp,
|
|
6178
|
+
sx: mergedSx
|
|
6179
|
+
}, props)
|
|
6180
|
+
);
|
|
6181
|
+
}
|
|
6182
|
+
var ListingTableDataGrid_default = ListingTableDataGrid;
|
|
6183
|
+
|
|
6022
6184
|
// src/components/ListingTable/shared/ListingTableToolbar.tsx
|
|
6023
|
-
import {
|
|
6185
|
+
import { useState as useState7, useCallback as useCallback3 } from "react";
|
|
6186
|
+
import Box36 from "@mui/material/Box";
|
|
6187
|
+
import TextField3 from "@mui/material/TextField";
|
|
6188
|
+
import InputAdornment3 from "@mui/material/InputAdornment";
|
|
6189
|
+
import IconButton7 from "@mui/material/IconButton";
|
|
6190
|
+
import { Search as Search3, X as X4 } from "@wso2/oxygen-ui-icons-react";
|
|
6191
|
+
import { Fragment as Fragment15, jsx as jsx99, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6024
6192
|
function ListingTableToolbar({
|
|
6025
6193
|
showSearch = false,
|
|
6026
6194
|
searchSlot,
|
|
@@ -6040,7 +6208,7 @@ function ListingTableToolbar({
|
|
|
6040
6208
|
const isControlled = isControlledByProp || isControlledByContext;
|
|
6041
6209
|
const searchValue = isControlledByProp ? controlledSearchValue : isControlledByContext ? tableContext.searchValue : internalSearchValue;
|
|
6042
6210
|
const effectiveOnSearchChange = onSearchChange != null ? onSearchChange : tableContext == null ? void 0 : tableContext.onSearchChange;
|
|
6043
|
-
const handleSearchChange =
|
|
6211
|
+
const handleSearchChange = useCallback3(
|
|
6044
6212
|
(event) => {
|
|
6045
6213
|
const newValue = event.target.value;
|
|
6046
6214
|
if (!isControlled) {
|
|
@@ -6050,7 +6218,7 @@ function ListingTableToolbar({
|
|
|
6050
6218
|
},
|
|
6051
6219
|
[isControlled, effectiveOnSearchChange]
|
|
6052
6220
|
);
|
|
6053
|
-
const handleClearSearch =
|
|
6221
|
+
const handleClearSearch = useCallback3(() => {
|
|
6054
6222
|
if (!isControlled) {
|
|
6055
6223
|
setInternalSearchValue("");
|
|
6056
6224
|
}
|
|
@@ -6061,7 +6229,7 @@ function ListingTableToolbar({
|
|
|
6061
6229
|
return searchSlot;
|
|
6062
6230
|
}
|
|
6063
6231
|
if (showSearch) {
|
|
6064
|
-
return /* @__PURE__ */
|
|
6232
|
+
return /* @__PURE__ */ jsx99(
|
|
6065
6233
|
TextField3,
|
|
6066
6234
|
{
|
|
6067
6235
|
size: "small",
|
|
@@ -6073,8 +6241,8 @@ function ListingTableToolbar({
|
|
|
6073
6241
|
maxWidth: searchMaxWidth
|
|
6074
6242
|
},
|
|
6075
6243
|
InputProps: {
|
|
6076
|
-
startAdornment: /* @__PURE__ */
|
|
6077
|
-
endAdornment: searchValue ? /* @__PURE__ */
|
|
6244
|
+
startAdornment: /* @__PURE__ */ jsx99(InputAdornment3, { position: "start", children: /* @__PURE__ */ jsx99(Search3, { size: 18 }) }),
|
|
6245
|
+
endAdornment: searchValue ? /* @__PURE__ */ jsx99(InputAdornment3, { position: "end", children: /* @__PURE__ */ jsx99(IconButton7, { size: "small", onClick: handleClearSearch, edge: "end", children: /* @__PURE__ */ jsx99(X4, { size: 16 }) }) }) : null
|
|
6078
6246
|
}
|
|
6079
6247
|
}
|
|
6080
6248
|
);
|
|
@@ -6096,8 +6264,8 @@ function ListingTableToolbar({
|
|
|
6096
6264
|
renderSearch(),
|
|
6097
6265
|
children,
|
|
6098
6266
|
actions && /* @__PURE__ */ jsxs32(Fragment15, { children: [
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
/* @__PURE__ */
|
|
6267
|
+
/* @__PURE__ */ jsx99(Box36, { sx: { flex: 1 } }),
|
|
6268
|
+
/* @__PURE__ */ jsx99(Box36, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
6101
6269
|
] })
|
|
6102
6270
|
]
|
|
6103
6271
|
}
|
|
@@ -6108,7 +6276,7 @@ var ListingTableToolbar_default = ListingTableToolbar;
|
|
|
6108
6276
|
// src/components/ListingTable/shared/ListingTableEmptyState.tsx
|
|
6109
6277
|
import Box37 from "@mui/material/Box";
|
|
6110
6278
|
import Typography19 from "@mui/material/Typography";
|
|
6111
|
-
import { jsx as
|
|
6279
|
+
import { jsx as jsx100, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6112
6280
|
function ListingTableEmptyState({
|
|
6113
6281
|
title = "No data available",
|
|
6114
6282
|
description,
|
|
@@ -6130,7 +6298,7 @@ function ListingTableEmptyState({
|
|
|
6130
6298
|
textAlign: "center"
|
|
6131
6299
|
}, sx),
|
|
6132
6300
|
children: [
|
|
6133
|
-
illustration && /* @__PURE__ */
|
|
6301
|
+
illustration && /* @__PURE__ */ jsx100(
|
|
6134
6302
|
Box37,
|
|
6135
6303
|
{
|
|
6136
6304
|
sx: {
|
|
@@ -6144,9 +6312,9 @@ function ListingTableEmptyState({
|
|
|
6144
6312
|
children: illustration
|
|
6145
6313
|
}
|
|
6146
6314
|
),
|
|
6147
|
-
/* @__PURE__ */
|
|
6148
|
-
description && /* @__PURE__ */
|
|
6149
|
-
action && /* @__PURE__ */
|
|
6315
|
+
/* @__PURE__ */ jsx100(Typography19, { variant: "h6", component: "div", sx: { mb: description ? 1 : 0, fontWeight: 500 }, children: title }),
|
|
6316
|
+
description && /* @__PURE__ */ jsx100(Typography19, { variant: "body2", color: "text.secondary", sx: { mb: action ? 2 : 0, maxWidth: 400 }, children: description }),
|
|
6317
|
+
action && /* @__PURE__ */ jsx100(Box37, { children: action })
|
|
6150
6318
|
]
|
|
6151
6319
|
}
|
|
6152
6320
|
);
|
|
@@ -6154,16 +6322,16 @@ function ListingTableEmptyState({
|
|
|
6154
6322
|
var ListingTableEmptyState_default = ListingTableEmptyState;
|
|
6155
6323
|
|
|
6156
6324
|
// src/components/ListingTable/shared/ListingTableDensityControl.tsx
|
|
6157
|
-
import { useCallback as
|
|
6325
|
+
import { useCallback as useCallback4 } from "react";
|
|
6158
6326
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
6159
6327
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
6160
6328
|
import Tooltip6 from "@mui/material/Tooltip";
|
|
6161
6329
|
import { AlignJustify, Menu as Menu3, List as List4 } from "@wso2/oxygen-ui-icons-react";
|
|
6162
|
-
import { jsx as
|
|
6330
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
6163
6331
|
var densityOptions = [
|
|
6164
|
-
{ value: "compact", label: "Compact", icon: /* @__PURE__ */
|
|
6165
|
-
{ value: "standard", label: "Standard", icon: /* @__PURE__ */
|
|
6166
|
-
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */
|
|
6332
|
+
{ value: "compact", label: "Compact", icon: /* @__PURE__ */ jsx101(AlignJustify, { size: 18 }) },
|
|
6333
|
+
{ value: "standard", label: "Standard", icon: /* @__PURE__ */ jsx101(Menu3, { size: 18 }) },
|
|
6334
|
+
{ value: "comfortable", label: "Comfortable", icon: /* @__PURE__ */ jsx101(List4, { size: 18 }) }
|
|
6167
6335
|
];
|
|
6168
6336
|
function ListingTableDensityControl({
|
|
6169
6337
|
value: valueProp,
|
|
@@ -6175,7 +6343,7 @@ function ListingTableDensityControl({
|
|
|
6175
6343
|
const tableContext = useListingTable();
|
|
6176
6344
|
const value = (_a = valueProp != null ? valueProp : tableContext == null ? void 0 : tableContext.density) != null ? _a : "standard";
|
|
6177
6345
|
const effectiveOnChange = onChangeProp != null ? onChangeProp : tableContext == null ? void 0 : tableContext.onDensityChange;
|
|
6178
|
-
const handleChange =
|
|
6346
|
+
const handleChange = useCallback4(
|
|
6179
6347
|
(_event, newDensity) => {
|
|
6180
6348
|
if (newDensity !== null) {
|
|
6181
6349
|
effectiveOnChange == null ? void 0 : effectiveOnChange(newDensity);
|
|
@@ -6183,16 +6351,16 @@ function ListingTableDensityControl({
|
|
|
6183
6351
|
},
|
|
6184
6352
|
[effectiveOnChange]
|
|
6185
6353
|
);
|
|
6186
|
-
return /* @__PURE__ */
|
|
6354
|
+
return /* @__PURE__ */ jsx101(ToggleButtonGroup, { value, exclusive: true, onChange: handleChange, size, sx, children: densityOptions.map((option) => /* @__PURE__ */ jsx101(ToggleButton, { value: option.value, children: /* @__PURE__ */ jsx101(Tooltip6, { title: option.label, children: /* @__PURE__ */ jsx101("span", { style: { display: "flex", alignItems: "center" }, children: option.icon }) }) }, option.value)) });
|
|
6187
6355
|
}
|
|
6188
6356
|
var ListingTableDensityControl_default = ListingTableDensityControl;
|
|
6189
6357
|
|
|
6190
6358
|
// src/components/ListingTable/shared/ListingTableSortLabel.tsx
|
|
6191
|
-
import { useCallback as
|
|
6359
|
+
import { useCallback as useCallback5 } from "react";
|
|
6192
6360
|
import MuiTableSortLabel from "@mui/material/TableSortLabel";
|
|
6193
|
-
import { styled as
|
|
6194
|
-
import { jsx as
|
|
6195
|
-
var StyledTableSortLabel =
|
|
6361
|
+
import { styled as styled66 } from "@mui/material/styles";
|
|
6362
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
6363
|
+
var StyledTableSortLabel = styled66(MuiTableSortLabel)(({ theme }) => ({
|
|
6196
6364
|
color: "inherit !important",
|
|
6197
6365
|
"&.Mui-active": {
|
|
6198
6366
|
color: "inherit !important",
|
|
@@ -6222,7 +6390,7 @@ function ListingTableSortLabel(_a) {
|
|
|
6222
6390
|
const isActiveFromContext = field !== void 0 && (tableContext == null ? void 0 : tableContext.sortField) === field;
|
|
6223
6391
|
const active = activeProp != null ? activeProp : isActiveFromContext;
|
|
6224
6392
|
const direction = (_a2 = directionProp != null ? directionProp : isActiveFromContext ? tableContext == null ? void 0 : tableContext.sortDirection : void 0) != null ? _a2 : "asc";
|
|
6225
|
-
const handleClick =
|
|
6393
|
+
const handleClick = useCallback5(
|
|
6226
6394
|
(event) => {
|
|
6227
6395
|
if (onClickProp) {
|
|
6228
6396
|
onClickProp(event);
|
|
@@ -6235,13 +6403,13 @@ function ListingTableSortLabel(_a) {
|
|
|
6235
6403
|
},
|
|
6236
6404
|
[onClickProp, field, tableContext, active, direction]
|
|
6237
6405
|
);
|
|
6238
|
-
return /* @__PURE__ */
|
|
6406
|
+
return /* @__PURE__ */ jsx102(StyledTableSortLabel, __spreadProps(__spreadValues({ active, direction, onClick: handleClick, hideSortIcon }, props), { children }));
|
|
6239
6407
|
}
|
|
6240
6408
|
var ListingTableSortLabel_default = ListingTableSortLabel;
|
|
6241
6409
|
|
|
6242
6410
|
// src/components/ListingTable/shared/ListingTableRowActions.tsx
|
|
6243
6411
|
import Box38 from "@mui/material/Box";
|
|
6244
|
-
import { jsx as
|
|
6412
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
6245
6413
|
var alignmentMap = {
|
|
6246
6414
|
left: "flex-start",
|
|
6247
6415
|
center: "center",
|
|
@@ -6253,7 +6421,7 @@ function ListingTableRowActions({
|
|
|
6253
6421
|
align = "right",
|
|
6254
6422
|
sx
|
|
6255
6423
|
}) {
|
|
6256
|
-
return /* @__PURE__ */
|
|
6424
|
+
return /* @__PURE__ */ jsx103(
|
|
6257
6425
|
Box38,
|
|
6258
6426
|
{
|
|
6259
6427
|
className: "table-row-actions",
|
|
@@ -6265,8 +6433,8 @@ function ListingTableRowActions({
|
|
|
6265
6433
|
}, visibility === "hover" && {
|
|
6266
6434
|
opacity: 0,
|
|
6267
6435
|
transition: "opacity 0.2s ease-in-out",
|
|
6268
|
-
// Support both TableView rows and ListView items
|
|
6269
|
-
".MuiTableRow-root:hover &, .list-view-item:hover &": {
|
|
6436
|
+
// Support both TableView rows, DataGrid rows, and ListView items
|
|
6437
|
+
".MuiTableRow-root:hover &, .MuiDataGrid-row:hover &, .list-view-item:hover &": {
|
|
6270
6438
|
opacity: 1
|
|
6271
6439
|
}
|
|
6272
6440
|
}), sx),
|
|
@@ -6279,7 +6447,7 @@ var ListingTableRowActions_default = ListingTableRowActions;
|
|
|
6279
6447
|
// src/components/ListingTable/shared/ListingTableCellIcon.tsx
|
|
6280
6448
|
import Box39 from "@mui/material/Box";
|
|
6281
6449
|
import Typography20 from "@mui/material/Typography";
|
|
6282
|
-
import { Fragment as Fragment16, jsx as
|
|
6450
|
+
import { Fragment as Fragment16, jsx as jsx104, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6283
6451
|
function ListingTableCellIcon({
|
|
6284
6452
|
icon,
|
|
6285
6453
|
primary,
|
|
@@ -6288,7 +6456,7 @@ function ListingTableCellIcon({
|
|
|
6288
6456
|
iconSx,
|
|
6289
6457
|
sx
|
|
6290
6458
|
}) {
|
|
6291
|
-
const iconElement = /* @__PURE__ */
|
|
6459
|
+
const iconElement = /* @__PURE__ */ jsx104(
|
|
6292
6460
|
Box39,
|
|
6293
6461
|
{
|
|
6294
6462
|
sx: __spreadValues({
|
|
@@ -6302,7 +6470,7 @@ function ListingTableCellIcon({
|
|
|
6302
6470
|
}
|
|
6303
6471
|
);
|
|
6304
6472
|
const textContent = /* @__PURE__ */ jsxs34(Box39, { sx: { minWidth: 0, flex: 1 }, children: [
|
|
6305
|
-
/* @__PURE__ */
|
|
6473
|
+
/* @__PURE__ */ jsx104(
|
|
6306
6474
|
Typography20,
|
|
6307
6475
|
{
|
|
6308
6476
|
variant: "body2",
|
|
@@ -6316,7 +6484,7 @@ function ListingTableCellIcon({
|
|
|
6316
6484
|
children: primary
|
|
6317
6485
|
}
|
|
6318
6486
|
),
|
|
6319
|
-
secondary && /* @__PURE__ */
|
|
6487
|
+
secondary && /* @__PURE__ */ jsx104(
|
|
6320
6488
|
Typography20,
|
|
6321
6489
|
{
|
|
6322
6490
|
variant: "caption",
|
|
@@ -6331,7 +6499,7 @@ function ListingTableCellIcon({
|
|
|
6331
6499
|
}
|
|
6332
6500
|
)
|
|
6333
6501
|
] });
|
|
6334
|
-
return /* @__PURE__ */
|
|
6502
|
+
return /* @__PURE__ */ jsx104(
|
|
6335
6503
|
Box39,
|
|
6336
6504
|
{
|
|
6337
6505
|
sx: __spreadValues({
|
|
@@ -6354,7 +6522,7 @@ var ListingTableCellIcon_default = ListingTableCellIcon;
|
|
|
6354
6522
|
|
|
6355
6523
|
// src/components/ListingTable/ListingTableProvider.tsx
|
|
6356
6524
|
import { useMemo as useMemo7 } from "react";
|
|
6357
|
-
import { jsx as
|
|
6525
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
6358
6526
|
function ListingTableProvider({
|
|
6359
6527
|
children,
|
|
6360
6528
|
// Search
|
|
@@ -6457,12 +6625,12 @@ function ListingTableProvider({
|
|
|
6457
6625
|
loading
|
|
6458
6626
|
]
|
|
6459
6627
|
);
|
|
6460
|
-
return /* @__PURE__ */
|
|
6628
|
+
return /* @__PURE__ */ jsx105(ListingTableContext.Provider, { value: contextValue, children });
|
|
6461
6629
|
}
|
|
6462
6630
|
|
|
6463
6631
|
// src/components/ListingTable/ListingTable/ListingTable.tsx
|
|
6464
|
-
import { jsx as
|
|
6465
|
-
var StyledTable =
|
|
6632
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
6633
|
+
var StyledTable = styled67(MuiTable, {
|
|
6466
6634
|
shouldForwardProp: (prop) => {
|
|
6467
6635
|
const excludedProps = ["variant", "density", "striped", "bordered"];
|
|
6468
6636
|
return !excludedProps.some((excluded) => excluded === prop);
|
|
@@ -6515,7 +6683,7 @@ function ListingTable(_a) {
|
|
|
6515
6683
|
"children",
|
|
6516
6684
|
"sx"
|
|
6517
6685
|
]);
|
|
6518
|
-
return /* @__PURE__ */
|
|
6686
|
+
return /* @__PURE__ */ jsx106(
|
|
6519
6687
|
StyledTable,
|
|
6520
6688
|
__spreadProps(__spreadValues({
|
|
6521
6689
|
variant,
|
|
@@ -6541,14 +6709,15 @@ var ListingTableCompound = Object.assign(ListingTable, {
|
|
|
6541
6709
|
EmptyState: ListingTableEmptyState_default,
|
|
6542
6710
|
Toolbar: ListingTableToolbar_default,
|
|
6543
6711
|
SortLabel: ListingTableSortLabel_default,
|
|
6544
|
-
DensityControl: ListingTableDensityControl_default
|
|
6712
|
+
DensityControl: ListingTableDensityControl_default,
|
|
6713
|
+
DataGrid: ListingTableDataGrid_default
|
|
6545
6714
|
});
|
|
6546
6715
|
var ListingTable_default = ListingTableCompound;
|
|
6547
6716
|
|
|
6548
6717
|
// src/animations/ParticleBackground/ParticleBackground.tsx
|
|
6549
6718
|
import { useEffect as useEffect5, useRef } from "react";
|
|
6550
6719
|
import { useColorScheme as useColorScheme3 } from "@mui/material/styles";
|
|
6551
|
-
import { jsx as
|
|
6720
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
6552
6721
|
var ParticleBackground = ({
|
|
6553
6722
|
opacity = 0.5,
|
|
6554
6723
|
baseDensity = 0.12,
|
|
@@ -6695,8 +6864,8 @@ var ParticleBackground = ({
|
|
|
6695
6864
|
const dy = a.y - b.y;
|
|
6696
6865
|
const dist = Math.hypot(dx, dy);
|
|
6697
6866
|
if (dist < linkDist * DPR) {
|
|
6698
|
-
const
|
|
6699
|
-
context.globalAlpha =
|
|
6867
|
+
const alpha3 = linkAlpha * (1 - dist / (linkDist * DPR));
|
|
6868
|
+
context.globalAlpha = alpha3;
|
|
6700
6869
|
context.beginPath();
|
|
6701
6870
|
context.moveTo(a.x, a.y);
|
|
6702
6871
|
context.lineTo(b.x, b.y);
|
|
@@ -6733,7 +6902,7 @@ var ParticleBackground = ({
|
|
|
6733
6902
|
cancelAnimationFrame(animationFrameId);
|
|
6734
6903
|
};
|
|
6735
6904
|
}, [baseDensity, maxSpeed, radius, linkDist, linkAlpha, mouseInfluence, repelStrength, clickBurst, mode]);
|
|
6736
|
-
return /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsx107(
|
|
6737
6906
|
"canvas",
|
|
6738
6907
|
{
|
|
6739
6908
|
ref: canvasRef,
|
|
@@ -6819,7 +6988,7 @@ var useNotifications = (options = {}) => {
|
|
|
6819
6988
|
// src/index.ts
|
|
6820
6989
|
export * from "@mui/material";
|
|
6821
6990
|
import * as colors from "@mui/material/colors";
|
|
6822
|
-
import * as
|
|
6991
|
+
import * as DataGrid2 from "@mui/x-data-grid";
|
|
6823
6992
|
import * as DatePickers from "@mui/x-date-pickers";
|
|
6824
6993
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
6825
6994
|
import * as TreeView from "@mui/x-tree-view";
|
|
@@ -6836,7 +7005,7 @@ export {
|
|
|
6836
7005
|
ColorSchemeToggle,
|
|
6837
7006
|
ColorSchemeToggle_default as ColorSchemeToggleDefault,
|
|
6838
7007
|
ComplexSelect_default as ComplexSelect,
|
|
6839
|
-
DataGrid,
|
|
7008
|
+
DataGrid2 as DataGrid,
|
|
6840
7009
|
DatePickers,
|
|
6841
7010
|
Footer,
|
|
6842
7011
|
Form,
|