@argusoft/medplat-app-shell 1.0.6 → 1.0.8
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 +139 -141
- package/src/GlobalErrorBoundary.jsx +31 -0
- package/src/SilentErrorFallback.jsx +68 -0
- package/src/TrackingProviderWrapper.jsx +40 -0
- package/src/_tests_/__mocks__/MockTranslationProvider.jsx +21 -0
- package/src/_tests_/__mocks__/ckeditor.js +45 -0
- package/src/_tests_/__mocks__/fileMock.js +1 -0
- package/src/_tests_/__mocks__/useranalytics.js +5 -0
- package/src/_tests_/views/components/Dashboard/DashboardUI.test.jsx +137 -0
- package/src/_tests_/views/components/Dashboard/DashboardUIMock.js +877 -0
- package/src/_tests_/views/components/ForgotPassword/ForgotPassword.test.jsx +314 -0
- package/src/_tests_/views/components/LocationDirective/LocationDirective.test.jsx.disable +229 -0
- package/src/_tests_/views/components/LocationDirective/mockLocationDirective.js +810 -0
- package/src/_tests_/views/components/LocationType/MockLocationType.js +42259 -0
- package/src/_tests_/views/components/LocationType/addlocationtype.test.jsx.disable +276 -0
- package/src/_tests_/views/components/LocationType/editlocationtype.test.jsx.disable +262 -0
- package/src/_tests_/views/components/LocationType/locationtype.test.jsx.disable +148 -0
- package/src/_tests_/views/components/Profile/UpdateProfileModalData.js +4396 -0
- package/src/_tests_/views/components/Profile/updateprofilemodal.test.jsx +282 -0
- package/src/_tests_/views/components/SideBar/MockSideBar.js +1379 -0
- package/src/_tests_/views/components/SideBar/SideBar.test.jsx +98 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/AddManageSystemConfig.test.jsx.disable +164 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/UpdateManageSystemConfig.test.jsx.disable +157 -0
- package/src/_tests_/views/components/SystemConfig/MockSystemConfig.js +1280 -0
- package/src/_tests_/views/components/SystemConfig/SystemConfig.test.jsx.disable +165 -0
- package/src/_tests_/views/components/login/Login.test.jsx +276 -0
- package/src/_tests_/views/components/login/MockAuthorise.js +2414 -0
- package/src/_tests_/views/components/login/ServiceResponse.js +595 -0
- package/src/_tests_/views/components/user/MockManageUser.js +7965 -0
- package/src/_tests_/views/components/user/manageuser.test.jsx.disable +989 -0
- package/src/_tests_/views/components/user/mockUsersData.js +582 -0
- package/src/assets/img/OASISLogin.png +0 -0
- package/src/assets/img/bahaarNew.png +0 -0
- package/src/assets/img/dnhdd4K.png +0 -0
- package/src/assets/img/govtofup.png +0 -0
- package/src/assets/img/sewarural4K.png +0 -0
- package/src/assets/img/techo4K.png +0 -0
- package/src/assets/img/up4K.png +0 -0
- package/src/common/HolidayList.jsx +573 -0
- package/src/common/MalaciaousInputUtil.js +23 -0
- package/src/common/SafeHtml.jsx +17 -0
- package/src/common/VersionManager.jsx +109 -0
- package/src/common/constants/PerformanceDashboard.js +514 -0
- package/src/common/constants/app.constant.js +781 -0
- package/src/common/constants/cccVerificationConstants.js +18 -0
- package/src/common/constants/fhsrConstant.js +33 -0
- package/src/common/constants/gvk-verification.constant.js +76 -0
- package/src/common/constants/search.constant.js +23 -0
- package/src/common/constants/teleconsulatationConstant.jsx +1339 -0
- package/src/common/directives/SearchTemplate.jsx +784 -0
- package/src/common/directives/SearchTemplate.scss +14 -0
- package/src/common/dynamicView/DynamicView.jsx +353 -0
- package/src/common/dynamicView/InputFieldComponent.jsx +1501 -0
- package/src/common/dynamicView/InputViewComponent.jsx +298 -0
- package/src/common/dynamicView/InputViewComponent.scss +15 -0
- package/src/common/env.js +5 -0
- package/src/common/filters/locationNameFilter.js +26 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIcons.jsx +27 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIconsNames.js +1968 -0
- package/src/common/fontPreferences/fontSizeProvider.jsx +34 -0
- package/src/common/fontPreferences/fontSizeSelector.jsx +116 -0
- package/src/common/getAssignedFeature/getAssignedFeature.js +32 -0
- package/src/common/interceptors/AxiosInterceptor.js +216 -0
- package/src/common/languageTranslator/TranslationContext.js +5 -0
- package/src/common/languageTranslator/TranslationProvider.jsx +24 -0
- package/src/common/languageTranslator/i18n.js +49 -0
- package/src/common/services/AuthenticateService.js +116 -0
- package/src/common/services/DownloadFile.js +35 -0
- package/src/common/services/ForgotPassword.js +18 -0
- package/src/common/services/FormConfiguratorService.js +195 -0
- package/src/common/services/GlobalApis.js +84 -0
- package/src/common/services/InterceptorNavigationService.js +17 -0
- package/src/common/services/LocationService.js +65 -0
- package/src/common/services/LocationType.js +11 -0
- package/src/common/services/QueryBuilder.js +36 -0
- package/src/common/services/Roles.js +28 -0
- package/src/common/services/SyncWithServer.js +15 -0
- package/src/common/services/SystemConfig.js +15 -0
- package/src/common/services/TranslationService.js +70 -0
- package/src/common/services/TwoFactorService.js +7 -0
- package/src/common/services/Users.js +91 -0
- package/src/common/services/Webtasks.js +27 -0
- package/src/common/services/util/Convert-pad-data-to-API-format.jsx +167 -0
- package/src/common/services/util/Convert-to-UI-format.jsx +82 -0
- package/src/common/services/util/EmptyPrescriptionPadData.jsx +11 -0
- package/src/common/services/util/GeneralUtil.js +456 -0
- package/src/common/services/util/Prescription-pad-util.js +339 -0
- package/src/common/services/util/PrescriptionPadData.js +67 -0
- package/src/common/services/util/PrescriptionpadCommonUtil.js +96 -0
- package/src/common/services/util/ReportFieldUtil.jsx +398 -0
- package/src/common/services/util/WebSocketContext.jsx +261 -0
- package/src/common/syncWithServer/SyncWithServerDialog.jsx +170 -0
- package/src/common/syncWithServer/SyncWithServerDialogSkeleton.jsx +67 -0
- package/src/common/tests/CustomWrapper.jsx +49 -0
- package/src/common/tests/TranslationWrapper.jsx +38 -0
- package/src/common/themeProvider/ColorInputs.jsx +97 -0
- package/src/common/themeProvider/EditableColorInput.jsx +128 -0
- package/src/common/themeProvider/ThemeEditor.jsx +319 -0
- package/src/common/themeProvider/ThemeProvider.jsx +210 -0
- package/src/common/themeProvider/themeConfig.js +558 -0
- package/src/common/toaster/toaster.jsx +30 -0
- package/src/firebaseConfig.js +24 -0
- package/src/global.scss +221 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/useAESEncryption.js +56 -0
- package/src/hooks/useCaching.js +43 -0
- package/src/hooks/useDebounce.js +34 -0
- package/src/hooks/useDebounceFn.js +50 -0
- package/src/hooks/useDownloadPdf.js +358 -0
- package/src/hooks/useDownloadXlsx.js +55 -0
- package/src/hooks/useListValueFieldValues.js +30 -0
- package/src/hooks/useLocationHierarchies.js +63 -0
- package/src/hooks/useLocationHierarchyTranslate.js +16 -0
- package/src/hooks/useOnline.js +27 -0
- package/src/hooks/usePagination.js +63 -0
- package/src/hooks/useRefreshToken.js +87 -0
- package/src/hooks/useScript.js +25 -0
- package/src/hooks/useStopwatch.js +75 -0
- package/src/hooks/useTrackEvent.js +22 -0
- package/src/hooks/useWebAudioRecorder.js +115 -0
- package/src/layout/LoaderComponet.jsx +22 -0
- package/src/layout/LoaderContext.jsx +29 -0
- package/src/layout/mainLayout/AdaptiveZoom.jsx +27 -0
- package/src/layout/mainLayout/Chatbot.jsx +243 -0
- package/src/layout/mainLayout/Layout.jsx +445 -0
- package/src/layout/mainLayout/Profile/UpdateProfileModal.jsx +684 -0
- package/src/layout/mainLayout/header/LogoutModal.jsx +131 -0
- package/src/layout/mainLayout/header/Navbar.jsx +1677 -0
- package/src/layout/mainLayout/header/Navbar.scss +4 -0
- package/src/layout/mainLayout/header/index.js +0 -0
- package/src/layout/mainLayout/sidebar/SideBar.jsx +1402 -0
- package/src/layout/mainLayout/sidebar/Sidebar.css +159 -0
- package/src/layout/mainLayout/sidebar/index.js +0 -0
- package/src/logo.svg +1 -0
- package/src/reportWebVitals.js +13 -0
- package/src/setupFirebaseMessaging.js +28 -0
- package/src/setupTests.js +8 -0
- package/src/store/actions/AuthenticationActions.js +0 -0
- package/src/store/actions/ReportsActions.js +0 -0
- package/src/store/actions/TranslationAction.js +0 -0
- package/src/store/index.js +8 -0
- package/src/store/reducer.js +46 -0
- package/src/store/reducers/AuthenticationReducer.js +50 -0
- package/src/store/reducers/CalendarEventReducer.js +41 -0
- package/src/store/reducers/ConditionClipboardReducer.js +45 -0
- package/src/store/reducers/FeatureReducer.js +27 -0
- package/src/store/reducers/FormConfiguratorReducer.js +38 -0
- package/src/store/reducers/LoadingReducer.js +20 -0
- package/src/store/reducers/MembersAuthenticationReducer.js +28 -0
- package/src/store/reducers/PrescriptionPadReducer.js +329 -0
- package/src/store/reducers/QuestionaireReducer.js +29 -0
- package/src/store/reducers/ReportsReducer.js +24 -0
- package/src/store/reducers/SkeletonReducer.js +20 -0
- package/src/store/reducers/ThemeReducer.js +106 -0
- package/src/store/reducers/TranslationReducer.js +126 -0
- package/src/store/reducers/dashboardEditorSlice.js +77 -0
- package/src/store/reducers/districtHealthDashboardSlice.js +58 -0
- package/src/store/reducers/immunizationSlice.js +234 -0
- package/src/store/slices/dashboardPagesSlice.js +51 -0
- package/src/store/slices/dashboardSlice.js +14 -0
- package/src/utils/.gitkeep +0 -0
- package/src/utils/FormConstants.js +2629 -0
- package/src/utils/GujaratTopoChart.jsx +483 -0
- package/src/utils/UUIDgenerator.js +8 -0
- package/src/utils/appointment-utils/appointment-utils.js +123 -0
- package/src/utils/feature.js +42 -0
- package/src/utils/getThemeColor.js +12 -0
- package/src/utils/localStorageHelper.js +11 -0
- package/src/utils/notifications/enable-push-notifications.js +27 -0
- package/src/utils/resolveAppliedStyle.js +11 -0
- package/src/utils/themeConfigs.js +1483 -0
- package/src/views/custom-components/.gitkeep +0 -0
- package/src/views/custom-components/AgIconButton/RIf.jsx +14 -0
- package/src/views/custom-components/AgIconButton/button.jsx +108 -0
- package/src/views/custom-components/AgIconButton/waterDrop.jsx +95 -0
- package/src/views/custom-components/AgIconButton/waterDrop.scss +37 -0
- package/src/views/custom-components/AlertPlaceholder.jsx +32 -0
- package/src/views/custom-components/AllFaIconsSelector.jsx +56 -0
- package/src/views/custom-components/CkEditor/CkEditor.js +102 -0
- package/src/views/custom-components/CustomAccordion.jsx +72 -0
- package/src/views/custom-components/CustomActionIcons.jsx +118 -0
- package/src/views/custom-components/CustomAutoComplete.jsx +188 -0
- package/src/views/custom-components/CustomCheckBox.jsx +60 -0
- package/src/views/custom-components/CustomConfirmationModal.jsx +118 -0
- package/src/views/custom-components/CustomCountrySelect.jsx +129 -0
- package/src/views/custom-components/CustomDatePicker.jsx +122 -0
- package/src/views/custom-components/CustomDropdown.jsx +191 -0
- package/src/views/custom-components/CustomFileUpload.jsx +387 -0
- package/src/views/custom-components/CustomFullCalendar.jsx +514 -0
- package/src/views/custom-components/CustomInfiniteScroll.jsx +126 -0
- package/src/views/custom-components/CustomRadioComponent.jsx +65 -0
- package/src/views/custom-components/CustomStatsComponent.jsx +114 -0
- package/src/views/custom-components/CustomSvgUpload.jsx +170 -0
- package/src/views/custom-components/CustomSwitch.jsx +37 -0
- package/src/views/custom-components/CustomTabPanel.jsx +19 -0
- package/src/views/custom-components/CustomTextArea.jsx +62 -0
- package/src/views/custom-components/CustomTextArea.scss +27 -0
- package/src/views/custom-components/CustomTextField.jsx +116 -0
- package/src/views/custom-components/CustomToggleSwitch.jsx +138 -0
- package/src/views/custom-components/CustomTooltip.jsx +51 -0
- package/src/views/custom-components/CustomZoomImage.jsx +134 -0
- package/src/views/custom-components/CustomizedTable/CustomizedTableV2.jsx +1407 -0
- package/src/views/custom-components/CustomizedTable/VirtualizeTableBody.jsx +295 -0
- package/src/views/custom-components/CustomizedTable/helper.jsx +159 -0
- package/src/views/custom-components/CustomizedTable.jsx +532 -0
- package/src/views/custom-components/EditInputField.jsx +174 -0
- package/src/views/custom-components/FieldDescription.jsx +22 -0
- package/src/views/custom-components/FileDisplayComponent.jsx +138 -0
- package/src/views/custom-components/FormItem.jsx +53 -0
- package/src/views/custom-components/GenericChart.jsx +80 -0
- package/src/views/custom-components/InfoBadge.jsx +60 -0
- package/src/views/custom-components/PostgresEditor.jsx +801 -0
- package/src/views/custom-components/ResizableEditAutocompleteField.jsx +249 -0
- package/src/views/custom-components/ResizableEditInputField.jsx +215 -0
- package/src/views/custom-components/ResizeableEditSelectField.jsx +197 -0
- package/src/views/custom-components/SideOverlay.jsx +113 -0
- package/src/views/custom-components/SideOverlay.scss +42 -0
- package/src/views/custom-components/calendar.scss +571 -0
- package/src/views/feature-components/.gitkeep +0 -0
- package/src/views/feature-components/Dashboard/DashboardUI.jsx +1043 -0
- package/src/views/feature-components/Dashboard/DhnddModal/AshaDataQualityVerificationModal.jsx +278 -0
- package/src/views/feature-components/Dashboard/PinFeatureModal.jsx +143 -0
- package/src/views/feature-components/Dashboard/QuickLinks.jsx +163 -0
- package/src/views/feature-components/Dashboard/Taskbar.jsx +56 -0
- package/src/views/feature-components/Dashboard/WebtasksFilterForm.jsx +109 -0
- package/src/views/feature-components/Dashboard/WidgetCard.jsx +161 -0
- package/src/views/feature-components/Dashboard/actionModal.jsx +263 -0
- package/src/views/feature-components/Dashboard/ekavachModal/HealthWorkerIncorrectDetailsModal.jsx +332 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoMaternalDeathVerifcationModal.jsx +275 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoVerficationForChildScreeningMoadal.jsx +566 -0
- package/src/views/feature-components/FeatureUsageAnalytics/FeatureUsageAnalytics.jsx +989 -0
- package/src/views/feature-components/Features/NewServerManagement.jsx +217 -0
- package/src/views/feature-components/Features/ServerManagement.scss +120 -0
- package/src/views/feature-components/ForgotPassword/ForgotPassword.jsx +226 -0
- package/src/views/feature-components/LocationDirective/LocationDirective.jsx +992 -0
- package/src/views/feature-components/LocationDirective/LocationDirectiveV2.jsx +909 -0
- package/src/views/feature-components/NotFound.jsx +66 -0
- package/src/views/feature-components/Onboarding/Onboarding.jsx +1400 -0
- package/src/views/feature-components/Skeletons.js +115 -0
- package/src/views/feature-components/Unauthorized.jsx +48 -0
- package/src/views/feature-components/VerifyRoute.jsx +88 -0
- package/src/views/feature-components/YearlyRecap/YearlyRecap.jsx +357 -0
- package/src/views/feature-components/YearlyRecap/components/RecapSlide.jsx +183 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationContext.js +5 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationProvider.jsx +26 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/i18n.js +46 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/translations.json +167 -0
- package/src/views/feature-components/YearlyRecap/slides/IntroSlide.jsx +233 -0
- package/src/views/feature-components/YearlyRecap/slides/MaternalHealthSlide.jsx +146 -0
- package/src/views/feature-components/YearlyRecap/slides/MetricSlide.jsx +227 -0
- package/src/views/feature-components/YearlyRecap/slides/OutroSlide.jsx +701 -0
- package/src/views/feature-components/YearlyRecap/slides/ReachSlide.jsx +273 -0
- package/src/views/feature-components/login/Login.jsx +840 -0
- package/src/views/feature-components/login/Login.scss +154 -0
- package/src/views/feature-components/login/LoginConfigurator.jsx +1149 -0
- package/src/views/feature-components/login/TwoFactorSetupModal.jsx +411 -0
- package/src/views/feature-components/login/simplifyMenu.js +45 -0
- package/src/views/feature-components/system-config/ManageSystemConfigs.jsx +284 -0
- package/src/views/feature-components/system-config/SystemConfig.jsx +299 -0
- package/src/views/feature-components/users/ChangePasswordModal.jsx +243 -0
- package/src/views/feature-components/users/PasswordField.jsx +56 -0
- package/dist/index.css +0 -1
- package/dist/index.js +0 -32001
- package/dist/index.js.map +0 -1
package/src/global.scss
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
3
|
+
so we've added these compatibility styles to make sure everything still
|
|
4
|
+
looks the same as it did with Tailwind CSS v3.
|
|
5
|
+
|
|
6
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
7
|
+
color utility to any element that depends on these defaults.
|
|
8
|
+
*/
|
|
9
|
+
@layer base {
|
|
10
|
+
*,
|
|
11
|
+
::after,
|
|
12
|
+
::before,
|
|
13
|
+
::backdrop,
|
|
14
|
+
::file-selector-button {
|
|
15
|
+
border-color: var(--color-gray-200, currentColor);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@layer base {
|
|
20
|
+
body {
|
|
21
|
+
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-family:
|
|
24
|
+
'Mulish',
|
|
25
|
+
-apple-system,
|
|
26
|
+
BlinkMacSystemFont,
|
|
27
|
+
'Segoe UI',
|
|
28
|
+
'Roboto',
|
|
29
|
+
'Oxygen',
|
|
30
|
+
'Ubuntu',
|
|
31
|
+
'Cantarell',
|
|
32
|
+
'Fira Sans',
|
|
33
|
+
'Droid Sans',
|
|
34
|
+
'Helvetica Neue',
|
|
35
|
+
sans-serif;
|
|
36
|
+
-webkit-font-smoothing: antialiased;
|
|
37
|
+
-moz-osx-font-smoothing: grayscale;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
code {
|
|
41
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ck-editor__editable {
|
|
45
|
+
word-break: break-word !important;
|
|
46
|
+
overflow-wrap: break-word !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::-webkit-scrollbar {
|
|
50
|
+
width: 2px;
|
|
51
|
+
height: 5px;
|
|
52
|
+
}
|
|
53
|
+
::-webkit-scrollbar-track {
|
|
54
|
+
background: #f1f1f1;
|
|
55
|
+
}
|
|
56
|
+
::-webkit-scrollbar-thumb {
|
|
57
|
+
background: #929292;
|
|
58
|
+
border-radius: 20px;
|
|
59
|
+
}
|
|
60
|
+
::-webkit-scrollbar-thumb:hover {
|
|
61
|
+
background: #7a7a7a;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.loader-overlay {
|
|
65
|
+
position: fixed;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
background: rgba(0, 0, 0, 0.5);
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
z-index: 9999;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.loader-spinner {
|
|
78
|
+
border: 8px solid #f3f3f3;
|
|
79
|
+
border-top: 8px solid #3498db;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
width: 60px;
|
|
82
|
+
height: 60px;
|
|
83
|
+
animation: spin 1s linear infinite;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes spin {
|
|
87
|
+
0% {
|
|
88
|
+
transform: rotate(0deg);
|
|
89
|
+
}
|
|
90
|
+
100% {
|
|
91
|
+
transform: rotate(360deg);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@keyframes rotate {
|
|
96
|
+
0% {
|
|
97
|
+
transform: rotate(0deg);
|
|
98
|
+
}
|
|
99
|
+
100% {
|
|
100
|
+
transform: rotate(360deg);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.loader {
|
|
105
|
+
animation: rotate 1.8s linear infinite;
|
|
106
|
+
width: 70px;
|
|
107
|
+
height: 70px;
|
|
108
|
+
filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.4));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.error-helper-text {
|
|
113
|
+
color: #5c0606;
|
|
114
|
+
position: absolute;
|
|
115
|
+
padding-left: 5%;
|
|
116
|
+
padding-right: 5%;
|
|
117
|
+
border-radius: 20px;
|
|
118
|
+
right: 3%;
|
|
119
|
+
top: 0%;
|
|
120
|
+
transform: translateY(-25%);
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
background-color: rgb(236, 188, 188);
|
|
123
|
+
font-size: 0.6rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.success-helper-text {
|
|
127
|
+
color: #0b8600;
|
|
128
|
+
position: absolute;
|
|
129
|
+
padding-left: 5%;
|
|
130
|
+
padding-right: 5%;
|
|
131
|
+
border-radius: 20px;
|
|
132
|
+
right: 3%;
|
|
133
|
+
top: 0%;
|
|
134
|
+
transform: translateY(-25%);
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
background-color: rgb(204, 243, 237);
|
|
137
|
+
font-size: 0.6rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:root {
|
|
141
|
+
font-size: var(--base-font-size, 16px) !important;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// html {
|
|
145
|
+
// font-size: var(--base-font-size) !important;
|
|
146
|
+
// }
|
|
147
|
+
|
|
148
|
+
// * {
|
|
149
|
+
// font-size: inherit !important;
|
|
150
|
+
// }
|
|
151
|
+
|
|
152
|
+
.font-wrapper-div {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
font-size: 16px;
|
|
156
|
+
margin-left: 15px;
|
|
157
|
+
margin-bottom: 5px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.text-blue {
|
|
161
|
+
color: #0056b9;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.pdf-hidden {
|
|
165
|
+
display: none !important;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.cst-day {
|
|
169
|
+
font-size: 15px;
|
|
170
|
+
width: 38px;
|
|
171
|
+
height: 38px;
|
|
172
|
+
padding-top: 5px;
|
|
173
|
+
margin-right: 0.5rem;
|
|
174
|
+
border-radius: 50%;
|
|
175
|
+
text-align: center;
|
|
176
|
+
background: #11B666;
|
|
177
|
+
color: white;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.w-full {
|
|
181
|
+
width: 100%;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.prescription-container * {
|
|
185
|
+
all: revert; /* reset app styles */
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
/* Custom robust tab indicator styling to resolve coordinate-based alignment failures */
|
|
192
|
+
.MuiTabs-indicator {
|
|
193
|
+
display: none !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.MuiTab-root {
|
|
197
|
+
position: relative !important;
|
|
198
|
+
transition: color 0.25s ease-in-out;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.MuiTab-root.Mui-selected {
|
|
202
|
+
font-weight: bold !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.MuiTab-root::after {
|
|
206
|
+
content: '' !important;
|
|
207
|
+
position: absolute !important;
|
|
208
|
+
bottom: 0 !important;
|
|
209
|
+
left: 8px !important;
|
|
210
|
+
right: 8px !important;
|
|
211
|
+
height: 3px !important;
|
|
212
|
+
border-radius: 3px 3px 0 0 !important;
|
|
213
|
+
background-color: var(--color-primary) !important;
|
|
214
|
+
transform: scaleX(0);
|
|
215
|
+
transform-origin: center;
|
|
216
|
+
transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.MuiTab-root.Mui-selected::after {
|
|
220
|
+
transform: scaleX(1) !important;
|
|
221
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
3
|
+
|
|
4
|
+
import GeneralUtil from '@/common/services/util/GeneralUtil';
|
|
5
|
+
|
|
6
|
+
const useAESEncryption = () => {
|
|
7
|
+
const [passwordEncryptionKey, setPasswordEncryptionKey] = useState(null);
|
|
8
|
+
const [vector, setVector] = useState(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
api
|
|
11
|
+
.get('/login/get-key-and-iv', {
|
|
12
|
+
withCredentials: true, // Important!
|
|
13
|
+
})
|
|
14
|
+
.then((response) => {
|
|
15
|
+
setPasswordEncryptionKey(response.data.key);
|
|
16
|
+
setVector(response.data.initVector);
|
|
17
|
+
})
|
|
18
|
+
.catch((error) => {
|
|
19
|
+
console.error('Server error', error);
|
|
20
|
+
});
|
|
21
|
+
}, []);
|
|
22
|
+
|
|
23
|
+
const encrypt = async (data) => {
|
|
24
|
+
if (!passwordEncryptionKey || !vector) {
|
|
25
|
+
console.error('Key and vector must be set before encryption');
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
let encryptionKey = passwordEncryptionKey;
|
|
30
|
+
let initVector = vector;
|
|
31
|
+
return await GeneralUtil.getEncodedData(encryptionKey, initVector, data);
|
|
32
|
+
} catch (ex) {
|
|
33
|
+
console.error('Encryption error:', ex);
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const decrypt = async (encryptedData) => {
|
|
39
|
+
if (!passwordEncryptionKey || !vector) {
|
|
40
|
+
console.error('Key and vector must be set before decryption');
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
let encryptionKey = passwordEncryptionKey;
|
|
45
|
+
let initVector = vector;
|
|
46
|
+
return await GeneralUtil.getDecryptedData(encryptionKey, initVector, encryptedData);
|
|
47
|
+
} catch (ex) {
|
|
48
|
+
console.error('Decryption error:', ex);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return { encrypt, decrypt };
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default useAESEncryption;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
|
|
3
|
+
const useCaching = () => {
|
|
4
|
+
const queryClient = useQueryClient();
|
|
5
|
+
|
|
6
|
+
const fetchData = async ({ cacheKey, fetchFn, staleTime, cacheTime }) => {
|
|
7
|
+
try {
|
|
8
|
+
const data = await queryClient.fetchQuery({
|
|
9
|
+
queryKey: cacheKey,
|
|
10
|
+
queryFn: fetchFn,
|
|
11
|
+
staleTime: staleTime,
|
|
12
|
+
gcTime: cacheTime,
|
|
13
|
+
});
|
|
14
|
+
return data;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error(error);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getCachedData = async ({ cacheKey, fetchFn, staleTime, cacheTime }) => {
|
|
21
|
+
const data = queryClient.getQueryData(cacheKey);
|
|
22
|
+
if (!data) {
|
|
23
|
+
return await fetchData({ cacheKey, fetchFn, staleTime, cacheTime });
|
|
24
|
+
}
|
|
25
|
+
return data;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const clearCache = (cacheKey) => {
|
|
29
|
+
queryClient.removeQueries({ queryKey: cacheKey });
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const peekCache = (cacheKey) => {
|
|
33
|
+
return queryClient.getQueryData(cacheKey);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const updateCache = (cacheKey, data) => {
|
|
37
|
+
queryClient.setQueryData(cacheKey, data);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return { getCachedData, peekCache, clearCache, updateCache };
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default useCaching;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook to debounce a value.
|
|
5
|
+
*
|
|
6
|
+
* @param {any} value - The value to debounce.
|
|
7
|
+
* @param {number} delay - The delay (in milliseconds) after which the debounced value is updated.
|
|
8
|
+
* @returns {any} - The debounced value, which will only update after the specified delay.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const debouncedSearchTerm = useDebounce(searchTerm, 500);
|
|
12
|
+
*
|
|
13
|
+
* // In the example above, the `debouncedSearchTerm` will only update
|
|
14
|
+
* // after 500ms have passed without any changes to `searchTerm`.
|
|
15
|
+
* This is useful for cases like searching where you don't want to trigger
|
|
16
|
+
* an action on every keystroke, but rather after the user has stopped typing.
|
|
17
|
+
*/
|
|
18
|
+
export function useDebounce(value, delay) {
|
|
19
|
+
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
// Set a timeout to update the debounced value after the delay
|
|
23
|
+
const handler = setTimeout(() => {
|
|
24
|
+
setDebouncedValue(value);
|
|
25
|
+
}, delay);
|
|
26
|
+
|
|
27
|
+
// Cleanup the timeout if the component re-renders before the delay is complete
|
|
28
|
+
return () => {
|
|
29
|
+
clearTimeout(handler);
|
|
30
|
+
};
|
|
31
|
+
}, [value, delay]);
|
|
32
|
+
|
|
33
|
+
return debouncedValue;
|
|
34
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook to debounce a function.
|
|
5
|
+
*
|
|
6
|
+
* @param {Function} callback - The function to debounce. Can be asynchronous.
|
|
7
|
+
* @param {number} delay - The delay (in milliseconds) after which the function will be executed.
|
|
8
|
+
* @returns {Function} - A debounced version of the input function.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const debouncedFetchData = useDebouncedFunction(fetchData, 500);
|
|
12
|
+
*
|
|
13
|
+
* // In the example above, the `debouncedFetchData` function will only execute
|
|
14
|
+
* // after 500ms have passed without being called again.
|
|
15
|
+
*/
|
|
16
|
+
export function useDebounceFn(callback, delay) {
|
|
17
|
+
const callbackRef = useRef(callback);
|
|
18
|
+
const timeoutRef = useRef(null);
|
|
19
|
+
|
|
20
|
+
// Update the callback reference if it changes
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
callbackRef.current = callback;
|
|
23
|
+
}, [callback]);
|
|
24
|
+
|
|
25
|
+
const debouncedFunction = useCallback(
|
|
26
|
+
(...args) => {
|
|
27
|
+
// Clear the existing timeout if any
|
|
28
|
+
if (timeoutRef.current) {
|
|
29
|
+
clearTimeout(timeoutRef.current);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Set a new timeout to call the callback after the delay
|
|
33
|
+
timeoutRef.current = setTimeout(() => {
|
|
34
|
+
callbackRef.current(...args);
|
|
35
|
+
}, delay);
|
|
36
|
+
},
|
|
37
|
+
[delay] // Recreate the function if the delay changes
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
// Cleanup timeout on component unmount
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
return () => {
|
|
43
|
+
if (timeoutRef.current) {
|
|
44
|
+
clearTimeout(timeoutRef.current);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
return debouncedFunction;
|
|
50
|
+
}
|