Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Dabolus committed Apr 25, 2024
1 parent 233f608 commit e35b04d
Show file tree
Hide file tree
Showing 5 changed files with 2,233 additions and 2,297 deletions.
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/fix-csb-deps.cjs
spec: fix-csb-deps
34 changes: 20 additions & 14 deletions app/routes/s3.buckets.$id.($key)/preview/PreviewElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import {
import { useTranslation } from 'react-i18next';
import { PrismAsync as SyntaxHighlighter } from 'react-syntax-highlighter';
import { DataGrid, DataGridProps } from '@mui/x-data-grid';
import { TreeItem, TreeView, TreeViewProps } from '@mui/x-tree-view';
import {
TreeItem,
SimpleTreeView,
SimpleTreeViewProps,
} from '@mui/x-tree-view';
import {
Typography,
styled,
Expand Down Expand Up @@ -122,13 +126,13 @@ const ColoredValue = styled('span')<{ $value: any }>(({ $value, theme }) => ({
const JsonValue: FunctionComponent<{ value: any }> = ({ value }) => (
<ColoredValue $value={value}>{JSON.stringify(value)}</ColoredValue>
);
const JsonTreeView = styled(TreeView)(({ theme }) => ({
const JsonTreeView = styled(SimpleTreeView)(({ theme }) => ({
background: theme.vars.palette.background.default,
padding: theme.spacing(2, 0),
width: '100%',
height: '100%',
overflow: 'auto',
})) as typeof TreeView;
})) as typeof SimpleTreeView;

const convertToTree = (obj: any, keyPrefix = ''): ReactNode => {
if (Array.isArray(obj) || (typeof obj === 'object' && obj !== null)) {
Expand All @@ -137,26 +141,26 @@ const convertToTree = (obj: any, keyPrefix = ''): ReactNode => {
Array.isArray(value) ||
(typeof value === 'object' && value !== null)
) {
const nodeId = `${keyPrefix}['${key}']`;
const itemId = `${keyPrefix}['${key}']`;
return (
<TreeItem
key={nodeId}
nodeId={nodeId}
key={itemId}
itemId={itemId}
label={
<code>
<ColoredKey>{key}:</ColoredKey>
</code>
}
>
{convertToTree(value, nodeId)}
{convertToTree(value, itemId)}
</TreeItem>
);
}
const nodeId = `${keyPrefix}['${key}']`;
const itemId = `${keyPrefix}['${key}']`;
return (
<TreeItem
key={nodeId}
nodeId={nodeId}
key={itemId}
itemId={itemId}
label={
<code>
<ColoredKey>{key}:</ColoredKey> <JsonValue value={value} />
Expand All @@ -173,7 +177,7 @@ const JsonViewer: FunctionComponent<
Pick<PreviewElementProps, 'name' | 'src'>
> = ({ name, src }) => {
const [treeViewProps, setTreeViewProps] = useState<
TreeViewProps<false> | undefined
SimpleTreeViewProps<false> | undefined
>(undefined);

useEnhancedEffect(() => {
Expand All @@ -182,16 +186,18 @@ const JsonViewer: FunctionComponent<
.then(data => {
// Convert the JSON object to a tree structure.
const children = convertToTree(data);
setTreeViewProps({ defaultExpanded: Object.keys(data), children });
setTreeViewProps({ defaultExpandedItems: Object.keys(data), children });
});
}, []);

return (
treeViewProps && (
<JsonTreeView
aria-label={name}
defaultCollapseIcon={<ExpandMoreIcon />}
defaultExpandIcon={<ChevronRightIcon />}
slots={{
collapseIcon: ExpandMoreIcon,
expandIcon: ChevronRightIcon,
}}
{...treeViewProps}
/>
)
Expand Down
12 changes: 6 additions & 6 deletions app/routes/s3.buckets.$id.($key)/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ export default function BucketDetails() {
{
field: 'type',
headerName: t('type'),
valueGetter: params =>
params.row.item.Key ? t('file') : t('folder'),
valueGetter: (_, row) =>
row.item.Key ? t('file') : t('folder'),
sortable: !search,
width: 100,
},
Expand All @@ -395,16 +395,16 @@ export default function BucketDetails() {
{
field: 'size',
headerName: t('size'),
valueGetter: params => prettifySize(params.row.item.Size),
valueGetter: (_, row) => prettifySize(row.item.Size),
sortable: !search,
width: 100,
},
{
field: 'storageClass',
headerName: t('storageClass'),
valueGetter: params =>
params.row.item.StorageClass
? s3StorageClassToNameMap[params.row.item.StorageClass]
valueGetter: (_, row) =>
row.item.StorageClass
? s3StorageClassToNameMap[row.item.StorageClass]
: '-',
sortable: !search,
width: 150,
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"funding": "https://github.com/sponsors/Dabolus",
"scripts": {
"build": "remix vite:build",
"dev": "concurrently 'bun:dev:*'",
"dev": "concurrently 'yarn:dev:*'",
"dev:remix": "LOCALUI_SERVICES_ENDPOINT=http://localhost:4566 LOCALUI_ACCESS_KEY_ID=accesskeyid LOCALUI_SECRET_ACCESS_KEY=secretaccesskey remix vite:dev",
"dev:localstack": "docker compose up --force-recreate --build --renew-anon-volumes --remove-orphans",
"start": "remix-serve ./build/server/index.js",
Expand All @@ -20,47 +20,47 @@
"upgrade-interactive": "ncu --interactive"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.525.0",
"@aws-sdk/client-s3": "^3.525.0",
"@aws-sdk/client-sqs": "^3.525.0",
"@aws-sdk/lib-dynamodb": "^3.525.0",
"@aws-sdk/lib-storage": "^3.525.1",
"@aws-sdk/client-dynamodb": "^3.556.0",
"@aws-sdk/client-s3": "^3.556.0",
"@aws-sdk/client-sqs": "^3.556.0",
"@aws-sdk/lib-dynamodb": "^3.556.0",
"@aws-sdk/lib-storage": "^3.556.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.11",
"@mui/material": "^5.15.11",
"@mui/x-data-grid": "^6.19.6",
"@mui/x-tree-view": "^6.17.0",
"@remix-run/node": "^2.8.0",
"@remix-run/react": "^2.8.0",
"@remix-run/serve": "^2.8.0",
"@remix-run/server-runtime": "^2.8.0",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.15",
"@mui/material": "^5.15.15",
"@mui/x-data-grid": "^7.3.0",
"@mui/x-tree-view": "^7.3.0",
"@remix-run/node": "^2.9.1",
"@remix-run/react": "^2.9.1",
"@remix-run/serve": "^2.9.1",
"@remix-run/server-runtime": "^2.9.1",
"csv-parse": "^5.5.5",
"docx-preview": "^0.3.0",
"fuse.js": "^7.0.0",
"i18next": "^23.10.0",
"i18next-browser-languagedetector": "^7.2.0",
"material-ui-popup-state": "^5.0.10",
"i18next": "^23.11.2",
"i18next-browser-languagedetector": "^7.2.1",
"material-ui-popup-state": "^5.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone-esm": "^15.0.1",
"react-i18next": "^14.0.5",
"react-i18next": "^14.1.1",
"react-syntax-highlighter": "^15.5.0",
"remix-i18next": "^6.0.1"
"remix-i18next": "^6.1.0"
},
"devDependencies": {
"@remix-run/dev": "^2.8.0",
"@types/react": "^18.2.61",
"@types/react-dom": "^18.2.19",
"@remix-run/dev": "^2.9.1",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@types/react-syntax-highlighter": "^15.5.11",
"concurrently": "^8.2.2",
"i18next-parser": "^8.13.0",
"npm-check-updates": "^16.14.15",
"npm-check-updates": "^16.14.18",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"vite-tsconfig-paths": "^4.3.1"
"typescript": "^5.4.5",
"vite-tsconfig-paths": "^4.3.2"
},
"resolutions": {
"rollup": "npm:@rollup/wasm-node@*"
Expand All @@ -69,5 +69,5 @@
"node": ">=14"
},
"sideEffects": false,
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.1.1"
}
Loading

0 comments on commit e35b04d

Please sign in to comment.