From 5b90831f02644bbaa16de6e59a11a3ea50f17e58 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Thu, 2 Nov 2023 22:11:41 -0500 Subject: [PATCH 1/8] fix(components): refactor components Signed-off-by: Antonette Caldwell --- apps/design-system/package.json | 2 +- packages/components/.eslintrc.cjs | 4 +- packages/components/package.json | 31 +- .../src/base/Accordion/accordion.tsx | 2 +- .../src/base/Accordion/accordionactions.tsx | 2 +- .../src/base/Accordion/accordiondetails.tsx | 2 +- .../src/base/Accordion/accordionsummary.tsx | 2 +- .../components/src/base/AppBar/appbar.tsx | 2 +- .../components/src/base/Avatar/avatar.tsx | 2 +- .../src/base/Avatar/avatargroup.tsx | 2 +- packages/components/src/base/Avatar/badge.tsx | 2 +- packages/components/src/base/Box/box.tsx | 2 +- .../components/src/base/Button/button.tsx | 5 +- .../src/base/Button/buttongroup.tsx | 2 +- .../components/src/base/Button/iconbutton.tsx | 2 +- packages/components/src/base/Card/card.tsx | 2 +- .../components/src/base/Card/cardactions.tsx | 2 +- .../components/src/base/Card/cardcontent.tsx | 2 +- .../components/src/base/Checkbox/checkbox.tsx | 2 +- packages/components/src/base/Chip/chip.tsx | 2 +- .../ClickAwayListener/ClickAwayListener.tsx | 2 +- .../components/src/base/DataTable/index.tsx | 4 +- .../components/src/base/Dialog/backdrop.tsx | 2 +- .../components/src/base/Dialog/dialog.tsx | 2 +- .../src/base/Dialog/dialogactions.tsx | 2 +- .../src/base/Dialog/dialogcontent.tsx | 2 +- .../src/base/Dialog/dialogcontenttext.tsx | 2 +- .../src/base/Dialog/dialogtitle.tsx | 2 +- .../components/src/base/Divider/divider.tsx | 2 +- .../components/src/base/Drawer/drawer.tsx | 2 +- .../src/base/Form/formcontrollabel.tsx | 2 +- packages/components/src/base/Grid/grid.tsx | 5 + packages/components/src/base/List/list.tsx | 4 +- packages/components/src/base/Menu/menu.tsx | 2 +- .../components/src/base/Menu/menuitem.tsx | 2 +- packages/components/src/base/Paper/paper.tsx | 2 +- .../components/src/base/Popper/popper.tsx | 2 +- .../components/src/base/Radio/radiogroup.tsx | 2 +- .../components/src/base/Select/select.tsx | 4 +- packages/components/src/base/Slide/slide.tsx | 2 +- packages/components/src/base/Stack/stack.tsx | 2 +- .../components/src/base/Switch/switch.tsx | 4 +- packages/components/src/base/Table/table.tsx | 4 +- packages/components/src/base/Tabs/tab.tsx | 2 +- packages/components/src/base/Tabs/tabs.tsx | 2 +- .../src/base/ToggleButton/togglebutton.tsx | 2 +- .../base/ToggleButton/togglebuttongroup.tsx | 2 +- .../components/src/base/Toolbar/toolbar.tsx | 2 +- .../components/src/base/Tooltip/tooltip.tsx | 2 +- .../src/base/Typography/typography.tsx | 2 +- .../components/src/custom/ChartDialog.tsx | 14 +- .../src/custom/Dialog/StyledDialog.tsx | 5 +- .../src/custom/Dialog/StyledDialogActions.tsx | 7 +- .../src/custom/Dialog/StyledDialogContent.tsx | 7 +- .../src/custom/Dialog/StyledDialogTitle.tsx | 7 +- .../components/src/custom/ErrorBoundary.tsx | 14 +- .../CondtionalTooltip/tooltip-for-desc.tsx | 45 +- .../custom/Helpers/Dimension/windowSize.tsx | 6 +- packages/components/src/custom/SearchBar.tsx | 16 +- .../src/custom/Toolbar/custom-column.tsx | 12 +- .../src/custom/Toolbar/custom-filter.tsx | 13 +- .../src/custom/Toolbar/custom-search.tsx | 17 +- .../components/src/custom/Toolbar/index.ts | 3 - .../components/src/custom/Toolbar/index.tsx | 5 + packages/components/src/custom/Tooltip.tsx | 12 +- .../src/custom/{index.ts => index.tsx} | 6 +- .../src/types/react-error-boundary.d.ts | 4 +- packages/components/tsconfig.json | 41 +- packages/components/tsconfig.node.json | 10 - packages/components/tsup.config.ts | 20 + packages/components/vite.config.ts | 66 --- yarn.lock | 473 +----------------- 72 files changed, 232 insertions(+), 718 deletions(-) delete mode 100644 packages/components/src/custom/Toolbar/index.ts create mode 100644 packages/components/src/custom/Toolbar/index.tsx rename packages/components/src/custom/{index.ts => index.tsx} (58%) delete mode 100644 packages/components/tsconfig.node.json create mode 100644 packages/components/tsup.config.ts delete mode 100644 packages/components/vite.config.ts diff --git a/apps/design-system/package.json b/apps/design-system/package.json index 2abf080c..f3e00ab4 100644 --- a/apps/design-system/package.json +++ b/apps/design-system/package.json @@ -10,7 +10,7 @@ "lint": "eslint .", "lint:fix": "eslint --fix", "preview": "vite preview", - "storybook": "BROWSER=none storybook dev -p 6006" + "storybook": "storybook dev -p 6006" }, "dependencies": { "@layer5/sistent-components": "workspace:^", diff --git a/packages/components/.eslintrc.cjs b/packages/components/.eslintrc.cjs index be7efc9c..e5f2c8aa 100644 --- a/packages/components/.eslintrc.cjs +++ b/packages/components/.eslintrc.cjs @@ -9,10 +9,10 @@ module.exports = { parserOptions: { ecmaVersion: 'latest', sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], + project: ['./tsconfig.json'], tsconfigRootDir: __dirname, }, - ignorePatterns: ['dist', '.eslintrc.cjs'], + ignorePatterns: ['dist', '.eslintrc.cjs', 'tsup.config.ts'], parser: '@typescript-eslint/parser', plugins: ['react'], rules: { diff --git a/packages/components/package.json b/packages/components/package.json index 10ffee4f..6b2e02e5 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -5,18 +5,19 @@ "type": "module", "exports": { ".": { - "import": "./dist/index.es.js", - "require": "./dist/index.cjs.js" + "import": "./dist/index.js", + "require": "./dist/index.js" } }, - "main": "./dist/index.cjs.js", - "module": "./dist/index.es.js", + "main": "./dist/index.js", + "module": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist" ], "scripts": { - "build": "tsc && NODE_ENV=production vite build", + "build": "NODE_ENV=production tsup", + "dev": "NODE_ENV=development tsup", "lint": "eslint .", "lint:fix": "eslint --fix" }, @@ -36,13 +37,10 @@ "eslint": "^8.45.0", "eslint-plugin-react": "^7.33.2", "mui-datatables": "^4.3.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", - "typescript": "^5.0.2", - "vite": "^4.5.0", - "vite-plugin-dts": "^3.5.3", - "vite-tsconfig-paths": "^4.2.1" + "tsconfig": "workspace:^", + "tsup": "^7.2.0", + "typescript": "^5.0.2" }, "peerDependencies": { "@emotion/react": "*", @@ -50,8 +48,8 @@ "@mui/material": "*", "@types/mui-datatables": "*", "mui-datatables": "*", - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0", + "react": ">=17", + "react-dom": ">=17", "react-error-boundary": "*" }, "peerDependenciesMeta": { @@ -69,8 +67,15 @@ }, "react": { "optional": true + }, + "react-dom": { + "optional": true } }, + "optionalDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, "publishConfig": { "access": "public" } diff --git a/packages/components/src/base/Accordion/accordion.tsx b/packages/components/src/base/Accordion/accordion.tsx index 96abfd7d..166fccf1 100644 --- a/packages/components/src/base/Accordion/accordion.tsx +++ b/packages/components/src/base/Accordion/accordion.tsx @@ -1,4 +1,4 @@ import { Accordion as MuiAccordion, type AccordionProps } from '@mui/material'; -export function Accordion(props: AccordionProps) { +export function Accordion(props: AccordionProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Accordion/accordionactions.tsx b/packages/components/src/base/Accordion/accordionactions.tsx index b1f8d449..fab88440 100644 --- a/packages/components/src/base/Accordion/accordionactions.tsx +++ b/packages/components/src/base/Accordion/accordionactions.tsx @@ -1,5 +1,5 @@ import { AccordionActions as MuiAccordionActions, type AccordionActionsProps } from '@mui/material'; -export function AccordionActions(props: AccordionActionsProps) { +export function AccordionActions(props: AccordionActionsProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Accordion/accordiondetails.tsx b/packages/components/src/base/Accordion/accordiondetails.tsx index 52839a53..e34cb0d3 100644 --- a/packages/components/src/base/Accordion/accordiondetails.tsx +++ b/packages/components/src/base/Accordion/accordiondetails.tsx @@ -1,5 +1,5 @@ import { AccordionDetails as MuiAccordionDetails, type AccordionDetailsProps } from '@mui/material'; -export function AccordionDetails(props: AccordionDetailsProps) { +export function AccordionDetails(props: AccordionDetailsProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Accordion/accordionsummary.tsx b/packages/components/src/base/Accordion/accordionsummary.tsx index da104182..97e7874b 100644 --- a/packages/components/src/base/Accordion/accordionsummary.tsx +++ b/packages/components/src/base/Accordion/accordionsummary.tsx @@ -1,5 +1,5 @@ import { AccordionSummary as MuiAccordionSummary, type AccordionSummaryProps } from '@mui/material'; -export function AccordionSummary(props: AccordionSummaryProps) { +export function AccordionSummary(props: AccordionSummaryProps): JSX.Element { return ; } diff --git a/packages/components/src/base/AppBar/appbar.tsx b/packages/components/src/base/AppBar/appbar.tsx index 5202e04b..b9f26430 100644 --- a/packages/components/src/base/AppBar/appbar.tsx +++ b/packages/components/src/base/AppBar/appbar.tsx @@ -1,5 +1,5 @@ import { AppBar as MuiAppBar, type AppBarProps } from '@mui/material'; -export function AppBar(props: AppBarProps) { +export function AppBar(props: AppBarProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Avatar/avatar.tsx b/packages/components/src/base/Avatar/avatar.tsx index c63f6e4b..0053f77b 100644 --- a/packages/components/src/base/Avatar/avatar.tsx +++ b/packages/components/src/base/Avatar/avatar.tsx @@ -1,5 +1,5 @@ import { Avatar as MuiAvatar, type AvatarProps } from '@mui/material'; -export function Avatar(props: AvatarProps) { +export function Avatar(props: AvatarProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Avatar/avatargroup.tsx b/packages/components/src/base/Avatar/avatargroup.tsx index 22c4dd72..a80a4ecd 100644 --- a/packages/components/src/base/Avatar/avatargroup.tsx +++ b/packages/components/src/base/Avatar/avatargroup.tsx @@ -1,5 +1,5 @@ import { AvatarGroup as MuiAvatarGroup, type AvatarGroupProps } from '@mui/material'; -export function AvatarGroup(props: AvatarGroupProps) { +export function AvatarGroup(props: AvatarGroupProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Avatar/badge.tsx b/packages/components/src/base/Avatar/badge.tsx index cdd7ce58..fe8a7885 100644 --- a/packages/components/src/base/Avatar/badge.tsx +++ b/packages/components/src/base/Avatar/badge.tsx @@ -1,5 +1,5 @@ import { Badge as MuiBadge, type BadgeProps } from '@mui/material'; -export function Badge(props: BadgeProps) { +export function Badge(props: BadgeProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Box/box.tsx b/packages/components/src/base/Box/box.tsx index e00013c9..fcade856 100644 --- a/packages/components/src/base/Box/box.tsx +++ b/packages/components/src/base/Box/box.tsx @@ -1,5 +1,5 @@ import { Box as MuiBox, type BoxProps } from '@mui/material'; -export function Box(props: BoxProps) { +export function Box(props: BoxProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Button/button.tsx b/packages/components/src/base/Button/button.tsx index 4b271314..296ad876 100644 --- a/packages/components/src/base/Button/button.tsx +++ b/packages/components/src/base/Button/button.tsx @@ -1,12 +1,11 @@ import { Button as MuiButton, type ButtonProps as MuiButtonProps } from '@mui/material'; -import { ReactNode } from 'react'; export interface ButtonProps extends MuiButtonProps { label?: string; - children?: ReactNode; + children?: React.ReactNode; } -export function Button({ label, children, ...props }: ButtonProps) { +export function Button({ label, children, ...props }: ButtonProps): JSX.Element { return ( {label} diff --git a/packages/components/src/base/Button/buttongroup.tsx b/packages/components/src/base/Button/buttongroup.tsx index 47025830..f0cbe94d 100644 --- a/packages/components/src/base/Button/buttongroup.tsx +++ b/packages/components/src/base/Button/buttongroup.tsx @@ -1,5 +1,5 @@ import { ButtonGroup as MuiButtonGroup, type ButtonGroupProps } from '@mui/material'; -export function ButtonGroup(props: ButtonGroupProps) { +export function ButtonGroup(props: ButtonGroupProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Button/iconbutton.tsx b/packages/components/src/base/Button/iconbutton.tsx index 5cf52ec0..915be558 100644 --- a/packages/components/src/base/Button/iconbutton.tsx +++ b/packages/components/src/base/Button/iconbutton.tsx @@ -1,5 +1,5 @@ import { IconButton as MuiIconButton, type IconButtonProps } from '@mui/material'; -export function IconButton(props: IconButtonProps) { +export function IconButton(props: IconButtonProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Card/card.tsx b/packages/components/src/base/Card/card.tsx index 9024c8ef..d9c2dda2 100644 --- a/packages/components/src/base/Card/card.tsx +++ b/packages/components/src/base/Card/card.tsx @@ -1,5 +1,5 @@ import { Card as MuiCard, type CardProps } from '@mui/material'; -export function Card(props: CardProps) { +export function Card(props: CardProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Card/cardactions.tsx b/packages/components/src/base/Card/cardactions.tsx index d3e7e895..c730391e 100644 --- a/packages/components/src/base/Card/cardactions.tsx +++ b/packages/components/src/base/Card/cardactions.tsx @@ -1,5 +1,5 @@ import { CardActions as MuiCardActions, type CardActionsProps } from '@mui/material'; -export function CardActions(props: CardActionsProps) { +export function CardActions(props: CardActionsProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Card/cardcontent.tsx b/packages/components/src/base/Card/cardcontent.tsx index 6932a593..0fee760a 100644 --- a/packages/components/src/base/Card/cardcontent.tsx +++ b/packages/components/src/base/Card/cardcontent.tsx @@ -1,5 +1,5 @@ import { CardContent as MuiCardContent, type CardContentProps } from '@mui/material'; -export function CardContent(props: CardContentProps) { +export function CardContent(props: CardContentProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Checkbox/checkbox.tsx b/packages/components/src/base/Checkbox/checkbox.tsx index c6c33519..2aa53d4f 100644 --- a/packages/components/src/base/Checkbox/checkbox.tsx +++ b/packages/components/src/base/Checkbox/checkbox.tsx @@ -1,5 +1,5 @@ import { Checkbox as MuiCheckbox, type CheckboxProps } from '@mui/material'; -export function Checkbox(props: CheckboxProps) { +export function Checkbox(props: CheckboxProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Chip/chip.tsx b/packages/components/src/base/Chip/chip.tsx index 22f6ca1e..881b3d34 100644 --- a/packages/components/src/base/Chip/chip.tsx +++ b/packages/components/src/base/Chip/chip.tsx @@ -1,5 +1,5 @@ import { Chip as MuiChip, type ChipProps } from '@mui/material'; -export function Chip(props: ChipProps) { +export function Chip(props: ChipProps): JSX.Element { return ; } diff --git a/packages/components/src/base/ClickAwayListener/ClickAwayListener.tsx b/packages/components/src/base/ClickAwayListener/ClickAwayListener.tsx index e88de6e4..8849e22b 100644 --- a/packages/components/src/base/ClickAwayListener/ClickAwayListener.tsx +++ b/packages/components/src/base/ClickAwayListener/ClickAwayListener.tsx @@ -2,6 +2,6 @@ import { ClickAwayListener as MuiClickAwayListener, type ClickAwayListenerProps } from '@mui/material'; -export function ClickAwayListener(props: ClickAwayListenerProps) { +export function ClickAwayListener(props: ClickAwayListenerProps): JSX.Element { return ; } diff --git a/packages/components/src/base/DataTable/index.tsx b/packages/components/src/base/DataTable/index.tsx index ad7acece..3bc334fb 100644 --- a/packages/components/src/base/DataTable/index.tsx +++ b/packages/components/src/base/DataTable/index.tsx @@ -1 +1,3 @@ -export * from 'mui-datatables'; +import * as DataTable from 'mui-datatables'; + +export { DataTable }; diff --git a/packages/components/src/base/Dialog/backdrop.tsx b/packages/components/src/base/Dialog/backdrop.tsx index be6b0e58..eeb79167 100644 --- a/packages/components/src/base/Dialog/backdrop.tsx +++ b/packages/components/src/base/Dialog/backdrop.tsx @@ -1,5 +1,5 @@ import { Backdrop as MuiBackdrop, type BackdropProps } from '@mui/material'; -export function Backdrop(props: BackdropProps) { +export function Backdrop(props: BackdropProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Dialog/dialog.tsx b/packages/components/src/base/Dialog/dialog.tsx index 630670b7..5c17a709 100644 --- a/packages/components/src/base/Dialog/dialog.tsx +++ b/packages/components/src/base/Dialog/dialog.tsx @@ -1,5 +1,5 @@ import { Dialog as MuiDialog, type DialogProps } from '@mui/material'; -export function Dialog(props: DialogProps) { +export function Dialog(props: DialogProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Dialog/dialogactions.tsx b/packages/components/src/base/Dialog/dialogactions.tsx index db6f169e..6330759d 100644 --- a/packages/components/src/base/Dialog/dialogactions.tsx +++ b/packages/components/src/base/Dialog/dialogactions.tsx @@ -1,5 +1,5 @@ import { DialogActions as MuiDialogActions, type DialogActionsProps } from '@mui/material'; -export function DialogActions(props: DialogActionsProps) { +export function DialogActions(props: DialogActionsProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Dialog/dialogcontent.tsx b/packages/components/src/base/Dialog/dialogcontent.tsx index 543970f0..56c85514 100644 --- a/packages/components/src/base/Dialog/dialogcontent.tsx +++ b/packages/components/src/base/Dialog/dialogcontent.tsx @@ -1,5 +1,5 @@ import { DialogContent as MuiDialogContent, type DialogContentProps } from '@mui/material'; -export function DialogContent(props: DialogContentProps) { +export function DialogContent(props: DialogContentProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Dialog/dialogcontenttext.tsx b/packages/components/src/base/Dialog/dialogcontenttext.tsx index abc7d62a..8c3bb177 100644 --- a/packages/components/src/base/Dialog/dialogcontenttext.tsx +++ b/packages/components/src/base/Dialog/dialogcontenttext.tsx @@ -3,6 +3,6 @@ import { type DialogContentTextProps } from '@mui/material'; -export function DialogContentText(props: DialogContentTextProps) { +export function DialogContentText(props: DialogContentTextProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Dialog/dialogtitle.tsx b/packages/components/src/base/Dialog/dialogtitle.tsx index 055010f7..4f33e5f6 100644 --- a/packages/components/src/base/Dialog/dialogtitle.tsx +++ b/packages/components/src/base/Dialog/dialogtitle.tsx @@ -1,5 +1,5 @@ import { DialogTitle as MuiDialogTitle, type DialogTitleProps } from '@mui/material'; -export function DialogTitle(props: DialogTitleProps) { +export function DialogTitle(props: DialogTitleProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Divider/divider.tsx b/packages/components/src/base/Divider/divider.tsx index 8c124d89..5619e9a1 100644 --- a/packages/components/src/base/Divider/divider.tsx +++ b/packages/components/src/base/Divider/divider.tsx @@ -1,5 +1,5 @@ import { Divider as MuiDivider, type DividerProps } from '@mui/material'; -export function Divider(props: DividerProps) { +export function Divider(props: DividerProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Drawer/drawer.tsx b/packages/components/src/base/Drawer/drawer.tsx index a7262fee..8c6b3eb2 100644 --- a/packages/components/src/base/Drawer/drawer.tsx +++ b/packages/components/src/base/Drawer/drawer.tsx @@ -1,5 +1,5 @@ import { Drawer as MuiDrawer, type DrawerProps } from '@mui/material'; -export function Drawer(props: DrawerProps) { +export function Drawer(props: DrawerProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Form/formcontrollabel.tsx b/packages/components/src/base/Form/formcontrollabel.tsx index 111a364f..f31e5b16 100644 --- a/packages/components/src/base/Form/formcontrollabel.tsx +++ b/packages/components/src/base/Form/formcontrollabel.tsx @@ -1,5 +1,5 @@ import { FormControlLabel as MuiFormControlLabel, type FormControlLabelProps } from '@mui/material'; -export function FormControlLabel(props: FormControlLabelProps) { +export function FormControlLabel(props: FormControlLabelProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Grid/grid.tsx b/packages/components/src/base/Grid/grid.tsx index e69de29b..db7ddce9 100644 --- a/packages/components/src/base/Grid/grid.tsx +++ b/packages/components/src/base/Grid/grid.tsx @@ -0,0 +1,5 @@ +import { Grid as MuiGrid, GridProps as MuiGridProps } from '@mui/material'; + +export function Grid(props: MuiGridProps): JSX.Element { + return ; +} diff --git a/packages/components/src/base/List/list.tsx b/packages/components/src/base/List/list.tsx index 3b3a06b3..e2a5a3d9 100644 --- a/packages/components/src/base/List/list.tsx +++ b/packages/components/src/base/List/list.tsx @@ -1,5 +1,5 @@ import { List as MuiList, type ListProps } from '@mui/material'; -export const List = (props: ListProps) => { +export function List(props: ListProps): JSX.Element { return ; -}; +} diff --git a/packages/components/src/base/Menu/menu.tsx b/packages/components/src/base/Menu/menu.tsx index 477250c6..f4a6f964 100644 --- a/packages/components/src/base/Menu/menu.tsx +++ b/packages/components/src/base/Menu/menu.tsx @@ -1,5 +1,5 @@ import { Menu as MuiMenu, type MenuProps } from '@mui/material'; -export function Menu(props: MenuProps) { +export function Menu(props: MenuProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Menu/menuitem.tsx b/packages/components/src/base/Menu/menuitem.tsx index e0ecb796..2022935f 100644 --- a/packages/components/src/base/Menu/menuitem.tsx +++ b/packages/components/src/base/Menu/menuitem.tsx @@ -1,5 +1,5 @@ import { MenuItem as MuiMenuItem, type MenuItemProps } from '@mui/material'; -export function MenuItem(props: MenuItemProps) { +export function MenuItem(props: MenuItemProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Paper/paper.tsx b/packages/components/src/base/Paper/paper.tsx index 7040714d..8b34d70a 100644 --- a/packages/components/src/base/Paper/paper.tsx +++ b/packages/components/src/base/Paper/paper.tsx @@ -1,5 +1,5 @@ import { Paper as MuiPaper, type PaperProps } from '@mui/material'; -export function Paper(props: PaperProps) { +export function Paper(props: PaperProps): JSX.Element { return {props.children}; } diff --git a/packages/components/src/base/Popper/popper.tsx b/packages/components/src/base/Popper/popper.tsx index 3f4d1a56..b5c78cf5 100644 --- a/packages/components/src/base/Popper/popper.tsx +++ b/packages/components/src/base/Popper/popper.tsx @@ -1,5 +1,5 @@ import { Popper as MuiPopper, type PopperProps } from '@mui/material'; -export function Popper(props: PopperProps) { +export function Popper(props: PopperProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Radio/radiogroup.tsx b/packages/components/src/base/Radio/radiogroup.tsx index e0ec4dfd..32d332de 100644 --- a/packages/components/src/base/Radio/radiogroup.tsx +++ b/packages/components/src/base/Radio/radiogroup.tsx @@ -1,5 +1,5 @@ import { RadioGroup as MuiRadioGroup, type RadioGroupProps } from '@mui/material'; -export function RadioGroup(props: RadioGroupProps) { +export function RadioGroup(props: RadioGroupProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Select/select.tsx b/packages/components/src/base/Select/select.tsx index 3a1285e9..826969a6 100644 --- a/packages/components/src/base/Select/select.tsx +++ b/packages/components/src/base/Select/select.tsx @@ -1,5 +1,5 @@ import { Select as MuiSelect, type SelectProps } from '@mui/material'; -export const Select = (props: SelectProps) => { +export function Select(props: SelectProps): JSX.Element { return ; -}; +} diff --git a/packages/components/src/base/Slide/slide.tsx b/packages/components/src/base/Slide/slide.tsx index e41409a9..3b2165cb 100644 --- a/packages/components/src/base/Slide/slide.tsx +++ b/packages/components/src/base/Slide/slide.tsx @@ -1,5 +1,5 @@ import { Slide as MuiSlide, type SlideProps } from '@mui/material'; -export function Slide(props: SlideProps) { +export function Slide(props: SlideProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Stack/stack.tsx b/packages/components/src/base/Stack/stack.tsx index 86a48962..3b16139f 100644 --- a/packages/components/src/base/Stack/stack.tsx +++ b/packages/components/src/base/Stack/stack.tsx @@ -1,5 +1,5 @@ import { Stack as MuiStack, type StackProps } from '@mui/material'; -export function Stack(props: StackProps) { +export function Stack(props: StackProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Switch/switch.tsx b/packages/components/src/base/Switch/switch.tsx index 8b15f8c5..142187bd 100644 --- a/packages/components/src/base/Switch/switch.tsx +++ b/packages/components/src/base/Switch/switch.tsx @@ -1,5 +1,5 @@ import { Switch as MuiSwitch, type SwitchProps } from '@mui/material'; -export const Switch = (props: SwitchProps) => { +export function Switch(props: SwitchProps): JSX.Element { return ; -}; +} diff --git a/packages/components/src/base/Table/table.tsx b/packages/components/src/base/Table/table.tsx index f957d2e9..bb5a72e0 100644 --- a/packages/components/src/base/Table/table.tsx +++ b/packages/components/src/base/Table/table.tsx @@ -1,5 +1,5 @@ import { Table as MuiTable, type TableProps } from '@mui/material'; -export const Table = (props: TableProps) => { +export function Table(props: TableProps): JSX.Element { return ; -}; +} diff --git a/packages/components/src/base/Tabs/tab.tsx b/packages/components/src/base/Tabs/tab.tsx index 898acb39..178eb24e 100644 --- a/packages/components/src/base/Tabs/tab.tsx +++ b/packages/components/src/base/Tabs/tab.tsx @@ -1,5 +1,5 @@ import { Tab as MuiTab, type TabProps } from '@mui/material'; -export function Tab(props: TabProps) { +export function Tab(props: TabProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Tabs/tabs.tsx b/packages/components/src/base/Tabs/tabs.tsx index 73860255..aa43e81f 100644 --- a/packages/components/src/base/Tabs/tabs.tsx +++ b/packages/components/src/base/Tabs/tabs.tsx @@ -1,5 +1,5 @@ import { Tabs as MuiTabs, type TabsProps } from '@mui/material'; -export function Tabs(props: TabsProps) { +export function Tabs(props: TabsProps): JSX.Element { return ; } diff --git a/packages/components/src/base/ToggleButton/togglebutton.tsx b/packages/components/src/base/ToggleButton/togglebutton.tsx index eaec8d47..9e9295bd 100644 --- a/packages/components/src/base/ToggleButton/togglebutton.tsx +++ b/packages/components/src/base/ToggleButton/togglebutton.tsx @@ -1,5 +1,5 @@ import { ToggleButton as MuiToggleButton, type ToggleButtonProps } from '@mui/material'; -export function ToggleButton(props: ToggleButtonProps) { +export function ToggleButton(props: ToggleButtonProps): JSX.Element { return ; } diff --git a/packages/components/src/base/ToggleButton/togglebuttongroup.tsx b/packages/components/src/base/ToggleButton/togglebuttongroup.tsx index f6d97fd3..149ca4cc 100644 --- a/packages/components/src/base/ToggleButton/togglebuttongroup.tsx +++ b/packages/components/src/base/ToggleButton/togglebuttongroup.tsx @@ -3,6 +3,6 @@ import { type ToggleButtonGroupProps } from '@mui/material'; -export function ToggleButtonGroup(props: ToggleButtonGroupProps) { +export function ToggleButtonGroup(props: ToggleButtonGroupProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Toolbar/toolbar.tsx b/packages/components/src/base/Toolbar/toolbar.tsx index 6ac73612..d0e6680d 100644 --- a/packages/components/src/base/Toolbar/toolbar.tsx +++ b/packages/components/src/base/Toolbar/toolbar.tsx @@ -1,5 +1,5 @@ import { Toolbar as MuiToolbar, type ToolbarProps } from '@mui/material'; -export function Toolbar(props: ToolbarProps) { +export function Toolbar(props: ToolbarProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Tooltip/tooltip.tsx b/packages/components/src/base/Tooltip/tooltip.tsx index a4daeae5..616f6563 100644 --- a/packages/components/src/base/Tooltip/tooltip.tsx +++ b/packages/components/src/base/Tooltip/tooltip.tsx @@ -1,5 +1,5 @@ import { Tooltip as MuiTooltip, type TooltipProps } from '@mui/material'; -export function Tooltip(props: TooltipProps) { +export function Tooltip(props: TooltipProps): JSX.Element { return ; } diff --git a/packages/components/src/base/Typography/typography.tsx b/packages/components/src/base/Typography/typography.tsx index 91d351e9..095a28e1 100644 --- a/packages/components/src/base/Typography/typography.tsx +++ b/packages/components/src/base/Typography/typography.tsx @@ -1,5 +1,5 @@ import { Typography as MuiTypography, type TypographyProps } from '@mui/material'; -export function Typography(props: TypographyProps) { +export function Typography(props: TypographyProps): JSX.Element { return ; } diff --git a/packages/components/src/custom/ChartDialog.tsx b/packages/components/src/custom/ChartDialog.tsx index 17b195d6..58670ef9 100644 --- a/packages/components/src/custom/ChartDialog.tsx +++ b/packages/components/src/custom/ChartDialog.tsx @@ -1,15 +1,19 @@ -import { FC, ReactNode } from 'react'; import { DialogActions, DialogContent, DialogContentText } from '../base/Dialog'; import { StyledDialog, StyledDialogTitle } from './Dialog'; interface MesheryChartDialogProps { open: boolean; - content: ReactNode; + content: React.ReactNode; title: string; - actions?: ReactNode; + actions?: React.ReactNode; } -const MesheryChartDialog: FC = ({ open, content, title, actions }) => { +function MesheryChartDialog({ + open, + content, + title, + actions +}: MesheryChartDialogProps): JSX.Element { return ( {title} @@ -19,6 +23,6 @@ const MesheryChartDialog: FC = ({ open, content, title, {actions} ); -}; +} export { MesheryChartDialog as StyledChartDialog }; diff --git a/packages/components/src/custom/Dialog/StyledDialog.tsx b/packages/components/src/custom/Dialog/StyledDialog.tsx index 4a8818d7..94da469a 100644 --- a/packages/components/src/custom/Dialog/StyledDialog.tsx +++ b/packages/components/src/custom/Dialog/StyledDialog.tsx @@ -1,5 +1,4 @@ import { type DialogProps as MuiDialogProps } from '@mui/material'; -import { FC } from 'react'; import { Dialog, DialogTitle } from '../../base/Dialog'; type DialogProps = { @@ -8,7 +7,7 @@ type DialogProps = { title?: string; } & Omit; -const MesheryDialog: FC = ({ open, onClose, children, title, ...props }) => { +function MesheryDialog({ open, onClose, children, title, ...props }: DialogProps): JSX.Element { return ( = ({ open, onClose, children, title, ...pro {children} ); -}; +} export { MesheryDialog as StyledDialog }; diff --git a/packages/components/src/custom/Dialog/StyledDialogActions.tsx b/packages/components/src/custom/Dialog/StyledDialogActions.tsx index 1eb0903b..2e2ef004 100644 --- a/packages/components/src/custom/Dialog/StyledDialogActions.tsx +++ b/packages/components/src/custom/Dialog/StyledDialogActions.tsx @@ -1,12 +1,11 @@ -import { FC, ReactNode } from 'react'; import { DialogActions } from '../../base/Dialog'; interface DialogActionsProps { - children: ReactNode; + children: React.ReactNode; } -const MesheryDialogActions: FC = ({ children, ...props }) => { +function MesheryDialogActions({ children, ...props }: DialogActionsProps): JSX.Element { return {children}; -}; +} export { MesheryDialogActions as StyledDialogActions }; diff --git a/packages/components/src/custom/Dialog/StyledDialogContent.tsx b/packages/components/src/custom/Dialog/StyledDialogContent.tsx index cc75ced4..9c4a91fe 100644 --- a/packages/components/src/custom/Dialog/StyledDialogContent.tsx +++ b/packages/components/src/custom/Dialog/StyledDialogContent.tsx @@ -1,12 +1,11 @@ -import { FC, ReactNode } from 'react'; import { DialogContent } from '../../base/Dialog'; interface DialogContentProps { - children: ReactNode; + children: React.ReactNode; } -const MesheryDialogContent: FC = ({ children, ...props }) => { +function MesheryDialogContent({ children, ...props }: DialogContentProps): JSX.Element { return {children}; -}; +} export { MesheryDialogContent as StyledDialogContent }; diff --git a/packages/components/src/custom/Dialog/StyledDialogTitle.tsx b/packages/components/src/custom/Dialog/StyledDialogTitle.tsx index 173cb58b..dace567d 100644 --- a/packages/components/src/custom/Dialog/StyledDialogTitle.tsx +++ b/packages/components/src/custom/Dialog/StyledDialogTitle.tsx @@ -1,12 +1,11 @@ -import { FC, ReactNode } from 'react'; import { DialogTitle } from '../../base/Dialog'; import { Typography } from '../../base/Typography'; interface DialogTitleProps { - children: ReactNode; + children: React.ReactNode; } -const MesheryDialogTitle: FC = ({ children, ...props }) => { +function MesheryDialogTitle({ children, ...props }: DialogTitleProps): JSX.Element { return ( = ({ children, ...props }) => { ); -}; +} export { MesheryDialogTitle as StyledDialogTitle }; diff --git a/packages/components/src/custom/ErrorBoundary.tsx b/packages/components/src/custom/ErrorBoundary.tsx index 29f78b7c..188455c1 100644 --- a/packages/components/src/custom/ErrorBoundary.tsx +++ b/packages/components/src/custom/ErrorBoundary.tsx @@ -1,12 +1,11 @@ -import { Button } from '@mui/material'; -import React, { ErrorInfo, ReactNode, type ComponentType, type FC } from 'react'; import { ErrorBoundaryProps, FallbackProps, ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary'; +import { Button } from '../base/Button'; -const Fallback: React.ComponentType = ({ error, resetErrorBoundary }) => { +const Fallback: React.FC = ({ error, resetErrorBoundary }) => { if (error instanceof Error) { // Check if error is an instance of Error return ( @@ -41,21 +40,22 @@ const Fallback: React.ComponentType = ({ error, resetErrorBoundar } }; -const reportError = (error: Error, info: ErrorInfo) => { +const reportError = (error: Error, info: React.ErrorInfo) => { // This is where you'd send the error to Sentry,etc console.log('Error Caught Inside Boundary --reportError', error, 'Info', info); }; -export const ErrorBoundary: FC = ({ children, ...props }) => { +export const ErrorBoundary: React.FC = ({ children, ...props }) => { return ( {children} ); }; + // export const withErrorBoundary =

