@argusoft/medplat-app-shell 1.0.6 → 1.0.7

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 (263) hide show
  1. package/package.json +139 -141
  2. package/src/GlobalErrorBoundary.jsx +31 -0
  3. package/src/SilentErrorFallback.jsx +68 -0
  4. package/src/TrackingProviderWrapper.jsx +40 -0
  5. package/src/_tests_/__mocks__/MockTranslationProvider.jsx +21 -0
  6. package/src/_tests_/__mocks__/ckeditor.js +45 -0
  7. package/src/_tests_/__mocks__/fileMock.js +1 -0
  8. package/src/_tests_/__mocks__/useranalytics.js +5 -0
  9. package/src/_tests_/views/components/Dashboard/DashboardUI.test.jsx +137 -0
  10. package/src/_tests_/views/components/Dashboard/DashboardUIMock.js +877 -0
  11. package/src/_tests_/views/components/ForgotPassword/ForgotPassword.test.jsx +314 -0
  12. package/src/_tests_/views/components/LocationDirective/LocationDirective.test.jsx.disable +229 -0
  13. package/src/_tests_/views/components/LocationDirective/mockLocationDirective.js +810 -0
  14. package/src/_tests_/views/components/LocationType/MockLocationType.js +42259 -0
  15. package/src/_tests_/views/components/LocationType/addlocationtype.test.jsx.disable +276 -0
  16. package/src/_tests_/views/components/LocationType/editlocationtype.test.jsx.disable +262 -0
  17. package/src/_tests_/views/components/LocationType/locationtype.test.jsx.disable +148 -0
  18. package/src/_tests_/views/components/Profile/UpdateProfileModalData.js +4396 -0
  19. package/src/_tests_/views/components/Profile/updateprofilemodal.test.jsx +282 -0
  20. package/src/_tests_/views/components/SideBar/MockSideBar.js +1379 -0
  21. package/src/_tests_/views/components/SideBar/SideBar.test.jsx +98 -0
  22. package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/AddManageSystemConfig.test.jsx.disable +164 -0
  23. package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/UpdateManageSystemConfig.test.jsx.disable +157 -0
  24. package/src/_tests_/views/components/SystemConfig/MockSystemConfig.js +1280 -0
  25. package/src/_tests_/views/components/SystemConfig/SystemConfig.test.jsx.disable +165 -0
  26. package/src/_tests_/views/components/login/Login.test.jsx +276 -0
  27. package/src/_tests_/views/components/login/MockAuthorise.js +2414 -0
  28. package/src/_tests_/views/components/login/ServiceResponse.js +595 -0
  29. package/src/_tests_/views/components/user/MockManageUser.js +7965 -0
  30. package/src/_tests_/views/components/user/manageuser.test.jsx.disable +989 -0
  31. package/src/_tests_/views/components/user/mockUsersData.js +582 -0
  32. package/src/assets/img/OASISLogin.png +0 -0
  33. package/src/assets/img/bahaarNew.png +0 -0
  34. package/src/assets/img/dnhdd4K.png +0 -0
  35. package/src/assets/img/govtofup.png +0 -0
  36. package/src/assets/img/sewarural4K.png +0 -0
  37. package/src/assets/img/techo4K.png +0 -0
  38. package/src/assets/img/up4K.png +0 -0
  39. package/src/common/HolidayList.jsx +573 -0
  40. package/src/common/MalaciaousInputUtil.js +23 -0
  41. package/src/common/SafeHtml.jsx +17 -0
  42. package/src/common/VersionManager.jsx +109 -0
  43. package/src/common/constants/PerformanceDashboard.js +514 -0
  44. package/src/common/constants/app.constant.js +781 -0
  45. package/src/common/constants/cccVerificationConstants.js +18 -0
  46. package/src/common/constants/fhsrConstant.js +33 -0
  47. package/src/common/constants/gvk-verification.constant.js +76 -0
  48. package/src/common/constants/search.constant.js +23 -0
  49. package/src/common/constants/teleconsulatationConstant.jsx +1339 -0
  50. package/src/common/directives/SearchTemplate.jsx +784 -0
  51. package/src/common/directives/SearchTemplate.scss +14 -0
  52. package/src/common/dynamicView/DynamicView.jsx +353 -0
  53. package/src/common/dynamicView/InputFieldComponent.jsx +1501 -0
  54. package/src/common/dynamicView/InputViewComponent.jsx +298 -0
  55. package/src/common/dynamicView/InputViewComponent.scss +15 -0
  56. package/src/common/env.js +5 -0
  57. package/src/common/filters/locationNameFilter.js +26 -0
  58. package/src/common/fontAwesomeIcons/FontAwesomeIcons.jsx +27 -0
  59. package/src/common/fontAwesomeIcons/FontAwesomeIconsNames.js +1968 -0
  60. package/src/common/fontPreferences/fontSizeProvider.jsx +34 -0
  61. package/src/common/fontPreferences/fontSizeSelector.jsx +116 -0
  62. package/src/common/getAssignedFeature/getAssignedFeature.js +32 -0
  63. package/src/common/interceptors/AxiosInterceptor.js +216 -0
  64. package/src/common/languageTranslator/TranslationContext.js +5 -0
  65. package/src/common/languageTranslator/TranslationProvider.jsx +24 -0
  66. package/src/common/languageTranslator/i18n.js +49 -0
  67. package/src/common/services/AuthenticateService.js +116 -0
  68. package/src/common/services/DownloadFile.js +35 -0
  69. package/src/common/services/ForgotPassword.js +18 -0
  70. package/src/common/services/FormConfiguratorService.js +195 -0
  71. package/src/common/services/GlobalApis.js +84 -0
  72. package/src/common/services/InterceptorNavigationService.js +17 -0
  73. package/src/common/services/LocationService.js +65 -0
  74. package/src/common/services/LocationType.js +11 -0
  75. package/src/common/services/QueryBuilder.js +36 -0
  76. package/src/common/services/Roles.js +28 -0
  77. package/src/common/services/SyncWithServer.js +15 -0
  78. package/src/common/services/SystemConfig.js +15 -0
  79. package/src/common/services/TranslationService.js +70 -0
  80. package/src/common/services/TwoFactorService.js +7 -0
  81. package/src/common/services/Users.js +91 -0
  82. package/src/common/services/Webtasks.js +27 -0
  83. package/src/common/services/util/Convert-pad-data-to-API-format.jsx +167 -0
  84. package/src/common/services/util/Convert-to-UI-format.jsx +82 -0
  85. package/src/common/services/util/EmptyPrescriptionPadData.jsx +11 -0
  86. package/src/common/services/util/GeneralUtil.js +456 -0
  87. package/src/common/services/util/Prescription-pad-util.js +339 -0
  88. package/src/common/services/util/PrescriptionPadData.js +67 -0
  89. package/src/common/services/util/PrescriptionpadCommonUtil.js +96 -0
  90. package/src/common/services/util/ReportFieldUtil.jsx +398 -0
  91. package/src/common/services/util/WebSocketContext.jsx +261 -0
  92. package/src/common/syncWithServer/SyncWithServerDialog.jsx +170 -0
  93. package/src/common/syncWithServer/SyncWithServerDialogSkeleton.jsx +67 -0
  94. package/src/common/tests/CustomWrapper.jsx +49 -0
  95. package/src/common/tests/TranslationWrapper.jsx +38 -0
  96. package/src/common/themeProvider/ColorInputs.jsx +97 -0
  97. package/src/common/themeProvider/EditableColorInput.jsx +128 -0
  98. package/src/common/themeProvider/ThemeEditor.jsx +319 -0
  99. package/src/common/themeProvider/ThemeProvider.jsx +210 -0
  100. package/src/common/themeProvider/themeConfig.js +558 -0
  101. package/src/common/toaster/toaster.jsx +30 -0
  102. package/src/firebaseConfig.js +24 -0
  103. package/src/global.scss +221 -0
  104. package/src/hooks/.gitkeep +0 -0
  105. package/src/hooks/useAESEncryption.js +56 -0
  106. package/src/hooks/useCaching.js +43 -0
  107. package/src/hooks/useDebounce.js +34 -0
  108. package/src/hooks/useDebounceFn.js +50 -0
  109. package/src/hooks/useDownloadPdf.js +358 -0
  110. package/src/hooks/useDownloadXlsx.js +55 -0
  111. package/src/hooks/useListValueFieldValues.js +30 -0
  112. package/src/hooks/useLocationHierarchies.js +63 -0
  113. package/src/hooks/useLocationHierarchyTranslate.js +16 -0
  114. package/src/hooks/useOnline.js +27 -0
  115. package/src/hooks/usePagination.js +63 -0
  116. package/src/hooks/useRefreshToken.js +87 -0
  117. package/src/hooks/useScript.js +25 -0
  118. package/src/hooks/useStopwatch.js +75 -0
  119. package/src/hooks/useTrackEvent.js +22 -0
  120. package/src/hooks/useWebAudioRecorder.js +115 -0
  121. package/src/layout/LoaderComponet.jsx +22 -0
  122. package/src/layout/LoaderContext.jsx +29 -0
  123. package/src/layout/mainLayout/AdaptiveZoom.jsx +27 -0
  124. package/src/layout/mainLayout/Chatbot.jsx +243 -0
  125. package/src/layout/mainLayout/Layout.jsx +445 -0
  126. package/src/layout/mainLayout/Profile/UpdateProfileModal.jsx +684 -0
  127. package/src/layout/mainLayout/header/LogoutModal.jsx +131 -0
  128. package/src/layout/mainLayout/header/Navbar.jsx +1677 -0
  129. package/src/layout/mainLayout/header/Navbar.scss +4 -0
  130. package/src/layout/mainLayout/header/index.js +0 -0
  131. package/src/layout/mainLayout/sidebar/SideBar.jsx +1402 -0
  132. package/src/layout/mainLayout/sidebar/Sidebar.css +159 -0
  133. package/src/layout/mainLayout/sidebar/index.js +0 -0
  134. package/src/logo.svg +1 -0
  135. package/src/reportWebVitals.js +13 -0
  136. package/src/setupFirebaseMessaging.js +28 -0
  137. package/src/setupTests.js +8 -0
  138. package/src/store/actions/AuthenticationActions.js +0 -0
  139. package/src/store/actions/ReportsActions.js +0 -0
  140. package/src/store/actions/TranslationAction.js +0 -0
  141. package/src/store/index.js +8 -0
  142. package/src/store/reducer.js +46 -0
  143. package/src/store/reducers/AuthenticationReducer.js +50 -0
  144. package/src/store/reducers/CalendarEventReducer.js +41 -0
  145. package/src/store/reducers/ConditionClipboardReducer.js +45 -0
  146. package/src/store/reducers/FeatureReducer.js +27 -0
  147. package/src/store/reducers/FormConfiguratorReducer.js +38 -0
  148. package/src/store/reducers/LoadingReducer.js +20 -0
  149. package/src/store/reducers/MembersAuthenticationReducer.js +28 -0
  150. package/src/store/reducers/PrescriptionPadReducer.js +329 -0
  151. package/src/store/reducers/QuestionaireReducer.js +29 -0
  152. package/src/store/reducers/ReportsReducer.js +24 -0
  153. package/src/store/reducers/SkeletonReducer.js +20 -0
  154. package/src/store/reducers/ThemeReducer.js +106 -0
  155. package/src/store/reducers/TranslationReducer.js +126 -0
  156. package/src/store/reducers/dashboardEditorSlice.js +77 -0
  157. package/src/store/reducers/districtHealthDashboardSlice.js +58 -0
  158. package/src/store/reducers/immunizationSlice.js +234 -0
  159. package/src/store/slices/dashboardPagesSlice.js +51 -0
  160. package/src/utils/.gitkeep +0 -0
  161. package/src/utils/FormConstants.js +2629 -0
  162. package/src/utils/GujaratTopoChart.jsx +483 -0
  163. package/src/utils/UUIDgenerator.js +8 -0
  164. package/src/utils/appointment-utils/appointment-utils.js +123 -0
  165. package/src/utils/feature.js +42 -0
  166. package/src/utils/getThemeColor.js +12 -0
  167. package/src/utils/localStorageHelper.js +11 -0
  168. package/src/utils/notifications/enable-push-notifications.js +27 -0
  169. package/src/utils/resolveAppliedStyle.js +11 -0
  170. package/src/utils/themeConfigs.js +1483 -0
  171. package/src/views/custom-components/.gitkeep +0 -0
  172. package/src/views/custom-components/AgIconButton/RIf.jsx +14 -0
  173. package/src/views/custom-components/AgIconButton/button.jsx +108 -0
  174. package/src/views/custom-components/AgIconButton/waterDrop.jsx +95 -0
  175. package/src/views/custom-components/AgIconButton/waterDrop.scss +37 -0
  176. package/src/views/custom-components/AlertPlaceholder.jsx +32 -0
  177. package/src/views/custom-components/AllFaIconsSelector.jsx +56 -0
  178. package/src/views/custom-components/CkEditor/CkEditor.js +102 -0
  179. package/src/views/custom-components/CustomAccordion.jsx +72 -0
  180. package/src/views/custom-components/CustomActionIcons.jsx +118 -0
  181. package/src/views/custom-components/CustomAutoComplete.jsx +188 -0
  182. package/src/views/custom-components/CustomCheckBox.jsx +60 -0
  183. package/src/views/custom-components/CustomConfirmationModal.jsx +118 -0
  184. package/src/views/custom-components/CustomCountrySelect.jsx +129 -0
  185. package/src/views/custom-components/CustomDatePicker.jsx +122 -0
  186. package/src/views/custom-components/CustomDropdown.jsx +191 -0
  187. package/src/views/custom-components/CustomFileUpload.jsx +387 -0
  188. package/src/views/custom-components/CustomFullCalendar.jsx +514 -0
  189. package/src/views/custom-components/CustomInfiniteScroll.jsx +126 -0
  190. package/src/views/custom-components/CustomRadioComponent.jsx +65 -0
  191. package/src/views/custom-components/CustomStatsComponent.jsx +114 -0
  192. package/src/views/custom-components/CustomSvgUpload.jsx +170 -0
  193. package/src/views/custom-components/CustomSwitch.jsx +37 -0
  194. package/src/views/custom-components/CustomTabPanel.jsx +19 -0
  195. package/src/views/custom-components/CustomTextArea.jsx +62 -0
  196. package/src/views/custom-components/CustomTextArea.scss +27 -0
  197. package/src/views/custom-components/CustomTextField.jsx +116 -0
  198. package/src/views/custom-components/CustomToggleSwitch.jsx +138 -0
  199. package/src/views/custom-components/CustomTooltip.jsx +51 -0
  200. package/src/views/custom-components/CustomZoomImage.jsx +134 -0
  201. package/src/views/custom-components/CustomizedTable/CustomizedTableV2.jsx +1407 -0
  202. package/src/views/custom-components/CustomizedTable/VirtualizeTableBody.jsx +295 -0
  203. package/src/views/custom-components/CustomizedTable/helper.jsx +159 -0
  204. package/src/views/custom-components/CustomizedTable.jsx +532 -0
  205. package/src/views/custom-components/EditInputField.jsx +174 -0
  206. package/src/views/custom-components/FieldDescription.jsx +22 -0
  207. package/src/views/custom-components/FileDisplayComponent.jsx +138 -0
  208. package/src/views/custom-components/FormItem.jsx +53 -0
  209. package/src/views/custom-components/GenericChart.jsx +80 -0
  210. package/src/views/custom-components/InfoBadge.jsx +60 -0
  211. package/src/views/custom-components/PostgresEditor.jsx +801 -0
  212. package/src/views/custom-components/ResizableEditAutocompleteField.jsx +249 -0
  213. package/src/views/custom-components/ResizableEditInputField.jsx +215 -0
  214. package/src/views/custom-components/ResizeableEditSelectField.jsx +197 -0
  215. package/src/views/custom-components/SideOverlay.jsx +113 -0
  216. package/src/views/custom-components/SideOverlay.scss +42 -0
  217. package/src/views/custom-components/calendar.scss +571 -0
  218. package/src/views/feature-components/.gitkeep +0 -0
  219. package/src/views/feature-components/Dashboard/DashboardUI.jsx +1043 -0
  220. package/src/views/feature-components/Dashboard/DhnddModal/AshaDataQualityVerificationModal.jsx +278 -0
  221. package/src/views/feature-components/Dashboard/PinFeatureModal.jsx +143 -0
  222. package/src/views/feature-components/Dashboard/QuickLinks.jsx +163 -0
  223. package/src/views/feature-components/Dashboard/Taskbar.jsx +56 -0
  224. package/src/views/feature-components/Dashboard/WebtasksFilterForm.jsx +109 -0
  225. package/src/views/feature-components/Dashboard/WidgetCard.jsx +161 -0
  226. package/src/views/feature-components/Dashboard/actionModal.jsx +263 -0
  227. package/src/views/feature-components/Dashboard/ekavachModal/HealthWorkerIncorrectDetailsModal.jsx +332 -0
  228. package/src/views/feature-components/Dashboard/ekavachModal/MoMaternalDeathVerifcationModal.jsx +275 -0
  229. package/src/views/feature-components/Dashboard/ekavachModal/MoVerficationForChildScreeningMoadal.jsx +566 -0
  230. package/src/views/feature-components/FeatureUsageAnalytics/FeatureUsageAnalytics.jsx +989 -0
  231. package/src/views/feature-components/Features/NewServerManagement.jsx +217 -0
  232. package/src/views/feature-components/Features/ServerManagement.scss +120 -0
  233. package/src/views/feature-components/ForgotPassword/ForgotPassword.jsx +226 -0
  234. package/src/views/feature-components/LocationDirective/LocationDirective.jsx +992 -0
  235. package/src/views/feature-components/LocationDirective/LocationDirectiveV2.jsx +909 -0
  236. package/src/views/feature-components/NotFound.jsx +66 -0
  237. package/src/views/feature-components/Onboarding/Onboarding.jsx +1400 -0
  238. package/src/views/feature-components/Skeletons.js +115 -0
  239. package/src/views/feature-components/Unauthorized.jsx +48 -0
  240. package/src/views/feature-components/VerifyRoute.jsx +88 -0
  241. package/src/views/feature-components/YearlyRecap/YearlyRecap.jsx +357 -0
  242. package/src/views/feature-components/YearlyRecap/components/RecapSlide.jsx +183 -0
  243. package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationContext.js +5 -0
  244. package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationProvider.jsx +26 -0
  245. package/src/views/feature-components/YearlyRecap/languageTranslator/i18n.js +46 -0
  246. package/src/views/feature-components/YearlyRecap/languageTranslator/translations.json +167 -0
  247. package/src/views/feature-components/YearlyRecap/slides/IntroSlide.jsx +233 -0
  248. package/src/views/feature-components/YearlyRecap/slides/MaternalHealthSlide.jsx +146 -0
  249. package/src/views/feature-components/YearlyRecap/slides/MetricSlide.jsx +227 -0
  250. package/src/views/feature-components/YearlyRecap/slides/OutroSlide.jsx +701 -0
  251. package/src/views/feature-components/YearlyRecap/slides/ReachSlide.jsx +273 -0
  252. package/src/views/feature-components/login/Login.jsx +840 -0
  253. package/src/views/feature-components/login/Login.scss +154 -0
  254. package/src/views/feature-components/login/LoginConfigurator.jsx +1149 -0
  255. package/src/views/feature-components/login/TwoFactorSetupModal.jsx +411 -0
  256. package/src/views/feature-components/login/simplifyMenu.js +45 -0
  257. package/src/views/feature-components/system-config/ManageSystemConfigs.jsx +284 -0
  258. package/src/views/feature-components/system-config/SystemConfig.jsx +299 -0
  259. package/src/views/feature-components/users/ChangePasswordModal.jsx +243 -0
  260. package/src/views/feature-components/users/PasswordField.jsx +56 -0
  261. package/dist/index.css +0 -1
  262. package/dist/index.js +0 -32001
  263. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,27 +1,113 @@
