@campxdev/shared 1.10.47 → 1.10.49
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 +2 -1
- package/src/components/ReactJoyRide.tsx +61 -0
- package/src/components/index.ts +77 -77
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/shared",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.49",
|
|
4
4
|
"main": "./exports.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "react-scripts start",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"react-flatpickr": "^3.10.13",
|
|
46
46
|
"react-helmet": "^6.1.0",
|
|
47
47
|
"react-hook-form": "^7.40.0",
|
|
48
|
+
"react-joyride": "^2.5.5",
|
|
48
49
|
"react-query": "^3.39.0",
|
|
49
50
|
"react-router-dom": "^6.4.2",
|
|
50
51
|
"react-table": "^7.8.0",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import TourIcon from '@mui/icons-material/Tour'
|
|
2
|
+
import { Box, IconButton } from '@mui/material'
|
|
3
|
+
import { ReactNode, useState } from 'react'
|
|
4
|
+
import ReactJoyride, { Step } from 'react-joyride'
|
|
5
|
+
|
|
6
|
+
function ReactJoyRide({
|
|
7
|
+
steps,
|
|
8
|
+
children,
|
|
9
|
+
}: {
|
|
10
|
+
steps: Step[]
|
|
11
|
+
children: ReactNode
|
|
12
|
+
}) {
|
|
13
|
+
const [run, setRun] = useState(false)
|
|
14
|
+
|
|
15
|
+
const handleTourEnd = (data) => {
|
|
16
|
+
if (
|
|
17
|
+
data.status === 'finished' ||
|
|
18
|
+
data.status === 'skip' ||
|
|
19
|
+
data.status === 'closed'
|
|
20
|
+
)
|
|
21
|
+
setRun(false)
|
|
22
|
+
|
|
23
|
+
if (data.action == 'close' || data.action == 'skip') setRun(false)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<Box>
|
|
29
|
+
<ReactJoyride
|
|
30
|
+
callback={handleTourEnd}
|
|
31
|
+
run={run}
|
|
32
|
+
steps={steps}
|
|
33
|
+
continuous
|
|
34
|
+
showSkipButton
|
|
35
|
+
showProgress
|
|
36
|
+
scrollToFirstStep
|
|
37
|
+
disableOverlayClose
|
|
38
|
+
disableScrolling
|
|
39
|
+
/>
|
|
40
|
+
{children}
|
|
41
|
+
<IconButton
|
|
42
|
+
onClick={() => setRun(true)}
|
|
43
|
+
sx={{
|
|
44
|
+
position: 'fixed',
|
|
45
|
+
bottom: '20px',
|
|
46
|
+
right: '20px',
|
|
47
|
+
zIndex: 1000,
|
|
48
|
+
borderRadius: '50%',
|
|
49
|
+
width: '60px',
|
|
50
|
+
height: '60px',
|
|
51
|
+
backgroundColor: '#FF0244',
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<TourIcon sx={{ color: 'white' }} />
|
|
55
|
+
</IconButton>
|
|
56
|
+
</Box>
|
|
57
|
+
</>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default ReactJoyRide
|
package/src/components/index.ts
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ApplicationProfile from './ApplicationProfile'
|
|
2
|
+
import ChangePassword from './ChangePassword'
|
|
2
3
|
import Chips from './Chips'
|
|
3
|
-
import ImageUpload from './ImageUpload'
|
|
4
|
-
import FloatingContainer from './FloatingContainer'
|
|
5
|
-
import TabsContainer from './Tabs/TabsContainer'
|
|
6
|
-
import { StyledTableContainer } from './StyledTableContainer'
|
|
7
|
-
import SearchBar from './FilterComponents/SearchBar'
|
|
8
|
-
import { DrawerButton, DialogButton } from './ModalButtons'
|
|
9
4
|
import DetailsGrid from './DetailsGrid'
|
|
10
|
-
import AppHeader from './Layout/Header'
|
|
11
|
-
import StepsHeader from './StepsHeader'
|
|
12
|
-
import UploadDocument from './UploadDocument'
|
|
13
|
-
import { Table as StyledTable } from './Table'
|
|
14
|
-
import ErrorBoundary from './ErrorBoundary'
|
|
15
|
-
import FullScreenLoader from './FullScreenLoader'
|
|
16
|
-
import LoginForm from './LoginForm'
|
|
17
|
-
import ResetPassword from './ResetPassword'
|
|
18
|
-
import { SideMenuHeader } from './Layout/SideMenuHeader'
|
|
19
|
-
import SideNav from './Layout/SideNav'
|
|
20
|
-
import { ListItemButton } from './ListItemButton'
|
|
21
|
-
import LayoutWrapper from './Layout/LayoutWrapper'
|
|
22
|
-
import PageNotFound from './PageNotFound'
|
|
23
|
-
import ChangePassword from './ChangePassword'
|
|
24
|
-
import UploadButton from './UploadButton'
|
|
25
5
|
import DialogWrapper from './DrawerWrapper/DialogWrapper'
|
|
6
|
+
import ErrorBoundary from './ErrorBoundary'
|
|
7
|
+
import GlobalNetworkLoadingIndicator from './ErrorBoundary/GlobalNetworkLoadingIndicator'
|
|
8
|
+
import ExcelToJsonInput from './ExcelToJsonInput'
|
|
9
|
+
import ExcelJsonUpload from './ExcelToJsonInput/ExcelJsonUpload'
|
|
10
|
+
import FilterButton from './FilterComponents/FilterButton'
|
|
11
|
+
import SearchBar from './FilterComponents/SearchBar'
|
|
12
|
+
import FloatingContainer from './FloatingContainer'
|
|
26
13
|
import Form from './Form/Form'
|
|
27
14
|
import RenderForm from './Form/RenderForm'
|
|
15
|
+
import FullScreenLoader from './FullScreenLoader'
|
|
16
|
+
import ImageUpload from './ImageUpload'
|
|
28
17
|
import AsyncSearchSelect from './Input/AsyncSearchSelect'
|
|
29
|
-
import
|
|
30
|
-
import Helmet from './Layout/Helmet'
|
|
31
|
-
import NavigationTabs from './Tabs/NavigationTabs'
|
|
32
|
-
import GlobalNetworkLoadingIndicator from './ErrorBoundary/GlobalNetworkLoadingIndicator'
|
|
18
|
+
import AppHeader from './Layout/Header'
|
|
33
19
|
import UserBox from './Layout/Header/HeaderActions/UserBox'
|
|
20
|
+
import Helmet from './Layout/Helmet'
|
|
21
|
+
import LayoutWrapper from './Layout/LayoutWrapper'
|
|
22
|
+
import { SideMenuHeader } from './Layout/SideMenuHeader'
|
|
23
|
+
import SideNav from './Layout/SideNav'
|
|
24
|
+
import { ListItemButton } from './ListItemButton'
|
|
25
|
+
import LoginForm from './LoginForm'
|
|
26
|
+
import { DialogButton, DrawerButton } from './ModalButtons'
|
|
34
27
|
import { CustomDialog } from './ModalButtons/DialogButton'
|
|
35
28
|
import { CustomDrawer } from './ModalButtons/DrawerButton'
|
|
36
|
-
import ExcelJsonUpload from './ExcelToJsonInput/ExcelJsonUpload'
|
|
37
|
-
import ExcelToJsonInput from './ExcelToJsonInput'
|
|
38
|
-
import ApplicationProfile from './ApplicationProfile'
|
|
39
|
-
import PrintStudentCard from './StudentCard'
|
|
40
29
|
import PopoverButton from './ModalButtons/PopoverButton'
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
import PageNotFound from './PageNotFound'
|
|
31
|
+
import ResetPassword from './ResetPassword'
|
|
32
|
+
import StepsHeader from './StepsHeader'
|
|
33
|
+
import PrintStudentCard from './StudentCard'
|
|
34
|
+
import { StyledTableContainer } from './StyledTableContainer'
|
|
35
|
+
import { Table as StyledTable } from './Table'
|
|
36
|
+
import NavigationTabs from './Tabs/NavigationTabs'
|
|
37
|
+
import TabsContainer from './Tabs/TabsContainer'
|
|
38
|
+
import UploadButton from './UploadButton'
|
|
39
|
+
import UploadDocument from './UploadDocument'
|
|
40
|
+
import UploadFileDialog from './UploadFileDialog'
|
|
44
41
|
export { default as ActionButton } from './ActionButton'
|
|
45
|
-
export { default as Breadcrumbs } from './Breadcrumbs'
|
|
46
|
-
export { default as Table } from './Tables/BasicTable'
|
|
47
|
-
export { default as Spinner } from './Spinner'
|
|
48
42
|
export { default as AutocompleteSearch } from './AutocompleteSearch'
|
|
43
|
+
export { default as Breadcrumbs } from './Breadcrumbs'
|
|
44
|
+
export { default as Card } from './Card'
|
|
45
|
+
export { default as CardsGrid } from './CardsGrid'
|
|
46
|
+
export { default as DividerHeading } from './DividerHeading'
|
|
47
|
+
export { default as DropDownButton } from './DropDownButton'
|
|
48
|
+
export { default as Image } from './Image'
|
|
49
49
|
export { default as JsonPreview } from './JsonPreview'
|
|
50
50
|
export { default as LabelValue } from './LabelValue'
|
|
51
51
|
export { LinearProgress } from './LinearProgress'
|
|
52
52
|
export { default as MediaRow } from './MediaRow'
|
|
53
53
|
export { default as NoDataIllustration } from './NoDataIllustration'
|
|
54
|
+
export { PageContent } from './PageContent'
|
|
55
|
+
export { default as PageHeader } from './PageHeader'
|
|
56
|
+
export { default as useConfirm } from './PopupConfirm/useConfirm'
|
|
57
|
+
export { default as ReactJoyRide } from './ReactJoyRide'
|
|
58
|
+
export { default as Spinner } from './Spinner'
|
|
54
59
|
export { default as SwitchButton } from './SwitchButton'
|
|
60
|
+
export { default as Table } from './Tables/BasicTable'
|
|
61
|
+
export { default as TableFooter } from './Tables/BasicTable/TableFooter'
|
|
62
|
+
export { default as ReactTable } from './Tables/ReactTable'
|
|
55
63
|
export { default as Tabs } from './Tabs/Tabs'
|
|
56
64
|
export { default as ToastContainer } from './ToastContainer'
|
|
57
|
-
export { default as Card } from './Card'
|
|
58
|
-
export { default as CardsGrid } from './CardsGrid'
|
|
59
|
-
export { default as DividerHeading } from './DividerHeading'
|
|
60
|
-
export { default as ReactTable } from './Tables/ReactTable'
|
|
61
|
-
export { default as TableFooter } from './Tables/BasicTable/TableFooter'
|
|
62
|
-
export { default as DropDownButton } from './DropDownButton'
|
|
63
|
-
export { default as useConfirm } from './PopupConfirm/useConfirm'
|
|
64
|
-
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
AppHeader,
|
|
67
|
+
ApplicationProfile,
|
|
68
|
+
AsyncSearchSelect,
|
|
69
|
+
ChangePassword,
|
|
67
70
|
Chips,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
TabsContainer,
|
|
71
|
-
StyledTableContainer,
|
|
72
|
-
SearchBar,
|
|
73
|
-
DrawerButton,
|
|
74
|
-
DialogButton,
|
|
71
|
+
CustomDialog,
|
|
72
|
+
CustomDrawer,
|
|
75
73
|
DetailsGrid,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
StyledTable,
|
|
74
|
+
DialogButton,
|
|
75
|
+
DialogWrapper,
|
|
76
|
+
DrawerButton,
|
|
80
77
|
ErrorBoundary,
|
|
78
|
+
ExcelJsonUpload,
|
|
79
|
+
ExcelToJsonInput,
|
|
80
|
+
FilterButton,
|
|
81
|
+
FloatingContainer,
|
|
82
|
+
Form,
|
|
81
83
|
FullScreenLoader,
|
|
84
|
+
GlobalNetworkLoadingIndicator,
|
|
85
|
+
Helmet,
|
|
86
|
+
ImageUpload,
|
|
87
|
+
LayoutWrapper,
|
|
88
|
+
ListItemButton,
|
|
82
89
|
LoginForm,
|
|
90
|
+
NavigationTabs,
|
|
91
|
+
PageNotFound,
|
|
92
|
+
PopoverButton,
|
|
93
|
+
PrintStudentCard,
|
|
94
|
+
RenderForm,
|
|
83
95
|
ResetPassword,
|
|
96
|
+
SearchBar,
|
|
84
97
|
SideMenuHeader,
|
|
85
|
-
ListItemButton,
|
|
86
|
-
LayoutWrapper,
|
|
87
|
-
PageNotFound,
|
|
88
98
|
SideNav,
|
|
89
|
-
|
|
99
|
+
StepsHeader,
|
|
100
|
+
StyledTable,
|
|
101
|
+
StyledTableContainer,
|
|
102
|
+
TabsContainer,
|
|
90
103
|
UploadButton,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
RenderForm,
|
|
94
|
-
AsyncSearchSelect,
|
|
95
|
-
FilterButton,
|
|
96
|
-
Helmet,
|
|
97
|
-
NavigationTabs,
|
|
98
|
-
CustomDialog,
|
|
99
|
-
CustomDrawer,
|
|
100
|
-
GlobalNetworkLoadingIndicator,
|
|
104
|
+
UploadDocument,
|
|
105
|
+
UploadFileDialog,
|
|
101
106
|
UserBox,
|
|
102
|
-
ExcelJsonUpload,
|
|
103
|
-
ExcelToJsonInput,
|
|
104
|
-
ApplicationProfile,
|
|
105
|
-
PrintStudentCard,
|
|
106
|
-
PopoverButton,
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
export * from './UploadButton/types'
|
|
110
109
|
export * from './HookForm'
|
|
111
|
-
export * from './Input'
|
|
112
110
|
export * from './IconButtons'
|
|
111
|
+
export * from './Input'
|
|
112
|
+
export * from './UploadButton/types'
|