@campxdev/shared 1.10.86 → 1.10.87

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.10.86",
3
+ "version": "1.10.87",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -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 === 'skip') {
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
- if (data.action == 'close' || data.action == 'skip') setRun(false)
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={steps}
66
+ steps={customSteps}
64
67
  styles={{
65
68
  buttonNext: {
66
- backgroundColor: 'black',
67
- color: 'yellow',
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: 'cement',
78
+ backgroundColor: 'transparent',
75
79
  color: 'black',
76
80
  borderRadius: '4px',
77
- height: '30px',
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}