( - Component: ComponentType

, + Component: React.ComponentType

, errorHandlingProps: ErrorBoundaryProps | null ) => { const WrappedWithErrorBoundary = (props: P) => ( @@ -68,7 +68,7 @@ export const withErrorBoundary =

( }; interface Props { - children: ReactNode; + children: React.ReactNode; } export const withSuppressedErrorBoundary =

( diff --git a/packages/components/src/custom/Helpers/CondtionalTooltip/tooltip-for-desc.tsx b/packages/components/src/custom/Helpers/CondtionalTooltip/tooltip-for-desc.tsx index b7f7e520..a63e122c 100644 --- a/packages/components/src/custom/Helpers/CondtionalTooltip/tooltip-for-desc.tsx +++ b/packages/components/src/custom/Helpers/CondtionalTooltip/tooltip-for-desc.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Tooltip } from '../../../base/Tooltip'; interface ConditionalTooltipProps { @@ -7,13 +6,29 @@ interface ConditionalTooltipProps { // You can add more prop types here as needed } -export const ConditionalTooltip: React.FC = ({ +function ConditionalTooltip({ value, maxLength, ...restProps -}) => { - return value.length > maxLength ? ( - +}: ConditionalTooltipProps): JSX.Element { + if (value.length > maxLength) { + return ( + +

+ {`${value.slice(0, maxLength)}...`} +
+ + ); + } else { + return (
= ({ }} {...restProps} > - {`${value.slice(0, maxLength)}...`} + {value}
- - ) : ( -
- {value} -
- ); -}; + ); + } +} export default ConditionalTooltip; diff --git a/packages/components/src/custom/Helpers/Dimension/windowSize.tsx b/packages/components/src/custom/Helpers/Dimension/windowSize.tsx index 8700c245..369ee96d 100644 --- a/packages/components/src/custom/Helpers/Dimension/windowSize.tsx +++ b/packages/components/src/custom/Helpers/Dimension/windowSize.tsx @@ -1,5 +1,3 @@ -import { useEffect, useState } from 'react'; - /** * Returns the width and height of the window. * @@ -19,9 +17,9 @@ function getWindowDimensions(): WindowDimensions { * @returns {WindowDimensions} { width, height } */ export function useWindowDimensions(): WindowDimensions { - const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions()); + const [windowDimensions, setWindowDimensions] = React.useState(getWindowDimensions()); - useEffect(() => { + React.useEffect(() => { let resizeTimeout: number; function handleResize() { diff --git a/packages/components/src/custom/SearchBar.tsx b/packages/components/src/custom/SearchBar.tsx index 1e18c141..da9c490c 100644 --- a/packages/components/src/custom/SearchBar.tsx +++ b/packages/components/src/custom/SearchBar.tsx @@ -1,25 +1,25 @@ -import { Fragment, type ChangeEvent, type FC, type ReactNode } from 'react'; +import React from 'react'; import { Box } from '../base/Box'; import { InputAdornment, TextField } from '../base/Input'; interface SearchBarProps { - onChange?: (event: ChangeEvent) => void; + onChange?: (event: React.ChangeEvent) => void; value?: string; width?: string; label: string; - endAdornment?: ReactNode; + endAdornment?: React.ReactNode; } -const MesherySearchBar: FC = ({ +function MesherySearchBar({ onChange, value, width, label, endAdornment, ...props -}) => { +}: SearchBarProps): JSX.Element { return ( - + = ({ }} /> - + ); -}; +} export { MesherySearchBar as StyledSearchBar }; diff --git a/packages/components/src/custom/Toolbar/custom-column.tsx b/packages/components/src/custom/Toolbar/custom-column.tsx index 7d1df3b1..ada6d0ab 100644 --- a/packages/components/src/custom/Toolbar/custom-column.tsx +++ b/packages/components/src/custom/Toolbar/custom-column.tsx @@ -1,5 +1,5 @@ import { ColumnIcon } from '@layer5/sistent-svg'; -import React, { useState } from 'react'; +import React from 'react'; import { IconButton } from '../../base/Button'; import { Checkbox } from '../../base/Checkbox'; import { ClickAwayListener } from '../../base/ClickAwayListener'; @@ -22,13 +22,13 @@ interface Column { label: string; } -const CustomColumnVisibilityControl: React.FC = ({ +function CustomColumnVisibilityControl({ columns, customToolsProps, style -}) => { - const [open, setOpen] = useState(false); - const [anchorEl, setAnchorEl] = useState(null); +}: CustomColumnVisibilityControlProps): JSX.Element { + const [open, setOpen] = React.useState(false); + const [anchorEl, setAnchorEl] = React.useState(null); const handleOpen = (event: React.MouseEvent) => { setAnchorEl(event.currentTarget); @@ -117,6 +117,6 @@ const CustomColumnVisibilityControl: React.FC ); -}; +} export default CustomColumnVisibilityControl; diff --git a/packages/components/src/custom/Toolbar/custom-filter.tsx b/packages/components/src/custom/Toolbar/custom-filter.tsx index edb03f36..7e69e1af 100644 --- a/packages/components/src/custom/Toolbar/custom-filter.tsx +++ b/packages/components/src/custom/Toolbar/custom-filter.tsx @@ -1,7 +1,7 @@ import { FilterIcon } from '@layer5/sistent-svg'; import InputLabel from '@mui/material/InputLabel'; import { SelectChangeEvent } from '@mui/material/Select'; -import React, { useState } from 'react'; +import React from 'react'; import { Button, IconButton } from '../../base/Button'; import { ClickAwayListener } from '../../base/ClickAwayListener'; import { MenuItem } from '../../base/Menu'; @@ -23,15 +23,15 @@ interface UniversalFilterProps { showAllOption?: boolean; } -const UniversalFilter: React.FC = ({ +function UniversalFilter({ filters, selectedFilters, setSelectedFilters, handleApplyFilter, showAllOption = true -}) => { - const [anchorEl, setAnchorEl] = useState(null); - const [open, setOpen] = useState(false); +}: UniversalFilterProps): JSX.Element { + const [anchorEl, setAnchorEl] = React.useState(null); + const [open, setOpen] = React.useState(false); const handleFilterChange = (event: React.ChangeEvent<{ value: string }>, columnName: string) => { const value = event.target.value; @@ -154,6 +154,5 @@ const UniversalFilter: React.FC = ({ ); -}; - +} export default UniversalFilter; diff --git a/packages/components/src/custom/Toolbar/custom-search.tsx b/packages/components/src/custom/Toolbar/custom-search.tsx index c95ba0b2..695d2645 100644 --- a/packages/components/src/custom/Toolbar/custom-search.tsx +++ b/packages/components/src/custom/Toolbar/custom-search.tsx @@ -1,5 +1,5 @@ import { CloseIcon, SearchIcon } from '@layer5/sistent-svg'; -import React, { useRef, useState } from 'react'; +import React from 'react'; import { IconButton } from '../../base/Button'; import { TextField } from '../../base/Input'; import { Tooltip } from '../../base/Tooltip'; @@ -13,9 +13,9 @@ interface SearchBarProps { setExpanded: (expanded: boolean) => void; } -const SearchBar: React.FC = ({ placeholder, onClear, expanded, setExpanded }) => { - const [searchText, setSearchText] = useState(''); - const searchRef = useRef(null); +function SearchBar({ placeholder, onClear, expanded, setExpanded }: SearchBarProps): JSX.Element { + const [searchText, setSearchText] = React.useState(''); + const searchRef = React.useRef(null); const handleSearchChange = (event: React.ChangeEvent): void => { setSearchText(event.target.value); @@ -43,13 +43,6 @@ const SearchBar: React.FC = ({ placeholder, onClear, expanded, s } }; - //Todo: Need a width utility function - // const width = window.innerWidth; - // let searchWidth = "200px"; - // if (width <= 360) { - // searchWidth = "100px"; - // } - return (
= ({ placeholder, onClear, expanded, s )}
); -}; +} export default SearchBar; diff --git a/packages/components/src/custom/Toolbar/index.ts b/packages/components/src/custom/Toolbar/index.ts deleted file mode 100644 index f3fca21c..00000000 --- a/packages/components/src/custom/Toolbar/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './custom-column'; -export * from './custom-filter'; -export * from './custom-search'; diff --git a/packages/components/src/custom/Toolbar/index.tsx b/packages/components/src/custom/Toolbar/index.tsx new file mode 100644 index 00000000..a05e0498 --- /dev/null +++ b/packages/components/src/custom/Toolbar/index.tsx @@ -0,0 +1,5 @@ +import CustomColumnVisibilityControl from './custom-column'; +import UniversalFilter from './custom-filter'; +import SearchBar from './custom-search'; + +export { CustomColumnVisibilityControl, SearchBar, UniversalFilter }; diff --git a/packages/components/src/custom/Tooltip.tsx b/packages/components/src/custom/Tooltip.tsx index 73f2d44a..50d5b7f2 100644 --- a/packages/components/src/custom/Tooltip.tsx +++ b/packages/components/src/custom/Tooltip.tsx @@ -1,25 +1,25 @@ import { type TooltipProps as MuiTooltipProps } from '@mui/material'; -import { type FC, type MouseEvent, type ReactNode } from 'react'; +import React from 'react'; import { Tooltip } from '../base/Tooltip'; type TooltipProps = { title: string; - onClick?: (event: MouseEvent) => void; - children: ReactNode; + onClick?: (event: React.MouseEvent) => void; + children: React.ReactNode; } & Omit; -export const MesheryTooltip: FC = ({ +function MesheryTooltip({ title, onClick, placement, children, ...props -}) => { +}: TooltipProps): JSX.Element { return ( {children} ); -}; +} export { MesheryTooltip as StyledTooltip }; diff --git a/packages/components/src/custom/index.ts b/packages/components/src/custom/index.tsx similarity index 58% rename from packages/components/src/custom/index.ts rename to packages/components/src/custom/index.tsx index 76441594..756437b9 100644 --- a/packages/components/src/custom/index.ts +++ b/packages/components/src/custom/index.tsx @@ -1,4 +1,4 @@ -import CustomColumVisiblityControl from './Toolbar/custom-column'; +import CustomColumnVisibilityControl from './Toolbar/custom-column'; import UniversalFilter from './Toolbar/custom-filter'; import SearchBar from './Toolbar/custom-search'; import { StyledTooltip } from './Tooltip'; @@ -10,7 +10,7 @@ export { StyledDialogContent, StyledDialogTitle } from './Dialog'; -export { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; +// export { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; export { StyledSearchBar } from './SearchBar'; -export { CustomColumVisiblityControl, SearchBar, StyledTooltip, UniversalFilter }; +export { CustomColumnVisibilityControl, SearchBar, StyledTooltip, UniversalFilter }; diff --git a/packages/components/src/types/react-error-boundary.d.ts b/packages/components/src/types/react-error-boundary.d.ts index b77d1faa..0d7deb7b 100644 --- a/packages/components/src/types/react-error-boundary.d.ts +++ b/packages/components/src/types/react-error-boundary.d.ts @@ -2,10 +2,8 @@ import { ErrorBoundaryPropsWithComponent, FallbackRender } from 'react-error-bou // Define the custom error boundary component declare module 'react-error-boundary' { - import { ReactNode } from 'react'; - export interface ErrorBoundaryProps { - children: ReactNode; + children: React.ReactNode; FallbackComponent?: React.ComponentType; onError?: (error: Error, info: React.ErrorInfo) => void; } diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index a3cba133..0d1b2da0 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -1,26 +1,17 @@ { - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - "typeRoots": ["./src/types"], - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} + "extends": "tsconfig/react-library.json", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "base": ["src/base/*"], + "custom": ["src/custom/*"] + }, + "declarationMap": true, + "emitDeclarationOnly": true, + "typeRoots": ["./src/types"], + "types": ["react-error-boundary"] + }, + "include": ["."], + "exclude": ["dist", "build", "node_modules", "**/*.d.ts", "tsup.config.ts"] + } + \ No newline at end of file diff --git a/packages/components/tsconfig.node.json b/packages/components/tsconfig.node.json deleted file mode 100644 index 42872c59..00000000 --- a/packages/components/tsconfig.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "skipLibCheck": true, - "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/packages/components/tsup.config.ts b/packages/components/tsup.config.ts new file mode 100644 index 00000000..b0f04325 --- /dev/null +++ b/packages/components/tsup.config.ts @@ -0,0 +1,20 @@ +import path from 'path'; +import { defineConfig } from 'tsup'; + +const env = process.env.NODE_ENV; + +export default defineConfig({ + outdir: 'dist', + entry: ['src/index.tsx'], + bundle: env === 'production', + clean: true, + dts: true, + format: ['esm', 'cjs'], + external: ['react', 'react/jsx-runtime', '@mui/material', '@emotion/react', '@emotion/styled'], + splitting: true, + minify: env === 'production', + skipNodeModulesBundle: true, + watch: env === 'development', + sourcemap: env === 'development', + tsconfig: path.resolve(__dirname, './tsconfig.json') +}); diff --git a/packages/components/vite.config.ts b/packages/components/vite.config.ts deleted file mode 100644 index 8e26837b..00000000 --- a/packages/components/vite.config.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { defineConfig } from 'vite'; -import dts from 'vite-plugin-dts'; -import tsconfigPaths from 'vite-tsconfig-paths'; -import packageJson from './package.json'; - -const env = process.env.NODE_ENV; - -const external = [ - ...Object.keys({ - ...(packageJson.dependencies || {}), - ...(packageJson.devDependencies || {}), - ...(packageJson.peerDependencies || {}) - }), - 'react', - 'react-dom', - 'react/jsx-runtime', - '@emotion/react', - '@emotion/styled', - '@mui/material', - '@layer5/sistent-svg' -]; - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [dts(), tsconfigPaths()], - build: { - lib: { - entry: 'src/index.tsx', - name: 'component', - fileName: 'index' - }, - rollupOptions: { - input: 'src/index.tsx', - output: [ - { - dir: 'dist', - format: 'es', - entryFileNames: 'index.es.js', - exports: 'auto' - }, - { - dir: 'dist', - format: 'cjs', - entryFileNames: 'index.cjs.js', - exports: 'auto' - } - ], - external, - treeshake: env === 'production', - onwarn(warning, warn) { - if (warning.code === 'MODULE_LEVEL_DIRECTIVE') { - return; - } - warn(warning); - } - }, - minify: env === 'production' - }, - optimizeDeps: { - include: ['react'] - }, - server: { - open: true, - hmr: env === 'development' - } -}); diff --git a/yarn.lock b/yarn.lock index 2b83354d..e88c10d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -387,7 +387,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.3, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.7, @babel/parser@npm:^7.23.0": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.13.16, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.7, @babel/parser@npm:^7.23.0": version: 7.23.0 resolution: "@babel/parser@npm:7.23.0" bin: @@ -2425,22 +2425,26 @@ __metadata: eslint: ^8.45.0 eslint-plugin-react: ^7.33.2 mui-datatables: ^4.3.0 - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 react-error-boundary: ^4.0.11 + tsconfig: "workspace:^" + tsup: ^7.2.0 typescript: ^5.0.2 - vite: ^4.5.0 - vite-plugin-dts: ^3.5.3 - vite-tsconfig-paths: ^4.2.1 peerDependencies: "@emotion/react": "*" "@emotion/styled": "*" "@mui/material": "*" "@types/mui-datatables": "*" mui-datatables: "*" - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 + react: ">=17" + react-dom: ">=17" react-error-boundary: "*" + dependenciesMeta: + react: + optional: true + react-dom: + optional: true peerDependenciesMeta: "@emotion/react": optional: true @@ -2452,6 +2456,8 @@ __metadata: optional: true react: optional: true + react-dom: + optional: true languageName: unknown linkType: soft @@ -2586,58 +2592,6 @@ __metadata: languageName: node linkType: hard -"@microsoft/api-extractor-model@npm:7.28.1": - version: 7.28.1 - resolution: "@microsoft/api-extractor-model@npm:7.28.1" - dependencies: - "@microsoft/tsdoc": 0.14.2 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.60.1 - checksum: 65e675c20213e48654f0b08290da1ae8feccfaa0fe89e8a6283346828065d4a6f0326453b18b9d5b39ba6b725308d18c74758939b8dbd07399cf766a447ec84d - languageName: node - linkType: hard - -"@microsoft/api-extractor@npm:^7.36.4": - version: 7.37.1 - resolution: "@microsoft/api-extractor@npm:7.37.1" - dependencies: - "@microsoft/api-extractor-model": 7.28.1 - "@microsoft/tsdoc": 0.14.2 - "@microsoft/tsdoc-config": ~0.16.1 - "@rushstack/node-core-library": 3.60.1 - "@rushstack/rig-package": 0.5.1 - "@rushstack/ts-command-line": 4.16.1 - colors: ~1.2.1 - lodash: ~4.17.15 - resolve: ~1.22.1 - semver: ~7.5.4 - source-map: ~0.6.1 - typescript: ~5.0.4 - bin: - api-extractor: bin/api-extractor - checksum: fb1b0760af6bd25d7cce756b0ada308e80437beff7d2037cb49f43b7d011694fb77f69ec5985eed05e103f312f8d819e0a53393470185f0e09b61819f8f0e3db - languageName: node - linkType: hard - -"@microsoft/tsdoc-config@npm:~0.16.1": - version: 0.16.2 - resolution: "@microsoft/tsdoc-config@npm:0.16.2" - dependencies: - "@microsoft/tsdoc": 0.14.2 - ajv: ~6.12.6 - jju: ~1.4.0 - resolve: ~1.19.0 - checksum: 12b0d703154076bcaac75ca42e804e4fc292672396441e54346d7eadd0d6b57f90980eda2b1bab89b224af86da34a2389f9054002e282011e795ca5919a4386f - languageName: node - linkType: hard - -"@microsoft/tsdoc@npm:0.14.2": - version: 0.14.2 - resolution: "@microsoft/tsdoc@npm:0.14.2" - checksum: b167c89e916ba73ee20b9c9d5dba6aa3a0de25ed3d50050e8a344dca7cd43cb2e1059bd515c820369b6e708901dd3fda476a42bc643ca74a35671ce77f724a3a - languageName: node - linkType: hard - "@mswjs/cookies@npm:^0.2.2": version: 0.2.2 resolution: "@mswjs/cookies@npm:0.2.2" @@ -4049,48 +4003,6 @@ __metadata: languageName: node linkType: hard -"@rushstack/node-core-library@npm:3.60.1": - version: 3.60.1 - resolution: "@rushstack/node-core-library@npm:3.60.1" - dependencies: - colors: ~1.2.1 - fs-extra: ~7.0.1 - import-lazy: ~4.0.0 - jju: ~1.4.0 - resolve: ~1.22.1 - semver: ~7.5.4 - z-schema: ~5.0.2 - peerDependencies: - "@types/node": "*" - peerDependenciesMeta: - "@types/node": - optional: true - checksum: 1e18d74cea169c240fb8e68ec06c42060f16d927178ffac705cce796e7d5c27efb4d4b20c162f62947a7fc92b49100acb1fd6caa223918c0c92b3e349a00f7d5 - languageName: node - linkType: hard - -"@rushstack/rig-package@npm:0.5.1": - version: 0.5.1 - resolution: "@rushstack/rig-package@npm:0.5.1" - dependencies: - resolve: ~1.22.1 - strip-json-comments: ~3.1.1 - checksum: 2d45af13568590cc7f6396b7a075fa27f9676bc04deb39a3867a6f912d43cad45481d8d44482ff6a49c7bd9d428499c2701032602a8241740fc10b19c45dec0f - languageName: node - linkType: hard - -"@rushstack/ts-command-line@npm:4.16.1": - version: 4.16.1 - resolution: "@rushstack/ts-command-line@npm:4.16.1" - dependencies: - "@types/argparse": 1.0.38 - argparse: ~1.0.9 - colors: ~1.2.1 - string-argv: ~0.3.1 - checksum: f8309a274bdc9d9c87258f5f56b3905b8467319c87cdc757d98bf582b7c4a6925b389bce0ce4125a625a402335f195668dc55547b754f0e9a5d0014154c32d2d - languageName: node - linkType: hard - "@sigstore/bundle@npm:^1.1.0": version: 1.1.0 resolution: "@sigstore/bundle@npm:1.1.0" @@ -5351,13 +5263,6 @@ __metadata: languageName: node linkType: hard -"@types/argparse@npm:1.0.38": - version: 1.0.38 - resolution: "@types/argparse@npm:1.0.38" - checksum: 26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb - languageName: node - linkType: hard - "@types/aria-query@npm:^5.0.1": version: 5.0.2 resolution: "@types/aria-query@npm:5.0.2" @@ -6110,102 +6015,6 @@ __metadata: languageName: node linkType: hard -"@volar/language-core@npm:1.10.1, @volar/language-core@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/language-core@npm:1.10.1" - dependencies: - "@volar/source-map": 1.10.1 - checksum: ff6b0f6d50fc567fcd20a4bf7459cb372735149e0bb85e3d0bc202e158ca5dada3b29d2c43bffb59a0a40e8e67932530eacfbdef209bfd12c63d354220e660e4 - languageName: node - linkType: hard - -"@volar/source-map@npm:1.10.1, @volar/source-map@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/source-map@npm:1.10.1" - dependencies: - muggle-string: ^0.3.1 - checksum: a6465f72b026f70ee388d1a01665cf6a35809c1ff9ce9d837805ff2da1156885e62c9541149e4a95c64f13315501a248116a441c0878ed10b6869aecc9853359 - languageName: node - linkType: hard - -"@volar/typescript@npm:~1.10.0": - version: 1.10.1 - resolution: "@volar/typescript@npm:1.10.1" - dependencies: - "@volar/language-core": 1.10.1 - checksum: 337d1f490c008994f2e09168d52f0f45dfa4b00dfa1dd90353ce56f7f5f4c605f32dd62a0407fb3ca5c62578a0a181bd4d971a7d32bb2bb87b85e19e0e9125f3 - languageName: node - linkType: hard - -"@vue/compiler-core@npm:3.3.4": - version: 3.3.4 - resolution: "@vue/compiler-core@npm:3.3.4" - dependencies: - "@babel/parser": ^7.21.3 - "@vue/shared": 3.3.4 - estree-walker: ^2.0.2 - source-map-js: ^1.0.2 - checksum: 5437942ea6575b316c9cd84f4f128a44939713da8b6958060e152c599e6d771d5db056c398d7574ee706ff8092e0d99ac4f14e7eef8712a8dd923d2323201b9e - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:^3.3.0": - version: 3.3.4 - resolution: "@vue/compiler-dom@npm:3.3.4" - dependencies: - "@vue/compiler-core": 3.3.4 - "@vue/shared": 3.3.4 - checksum: 1c2ac0c89de8eef7be1c568d57504e6245adaaec40c2c4d9717bc231ca10bf682d918a3b358d24c786eeaf8e0d7eb8a65f57d9044775a304783fde1d069a1896 - languageName: node - linkType: hard - -"@vue/language-core@npm:1.8.15, @vue/language-core@npm:^1.8.8": - version: 1.8.15 - resolution: "@vue/language-core@npm:1.8.15" - dependencies: - "@volar/language-core": ~1.10.0 - "@volar/source-map": ~1.10.0 - "@vue/compiler-dom": ^3.3.0 - "@vue/reactivity": ^3.3.0 - "@vue/shared": ^3.3.0 - minimatch: ^9.0.0 - muggle-string: ^0.3.1 - vue-template-compiler: ^2.7.14 - peerDependencies: - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 78bf328c07205569620255ece07ed983c8fd8bdaa0c5c0711546a43955fd09004a680193a3922c88e1821125ac1b502969724ae48d40848fa24bef155e8e1a13 - languageName: node - linkType: hard - -"@vue/reactivity@npm:^3.3.0": - version: 3.3.4 - resolution: "@vue/reactivity@npm:3.3.4" - dependencies: - "@vue/shared": 3.3.4 - checksum: 81c3d0c587d23656a57a7a31afb51357274f6512b51baffc67cda183b2361a7e65e646029c26a8bc28587f26b65bba808dcd93cdd3bacab48d2b99d11ad0ec97 - languageName: node - linkType: hard - -"@vue/shared@npm:3.3.4, @vue/shared@npm:^3.3.0": - version: 3.3.4 - resolution: "@vue/shared@npm:3.3.4" - checksum: 12fe53ff816bfa29ea53f89212067a86512c626b8d30149ff28b36705820f6150e1fb4e4e46897ad9eddb1d1cfc02d8941053939910eed69a905f7a5509baabe - languageName: node - linkType: hard - -"@vue/typescript@npm:1.8.15": - version: 1.8.15 - resolution: "@vue/typescript@npm:1.8.15" - dependencies: - "@volar/typescript": ~1.10.0 - "@vue/language-core": 1.8.15 - checksum: 59069d8788563a9ab721ec37336b4908dd65bcba1eac1701bb772965a60e39a775976887e124f427f0eb62ae31779f289eb4ae134c3c4900e472c461d7df8af2 - languageName: node - linkType: hard - "@xmldom/xmldom@npm:^0.8.3": version: 0.8.10 resolution: "@xmldom/xmldom@npm:0.8.10" @@ -6420,7 +6229,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.4, ajv@npm:~6.12.6": +"ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -6563,7 +6372,7 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7, argparse@npm:~1.0.9": +"argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" dependencies: @@ -7476,13 +7285,6 @@ __metadata: languageName: node linkType: hard -"colors@npm:~1.2.1": - version: 1.2.5 - resolution: "colors@npm:1.2.5" - checksum: b6e23de735f68b72d5cdf6fd854ca43d1b66d82dcf54bda0b788083b910164a040f2c4edf23c670d36a7a2d8f1b7d6e62e3292703e4642691e6ccaa1c62d8f74 - languageName: node - linkType: hard - "columnify@npm:1.6.0": version: 1.6.0 resolution: "columnify@npm:1.6.0" @@ -7530,13 +7332,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^9.4.1": - version: 9.5.0 - resolution: "commander@npm:9.5.0" - checksum: c7a3e27aa59e913b54a1bafd366b88650bc41d6651f0cbe258d4ff09d43d6a7394232a4dadd0bf518b3e696fdf595db1028a0d82c785b88bd61f8a440cecfade - languageName: node - linkType: hard - "commitizen@npm:^4.0.3": version: 4.3.0 resolution: "commitizen@npm:4.3.0" @@ -7958,13 +7753,6 @@ __metadata: languageName: node linkType: hard -"de-indent@npm:^1.0.2": - version: 1.0.2 - resolution: "de-indent@npm:1.0.2" - checksum: 8deacc0f4a397a4414a0fc4d0034d2b7782e7cb4eaf34943ea47754e08eccf309a0e71fa6f56cc48de429ede999a42d6b4bca761bf91683be0095422dbf24611 - languageName: node - linkType: hard - "debug@npm:2.6.9, debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" @@ -9503,17 +9291,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:~7.0.1": - version: 7.0.1 - resolution: "fs-extra@npm:7.0.1" - dependencies: - graceful-fs: ^4.1.2 - jsonfile: ^4.0.0 - universalify: ^0.1.0 - checksum: 141b9dccb23b66a66cefdd81f4cda959ff89282b1d721b98cea19ba08db3dcbe6f862f28841f3cf24bb299e0b7e6c42303908f65093cb7e201708e86ea5a8dcf - languageName: node - linkType: hard - "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -9984,13 +9761,6 @@ __metadata: languageName: node linkType: hard -"globrex@npm:^0.1.2": - version: 0.1.2 - resolution: "globrex@npm:0.1.2" - checksum: adca162494a176ce9ecf4dd232f7b802956bb1966b37f60c15e49d2e7d961b66c60826366dc2649093cad5a0d69970cfa8875bd1695b5a1a2f33dcd2aa88da3c - languageName: node - linkType: hard - "gopd@npm:^1.0.1": version: 1.0.1 resolution: "gopd@npm:1.0.1" @@ -10131,15 +9901,6 @@ __metadata: languageName: node linkType: hard -"he@npm:^1.2.0": - version: 1.2.0 - resolution: "he@npm:1.2.0" - bin: - he: bin/he - checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7 - languageName: node - linkType: hard - "headers-polyfill@npm:3.2.5": version: 3.2.5 resolution: "headers-polyfill@npm:3.2.5" @@ -10379,13 +10140,6 @@ __metadata: languageName: node linkType: hard -"import-lazy@npm:~4.0.0": - version: 4.0.0 - resolution: "import-lazy@npm:4.0.0" - checksum: 22f5e51702134aef78890156738454f620e5fe7044b204ebc057c614888a1dd6fdf2ede0fdcca44d5c173fd64f65c985f19a51775b06967ef58cc3d26898df07 - languageName: node - linkType: hard - "import-local@npm:3.1.0": version: 3.1.0 resolution: "import-local@npm:3.1.0" @@ -10621,7 +10375,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.1.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": version: 2.13.0 resolution: "is-core-module@npm:2.13.0" dependencies: @@ -11195,13 +10949,6 @@ __metadata: languageName: node linkType: hard -"jju@npm:~1.4.0": - version: 1.4.0 - resolution: "jju@npm:1.4.0" - checksum: 3790481bd2b7827dd6336e6e3dc2dcc6d425679ba7ebde7b679f61dceb4457ea0cda330972494de608571f4973c6dfb5f70fab6f3c5037dbab19ac449a60424f - languageName: node - linkType: hard - "joycon@npm:^3.0.1": version: 3.1.1 resolution: "joycon@npm:3.1.1" @@ -11367,18 +11114,6 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: ^4.1.6 - dependenciesMeta: - graceful-fs: - optional: true - checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e - languageName: node - linkType: hard - "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -11434,13 +11169,6 @@ __metadata: languageName: node linkType: hard -"kolorist@npm:^1.8.0": - version: 1.8.0 - resolution: "kolorist@npm:1.8.0" - checksum: b056de671acc8a17f1e78d6d46c47dae3e06481eabc9fed213dd9079a7454fd3a7ea1226ec718df81c9208877f7475d038ac27a400958fec278d975839e33643 - languageName: node - linkType: hard - "lazy-universal-dotenv@npm:^4.0.0": version: 4.0.0 resolution: "lazy-universal-dotenv@npm:4.0.0" @@ -11884,7 +11612,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:~4.17.15": +"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -12524,13 +12252,6 @@ __metadata: languageName: node linkType: hard -"muggle-string@npm:^0.3.1": - version: 0.3.1 - resolution: "muggle-string@npm:0.3.1" - checksum: f2357f906e0160b7df0179c77838cf859f3ca23cb74eca7c043b9fc9e1e416d91497c80fbe2f3c9aeb003c14ad15857fc4e94f1631e8a6695b07e4135626d305 - languageName: node - linkType: hard - "mui-datatables@npm:^4.3.0": version: 4.3.0 resolution: "mui-datatables@npm:4.3.0" @@ -13556,7 +13277,7 @@ __metadata: languageName: node linkType: hard -"path-parse@npm:^1.0.6, path-parse@npm:^1.0.7": +"path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a @@ -14832,7 +14553,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.19.0, resolve@npm:~1.22.1": +"resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.17.0, resolve@npm:^1.19.0": version: 1.22.6 resolution: "resolve@npm:1.22.6" dependencies: @@ -14858,17 +14579,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:~1.19.0": - version: 1.19.0 - resolution: "resolve@npm:1.19.0" - dependencies: - is-core-module: ^2.1.0 - path-parse: ^1.0.6 - checksum: a05b356e47b85ad3613d9e2a39a824f3c27f4fcad9c9ff6c7cc71a2e314c5904a90ab37481ad0069d03cab9eaaac6eb68aca1bc3355fdb05f1045cd50e2aacea - languageName: node - linkType: hard - -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@~1.22.1#~builtin": +"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.19.0#~builtin": version: 1.22.6 resolution: "resolve@patch:resolve@npm%3A1.22.6#~builtin::version=1.22.6&hash=c3c19d" dependencies: @@ -14894,16 +14605,6 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@~1.19.0#~builtin": - version: 1.19.0 - resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=c3c19d" - dependencies: - is-core-module: ^2.1.0 - path-parse: ^1.0.6 - checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9 - languageName: node - linkType: hard - "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -15142,7 +14843,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.5.4, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:~7.5.4": +"semver@npm:7.5.4, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -15640,7 +15341,7 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:0.3.2, string-argv@npm:~0.3.1": +"string-argv@npm:0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" checksum: 8703ad3f3db0b2641ed2adbb15cf24d3945070d9a751f9e74a924966db9f325ac755169007233e8985a39a6a292f14d4fee20482989b89b96e473c4221508a0f @@ -15792,7 +15493,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -16232,20 +15933,6 @@ __metadata: languageName: node linkType: hard -"tsconfck@npm:^2.1.0": - version: 2.1.2 - resolution: "tsconfck@npm:2.1.2" - peerDependencies: - typescript: ^4.3.5 || ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - bin: - tsconfck: bin/tsconfck.js - checksum: 6fd2f7de012a724f6b4bf48ae76cc7dae2b59dd5cad2dc50bac58d224d4ed7d5c43c6b26e55d3e00636f426f8b5373c996523d73b7830d05f8479a9b83282192 - languageName: node - linkType: hard - "tsconfig-paths@npm:^4.1.2": version: 4.2.0 resolution: "tsconfig-paths@npm:4.2.0" @@ -16526,16 +16213,6 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.0.4": - version: 5.0.4 - resolution: "typescript@npm:5.0.4" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 82b94da3f4604a8946da585f7d6c3025fff8410779e5bde2855ab130d05e4fd08938b9e593b6ebed165bda6ad9292b230984f10952cf82f0a0ca07bbeaa08172 - languageName: node - linkType: hard - "typescript@patch:typescript@>=3 < 6#~builtin, typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin, typescript@patch:typescript@^5.0.2#~builtin, typescript@patch:typescript@^5.2.2#~builtin": version: 5.2.2 resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" @@ -16566,16 +16243,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@~5.0.4#~builtin": - version: 5.0.4 - resolution: "typescript@patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=b5f058" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: d26b6ba97b6d163c55dbdffd9bbb4c211667ebebc743accfeb2c8c0154aace7afd097b51165a72a5bad2cf65a4612259344ff60f8e642362aa1695c760d303ac - languageName: node - linkType: hard - "uglify-js@npm:^3.1.4": version: 3.17.4 resolution: "uglify-js@npm:3.17.4" @@ -16690,13 +16357,6 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff - languageName: node - linkType: hard - "universalify@npm:^2.0.0": version: 2.0.0 resolution: "universalify@npm:2.0.0" @@ -16892,13 +16552,6 @@ __metadata: languageName: node linkType: hard -"validator@npm:^13.7.0": - version: 13.11.0 - resolution: "validator@npm:13.11.0" - checksum: d1e0c27022681420756da25bc03eb08d5f0c66fb008f8ff02ebc95812b77c6be6e03d3bd05cf80ca702e23eeb73dadd66b4b3683173ea2a0bc7cc72820bee131 - languageName: node - linkType: hard - "vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" @@ -16906,42 +16559,6 @@ __metadata: languageName: node linkType: hard -"vite-plugin-dts@npm:^3.5.3": - version: 3.6.0 - resolution: "vite-plugin-dts@npm:3.6.0" - dependencies: - "@microsoft/api-extractor": ^7.36.4 - "@rollup/pluginutils": ^5.0.2 - "@vue/language-core": ^1.8.8 - debug: ^4.3.4 - kolorist: ^1.8.0 - vue-tsc: ^1.8.8 - peerDependencies: - typescript: "*" - vite: "*" - peerDependenciesMeta: - vite: - optional: true - checksum: a19b3be8bab1169ba67bd87bc6c998ec53cc9f676b3bffd7d8aedd44f95bcd399d0c39d01930bb62fd5228c6bc8117f6dcc8e1f139240c2221402ae05b13a3b7 - languageName: node - linkType: hard - -"vite-tsconfig-paths@npm:^4.2.1": - version: 4.2.1 - resolution: "vite-tsconfig-paths@npm:4.2.1" - dependencies: - debug: ^4.1.1 - globrex: ^0.1.2 - tsconfck: ^2.1.0 - peerDependencies: - vite: "*" - peerDependenciesMeta: - vite: - optional: true - checksum: 8cfbd314eb82a9db97e193aef826e72a112ca8b98e68ef0f9cd8f8538fd5163afe67652507bae41d4aab967ab9a8b24dcf95bd0a8900d388cd6c500c5a82d3b1 - languageName: node - linkType: hard - "vite@npm:^4.5.0": version: 4.5.0 resolution: "vite@npm:4.5.0" @@ -16982,31 +16599,6 @@ __metadata: languageName: node linkType: hard -"vue-template-compiler@npm:^2.7.14": - version: 2.7.14 - resolution: "vue-template-compiler@npm:2.7.14" - dependencies: - de-indent: ^1.0.2 - he: ^1.2.0 - checksum: eba9d2eed6b7110c963bc356b47bdd11d4023d25148abb7e5f7826db2fefe7ad8a575787ee0d8fa47701d44a6f54bde475279b1319f44e1049271eb2419f93a7 - languageName: node - linkType: hard - -"vue-tsc@npm:^1.8.8": - version: 1.8.15 - resolution: "vue-tsc@npm:1.8.15" - dependencies: - "@vue/language-core": 1.8.15 - "@vue/typescript": 1.8.15 - semver: ^7.3.8 - peerDependencies: - typescript: "*" - bin: - vue-tsc: bin/vue-tsc.js - checksum: fc11349fb498ba6ced65a589f7dfd3db9f95a77308cf15c20ee7c595b634314d468d362101ee6144274556d6b891d038033d35b41dd602e623d904bd16d6b622 - languageName: node - linkType: hard - "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -17454,20 +17046,3 @@ __metadata: checksum: f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 languageName: node linkType: hard - -"z-schema@npm:~5.0.2": - version: 5.0.5 - resolution: "z-schema@npm:5.0.5" - dependencies: - commander: ^9.4.1 - lodash.get: ^4.4.2 - lodash.isequal: ^4.5.0 - validator: ^13.7.0 - dependenciesMeta: - commander: - optional: true - bin: - z-schema: bin/z-schema - checksum: 8a1d66817ae4384dc3f63311f0cccaadd95cc9640eaade5fd3fbf91aa80d6bb82fb95d9b9171fa82ac371a0155b32b7f5f77bbe84dabaca611b66f74c628f0b8 - languageName: node - linkType: hard From b9a090a15c45e1d7c4b9a7d45195352354ae4a0d Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Thu, 2 Nov 2023 22:18:17 -0500 Subject: [PATCH 2/8] Publish - @layer5/sistent-components@0.8.1-beta.7 - @layer5/sistent-svg@0.11.1-beta.2 --- packages/components/CHANGELOG.md | 6 ++++++ packages/components/package.json | 4 ++-- packages/svg/CHANGELOG.md | 6 ++++++ packages/svg/package.json | 2 +- yarn.lock | 4 ++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index bf527167..3f16779d 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.1-beta.7](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.6...@layer5/sistent-components@0.8.1-beta.7) (2023-11-03) + +### Bug Fixes + +- **components:** refactor components ([5b90831](https://github.com/layer5io/sistent/commit/5b90831f02644bbaa16de6e59a11a3ea50f17e58)) + ## [0.8.1-beta.6](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.5...@layer5/sistent-components@0.8.1-beta.6) (2023-11-02) **Note:** Version bump only for package @layer5/sistent-components diff --git a/packages/components/package.json b/packages/components/package.json index 6b2e02e5..d3dfc17e 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-components", - "version": "0.8.1-beta.6", + "version": "0.8.1-beta.7", "description": "Reusable React Components", "type": "module", "exports": { @@ -22,7 +22,7 @@ "lint:fix": "eslint --fix" }, "dependencies": { - "@layer5/sistent-svg": "^0.11.1-beta.1" + "@layer5/sistent-svg": "^0.11.1-beta.2" }, "devDependencies": { "@emotion/react": "^11.11.1", diff --git a/packages/svg/CHANGELOG.md b/packages/svg/CHANGELOG.md index 84315ec1..4c85b116 100644 --- a/packages/svg/CHANGELOG.md +++ b/packages/svg/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.11.1-beta.2](https://github.com/layer5io/sistent/compare/@layer5/sistent-svg@0.11.1-beta.1...@layer5/sistent-svg@0.11.1-beta.2) (2023-11-03) + +### Bug Fixes + +- **svg:** change to tsup ([#220](https://github.com/layer5io/sistent/issues/220)) ([2a7ef62](https://github.com/layer5io/sistent/commit/2a7ef62a21bcc743762eb852afcb8dc8e4d6f475)) + ## [0.11.1-beta.1](https://github.com/layer5io/sistent/compare/@layer5/sistent-svg@0.11.1-beta.0...@layer5/sistent-svg@0.11.1-beta.1) (2023-11-02) ### Bug Fixes diff --git a/packages/svg/package.json b/packages/svg/package.json index 799d8c8b..d6f8ee24 100644 --- a/packages/svg/package.json +++ b/packages/svg/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-svg", - "version": "0.11.1-beta.1", + "version": "0.11.1-beta.2", "description": "SVG Icons library", "type": "module", "exports": { diff --git a/yarn.lock b/yarn.lock index e88c10d0..a3795b08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2414,7 +2414,7 @@ __metadata: dependencies: "@emotion/react": ^11.11.1 "@emotion/styled": ^11.11.0 - "@layer5/sistent-svg": ^0.11.1-beta.1 + "@layer5/sistent-svg": ^0.11.1-beta.2 "@mui/icons-material": ^5.14.12 "@mui/material": ^5.14.16 "@types/mui-datatables": ^4.3.6 @@ -2461,7 +2461,7 @@ __metadata: languageName: unknown linkType: soft -"@layer5/sistent-svg@^0.11.1-beta.1, @layer5/sistent-svg@workspace:^, @layer5/sistent-svg@workspace:packages/svg": +"@layer5/sistent-svg@^0.11.1-beta.2, @layer5/sistent-svg@workspace:^, @layer5/sistent-svg@workspace:packages/svg": version: 0.0.0-use.local resolution: "@layer5/sistent-svg@workspace:packages/svg" dependencies: From 6ea9422a8125b67d1241dd6a1c323f8830a509a3 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Fri, 3 Nov 2023 09:15:23 -0500 Subject: [PATCH 3/8] fix: remove react-error-boundary package Signed-off-by: Antonette Caldwell --- packages/components/package.json | 4 +- .../{ => ErrorBoundary}/ErrorBoundary.tsx | 38 ++++++++++--------- .../src/custom/ErrorBoundary/index.tsx | 1 + packages/components/src/custom/index.tsx | 2 +- packages/components/src/index.tsx | 1 + yarn.lock | 13 ------- 6 files changed, 25 insertions(+), 34 deletions(-) rename packages/components/src/custom/{ => ErrorBoundary}/ErrorBoundary.tsx (70%) create mode 100644 packages/components/src/custom/ErrorBoundary/index.tsx diff --git a/packages/components/package.json b/packages/components/package.json index d3dfc17e..f347cfaf 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -37,7 +37,6 @@ "eslint": "^8.45.0", "eslint-plugin-react": "^7.33.2", "mui-datatables": "^4.3.0", - "react-error-boundary": "^4.0.11", "tsconfig": "workspace:^", "tsup": "^7.2.0", "typescript": "^5.0.2" @@ -49,8 +48,7 @@ "@types/mui-datatables": "*", "mui-datatables": "*", "react": ">=17", - "react-dom": ">=17", - "react-error-boundary": "*" + "react-dom": ">=17" }, "peerDependenciesMeta": { "@emotion/react": { diff --git a/packages/components/src/custom/ErrorBoundary.tsx b/packages/components/src/custom/ErrorBoundary/ErrorBoundary.tsx similarity index 70% rename from packages/components/src/custom/ErrorBoundary.tsx rename to packages/components/src/custom/ErrorBoundary/ErrorBoundary.tsx index 188455c1..f4bf27df 100644 --- a/packages/components/src/custom/ErrorBoundary.tsx +++ b/packages/components/src/custom/ErrorBoundary/ErrorBoundary.tsx @@ -1,11 +1,13 @@ +/* import { ErrorBoundaryProps, FallbackProps, ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary'; -import { Button } from '../base/Button'; +import { Button } from '../../base/Button'; +import React from 'react'; -const Fallback: React.FC = ({ error, resetErrorBoundary }) => { +function Fallback({ error, resetErrorBoundary }: FallbackProps): JSX.Element { if (error instanceof Error) { // Check if error is an instance of Error return ( @@ -38,47 +40,49 @@ const Fallback: React.FC = ({ error, resetErrorBoundary }) => { ); } -}; +} -const reportError = (error: Error, info: React.ErrorInfo) => { - // This is where you'd send the error to Sentry,etc +function reportError(error: Error, info: React.ErrorInfo): void { + // This is where you'd send the error to Sentry, etc. console.log('Error Caught Inside Boundary --reportError', error, 'Info', info); -}; +} -export const ErrorBoundary: React.FC = ({ children, ...props }) => { +function ErrorBoundary({ children, ...props }: ErrorBoundaryProps): JSX.Element { return ( {children} ); -}; +} -// -export const withErrorBoundary =

( +function withErrorBoundary

( Component: React.ComponentType

, errorHandlingProps: ErrorBoundaryProps | null -) => { - const WrappedWithErrorBoundary = (props: P) => ( +): JSX.Element { + const WrappedWithErrorBoundary = (props: P): JSX.Element => ( ); return WrappedWithErrorBoundary; -}; +} interface Props { children: React.ReactNode; } -export const withSuppressedErrorBoundary =

( +function withSuppressedErrorBoundary

( Component: React.ComponentType

-) => { - const WrappedWithErrorBoundary: React.FC

= (props: P & Props) => ( +): JSX.Element { + const WrappedWithErrorBoundary = (props: P & Props): JSX.Element => ( null}> ); return WrappedWithErrorBoundary; -}; +} + +export { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary }; +*/ diff --git a/packages/components/src/custom/ErrorBoundary/index.tsx b/packages/components/src/custom/ErrorBoundary/index.tsx new file mode 100644 index 00000000..ffc92554 --- /dev/null +++ b/packages/components/src/custom/ErrorBoundary/index.tsx @@ -0,0 +1 @@ +// export { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; diff --git a/packages/components/src/custom/index.tsx b/packages/components/src/custom/index.tsx index 756437b9..fbf8756a 100644 --- a/packages/components/src/custom/index.tsx +++ b/packages/components/src/custom/index.tsx @@ -10,7 +10,7 @@ export { StyledDialogContent, StyledDialogTitle } from './Dialog'; -// export { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; +// import { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; export { StyledSearchBar } from './SearchBar'; export { CustomColumnVisibilityControl, SearchBar, StyledTooltip, UniversalFilter }; diff --git a/packages/components/src/index.tsx b/packages/components/src/index.tsx index 776495dc..f7d52405 100644 --- a/packages/components/src/index.tsx +++ b/packages/components/src/index.tsx @@ -32,3 +32,4 @@ export * from './custom/Toolbar'; export * from './custom/Toolbar/index'; export * from './custom/Tooltip'; export * from './custom/index'; +// export * from './custom/ErrorBoundary'; diff --git a/yarn.lock b/yarn.lock index a3795b08..fddd82ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2427,7 +2427,6 @@ __metadata: mui-datatables: ^4.3.0 react: ^17.0.0 || ^18.0.0 react-dom: ^17.0.0 || ^18.0.0 - react-error-boundary: ^4.0.11 tsconfig: "workspace:^" tsup: ^7.2.0 typescript: ^5.0.2 @@ -2439,7 +2438,6 @@ __metadata: mui-datatables: "*" react: ">=17" react-dom: ">=17" - react-error-boundary: "*" dependenciesMeta: react: optional: true @@ -13984,17 +13982,6 @@ __metadata: languageName: node linkType: hard -"react-error-boundary@npm:^4.0.11": - version: 4.0.11 - resolution: "react-error-boundary@npm:4.0.11" - dependencies: - "@babel/runtime": ^7.12.5 - peerDependencies: - react: ">=16.13.1" - checksum: b3c157fea4e8f78411e9aa0fbf5241f6907b66ede1cd8b7bb22faaeb0339ebeb3dc8e63bf90ef3f740bfa8fd994ca6edf975089cd371b664ad6c2735e7512d38 - languageName: node - linkType: hard - "react-inspector@npm:^6.0.0": version: 6.0.2 resolution: "react-inspector@npm:6.0.2" From 799b7fdcc85aa89f7ccb2e57aa5da66f6d440267 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Fri, 3 Nov 2023 09:16:05 -0500 Subject: [PATCH 4/8] Publish - @layer5/sistent-components@0.8.1-beta.8 --- packages/components/CHANGELOG.md | 6 ++++++ packages/components/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 3f16779d..57678bfa 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.1-beta.8](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.7...@layer5/sistent-components@0.8.1-beta.8) (2023-11-03) + +### Bug Fixes + +- remove react-error-boundary package ([6ea9422](https://github.com/layer5io/sistent/commit/6ea9422a8125b67d1241dd6a1c323f8830a509a3)) + ## [0.8.1-beta.7](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.6...@layer5/sistent-components@0.8.1-beta.7) (2023-11-03) ### Bug Fixes diff --git a/packages/components/package.json b/packages/components/package.json index f347cfaf..584fd958 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-components", - "version": "0.8.1-beta.7", + "version": "0.8.1-beta.8", "description": "Reusable React Components", "type": "module", "exports": { From 056f675fdbd4c964ab07f4ce06b266d7dab53112 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Sat, 4 Nov 2023 12:43:55 -0500 Subject: [PATCH 5/8] fix: redo const to function Signed-off-by: Antonette Caldwell --- packages/components/package.json | 9 +- .../components/src/base/DataTable/index.tsx | 3 - .../custom/{ => ChartDialog}/ChartDialog.tsx | 16 +-- .../src/custom/ChartDialog/index.tsx | 3 + .../src/custom/Dialog/StyledDialog.tsx | 16 ++- .../src/custom/Dialog/StyledDialogActions.tsx | 5 +- .../src/custom/Dialog/StyledDialogContent.tsx | 5 +- .../src/custom/Dialog/StyledDialogTitle.tsx | 5 +- .../components/src/custom/Dialog/index.ts | 4 - .../components/src/custom/Dialog/index.tsx | 6 + .../CondtionalTooltip/{index.ts => index.tsx} | 0 .../Helpers/Dimension/{index.ts => index.tsx} | 0 .../src/custom/{ => SearchBar}/SearchBar.tsx | 8 +- .../components/src/custom/SearchBar/index.tsx | 3 + .../src/custom/Toolbar/custom-table.tsx | 124 ++++++++++++++++++ .../components/src/custom/Toolbar/index.tsx | 3 +- .../src/custom/{ => Tooltip}/Tooltip.tsx | 14 +- .../components/src/custom/Tooltip/index.tsx | 3 + packages/components/src/custom/index.tsx | 16 ++- packages/components/src/index.tsx | 1 - .../src/types/react-error-boundary.d.ts | 3 + packages/components/tsconfig.json | 3 +- packages/components/tsup.config.ts | 2 +- 23 files changed, 195 insertions(+), 57 deletions(-) delete mode 100644 packages/components/src/base/DataTable/index.tsx rename packages/components/src/custom/{ => ChartDialog}/ChartDialog.tsx (62%) create mode 100644 packages/components/src/custom/ChartDialog/index.tsx delete mode 100644 packages/components/src/custom/Dialog/index.ts create mode 100644 packages/components/src/custom/Dialog/index.tsx rename packages/components/src/custom/Helpers/CondtionalTooltip/{index.ts => index.tsx} (100%) rename packages/components/src/custom/Helpers/Dimension/{index.ts => index.tsx} (100%) rename packages/components/src/custom/{ => SearchBar}/SearchBar.tsx (84%) create mode 100644 packages/components/src/custom/SearchBar/index.tsx create mode 100644 packages/components/src/custom/Toolbar/custom-table.tsx rename packages/components/src/custom/{ => Tooltip}/Tooltip.tsx (53%) create mode 100644 packages/components/src/custom/Tooltip/index.tsx diff --git a/packages/components/package.json b/packages/components/package.json index 584fd958..90ff5fe6 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -2,15 +2,8 @@ "name": "@layer5/sistent-components", "version": "0.8.1-beta.8", "description": "Reusable React Components", - "type": "module", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.js" - } - }, "main": "./dist/index.js", - "module": "./dist/index.js", + "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": [ "dist" diff --git a/packages/components/src/base/DataTable/index.tsx b/packages/components/src/base/DataTable/index.tsx deleted file mode 100644 index 3bc334fb..00000000 --- a/packages/components/src/base/DataTable/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import * as DataTable from 'mui-datatables'; - -export { DataTable }; diff --git a/packages/components/src/custom/ChartDialog.tsx b/packages/components/src/custom/ChartDialog/ChartDialog.tsx similarity index 62% rename from packages/components/src/custom/ChartDialog.tsx rename to packages/components/src/custom/ChartDialog/ChartDialog.tsx index 58670ef9..4681455b 100644 --- a/packages/components/src/custom/ChartDialog.tsx +++ b/packages/components/src/custom/ChartDialog/ChartDialog.tsx @@ -1,19 +1,15 @@ -import { DialogActions, DialogContent, DialogContentText } from '../base/Dialog'; -import { StyledDialog, StyledDialogTitle } from './Dialog'; +import React from 'react'; +import { DialogActions, DialogContent, DialogContentText } from '../../base/Dialog'; +import { StyledDialog, StyledDialogTitle } from '../Dialog'; -interface MesheryChartDialogProps { +interface ChartDialogProps { open: boolean; content: React.ReactNode; title: string; actions?: React.ReactNode; } -function MesheryChartDialog({ - open, - content, - title, - actions -}: MesheryChartDialogProps): JSX.Element { +function StyledChartDialog({ open, content, title, actions }: ChartDialogProps): JSX.Element { return ( {title} @@ -25,4 +21,4 @@ function MesheryChartDialog({ ); } -export { MesheryChartDialog as StyledChartDialog }; +export default StyledChartDialog; diff --git a/packages/components/src/custom/ChartDialog/index.tsx b/packages/components/src/custom/ChartDialog/index.tsx new file mode 100644 index 00000000..1c37d411 --- /dev/null +++ b/packages/components/src/custom/ChartDialog/index.tsx @@ -0,0 +1,3 @@ +import StyledChartDialog from './ChartDialog'; + +export { StyledChartDialog }; diff --git a/packages/components/src/custom/Dialog/StyledDialog.tsx b/packages/components/src/custom/Dialog/StyledDialog.tsx index 94da469a..eacc7e9b 100644 --- a/packages/components/src/custom/Dialog/StyledDialog.tsx +++ b/packages/components/src/custom/Dialog/StyledDialog.tsx @@ -1,13 +1,19 @@ -import { type DialogProps as MuiDialogProps } from '@mui/material'; +import { type DialogProps } from '@mui/material'; import { Dialog, DialogTitle } from '../../base/Dialog'; -type DialogProps = { +type StyledDialogProps = { open: boolean; fullScreen?: boolean; title?: string; -} & Omit; +} & Omit; -function MesheryDialog({ open, onClose, children, title, ...props }: DialogProps): JSX.Element { +function StyledDialog({ + open, + onClose, + children, + title, + ...props +}: StyledDialogProps): JSX.Element { return (

{children}; } -export { MesheryDialogActions as StyledDialogActions }; +export default StyledDialogActions; diff --git a/packages/components/src/custom/Dialog/StyledDialogContent.tsx b/packages/components/src/custom/Dialog/StyledDialogContent.tsx index 9c4a91fe..5c5a0b85 100644 --- a/packages/components/src/custom/Dialog/StyledDialogContent.tsx +++ b/packages/components/src/custom/Dialog/StyledDialogContent.tsx @@ -1,11 +1,12 @@ +import React from 'react'; import { DialogContent } from '../../base/Dialog'; interface DialogContentProps { children: React.ReactNode; } -function MesheryDialogContent({ children, ...props }: DialogContentProps): JSX.Element { +function StyledDialogContent({ children, ...props }: DialogContentProps): JSX.Element { return {children}; } -export { MesheryDialogContent as StyledDialogContent }; +export default StyledDialogContent; diff --git a/packages/components/src/custom/Dialog/StyledDialogTitle.tsx b/packages/components/src/custom/Dialog/StyledDialogTitle.tsx index dace567d..64e8774e 100644 --- a/packages/components/src/custom/Dialog/StyledDialogTitle.tsx +++ b/packages/components/src/custom/Dialog/StyledDialogTitle.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import { DialogTitle } from '../../base/Dialog'; import { Typography } from '../../base/Typography'; @@ -5,7 +6,7 @@ interface DialogTitleProps { children: React.ReactNode; } -function MesheryDialogTitle({ children, ...props }: DialogTitleProps): JSX.Element { +function StyledDialogTitle({ children, ...props }: DialogTitleProps): JSX.Element { return ( ) => void; @@ -10,7 +10,7 @@ interface SearchBarProps { endAdornment?: React.ReactNode; } -function MesherySearchBar({ +function StyledSearchBar({ onChange, value, width, @@ -48,4 +48,4 @@ function MesherySearchBar({ ); } -export { MesherySearchBar as StyledSearchBar }; +export default StyledSearchBar; diff --git a/packages/components/src/custom/SearchBar/index.tsx b/packages/components/src/custom/SearchBar/index.tsx new file mode 100644 index 00000000..723c3082 --- /dev/null +++ b/packages/components/src/custom/SearchBar/index.tsx @@ -0,0 +1,3 @@ +import StyledSearchBar from './SearchBar'; + +export { StyledSearchBar }; diff --git a/packages/components/src/custom/Toolbar/custom-table.tsx b/packages/components/src/custom/Toolbar/custom-table.tsx new file mode 100644 index 00000000..325b200d --- /dev/null +++ b/packages/components/src/custom/Toolbar/custom-table.tsx @@ -0,0 +1,124 @@ +import MUIDataTable from 'mui-datatables'; +import { useEffect, useState } from 'react'; + +interface Column { + name: string; + label: string; + options?: { + filter?: boolean; + sort?: boolean; + searchable?: boolean; + display?: boolean; + sortDescFirst?: boolean; + customBodyRender?: (value: string | number | boolean | object) => JSX.Element; + }; +} + +interface ResponsiveDataTableProps { + data: string[][]; + columns: Column[]; + options?: object; + tableCols?: Column[]; + updateCols?: ((columns: Column[]) => void) | undefined; + columnVisibility: Record | undefined; + theme?: object; +} + +function ResponsiveDataTable({ + data, + columns, + options = {}, + ...props +}: ResponsiveDataTableProps): JSX.Element { + const [tableCols, updateCols] = useState(columns); + const [columnVisibility, ,] = useState>({}); + + const formatDate = (date: Date): string => { + const dateOptions: Intl.DateTimeFormatOptions = { + weekday: 'short', + day: 'numeric', + month: 'long', + year: 'numeric' + }; + + return new Intl.DateTimeFormat('un-US', dateOptions).format(date); + }; + + const updatedOptions = { + ...options, + onViewColumnsChange: (column: string, action: string) => { + switch (action) { + case 'add': { + const colToAdd = columns.find((obj) => obj.name === column); + if (colToAdd) { + colToAdd.options!.display = true; + updateCols([...columns]); + } + break; + } + case 'remove': { + const colToRemove = columns.find((obj) => obj.name === column); + if (colToRemove) { + colToRemove.options!.display = false; + updateCols([...columns]); + } + break; + } + } + } + }; + + useEffect(() => { + columns?.forEach((col) => { + if (!col.options) { + col.options = {}; + } + col.options.display = columnVisibility[col.name]; + + if ( + ['updated_at', 'created_at', 'deleted_at', 'last_login_time', 'joined_at'].includes( + col.name + ) + ) { + col.options.customBodyRender = (value: string | number | boolean | object) => { + if (value === 'NA') { + return <>{value}; + } else if (typeof value === 'object' && 'Valid' in value) { + const obj = value as { Valid: boolean; Time: string | undefined }; + if (obj.Valid && obj.Time) { + const date = new Date(obj.Time); + return <>{formatDate(date)}; + } else { + return <>NA; + } + } else if (typeof value === 'string') { + const date = new Date(value); + return <>{formatDate(date)}; + } else { + return <>{value}; + } + }; + } + }); + updateCols([...columns]); + }, [columnVisibility]); + + const components = { + ExpandButton: () => '' + }; + + return ( + + ); +} + +export default ResponsiveDataTable; diff --git a/packages/components/src/custom/Toolbar/index.tsx b/packages/components/src/custom/Toolbar/index.tsx index a05e0498..03554f69 100644 --- a/packages/components/src/custom/Toolbar/index.tsx +++ b/packages/components/src/custom/Toolbar/index.tsx @@ -1,5 +1,6 @@ import CustomColumnVisibilityControl from './custom-column'; import UniversalFilter from './custom-filter'; import SearchBar from './custom-search'; +import ResponsiveDataTable from './custom-table'; -export { CustomColumnVisibilityControl, SearchBar, UniversalFilter }; +export { CustomColumnVisibilityControl, ResponsiveDataTable, SearchBar, UniversalFilter }; diff --git a/packages/components/src/custom/Tooltip.tsx b/packages/components/src/custom/Tooltip/Tooltip.tsx similarity index 53% rename from packages/components/src/custom/Tooltip.tsx rename to packages/components/src/custom/Tooltip/Tooltip.tsx index 50d5b7f2..450d2bc4 100644 --- a/packages/components/src/custom/Tooltip.tsx +++ b/packages/components/src/custom/Tooltip/Tooltip.tsx @@ -1,20 +1,20 @@ -import { type TooltipProps as MuiTooltipProps } from '@mui/material'; +import { type TooltipProps } from '@mui/material'; import React from 'react'; -import { Tooltip } from '../base/Tooltip'; +import { Tooltip } from '../../base/Tooltip'; -type TooltipProps = { +type StyledTooltipProps = { title: string; onClick?: (event: React.MouseEvent) => void; children: React.ReactNode; -} & Omit; +} & Omit; -function MesheryTooltip({ +function StyledTooltip({ title, onClick, placement, children, ...props -}: TooltipProps): JSX.Element { +}: StyledTooltipProps): JSX.Element { return ( {children} @@ -22,4 +22,4 @@ function MesheryTooltip({ ); } -export { MesheryTooltip as StyledTooltip }; +export default StyledTooltip; diff --git a/packages/components/src/custom/Tooltip/index.tsx b/packages/components/src/custom/Tooltip/index.tsx new file mode 100644 index 00000000..188b9db6 --- /dev/null +++ b/packages/components/src/custom/Tooltip/index.tsx @@ -0,0 +1,3 @@ +import StyledTooltip from './Tooltip'; + +export { StyledTooltip }; diff --git a/packages/components/src/custom/index.tsx b/packages/components/src/custom/index.tsx index fbf8756a..fe026381 100644 --- a/packages/components/src/custom/index.tsx +++ b/packages/components/src/custom/index.tsx @@ -1,16 +1,20 @@ +// import { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; +import { StyledDialog, StyledDialogActions, StyledDialogContent } from './Dialog'; import CustomColumnVisibilityControl from './Toolbar/custom-column'; import UniversalFilter from './Toolbar/custom-filter'; import SearchBar from './Toolbar/custom-search'; +import ResponsiveDataTable from './Toolbar/custom-table'; import { StyledTooltip } from './Tooltip'; export { StyledChartDialog } from './ChartDialog'; +export { StyledSearchBar } from './SearchBar'; export { + CustomColumnVisibilityControl, + ResponsiveDataTable, + SearchBar, StyledDialog, StyledDialogActions, StyledDialogContent, - StyledDialogTitle -} from './Dialog'; -// import { ErrorBoundary, withErrorBoundary, withSuppressedErrorBoundary } from './ErrorBoundary'; -export { StyledSearchBar } from './SearchBar'; - -export { CustomColumnVisibilityControl, SearchBar, StyledTooltip, UniversalFilter }; + StyledTooltip, + UniversalFilter +}; diff --git a/packages/components/src/index.tsx b/packages/components/src/index.tsx index f7d52405..05182653 100644 --- a/packages/components/src/index.tsx +++ b/packages/components/src/index.tsx @@ -7,7 +7,6 @@ export * from './base/Card'; export * from './base/Checkbox'; export * from './base/Chip'; export * from './base/ClickAwayListener'; -export * from './base/DataTable'; export * from './base/Dialog'; export * from './base/Divider'; export * from './base/Drawer'; diff --git a/packages/components/src/types/react-error-boundary.d.ts b/packages/components/src/types/react-error-boundary.d.ts index 0d7deb7b..0a34ab66 100644 --- a/packages/components/src/types/react-error-boundary.d.ts +++ b/packages/components/src/types/react-error-boundary.d.ts @@ -1,3 +1,5 @@ +/* +import React from 'react'; import { ErrorBoundaryPropsWithComponent, FallbackRender } from 'react-error-boundary'; // Define the custom error boundary component @@ -33,3 +35,4 @@ declare module 'react-error-boundary' { declare module 'react-error-boundary' { export function withSuppressedErrorBoundary(Component: React.ComponentType): React.FC; } +*/ diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index 0d1b2da0..57662d49 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -9,7 +9,8 @@ "declarationMap": true, "emitDeclarationOnly": true, "typeRoots": ["./src/types"], - "types": ["react-error-boundary"] + "types": ["react-error-boundary"], + "lib": ["ES2016", "DOM"] }, "include": ["."], "exclude": ["dist", "build", "node_modules", "**/*.d.ts", "tsup.config.ts"] diff --git a/packages/components/tsup.config.ts b/packages/components/tsup.config.ts index b0f04325..43f8acbe 100644 --- a/packages/components/tsup.config.ts +++ b/packages/components/tsup.config.ts @@ -10,7 +10,7 @@ export default defineConfig({ clean: true, dts: true, format: ['esm', 'cjs'], - external: ['react', 'react/jsx-runtime', '@mui/material', '@emotion/react', '@emotion/styled'], + external: ['react'], splitting: true, minify: env === 'production', skipNodeModulesBundle: true, From c24560d15bafc76fc2209478b7173b85c1ac1054 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Sat, 4 Nov 2023 12:44:43 -0500 Subject: [PATCH 6/8] Publish - @layer5/sistent-components@0.8.1-beta.9 --- packages/components/CHANGELOG.md | 6 ++++++ packages/components/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 57678bfa..9dc6a8d2 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.1-beta.9](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.8...@layer5/sistent-components@0.8.1-beta.9) (2023-11-04) + +### Bug Fixes + +- redo const to function ([056f675](https://github.com/layer5io/sistent/commit/056f675fdbd4c964ab07f4ce06b266d7dab53112)) + ## [0.8.1-beta.8](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.7...@layer5/sistent-components@0.8.1-beta.8) (2023-11-03) ### Bug Fixes diff --git a/packages/components/package.json b/packages/components/package.json index 90ff5fe6..673fcb96 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-components", - "version": "0.8.1-beta.8", + "version": "0.8.1-beta.9", "description": "Reusable React Components", "main": "./dist/index.js", "module": "./dist/index.mjs", From 2f56f219b5ac62b72de2a5bbac622cd1d36b8274 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Sat, 4 Nov 2023 12:58:47 -0500 Subject: [PATCH 7/8] fix(svg): remove type module Signed-off-by: Antonette Caldwell --- packages/svg/package.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/svg/package.json b/packages/svg/package.json index d6f8ee24..ea46bc08 100644 --- a/packages/svg/package.json +++ b/packages/svg/package.json @@ -2,16 +2,8 @@ "name": "@layer5/sistent-svg", "version": "0.11.1-beta.2", "description": "SVG Icons library", - "type": "module", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" - } - }, "main": "./dist/index.js", - "module": "./dist/index.js", + "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": [ "dist" @@ -46,8 +38,8 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" + "react": ">=17", + "react-dom": ">=17" }, "peerDependenciesMeta": { "react": { From 8d4ea67be602279e1ef68b42f07e4fdffed37787 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Sat, 4 Nov 2023 12:59:22 -0500 Subject: [PATCH 8/8] Publish - @layer5/sistent-components@0.8.1-beta.10 - @layer5/sistent-svg@0.11.1-beta.3 --- packages/components/CHANGELOG.md | 4 ++++ packages/components/package.json | 4 ++-- packages/svg/CHANGELOG.md | 6 ++++++ packages/svg/package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 9dc6a8d2..dce89f6a 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.1-beta.10](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.9...@layer5/sistent-components@0.8.1-beta.10) (2023-11-04) + +**Note:** Version bump only for package @layer5/sistent-components + ## [0.8.1-beta.9](https://github.com/layer5io/sistent/compare/@layer5/sistent-components@0.8.1-beta.8...@layer5/sistent-components@0.8.1-beta.9) (2023-11-04) ### Bug Fixes diff --git a/packages/components/package.json b/packages/components/package.json index 673fcb96..e8da2aba 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-components", - "version": "0.8.1-beta.9", + "version": "0.8.1-beta.10", "description": "Reusable React Components", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -15,7 +15,7 @@ "lint:fix": "eslint --fix" }, "dependencies": { - "@layer5/sistent-svg": "^0.11.1-beta.2" + "@layer5/sistent-svg": "^0.11.1-beta.3" }, "devDependencies": { "@emotion/react": "^11.11.1", diff --git a/packages/svg/CHANGELOG.md b/packages/svg/CHANGELOG.md index 4c85b116..7fc76a3f 100644 --- a/packages/svg/CHANGELOG.md +++ b/packages/svg/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.11.1-beta.3](https://github.com/layer5io/sistent/compare/@layer5/sistent-svg@0.11.1-beta.2...@layer5/sistent-svg@0.11.1-beta.3) (2023-11-04) + +### Bug Fixes + +- **svg:** remove type module ([2f56f21](https://github.com/layer5io/sistent/commit/2f56f219b5ac62b72de2a5bbac622cd1d36b8274)) + ## [0.11.1-beta.2](https://github.com/layer5io/sistent/compare/@layer5/sistent-svg@0.11.1-beta.1...@layer5/sistent-svg@0.11.1-beta.2) (2023-11-03) ### Bug Fixes diff --git a/packages/svg/package.json b/packages/svg/package.json index ea46bc08..6a9ed763 100644 --- a/packages/svg/package.json +++ b/packages/svg/package.json @@ -1,6 +1,6 @@ { "name": "@layer5/sistent-svg", - "version": "0.11.1-beta.2", + "version": "0.11.1-beta.3", "description": "SVG Icons library", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/yarn.lock b/yarn.lock index fddd82ad..e2378a82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2414,7 +2414,7 @@ __metadata: dependencies: "@emotion/react": ^11.11.1 "@emotion/styled": ^11.11.0 - "@layer5/sistent-svg": ^0.11.1-beta.2 + "@layer5/sistent-svg": ^0.11.1-beta.3 "@mui/icons-material": ^5.14.12 "@mui/material": ^5.14.16 "@types/mui-datatables": ^4.3.6 @@ -2459,7 +2459,7 @@ __metadata: languageName: unknown linkType: soft -"@layer5/sistent-svg@^0.11.1-beta.2, @layer5/sistent-svg@workspace:^, @layer5/sistent-svg@workspace:packages/svg": +"@layer5/sistent-svg@^0.11.1-beta.3, @layer5/sistent-svg@workspace:^, @layer5/sistent-svg@workspace:packages/svg": version: 0.0.0-use.local resolution: "@layer5/sistent-svg@workspace:packages/svg" dependencies: @@ -2479,8 +2479,8 @@ __metadata: tsup: ^7.2.0 typescript: ^5.0.2 peerDependencies: - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 + react: ">=17" + react-dom: ">=17" dependenciesMeta: react: optional: true