@campxdev/shared 1.10.15 → 1.10.17

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.15",
3
+ "version": "1.10.17",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -14,7 +14,7 @@ export default function HeaderActions({
14
14
  <>
15
15
  <InstitutionsDropDown />
16
16
  {/* <SearchButton /> */}
17
- <FreshDeskHelpButton />
17
+ {/* <FreshDeskHelpButton /> */}
18
18
  {cogWheelMenu?.length ? <CogWheelMenu menu={cogWheelMenu} /> : null}
19
19
  <UserBox fullName={fullName} actions={userBoxActions} />
20
20
  </>
@@ -75,14 +75,14 @@ export default function Helmet({
75
75
  {extraMetaTags}
76
76
  <link rel="icon" href={favicon} />
77
77
  <link rel="apple-touch-icon" href={favicon} />
78
- {!isLocalHost && (
78
+ {/* {!isLocalHost && (
79
79
  <script
80
80
  type="text/javascript"
81
81
  src="//in.fw-cdn.com/30814322/430238.js"
82
82
  defer
83
83
  />
84
- )}
85
- {!isLocalHost && <script defer>{getInnerHtml(user)}</script>}
84
+ )} */}
85
+ {/* {!isLocalHost && <script defer>{getInnerHtml(user)}</script>} */}
86
86
  {/* {!isLocalHost && (
87
87
  <script async defer>
88
88
  {freshDeskInnerHtml}
@@ -95,14 +95,6 @@ export default function Helmet({
95
95
  defer
96
96
  ></script>
97
97
  )} */}
98
- <style type="text/css">
99
- {`
100
- #fc_frame {
101
- bottom: 0 !important;
102
- right: 0 !important;
103
- }
104
- `}
105
- </style>
106
98
  </ReactHelmet>
107
99
  )
108
100
  }
@@ -1,6 +1,7 @@
1
1
  import { Tab } from '@mui/material'
2
2
  import { ChangeEvent, ReactNode, useEffect, useState } from 'react'
3
3
  import { StyledComponentWrapper, StyledContainer, StyledTabs } from './styles'
4
+ import ErrorBoundary from '../ErrorBoundary'
4
5
 
5
6
  export interface TabsContainerProps {
6
7
  tabs: {
@@ -46,7 +47,9 @@ export default function TabsContainer({
46
47
  ))}
47
48
  </StyledTabs>
48
49
  <StyledComponentWrapper containerVariant={conatinerVariant}>
49
- {tabs.find((tab) => tab.key === currentTab)?.component}
50
+ <ErrorBoundary>
51
+ {tabs.find((tab) => tab.key === currentTab)?.component}
52
+ </ErrorBoundary>
50
53
  </StyledComponentWrapper>
51
54
  </StyledContainer>
52
55
  )
@@ -62,7 +62,6 @@ export default function Providers({ children }: { children: ReactNode }) {
62
62
  <DialogProvider>
63
63
  {children}
64
64
  <GlobalNetworkLoadingIndicator />
65
- <FreshChatButton />
66
65
  <RootModal />
67
66
  <ToastContainer />
68
67
  </DialogProvider>
@@ -0,0 +1,11 @@
1
+ export default function buffertoCSV({ data, filename }) {
2
+ const blob = new Blob([data], { type: 'text/csv' })
3
+ const url = URL.createObjectURL(blob)
4
+ const link = document.createElement('a')
5
+
6
+ link.href = url
7
+ link.download = `${filename}.csv`
8
+ link.click()
9
+
10
+ URL.revokeObjectURL(url)
11
+ }
@@ -1,6 +1,7 @@
1
1
  export { default as getUrlParams } from './getUrlParams'
2
2
  export { default as arrayPadEnd } from './arrayPadEnd'
3
3
  export { default as romanize } from './romanize'
4
+ export { default as buffertoCSV } from './buffertoCSV'
4
5
 
5
6
  export { default as withRouteWrapper } from './withRouteWrapper'
6
7
  export { default as withSuspense } from './withSuspense'