1
1
  {
2
2
  "name": "@argusoft/medplat-app-shell",
3
- "version": "1.0.6",
4
- "description": "MEDplat application shell — providers, layout, routing, error boundaries, generic utilities, store.",
5
- "license": "MIT",
6
- "type": "module",
3
+ "version": "1.0.7",
4
+ "proxy": "http://localhost:3000",
5
+ "homepage": "/ui",
7
6
  "exports": {
8
- ".": "./dist/index.js",
9
- "./styles": "./dist/medplat-app-shell.css",
10
- "./assets/*": "./src/assets/*"
7
+ "./src": "./src",
8
+ "./src/*": "./src/*"
11
9
  },
12
10
  "files": [
13
- "dist",
14
- "src/assets"
15
- ],
16
- "sideEffects": [
17
- "*.css",
18
- "*.scss"
11
+ "src/"
19
12
  ],
13
+ "dependencies": {
14
+ "@codemirror/autocomplete": "^6.18.6",
15
+ "@codemirror/state": "^6.5.2",
16
+ "@codemirror/commands": "^6.8.0",
17
+ "@ckeditor/ckeditor5-react": "^9.3.0",
18
+ "@codemirror/lang-sql": "^6.8.0",
19
+ "@codemirror/view": "^6.36.4",
20
+ "@dnd-kit/core": "^6.3.1",
21
+ "@dnd-kit/sortable": "^8.0.0",
22
+ "@dnd-kit/utilities": "^3.2.2",
23
+ "@dnd-kit/modifiers": "^7.0.0",
24
+ "@emotion/react": "^11.14.0",
25
+ "@emotion/styled": "^11.14.0",
26
+ "@ffmpeg/core": "^0.12.6",
27
+ "@ffmpeg/ffmpeg": "^0.12.15",
28
+ "@ffmpeg/util": "^0.12.2",
29
+ "@fontsource/mulish": "^5.2.5",
30
+ "@fortawesome/fontawesome-svg-core": "^6.7.2",
31
+ "@fortawesome/free-solid-svg-icons": "^6.7.2",
32
+ "@fortawesome/react-fontawesome": "^0.2.2",
33
+ "@fullcalendar/core": "^6.1.17",
34
+ "@fullcalendar/daygrid": "^6.1.17",
35
+ "@fullcalendar/interaction": "^6.1.17",
36
+ "@fullcalendar/list": "^6.1.17",
37
+ "@fullcalendar/react": "^6.1.17",
38
+ "@fullcalendar/timegrid": "^6.1.17",
39
+ "@hookform/resolvers": "^3.9.0",
40
+ "@monaco-editor/react": "^4.7.0",
41
+ "@mui/icons-material": "^6.4.8",
42
+ "@mui/material": "^6.4.8",
43
+ "@mui/system": "^6.1.1",
44
+ "@reduxjs/toolkit": "^2.2.6",
45
+ "@stomp/stompjs": "^7.2.1",
46
+ "@tabler/icons-react": "^3.17.0",
47
+ "@tanstack/react-query": "^5.59.0",
48
+ "@uiw/react-codemirror": "^4.23.10",
49
+ "crypto-js": "^4.2.0",
50
+ "classnames": "^2.5.1",
51
+ "axios": "^1.8.3",
52
+ "ckeditor5": "^45.2.0",
53
+ "date-fns": "^4.1.0",
54
+ "dayjs": "^1.11.11",
55
+ "file-saver": "^2.0.5",
56
+ "file-type": "^19.6.0",
57
+ "firebase": "^11.9.1",
58
+ "glob": "^9.2.1",
59
+ "framer-motion": "^12.23.11",
60
+ "html2pdf.js": "^0.10.3",
61
+ "i18next": "^24.1.0",
62
+ "konva": "^8.3.13",
63
+ "leaflet": "^1.9.4",
64
+ "moment": "^2.30.1",
65
+ "monaco-editor": "^0.55.1",
66
+ "pdfmake": "^0.2.18",
67
+ "print-js": "^1.6.0",
68
+ "prop-types": "15.8.1",
69
+ "react": "^18.3.1",
70
+ "react-color": "^2.19.3",
71
+ "react-date-range": "^2.0.1",
72
+ "react-dom": "^18.3.1",
73
+ "react-grid-layout": "^1.5.0",
74
+ "react-hook-form": "^7.62.0",
75
+ "react-i18next": "^15.2.0",
76
+ "react-infinite-scroller": "^1.2.6",
77
+ "react-joyride": "^2.9.3",
78
+ "react-konva": "^18.2.10",
79
+ "react-leaflet": "^4.2.1",
80
+ "react-media-recorder": "^1.7.1",
81
+ "react-password-strength-bar": "^0.4.1",
82
+ "react-player": "^2.16.0",
83
+ "react-qr-code": "^2.0.18",
84
+ "react-redux": "^9.1.2",
85
+ "react-responsive-carousel": "^3.2.23",
86
+ "react-router": "^6.25.0",
87
+ "react-router-dom": "^6.25.0",
88
+ "react-select": "^5.10.1",
89
+ "react-simple-maps": "^3.0.0",
90
+ "react-toastify": "^10.0.5",
91
+ "react-virtuoso": "^4.17.0",
92
+ "recharts": "^2.15.1",
93
+ "redux": "^5.0.1",
94
+ "react-transition-group": "^4.4.5",
95
+ "sockjs-client": "^1.6.1",
96
+ "sonar-scanner": "^3.1.0",
97
+ "topojson-client": "^3.1.0",
98
+ "useranalytics": "^1.0.539",
99
+ "use-image": "^1.1.1",
100
+ "uuid": "^10.0.0",
101
+ "web-vitals": "^2.1.0",
102
+ "xlsx-js-style": "^1.2.0",
103
+ "yup": "^1.4.0",
104
+ "lodash": "^4.17.21",
105
+ "dompurify": "^3.3.1",
106
+ "react-zoom-pan-pinch": "3.7.0"
107
+ },
20
108
  "scripts": {
21
- "generate-exports": "node generate-exports.js",
22
- "generate-exports:watch": "node generate-exports.js --watch",
23
- "prebuild": "node generate-exports.js",
24
- "build": "vite build",
109
+ "start": "vite",
110
+ "build": "node generate-version.js && vite build",
25
111
  "test": "jest",
26
112
  "lint": "eslint .",
27
113
  "prettier": "prettier --write .",
@@ -29,108 +115,23 @@
29
115
  "docs:markdown": "npx documentation build src/**/*.js --format md > docs.md",
30
116
  "docs:generate": "node generate-docs.cjs"
31
117
  },
32
- "peerDependencies": {
33
- "@ckeditor/ckeditor5-react": "^9",
34
- "@codemirror/autocomplete": "^6",
35
- "@codemirror/commands": "^6",
36
- "@codemirror/lang-sql": "^6",
37
- "@codemirror/state": "^6",
38
- "@codemirror/view": "^6",
39
- "@dnd-kit/core": "^6",
40
- "@dnd-kit/modifiers": "^7",
41
- "@dnd-kit/sortable": "^8",
42
- "@dnd-kit/utilities": "^3",
43
- "@emotion/react": "^11",
44
- "@emotion/styled": "^11",
45
- "@ffmpeg/core": "^0.12",
46
- "@ffmpeg/ffmpeg": "^0.12",
47
- "@ffmpeg/util": "^0.12",
48
- "@fontsource/mulish": "^5",
49
- "@fortawesome/fontawesome-svg-core": "^6",
50
- "@fortawesome/free-solid-svg-icons": "^6",
51
- "@fortawesome/react-fontawesome": "^0.2",
52
- "@fullcalendar/core": "^6",
53
- "@fullcalendar/daygrid": "^6",
54
- "@fullcalendar/interaction": "^6",
55
- "@fullcalendar/list": "^6",
56
- "@fullcalendar/react": "^6",
57
- "@fullcalendar/timegrid": "^6",
58
- "@hookform/resolvers": "^3",
59
- "@monaco-editor/react": "^4",
60
- "@mui/icons-material": "^6",
61
- "@mui/material": "^6",
62
- "@mui/system": "^6",
63
- "@mui/x-date-pickers": "^7",
64
- "@reduxjs/toolkit": "^2",
65
- "@stomp/stompjs": "^7",
66
- "@tabler/icons-react": "^3",
67
- "@tanstack/react-query": "^5",
68
- "@uiw/react-codemirror": "^4",
69
- "axios": "^1",
70
- "ckeditor5": "^45",
71
- "classnames": "^2",
72
- "crypto-js": "^4",
73
- "date-fns": "^4",
74
- "dayjs": "^1",
75
- "dompurify": "^3",
76
- "file-saver": "^2",
77
- "file-type": "^19",
78
- "firebase": "^11",
79
- "framer-motion": "^12",
80
- "glob": "^9",
81
- "html2pdf.js": "^0.10",
82
- "i18next": "^24",
83
- "konva": "^8",
84
- "leaflet": "^1",
85
- "lodash": "^4",
86
- "moment": "^2",
87
- "monaco-editor": "^0.55",
88
- "pdfmake": "^0.2",
89
- "print-js": "^1",
90
- "prop-types": "^15",
91
- "react": "^18",
92
- "react-color": "^2",
93
- "react-date-range": "^2",
94
- "react-dom": "^18",
95
- "react-grid-layout": "^1",
96
- "react-hook-form": "^7",
97
- "react-i18next": "^15",
98
- "react-infinite-scroller": "^1",
99
- "react-joyride": "^2",
100
- "react-konva": "^18",
101
- "react-leaflet": "^4",
102
- "react-media-recorder": "^1",
103
- "react-password-strength-bar": "^0.4",
104
- "react-player": "^2",
105
- "react-qr-code": "^2",
106
- "react-redux": "^9",
107
- "react-responsive-carousel": "^3",
108
- "react-router": "^6",
109
- "react-router-dom": "^6",
110
- "react-select": "^5",
111
- "react-simple-maps": "^3",
112
- "react-toastify": "^10",
113
- "react-transition-group": "^4",
114
- "react-virtuoso": "^4",
115
- "react-zoom-pan-pinch": "^3",
116
- "recharts": "^2",
117
- "redux": "^5",
118
- "sockjs-client": "^1",
119
- "topojson-client": "^3",
120
- "use-image": "^1",
121
- "useranalytics": "^1",
122
- "uuid": "^10",
123
- "web-vitals": "^2",
124
- "xlsx-js-style": "^1",
125
- "yup": "^1"
118
+ "eslintConfig": {
119
+ "extends": [
120
+ "react-app",
121
+ "react-app/jest"
122
+ ]
126
123
  },
127
- "peerDependenciesMeta": {
128
- "react": {
129
- "optional": false
130
- },
131
- "react-dom": {
132
- "optional": false
133
- }
124
+ "browserslist": {
125
+ "production": [
126
+ ">0.2%",
127
+ "not dead",
128
+ "not op_mini all"
129
+ ],
130
+ "development": [
131
+ "last 1 chrome version",
132
+ "last 1 firefox version",
133
+ "last 1 safari version"
134
+ ]
134
135
  },
135
136
  "devDependencies": {
136
137
  "@babel/core": "^7.25.2",
@@ -147,6 +148,7 @@
147
148
  "babel-plugin-transform-vite-meta-env": "^1.0.3",
148
149
  "clean-jsdoc-theme": "^4.3.0",
149
150
  "documentation": "^14.0.3",
151
+ "dotenv": "^16.4.5",
150
152
  "eslint": "^9.11.1",
151
153
  "eslint-plugin-import": "^2.31.0",
152
154
  "eslint-plugin-react": "^7.37.0",
@@ -155,34 +157,13 @@
155
157
  "jest-environment-jsdom": "^29.7.0",
156
158
  "jest-transform-stub": "^2.0.0",
157
159
  "jsdoc": "^4.0.3",
158
- "postcss": "^8.4.47",
160
+ "postcss": "^8.4.49",
159
161
  "prettier": "3.3.3",
160
162
  "redux-mock-store": "^1.5.4",
161
163
  "sass": "^1.79.4",
162
164
  "tailwindcss": "^4.0.14",
163
165
  "vite": "^6.2.0",
164
- "vite-plugin-lib-inject-css": "^2.2.2"
165
- },
166
- "publishConfig": {
167
- "access": "public"
168
- },
169
- "eslintConfig": {
170
- "extends": [
171
- "react-app",
172
- "react-app/jest"
173
- ]
174
- },
175
- "browserslist": {
176
- "production": [
177
- ">0.2%",
178
- "not dead",
179
- "not op_mini all"
180
- ],
181
- "development": [
182
- "last 1 chrome version",
183
- "last 1 firefox version",
184
- "last 1 safari version"
185
- ]
166
+ "vite-plugin-pwa": "^1.0.2"
186
167
  },
187
168
  "jest": {
188
169
  "testEnvironment": "jest-environment-jsdom",
@@ -205,5 +186,22 @@
205
186
  "transformIgnorePatterns": [
206
187
  "/node_modules/"
207
188
  ]
189
+ },
190
+ "type": "module",
191
+ "resolutions": {
192
+ "glob": "^9.2.1",
193
+ "jsdom": "^26.0.0",
194
+ "rimraf": "^4.0.0",
195
+ "magic-string": "^0.30.17",
196
+ "d3-color": "^3.1.0",
197
+ "brace-expansion": "^1.1.0"
198
+ },
199
+ "overrides": {
200
+ "glob": "^9.2.1",
201
+ "jsdom": "^26.0.0",
202
+ "rimraf": "^4.0.0",
203
+ "magic-string": "^0.30.17",
204
+ "d3-color": "^3.1.0",
205
+ "brace-expansion": "^1.1.0"
208
206
  }
209
207
  }
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import SilentErrorFallback from './SilentErrorFallback';
3
+
4
+ class GlobalErrorBoundary extends React.Component {
5
+ constructor(props) {
6
+ super(props);
7
+ this.state = { hasError: false };
8
+ }
9
+
10
+ static getDerivedStateFromError() {
11
+ return { hasError: true };
12
+ }
13
+
14
+ componentDidCatch(error, info) {
15
+ console.group('%c :rotating_light: Global App Crash ', 'background:#09090b;color:#f43f5e');
16
+ console.error(error);
17
+ console.error(info);
18
+ console.groupEnd();
19
+ }
20
+
21
+ render() {
22
+ if (this.state.hasError) {
23
+ return <SilentErrorFallback />;
24
+ }
25
+
26
+ // eslint-disable-next-line react/prop-types
27
+ return this.props.children;
28
+ }
29
+ }
30
+
31
+ export default GlobalErrorBoundary;
@@ -0,0 +1,68 @@
1
+
2
+ import { faArrowRotateRight, faCircleExclamation, faHouse, faRotate } from "@fortawesome/free-solid-svg-icons";
3
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
+ import { Button } from "@mui/material";
5
+ import { alpha, Box, useTheme } from "@mui/system";
6
+ import { useNavigate } from "react-router-dom";
7
+
8
+ function SilentErrorFallback() {
9
+ console.group('%c 🚨 System Error Log ', 'background: #09090b; color: #f43f5e; font-weight: bold;');
10
+ // console.error('Error:', error?.message || 'Unknown');
11
+ console.groupEnd();
12
+ const theme = useTheme();
13
+ const navigate = useNavigate();
14
+
15
+ return (
16
+ <div className="flex items-center justify-center min-h-[500px] w-full p-6 ">
17
+ {/* The Card - Clean White Slate */}
18
+ <div className="flex flex-col items-center bg-[#fff] justify-center w-full max-w-md p-10 text-center border border-slate-200 rounded-[2.5rem] shadow-xl shadow-slate-200/50">
19
+ {/* Icon Box - Soft Indigo Tint */}
20
+ <div className="mb-8">
21
+ <Box
22
+ sx={{
23
+ color: theme.palette.primary.main, // Solid primary color
24
+ borderColor: alpha(theme.palette.primary.main, 0.2),
25
+ }}
26
+ className="flex h-20 w-20 items-center justify-center rounded-3xl border transition-all"
27
+ >
28
+ <FontAwesomeIcon icon={faCircleExclamation} className="text-3xl" />
29
+ </Box>
30
+ </div>
31
+
32
+ {/* Text Content */}
33
+ <h3 className="text-2xl font-extrabold tracking-tight text-customBlue">{'Oops! Something went wrong'}</h3>
34
+
35
+ <p className="mt-4 text-slate-500 text-base font-medium leading-relaxed">
36
+ {" The page didn't load quite right. Try giving it a quick refresh or head back to your dashboard."}
37
+ </p>
38
+
39
+ {/* Button Group */}
40
+ <div className="mt-10 flex flex-col sm:flex-row items-center justify-center gap-3 w-full px-4">
41
+ <Button
42
+ color="primary"
43
+ variant="contained"
44
+ onClick={() => navigate(0)}
45
+ >
46
+ <FontAwesomeIcon icon={faRotate} className="mr-2" />
47
+ Retry
48
+ </Button>
49
+
50
+ <Button onClick={() => navigate('/ui/medplat/dashboard/webtasks')} color="secondary" variant="contained">
51
+ <FontAwesomeIcon icon={faHouse} className="mr-2 text-xs" />
52
+ Go Home
53
+ </Button>
54
+ </div>
55
+
56
+ {/* Bottom Footer */}
57
+ <div className="mt-12 pt-6 border-t border-slate-100 w-full">
58
+ <p className="text-[11px] text-slate-400 uppercase tracking-widest font-bold">
59
+ {"Contact support if this issue persists. We're here to help!"}
60
+ </p>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ );
65
+ }
66
+
67
+
68
+ export default SilentErrorFallback;
@@ -0,0 +1,40 @@
1
+ import { execute } from '@/common/services/QueryBuilder';
2
+ import PropTypes from 'prop-types';
3
+ import React from 'react';
4
+ import { useSelector } from 'react-redux';
5
+ import { TrackingProvider } from 'useranalytics'; // Ensure correct path or package name
6
+ import GeneralUtil from '@/common/services/util/GeneralUtil';
7
+
8
+ const TrackingProviderWrapper = ({ children }) => {
9
+ const { user } = useSelector((state) => state.Authenticate);
10
+ const token = localStorage.getItem('token');
11
+ const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
12
+ let device_type = navigator.userAgent;
13
+ let device;
14
+ function isMobileDevice() {
15
+ const userAgent = device_type.toLowerCase();
16
+ return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
17
+ }
18
+
19
+ if (isMobileDevice()) {
20
+ device = 'Mobile';
21
+ } else {
22
+ device = 'Web';
23
+ }
24
+ if(GeneralUtil.isEkavach){
25
+ return (
26
+ <TrackingProvider config={{ apiBaseUrl }} eventProps={{ user, device_type, device, token, execute }}>
27
+ {children}
28
+ </TrackingProvider>
29
+ );
30
+ }else{
31
+ return <>{children}</>;
32
+ }
33
+
34
+ };
35
+
36
+ export default TrackingProviderWrapper;
37
+
38
+ TrackingProviderWrapper.propTypes = {
39
+ children: PropTypes.any,
40
+ };
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+
3
+ import PropTypes from 'prop-types';
4
+ import { TranslationContext } from '@/common/languageTranslator/TranslationContext';
5
+
6
+ const MockTranslationProvider = ({ children }) => {
7
+ const translate = (value) => {
8
+ // Mock behavior: Return the input value as-is or add a prefix for testing
9
+ return `${value}`;
10
+ };
11
+
12
+ const contextValue = React.useMemo(() => ({ translate }), [translate]);
13
+
14
+ return <TranslationContext.Provider value={contextValue}>{children}</TranslationContext.Provider>;
15
+ };
16
+
17
+ export default MockTranslationProvider;
18
+
19
+ MockTranslationProvider.propTypes = {
20
+ children: PropTypes.any,
21
+ };
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ // __mocks__/ckeditor.js
3
+ // eslint-disable-next-line react/prop-types
4
+ export const CKEditor = ({ data = '', onChange = () => {} }) => {
5
+ return (
6
+ <div data-testid="othertypeeventconfigmodal-template-ckeditor" className="ck-editor">
7
+ <textarea
8
+ data-testid="ckeditor-textarea"
9
+ defaultValue={data}
10
+ onChange={(e) => onChange(null, { getData: () => e.target.value })}
11
+ />
12
+ </div>
13
+ );
14
+ };
15
+ export class ClassicEditor {}
16
+
17
+ ClassicEditor.builtinPlugins = [];
18
+ ClassicEditor.defaultConfig = {};
19
+
20
+ export const Essentials = {};
21
+ export const CKFinderUploadAdapter = {};
22
+ export const Autoformat = {};
23
+ export const Bold = {};
24
+ export const Italic = {};
25
+ export const BlockQuote = {};
26
+ export const CKBox = {};
27
+ export const CKFinder = {};
28
+ export const EasyImage = {};
29
+ export const Heading = {};
30
+ export const Image = {};
31
+ export const ImageCaption = {};
32
+ export const ImageStyle = {};
33
+ export const ImageToolbar = {};
34
+ export const ImageUpload = {};
35
+ export const PictureEditing = {};
36
+ export const Indent = {};
37
+ export const Link = {};
38
+ export const List = {};
39
+ export const MediaEmbed = {};
40
+ export const Paragraph = {};
41
+ export const PasteFromOffice = {};
42
+ export const Table = {};
43
+ export const TableToolbar = {};
44
+ export const TextTransformation = {};
45
+ export const CloudServices = {};
@@ -0,0 +1 @@
1
+ module.exports = 'test-file-stub';
@@ -0,0 +1,5 @@
1
+ const mockTrackEvent = jest.fn();
2
+
3
+ module.exports = {
4
+ useTracking: () => ({ trackEvent: mockTrackEvent }),
5
+ };
@@ -0,0 +1,137 @@
1
+ import React, { act } from 'react';
2
+
3
+ import {
4
+ mockDeathVerificationDetailsResponse,
5
+ mockGetCountResponse,
6
+ mockGetWebtasksBasketDetailsResponse,
7
+ mockRetrieveBasketPreferenceByUserIdResponse,
8
+ } from './DashboardUIMock.js';
9
+ import {
10
+ getCount,
11
+ getWebTasksBasketDetails,
12
+ retrieveBasketPreferenceByUserId,
13
+ saveBasketPreferenceByUserId,
14
+ } from '@/common/services/Webtasks.js';
15
+ import { customRender } from '@/common/tests/CustomWrapper.jsx';
16
+ import DashboardUI from '@/views/feature-components/Dashboard/DashboardUI.jsx';
17
+ import { cleanup, fireEvent, screen, waitFor } from '@testing-library/react';
18
+
19
+ // jest.mock('exceljs', () => ({
20
+ // Workbook: jest.fn(() => ({
21
+ // addWorksheet: jest.fn(() => mockWorksheet),
22
+ // xlsx: {
23
+ // writeBuffer: jest.fn().mockResolvedValue(Buffer.from('mocked data')),
24
+ // },
25
+ // })),
26
+ // }));
27
+
28
+ // const mockWorksheet = {
29
+ // addRow: jest.fn(),
30
+ // };
31
+
32
+ // Mock `saveAs` from `file-saver`
33
+ jest.mock('file-saver', () => ({
34
+ saveAs: jest.fn(),
35
+ }));
36
+
37
+ jest.mock('../../../../common/services/Webtasks', () => ({
38
+ getCount: jest.fn(),
39
+ getWebTasksBasketDetails: jest.fn(),
40
+ retrieveBasketPreferenceByUserId: jest.fn(),
41
+ saveBasketPreferenceByUserId: jest.fn(),
42
+ }));
43
+
44
+ describe('Dashboard UI Webtasks', () => {
45
+ const renderComponent = async (params = {}) => {
46
+ await customRender(<DashboardUI />, params);
47
+ };
48
+ beforeEach(async () => {
49
+ retrieveBasketPreferenceByUserId.mockResolvedValue(mockRetrieveBasketPreferenceByUserIdResponse);
50
+ getCount.mockResolvedValue(mockGetCountResponse);
51
+ await act(async () => {
52
+ await renderComponent({ url: '/ui/medplat/dashboard/webtasks' });
53
+ });
54
+ });
55
+ afterEach(() => {
56
+ jest.clearAllMocks();
57
+ cleanup();
58
+ });
59
+
60
+ it('Webtasks render Successfully', async () => {
61
+ const WidgetCardList = screen.queryAllByTestId('Dashboard-Widget-Card');
62
+ expect(WidgetCardList.length).toBeGreaterThan(0);
63
+ });
64
+ it('on Click of 3 Dot card Taskbar should open', async () => {
65
+ const TaskbarWidgetCard = screen.queryByTestId('taskbar-widget-card');
66
+ expect(TaskbarWidgetCard).toBeInTheDocument();
67
+ await act(async () => {
68
+ TaskbarWidgetCard.click();
69
+ });
70
+ await waitFor(async () => {
71
+ const TaskbarComponent = screen.getByTestId('Dashboard-Taskbar');
72
+ expect(TaskbarComponent).toBeInTheDocument();
73
+
74
+ const TaskbarWidgetCardList = screen.queryAllByTestId('Dashboard-Taskbar-Widget-Card');
75
+ expect(TaskbarWidgetCardList.length).toBe(4);
76
+ });
77
+
78
+ const HideTaskbarButton = screen.getByTestId('taskbar-hide-button');
79
+
80
+ await act(async () => {
81
+ HideTaskbarButton.click();
82
+ });
83
+ await waitFor(async () => {
84
+ const TaskbarComponent = screen.queryByTestId('Dashboard-Taskbar');
85
+ expect(TaskbarComponent).not.toBeInTheDocument();
86
+ });
87
+ });
88
+ it('Webtasks render hide unhide functionality', async () => {
89
+ const WidgetCardList = screen.queryAllByTestId('Dashboard-Widget-Card');
90
+ const NumberOfDashboardWidget = WidgetCardList.length;
91
+ let NumberOfTaskbarWidget;
92
+
93
+ const TaskbarWidgetCard = screen.queryByTestId('taskbar-widget-card');
94
+ expect(TaskbarWidgetCard).toBeInTheDocument();
95
+ await act(async () => {
96
+ TaskbarWidgetCard.click();
97
+ });
98
+ await waitFor(async () => {
99
+ saveBasketPreferenceByUserId.mockResolvedValueOnce({ data: { taskbar: 'show', baskets: [62, 33, 26] } });
100
+ getWebTasksBasketDetails.mockResolvedValueOnce(mockGetWebtasksBasketDetailsResponse);
101
+ const TaskbarWidgetCardList = screen.queryAllByTestId('Dashboard-Taskbar-Widget-Card');
102
+ NumberOfTaskbarWidget = TaskbarWidgetCardList.length;
103
+
104
+ const TaskbarWidget = TaskbarWidgetCardList[0];
105
+ fireEvent.mouseEnter(TaskbarWidget);
106
+ });
107
+ await waitFor(async () => {
108
+ const ArrowBackIcon = screen.getByTestId('widgetcard-arrow-button');
109
+ await act(async () => {
110
+ ArrowBackIcon.click();
111
+ });
112
+ });
113
+
114
+ await waitFor(async () => {
115
+ expect(saveBasketPreferenceByUserId).toHaveBeenCalled();
116
+ const TaskbarWidgetCardList = screen.queryAllByTestId('Dashboard-Taskbar-Widget-Card');
117
+ expect(TaskbarWidgetCardList.length).toBe(NumberOfTaskbarWidget - 1);
118
+ const WidgetCardList = screen.queryAllByTestId('Dashboard-Widget-Card');
119
+ expect(WidgetCardList.length).toBe(NumberOfDashboardWidget + 1);
120
+ });
121
+ });
122
+ it('Click on Webtasks Details should be rendered', async () => {
123
+ getWebTasksBasketDetails.mockResolvedValueOnce(mockDeathVerificationDetailsResponse);
124
+
125
+ const WidgetCardList = screen.queryAllByTestId('Dashboard-Widget-Card');
126
+
127
+ await act(async () => {
128
+ WidgetCardList[2].click();
129
+ });
130
+
131
+ await waitFor(async () => {
132
+ expect(getWebTasksBasketDetails).toHaveBeenCalled();
133
+ expect(screen.getByTestId('dashboard-webtaskslist-icon-pdf')).toBeInTheDocument();
134
+ expect(screen.getByTestId('widgetlist-table-customized')).toBeInTheDocument();
135
+ });
136
+ });
137
+ });