@argusoft/medplat-app-shell 1.0.5 → 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
@@ -0,0 +1,573 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ Box,
4
+ Typography,
5
+ Paper,
6
+ Table,
7
+ TableBody,
8
+ TableCell,
9
+ TableContainer,
10
+ TableHead,
11
+ TableRow,
12
+ Tabs,
13
+ Tab,
14
+ Container,
15
+ Chip,
16
+ Fade,
17
+ } from '@mui/material';
18
+ import { motion } from 'framer-motion';
19
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
20
+ import { faCalendarDays, faCircleInfo, faBuildingColumns } from '@fortawesome/free-solid-svg-icons';
21
+ import PropTypes from 'prop-types';
22
+
23
+ const generalHolidays2026 = [
24
+ { id: 1, name: 'Makar Sankranti', date: '14th January, 2026', day: 'Wednesday', type: 'General' },
25
+ { id: 2, name: 'Republic Day', date: '26th January, 2026', day: 'Monday', type: 'General' },
26
+ { id: 3, name: 'Holi 2nd Day - Dhuleti', date: '04th March, 2026', day: 'Wednesday', type: 'General' },
27
+ { id: 4, name: 'Chetichand', date: '19th March, 2026', day: 'Thursday', type: 'General' },
28
+ {
29
+ id: 5,
30
+ name: 'Ramjan-Eid (Eid-Ul-Fitra) (1st Shawaal)',
31
+ date: '21st March, 2026',
32
+ day: 'Saturday',
33
+ type: 'General',
34
+ },
35
+ { id: 6, name: 'Shree Ram Navmi', date: '26th March, 2026', day: 'Thursday', type: 'General' },
36
+ { id: 7, name: 'Mahavir Janma Kalyanak', date: '31st March, 2026', day: 'Tuesday', type: 'General' },
37
+ { id: 8, name: 'Good Friday', date: '3rd April, 2026', day: 'Friday', type: 'General' },
38
+ { id: 9, name: "Dr. Baba Saheb Ambedkar's Birthday", date: '14th April, 2026', day: 'Tuesday', type: 'General' },
39
+ { id: 10, name: 'Eid-Ul-Adha (Bakri-Eid)', date: '27th May, 2026', day: 'Wednesday', type: 'General' },
40
+ { id: 11, name: 'Muharram (Ashoora)', date: '26th June, 2026', day: 'Friday', type: 'General' },
41
+ {
42
+ id: 12,
43
+ name: 'Independence Day / Parsi New Year Day- Pateti (Parsi Shahenshahi)',
44
+ date: '15th August, 2026',
45
+ day: 'Saturday',
46
+ type: 'General',
47
+ },
48
+ {
49
+ id: 13,
50
+ name: "Eid-e-Meeladunnabi - (Prophet Mohammad's Birthday) (bara vafat)",
51
+ date: '26th August, 2026',
52
+ day: 'Wednesday',
53
+ type: 'General',
54
+ },
55
+ { id: 14, name: 'Raksha Bandhan', date: '28th August, 2026', day: 'Friday', type: 'General' },
56
+ { id: 15, name: 'Janmashtami (Shravan Vad-8)', date: '04th September, 2026', day: 'Friday', type: 'General' },
57
+ { id: 16, name: 'Samvatsari (Chaturthi Paksha)', date: '15th September, 2026', day: 'Tuesday', type: 'General' },
58
+ { id: 17, name: "Mahatma Gandhi's Birthday", date: '02nd October, 2026', day: 'Friday', type: 'General' },
59
+ { id: 18, name: 'Dusshera (Vijaya Dashmi)', date: '20th October, 2026', day: 'Tuesday', type: 'General' },
60
+ { id: 19, name: "Sardar Vallabhbhai Patel's Birthday", date: '31st October, 2026', day: 'Saturday', type: 'General' },
61
+ { id: 20, name: 'Vikram Samvant New Year Day', date: '10th November, 2026', day: 'Tuesday', type: 'General' },
62
+ { id: 21, name: 'Bhai Bij', date: '11th November, 2026', day: 'Wednesday', type: 'General' },
63
+ { id: 22, name: "Guru Nanak's Birthday", date: '24th November, 2026', day: 'Tuesday', type: 'General' },
64
+ { id: 23, name: 'Christmas', date: '25th December, 2026', day: 'Friday', type: 'General' },
65
+ ];
66
+
67
+ const sundayGeneralHolidays2026 = [
68
+ { id: 24, name: 'Maha Shivratri (Maha vad-13)', date: '15th February, 2026', day: 'Sunday', type: 'Weekend' },
69
+ { id: 25, name: 'Bhagvan Shree Parshuram Jayanti', date: '19th April, 2026', day: 'Sunday', type: 'Weekend' },
70
+ { id: 26, name: 'Diwali', date: '08th November, 2026', day: 'Sunday', type: 'Weekend' },
71
+ ];
72
+
73
+ const bankHolidays2026 = [
74
+ { id: 1, name: 'Makar Sankranti', date: '14th January, 2026', day: 'Wednesday', type: 'Bank' },
75
+ { id: 2, name: 'Republic Day', date: '26th January, 2026', day: 'Monday', type: 'Bank' },
76
+ { id: 3, name: 'Holi 2nd Day - Dhuleti', date: '04th March, 2026', day: 'Wednesday', type: 'Bank' },
77
+ { id: 4, name: 'Ramjan-Eid (Eid-Ul-Fitra) (1st Shawwal)', date: '21st March, 2026', day: 'Saturday', type: 'Bank' },
78
+ { id: 5, name: 'Shree Ram Navmi', date: '26th March, 2026', day: 'Thursday', type: 'Bank' },
79
+ { id: 6, name: 'Mahavir Janma Kalyanak', date: '31st March, 2026', day: 'Tuesday', type: 'Bank' },
80
+ { id: 7, name: 'Good Friday', date: '03rd April, 2026', day: 'Friday', type: 'Bank' },
81
+ { id: 8, name: "Dr. Baba Saheb Ambedkar's Birthday", date: '14th April, 2026', day: 'Tuesday', type: 'Bank' },
82
+ { id: 9, name: 'Eid-Ul-Adha (Bakri-Eid)', date: '27th May, 2026', day: 'Wednesday', type: 'Bank' },
83
+ { id: 10, name: 'Independence Day', date: '15th August, 2026', day: 'Saturday', type: 'Bank' },
84
+ { id: 11, name: 'Raksha Bandhan', date: '28th August, 2026', day: 'Friday', type: 'Bank' },
85
+ { id: 12, name: 'Janmashtami (Shravan Vad-8)', date: '04th September, 2026', day: 'Friday', type: 'Bank' },
86
+ { id: 13, name: 'Samvatsari (Chaturthi Paksha)', date: '15th September, 2026', day: 'Tuesday', type: 'Bank' },
87
+ { id: 14, name: "Mahatma Gandhi's Birthday", date: '02nd October, 2026', day: 'Friday', type: 'Bank' },
88
+ { id: 15, name: 'Dusshera (Vijaya Dashmi) (Aaso sud-10)', date: '20th October, 2026', day: 'Tuesday', type: 'Bank' },
89
+ { id: 16, name: "Sardar Vallabhbhai Patel's Birthday", date: '31st October, 2026', day: 'Saturday', type: 'Bank' },
90
+ { id: 17, name: 'Vikram Samvant New Year Day', date: '10th November, 2026', day: 'Tuesday', type: 'Bank' },
91
+ { id: 18, name: 'Christmas', date: '25th December, 2026', day: 'Friday', type: 'Bank' },
92
+ ];
93
+
94
+ const sundayBankHolidays2026 = [
95
+ { id: 19, name: 'Maha Shivratri (Maha vad-13)', date: '15th February, 2026', day: 'Sunday', type: 'Sunday' },
96
+ { id: 20, name: 'Bhagvan Shree Parshuram Jayanti', date: '19th April, 2026', day: 'Sunday', type: 'Sunday' },
97
+ { id: 21, name: 'Diwali', date: '08th November, 2026', day: 'Sunday', type: 'Sunday' },
98
+ ];
99
+
100
+ const specialBankHolidays2026 = [
101
+ { id: 22, name: 'Yearly Closing of Accounts', date: '01st April, 2026', day: 'Wednesday', type: 'Special' },
102
+ ];
103
+
104
+ const optionalHolidays2026 = [
105
+ { id: 1, name: 'Christian New Year Day', date: '01st January, 2026', day: 'Thursday', type: 'Optional' },
106
+ {
107
+ id: 2,
108
+ name: 'Vassi Uttarayan (Next Day to Makar Sankranti)',
109
+ date: '15th January, 2026',
110
+ day: 'Thursday',
111
+ type: 'Optional',
112
+ },
113
+ { id: 3, name: 'Vishvakarma Jayanti (Maha Sud-13)', date: '31st January, 2026', day: 'Saturday', type: 'Optional' },
114
+ {
115
+ id: 4,
116
+ name: 'Shab-e-Barat / Birthday of Dhani Matang Dev',
117
+ date: '04th February, 2026',
118
+ day: 'Wednesday',
119
+ type: 'Optional',
120
+ },
121
+ { id: 5, name: 'Holi', date: '03rd March, 2026', day: 'Tuesday', type: 'Optional' },
122
+ { id: 6, name: 'Shahadat-e-Hazarat Ali', date: '11th March, 2026', day: 'Wednesday', type: 'Optional' },
123
+ { id: 7, name: 'Gudi Padvo (Chaitra Sud-1)', date: '19th March, 2026', day: 'Thursday', type: 'Optional' },
124
+ { id: 8, name: 'Jamshedi Navroz', date: '21st March, 2026', day: 'Saturday', type: 'Optional' },
125
+ { id: 9, name: 'Hatkeshvar Jayanti', date: '01st April, 2026', day: 'Wednesday', type: 'Optional' },
126
+ {
127
+ id: 10,
128
+ name: 'Hanuman Jayanti (Chaitra Sud-15) / Pesah (1st Day)',
129
+ date: '02nd April, 2026',
130
+ day: 'Thursday',
131
+ type: 'Optional',
132
+ },
133
+ { id: 11, name: "Maha Prabhuji's Praktyotsava", date: '13th April, 2026', day: 'Monday', type: 'Optional' },
134
+ {
135
+ id: 12,
136
+ name: 'Shree Adhya Jagadguru Shankaracharya Jayanti',
137
+ date: '21st April, 2026',
138
+ day: 'Tuesday',
139
+ type: 'Optional',
140
+ },
141
+ { id: 13, name: 'Zarthost-no-Disho (Parsi Kadami)', date: '22nd April, 2026', day: 'Wednesday', type: 'Optional' },
142
+ { id: 14, name: 'Budhha Purnima (Vaishakh Sud-15)', date: '01st May, 2026', day: 'Friday', type: 'Optional' },
143
+ {
144
+ id: 15,
145
+ name: 'Zarthost-no-Disho (Parsi Shahenshahi) / Shavuoth',
146
+ date: '22nd May, 2026',
147
+ day: 'Friday',
148
+ type: 'Optional',
149
+ },
150
+ { id: 16, name: "Guru Arjundev's Martyrdom day", date: '18th June, 2026', day: 'Thursday', type: 'Optional' },
151
+ { id: 17, name: '9th Muharram', date: '25th June, 2026', day: 'Thursday', type: 'Optional' },
152
+ {
153
+ id: 18,
154
+ name: 'Gatha Gahamber (Gatha-III) (Parsi Kadmi)',
155
+ date: '13th July, 2026',
156
+ day: 'Monday',
157
+ type: 'Optional',
158
+ },
159
+ {
160
+ id: 19,
161
+ name: 'Parsi New Year Day Eve (Gatha-V) (Parsi kadmi)',
162
+ date: '15th July, 2026',
163
+ day: 'Wednesday',
164
+ type: 'Optional',
165
+ },
166
+ {
167
+ id: 20,
168
+ name: 'Rathayatra (Ashadh Sud-2) / Parsi New Year Day (Parsi Kadmi)',
169
+ date: '16th July, 2026',
170
+ day: 'Thursday',
171
+ type: 'Optional',
172
+ },
173
+ { id: 21, name: 'Khordad Sal (Parsi Kadmi)', date: '21st July, 2026', day: 'Tuesday', type: 'Optional' },
174
+ { id: 22, name: 'Tisha-be-aav (Yahudi)', date: '23rd July, 2026', day: 'Thursday', type: 'Optional' },
175
+ {
176
+ id: 23,
177
+ name: 'Gatha Gahamber (Gatha-III) / Shahadat-e- Imam Hasan',
178
+ date: '12th August, 2026',
179
+ day: 'Wednesday',
180
+ type: 'Optional',
181
+ },
182
+ {
183
+ id: 24,
184
+ name: 'Parsi New Year Day Eve (Gatha-V) (Parsi Shahenshahi)',
185
+ date: '14th August, 2026',
186
+ day: 'Friday',
187
+ type: 'Optional',
188
+ },
189
+ { id: 25, name: 'Khordad Sal (Parsi Shahenshahi)', date: '20th August, 2026', day: 'Thursday', type: 'Optional' },
190
+ { id: 26, name: 'Onam', date: '26th August, 2026', day: 'Wednesday', type: 'Optional' },
191
+ { id: 27, name: 'Id-e-Maulud', date: '31st August, 2026', day: 'Monday', type: 'Optional' },
192
+ { id: 28, name: 'Nand Utsav (Shravan Vad-9)', date: '05th September, 2026', day: 'Saturday', type: 'Optional' },
193
+ {
194
+ id: 29,
195
+ name: 'Shravan Vad-12 (Paryusan 1st Day) (Chaturthi Paksha)',
196
+ date: '08th September, 2026',
197
+ day: 'Tuesday',
198
+ type: 'Optional',
199
+ },
200
+ {
201
+ id: 30,
202
+ name: 'Shravan Vad-13 (Paryusan 1st Day) (Panchami Paksha)',
203
+ date: '09th September, 2026',
204
+ day: 'Wednesday',
205
+ type: 'Optional',
206
+ },
207
+ { id: 31, name: 'Ganesh Chaturthi (Bhadarva Sud-4)', date: '14th September, 2026', day: 'Monday', type: 'Optional' },
208
+ { id: 32, name: 'Samvatsari (Panchami Paksha)', date: '16th September, 2026', day: 'Wednesday', type: 'Optional' },
209
+ { id: 33, name: 'Yom Kippur (Yahudi)', date: '21st September, 2026', day: 'Monday', type: 'Optional' },
210
+ { id: 34, name: 'Dhan Terash (Aaso Vad- 13)', date: '07th November, 2026', day: 'Saturday', type: 'Optional' },
211
+ { id: 35, name: 'Dev-Diwali (Kartak Sud-15)', date: '24th November, 2026', day: 'Tuesday', type: 'Optional' },
212
+ ];
213
+
214
+ const sundayOptionalHolidays2026 = [
215
+ { id: 36, name: "Saint Shiromani Ravidasji's Birthday", date: '01st February, 2026', day: 'Sunday', type: 'Weekend' },
216
+ { id: 37, name: 'Ramjan-Id (Eid-Ul-Fitra) (2nd Shawaal)', date: '22nd March, 2026', day: 'Sunday', type: 'Weekend' },
217
+ {
218
+ id: 38,
219
+ name: "International Day of the World's Indigenous Peoples",
220
+ date: '09th August, 2026',
221
+ day: 'Sunday',
222
+ type: 'Weekend',
223
+ },
224
+ {
225
+ id: 39,
226
+ name: 'Rosh Hashanah / Mahavir Swami Janma Vachan',
227
+ date: '12th September, 2026',
228
+ day: '2nd Saturday',
229
+ type: 'Weekend',
230
+ },
231
+ { id: 40, name: 'Eve of Kippur (Yahudi)', date: '20th September, 2026', day: 'Sunday', type: 'Weekend' },
232
+ { id: 41, name: 'Succoth (Yahudi)', date: '26th September, 2026', day: '4th Saturday', type: 'Weekend' },
233
+ { id: 42, name: 'Kali Chaudash (Aaso Vad-14)', date: '08th November, 2026', day: 'Sunday', type: 'Weekend' },
234
+ { id: 43, name: 'Shrimad Bhagwad Gita Jayanti', date: '20th December, 2026', day: 'Sunday', type: 'Weekend' },
235
+ {
236
+ id: 44,
237
+ name: 'Boxing Day (Next Day to Christmas)',
238
+ date: '26th December, 2026',
239
+ day: '4th Saturday',
240
+ type: 'Weekend',
241
+ },
242
+ ];
243
+
244
+ const HolidayList = () => {
245
+ const [tabValue, setTabValue] = useState(0);
246
+
247
+ const handleTabChange = (event, newValue) => {
248
+ setTabValue(newValue);
249
+ };
250
+
251
+ const allGeneralHolidays = [...generalHolidays2026, ...sundayGeneralHolidays2026].sort((a, b) => a.id - b.id);
252
+ const allBankHolidays = [...bankHolidays2026, ...sundayBankHolidays2026, ...specialBankHolidays2026].sort(
253
+ (a, b) => a.id - b.id
254
+ );
255
+ const allOptionalHolidays = [...optionalHolidays2026, ...sundayOptionalHolidays2026].sort((a, b) => a.id - b.id);
256
+
257
+ return (
258
+ <Container maxWidth="lg" sx={{ py: { xs: 2, md: 4 }, px: { xs: 1, sm: 2, md: 3 }, minHeight: '100vh' }}>
259
+ <motion.div initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5 }}>
260
+ <Box sx={{ mb: { xs: 2, md: 4 }, textAlign: 'center' }}>
261
+ <Typography
262
+ variant="h4"
263
+ component="h1"
264
+ sx={{
265
+ fontWeight: 800,
266
+ color: '#1a237e',
267
+ mb: 1,
268
+ letterSpacing: '-0.02em',
269
+ display: 'flex',
270
+ alignItems: 'center',
271
+ justifyContent: 'center',
272
+ gap: { xs: 1, md: 2 },
273
+ fontSize: { xs: '1.75rem', sm: '2.25rem', md: '3rem' },
274
+ flexWrap: 'wrap',
275
+ }}
276
+ >
277
+ <FontAwesomeIcon icon={faCalendarDays} style={{ fontSize: '0.8em', color: '#3f51b5' }} />
278
+ Holiday List 2026
279
+ </Typography>
280
+ <Typography
281
+ variant="body1"
282
+ sx={{ color: 'text.secondary', fontWeight: 500, fontSize: { xs: '0.875rem', md: '1rem' } }}
283
+ >
284
+ Official General, Bank and Optional Holidays for the Year 2026
285
+ </Typography>
286
+ </Box>
287
+ </motion.div>
288
+
289
+ <Box sx={{ mb: { xs: 3, md: 4 }, display: 'flex', justifyContent: 'center' }}>
290
+ <Paper
291
+ elevation={0}
292
+ sx={{
293
+ p: 0.5,
294
+ borderRadius: { xs: 2, md: 4 },
295
+ bgcolor: 'rgba(236, 239, 241, 0.7)',
296
+ backdropFilter: 'blur(10px)',
297
+ display: 'inline-flex',
298
+ maxWidth: '100%',
299
+ overflow: 'hidden',
300
+ }}
301
+ >
302
+ <Tabs
303
+ value={tabValue}
304
+ onChange={handleTabChange}
305
+ variant="scrollable"
306
+ scrollButtons="auto"
307
+ allowScrollButtonsMobile
308
+ sx={{
309
+ minHeight: { xs: 40, md: 48 },
310
+ '& .MuiTabs-indicator': {
311
+ height: '100%',
312
+ borderRadius: { xs: 1.5, md: 3 },
313
+ bgcolor: '#fff',
314
+ boxShadow: '0 4px 12px rgba(0,0,0,0.08)',
315
+ zIndex: 0,
316
+ },
317
+ '& .MuiTab-root': {
318
+ minHeight: { xs: 40, md: 48 },
319
+ borderRadius: { xs: 1.5, md: 3 },
320
+ zIndex: 1,
321
+ fontWeight: 600,
322
+ px: { xs: 1.5, sm: 2, md: 3 },
323
+ mx: 0.25,
324
+ fontSize: { xs: '0.75rem', sm: '0.875rem', md: '1rem' },
325
+ transition: 'all 0.2s',
326
+ '&.Mui-selected': { color: '#1a237e' },
327
+ },
328
+ }}
329
+ >
330
+ <Tab label="General" />
331
+ <Tab label="Bank" />
332
+ <Tab label="Optional" />
333
+ </Tabs>
334
+ </Paper>
335
+ </Box>
336
+
337
+ <Box sx={{ width: '100%', overflow: 'hidden' }}>
338
+ {/* General Holidays Tab */}
339
+ {tabValue === 0 && (
340
+ <Fade in={tabValue === 0}>
341
+ <Box role="tabpanel">
342
+ <HolidayTable
343
+ data={allGeneralHolidays}
344
+ note="These public holidays are applicable to all State Government Offices, Undertakings, Boards, and Panchayats in Gujarat."
345
+ />
346
+ </Box>
347
+ </Fade>
348
+ )}
349
+
350
+ {/* Bank Holidays Tab */}
351
+ {tabValue === 1 && (
352
+ <Fade in={tabValue === 1}>
353
+ <Box role="tabpanel">
354
+ <HolidayTable
355
+ data={allBankHolidays}
356
+ note="The holidays mentioned above are notified by the Government of Gujarat as Public Holidays for Banks during the year 2026."
357
+ />
358
+ </Box>
359
+ </Fade>
360
+ )}
361
+
362
+ {/* Optional Holidays Tab */}
363
+ {tabValue === 2 && (
364
+ <Fade in={tabValue === 2}>
365
+ <Box role="tabpanel">
366
+ <HolidayTable
367
+ data={allOptionalHolidays}
368
+ note="Government Employees may avail of maximum any two of the holidays on the festival occasions mentioned above at their option."
369
+ />
370
+ </Box>
371
+ </Fade>
372
+ )}
373
+ </Box>
374
+ </Container>
375
+ );
376
+ };
377
+
378
+ const HolidayTable = ({ data, note }) => (
379
+ <Box sx={{ width: '100%' }}>
380
+ <TableContainer
381
+ component={Paper}
382
+ elevation={10}
383
+ sx={{
384
+ borderRadius: { xs: 3, md: 5 },
385
+ overflowX: 'auto', // Explicit horizontal scroll
386
+ border: '1px solid rgba(255,255,255,0.3)',
387
+ boxShadow: '0 20px 40px rgba(0,0,0,0.05)',
388
+ '&::-webkit-scrollbar': {
389
+ height: '6px',
390
+ },
391
+ '&::-webkit-scrollbar-thumb': {
392
+ backgroundColor: 'rgba(0,0,0,0.1)',
393
+ borderRadius: '10px',
394
+ },
395
+ }}
396
+ >
397
+ <Table sx={{ minWidth: { xs: 600, md: 800 } }}>
398
+ <TableHead>
399
+ <TableRow sx={{ bgcolor: '#f5f7fa' }}>
400
+ <TableCell
401
+ sx={{
402
+ fontWeight: 700,
403
+ color: '#546e7a',
404
+ py: { xs: 1.5, md: 2.5 },
405
+ fontSize: { xs: '0.75rem', md: '0.875rem' },
406
+ }}
407
+ >
408
+ Sr.
409
+ </TableCell>
410
+ <TableCell sx={{ fontWeight: 700, color: '#546e7a', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
411
+ Name of Holiday
412
+ </TableCell>
413
+ <TableCell sx={{ fontWeight: 700, color: '#546e7a', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
414
+ Date
415
+ </TableCell>
416
+ <TableCell sx={{ fontWeight: 700, color: '#546e7a', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
417
+ Day
418
+ </TableCell>
419
+ <TableCell
420
+ sx={{
421
+ fontWeight: 700,
422
+ color: '#546e7a',
423
+ textAlign: 'center',
424
+ fontSize: { xs: '0.75rem', md: '0.875rem' },
425
+ }}
426
+ >
427
+ Category
428
+ </TableCell>
429
+ </TableRow>
430
+ </TableHead>
431
+ <TableBody>
432
+ {data.map((holiday, index) => (
433
+ <TableRow
434
+ key={holiday.id}
435
+ hover
436
+ sx={{
437
+ '&:last-child td, &:last-child th': { border: 0 },
438
+ bgcolor: holiday.type === 'Sunday' || holiday.day === 'Sunday' ? 'rgba(255, 235, 238, 0.3)' : 'inherit',
439
+ transition: 'background-color 0.2s',
440
+ }}
441
+ >
442
+ <TableCell sx={{ fontWeight: 600, color: '#78909c', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
443
+ {index + 1}
444
+ </TableCell>
445
+ <TableCell sx={{ fontWeight: 600, color: '#263238', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
446
+ {holiday.name}
447
+ </TableCell>
448
+ <TableCell
449
+ sx={{
450
+ color: '#455a64',
451
+ fontWeight: 500,
452
+ fontSize: { xs: '0.75rem', md: '0.875rem' },
453
+ whiteSpace: 'nowrap',
454
+ }}
455
+ >
456
+ {holiday.date}
457
+ </TableCell>
458
+ <TableCell
459
+ sx={{
460
+ color: holiday.day === 'Sunday' || holiday.day.includes('Sunday') ? '#d32f2f' : '#455a64',
461
+ fontWeight: 600,
462
+ fontSize: { xs: '0.75rem', md: '0.875rem' },
463
+ }}
464
+ >
465
+ {holiday.day}
466
+ </TableCell>
467
+ <TableCell sx={{ textAlign: 'center' }}>
468
+ <Chip
469
+ label={holiday.type}
470
+ size="small"
471
+ sx={{
472
+ fontWeight: 700,
473
+ fontSize: { xs: '0.65rem', md: '0.75rem' },
474
+ height: { xs: 20, md: 24 },
475
+ borderRadius: '8px',
476
+ bgcolor:
477
+ holiday.type === 'Bank' || holiday.type === 'General' || holiday.type === 'Optional'
478
+ ? '#e8eaf6'
479
+ : holiday.type === 'Sunday' || holiday.type === 'Weekend'
480
+ ? '#ffebee'
481
+ : '#e0f2f1',
482
+ color:
483
+ holiday.type === 'Bank' || holiday.type === 'General' || holiday.type === 'Optional'
484
+ ? '#3f51b5'
485
+ : holiday.type === 'Sunday' || holiday.type === 'Weekend'
486
+ ? '#c62828'
487
+ : '#00695c',
488
+ textTransform: 'uppercase',
489
+ }}
490
+ />
491
+ </TableCell>
492
+ </TableRow>
493
+ ))}
494
+ </TableBody>
495
+ </Table>
496
+ </TableContainer>
497
+
498
+ <Box
499
+ sx={{
500
+ mt: 3,
501
+ p: { xs: 2, md: 3 },
502
+ borderRadius: 4,
503
+ bgcolor: '#fff9c4',
504
+ border: '1px dashed #fbc02d',
505
+ display: 'flex',
506
+ gap: 2,
507
+ alignItems: 'center',
508
+ }}
509
+ >
510
+ <FontAwesomeIcon icon={faCircleInfo} style={{ color: '#fbc02d', fontSize: '1.2rem' }} />
511
+ <Box>
512
+ <Typography
513
+ variant="body2"
514
+ sx={{ fontWeight: 700, color: '#827717', fontSize: { xs: '0.75rem', md: '0.875rem' } }}
515
+ >
516
+ Note:
517
+ </Typography>
518
+ <Typography variant="body2" sx={{ color: '#827717', fontSize: { xs: '0.75rem', md: '0.875rem' } }}>
519
+ {note} Holidays falling on Sundays or specified Saturdays have not been separately notified.
520
+ </Typography>
521
+ </Box>
522
+ </Box>
523
+ </Box>
524
+ );
525
+
526
+ HolidayTable.propTypes = {
527
+ data: PropTypes.arrayOf(
528
+ PropTypes.shape({
529
+ id: PropTypes.number.isRequired,
530
+ name: PropTypes.string.isRequired,
531
+ date: PropTypes.string.isRequired,
532
+ day: PropTypes.string.isRequired,
533
+ type: PropTypes.string.isRequired,
534
+ })
535
+ ).isRequired,
536
+ note: PropTypes.string.isRequired,
537
+ };
538
+
539
+ const PlaceholderView = ({ title, description }) => (
540
+ <Paper
541
+ elevation={0}
542
+ sx={{
543
+ p: { xs: 4, md: 8 },
544
+ borderRadius: 5,
545
+ textAlign: 'center',
546
+ bgcolor: 'rgba(255, 255, 255, 0.5)',
547
+ border: '2px dashed #cfd8dc',
548
+ }}
549
+ >
550
+ <Box sx={{ mb: 3 }}>
551
+ <FontAwesomeIcon icon={faBuildingColumns} style={{ fontSize: { xs: '2.5rem', md: '4rem' }, color: '#cfd8dc' }} />
552
+ </Box>
553
+ <Typography
554
+ variant="h5"
555
+ sx={{ fontWeight: 700, color: '#90a4ae', mb: 1, fontSize: { xs: '1.25rem', md: '1.5rem' } }}
556
+ >
557
+ {title}
558
+ </Typography>
559
+ <Typography
560
+ variant="body1"
561
+ sx={{ color: '#b0bec5', maxWidth: 400, mx: 'auto', fontSize: { xs: '0.875rem', md: '1rem' } }}
562
+ >
563
+ {description}
564
+ </Typography>
565
+ </Paper>
566
+ );
567
+
568
+ PlaceholderView.propTypes = {
569
+ title: PropTypes.string.isRequired,
570
+ description: PropTypes.string.isRequired,
571
+ };
572
+
573
+ export default HolidayList;
@@ -0,0 +1,23 @@
1
+ import DOMPurify from 'dompurify';
2
+
3
+ // securityUtils.ts
4
+ export const containsMaliciousPattern = (value) => {
5
+ const maliciousPatterns = [
6
+ /<script.*?>.*?<\/script>/gi,
7
+ /<iframe.*?>.*?<\/iframe>/gi,
8
+ /on\w+=/gi,
9
+ /javascript:/gi,
10
+ /<.*?>/g,
11
+ ];
12
+
13
+ return maliciousPatterns.some((pattern) => pattern.test(value));
14
+ };
15
+
16
+ export const sanitizeRichText = (html) => {
17
+ return DOMPurify.sanitize(html, {
18
+ ALLOWED_TAGS: ['b', 'i', 'u', 'strong', 'em', 'p', 'br', 'ul', 'ol', 'li', 'span'],
19
+ ALLOWED_ATTR: [],
20
+ FORBID_TAGS: ['a', 'script', 'iframe'],
21
+ FORBID_ATTR: ['onclick', 'onerror', 'style'],
22
+ });
23
+ };
@@ -0,0 +1,17 @@
1
+
2
+ import DOMPurify from 'dompurify';
3
+ import PropTypes from 'prop-types';
4
+
5
+ const SafeHtml = ({ html }) => {
6
+ const cleanHtml = DOMPurify.sanitize(html, {
7
+ USE_PROFILES: { html: true },
8
+ FORBID_TAGS: ['style', 'iframe', 'object', 'embed'],
9
+ FORBID_ATTR: ['onerror', 'onclick', 'onload'],
10
+ });
11
+
12
+ return <span dangerouslySetInnerHTML={{ __html: cleanHtml }} />;
13
+ };
14
+ SafeHtml.propTypes = {
15
+ html: PropTypes.any,
16
+ };
17
+ export default SafeHtml;