@campxdev/shared 1.8.13 → 1.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -4
- package/antd.customize.less +0 -73
- package/exports.ts +0 -19
- package/src/assets/fonts/avenir/Avenir-Book.ttf +0 -0
- package/src/assets/fonts/avenir/Avenir-Heavy.ttf +0 -0
- package/src/assets/fonts/avenir/Avenir-HeavyOblique.ttf +0 -0
- package/src/assets/fonts/avenir/Avenir-Medium.ttf +0 -0
- package/src/assets/fonts/avenir/Avenir-MediumOblique.ttf +0 -0
- package/src/assets/fonts/avenir/index.ts +0 -13
- package/src/assets/fonts/poppins/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Italic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-LightItalic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-MediumItalic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/poppins/index.ts +0 -18
- package/src/assets/images/401.png +0 -0
- package/src/assets/images/403.png +0 -0
- package/src/assets/images/404.png +0 -0
- package/src/assets/images/404notfound.svg +0 -1
- package/src/assets/images/500.png +0 -0
- package/src/assets/images/avatar.png +0 -0
- package/src/assets/images/campx_logo__full_primary.png +0 -0
- package/src/assets/images/index.ts +0 -17
- package/src/assets/images/internalservererror.svg +0 -1
- package/src/assets/images/noInternet.svg +0 -1
- package/src/assets/images/nointernet.png +0 -0
- package/src/assets/images/notfound.png +0 -0
- package/src/assets/images/pagenotfound.svg +0 -1
- package/src/assets/images/permissiondenied.svg +0 -1
- package/src/assets/images/unauth.svg +0 -92
- package/src/components/ActionButton.tsx +0 -20
- package/src/components/Attachment.tsx +0 -26
- package/src/components/AutocompleteSearch/AutocompleteSearch.tsx +0 -57
- package/src/components/AutocompleteSearch/index.tsx +0 -1
- package/src/components/Breadcrumbs.tsx +0 -72
- package/src/components/Card.tsx +0 -98
- package/src/components/CardsGrid.tsx +0 -28
- package/src/components/ChangePassword.tsx +0 -123
- package/src/components/Chips.tsx +0 -81
- package/src/components/Detail.tsx +0 -15
- package/src/components/DetailsGrid.tsx +0 -52
- package/src/components/DividerHeading.tsx +0 -41
- package/src/components/DrawerWrapper/DialogWrapper.tsx +0 -67
- package/src/components/DrawerWrapper/DrawerTemplate.tsx +0 -53
- package/src/components/DrawerWrapper/DrawerWrapper.tsx +0 -53
- package/src/components/DropDownButton/AnchorElement.tsx +0 -44
- package/src/components/DropDownButton/DropDownButton.tsx +0 -184
- package/src/components/DropDownButton/DropdownMenuItem.tsx +0 -110
- package/src/components/DropDownButton/index.tsx +0 -1
- package/src/components/DropDownButton/styles.tsx +0 -59
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -33
- package/src/components/ErrorBoundary/ErrorFallback.tsx +0 -241
- package/src/components/ErrorBoundary/GlobalNetworkLoadingIndicator.tsx +0 -13
- package/src/components/ErrorBoundary/index.tsx +0 -1
- package/src/components/ErrorBox.tsx +0 -42
- package/src/components/ExcelToJsonInput/ExcelJsonUpload.tsx +0 -50
- package/src/components/ExcelToJsonInput/ExcelToJsonInput.tsx +0 -57
- package/src/components/ExcelToJsonInput/index.tsx +0 -1
- package/src/components/FilterComponents/FilterButton.tsx +0 -56
- package/src/components/FilterComponents/SearchBar.tsx +0 -45
- package/src/components/FloatingContainer.tsx +0 -33
- package/src/components/Form/Form.tsx +0 -147
- package/src/components/Form/RenderForm.tsx +0 -189
- package/src/components/FullScreenLoader.tsx +0 -19
- package/src/components/HookForm/AutoCompleteSearch.tsx +0 -113
- package/src/components/HookForm/DatePicker.tsx +0 -40
- package/src/components/HookForm/DateTimePicker.tsx +0 -47
- package/src/components/HookForm/FormLabel.tsx +0 -14
- package/src/components/HookForm/MultiCheckbox.tsx +0 -69
- package/src/components/HookForm/MultiSelect.tsx +0 -53
- package/src/components/HookForm/RadioGroup.tsx +0 -47
- package/src/components/HookForm/SingleCheckbox.tsx +0 -34
- package/src/components/HookForm/SingleSelect.tsx +0 -46
- package/src/components/HookForm/TextField.tsx +0 -40
- package/src/components/HookForm/TimePicker.tsx +0 -40
- package/src/components/HookForm/index.ts +0 -23
- package/src/components/IconButtons/IconButtons.tsx +0 -137
- package/src/components/IconButtons/Icons.tsx +0 -268
- package/src/components/IconButtons/assets/edit.svg +0 -4
- package/src/components/IconButtons/assets/eye.svg +0 -6
- package/src/components/IconButtons/assets/trash.svg +0 -7
- package/src/components/IconButtons/index.tsx +0 -8
- package/src/components/IconLabel.tsx +0 -37
- package/src/components/Image/Image.tsx +0 -45
- package/src/components/Image/broken-image.png +0 -0
- package/src/components/Image/index.tsx +0 -1
- package/src/components/ImageUpload.tsx +0 -98
- package/src/components/Input/AsyncSearchSelect/AsyncSearchSelect.tsx +0 -216
- package/src/components/Input/AsyncSearchSelect/index.tsx +0 -1
- package/src/components/Input/AsyncSearchSelect/styles.tsx +0 -105
- package/src/components/Input/AutoCompleteSearch.tsx +0 -121
- package/src/components/Input/DatePicker.tsx +0 -87
- package/src/components/Input/DateRangePicker.tsx +0 -105
- package/src/components/Input/DateTimePicker.tsx +0 -84
- package/src/components/Input/FormLabel.tsx +0 -21
- package/src/components/Input/MultiCheckbox.tsx +0 -64
- package/src/components/Input/MultiSelect.tsx +0 -150
- package/src/components/Input/RadioGroup.tsx +0 -104
- package/src/components/Input/SingleCheckbox.tsx +0 -78
- package/src/components/Input/SingleSelect.tsx +0 -104
- package/src/components/Input/TextField.tsx +0 -46
- package/src/components/Input/TimePicker.tsx +0 -77
- package/src/components/Input/index.ts +0 -26
- package/src/components/Input/types.ts +0 -3
- package/src/components/JsonPreview.tsx +0 -7
- package/src/components/LabelValue.tsx +0 -21
- package/src/components/Layout/ChangePassword.tsx +0 -49
- package/src/components/Layout/Header/AppHeader.tsx +0 -112
- package/src/components/Layout/Header/AppsMenu.tsx +0 -105
- package/src/components/Layout/Header/HeaderActions/CogWheelMenu.tsx +0 -33
- package/src/components/Layout/Header/HeaderActions/FreshDeskHelpButton.tsx +0 -24
- package/src/components/Layout/Header/HeaderActions/HeaderActions.tsx +0 -18
- package/src/components/Layout/Header/HeaderActions/UserBox.tsx +0 -56
- package/src/components/Layout/Header/Notification.tsx +0 -13
- package/src/components/Layout/Header/applications.ts +0 -103
- package/src/components/Layout/Header/assets/background.png +0 -0
- package/src/components/Layout/Header/assets/campx.png +0 -0
- package/src/components/Layout/Header/assets/campx_square_small.svg +0 -9
- package/src/components/Layout/Header/assets/commuteX.png +0 -0
- package/src/components/Layout/Header/assets/commutex.png +0 -0
- package/src/components/Layout/Header/assets/commutex.svg +0 -14
- package/src/components/Layout/Header/assets/commutexSmall.svg +0 -11
- package/src/components/Layout/Header/assets/contactBg.png +0 -0
- package/src/components/Layout/Header/assets/enroll.svg +0 -14
- package/src/components/Layout/Header/assets/enroll_logo.svg +0 -9
- package/src/components/Layout/Header/assets/enrollx.svg +0 -14
- package/src/components/Layout/Header/assets/entrollx.png +0 -0
- package/src/components/Layout/Header/assets/exams_small.svg +0 -12
- package/src/components/Layout/Header/assets/examsx.svg +0 -14
- package/src/components/Layout/Header/assets/examx.png +0 -0
- package/src/components/Layout/Header/assets/hostel_small.svg +0 -13
- package/src/components/Layout/Header/assets/hostelx.png +0 -0
- package/src/components/Layout/Header/assets/hostelx.svg +0 -13
- package/src/components/Layout/Header/assets/index.ts +0 -35
- package/src/components/Layout/Header/assets/libraryx.svg +0 -12
- package/src/components/Layout/Header/assets/libreryx.png +0 -0
- package/src/components/Layout/Header/assets/pay_small.svg +0 -16
- package/src/components/Layout/Header/assets/payx.png +0 -0
- package/src/components/Layout/Header/assets/payx.svg +0 -19
- package/src/components/Layout/Header/assets/people_small.svg +0 -9
- package/src/components/Layout/Header/assets/peoplex.svg +0 -12
- package/src/components/Layout/Header/assets/pepolex.png +0 -0
- package/src/components/Layout/Header/assets/squarex.svg +0 -12
- package/src/components/Layout/Header/icons.tsx +0 -57
- package/src/components/Layout/Header/index.tsx +0 -1
- package/src/components/Layout/Header/styles.tsx +0 -133
- package/src/components/Layout/Helmet.tsx +0 -49
- package/src/components/Layout/LayoutWrapper.tsx +0 -28
- package/src/components/Layout/SideMenuHeader.tsx +0 -29
- package/src/components/Layout/SideNav.tsx +0 -168
- package/src/components/Layout/Tickets/HelpWidget/HelpWidget.tsx +0 -273
- package/src/components/Layout/Tickets/HelpWidget/styles.tsx +0 -94
- package/src/components/Layout/Tickets/MyTickets.tsx +0 -72
- package/src/components/Layout/Tickets/TicketDetails.tsx +0 -65
- package/src/components/Layout/Tickets/TimeLine.tsx +0 -64
- package/src/components/Layout/Tickets/index.tsx +0 -1
- package/src/components/Layout/Tickets/services.ts +0 -11
- package/src/components/Layout/Tickets/styles.tsx +0 -136
- package/src/components/LinearProgress.tsx +0 -19
- package/src/components/ListItemButton.tsx +0 -95
- package/src/components/LoginForm.tsx +0 -279
- package/src/components/MediaRow/MediaRow.tsx +0 -67
- package/src/components/MediaRow/index.tsx +0 -1
- package/src/components/ModalButtons/DialogButton.tsx +0 -126
- package/src/components/ModalButtons/DrawerButton.tsx +0 -115
- package/src/components/ModalButtons/index.tsx +0 -4
- package/src/components/NoDataIllustration.tsx +0 -32
- package/src/components/PageContent.tsx +0 -12
- package/src/components/PageHeader.tsx +0 -55
- package/src/components/PageNotFound.tsx +0 -26
- package/src/components/PopupConfirm/ConfirmContextProvider.tsx +0 -40
- package/src/components/PopupConfirm/PopupConfirm.tsx +0 -67
- package/src/components/PopupConfirm/animation.gif +0 -0
- package/src/components/PopupConfirm/index.tsx +0 -1
- package/src/components/PopupConfirm/useConfirm.ts +0 -47
- package/src/components/ResetPassword.tsx +0 -107
- package/src/components/Row.tsx +0 -24
- package/src/components/Spinner.tsx +0 -18
- package/src/components/StepsHeader/StepsHeader.tsx +0 -115
- package/src/components/StepsHeader/index.tsx +0 -1
- package/src/components/StyledTableContainer.tsx +0 -33
- package/src/components/SwitchButton.tsx +0 -41
- package/src/components/Table.tsx +0 -42
- package/src/components/Tables/BasicTable/Table.tsx +0 -198
- package/src/components/Tables/BasicTable/TableFooter.tsx +0 -86
- package/src/components/Tables/BasicTable/index.tsx +0 -1
- package/src/components/Tables/ReactTable/BatchActionsHeader.tsx +0 -58
- package/src/components/Tables/ReactTable/ReactTable.tsx +0 -295
- package/src/components/Tables/ReactTable/RenderTableBody.tsx +0 -49
- package/src/components/Tables/ReactTable/index.tsx +0 -1
- package/src/components/Tables/ReactTable/react-table-config.d.ts +0 -128
- package/src/components/Tables/common/NoRecordsFound.tsx +0 -27
- package/src/components/Tables/common/TableStats.tsx +0 -22
- package/src/components/Tables/common/icons.tsx +0 -50
- package/src/components/Tables/common/no-data-illu.svg +0 -1
- package/src/components/Tables/common/styles.tsx +0 -170
- package/src/components/Tables/common/types.ts +0 -57
- package/src/components/Tabs/NavigationTabs.tsx +0 -80
- package/src/components/Tabs/Tabs.tsx +0 -53
- package/src/components/Tabs/TabsContainer.tsx +0 -53
- package/src/components/Tabs/index.tsx +0 -1
- package/src/components/Tabs/styles.tsx +0 -55
- package/src/components/ToastContainer/ToastContainer.tsx +0 -57
- package/src/components/ToastContainer/index.tsx +0 -1
- package/src/components/UploadButton/UploadButton.tsx +0 -126
- package/src/components/UploadButton/index.tsx +0 -1
- package/src/components/UploadButton/types.ts +0 -19
- package/src/components/UploadDocument.tsx +0 -108
- package/src/components/UploadFileDialog/AnimatedUploadFile.gif +0 -0
- package/src/components/UploadFileDialog/UploadFileDialog.tsx +0 -238
- package/src/components/UploadFileDialog/index.tsx +0 -1
- package/src/components/index.ts +0 -106
- package/src/config/axios.ts +0 -73
- package/src/config/axiosEvaluator.ts +0 -53
- package/src/config/axiosXTenant.ts +0 -57
- package/src/constants/UIConstants.ts +0 -97
- package/src/constants/formValidations.ts +0 -6
- package/src/constants/index.ts +0 -5
- package/src/constants/isDevelopment.ts +0 -4
- package/src/constants/permissions.ts +0 -67
- package/src/constants/validateMessages.ts +0 -12
- package/src/contexts/LoginFormProvider.tsx +0 -44
- package/src/contexts/Providers.tsx +0 -50
- package/src/contexts/PublicProviders.tsx +0 -30
- package/src/contexts/QueryClientProvider.tsx +0 -22
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useAuth.ts +0 -96
- package/src/hooks/useFetch.ts +0 -53
- package/src/hooks/useFilters.ts +0 -83
- package/src/hooks/useRouter.ts +0 -31
- package/src/layouts/Components/DashBoardMenu.tsx +0 -232
- package/src/layouts/Components/icons/index.tsx +0 -403
- package/src/layouts/Components/styles.tsx +0 -74
- package/src/layouts/ComponentsLayout.tsx +0 -3
- package/src/permissions/PageWithPermission.tsx +0 -18
- package/src/permissions/PermissionDeniedPage.tsx +0 -16
- package/src/permissions/ValidateAccess.tsx +0 -18
- package/src/permissions/index.ts +0 -2
- package/src/react-app-env.d.ts +0 -1
- package/src/shared-state/AssetsStore.ts +0 -15
- package/src/shared-state/PermissionsStore.ts +0 -384
- package/src/shared-state/UserStore.ts +0 -13
- package/src/shared-state/index.ts +0 -4
- package/src/theme/App.less +0 -3
- package/src/theme/MuiThemeProvider.tsx +0 -18
- package/src/theme/customCssBaseline.ts +0 -135
- package/src/theme/index.css +0 -28
- package/src/theme/muiTheme.ts +0 -595
- package/src/theme/theme.d.ts +0 -75
- package/src/utils/adminAxios.ts +0 -15
- package/src/utils/alphabet.ts +0 -23
- package/src/utils/arrayPadEnd.ts +0 -3
- package/src/utils/formatCurrency.ts +0 -9
- package/src/utils/getUrlParams.ts +0 -5
- package/src/utils/index.ts +0 -7
- package/src/utils/logout.ts +0 -25
- package/src/utils/ordinalSuffixOf.ts +0 -14
- package/src/utils/romanize.ts +0 -40
- package/src/utils/withRouteWrapper.tsx +0 -25
- package/src/utils/withSuspense.tsx +0 -6
- package/styled-components.tsx +0 -60
- package/tsconfig.json +0 -21
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { Box, IconButton, IconButtonProps, styled } from '@mui/material'
|
|
2
|
-
import { ReactNode } from 'react'
|
|
3
|
-
import {
|
|
4
|
-
DeleteIcon,
|
|
5
|
-
DisabledDeleteIcon,
|
|
6
|
-
DisabledEditIcon,
|
|
7
|
-
EditIcon,
|
|
8
|
-
ViewIcon,
|
|
9
|
-
PrintIcon,
|
|
10
|
-
} from './Icons'
|
|
11
|
-
|
|
12
|
-
interface ButtonProps extends IconButtonProps {
|
|
13
|
-
disabledText?: string
|
|
14
|
-
actionType?: 'delete' | 'edit' | 'view' | 'print'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function Button({ ...props }: ButtonProps) {
|
|
18
|
-
const handleClick = (e) => {
|
|
19
|
-
e.stopPropagation()
|
|
20
|
-
if (!props.onClick) return
|
|
21
|
-
props.onClick(e)
|
|
22
|
-
}
|
|
23
|
-
return (
|
|
24
|
-
<StyledIconButton
|
|
25
|
-
{...props}
|
|
26
|
-
onClick={handleClick}
|
|
27
|
-
actionType={props.actionType ? props.actionType : 'view'}
|
|
28
|
-
>
|
|
29
|
-
{props.children}
|
|
30
|
-
</StyledIconButton>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function DisabledButton({
|
|
35
|
-
disabledText,
|
|
36
|
-
children,
|
|
37
|
-
}: {
|
|
38
|
-
disabledText?: string
|
|
39
|
-
children: ReactNode
|
|
40
|
-
}) {
|
|
41
|
-
return (
|
|
42
|
-
<Box
|
|
43
|
-
sx={{
|
|
44
|
-
maxHeight: '14px',
|
|
45
|
-
}}
|
|
46
|
-
title={disabledText ? disabledText : 'disabled'}
|
|
47
|
-
>
|
|
48
|
-
{children}
|
|
49
|
-
</Box>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function ViewButton({ disabled, disabledText, ...props }: ButtonProps) {
|
|
54
|
-
if (disabled) {
|
|
55
|
-
return (
|
|
56
|
-
<DisabledButton {...props} disabledText={disabledText}>
|
|
57
|
-
<ViewIcon />
|
|
58
|
-
</DisabledButton>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
return (
|
|
62
|
-
<Button {...props} actionType="view">
|
|
63
|
-
<ViewIcon />
|
|
64
|
-
</Button>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function EditButton({ disabled, disabledText, ...props }: ButtonProps) {
|
|
69
|
-
if (disabled) {
|
|
70
|
-
return (
|
|
71
|
-
<DisabledButton
|
|
72
|
-
disabledText={disabledText ?? 'Default types can not be edited'}
|
|
73
|
-
>
|
|
74
|
-
<DisabledEditIcon />
|
|
75
|
-
</DisabledButton>
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
return (
|
|
79
|
-
<Button {...props} actionType="edit">
|
|
80
|
-
<EditIcon />
|
|
81
|
-
</Button>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function PrintButton({ disabled, disabledText, ...props }: ButtonProps) {
|
|
86
|
-
if (disabled) {
|
|
87
|
-
return (
|
|
88
|
-
<DisabledButton
|
|
89
|
-
disabledText={disabledText ?? 'Default types can not be edited'}
|
|
90
|
-
>
|
|
91
|
-
<DisabledEditIcon />
|
|
92
|
-
</DisabledButton>
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
return (
|
|
96
|
-
<Button {...props} actionType="print">
|
|
97
|
-
<PrintIcon />
|
|
98
|
-
</Button>
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function DeleteButton({
|
|
103
|
-
disabled,
|
|
104
|
-
disabledText,
|
|
105
|
-
...props
|
|
106
|
-
}: ButtonProps) {
|
|
107
|
-
if (disabled) {
|
|
108
|
-
return (
|
|
109
|
-
<DisabledButton
|
|
110
|
-
disabledText={disabledText ?? 'Default types can not be deleted'}
|
|
111
|
-
>
|
|
112
|
-
<DisabledDeleteIcon />
|
|
113
|
-
</DisabledButton>
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
return (
|
|
117
|
-
<Button {...props} actionType="delete">
|
|
118
|
-
<DeleteIcon />
|
|
119
|
-
</Button>
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const StyledIconButton = styled(IconButton)<{
|
|
124
|
-
actionType: 'delete' | 'edit' | 'view' | 'print'
|
|
125
|
-
}>(({ theme, actionType }) => ({
|
|
126
|
-
padding: 0,
|
|
127
|
-
'&:hover': {
|
|
128
|
-
'& path': {
|
|
129
|
-
fill:
|
|
130
|
-
actionType === 'delete'
|
|
131
|
-
? 'red'
|
|
132
|
-
: actionType === 'edit'
|
|
133
|
-
? theme.palette.common.yellow
|
|
134
|
-
: theme.palette.error.main,
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
}))
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
export const ViewIcon = () => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
width="19.026"
|
|
8
|
-
height="14.775"
|
|
9
|
-
viewBox="0 0 19.026 14.775"
|
|
10
|
-
>
|
|
11
|
-
<g id="eye_9_" data-name="eye (9)" transform="translate(0.152 0.1)">
|
|
12
|
-
<path
|
|
13
|
-
id="Path_1389"
|
|
14
|
-
data-name="Path 1389"
|
|
15
|
-
d="M18.147,7.93a10.328,10.328,0,0,0-8.79-5.275A10.328,10.328,0,0,0,.568,7.93a3.827,3.827,0,0,0,0,4.026,10.328,10.328,0,0,0,8.79,5.275,10.328,10.328,0,0,0,8.79-5.275A3.827,3.827,0,0,0,18.147,7.93Zm-1.33,3.209a8.823,8.823,0,0,1-7.46,4.532A8.823,8.823,0,0,1,1.9,11.139a2.276,2.276,0,0,1,0-2.393,8.823,8.823,0,0,1,7.46-4.532,8.817,8.817,0,0,1,7.46,4.532A2.276,2.276,0,0,1,16.817,11.139Z"
|
|
16
|
-
transform="translate(0.004 -2.655)"
|
|
17
|
-
fill="#878787"
|
|
18
|
-
stroke="#fff"
|
|
19
|
-
strokeWidth="0.2"
|
|
20
|
-
/>
|
|
21
|
-
<path
|
|
22
|
-
id="Path_1390"
|
|
23
|
-
data-name="Path 1390"
|
|
24
|
-
d="M10.9,7a3.9,3.9,0,1,0,3.9,3.9A3.9,3.9,0,0,0,10.9,7Zm0,6.239a2.34,2.34,0,1,1,2.34-2.34A2.34,2.34,0,0,1,10.9,13.239Z"
|
|
25
|
-
transform="translate(-1.538 -3.612)"
|
|
26
|
-
fill="#878787"
|
|
27
|
-
stroke="#fff"
|
|
28
|
-
strokeWidth="0.2"
|
|
29
|
-
/>
|
|
30
|
-
</g>
|
|
31
|
-
</svg>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const EditIcon = () => {
|
|
36
|
-
return (
|
|
37
|
-
<svg
|
|
38
|
-
id="edit_3_"
|
|
39
|
-
data-name="edit (3)"
|
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
-
width="16.416"
|
|
42
|
-
height="16.416"
|
|
43
|
-
viewBox="0 0 16.416 16.416"
|
|
44
|
-
>
|
|
45
|
-
<path
|
|
46
|
-
id="Path_1387"
|
|
47
|
-
data-name="Path 1387"
|
|
48
|
-
d="M14.341.65,6,8.99a3.4,3.4,0,0,0-1,2.418v.919a.684.684,0,0,0,.684.684H6.6a3.4,3.4,0,0,0,2.418-1L17.36,3.669a2.138,2.138,0,0,0,0-3.019,2.185,2.185,0,0,0-3.019,0ZM16.393,2.7,8.053,11.042a2.066,2.066,0,0,1-1.451.6H6.368v-.235a2.066,2.066,0,0,1,.6-1.451l8.339-8.339a.785.785,0,0,1,1.085,0,.768.768,0,0,1,0,1.085Z"
|
|
49
|
-
transform="translate(-1.58 -0.014)"
|
|
50
|
-
fill="rgba(18,18,18,0.5)"
|
|
51
|
-
/>
|
|
52
|
-
<path
|
|
53
|
-
id="Path_1388"
|
|
54
|
-
data-name="Path 1388"
|
|
55
|
-
d="M15.732,6.142a.684.684,0,0,0-.684.684V10.26H12.312a2.052,2.052,0,0,0-2.052,2.052v2.736H3.42A2.052,2.052,0,0,1,1.368,13V3.42A2.052,2.052,0,0,1,3.42,1.368H9.6A.684.684,0,0,0,9.6,0H3.42A3.424,3.424,0,0,0,0,3.42V13a3.424,3.424,0,0,0,3.42,3.42h7.759a3.4,3.4,0,0,0,2.419-1L15.414,13.6a3.4,3.4,0,0,0,1-2.418V6.826A.684.684,0,0,0,15.732,6.142Zm-3.1,8.306a2.035,2.035,0,0,1-1,.547V12.312a.684.684,0,0,1,.684-.684H15a2.063,2.063,0,0,1-.547,1Z"
|
|
56
|
-
fill="rgba(18,18,18,0.5)"
|
|
57
|
-
/>
|
|
58
|
-
</svg>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const DeleteIcon = () => {
|
|
63
|
-
return (
|
|
64
|
-
<svg
|
|
65
|
-
id="trash_4_"
|
|
66
|
-
data-name="trash (4)"
|
|
67
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
68
|
-
width="15"
|
|
69
|
-
height="18"
|
|
70
|
-
viewBox="0 0 15 18"
|
|
71
|
-
>
|
|
72
|
-
<g
|
|
73
|
-
id="trash_4_2"
|
|
74
|
-
data-name="trash (4)"
|
|
75
|
-
transform="translate(-2)"
|
|
76
|
-
opacity="0.5"
|
|
77
|
-
>
|
|
78
|
-
<path
|
|
79
|
-
id="Path_1384"
|
|
80
|
-
data-name="Path 1384"
|
|
81
|
-
d="M16.25,3H13.925A3.757,3.757,0,0,0,10.25,0H8.75A3.757,3.757,0,0,0,5.075,3H2.75a.75.75,0,1,0,0,1.5H3.5v9.75A3.755,3.755,0,0,0,7.25,18h4.5a3.755,3.755,0,0,0,3.75-3.75V4.5h.75a.75.75,0,0,0,0-1.5ZM8.75,1.5h1.5A2.254,2.254,0,0,1,12.372,3H6.628A2.255,2.255,0,0,1,8.75,1.5ZM14,14.25a2.25,2.25,0,0,1-2.25,2.25H7.25A2.25,2.25,0,0,1,5,14.25V4.5h9Z"
|
|
82
|
-
fill="#121212"
|
|
83
|
-
/>
|
|
84
|
-
<path
|
|
85
|
-
id="Path_1385"
|
|
86
|
-
data-name="Path 1385"
|
|
87
|
-
d="M9.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,9.75,16Z"
|
|
88
|
-
transform="translate(-1.75 -2.5)"
|
|
89
|
-
fill="#121212"
|
|
90
|
-
/>
|
|
91
|
-
<path
|
|
92
|
-
id="Path_1386"
|
|
93
|
-
data-name="Path 1386"
|
|
94
|
-
d="M13.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,13.75,16Z"
|
|
95
|
-
transform="translate(-2.75 -2.5)"
|
|
96
|
-
fill="#121212"
|
|
97
|
-
/>
|
|
98
|
-
</g>
|
|
99
|
-
</svg>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export const DisabledEditIcon = () => {
|
|
104
|
-
return (
|
|
105
|
-
<svg
|
|
106
|
-
id="Component_13_1"
|
|
107
|
-
data-name="Component 13 – 1"
|
|
108
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
109
|
-
width="20"
|
|
110
|
-
height="20"
|
|
111
|
-
viewBox="0 0 20 20"
|
|
112
|
-
>
|
|
113
|
-
<g id="Group_77" data-name="Group 77" transform="translate(-1753 -331)">
|
|
114
|
-
<path
|
|
115
|
-
id="Path_1387"
|
|
116
|
-
data-name="Path 1387"
|
|
117
|
-
d="M14.341.65,6,8.99a3.4,3.4,0,0,0-1,2.418v.919a.684.684,0,0,0,.684.684H6.6a3.4,3.4,0,0,0,2.418-1L17.36,3.669a2.138,2.138,0,0,0,0-3.019,2.185,2.185,0,0,0-3.019,0ZM16.393,2.7,8.053,11.042a2.066,2.066,0,0,1-1.451.6H6.368v-.235a2.066,2.066,0,0,1,.6-1.451l8.339-8.339a.785.785,0,0,1,1.085,0,.768.768,0,0,1,0,1.085Z"
|
|
118
|
-
transform="translate(1751.42 330.986)"
|
|
119
|
-
fill="rgba(18,18,18,0.5)"
|
|
120
|
-
/>
|
|
121
|
-
<path
|
|
122
|
-
id="Path_1388"
|
|
123
|
-
data-name="Path 1388"
|
|
124
|
-
d="M15.732,6.142a.684.684,0,0,0-.684.684V10.26H12.312a2.052,2.052,0,0,0-2.052,2.052v2.736H3.42A2.052,2.052,0,0,1,1.368,13V3.42A2.052,2.052,0,0,1,3.42,1.368H9.6A.684.684,0,0,0,9.6,0H3.42A3.424,3.424,0,0,0,0,3.42V13a3.424,3.424,0,0,0,3.42,3.42h7.759a3.4,3.4,0,0,0,2.419-1L15.414,13.6a3.4,3.4,0,0,0,1-2.418V6.826A.684.684,0,0,0,15.732,6.142Zm-3.1,8.306a2.035,2.035,0,0,1-1,.547V12.312a.684.684,0,0,1,.684-.684H15a2.063,2.063,0,0,1-.547,1Z"
|
|
125
|
-
transform="translate(1753 331)"
|
|
126
|
-
fill="rgba(18,18,18,0.5)"
|
|
127
|
-
/>
|
|
128
|
-
</g>
|
|
129
|
-
<g id="Group_79" data-name="Group 79" transform="translate(-1753 -330)">
|
|
130
|
-
<circle
|
|
131
|
-
id="Ellipse_66"
|
|
132
|
-
data-name="Ellipse 66"
|
|
133
|
-
cx="5"
|
|
134
|
-
cy="5"
|
|
135
|
-
r="5"
|
|
136
|
-
transform="translate(1763 340)"
|
|
137
|
-
fill="#bc2c3d"
|
|
138
|
-
/>
|
|
139
|
-
<path
|
|
140
|
-
id="cross-small_3_"
|
|
141
|
-
data-name="cross-small (3)"
|
|
142
|
-
d="M11.181,5.838h0a.445.445,0,0,0-.63,0L8.509,7.88,6.467,5.838a.445.445,0,0,0-.63,0h0a.445.445,0,0,0,0,.63L7.88,8.509,5.838,10.551a.445.445,0,0,0,0,.63h0a.445.445,0,0,0,.63,0L8.509,9.139l2.042,2.042a.445.445,0,0,0,.63,0h0a.445.445,0,0,0,0-.63L9.139,8.509l2.042-2.042A.445.445,0,0,0,11.181,5.838Z"
|
|
143
|
-
transform="translate(1759.491 336.491)"
|
|
144
|
-
fill="#fff"
|
|
145
|
-
/>
|
|
146
|
-
</g>
|
|
147
|
-
</svg>
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export const DisabledDeleteIcon = () => {
|
|
152
|
-
return (
|
|
153
|
-
<svg
|
|
154
|
-
id="Component_14_1"
|
|
155
|
-
data-name="Component 14 – 1"
|
|
156
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
157
|
-
width="19.584"
|
|
158
|
-
height="21"
|
|
159
|
-
viewBox="0 0 19.584 21"
|
|
160
|
-
>
|
|
161
|
-
<g
|
|
162
|
-
id="Group_78"
|
|
163
|
-
data-name="Group 78"
|
|
164
|
-
transform="translate(-1789.416 -330)"
|
|
165
|
-
>
|
|
166
|
-
<g
|
|
167
|
-
id="trash_4_"
|
|
168
|
-
data-name="trash (4)"
|
|
169
|
-
transform="translate(1787.416 330)"
|
|
170
|
-
opacity="0.5"
|
|
171
|
-
>
|
|
172
|
-
<path
|
|
173
|
-
id="Path_1384"
|
|
174
|
-
data-name="Path 1384"
|
|
175
|
-
d="M16.25,3H13.925A3.757,3.757,0,0,0,10.25,0H8.75A3.757,3.757,0,0,0,5.075,3H2.75a.75.75,0,1,0,0,1.5H3.5v9.75A3.755,3.755,0,0,0,7.25,18h4.5a3.755,3.755,0,0,0,3.75-3.75V4.5h.75a.75.75,0,0,0,0-1.5ZM8.75,1.5h1.5A2.254,2.254,0,0,1,12.372,3H6.628A2.255,2.255,0,0,1,8.75,1.5ZM14,14.25a2.25,2.25,0,0,1-2.25,2.25H7.25A2.25,2.25,0,0,1,5,14.25V4.5h9Z"
|
|
176
|
-
fill="#121212"
|
|
177
|
-
/>
|
|
178
|
-
<path
|
|
179
|
-
id="Path_1385"
|
|
180
|
-
data-name="Path 1385"
|
|
181
|
-
d="M9.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,9.75,16Z"
|
|
182
|
-
transform="translate(-1.75 -2.5)"
|
|
183
|
-
fill="#121212"
|
|
184
|
-
/>
|
|
185
|
-
<path
|
|
186
|
-
id="Path_1386"
|
|
187
|
-
data-name="Path 1386"
|
|
188
|
-
d="M13.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,13.75,16Z"
|
|
189
|
-
transform="translate(-2.75 -2.5)"
|
|
190
|
-
fill="#121212"
|
|
191
|
-
/>
|
|
192
|
-
</g>
|
|
193
|
-
</g>
|
|
194
|
-
<g
|
|
195
|
-
id="Group_80"
|
|
196
|
-
data-name="Group 80"
|
|
197
|
-
transform="translate(-1753.416 -329)"
|
|
198
|
-
>
|
|
199
|
-
<circle
|
|
200
|
-
id="Ellipse_66"
|
|
201
|
-
data-name="Ellipse 66"
|
|
202
|
-
cx="5"
|
|
203
|
-
cy="5"
|
|
204
|
-
r="5"
|
|
205
|
-
transform="translate(1763 340)"
|
|
206
|
-
fill="#bc2c3d"
|
|
207
|
-
/>
|
|
208
|
-
<path
|
|
209
|
-
id="cross-small_3_"
|
|
210
|
-
data-name="cross-small (3)"
|
|
211
|
-
d="M11.181,5.838h0a.445.445,0,0,0-.63,0L8.509,7.88,6.467,5.838a.445.445,0,0,0-.63,0h0a.445.445,0,0,0,0,.63L7.88,8.509,5.838,10.551a.445.445,0,0,0,0,.63h0a.445.445,0,0,0,.63,0L8.509,9.139l2.042,2.042a.445.445,0,0,0,.63,0h0a.445.445,0,0,0,0-.63L9.139,8.509l2.042-2.042A.445.445,0,0,0,11.181,5.838Z"
|
|
212
|
-
transform="translate(1759.491 336.491)"
|
|
213
|
-
fill="#fff"
|
|
214
|
-
/>
|
|
215
|
-
</g>
|
|
216
|
-
</svg>
|
|
217
|
-
)
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export const PrintIcon = () => {
|
|
221
|
-
return (
|
|
222
|
-
<svg
|
|
223
|
-
id="print_1_"
|
|
224
|
-
data-name="print (1)"
|
|
225
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
226
|
-
width="16"
|
|
227
|
-
height="16"
|
|
228
|
-
viewBox="0 0 16 16"
|
|
229
|
-
>
|
|
230
|
-
<g id="print_1_2" data-name="print (1)" opacity="0.5">
|
|
231
|
-
<path
|
|
232
|
-
id="Path_1768"
|
|
233
|
-
data-name="Path 1768"
|
|
234
|
-
d="M12.667,4V2.667A2.667,2.667,0,0,0,10,0H6A2.667,2.667,0,0,0,3.333,2.667V4A3.337,3.337,0,0,0,0,7.333v3.333A3.337,3.337,0,0,0,3.333,14a2,2,0,0,0,2,2h5.333a2,2,0,0,0,2-2A3.337,3.337,0,0,0,16,10.667V7.333A3.337,3.337,0,0,0,12.667,4Zm-8-1.333A1.333,1.333,0,0,1,6,1.333h4a1.333,1.333,0,0,1,1.333,1.333V4H4.667ZM11.333,14a.667.667,0,0,1-.667.667H5.333A.667.667,0,0,1,4.667,14V11.333a.667.667,0,0,1,.667-.667h5.333a.667.667,0,0,1,.667.667Zm3.333-3.333a2,2,0,0,1-2,2V11.333a2,2,0,0,0-2-2H5.333a2,2,0,0,0-2,2v1.333a2,2,0,0,1-2-2V7.333a2,2,0,0,1,2-2h9.333a2,2,0,0,1,2,2Z"
|
|
235
|
-
fill="#121212"
|
|
236
|
-
/>
|
|
237
|
-
<path
|
|
238
|
-
id="Path_1769"
|
|
239
|
-
data-name="Path 1769"
|
|
240
|
-
d="M17,10H15.667a.667.667,0,1,0,0,1.333H17A.667.667,0,1,0,17,10Z"
|
|
241
|
-
transform="translate(-5 -3.333)"
|
|
242
|
-
/>
|
|
243
|
-
</g>
|
|
244
|
-
</svg>
|
|
245
|
-
)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export const DateRangeIcon = () => {
|
|
249
|
-
return (
|
|
250
|
-
<svg
|
|
251
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
252
|
-
width="20"
|
|
253
|
-
height="15"
|
|
254
|
-
viewBox="0 0 20 15"
|
|
255
|
-
>
|
|
256
|
-
<g id="transfer" transform="translate(0 -51.198)" opacity="0.501">
|
|
257
|
-
<g id="Group_807" data-name="Group 807" transform="translate(0 51.198)">
|
|
258
|
-
<path
|
|
259
|
-
id="Path_1400"
|
|
260
|
-
data-name="Path 1400"
|
|
261
|
-
d="M18.452,56.055,13.79,51.393a.666.666,0,0,0-1.137.471v2H7.991a.666.666,0,1,0,0,1.332h5.328a.666.666,0,0,0,.666-.666V53.472l3.054,3.054L13.985,59.58V58.524a.666.666,0,0,0-.666-.666H5.993v-2a.666.666,0,0,0-1.137-.471L.195,60.051a.666.666,0,0,0,0,.942l4.662,4.662a.666.666,0,0,0,.471.2.658.658,0,0,0,.255-.051.666.666,0,0,0,.411-.615v-2h4.662a.666.666,0,0,0,0-1.332H5.327a.666.666,0,0,0-.666.666v1.056L1.607,60.522l3.054-3.054v1.056a.666.666,0,0,0,.666.666h7.326v2a.666.666,0,0,0,1.137.471L18.452,57A.666.666,0,0,0,18.452,56.055Z"
|
|
262
|
-
transform="translate(0 -51.198)"
|
|
263
|
-
/>
|
|
264
|
-
</g>
|
|
265
|
-
</g>
|
|
266
|
-
</svg>
|
|
267
|
-
)
|
|
268
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg id="edit_3_" data-name="edit (3)" xmlns="http://www.w3.org/2000/svg" width="16.416" height="16.416" viewBox="0 0 16.416 16.416">
|
|
2
|
-
<path id="Path_1387" data-name="Path 1387" d="M14.341.65,6,8.99a3.4,3.4,0,0,0-1,2.418v.919a.684.684,0,0,0,.684.684H6.6a3.4,3.4,0,0,0,2.418-1L17.36,3.669a2.138,2.138,0,0,0,0-3.019,2.185,2.185,0,0,0-3.019,0ZM16.393,2.7,8.053,11.042a2.066,2.066,0,0,1-1.451.6H6.368v-.235a2.066,2.066,0,0,1,.6-1.451l8.339-8.339a.785.785,0,0,1,1.085,0,.768.768,0,0,1,0,1.085Z" transform="translate(-1.58 -0.014)" fill="rgba(18,18,18,0.5)"/>
|
|
3
|
-
<path id="Path_1388" data-name="Path 1388" d="M15.732,6.142a.684.684,0,0,0-.684.684V10.26H12.312a2.052,2.052,0,0,0-2.052,2.052v2.736H3.42A2.052,2.052,0,0,1,1.368,13V3.42A2.052,2.052,0,0,1,3.42,1.368H9.6A.684.684,0,0,0,9.6,0H3.42A3.424,3.424,0,0,0,0,3.42V13a3.424,3.424,0,0,0,3.42,3.42h7.759a3.4,3.4,0,0,0,2.419-1L15.414,13.6a3.4,3.4,0,0,0,1-2.418V6.826A.684.684,0,0,0,15.732,6.142Zm-3.1,8.306a2.035,2.035,0,0,1-1,.547V12.312a.684.684,0,0,1,.684-.684H15a2.063,2.063,0,0,1-.547,1Z" fill="rgba(18,18,18,0.5)"/>
|
|
4
|
-
</svg>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="19.026" height="14.775" viewBox="0 0 19.026 14.775">
|
|
2
|
-
<g id="eye_9_" data-name="eye (9)" transform="translate(0.152 0.1)">
|
|
3
|
-
<path id="Path_1389" data-name="Path 1389" d="M18.147,7.93a10.328,10.328,0,0,0-8.79-5.275A10.328,10.328,0,0,0,.568,7.93a3.827,3.827,0,0,0,0,4.026,10.328,10.328,0,0,0,8.79,5.275,10.328,10.328,0,0,0,8.79-5.275A3.827,3.827,0,0,0,18.147,7.93Zm-1.33,3.209a8.823,8.823,0,0,1-7.46,4.532A8.823,8.823,0,0,1,1.9,11.139a2.276,2.276,0,0,1,0-2.393,8.823,8.823,0,0,1,7.46-4.532,8.817,8.817,0,0,1,7.46,4.532A2.276,2.276,0,0,1,16.817,11.139Z" transform="translate(0.004 -2.655)" fill="#878787" stroke="#fff" strokeWidth="0.2"/>
|
|
4
|
-
<path id="Path_1390" data-name="Path 1390" d="M10.9,7a3.9,3.9,0,1,0,3.9,3.9A3.9,3.9,0,0,0,10.9,7Zm0,6.239a2.34,2.34,0,1,1,2.34-2.34A2.34,2.34,0,0,1,10.9,13.239Z" transform="translate(-1.538 -3.612)" fill="#878787" stroke="#fff" strokeWidth="0.2"/>
|
|
5
|
-
</g>
|
|
6
|
-
</svg>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg id="trash_4_" data-name="trash (4)" xmlns="http://www.w3.org/2000/svg" width="15" height="18" viewBox="0 0 15 18">
|
|
2
|
-
<g id="trash_4_2" data-name="trash (4)" transform="translate(-2)" opacity="0.5">
|
|
3
|
-
<path id="Path_1384" data-name="Path 1384" d="M16.25,3H13.925A3.757,3.757,0,0,0,10.25,0H8.75A3.757,3.757,0,0,0,5.075,3H2.75a.75.75,0,1,0,0,1.5H3.5v9.75A3.755,3.755,0,0,0,7.25,18h4.5a3.755,3.755,0,0,0,3.75-3.75V4.5h.75a.75.75,0,0,0,0-1.5ZM8.75,1.5h1.5A2.254,2.254,0,0,1,12.372,3H6.628A2.255,2.255,0,0,1,8.75,1.5ZM14,14.25a2.25,2.25,0,0,1-2.25,2.25H7.25A2.25,2.25,0,0,1,5,14.25V4.5h9Z" fill="#121212"/>
|
|
4
|
-
<path id="Path_1385" data-name="Path 1385" d="M9.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,9.75,16Z" transform="translate(-1.75 -2.5)" fill="#121212"/>
|
|
5
|
-
<path id="Path_1386" data-name="Path 1386" d="M13.75,16a.75.75,0,0,0,.75-.75v-4.5a.75.75,0,1,0-1.5,0v4.5A.75.75,0,0,0,13.75,16Z" transform="translate(-2.75 -2.5)" fill="#121212"/>
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Box, styled, Typography } from '@mui/material'
|
|
2
|
-
import { ReactNode } from 'react'
|
|
3
|
-
|
|
4
|
-
const StyledStack = styled(Box)(({ theme }) => ({
|
|
5
|
-
display: 'flex',
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
gap: '8px',
|
|
8
|
-
'& .MuiSvgIcon-root': {
|
|
9
|
-
fontSize: '1rem',
|
|
10
|
-
color: theme.palette.text.secondary,
|
|
11
|
-
},
|
|
12
|
-
}))
|
|
13
|
-
|
|
14
|
-
export default function IconLabel({
|
|
15
|
-
label,
|
|
16
|
-
icon,
|
|
17
|
-
onClick,
|
|
18
|
-
}: {
|
|
19
|
-
label: string
|
|
20
|
-
icon: ReactNode
|
|
21
|
-
onClick?: () => void
|
|
22
|
-
}) {
|
|
23
|
-
return (
|
|
24
|
-
<StyledStack
|
|
25
|
-
onClick={onClick ?? onClick}
|
|
26
|
-
sx={{
|
|
27
|
-
...(onClick && {
|
|
28
|
-
cursor: 'pointer',
|
|
29
|
-
'&:hover': { borderBottom: '1px solid gray' },
|
|
30
|
-
}),
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
{icon}
|
|
34
|
-
<Typography variant="subtitle2">{label}</Typography>
|
|
35
|
-
</StyledStack>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Box } from '@mui/material'
|
|
2
|
-
const brokenImage = require('./broken-image.png')
|
|
3
|
-
|
|
4
|
-
interface ImageProps {
|
|
5
|
-
src: string
|
|
6
|
-
alt: string
|
|
7
|
-
height: string | number
|
|
8
|
-
width: string | number
|
|
9
|
-
fit?: 'cover' | 'contain' | 'fill'
|
|
10
|
-
radius?: string | number
|
|
11
|
-
defaultImage?: any
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default function Image({
|
|
15
|
-
src,
|
|
16
|
-
alt,
|
|
17
|
-
height,
|
|
18
|
-
width,
|
|
19
|
-
fit = 'contain',
|
|
20
|
-
radius = '10px',
|
|
21
|
-
defaultImage = null,
|
|
22
|
-
}: ImageProps) {
|
|
23
|
-
return (
|
|
24
|
-
<Box
|
|
25
|
-
sx={{
|
|
26
|
-
height: height,
|
|
27
|
-
width: width,
|
|
28
|
-
'& > img': {
|
|
29
|
-
borderRadius: radius,
|
|
30
|
-
width: '100%',
|
|
31
|
-
height: '100%',
|
|
32
|
-
objectFit: fit,
|
|
33
|
-
},
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
<img
|
|
37
|
-
src={src || defaultImage}
|
|
38
|
-
alt={alt}
|
|
39
|
-
onError={(e: any) => {
|
|
40
|
-
e.target.src = defaultImage ? defaultImage : brokenImage
|
|
41
|
-
}}
|
|
42
|
-
/>
|
|
43
|
-
</Box>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Image'
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { InsertPhotoOutlined } from '@mui/icons-material'
|
|
2
|
-
import { Box, CircularProgress, styled, Typography } from '@mui/material'
|
|
3
|
-
import { ReactNode, useRef, useState } from 'react'
|
|
4
|
-
import { toast } from 'react-toastify'
|
|
5
|
-
import axios, { axiosErrorToast } from '../config/axios'
|
|
6
|
-
|
|
7
|
-
interface ImageUploadProps {
|
|
8
|
-
onFileUploaded: (v) => void
|
|
9
|
-
postUrl: string
|
|
10
|
-
StyledUpload?: ReactNode
|
|
11
|
-
loadingState?: (v) => void
|
|
12
|
-
}
|
|
13
|
-
export default function ImageUpload({
|
|
14
|
-
onFileUploaded,
|
|
15
|
-
postUrl,
|
|
16
|
-
StyledUpload,
|
|
17
|
-
loadingState,
|
|
18
|
-
}: ImageUploadProps) {
|
|
19
|
-
const [loading, setLoading] = useState(false)
|
|
20
|
-
const ref = useRef<HTMLInputElement>(null)
|
|
21
|
-
|
|
22
|
-
const handleChange = (e) => {
|
|
23
|
-
if (e.target.files[0]) {
|
|
24
|
-
const formData = new FormData()
|
|
25
|
-
formData.append('file', e.target.files[0])
|
|
26
|
-
setLoading(true)
|
|
27
|
-
loadingState && setLoading(true)
|
|
28
|
-
axios
|
|
29
|
-
.post(postUrl, formData)
|
|
30
|
-
.then((res) => {
|
|
31
|
-
onFileUploaded({
|
|
32
|
-
url: res.data.url,
|
|
33
|
-
key: res.data.key,
|
|
34
|
-
fileName: res.data?.mediaObject?.originalFileName ?? '',
|
|
35
|
-
id: res.data?.mediaObject?.id ?? '',
|
|
36
|
-
})
|
|
37
|
-
setLoading(false)
|
|
38
|
-
loadingState && setLoading(false)
|
|
39
|
-
})
|
|
40
|
-
.catch((err) => {
|
|
41
|
-
setLoading(false)
|
|
42
|
-
loadingState && setLoading(false)
|
|
43
|
-
axiosErrorToast(err)
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<>
|
|
50
|
-
{StyledUpload ? (
|
|
51
|
-
<div
|
|
52
|
-
onClick={() => {
|
|
53
|
-
ref.current.click()
|
|
54
|
-
}}
|
|
55
|
-
>
|
|
56
|
-
{StyledUpload}
|
|
57
|
-
</div>
|
|
58
|
-
) : (
|
|
59
|
-
<StyledImageLabel
|
|
60
|
-
onClick={() => {
|
|
61
|
-
ref.current.click()
|
|
62
|
-
}}
|
|
63
|
-
>
|
|
64
|
-
<InsertPhotoOutlined />
|
|
65
|
-
<Typography sx={{ opacity: '0.6' }}>
|
|
66
|
-
{loading ? 'Uploading...' : `Upload Photo`}
|
|
67
|
-
</Typography>
|
|
68
|
-
</StyledImageLabel>
|
|
69
|
-
)}
|
|
70
|
-
|
|
71
|
-
<input
|
|
72
|
-
accept="image/*"
|
|
73
|
-
type="file"
|
|
74
|
-
hidden
|
|
75
|
-
ref={ref}
|
|
76
|
-
onChange={handleChange}
|
|
77
|
-
/>
|
|
78
|
-
</>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export const StyledImageLabel = styled('div')(({ theme }) => ({
|
|
83
|
-
cursor: 'pointer',
|
|
84
|
-
borderRadius: '10px',
|
|
85
|
-
width: '100%',
|
|
86
|
-
height: '150px',
|
|
87
|
-
border: '1px dashed #0000001A',
|
|
88
|
-
display: 'flex',
|
|
89
|
-
flexDirection: 'column',
|
|
90
|
-
justifyContent: 'center',
|
|
91
|
-
alignItems: 'center',
|
|
92
|
-
'&:hover': {
|
|
93
|
-
backgroundColor: '#EFEFEF',
|
|
94
|
-
},
|
|
95
|
-
'& > *': {
|
|
96
|
-
color: theme.palette.text.disabled,
|
|
97
|
-
},
|
|
98
|
-
}))
|