@@ -2,14 +2,16 @@ import { Theme } from '@mui/material';
2
2
import { MUIDataTableColumn , MUIDataTableMeta } from 'mui-datatables' ;
3
3
import { Typography } from '../../base' ;
4
4
import { PLAYGROUND_MODES } from '../../constants/constants' ;
5
- import { ChainIcon , CopyIcon , KanvasIcon , PublishIcon } from '../../icons' ;
5
+ import { ChainIcon , CopyIcon , KanvasIcon , LockIcon , PublicIcon , PublishIcon } from '../../icons' ;
6
6
import Download from '../../icons/Download/Download' ;
7
7
import { downloadPattern , slugify } from '../CatalogDetail/helper' ;
8
8
import { RESOURCE_TYPES } from '../CatalogDetail/types' ;
9
9
import { Pattern } from '../CustomCatalog/CustomCard' ;
10
10
import { ConditionalTooltip } from '../Helpers/CondtionalTooltip' ;
11
11
import { ColView } from '../Helpers/ResponsiveColumns/responsive-coulmns.tsx' ;
12
12
import { DataTableEllipsisMenu } from '../ResponsiveDataTable' ;
13
+ import { VisibilityChipMenu } from '../VisibilityChipMenu' ;
14
+ import { VIEW_VISIBILITY } from '../VisibilityChipMenu/VisibilityChipMenu' ;
13
15
import AuthorCell from './AuthorCell' ;
14
16
import { getColumnValue } from './helper' ;
15
17
import { L5DeleteIcon , NameDiv } from './style' ;
@@ -146,7 +148,20 @@ export const createDesignsColumnsConfig = ({
146
148
options : {
147
149
filter : false ,
148
150
sort : false ,
149
- searchable : true
151
+ searchable : true ,
152
+ customBodyRender : ( value : VIEW_VISIBILITY ) => {
153
+ return (
154
+ < VisibilityChipMenu
155
+ value = { value }
156
+ onChange = { ( value ) => handleVisibilityChange ( value as VIEW_VISIBILITY ) }
157
+ enabled = { isVisibilityEnabled }
158
+ options = { [
159
+ [ VIEW_VISIBILITY . PUBLIC , PublicIcon ] ,
160
+ [ VIEW_VISIBILITY . PRIVATE , LockIcon ]
161
+ ] }
162
+ />
163
+ ) ;
164
+ }
150
165
}
151
166
} ,
152
167
{
@@ -180,8 +195,7 @@ export const createDesignsColumnsConfig = ({
180
195
filter : false ,
181
196
sort : false ,
182
197
searchable : false ,
183
- setCellHeaderProps : ( ) => ( { align : 'center' as const } ) ,
184
- setCellProps : ( ) => ( { align : 'center' as const } ) ,
198
+
185
199
customBodyRender : function CustomBody ( _ , tableMeta : MUIDataTableMeta ) {
186
200
const rowIndex = ( tableMeta as TableMeta ) . rowIndex ;
187
201
const rowData = ( tableMeta as TableMeta ) . tableData [ rowIndex ] ;
@@ -203,7 +217,7 @@ export const createDesignsColumnsConfig = ({
203
217
icon : < ChainIcon width = { '24' } height = { '24' } fill = { theme ?. palette . icon . secondary } />
204
218
} ,
205
219
{
206
- title : 'Open in playground ' ,
220
+ title : 'Open in Playground ' ,
207
221
onClick : ( ) => {
208
222
window . open (
209
223
`https://playground.meshery.io/extension/meshmap?mode=${
0 commit comments