@campxdev/shared 1.10.33 → 1.10.35

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.33",
3
+ "version": "1.10.35",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -1,9 +1,15 @@
1
- import { Box } from '@mui/material'
1
+ import { Box, styled } from '@mui/material'
2
2
  import UserBox from './UserBox'
3
3
  import CogWheelMenu from './CogWheelMenu'
4
4
  import FreshDeskHelpButton from './FreshDeskHelpButton'
5
5
  import InstitutionsDropDown from '../../../Institutions/InstitutionsDropdown'
6
6
  import SearchButton from '../Search/SearchButton'
7
+ import { NotificationsNoneOutlined } from '@mui/icons-material'
8
+ import { useEffect } from 'react'
9
+
10
+ const StyledBeamerBox = styled(Box)(() => ({
11
+ width: '60px',
12
+ }))
7
13
 
8
14
  export default function HeaderActions({
9
15
  cogWheelMenu,
@@ -15,6 +21,7 @@ export default function HeaderActions({
15
21
  <InstitutionsDropDown />
16
22
  {/* <SearchButton /> */}
17
23
  {/* <FreshDeskHelpButton /> */}
24
+ <StyledBeamerBox></StyledBeamerBox>
18
25
  {cogWheelMenu?.length ? <CogWheelMenu menu={cogWheelMenu} /> : null}
19
26
  <UserBox fullName={fullName} actions={userBoxActions} />
20
27
  </>
@@ -25,10 +25,23 @@ const freshDeskInnerHtml = `
25
25
 
26
26
  const getbeamerInnerHtml = `
27
27
  var beamer_config = {
28
- product_id : "ThEQzGKL56777"
28
+ product_id : "ThEQzGKL56777",
29
+
29
30
  };
30
31
  `
31
32
 
33
+ const getBeamerStyles = `
34
+ #beamerSelector {
35
+ height: 42px;
36
+ width: 42px;
37
+ top: 12px;
38
+ right: 74px;
39
+ box-shadow: none;
40
+ background-color: #121212;
41
+
42
+ }
43
+ `
44
+
32
45
  const getInnerHtml = (user: any) => {
33
46
  if (isLocalHost) {
34
47
  return ''
@@ -82,14 +95,13 @@ export default function Helmet({
82
95
  {extraMetaTags}
83
96
  <link rel="icon" href={favicon} />
84
97
  <link rel="apple-touch-icon" href={favicon} />
98
+ <style>{getBeamerStyles}</style>
99
+ <script>{getbeamerInnerHtml}</script>
85
100
  {isDevelopment && (
86
- <>
87
- <script>{getbeamerInnerHtml}</script>
88
- <script
89
- type="text/javascript"
90
- src="https://app.getbeamer.com/js/beamer-embed.js"
91
- ></script>
92
- </>
101
+ <script
102
+ type="text/javascript"
103
+ src="https://app.getbeamer.com/js/beamer-embed.js"
104
+ ></script>
93
105
  )}
94
106
 
95
107
  {/* {!isLocalHost && (
@@ -11,6 +11,7 @@ import {
11
11
  import { TransitionProps } from '@mui/material/transitions'
12
12
  import { forwardRef, ReactNode, useState } from 'react'
13
13
  import { SCROLLBAR_DARK } from '../../theme/muiTheme'
14
+ import ErrorBoundary from '../ErrorBoundary/ErrorBoundary'
14
15
 
15
16
  const StyledDialogHeader = styled(Box)(() => ({
16
17
  height: '64px',
@@ -124,7 +125,9 @@ export const CustomDialog = ({
124
125
  </IconButton>
125
126
  </StyledDialogHeader>
126
127
  )}
127
- <StyledDialogContent>{content({ close: onClose })}</StyledDialogContent>
128
+ <StyledDialogContent>
129
+ <ErrorBoundary>{content({ close: onClose })}</ErrorBoundary>
130
+ </StyledDialogContent>
128
131
  </Dialog>
129
132
  )
130
133
  }
@@ -10,6 +10,7 @@ import {
10
10
  } from '@mui/material'
11
11
  import { ReactNode, useState } from 'react'
12
12
  import { SCROLLBAR_DARK } from '../../theme/muiTheme'
13
+ import ErrorBoundary from '../ErrorBoundary/ErrorBoundary'
13
14
 
14
15
  const StyledDrawerHeader = styled(Box)(({ theme }) => ({
15
16
  height: '64px',
@@ -109,7 +110,9 @@ export const CustomDrawer = ({
109
110
  <Close />
110
111
  </IconButton>
111
112
  </StyledDrawerHeader>
112
- <StyledDrawerContent>{content({ close: onClose })}</StyledDrawerContent>
113
+ <StyledDrawerContent>
114
+ <ErrorBoundary>{content({ close: onClose })}</ErrorBoundary>
115
+ </StyledDrawerContent>
113
116
  </Drawer>
114
117
  )
115
118
  }
@@ -118,7 +118,7 @@ export const ProfileApplicationType = [
118
118
  value: 'hostels',
119
119
  },
120
120
  {
121
- label: 'Commute',
122
- value: 'commute',
121
+ label: 'CommuteX',
122
+ value: 'commute_x',
123
123
  },
124
124
  ]