@campxdev/shared 1.10.86 → 1.10.88
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
CHANGED
|
@@ -22,9 +22,6 @@ import SearchBar from '../FilterComponents/SearchBar'
|
|
|
22
22
|
import { DialogButton, DrawerButton } from '../ModalButtons'
|
|
23
23
|
import Table from '../Tables/BasicTable/Table'
|
|
24
24
|
import DepartmentFilter from './DepartmentFilter'
|
|
25
|
-
// import Arrow, { DIRECTION } from 'react-arrows'
|
|
26
|
-
import '../CustomJoyRideStyles.css'
|
|
27
|
-
|
|
28
25
|
interface ApplicationProfileProps {
|
|
29
26
|
application:
|
|
30
27
|
| 'exams'
|
|
@@ -5,6 +5,7 @@ import ReactJoyride, { Step } from 'react-joyride'
|
|
|
5
5
|
import { useQuery } from 'react-query'
|
|
6
6
|
import axios from '../config/axios'
|
|
7
7
|
import './CustomJoyRideStyles.css'
|
|
8
|
+
import Spinner from './Spinner'
|
|
8
9
|
|
|
9
10
|
function ReactJoyRide({
|
|
10
11
|
steps,
|
|
@@ -26,11 +27,7 @@ function ReactJoyRide({
|
|
|
26
27
|
fetchTours,
|
|
27
28
|
)
|
|
28
29
|
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (toursData && !toursData.includes(tourName)) {
|
|
31
|
-
setRun(true)
|
|
32
|
-
}
|
|
33
|
-
}, [toursLoading])
|
|
30
|
+
useEffect(() => {}, [run])
|
|
34
31
|
|
|
35
32
|
const completeTour = async () => {
|
|
36
33
|
try {
|
|
@@ -43,15 +40,21 @@ function ReactJoyRide({
|
|
|
43
40
|
const handleJoyRideCallback = (data) => {
|
|
44
41
|
const { action, status } = data
|
|
45
42
|
|
|
46
|
-
if (action === '
|
|
47
|
-
completeTour()
|
|
48
|
-
}
|
|
49
|
-
if (status === 'finished' || status === 'skip' || status === 'closed') {
|
|
43
|
+
if (action === 'reset') {
|
|
50
44
|
setRun(false)
|
|
51
45
|
completeTour()
|
|
52
46
|
}
|
|
47
|
+
}
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
const customSteps = steps.map((step) => ({
|
|
50
|
+
...step,
|
|
51
|
+
content: (
|
|
52
|
+
<div style={{ fontFamily: 'Roboto, sans-serif' }}>{step.content}</div>
|
|
53
|
+
),
|
|
54
|
+
}))
|
|
55
|
+
|
|
56
|
+
if (toursLoading) {
|
|
57
|
+
return <Spinner />
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
return (
|
|
@@ -60,25 +63,28 @@ function ReactJoyRide({
|
|
|
60
63
|
<ReactJoyride
|
|
61
64
|
callback={handleJoyRideCallback}
|
|
62
65
|
run={run}
|
|
63
|
-
steps={
|
|
66
|
+
steps={customSteps}
|
|
64
67
|
styles={{
|
|
65
68
|
buttonNext: {
|
|
66
|
-
backgroundColor: '
|
|
67
|
-
color: '
|
|
69
|
+
backgroundColor: '#D27D2D',
|
|
70
|
+
color: 'white',
|
|
68
71
|
height: '28px',
|
|
69
72
|
width: '100px',
|
|
70
73
|
padding: '0px',
|
|
74
|
+
fontFamily: 'Roboto, sans-serif',
|
|
71
75
|
},
|
|
72
76
|
|
|
73
77
|
buttonBack: {
|
|
74
|
-
backgroundColor: '
|
|
78
|
+
backgroundColor: 'transparent',
|
|
75
79
|
color: 'black',
|
|
76
80
|
borderRadius: '4px',
|
|
77
|
-
height: '
|
|
81
|
+
height: '28px',
|
|
78
82
|
width: '100px',
|
|
79
83
|
gap: '10px',
|
|
80
84
|
marginLeft: '5px',
|
|
81
85
|
padding: '0px',
|
|
86
|
+
border: '1px solid black',
|
|
87
|
+
fontFamily: 'Roboto, sans-serif',
|
|
82
88
|
},
|
|
83
89
|
|
|
84
90
|
buttonSkip: {
|
|
@@ -92,6 +98,7 @@ function ReactJoyRide({
|
|
|
92
98
|
top: '0px',
|
|
93
99
|
position: 'absolute',
|
|
94
100
|
lineHeight: 1,
|
|
101
|
+
fontFamily: 'Roboto, sans-serif',
|
|
95
102
|
},
|
|
96
103
|
}}
|
|
97
104
|
continuous
|
|
@@ -101,6 +108,12 @@ function ReactJoyRide({
|
|
|
101
108
|
disableOverlayClose
|
|
102
109
|
disableScrolling
|
|
103
110
|
hideCloseButton
|
|
111
|
+
locale={{
|
|
112
|
+
last: 'Finish',
|
|
113
|
+
next: 'Next',
|
|
114
|
+
skip: 'Skip',
|
|
115
|
+
back: 'Previous',
|
|
116
|
+
}}
|
|
104
117
|
/>
|
|
105
118
|
|
|
106
119
|
{children}
|
|
@@ -15,6 +15,7 @@ export interface TabsContainerProps {
|
|
|
15
15
|
onTabChange?: (tabKey: string) => void
|
|
16
16
|
tabUnderlineColor?: string
|
|
17
17
|
tabMobileUnderlineColor?: string
|
|
18
|
+
currentTabIndex?: number
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export default function TabsContainer({
|
|
@@ -24,15 +25,16 @@ export default function TabsContainer({
|
|
|
24
25
|
onTabChange,
|
|
25
26
|
tabUnderlineColor,
|
|
26
27
|
tabMobileUnderlineColor,
|
|
28
|
+
currentTabIndex = 0,
|
|
27
29
|
}: TabsContainerProps) {
|
|
28
|
-
const [currentTab, setCurrentTab] = useState(tabs[
|
|
30
|
+
const [currentTab, setCurrentTab] = useState(tabs[currentTabIndex].key)
|
|
29
31
|
|
|
30
32
|
const handleTabsChange = (_event: ChangeEvent<{}>, value: string): void => {
|
|
31
33
|
setCurrentTab(value)
|
|
32
34
|
onTabChange && onTabChange(value)
|
|
33
35
|
}
|
|
34
36
|
useEffect(() => {
|
|
35
|
-
setCurrentTab(tabs[
|
|
37
|
+
setCurrentTab(tabs[currentTabIndex].key)
|
|
36
38
|
}, [])
|
|
37
39
|
|
|
38
40
|
return (
|