@campxdev/shared 0.3.12 → 0.3.13

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.
Files changed (181) hide show
  1. package/antd.customize.less +73 -73
  2. package/exports.ts +15 -15
  3. package/package.json +51 -51
  4. package/src/assets/fonts/avenir/index.ts +2 -2
  5. package/src/assets/fonts/poppins/index.ts +7 -7
  6. package/src/assets/images/index.ts +16 -16
  7. package/src/components/ActionButton.tsx +28 -28
  8. package/src/components/Attachment.tsx +26 -26
  9. package/src/components/AutocompleteSearch/AutocompleteSearch.tsx +57 -57
  10. package/src/components/AutocompleteSearch/index.tsx +1 -1
  11. package/src/components/Breadcrumbs.tsx +73 -73
  12. package/src/components/Card.tsx +97 -97
  13. package/src/components/CardsGrid.tsx +28 -28
  14. package/src/components/Chips.tsx +77 -77
  15. package/src/components/Detail.tsx +15 -15
  16. package/src/components/DetailsGrid.tsx +52 -52
  17. package/src/components/DividerHeading.tsx +40 -40
  18. package/src/components/DrawerWrapper/DialogWrapper.tsx +63 -63
  19. package/src/components/DrawerWrapper/DrawerTemplate.tsx +53 -53
  20. package/src/components/DrawerWrapper/DrawerWrapper.tsx +53 -53
  21. package/src/components/DropDownButton.tsx +184 -184
  22. package/src/components/ErrorBoundary/ErrorBoundary.tsx +28 -28
  23. package/src/components/ErrorBoundary/ErrorFallback.tsx +180 -180
  24. package/src/components/ErrorBoundary/GlobalNetworkLoadingIndicator.tsx +13 -13
  25. package/src/components/ErrorBoundary/index.tsx +1 -1
  26. package/src/components/ErrorBox.tsx +42 -42
  27. package/src/components/FloatingContainer.tsx +26 -26
  28. package/src/components/FullCalendar/Actions.tsx +162 -162
  29. package/src/components/FullCalendar/FullCalendarWrapper.tsx +54 -54
  30. package/src/components/FullScreenLoader.tsx +19 -19
  31. package/src/components/HookForm/AutoCompleteSearch.tsx +143 -143
  32. package/src/components/HookForm/DatePicker.tsx +65 -65
  33. package/src/components/HookForm/DateTimePicker.tsx +70 -70
  34. package/src/components/HookForm/FormLabel.tsx +14 -14
  35. package/src/components/HookForm/MultiCheckbox.tsx +82 -82
  36. package/src/components/HookForm/MultiSelect.tsx +100 -100
  37. package/src/components/HookForm/RadioGroup.tsx +112 -112
  38. package/src/components/HookForm/SingleCheckbox.tsx +46 -46
  39. package/src/components/HookForm/SingleSelect.tsx +93 -93
  40. package/src/components/HookForm/TextField.tsx +74 -74
  41. package/src/components/HookForm/TimePicker.tsx +82 -82
  42. package/src/components/HookForm/index.ts +23 -23
  43. package/src/components/IconButtons/IconButtons.tsx +137 -137
  44. package/src/components/IconButtons/Icons.tsx +268 -268
  45. package/src/components/IconButtons/assets/edit.svg +4 -4
  46. package/src/components/IconButtons/assets/eye.svg +6 -6
  47. package/src/components/IconButtons/assets/trash.svg +7 -7
  48. package/src/components/IconButtons/index.tsx +8 -8
  49. package/src/components/IconLabel.tsx +37 -37
  50. package/src/components/Image/Image.tsx +43 -43
  51. package/src/components/Image/index.tsx +1 -1
  52. package/src/components/ImageUpload.tsx +98 -98
  53. package/src/components/Input/AutoCompleteSearch.tsx +143 -143
  54. package/src/components/Input/DatePicker.tsx +60 -60
  55. package/src/components/Input/DateRangePicker.tsx +131 -131
  56. package/src/components/Input/DateTimePicker.tsx +70 -70
  57. package/src/components/Input/FormLabel.tsx +14 -14
  58. package/src/components/Input/MultiCheckbox.tsx +79 -79
  59. package/src/components/Input/MultiSelect.tsx +52 -52
  60. package/src/components/Input/RadioGroup.tsx +55 -55
  61. package/src/components/Input/SingleCheckbox.tsx +23 -23
  62. package/src/components/Input/SingleSelect.tsx +139 -139
  63. package/src/components/Input/TextField.tsx +50 -50
  64. package/src/components/Input/TimePicker.tsx +82 -82
  65. package/src/components/Input/index.ts +26 -26
  66. package/src/components/JsonPreview/JsonPreview.tsx +7 -7
  67. package/src/components/JsonPreview/index.tsx +1 -1
  68. package/src/components/LabelValue/LabelValue.tsx +21 -21
  69. package/src/components/LabelValue/index.tsx +1 -1
  70. package/src/components/Layout/ChangePassword.tsx +49 -49
  71. package/src/components/Layout/Header/AppHeader.tsx +120 -120
  72. package/src/components/Layout/Header/AppsMenu.tsx +85 -85
  73. package/src/components/Layout/Header/CogWheelMenu.tsx +33 -33
  74. package/src/components/Layout/Header/FreshDeskHelpButton.tsx +19 -19
  75. package/src/components/Layout/Header/Notification.tsx +13 -13
  76. package/src/components/Layout/Header/UserBox.tsx +42 -42
  77. package/src/components/Layout/Header/applications.tsx +60 -60
  78. package/src/components/Layout/Header/assets/index.ts +7 -7
  79. package/src/components/Layout/Header/icons.tsx +57 -57
  80. package/src/components/Layout/Header/index.tsx +1 -1
  81. package/src/components/Layout/Header/styles.tsx +91 -91
  82. package/src/components/LinearProgress.tsx +19 -19
  83. package/src/components/LoginForm.tsx +103 -103
  84. package/src/components/MediaRow/MediaRow.tsx +69 -69
  85. package/src/components/MediaRow/index.tsx +1 -1
  86. package/src/components/MenuButton.tsx +103 -103
  87. package/src/components/ModalButtons/DialogButton.tsx +85 -85
  88. package/src/components/ModalButtons/DrawerButton.tsx +89 -89
  89. package/src/components/ModalButtons/index.tsx +4 -4
  90. package/src/components/NoDataIllustration/NoDataIllustration.tsx +32 -32
  91. package/src/components/NoDataIllustration/index.tsx +1 -1
  92. package/src/components/PageContent.tsx +17 -17
  93. package/src/components/PageHeader.tsx +52 -52
  94. package/src/components/PageNotFound.tsx +25 -25
  95. package/src/components/PopupConfirm/ConfirmContextProvider.tsx +40 -40
  96. package/src/components/PopupConfirm/PopupConfirm.tsx +34 -34
  97. package/src/components/PopupConfirm/index.tsx +1 -1
  98. package/src/components/PopupConfirm/useConfirm.ts +47 -47
  99. package/src/components/Row/Row.tsx +24 -24
  100. package/src/components/Row/index.tsx +1 -1
  101. package/src/components/SearchBar/SearchBar.tsx +53 -53
  102. package/src/components/SearchBar/index.tsx +1 -1
  103. package/src/components/Spinner.tsx +18 -18
  104. package/src/components/StepsHeader/StepsHeader.tsx +115 -115
  105. package/src/components/StepsHeader/index.tsx +1 -1
  106. package/src/components/Styled/OutlinedIconButton.tsx +7 -7
  107. package/src/components/Styled/index.tsx +1 -1
  108. package/src/components/StyledTableContainer.tsx +33 -33
  109. package/src/components/Swiper/Swiper.tsx +39 -39
  110. package/src/components/Swiper/index.tsx +1 -1
  111. package/src/components/SwitchButton/SwitchButton.tsx +41 -41
  112. package/src/components/SwitchButton/index.tsx +1 -1
  113. package/src/components/Table.tsx +42 -42
  114. package/src/components/TableComponent/BatchActionsHeader.tsx +58 -58
  115. package/src/components/TableComponent/Icons/index.tsx +50 -50
  116. package/src/components/TableComponent/ReactTable.tsx +293 -293
  117. package/src/components/TableComponent/RenderTableBody.tsx +64 -64
  118. package/src/components/TableComponent/TableFooter/TableFooter.tsx +102 -102
  119. package/src/components/TableComponent/TableFooter/index.tsx +1 -1
  120. package/src/components/TableComponent/TableFooter/styles.tsx +28 -28
  121. package/src/components/TableComponent/index.tsx +221 -221
  122. package/src/components/TableComponent/react-table-config.d.ts +129 -129
  123. package/src/components/TableComponent/styles.tsx +173 -173
  124. package/src/components/TableComponent/types.ts +57 -57
  125. package/src/components/Tabs/Tabs.tsx +52 -52
  126. package/src/components/Tabs/TabsContainer.tsx +50 -50
  127. package/src/components/Tabs/index.tsx +1 -1
  128. package/src/components/Tabs/styles.tsx +55 -55
  129. package/src/components/ToastContainer/ToastContainer.tsx +42 -42
  130. package/src/components/ToastContainer/index.tsx +1 -1
  131. package/src/components/UploadButton/UploadButton.tsx +98 -98
  132. package/src/components/UploadButton/index.tsx +1 -1
  133. package/src/components/UploadButton/types.ts +14 -14
  134. package/src/components/UploadDocument/UploadDocument.tsx +108 -108
  135. package/src/components/UploadDocument/index.tsx +1 -1
  136. package/src/components/UploadFileDialog/UploadFileDialog.tsx +240 -240
  137. package/src/components/UploadFileDialog/index.tsx +1 -1
  138. package/src/components/index.ts +67 -67
  139. package/src/config/axios.ts +73 -72
  140. package/src/constants/UIConstants.ts +97 -97
  141. package/src/constants/formValidations.ts +6 -6
  142. package/src/constants/index.ts +5 -5
  143. package/src/constants/isDevelopment.ts +3 -3
  144. package/src/constants/permissions.ts +67 -67
  145. package/src/constants/validateMessages.ts +12 -12
  146. package/src/contexts/LoginFormProvider.tsx +39 -39
  147. package/src/contexts/Providers.tsx +27 -27
  148. package/src/contexts/QueryClientProvider.tsx +22 -22
  149. package/src/hooks/index.ts +3 -3
  150. package/src/hooks/useAuth.ts +77 -77
  151. package/src/hooks/useFetch.ts +53 -53
  152. package/src/hooks/useRouter.ts +31 -31
  153. package/src/layouts/ComponentsLayout.tsx +3 -3
  154. package/src/permissions/PageWithPermission.tsx +18 -18
  155. package/src/permissions/PermissionDeniedPage.tsx +16 -16
  156. package/src/permissions/PermissionsStore.ts +291 -291
  157. package/src/permissions/ValidateAccess.tsx +18 -18
  158. package/src/permissions/index.ts +3 -3
  159. package/src/react-app-env.d.ts +1 -1
  160. package/src/shared-state/AssetsStore.ts +15 -15
  161. package/src/shared-state/UserStore.ts +13 -13
  162. package/src/shared-state/index.ts +3 -3
  163. package/src/theme/App.less +3 -3
  164. package/src/theme/MuiThemeProvider.tsx +13 -13
  165. package/src/theme/customCssBaseline.ts +78 -78
  166. package/src/theme/index.css +75 -75
  167. package/src/theme/muiTheme.ts +516 -516
  168. package/src/theme/theme.d.ts +75 -75
  169. package/src/utils/alphabet.ts +23 -23
  170. package/src/utils/arrayPadEnd.ts +3 -3
  171. package/src/utils/formatCurrency.ts +9 -9
  172. package/src/utils/getUrlParams.ts +5 -5
  173. package/src/utils/index.ts +8 -8
  174. package/src/utils/logout.ts +23 -23
  175. package/src/utils/ordinalSuffixOf.ts +14 -14
  176. package/src/utils/romanize.ts +40 -40
  177. package/src/utils/withLocalization.tsx +11 -11
  178. package/src/utils/withRouteWrapper.tsx +26 -26
  179. package/src/utils/withSuspense.tsx +6 -6
  180. package/styled-components.tsx +60 -60
  181. package/tsconfig.json +21 -21
