@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.
- 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/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
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Box, Typography } from '@mui/material';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import RecapSlide from '../components/RecapSlide';
|
|
5
|
+
|
|
6
|
+
import { useTranslateProvider } from '@/common/languageTranslator/TranslationContext';
|
|
7
|
+
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
|
|
10
|
+
const bubbleVariants = {
|
|
11
|
+
hidden: {
|
|
12
|
+
opacity: 0,
|
|
13
|
+
scale: 0.7,
|
|
14
|
+
y: 260,
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
focus: {
|
|
18
|
+
opacity: 1,
|
|
19
|
+
scale: 1,
|
|
20
|
+
y: '-25vh',
|
|
21
|
+
transition: {
|
|
22
|
+
duration: 1.3,
|
|
23
|
+
ease: 'easeOut',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
parked: (pos) => {
|
|
28
|
+
const isSmall = window.innerWidth < 360;
|
|
29
|
+
|
|
30
|
+
// base vertical spacing derived from bubble size
|
|
31
|
+
const verticalUnit = isSmall ? 140 : 180;
|
|
32
|
+
const horizontalUnit = isSmall ? 40 : 80;
|
|
33
|
+
|
|
34
|
+
switch (pos) {
|
|
35
|
+
case 'topLeft':
|
|
36
|
+
return {
|
|
37
|
+
opacity: 1,
|
|
38
|
+
scale: 0.78,
|
|
39
|
+
x: -30,
|
|
40
|
+
y: -verticalUnit * 2,
|
|
41
|
+
transition: {
|
|
42
|
+
duration: 1.6,
|
|
43
|
+
ease: 'easeInOut',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
case 'centerRight':
|
|
48
|
+
return {
|
|
49
|
+
opacity: 1,
|
|
50
|
+
scale: 0.78,
|
|
51
|
+
x: horizontalUnit,
|
|
52
|
+
y: -verticalUnit,
|
|
53
|
+
transition: {
|
|
54
|
+
duration: 1.6,
|
|
55
|
+
ease: 'easeInOut',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
case 'bottomLeft':
|
|
60
|
+
default:
|
|
61
|
+
return {
|
|
62
|
+
opacity: 1,
|
|
63
|
+
scale: 0.78,
|
|
64
|
+
x: -30,
|
|
65
|
+
y: 0,
|
|
66
|
+
transition: {
|
|
67
|
+
duration: 1.6,
|
|
68
|
+
ease: 'easeInOut',
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const FloatingOrbs = () => {
|
|
76
|
+
return (
|
|
77
|
+
<>
|
|
78
|
+
{[...Array(8)].map((_, i) => (
|
|
79
|
+
<motion.div
|
|
80
|
+
key={i}
|
|
81
|
+
initial={{
|
|
82
|
+
opacity: 0,
|
|
83
|
+
x: Math.random() * window.innerWidth,
|
|
84
|
+
y: window.innerHeight + 100,
|
|
85
|
+
}}
|
|
86
|
+
animate={{
|
|
87
|
+
opacity: [0, 0.4, 0],
|
|
88
|
+
y: -200,
|
|
89
|
+
}}
|
|
90
|
+
transition={{
|
|
91
|
+
duration: 12 + Math.random() * 6,
|
|
92
|
+
repeat: Infinity,
|
|
93
|
+
delay: Math.random() * 4,
|
|
94
|
+
ease: 'linear',
|
|
95
|
+
}}
|
|
96
|
+
style={{
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
width: 12 + Math.random() * 14,
|
|
99
|
+
height: 12 + Math.random() * 14,
|
|
100
|
+
borderRadius: '50%',
|
|
101
|
+
background: 'rgba(255,255,255,0.4)',
|
|
102
|
+
filter: 'blur(1px)',
|
|
103
|
+
pointerEvents: 'none',
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
))}
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const Bubble = ({ title1, title2, value, color, phase, position }) => {
|
|
112
|
+
const BUBBLE_SIZE = 'clamp(180px, 55vw, 260px)';
|
|
113
|
+
return (
|
|
114
|
+
<motion.div
|
|
115
|
+
custom={position}
|
|
116
|
+
variants={bubbleVariants}
|
|
117
|
+
initial="hidden"
|
|
118
|
+
animate={phase}
|
|
119
|
+
style={{
|
|
120
|
+
position: 'absolute',
|
|
121
|
+
bottom: 0,
|
|
122
|
+
width: BUBBLE_SIZE,
|
|
123
|
+
height: BUBBLE_SIZE,
|
|
124
|
+
borderRadius: '50%',
|
|
125
|
+
background: color,
|
|
126
|
+
display: 'flex',
|
|
127
|
+
flexDirection: 'column',
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
justifyContent: 'center',
|
|
130
|
+
color: '#fff',
|
|
131
|
+
boxShadow: '0 18px 40px rgba(0,0,0,0.25)',
|
|
132
|
+
padding: '1rem',
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<Typography
|
|
136
|
+
variant="h6"
|
|
137
|
+
sx={{
|
|
138
|
+
opacity: 0.9,
|
|
139
|
+
letterSpacing: 0.5,
|
|
140
|
+
px: 1,
|
|
141
|
+
textAlign: 'center',
|
|
142
|
+
fontSize: 'clamp(0.85rem, 3.5vw, 1rem)',
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
{title1}
|
|
146
|
+
</Typography>
|
|
147
|
+
<Typography
|
|
148
|
+
variant="h2"
|
|
149
|
+
sx={{
|
|
150
|
+
fontWeight: 900,
|
|
151
|
+
fontSize: 'clamp(1.8rem, 8vw, 3rem)',
|
|
152
|
+
lineHeight: 1,
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
{value}
|
|
156
|
+
</Typography>
|
|
157
|
+
<Typography
|
|
158
|
+
variant="h6"
|
|
159
|
+
sx={{
|
|
160
|
+
opacity: 0.9,
|
|
161
|
+
letterSpacing: 0.5,
|
|
162
|
+
px: 1,
|
|
163
|
+
textAlign: 'center',
|
|
164
|
+
fontSize: 'clamp(0.85rem, 3.5vw, 1rem)',
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
{title2}
|
|
168
|
+
</Typography>
|
|
169
|
+
</motion.div>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const ReachSlide = ({ data, onNext, onPrev, isActive }) => {
|
|
174
|
+
const { translate } = useTranslateProvider();
|
|
175
|
+
const [familyPhase, setFamilyPhase] = useState('hidden');
|
|
176
|
+
const [memberPhase, setMemberPhase] = useState('hidden');
|
|
177
|
+
const [childPhase, setChildPhase] = useState('hidden');
|
|
178
|
+
|
|
179
|
+
useEffect(() => {
|
|
180
|
+
if (!isActive) return;
|
|
181
|
+
|
|
182
|
+
// reset once
|
|
183
|
+
setFamilyPhase('hidden');
|
|
184
|
+
setMemberPhase('hidden');
|
|
185
|
+
setChildPhase('hidden');
|
|
186
|
+
|
|
187
|
+
const t1 = setTimeout(() => setFamilyPhase('focus'), 600);
|
|
188
|
+
const t2 = setTimeout(() => setFamilyPhase('parked'), 2600);
|
|
189
|
+
|
|
190
|
+
const t3 = setTimeout(() => setMemberPhase('focus'), 3200);
|
|
191
|
+
const t4 = setTimeout(() => setMemberPhase('parked'), 5200);
|
|
192
|
+
|
|
193
|
+
const t5 = setTimeout(() => setChildPhase('focus'), 5800);
|
|
194
|
+
const t6 = setTimeout(() => setChildPhase('parked'), 7800);
|
|
195
|
+
|
|
196
|
+
return () => {
|
|
197
|
+
[t1, t2, t3, t4, t5, t6].forEach(clearTimeout);
|
|
198
|
+
};
|
|
199
|
+
}, [isActive]);
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<RecapSlide
|
|
203
|
+
onNext={onNext}
|
|
204
|
+
onPrev={onPrev}
|
|
205
|
+
bgGradient="linear-gradient(to top, #fff1eb 0%, #ace0f9 100%)"
|
|
206
|
+
sx={{
|
|
207
|
+
backgroundSize: '400% 400%',
|
|
208
|
+
animation: 'gradientShift 20s ease infinite',
|
|
209
|
+
}}
|
|
210
|
+
isActive={isActive}
|
|
211
|
+
>
|
|
212
|
+
<Box
|
|
213
|
+
sx={{
|
|
214
|
+
position: 'relative',
|
|
215
|
+
height: '90vh',
|
|
216
|
+
width: '100%',
|
|
217
|
+
overflow: 'hidden',
|
|
218
|
+
display: 'flex',
|
|
219
|
+
alignItems: 'center',
|
|
220
|
+
justifyContent: 'center',
|
|
221
|
+
paddingBottom: 'env(safe-area-inset-bottom)',
|
|
222
|
+
}}
|
|
223
|
+
>
|
|
224
|
+
<FloatingOrbs />
|
|
225
|
+
|
|
226
|
+
<Bubble
|
|
227
|
+
title1={translate('A big year, you stood with')}
|
|
228
|
+
title2={translate('families')}
|
|
229
|
+
value={data.familiesContacted}
|
|
230
|
+
color="linear-gradient(135deg,#2196F3,#21CBF3)"
|
|
231
|
+
phase={familyPhase}
|
|
232
|
+
position="topLeft"
|
|
233
|
+
/>
|
|
234
|
+
|
|
235
|
+
<Bubble
|
|
236
|
+
title1={translate('Your efforts touched the lives of')}
|
|
237
|
+
title2={translate('people')}
|
|
238
|
+
value={data.membersServed}
|
|
239
|
+
color="linear-gradient(135deg,#26A69A,#80CBC4)"
|
|
240
|
+
phase={memberPhase}
|
|
241
|
+
position="centerRight"
|
|
242
|
+
/>
|
|
243
|
+
|
|
244
|
+
<Bubble
|
|
245
|
+
title1={translate('Because of you,')}
|
|
246
|
+
title2={translate('children are healthier today')}
|
|
247
|
+
value={data.childrenServed}
|
|
248
|
+
color="linear-gradient(135deg,#7E57C2,#B39DDB)"
|
|
249
|
+
phase={childPhase}
|
|
250
|
+
position="bottomLeft"
|
|
251
|
+
/>
|
|
252
|
+
</Box>
|
|
253
|
+
</RecapSlide>
|
|
254
|
+
);
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
Bubble.propTypes = {
|
|
258
|
+
title1: PropTypes.string,
|
|
259
|
+
title2: PropTypes.string,
|
|
260
|
+
value: PropTypes.number,
|
|
261
|
+
color: PropTypes.string,
|
|
262
|
+
phase: PropTypes.string,
|
|
263
|
+
position: PropTypes.string,
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
ReachSlide.propTypes = {
|
|
267
|
+
data: PropTypes.any,
|
|
268
|
+
onNext: PropTypes.func,
|
|
269
|
+
onPrev: PropTypes.func,
|
|
270
|
+
isActive: PropTypes.bool,
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export default ReachSlide;
|