@@ -1,73 +1,73 @@
1
- @font-family: Avenir;
2
-
3
- /*
4
- COLORS
5
- */
6
-
7
- @primary-color: #1e19f5; // primary color for all components
8
- @secondary-color: #1d1d1d;
9
- @success-color: #52c41a; // success state color
10
- @warning-color: #faad14; // warning state color
11
- @error-color: #f5222d; // error state color
12
- @menu-highlight-color: #1d1d1d;
13
- // @link-color: #1890ff; // link color
14
- @heading-color: rgba(0, 0, 0, 0.85); // heading text color
15
- @text-color: rgba(0, 0, 0, 0.65); // major text color
16
- @text-color-secondary: rgba(0, 0, 0, 0.45); // secondary text color
17
- @disabled-color: rgba(0, 0, 0, 0.25); // disable state color
18
- @border-color-base: #d9d9d9; // major border color
19
- @body-background: #fff;
20
- // Base background color for most components
21
- @component-background: #fff;
22
-
23
- /*
24
- SIZES
25
- */
26
- @height-lg: 40px;
27
- @font-size-base: 14px; // major text font size
28
- @font-size-lg: @font-size-base + 2px;
29
- @border-radius-base: 10px; // major border radius
30
- @border-width-base: 1px;
31
- @line-height-base: 1.5715;
32
-
33
- // /*
34
- // VERTICAL PADDINGS
35
- // */
36
- // @padding-lg: 24px; // containers
37
- // @padding-md: 16px; // small containers and buttons
38
- // @padding-sm: 12px; // Form controls and items
39
- // @padding-xs: 8px; // small items
40
- // @padding-xss: 4px; // more small
41
-
42
- /*
43
- SHADOWS
44
- */
45
- @box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
46
- 0 6px 16px 0 rgba(0, 0, 0, 0.08), i 0 9px 28px 8px rgba(0, 0, 0, 0.05); // major shadow for layers
47
-
48
- /*
49
- TYPOGRAPHY
50
- */
51
- @heading-5-size: ceil(@font-size-base + 4px);
52
-
53
- /*
54
- COMPONENTS
55
- */
56
-
57
- //button
58
- @btn-height-lg: @height-lg;
59
- @btn-border-radius-base: @border-radius-base;
60
- @btn-border-radius-sm: @border-radius-base;
61
-
62
- //input
63
- @input-height-lg: @height-lg;
64
- @input-bg: @component-background;
65
-
66
- //Menu
67
- @menu-dark-bg: var(--secondary-dark);
68
- @menu-dark-item-active-bg: var(--secondary-light);
69
-
70
- //table
71
- @table-header-bg: #f2f2f2;
72
- @table-header-sort-active-bg: @table-header-bg;
73
- @table-border-radius-base: 0;
1
+ @font-family: Avenir;
2
+
3
+ /*
4
+ COLORS
5
+ */
6
+
7
+ @primary-color: #1e19f5; // primary color for all components
8
+ @secondary-color: #1d1d1d;
9
+ @success-color: #52c41a; // success state color
10
+ @warning-color: #faad14; // warning state color
11
+ @error-color: #f5222d; // error state color
12
+ @menu-highlight-color: #1d1d1d;
13
+ // @link-color: #1890ff; // link color
14
+ @heading-color: rgba(0, 0, 0, 0.85); // heading text color
15
+ @text-color: rgba(0, 0, 0, 0.65); // major text color
16
+ @text-color-secondary: rgba(0, 0, 0, 0.45); // secondary text color
17
+ @disabled-color: rgba(0, 0, 0, 0.25); // disable state color
18
+ @border-color-base: #d9d9d9; // major border color
19
+ @body-background: #fff;
20
+ // Base background color for most components
21
+ @component-background: #fff;
22
+
23
+ /*
24
+ SIZES
25
+ */
26
+ @height-lg: 40px;
27
+ @font-size-base: 14px; // major text font size
28
+ @font-size-lg: @font-size-base + 2px;
29
+ @border-radius-base: 10px; // major border radius
30
+ @border-width-base: 1px;
31
+ @line-height-base: 1.5715;
32
+
33
+ // /*
34
+ // VERTICAL PADDINGS
35
+ // */
36
+ // @padding-lg: 24px; // containers
37
+ // @padding-md: 16px; // small containers and buttons
38
+ // @padding-sm: 12px; // Form controls and items
39
+ // @padding-xs: 8px; // small items
40
+ // @padding-xss: 4px; // more small
41
+
42
+ /*
43
+ SHADOWS
44
+ */
45
+ @box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
46
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08), i 0 9px 28px 8px rgba(0, 0, 0, 0.05); // major shadow for layers
47
+
48
+ /*
49
+ TYPOGRAPHY
50
+ */
51
+ @heading-5-size: ceil(@font-size-base + 4px);
52
+
53
+ /*
54
+ COMPONENTS
55
+ */
56
+
57
+ //button
58
+ @btn-height-lg: @height-lg;
59
+ @btn-border-radius-base: @border-radius-base;
60
+ @btn-border-radius-sm: @border-radius-base;
61
+
62
+ //input
63
+ @input-height-lg: @height-lg;
64
+ @input-bg: @component-background;
65
+
66
+ //Menu
67
+ @menu-dark-bg: var(--secondary-dark);
68
+ @menu-dark-item-active-bg: var(--secondary-light);
69
+
70
+ //table
71
+ @table-header-bg: #f2f2f2;
72
+ @table-header-sort-active-bg: @table-header-bg;
73
+ @table-border-radius-base: 0;
package/exports.ts CHANGED
@@ -1,15 +1,15 @@
1
- export * from './src/components'
2
- export * from './src/constants'
3
- export {default as axios, axiosErrorToast} from './src/config/axios'
4
-
5
- export * from './src/permissions'
6
- export * from './src/utils'
7
- export * from './src/hooks'
8
- export {useModal} from './src/components/DrawerWrapper/DrawerWrapper'
9
- export {default as MuiThemeProvider} from './src/theme/MuiThemeProvider'
10
- export {default as ConfirmContextProvider} from './src/components/PopupConfirm/ConfirmContextProvider'
11
- export {default as DialogProvider} from './src/components/DrawerWrapper/DrawerWrapper'
12
- export {default as Providers} from './src/contexts/Providers'
13
-
14
- export * from './src/shared-state'
15
- export * from './src/assets/images'
1
+ export * from './src/components'
2
+ export * from './src/constants'
3
+ export {default as axios, axiosErrorToast} from './src/config/axios'
4
+
5
+ export * from './src/permissions'
6
+ export * from './src/utils'
7
+ export * from './src/hooks'
8
+ export {useModal} from './src/components/DrawerWrapper/DrawerWrapper'
9
+ export {default as MuiThemeProvider} from './src/theme/MuiThemeProvider'
10
+ export {default as ConfirmContextProvider} from './src/components/PopupConfirm/ConfirmContextProvider'
11
+ export {default as DialogProvider} from './src/components/DrawerWrapper/DrawerWrapper'
12
+ export {default as Providers} from './src/contexts/Providers'
13
+
14
+ export * from './src/shared-state'
15
+ export * from './src/assets/images'
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "@campxdev/shared",
3
- "version": "0.3.12",
4
- "main": "./exports.ts",
5
- "scripts": {
6
- "start": "react-scripts start",
7
- "build": "CI=false && react-scripts build",
8
- "test": "react-scripts test",
9
- "eject": "react-scripts eject"
10
- },
11
- "browserslist": {
12
- "production": [
13
- ">0.2%",
14
- "not dead",
15
- "not op_mini all"
16
- ],
17
- "development": [
18
- "last 1 chrome version",
19
- "last 1 firefox version",
20
- "last 1 safari version"
21
- ]
22
- },
23
- "dependencies": {
24
- "@emotion/react": "^11.9.0",
25
- "@emotion/styled": "^11.8.1",
26
- "@mui/icons-material": "^5.6.2",
27
- "@mui/material": "^5.7.0",
28
- "@mui/x-date-pickers": "^5.0.0-alpha.3",
29
- "@types/js-cookie": "^3.0.2",
30
- "@types/node": "^18.11.8",
31
- "axios": "^0.27.2",
32
- "date-fns": "^2.28.0",
33
- "js-cookie": "^3.0.1",
34
- "moment": "^2.29.4",
35
- "pullstate": "^1.24.0",
36
- "react": "^18.2.0",
37
- "react-dom": "^18.2.0",
38
- "react-error-boundary": "^3.1.4",
39
- "react-hook-form": "^7.31.1",
40
- "react-query": "^3.39.0",
41
- "react-router-dom": "^6.4.2",
42
- "react-table": "^7.8.0",
43
- "react-toastify": "^9.0.1",
44
- "styled-components": "^5.3.5",
45
- "swiper": "^8.1.5",
46
- "typescript": "^4.8.4"
47
- },
48
- "devDependencies": {
49
- "react-scripts": "^5.0.1"
50
- }
51
- }
1
+ {
2
+ "name": "@campxdev/shared",
3
+ "version": "0.3.13",
4
+ "main": "./exports.ts",
5
+ "scripts": {
6
+ "start": "react-scripts start",
7
+ "build": "CI=false && react-scripts build",
8
+ "test": "react-scripts test",
9
+ "eject": "react-scripts eject"
10
+ },
11
+ "browserslist": {
12
+ "production": [
13
+ ">0.2%",
14
+ "not dead",
15
+ "not op_mini all"
16
+ ],
17
+ "development": [
18
+ "last 1 chrome version",
19
+ "last 1 firefox version",
20
+ "last 1 safari version"
21
+ ]
22
+ },
23
+ "dependencies": {
24
+ "@emotion/react": "^11.9.0",
25
+ "@emotion/styled": "^11.8.1",
26
+ "@mui/icons-material": "^5.6.2",
27
+ "@mui/material": "^5.7.0",
28
+ "@mui/x-date-pickers": "^5.0.0-alpha.3",
29
+ "@types/js-cookie": "^3.0.2",
30
+ "@types/node": "^18.11.8",
31
+ "axios": "^0.27.2",
32
+ "date-fns": "^2.28.0",
33
+ "js-cookie": "^3.0.1",
34
+ "moment": "^2.29.4",
35
+ "pullstate": "^1.24.0",
36
+ "react": "^18.2.0",
37
+ "react-dom": "^18.2.0",
38
+ "react-error-boundary": "^3.1.4",
39
+ "react-hook-form": "^7.31.1",
40
+ "react-query": "^3.39.0",
41
+ "react-router-dom": "^6.4.2",
42
+ "react-table": "^7.8.0",
43
+ "react-toastify": "^9.0.1",
44
+ "styled-components": "^5.3.5",
45
+ "swiper": "^8.1.5",
46
+ "typescript": "^4.8.4"
47
+ },
48
+ "devDependencies": {
49
+ "react-scripts": "^5.0.1"
50
+ }
51
+ }
@@ -1,2 +1,2 @@
1
- const avenirFont = require('./Avenir.ttc')
2
- export { avenirFont }
1
+ const avenirFont = require('./Avenir.ttc')
2
+ export { avenirFont }
@@ -1,7 +1,7 @@
1
- //semibold, medium, light, regular
2
- const semiboldPoppins = require('./Poppins-SemiBold.ttf')
3
- const mediumPoppins = require('./Poppins-Medium.ttf')
4
- const lightPoppins = require('./Poppins-Light.ttf')
5
- const regularPoppins = require('./Poppins-Regular.ttf')
6
-
7
- export { semiboldPoppins, mediumPoppins, lightPoppins, regularPoppins }
1
+ //semibold, medium, light, regular
2
+ const semiboldPoppins = require('./Poppins-SemiBold.ttf')
3
+ const mediumPoppins = require('./Poppins-Medium.ttf')
4
+ const lightPoppins = require('./Poppins-Light.ttf')
5
+ const regularPoppins = require('./Poppins-Regular.ttf')
6
+
7
+ export { semiboldPoppins, mediumPoppins, lightPoppins, regularPoppins }
@@ -1,16 +1,16 @@
1
- const avatarImage = require("./avatar.png");
2
- const pagenotfound = require("./notfound.png");
3
- const permissiondenied = require("./403.png");
4
- const internalserver = require("./500.png");
5
- const unauth = require("./401.png");
6
- const nointernet = require("./nointernet.png");
7
- const campxLogoPrimary = require("./campx_logo__full_primary.png");
8
- export {
9
- avatarImage,
10
- campxLogoPrimary,
11
- pagenotfound,
12
- permissiondenied,
13
- internalserver,
14
- unauth,
15
- nointernet,
16
- };
1
+ const avatarImage = require("./avatar.png");
2
+ const pagenotfound = require("./notfound.png");
3
+ const permissiondenied = require("./403.png");
4
+ const internalserver = require("./500.png");
5
+ const unauth = require("./401.png");
6
+ const nointernet = require("./nointernet.png");
7
+ const campxLogoPrimary = require("./campx_logo__full_primary.png");
8
+ export {
9
+ avatarImage,
10
+ campxLogoPrimary,
11
+ pagenotfound,
12
+ permissiondenied,
13
+ internalserver,
14
+ unauth,
15
+ nointernet,
16
+ };
@@ -1,28 +1,28 @@
1
- import { Button, ButtonProps, CircularProgress } from '@mui/material'
2
- import React from 'react'
3
-
4
- interface ActionButtonProps extends ButtonProps {
5
- loading?: boolean
6
- [key: string]: any
7
- variant?: any
8
- }
9
-
10
- export default function ActionButton({
11
- children,
12
- loading,
13
- ...props
14
- }: ActionButtonProps) {
15
- return (
16
- <React.Fragment>
17
- <Button
18
- variant={!props?.variant ? 'contained' : props?.variant}
19
- color="primary"
20
- endIcon={loading ? <CircularProgress size={20} /> : null}
21
- disabled={loading}
22
- {...props}
23
- >
24
- {children}
25
- </Button>
26
- </React.Fragment>
27
- )
28
- }
1
+ import { Button, ButtonProps, CircularProgress } from '@mui/material'
2
+ import React from 'react'
3
+
4
+ interface ActionButtonProps extends ButtonProps {
5
+ loading?: boolean
6
+ [key: string]: any
7
+ variant?: any
8
+ }
9
+
10
+ export default function ActionButton({
11
+ children,
12
+ loading,
13
+ ...props
14
+ }: ActionButtonProps) {
15
+ return (
16
+ <React.Fragment>
17
+ <Button
18
+ variant={!props?.variant ? 'contained' : props?.variant}
19
+ color="primary"
20
+ endIcon={loading ? <CircularProgress size={20} /> : null}
21
+ disabled={loading}
22
+ {...props}
23
+ >
24
+ {children}
25
+ </Button>
26
+ </React.Fragment>
27
+ )
28
+ }
@@ -1,26 +1,26 @@
1
- import React from 'react'
2
- import styled from 'styled-components'
3
-
4
- interface AttachemntProps {
5
- name: string
6
- onClick?: Function
7
- actions?: any
8
- }
9
-
10
- const AttachmentContainer = styled.div`
11
- background: rgba(0, 0, 0, 0.1);
12
- border-radius: 8px;
13
- padding: 8px;
14
- display: flex;
15
- justify-content: space-between;
16
- cursor: pointer;
17
- `
18
-
19
- export default function Attachment(props: AttachemntProps) {
20
- return (
21
- <AttachmentContainer onClick={() => props.onClick && props.onClick()}>
22
- <div>{props.name}</div>
23
- <div onClick={(e) => e.stopPropagation()}>{props.actions}</div>
24
- </AttachmentContainer>
25
- )
26
- }
1
+ import React from 'react'
2
+ import styled from 'styled-components'
3
+
4
+ interface AttachemntProps {
5
+ name: string
6
+ onClick?: Function
7
+ actions?: any
8
+ }
9
+
10
+ const AttachmentContainer = styled.div`
11
+ background: rgba(0, 0, 0, 0.1);
12
+ border-radius: 8px;
13
+ padding: 8px;
14
+ display: flex;
15
+ justify-content: space-between;
16
+ cursor: pointer;
17
+ `
18
+
19
+ export default function Attachment(props: AttachemntProps) {
20
+ return (
21
+ <AttachmentContainer onClick={() => props.onClick && props.onClick()}>
22
+ <div>{props.name}</div>
23
+ <div onClick={(e) => e.stopPropagation()}>{props.actions}</div>
24
+ </AttachmentContainer>
25
+ )
26
+ }
@@ -1,57 +1,57 @@
1
- import { Autocomplete as MuiAutocomplete, TextField } from '@mui/material'
2
- import _ from 'lodash'
3
- import { useEffect, useMemo, useState } from 'react'
4
-
5
- export default function AutocompleteSearch({
6
- name,
7
- value,
8
- onInputChange,
9
- onChange,
10
- label,
11
- options: _options,
12
- ...props
13
- }) {
14
- const [options, setOptions] = useState([])
15
-
16
- const debouncedChangeHandler = useMemo(
17
- () =>
18
- _.debounce((e, newInput) => {
19
- onInputChange(newInput)
20
- }, 300),
21
- [],
22
- )
23
-
24
- useEffect(() => {
25
- if (!_options) return
26
- setOptions((prev) => [..._options])
27
- }, [_options])
28
-
29
- return (
30
- <MuiAutocomplete
31
- id="autocomplete-search"
32
- fullWidth
33
- getOptionLabel={(option) =>
34
- typeof option === 'string' ? option : option?.label
35
- }
36
- filterOptions={(x) => x}
37
- options={options || []}
38
- autoComplete
39
- includeInputInList
40
- filterSelectedOptions
41
- value={value}
42
- onChange={(event: any, newValue: any) => {
43
- if (!newValue) return
44
- // onInputChange(newValue)
45
- onChange(newValue)
46
- }}
47
- onInputChange={debouncedChangeHandler}
48
- renderInput={(params) => (
49
- <TextField {...params} label={label} fullWidth />
50
- )}
51
- renderOption={(props, option) => {
52
- return <li {...props}>{option?.label}</li>
53
- }}
54
- {...props}
55
- />
56
- )
57
- }
1
+ import { Autocomplete as MuiAutocomplete, TextField } from '@mui/material'
2
+ import _ from 'lodash'
3
+ import { useEffect, useMemo, useState } from 'react'
4
+
5
+ export default function AutocompleteSearch({
6
+ name,
7
+ value,
8
+ onInputChange,
9
+ onChange,
10
+ label,
11
+ options: _options,
12
+ ...props
13
+ }) {
14
+ const [options, setOptions] = useState([])
15
+
16
+ const debouncedChangeHandler = useMemo(
17
+ () =>
18
+ _.debounce((e, newInput) => {
19
+ onInputChange(newInput)
20
+ }, 300),
21
+ [],
22
+ )
23
+
24
+ useEffect(() => {
25
+ if (!_options) return
26
+ setOptions((prev) => [..._options])
27
+ }, [_options])
28
+
29
+ return (
30
+ <MuiAutocomplete
31
+ id="autocomplete-search"
32
+ fullWidth
33
+ getOptionLabel={(option) =>
34
+ typeof option === 'string' ? option : option?.label
35
+ }
36
+ filterOptions={(x) => x}
37
+ options={options || []}
38
+ autoComplete
39
+ includeInputInList
40
+ filterSelectedOptions
41
+ value={value}
42
+ onChange={(event: any, newValue: any) => {
43
+ if (!newValue) return
44
+ // onInputChange(newValue)
45
+ onChange(newValue)
46
+ }}
47
+ onInputChange={debouncedChangeHandler}
48
+ renderInput={(params) => (
49
+ <TextField {...params} label={label} fullWidth />
50
+ )}
51
+ renderOption={(props, option) => {
52
+ return <li {...props}>{option?.label}</li>
53
+ }}
54
+ {...props}
55
+ />
56
+ )
57
+ }
@@ -1 +1 @@
1
- export { default } from './AutocompleteSearch'
1
+ export { default } from './AutocompleteSearch'