@codeimplants/ui-kit 1.0.0
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/README.md +144 -0
- package/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/index.js +2 -0
- package/dist/adapters/supportAdapter.d.ts +87 -0
- package/dist/adapters/supportAdapter.js +99 -0
- package/dist/client.d.ts +55 -0
- package/dist/client.js +229 -0
- package/dist/components/IconLibrary.d.ts +23 -0
- package/dist/components/IconLibrary.js +19 -0
- package/dist/components/RetryIndicator.d.ts +5 -0
- package/dist/components/RetryIndicator.js +208 -0
- package/dist/components/SupportContactCard.d.ts +10 -0
- package/dist/components/SupportContactCard.js +140 -0
- package/dist/components/buttons/PrimaryButton.d.ts +19 -0
- package/dist/components/buttons/PrimaryButton.js +42 -0
- package/dist/components/buttons/SecondaryButton.d.ts +20 -0
- package/dist/components/buttons/SecondaryButton.js +37 -0
- package/dist/components/buttons/index.d.ts +2 -0
- package/dist/components/buttons/index.js +3 -0
- package/dist/components/cards/ContentCard.d.ts +16 -0
- package/dist/components/cards/ContentCard.js +24 -0
- package/dist/components/cards/InfoCard.d.ts +9 -0
- package/dist/components/cards/InfoCard.js +51 -0
- package/dist/components/cards/TipsCard.d.ts +11 -0
- package/dist/components/cards/TipsCard.js +70 -0
- package/dist/components/cards/WarningCard.d.ts +11 -0
- package/dist/components/cards/WarningCard.js +80 -0
- package/dist/components/cards/WhatsNewCard.d.ts +15 -0
- package/dist/components/cards/WhatsNewCard.js +79 -0
- package/dist/components/cards/index.d.ts +5 -0
- package/dist/components/cards/index.js +6 -0
- package/dist/components/feedback/ExpandableSection.d.ts +8 -0
- package/dist/components/feedback/ExpandableSection.js +44 -0
- package/dist/components/feedback/SecurityBanner.d.ts +9 -0
- package/dist/components/feedback/SecurityBanner.js +49 -0
- package/dist/components/feedback/SpeedBadge.d.ts +9 -0
- package/dist/components/feedback/SpeedBadge.js +41 -0
- package/dist/components/feedback/StatusBadge.d.ts +17 -0
- package/dist/components/feedback/StatusBadge.js +20 -0
- package/dist/components/feedback/TopBanner.d.ts +7 -0
- package/dist/components/feedback/TopBanner.js +74 -0
- package/dist/components/feedback/index.d.ts +5 -0
- package/dist/components/feedback/index.js +6 -0
- package/dist/components/icons/AnimatedAlert.d.ts +11 -0
- package/dist/components/icons/AnimatedAlert.js +27 -0
- package/dist/components/icons/AnimatedCalendar.d.ts +7 -0
- package/dist/components/icons/AnimatedCalendar.js +34 -0
- package/dist/components/icons/AnimatedCamera.d.ts +7 -0
- package/dist/components/icons/AnimatedCamera.js +34 -0
- package/dist/components/icons/AnimatedClientError.d.ts +11 -0
- package/dist/components/icons/AnimatedClientError.js +20 -0
- package/dist/components/icons/AnimatedClock.d.ts +7 -0
- package/dist/components/icons/AnimatedClock.js +53 -0
- package/dist/components/icons/AnimatedCrash.d.ts +11 -0
- package/dist/components/icons/AnimatedCrash.js +36 -0
- package/dist/components/icons/AnimatedDocument.d.ts +7 -0
- package/dist/components/icons/AnimatedDocument.js +34 -0
- package/dist/components/icons/AnimatedDownload.d.ts +7 -0
- package/dist/components/icons/AnimatedDownload.js +23 -0
- package/dist/components/icons/AnimatedEmergency.d.ts +11 -0
- package/dist/components/icons/AnimatedEmergency.js +26 -0
- package/dist/components/icons/AnimatedInvalidData.d.ts +11 -0
- package/dist/components/icons/AnimatedInvalidData.js +24 -0
- package/dist/components/icons/AnimatedLightning.d.ts +7 -0
- package/dist/components/icons/AnimatedLightning.js +34 -0
- package/dist/components/icons/AnimatedLocationPin.d.ts +7 -0
- package/dist/components/icons/AnimatedLocationPin.js +34 -0
- package/dist/components/icons/AnimatedPermission.d.ts +11 -0
- package/dist/components/icons/AnimatedPermission.js +21 -0
- package/dist/components/icons/AnimatedPermissionDenied.d.ts +11 -0
- package/dist/components/icons/AnimatedPermissionDenied.js +27 -0
- package/dist/components/icons/AnimatedServerError.d.ts +7 -0
- package/dist/components/icons/AnimatedServerError.js +60 -0
- package/dist/components/icons/AnimatedShield.d.ts +7 -0
- package/dist/components/icons/AnimatedShield.js +34 -0
- package/dist/components/icons/AnimatedSparkle.d.ts +7 -0
- package/dist/components/icons/AnimatedSparkle.js +53 -0
- package/dist/components/icons/AnimatedSpeedGauge.d.ts +7 -0
- package/dist/components/icons/AnimatedSpeedGauge.js +50 -0
- package/dist/components/icons/AnimatedTimeout.d.ts +11 -0
- package/dist/components/icons/AnimatedTimeout.js +27 -0
- package/dist/components/icons/AnimatedWarning.d.ts +7 -0
- package/dist/components/icons/AnimatedWarning.js +50 -0
- package/dist/components/icons/AnimatedWifiOff.d.ts +7 -0
- package/dist/components/icons/AnimatedWifiOff.js +65 -0
- package/dist/components/icons/AnimatedWrench.d.ts +7 -0
- package/dist/components/icons/AnimatedWrench.js +43 -0
- package/dist/components/icons/ClockBadge.d.ts +8 -0
- package/dist/components/icons/ClockBadge.js +28 -0
- package/dist/components/icons/DownloadBadge.d.ts +8 -0
- package/dist/components/icons/DownloadBadge.js +28 -0
- package/dist/components/icons/IconWithBadge.d.ts +12 -0
- package/dist/components/icons/IconWithBadge.js +120 -0
- package/dist/components/icons/SimpleIcons.d.ts +12 -0
- package/dist/components/icons/SimpleIcons.js +8 -0
- package/dist/components/icons/XBadge.d.ts +8 -0
- package/dist/components/icons/XBadge.js +28 -0
- package/dist/components/icons/animated/errors/AnimatedClientError.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedClientError.js +20 -0
- package/dist/components/icons/animated/errors/AnimatedCrash.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedCrash.js +36 -0
- package/dist/components/icons/animated/errors/AnimatedInvalidData.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedInvalidData.js +24 -0
- package/dist/components/icons/animated/errors/AnimatedServerError.d.ts +7 -0
- package/dist/components/icons/animated/errors/AnimatedServerError.js +60 -0
- package/dist/components/icons/animated/errors/index.d.ts +4 -0
- package/dist/components/icons/animated/errors/index.js +5 -0
- package/dist/components/icons/animated/general/AnimatedCalendar.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedCalendar.js +34 -0
- package/dist/components/icons/animated/general/AnimatedCamera.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedCamera.js +34 -0
- package/dist/components/icons/animated/general/AnimatedClock.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedClock.js +53 -0
- package/dist/components/icons/animated/general/AnimatedDocument.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedDocument.js +34 -0
- package/dist/components/icons/animated/general/AnimatedDownload.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedDownload.js +23 -0
- package/dist/components/icons/animated/general/AnimatedLightning.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedLightning.js +34 -0
- package/dist/components/icons/animated/general/AnimatedLocationPin.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedLocationPin.js +34 -0
- package/dist/components/icons/animated/general/AnimatedShield.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedShield.js +34 -0
- package/dist/components/icons/animated/general/AnimatedSparkle.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedSparkle.js +53 -0
- package/dist/components/icons/animated/general/AnimatedWarning.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedWarning.js +50 -0
- package/dist/components/icons/animated/general/index.d.ts +10 -0
- package/dist/components/icons/animated/general/index.js +11 -0
- package/dist/components/icons/animated/index.d.ts +5 -0
- package/dist/components/icons/animated/index.js +6 -0
- package/dist/components/icons/animated/maintenance/AnimatedAlert.d.ts +11 -0
- package/dist/components/icons/animated/maintenance/AnimatedAlert.js +27 -0
- package/dist/components/icons/animated/maintenance/AnimatedEmergency.d.ts +11 -0
- package/dist/components/icons/animated/maintenance/AnimatedEmergency.js +26 -0
- package/dist/components/icons/animated/maintenance/AnimatedWrench.d.ts +7 -0
- package/dist/components/icons/animated/maintenance/AnimatedWrench.js +43 -0
- package/dist/components/icons/animated/maintenance/index.d.ts +3 -0
- package/dist/components/icons/animated/maintenance/index.js +4 -0
- package/dist/components/icons/animated/network/AnimatedSpeedGauge.d.ts +7 -0
- package/dist/components/icons/animated/network/AnimatedSpeedGauge.js +50 -0
- package/dist/components/icons/animated/network/AnimatedTimeout.d.ts +11 -0
- package/dist/components/icons/animated/network/AnimatedTimeout.js +27 -0
- package/dist/components/icons/animated/network/AnimatedWifiOff.d.ts +7 -0
- package/dist/components/icons/animated/network/AnimatedWifiOff.js +65 -0
- package/dist/components/icons/animated/network/index.d.ts +3 -0
- package/dist/components/icons/animated/network/index.js +4 -0
- package/dist/components/icons/animated/permissions/AnimatedPermission.d.ts +11 -0
- package/dist/components/icons/animated/permissions/AnimatedPermission.js +21 -0
- package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.d.ts +11 -0
- package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.js +27 -0
- package/dist/components/icons/animated/permissions/index.d.ts +2 -0
- package/dist/components/icons/animated/permissions/index.js +3 -0
- package/dist/components/icons/badges/ClockBadge.d.ts +8 -0
- package/dist/components/icons/badges/ClockBadge.js +28 -0
- package/dist/components/icons/badges/DownloadBadge.d.ts +8 -0
- package/dist/components/icons/badges/DownloadBadge.js +28 -0
- package/dist/components/icons/badges/XBadge.d.ts +8 -0
- package/dist/components/icons/badges/XBadge.js +28 -0
- package/dist/components/icons/badges/index.d.ts +3 -0
- package/dist/components/icons/badges/index.js +4 -0
- package/dist/components/icons/index.d.ts +3 -0
- package/dist/components/icons/index.js +4 -0
- package/dist/components/icons/utilities/AlertTriangleIcon.d.ts +7 -0
- package/dist/components/icons/utilities/AlertTriangleIcon.js +4 -0
- package/dist/components/icons/utilities/CheckCircleIcon.d.ts +7 -0
- package/dist/components/icons/utilities/CheckCircleIcon.js +4 -0
- package/dist/components/icons/utilities/DownloadIcon.d.ts +7 -0
- package/dist/components/icons/utilities/DownloadIcon.js +4 -0
- package/dist/components/icons/utilities/IconWithBadge.d.ts +12 -0
- package/dist/components/icons/utilities/IconWithBadge.js +120 -0
- package/dist/components/icons/utilities/SettingsIcon.d.ts +7 -0
- package/dist/components/icons/utilities/SettingsIcon.js +4 -0
- package/dist/components/icons/utilities/ShieldIcon.d.ts +7 -0
- package/dist/components/icons/utilities/ShieldIcon.js +4 -0
- package/dist/components/icons/utilities/SimpleIcons.d.ts +12 -0
- package/dist/components/icons/utilities/SimpleIcons.js +8 -0
- package/dist/components/icons/utilities/XIcon.d.ts +7 -0
- package/dist/components/icons/utilities/XIcon.js +4 -0
- package/dist/components/icons/utilities/index.d.ts +7 -0
- package/dist/components/icons/utilities/index.js +8 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +10 -0
- package/dist/components/layout/DualButtonLayout.d.ts +14 -0
- package/dist/components/layout/DualButtonLayout.js +73 -0
- package/dist/components/layout/ResponsiveLayout.d.ts +25 -0
- package/dist/components/layout/ResponsiveLayout.js +76 -0
- package/dist/components/layout/SafeAreaWrapper.d.ts +21 -0
- package/dist/components/layout/SafeAreaWrapper.js +45 -0
- package/dist/components/layout/ScreenContainer.d.ts +15 -0
- package/dist/components/layout/ScreenContainer.js +21 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.js +5 -0
- package/dist/components/lists/CheckListItem.d.ts +14 -0
- package/dist/components/lists/CheckListItem.js +40 -0
- package/dist/components/lists/StatusCheckList.d.ts +10 -0
- package/dist/components/lists/StatusCheckList.js +69 -0
- package/dist/components/lists/index.d.ts +2 -0
- package/dist/components/lists/index.js +3 -0
- package/dist/components/shared/CheckListItem.d.ts +14 -0
- package/dist/components/shared/CheckListItem.js +40 -0
- package/dist/components/shared/ConnectionStatus.d.ts +8 -0
- package/dist/components/shared/ConnectionStatus.js +57 -0
- package/dist/components/shared/ContentCard.d.ts +16 -0
- package/dist/components/shared/ContentCard.js +24 -0
- package/dist/components/shared/CountdownTimer.d.ts +9 -0
- package/dist/components/shared/CountdownTimer.js +91 -0
- package/dist/components/shared/DualButtonLayout.d.ts +14 -0
- package/dist/components/shared/DualButtonLayout.js +73 -0
- package/dist/components/shared/ExpandableSection.d.ts +8 -0
- package/dist/components/shared/ExpandableSection.js +44 -0
- package/dist/components/shared/IconWithBadge.d.ts +17 -0
- package/dist/components/shared/IconWithBadge.js +38 -0
- package/dist/components/shared/InfoCard.d.ts +9 -0
- package/dist/components/shared/InfoCard.js +51 -0
- package/dist/components/shared/PrimaryButton.d.ts +19 -0
- package/dist/components/shared/PrimaryButton.js +42 -0
- package/dist/components/shared/ResponsiveLayout.d.ts +25 -0
- package/dist/components/shared/ResponsiveLayout.js +76 -0
- package/dist/components/shared/RetryCounter.d.ts +8 -0
- package/dist/components/shared/RetryCounter.js +17 -0
- package/dist/components/shared/SafeAreaWrapper.d.ts +21 -0
- package/dist/components/shared/SafeAreaWrapper.js +45 -0
- package/dist/components/shared/ScreenContainer.d.ts +15 -0
- package/dist/components/shared/ScreenContainer.js +21 -0
- package/dist/components/shared/SecondaryButton.d.ts +20 -0
- package/dist/components/shared/SecondaryButton.js +37 -0
- package/dist/components/shared/SecurityBanner.d.ts +9 -0
- package/dist/components/shared/SecurityBanner.js +49 -0
- package/dist/components/shared/SpeedBadge.d.ts +9 -0
- package/dist/components/shared/SpeedBadge.js +41 -0
- package/dist/components/shared/StatusBadge.d.ts +17 -0
- package/dist/components/shared/StatusBadge.js +20 -0
- package/dist/components/shared/StatusCheckList.d.ts +10 -0
- package/dist/components/shared/StatusCheckList.js +69 -0
- package/dist/components/shared/SupportButtons.d.ts +9 -0
- package/dist/components/shared/SupportButtons.js +138 -0
- package/dist/components/shared/TipsCard.d.ts +11 -0
- package/dist/components/shared/TipsCard.js +70 -0
- package/dist/components/shared/TopBanner.d.ts +7 -0
- package/dist/components/shared/TopBanner.js +74 -0
- package/dist/components/shared/VersionDisplay.d.ts +14 -0
- package/dist/components/shared/VersionDisplay.js +30 -0
- package/dist/components/shared/WarningCard.d.ts +11 -0
- package/dist/components/shared/WarningCard.js +80 -0
- package/dist/components/shared/WhatsNewCard.d.ts +15 -0
- package/dist/components/shared/WhatsNewCard.js +79 -0
- package/dist/components/status/ConnectionStatus.d.ts +8 -0
- package/dist/components/status/ConnectionStatus.js +57 -0
- package/dist/components/status/VersionDisplay.d.ts +14 -0
- package/dist/components/status/VersionDisplay.js +30 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.js +3 -0
- package/dist/components/support/SupportButtons.d.ts +9 -0
- package/dist/components/support/SupportButtons.js +138 -0
- package/dist/components/support/index.d.ts +1 -0
- package/dist/components/support/index.js +2 -0
- package/dist/components/timers/CountdownTimer.d.ts +9 -0
- package/dist/components/timers/CountdownTimer.js +91 -0
- package/dist/components/timers/RetryCounter.d.ts +8 -0
- package/dist/components/timers/RetryCounter.js +17 -0
- package/dist/components/timers/index.d.ts +2 -0
- package/dist/components/timers/index.js +3 -0
- package/dist/components/ui/Button.d.ts +38 -0
- package/dist/components/ui/Button.js +96 -0
- package/dist/components/ui/OfflineBanner.d.ts +15 -0
- package/dist/components/ui/OfflineBanner.js +42 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +103 -0
- package/dist/screens/errors/ApiErrorScreen.d.ts +7 -0
- package/dist/screens/errors/ApiErrorScreen.js +166 -0
- package/dist/screens/errors/ClientErrorScreen.d.ts +9 -0
- package/dist/screens/errors/ClientErrorScreen.js +75 -0
- package/dist/screens/errors/ErrorBoundaryScreen.d.ts +9 -0
- package/dist/screens/errors/ErrorBoundaryScreen.js +43 -0
- package/dist/screens/errors/InvalidResponseScreen.d.ts +9 -0
- package/dist/screens/errors/InvalidResponseScreen.js +47 -0
- package/dist/screens/errors/ServerErrorScreen.d.ts +9 -0
- package/dist/screens/errors/ServerErrorScreen.js +72 -0
- package/dist/screens/errors/index.d.ts +5 -0
- package/dist/screens/errors/index.js +6 -0
- package/dist/screens/index.d.ts +4 -0
- package/dist/screens/index.js +5 -0
- package/dist/screens/network/ApiTimeoutScreen.d.ts +9 -0
- package/dist/screens/network/ApiTimeoutScreen.js +47 -0
- package/dist/screens/network/NetworkOfflineScreen.d.ts +9 -0
- package/dist/screens/network/NetworkOfflineScreen.js +42 -0
- package/dist/screens/network/NetworkSlowConnectionScreen.d.ts +9 -0
- package/dist/screens/network/NetworkSlowConnectionScreen.js +41 -0
- package/dist/screens/network/index.d.ts +3 -0
- package/dist/screens/network/index.js +4 -0
- package/dist/screens/permissions/PermissionDeniedScreen.d.ts +9 -0
- package/dist/screens/permissions/PermissionDeniedScreen.js +92 -0
- package/dist/screens/permissions/PermissionRequestScreen.d.ts +16 -0
- package/dist/screens/permissions/PermissionRequestScreen.js +303 -0
- package/dist/screens/permissions/PermissionScreen.d.ts +9 -0
- package/dist/screens/permissions/PermissionScreen.js +45 -0
- package/dist/screens/permissions/index.d.ts +3 -0
- package/dist/screens/permissions/index.js +4 -0
- package/dist/screens/system/AppUpdateScreen.d.ts +9 -0
- package/dist/screens/system/AppUpdateScreen.js +296 -0
- package/dist/screens/system/EmergencyOutageScreen.d.ts +9 -0
- package/dist/screens/system/EmergencyOutageScreen.js +48 -0
- package/dist/screens/system/ForceUpdateScreen.d.ts +9 -0
- package/dist/screens/system/ForceUpdateScreen.js +49 -0
- package/dist/screens/system/OptionalUpdateScreen.d.ts +9 -0
- package/dist/screens/system/OptionalUpdateScreen.js +47 -0
- package/dist/screens/system/PlannedMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/PlannedMaintenanceScreen.js +41 -0
- package/dist/screens/system/SecurityUpdateScreen.d.ts +9 -0
- package/dist/screens/system/SecurityUpdateScreen.js +64 -0
- package/dist/screens/system/ServiceUnavailableScreen.d.ts +15 -0
- package/dist/screens/system/ServiceUnavailableScreen.js +53 -0
- package/dist/screens/system/SoftUpdateScreen.d.ts +9 -0
- package/dist/screens/system/SoftUpdateScreen.js +55 -0
- package/dist/screens/system/SystemMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/SystemMaintenanceScreen.js +228 -0
- package/dist/screens/system/UnplannedOutageScreen.d.ts +9 -0
- package/dist/screens/system/UnplannedOutageScreen.js +42 -0
- package/dist/screens/system/index.d.ts +2 -0
- package/dist/screens/system/index.js +3 -0
- package/dist/screens/system/maintenance/EmergencyOutageScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/EmergencyOutageScreen.js +48 -0
- package/dist/screens/system/maintenance/PlannedMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/PlannedMaintenanceScreen.js +41 -0
- package/dist/screens/system/maintenance/ServiceUnavailableScreen.d.ts +15 -0
- package/dist/screens/system/maintenance/ServiceUnavailableScreen.js +53 -0
- package/dist/screens/system/maintenance/SystemMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/SystemMaintenanceScreen.js +228 -0
- package/dist/screens/system/maintenance/UnplannedOutageScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/UnplannedOutageScreen.js +42 -0
- package/dist/screens/system/maintenance/index.d.ts +5 -0
- package/dist/screens/system/maintenance/index.js +6 -0
- package/dist/screens/system/updates/AppUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/AppUpdateScreen.js +296 -0
- package/dist/screens/system/updates/ForceUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/ForceUpdateScreen.js +49 -0
- package/dist/screens/system/updates/OptionalUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/OptionalUpdateScreen.js +47 -0
- package/dist/screens/system/updates/SecurityUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/SecurityUpdateScreen.js +64 -0
- package/dist/screens/system/updates/SoftUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/SoftUpdateScreen.js +55 -0
- package/dist/screens/system/updates/index.d.ts +5 -0
- package/dist/screens/system/updates/index.js +6 -0
- package/dist/types/common.d.ts +139 -0
- package/dist/types/common.js +4 -0
- package/dist/types/components.d.ts +52 -0
- package/dist/types/components.js +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +8 -0
- package/dist/types/screens.d.ts +390 -0
- package/dist/types/screens.js +4 -0
- package/dist/types/support.d.ts +16 -0
- package/dist/types/support.js +4 -0
- package/dist/types.d.ts +580 -0
- package/dist/types.js +4 -0
- package/dist/utils/client.d.ts +55 -0
- package/dist/utils/client.js +229 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +72 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/supportAdapter.ts +167 -0
- package/src/components/buttons/PrimaryButton.tsx +82 -0
- package/src/components/buttons/SecondaryButton.tsx +81 -0
- package/src/components/buttons/index.ts +3 -0
- package/src/components/cards/ContentCard.tsx +53 -0
- package/src/components/cards/InfoCard.tsx +74 -0
- package/src/components/cards/TipsCard.tsx +106 -0
- package/src/components/cards/WarningCard.tsx +118 -0
- package/src/components/cards/WhatsNewCard.tsx +121 -0
- package/src/components/cards/index.ts +6 -0
- package/src/components/feedback/ExpandableSection.tsx +71 -0
- package/src/components/feedback/SecurityBanner.tsx +74 -0
- package/src/components/feedback/SpeedBadge.tsx +64 -0
- package/src/components/feedback/StatusBadge.tsx +50 -0
- package/src/components/feedback/TopBanner.tsx +104 -0
- package/src/components/feedback/index.ts +6 -0
- package/src/components/icons/animated/errors/AnimatedClientError.tsx +94 -0
- package/src/components/icons/animated/errors/AnimatedCrash.tsx +133 -0
- package/src/components/icons/animated/errors/AnimatedInvalidData.tsx +127 -0
- package/src/components/icons/animated/errors/AnimatedServerError.tsx +85 -0
- package/src/components/icons/animated/errors/index.ts +5 -0
- package/src/components/icons/animated/general/AnimatedCalendar.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedCamera.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedClock.tsx +78 -0
- package/src/components/icons/animated/general/AnimatedDocument.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedDownload.tsx +61 -0
- package/src/components/icons/animated/general/AnimatedLightning.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedLocationPin.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedShield.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedSparkle.tsx +74 -0
- package/src/components/icons/animated/general/AnimatedWarning.tsx +75 -0
- package/src/components/icons/animated/general/index.ts +11 -0
- package/src/components/icons/animated/index.ts +6 -0
- package/src/components/icons/animated/maintenance/AnimatedAlert.tsx +110 -0
- package/src/components/icons/animated/maintenance/AnimatedEmergency.tsx +112 -0
- package/src/components/icons/animated/maintenance/AnimatedWrench.tsx +64 -0
- package/src/components/icons/animated/maintenance/index.ts +4 -0
- package/src/components/icons/animated/network/AnimatedSpeedGauge.tsx +75 -0
- package/src/components/icons/animated/network/AnimatedTimeout.tsx +115 -0
- package/src/components/icons/animated/network/AnimatedWifiOff.tsx +93 -0
- package/src/components/icons/animated/network/index.ts +4 -0
- package/src/components/icons/animated/permissions/AnimatedPermission.tsx +74 -0
- package/src/components/icons/animated/permissions/AnimatedPermissionDenied.tsx +92 -0
- package/src/components/icons/animated/permissions/index.ts +3 -0
- package/src/components/icons/badges/ClockBadge.tsx +49 -0
- package/src/components/icons/badges/DownloadBadge.tsx +49 -0
- package/src/components/icons/badges/XBadge.tsx +49 -0
- package/src/components/icons/badges/index.ts +4 -0
- package/src/components/icons/index.ts +4 -0
- package/src/components/icons/utilities/AlertTriangleIcon.tsx +17 -0
- package/src/components/icons/utilities/CheckCircleIcon.tsx +16 -0
- package/src/components/icons/utilities/DownloadIcon.tsx +17 -0
- package/src/components/icons/utilities/IconWithBadge.tsx +166 -0
- package/src/components/icons/utilities/SettingsIcon.tsx +16 -0
- package/src/components/icons/utilities/ShieldIcon.tsx +15 -0
- package/src/components/icons/utilities/XIcon.tsx +16 -0
- package/src/components/icons/utilities/index.ts +8 -0
- package/src/components/index.ts +10 -0
- package/src/components/layout/DualButtonLayout.tsx +118 -0
- package/src/components/layout/ResponsiveLayout.tsx +118 -0
- package/src/components/layout/SafeAreaWrapper.tsx +72 -0
- package/src/components/layout/ScreenContainer.tsx +53 -0
- package/src/components/layout/index.ts +5 -0
- package/src/components/lists/CheckListItem.tsx +72 -0
- package/src/components/lists/StatusCheckList.tsx +101 -0
- package/src/components/lists/index.ts +3 -0
- package/src/components/status/ConnectionStatus.tsx +90 -0
- package/src/components/status/VersionDisplay.tsx +60 -0
- package/src/components/status/index.ts +3 -0
- package/src/components/support/SupportButtons.tsx +311 -0
- package/src/components/support/index.ts +2 -0
- package/src/components/timers/CountdownTimer.tsx +136 -0
- package/src/components/timers/RetryCounter.tsx +33 -0
- package/src/components/timers/index.ts +3 -0
- package/src/index.ts +125 -0
- package/src/screens/errors/ApiErrorScreen.tsx +276 -0
- package/src/screens/errors/ClientErrorScreen.tsx +135 -0
- package/src/screens/errors/ErrorBoundaryScreen.tsx +98 -0
- package/src/screens/errors/InvalidResponseScreen.tsx +104 -0
- package/src/screens/errors/ServerErrorScreen.tsx +139 -0
- package/src/screens/errors/index.ts +6 -0
- package/src/screens/index.ts +5 -0
- package/src/screens/network/ApiTimeoutScreen.tsx +104 -0
- package/src/screens/network/NetworkOfflineScreen.tsx +92 -0
- package/src/screens/network/NetworkSlowConnectionScreen.tsx +92 -0
- package/src/screens/network/index.ts +4 -0
- package/src/screens/permissions/PermissionDeniedScreen.tsx +176 -0
- package/src/screens/permissions/PermissionRequestScreen.tsx +506 -0
- package/src/screens/permissions/PermissionScreen.tsx +104 -0
- package/src/screens/permissions/index.ts +4 -0
- package/src/screens/system/index.ts +3 -0
- package/src/screens/system/maintenance/EmergencyOutageScreen.tsx +113 -0
- package/src/screens/system/maintenance/PlannedMaintenanceScreen.tsx +98 -0
- package/src/screens/system/maintenance/ServiceUnavailableScreen.tsx +133 -0
- package/src/screens/system/maintenance/SystemMaintenanceScreen.tsx +334 -0
- package/src/screens/system/maintenance/UnplannedOutageScreen.tsx +106 -0
- package/src/screens/system/maintenance/index.ts +6 -0
- package/src/screens/system/updates/AppUpdateScreen.tsx +440 -0
- package/src/screens/system/updates/ForceUpdateScreen.tsx +121 -0
- package/src/screens/system/updates/OptionalUpdateScreen.tsx +120 -0
- package/src/screens/system/updates/SecurityUpdateScreen.tsx +152 -0
- package/src/screens/system/updates/SoftUpdateScreen.tsx +137 -0
- package/src/screens/system/updates/index.ts +6 -0
- package/src/types/common.ts +203 -0
- package/src/types/components.ts +65 -0
- package/src/types/index.ts +9 -0
- package/src/types/reanimated.d.ts +38 -0
- package/src/types/screens.ts +428 -0
- package/src/types/support.ts +23 -0
- package/src/utils/client.ts +273 -0
- package/src/utils/index.ts +2 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import StatusBadge from '../../../components/feedback/StatusBadge';
|
|
6
|
+
import ContentCard from '../../../components/cards/ContentCard';
|
|
7
|
+
import PrimaryButton from '../../../components/buttons/PrimaryButton';
|
|
8
|
+
import SecondaryButton from '../../../components/buttons/SecondaryButton';
|
|
9
|
+
import AnimatedEmergency from '../../../components/icons/animated/maintenance/AnimatedEmergency';
|
|
10
|
+
import { getColor } from '../../../utils/client';
|
|
11
|
+
import type { EmergencyOutageScreenProps } from '../../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Emergency Outage Screen
|
|
15
|
+
*
|
|
16
|
+
* Displayed during critical emergency outages.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const EmergencyOutageScreen: React.FC<EmergencyOutageScreenProps> = ({
|
|
20
|
+
title = 'Service Unavailable',
|
|
21
|
+
description = 'We\'re experiencing a critical issue. Our team is working around the clock to restore service.',
|
|
22
|
+
incidentDetails,
|
|
23
|
+
onCheckStatus,
|
|
24
|
+
onGetUpdates,
|
|
25
|
+
statusButtonText = 'Check Status',
|
|
26
|
+
updatesButtonText = 'Get Updates',
|
|
27
|
+
support,
|
|
28
|
+
theme,
|
|
29
|
+
primaryColor,
|
|
30
|
+
backgroundColor,
|
|
31
|
+
}) => {
|
|
32
|
+
const errorColor = primaryColor || theme?.error || getColor('error');
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
36
|
+
{/* Icon with badge */}
|
|
37
|
+
<IconWithBadge
|
|
38
|
+
icon={<AnimatedEmergency size={48} color={errorColor} />}
|
|
39
|
+
iconBackgroundColor="#FEE2E2"
|
|
40
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
41
|
+
badgeBackgroundColor={errorColor}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{/* Status badge */}
|
|
45
|
+
<StatusBadge
|
|
46
|
+
text="Critical"
|
|
47
|
+
backgroundColor="#FEE2E2"
|
|
48
|
+
textColor={errorColor}
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
{/* Title */}
|
|
52
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
53
|
+
{title}
|
|
54
|
+
</Text>
|
|
55
|
+
|
|
56
|
+
{/* Description */}
|
|
57
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
58
|
+
{description}
|
|
59
|
+
</Text>
|
|
60
|
+
|
|
61
|
+
{/* Incident details card */}
|
|
62
|
+
{incidentDetails && (
|
|
63
|
+
<ContentCard title="Incident Details">
|
|
64
|
+
<Text style={styles.incidentText}>{incidentDetails}</Text>
|
|
65
|
+
</ContentCard>
|
|
66
|
+
)}
|
|
67
|
+
|
|
68
|
+
{/* Action buttons */}
|
|
69
|
+
{onCheckStatus && (
|
|
70
|
+
<PrimaryButton onPress={onCheckStatus} backgroundColor={errorColor}>
|
|
71
|
+
{statusButtonText}
|
|
72
|
+
</PrimaryButton>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{onGetUpdates && (
|
|
76
|
+
<SecondaryButton onPress={onGetUpdates}>
|
|
77
|
+
{updatesButtonText}
|
|
78
|
+
</SecondaryButton>
|
|
79
|
+
)}
|
|
80
|
+
</ScreenContainer>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const styles = StyleSheet.create({
|
|
85
|
+
title: {
|
|
86
|
+
fontSize: 24,
|
|
87
|
+
fontWeight: '700',
|
|
88
|
+
color: '#1F2937',
|
|
89
|
+
textAlign: 'center',
|
|
90
|
+
marginBottom: 12,
|
|
91
|
+
lineHeight: 32,
|
|
92
|
+
},
|
|
93
|
+
description: {
|
|
94
|
+
fontSize: 16,
|
|
95
|
+
fontWeight: '400',
|
|
96
|
+
color: '#6B7280',
|
|
97
|
+
textAlign: 'center',
|
|
98
|
+
lineHeight: 24,
|
|
99
|
+
marginBottom: 24,
|
|
100
|
+
},
|
|
101
|
+
incidentText: {
|
|
102
|
+
fontSize: 14,
|
|
103
|
+
color: '#6B7280',
|
|
104
|
+
lineHeight: 20,
|
|
105
|
+
},
|
|
106
|
+
badgeIcon: {
|
|
107
|
+
color: '#FFFFFF',
|
|
108
|
+
fontSize: 20,
|
|
109
|
+
fontWeight: '700',
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export default EmergencyOutageScreen;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import ContentCard from '../../../components/cards/ContentCard';
|
|
6
|
+
import PrimaryButton from '../../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../../components/buttons/SecondaryButton';
|
|
8
|
+
import CheckListItem from '../../../components/lists/CheckListItem';
|
|
9
|
+
import AnimatedWrench from '../../../components/icons/animated/maintenance/AnimatedWrench';
|
|
10
|
+
import { getColor } from '../../../utils/client';
|
|
11
|
+
import type { PlannedMaintenanceScreenProps } from '../../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Planned Maintenance Screen
|
|
15
|
+
*
|
|
16
|
+
* Displayed during scheduled maintenance.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const PlannedMaintenanceScreen: React.FC<PlannedMaintenanceScreenProps> = ({
|
|
20
|
+
title = 'Service Temporarily Unavailable',
|
|
21
|
+
description = 'We\'re experiencing technical difficulties and working to resolve them.',
|
|
22
|
+
onCheckAgain,
|
|
23
|
+
onNotifyWhenBack,
|
|
24
|
+
checkButtonText = 'Check Again',
|
|
25
|
+
notifyButtonText = 'Notify Me When Back',
|
|
26
|
+
support,
|
|
27
|
+
theme,
|
|
28
|
+
primaryColor,
|
|
29
|
+
backgroundColor,
|
|
30
|
+
}) => {
|
|
31
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
35
|
+
{/* Icon with badge */}
|
|
36
|
+
<IconWithBadge
|
|
37
|
+
icon={<AnimatedWrench size={48} color={warningColor} />}
|
|
38
|
+
iconBackgroundColor="#FEF3C7"
|
|
39
|
+
badge={<Text style={styles.badgeIcon}>🕐</Text>}
|
|
40
|
+
badgeBackgroundColor={warningColor}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
{/* Title */}
|
|
44
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
45
|
+
{title}
|
|
46
|
+
</Text>
|
|
47
|
+
|
|
48
|
+
{/* Description */}
|
|
49
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
50
|
+
{description}
|
|
51
|
+
</Text>
|
|
52
|
+
|
|
53
|
+
{/* What's happening card */}
|
|
54
|
+
<ContentCard title="What's happening?">
|
|
55
|
+
<CheckListItem text="Our team is actively working on this" />
|
|
56
|
+
<CheckListItem text="Your data is safe and secure" />
|
|
57
|
+
<CheckListItem text="We'll be back as soon as possible" />
|
|
58
|
+
</ContentCard>
|
|
59
|
+
|
|
60
|
+
{/* Action buttons */}
|
|
61
|
+
{onCheckAgain && (
|
|
62
|
+
<PrimaryButton onPress={onCheckAgain} backgroundColor={warningColor}>
|
|
63
|
+
{checkButtonText}
|
|
64
|
+
</PrimaryButton>
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
{onNotifyWhenBack && (
|
|
68
|
+
<SecondaryButton onPress={onNotifyWhenBack}>
|
|
69
|
+
{notifyButtonText}
|
|
70
|
+
</SecondaryButton>
|
|
71
|
+
)}
|
|
72
|
+
</ScreenContainer>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
title: {
|
|
78
|
+
fontSize: 24,
|
|
79
|
+
fontWeight: '700',
|
|
80
|
+
color: '#1F2937',
|
|
81
|
+
textAlign: 'center',
|
|
82
|
+
marginBottom: 12,
|
|
83
|
+
lineHeight: 32,
|
|
84
|
+
},
|
|
85
|
+
description: {
|
|
86
|
+
fontSize: 16,
|
|
87
|
+
fontWeight: '400',
|
|
88
|
+
color: '#6B7280',
|
|
89
|
+
textAlign: 'center',
|
|
90
|
+
lineHeight: 24,
|
|
91
|
+
marginBottom: 24,
|
|
92
|
+
},
|
|
93
|
+
badgeIcon: {
|
|
94
|
+
fontSize: 16,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export default PlannedMaintenanceScreen;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, ScrollView, Animated } from 'react-native';
|
|
3
|
+
import type { ThemeColors } from '../../../types';
|
|
4
|
+
import IconWithBadge from '../../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import AnimatedWrench from '../../../components/icons/animated/maintenance/AnimatedWrench';
|
|
6
|
+
import ClockBadge from '../../../components/icons/badges/ClockBadge';
|
|
7
|
+
import StatusCheckList from '../../../components/lists/StatusCheckList';
|
|
8
|
+
import DualButtonLayout from '../../../components/layout/DualButtonLayout';
|
|
9
|
+
|
|
10
|
+
export interface ServiceUnavailableScreenProps {
|
|
11
|
+
// Content
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
|
|
15
|
+
// Status messages
|
|
16
|
+
statusMessages?: string[];
|
|
17
|
+
|
|
18
|
+
// Actions
|
|
19
|
+
onCheckAgain?: () => void;
|
|
20
|
+
onNotifyMe?: () => void;
|
|
21
|
+
|
|
22
|
+
// Button text
|
|
23
|
+
checkButtonText?: string;
|
|
24
|
+
notifyButtonText?: string;
|
|
25
|
+
|
|
26
|
+
// Styling
|
|
27
|
+
theme?: ThemeColors;
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const ServiceUnavailableScreen: React.FC<ServiceUnavailableScreenProps> = ({
|
|
32
|
+
title = 'Service Temporarily Unavailable',
|
|
33
|
+
description = "We're experiencing technical difficulties and working to resolve them.",
|
|
34
|
+
statusMessages,
|
|
35
|
+
onCheckAgain,
|
|
36
|
+
onNotifyMe,
|
|
37
|
+
checkButtonText = 'Check Again',
|
|
38
|
+
notifyButtonText = 'Notify Me When Back',
|
|
39
|
+
theme,
|
|
40
|
+
backgroundColor,
|
|
41
|
+
}) => {
|
|
42
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
Animated.timing(fadeAnim, {
|
|
46
|
+
toValue: 1,
|
|
47
|
+
duration: 600,
|
|
48
|
+
useNativeDriver: true,
|
|
49
|
+
}).start();
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const defaultStatusMessages = statusMessages || [
|
|
53
|
+
'Our team is actively working on this',
|
|
54
|
+
'Your data is safe and secure',
|
|
55
|
+
"We'll be back as soon as possible",
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
const bgColor = backgroundColor || theme?.background || '#FFFFFF';
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<View style={[styles.container, { backgroundColor: bgColor }]}>
|
|
62
|
+
<ScrollView
|
|
63
|
+
contentContainerStyle={styles.scrollContent}
|
|
64
|
+
showsVerticalScrollIndicator={false}
|
|
65
|
+
>
|
|
66
|
+
<Animated.View style={{ opacity: fadeAnim }}>
|
|
67
|
+
{/* Icon with Badge */}
|
|
68
|
+
<View style={styles.iconSection}>
|
|
69
|
+
<IconWithBadge
|
|
70
|
+
icon={<AnimatedWrench size={60} color="#F59E0B" />}
|
|
71
|
+
badge={<ClockBadge size={48} />}
|
|
72
|
+
size={120}
|
|
73
|
+
backgroundColor="#FEF3C7"
|
|
74
|
+
/>
|
|
75
|
+
</View>
|
|
76
|
+
|
|
77
|
+
{/* Title */}
|
|
78
|
+
<Text style={styles.title}>{title}</Text>
|
|
79
|
+
|
|
80
|
+
{/* Description */}
|
|
81
|
+
<Text style={styles.description}>{description}</Text>
|
|
82
|
+
|
|
83
|
+
{/* Status Checklist */}
|
|
84
|
+
<StatusCheckList messages={defaultStatusMessages} />
|
|
85
|
+
|
|
86
|
+
{/* Action Buttons */}
|
|
87
|
+
{(onCheckAgain || onNotifyMe) && (
|
|
88
|
+
<DualButtonLayout
|
|
89
|
+
primaryText={checkButtonText}
|
|
90
|
+
primaryAction={onCheckAgain || (() => {})}
|
|
91
|
+
primaryIcon="🔄"
|
|
92
|
+
secondaryText={notifyButtonText}
|
|
93
|
+
secondaryAction={onNotifyMe || (() => {})}
|
|
94
|
+
secondaryIcon="🔔"
|
|
95
|
+
layout="vertical"
|
|
96
|
+
theme={theme}
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
</Animated.View>
|
|
100
|
+
</ScrollView>
|
|
101
|
+
</View>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const styles = StyleSheet.create({
|
|
106
|
+
container: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
},
|
|
109
|
+
scrollContent: {
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
paddingHorizontal: 32,
|
|
112
|
+
paddingVertical: 60,
|
|
113
|
+
},
|
|
114
|
+
iconSection: {
|
|
115
|
+
marginBottom: 24,
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
fontSize: 28,
|
|
119
|
+
fontWeight: '700',
|
|
120
|
+
color: '#1F2937',
|
|
121
|
+
textAlign: 'center',
|
|
122
|
+
marginBottom: 12,
|
|
123
|
+
},
|
|
124
|
+
description: {
|
|
125
|
+
fontSize: 16,
|
|
126
|
+
color: '#6B7280',
|
|
127
|
+
textAlign: 'center',
|
|
128
|
+
lineHeight: 24,
|
|
129
|
+
marginBottom: 32,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export default ServiceUnavailableScreen;
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Animated } from 'react-native';
|
|
3
|
+
import SupportButtons from '../../../components/support/SupportButtons';
|
|
4
|
+
import AnimatedWrench from '../../../components/icons/animated/maintenance/AnimatedWrench';
|
|
5
|
+
import { getColor, getColorWithOpacity, isWeb } from '../../../utils/client';
|
|
6
|
+
import type { MaintenanceScreenProps } from '../../../types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* System Maintenance Screen Component
|
|
10
|
+
*
|
|
11
|
+
* Fully customizable maintenance screen.
|
|
12
|
+
* All content, countdown, actions, and support are configurable via props.
|
|
13
|
+
*/
|
|
14
|
+
export const SystemMaintenanceScreen: React.FC<MaintenanceScreenProps> = ({
|
|
15
|
+
// Maintenance type (for default config)
|
|
16
|
+
type,
|
|
17
|
+
|
|
18
|
+
// Content customization
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
icon,
|
|
22
|
+
|
|
23
|
+
// Time info (optional)
|
|
24
|
+
estimatedEndTime,
|
|
25
|
+
showCountdown = true,
|
|
26
|
+
|
|
27
|
+
// Actions
|
|
28
|
+
onRetry,
|
|
29
|
+
onNotifyMe,
|
|
30
|
+
|
|
31
|
+
// Button text
|
|
32
|
+
retryButtonText = 'Check Again',
|
|
33
|
+
notifyButtonText = 'Notify Me When Ready',
|
|
34
|
+
|
|
35
|
+
// Support (optional)
|
|
36
|
+
support,
|
|
37
|
+
supportVariant,
|
|
38
|
+
|
|
39
|
+
// Styling
|
|
40
|
+
theme,
|
|
41
|
+
}) => {
|
|
42
|
+
const [timeRemaining, setTimeRemaining] = useState<string>('');
|
|
43
|
+
|
|
44
|
+
// Animation
|
|
45
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
46
|
+
const scaleAnim = useRef(new Animated.Value(0.9)).current;
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
Animated.parallel([
|
|
50
|
+
Animated.timing(fadeAnim, {
|
|
51
|
+
toValue: 1,
|
|
52
|
+
duration: 300,
|
|
53
|
+
useNativeDriver: true,
|
|
54
|
+
}),
|
|
55
|
+
Animated.spring(scaleAnim, {
|
|
56
|
+
toValue: 1,
|
|
57
|
+
tension: 50,
|
|
58
|
+
friction: 7,
|
|
59
|
+
useNativeDriver: true,
|
|
60
|
+
}),
|
|
61
|
+
]).start();
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (estimatedEndTime && showCountdown) {
|
|
66
|
+
const updateCountdown = () => {
|
|
67
|
+
const now = new Date().getTime();
|
|
68
|
+
const end = estimatedEndTime.getTime();
|
|
69
|
+
const diff = end - now;
|
|
70
|
+
|
|
71
|
+
if (diff <= 0) {
|
|
72
|
+
setTimeRemaining('Maintenance should be complete');
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const hours = Math.floor(diff / (1000 * 60 * 60));
|
|
77
|
+
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
|
|
78
|
+
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
|
|
79
|
+
|
|
80
|
+
if (hours > 0) {
|
|
81
|
+
setTimeRemaining(`${hours}h ${minutes}m ${seconds}s`);
|
|
82
|
+
} else if (minutes > 0) {
|
|
83
|
+
setTimeRemaining(`${minutes}m ${seconds}s`);
|
|
84
|
+
} else {
|
|
85
|
+
setTimeRemaining(`${seconds}s`);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
updateCountdown();
|
|
90
|
+
const interval = setInterval(updateCountdown, 1000);
|
|
91
|
+
return () => clearInterval(interval);
|
|
92
|
+
}
|
|
93
|
+
}, [estimatedEndTime, showCountdown]);
|
|
94
|
+
|
|
95
|
+
// Get default config based on type (fallback)
|
|
96
|
+
const getDefaultConfig = () => {
|
|
97
|
+
const errorColor = theme?.error || getColor('error');
|
|
98
|
+
const warningColor = theme?.warning || getColor('warning');
|
|
99
|
+
const primaryColorDefault = theme?.primary || getColor('primary');
|
|
100
|
+
|
|
101
|
+
switch (type) {
|
|
102
|
+
case 'emergency':
|
|
103
|
+
return {
|
|
104
|
+
color: errorColor,
|
|
105
|
+
title: 'Emergency Maintenance',
|
|
106
|
+
description: 'We are performing emergency maintenance to fix critical issues. We apologize for the inconvenience.',
|
|
107
|
+
badge: 'Critical',
|
|
108
|
+
};
|
|
109
|
+
case 'unplanned':
|
|
110
|
+
return {
|
|
111
|
+
color: warningColor,
|
|
112
|
+
title: 'Unplanned Outage',
|
|
113
|
+
description: 'We are experiencing unexpected issues and working to resolve them as quickly as possible.',
|
|
114
|
+
badge: 'Unexpected',
|
|
115
|
+
};
|
|
116
|
+
case 'planned':
|
|
117
|
+
default:
|
|
118
|
+
return {
|
|
119
|
+
color: primaryColorDefault,
|
|
120
|
+
title: 'Scheduled Maintenance',
|
|
121
|
+
description: 'We are performing scheduled maintenance to improve your experience. We will be back shortly.',
|
|
122
|
+
badge: 'Scheduled',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const defaultConfig = type ? getDefaultConfig() : null;
|
|
128
|
+
|
|
129
|
+
// Use custom values or fallback to defaults
|
|
130
|
+
const finalTitle = title || defaultConfig?.title || 'Under Maintenance';
|
|
131
|
+
const finalDescription = description || defaultConfig?.description || 'We are currently performing maintenance.';
|
|
132
|
+
const finalIcon = icon || <AnimatedWrench size={48} color={defaultConfig?.color || theme?.primary || getColor('primary')} />;
|
|
133
|
+
const finalColor = defaultConfig?.color || theme?.primary || getColor('primary');
|
|
134
|
+
const badge = defaultConfig?.badge;
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<View style={[styles.container, theme?.background ? { backgroundColor: theme.background } : undefined]}>
|
|
138
|
+
<ScrollView
|
|
139
|
+
contentContainerStyle={styles.scrollContent}
|
|
140
|
+
showsVerticalScrollIndicator={false}
|
|
141
|
+
>
|
|
142
|
+
<Animated.View
|
|
143
|
+
style={[
|
|
144
|
+
styles.content,
|
|
145
|
+
{
|
|
146
|
+
opacity: fadeAnim,
|
|
147
|
+
transform: [{ scale: scaleAnim }],
|
|
148
|
+
},
|
|
149
|
+
]}
|
|
150
|
+
>
|
|
151
|
+
{/* Icon */}
|
|
152
|
+
<View style={[styles.iconContainer, { backgroundColor: getColorWithOpacity(finalColor, 0.1) }]}>
|
|
153
|
+
{finalIcon}
|
|
154
|
+
</View>
|
|
155
|
+
|
|
156
|
+
{/* Badge (optional) */}
|
|
157
|
+
{badge && (
|
|
158
|
+
<View style={[styles.badge, { backgroundColor: getColorWithOpacity(finalColor, 0.1) }]}>
|
|
159
|
+
<Text style={[styles.badgeText, { color: finalColor }]}>
|
|
160
|
+
{badge}
|
|
161
|
+
</Text>
|
|
162
|
+
</View>
|
|
163
|
+
)}
|
|
164
|
+
|
|
165
|
+
{/* Title */}
|
|
166
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
167
|
+
{finalTitle}
|
|
168
|
+
</Text>
|
|
169
|
+
|
|
170
|
+
{/* Description */}
|
|
171
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
172
|
+
{finalDescription}
|
|
173
|
+
</Text>
|
|
174
|
+
|
|
175
|
+
{/* Countdown (optional) */}
|
|
176
|
+
{timeRemaining && showCountdown && (
|
|
177
|
+
<View style={[styles.countdownContainer, { backgroundColor: getColorWithOpacity(finalColor, 0.1) }]}>
|
|
178
|
+
<Text style={styles.countdownLabel}>Estimated time remaining</Text>
|
|
179
|
+
<Text style={[styles.countdownTime, { color: finalColor }]}>
|
|
180
|
+
{timeRemaining}
|
|
181
|
+
</Text>
|
|
182
|
+
</View>
|
|
183
|
+
)}
|
|
184
|
+
|
|
185
|
+
{/* Action Buttons */}
|
|
186
|
+
<View style={styles.buttonsContainer}>
|
|
187
|
+
{onRetry && (
|
|
188
|
+
<TouchableOpacity
|
|
189
|
+
style={[styles.button, styles.primaryButton, { backgroundColor: finalColor }]}
|
|
190
|
+
onPress={onRetry}
|
|
191
|
+
activeOpacity={0.8}
|
|
192
|
+
>
|
|
193
|
+
<Text style={styles.primaryButtonText}>{retryButtonText}</Text>
|
|
194
|
+
</TouchableOpacity>
|
|
195
|
+
)}
|
|
196
|
+
|
|
197
|
+
{onNotifyMe && (
|
|
198
|
+
<TouchableOpacity
|
|
199
|
+
style={[styles.button, styles.secondaryButton, { borderColor: finalColor }]}
|
|
200
|
+
onPress={onNotifyMe}
|
|
201
|
+
activeOpacity={0.8}
|
|
202
|
+
>
|
|
203
|
+
<Text style={[styles.secondaryButtonText, { color: finalColor }]}>
|
|
204
|
+
{notifyButtonText}
|
|
205
|
+
</Text>
|
|
206
|
+
</TouchableOpacity>
|
|
207
|
+
)}
|
|
208
|
+
</View>
|
|
209
|
+
|
|
210
|
+
{/* Support Contact (optional) */}
|
|
211
|
+
{support && (
|
|
212
|
+
<View style={styles.supportContainer}>
|
|
213
|
+
<SupportButtons
|
|
214
|
+
support={support}
|
|
215
|
+
variant={supportVariant || 'combined'}
|
|
216
|
+
theme={theme}
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
)}
|
|
220
|
+
</Animated.View>
|
|
221
|
+
</ScrollView>
|
|
222
|
+
</View>
|
|
223
|
+
);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const styles = StyleSheet.create({
|
|
227
|
+
container: {
|
|
228
|
+
flex: 1,
|
|
229
|
+
backgroundColor: '#FFFFFF',
|
|
230
|
+
},
|
|
231
|
+
scrollContent: {
|
|
232
|
+
flexGrow: 1,
|
|
233
|
+
justifyContent: 'center',
|
|
234
|
+
padding: 24,
|
|
235
|
+
},
|
|
236
|
+
content: {
|
|
237
|
+
alignItems: 'center',
|
|
238
|
+
maxWidth: 480,
|
|
239
|
+
width: '100%',
|
|
240
|
+
alignSelf: 'center',
|
|
241
|
+
},
|
|
242
|
+
iconContainer: {
|
|
243
|
+
width: 96,
|
|
244
|
+
height: 96,
|
|
245
|
+
borderRadius: 48,
|
|
246
|
+
justifyContent: 'center',
|
|
247
|
+
alignItems: 'center',
|
|
248
|
+
marginBottom: 16,
|
|
249
|
+
},
|
|
250
|
+
badge: {
|
|
251
|
+
paddingHorizontal: 12,
|
|
252
|
+
paddingVertical: 6,
|
|
253
|
+
borderRadius: 12,
|
|
254
|
+
marginBottom: 16,
|
|
255
|
+
},
|
|
256
|
+
badgeText: {
|
|
257
|
+
fontSize: 12,
|
|
258
|
+
fontWeight: '700',
|
|
259
|
+
textTransform: 'uppercase',
|
|
260
|
+
},
|
|
261
|
+
title: {
|
|
262
|
+
fontSize: 24,
|
|
263
|
+
fontWeight: '700',
|
|
264
|
+
color: '#1F2937',
|
|
265
|
+
textAlign: 'center',
|
|
266
|
+
marginBottom: 12,
|
|
267
|
+
},
|
|
268
|
+
description: {
|
|
269
|
+
fontSize: 16,
|
|
270
|
+
color: '#6B7280',
|
|
271
|
+
textAlign: 'center',
|
|
272
|
+
lineHeight: 24,
|
|
273
|
+
marginBottom: 24,
|
|
274
|
+
},
|
|
275
|
+
countdownContainer: {
|
|
276
|
+
padding: 16,
|
|
277
|
+
borderRadius: 12,
|
|
278
|
+
marginBottom: 24,
|
|
279
|
+
alignItems: 'center',
|
|
280
|
+
width: '100%',
|
|
281
|
+
},
|
|
282
|
+
countdownLabel: {
|
|
283
|
+
fontSize: 14,
|
|
284
|
+
color: '#6B7280',
|
|
285
|
+
marginBottom: 8,
|
|
286
|
+
},
|
|
287
|
+
countdownTime: {
|
|
288
|
+
fontSize: 32,
|
|
289
|
+
fontWeight: '700',
|
|
290
|
+
},
|
|
291
|
+
buttonsContainer: {
|
|
292
|
+
width: '100%',
|
|
293
|
+
marginBottom: 16,
|
|
294
|
+
},
|
|
295
|
+
button: {
|
|
296
|
+
flexDirection: 'row',
|
|
297
|
+
alignItems: 'center',
|
|
298
|
+
justifyContent: 'center',
|
|
299
|
+
paddingVertical: 14,
|
|
300
|
+
paddingHorizontal: 32,
|
|
301
|
+
borderRadius: 12,
|
|
302
|
+
width: '100%',
|
|
303
|
+
marginBottom: 12,
|
|
304
|
+
},
|
|
305
|
+
buttonIcon: {
|
|
306
|
+
marginRight: 8,
|
|
307
|
+
},
|
|
308
|
+
primaryButton: {
|
|
309
|
+
...(!isWeb() && {
|
|
310
|
+
shadowColor: '#000',
|
|
311
|
+
shadowOffset: { width: 0, height: 2 },
|
|
312
|
+
shadowOpacity: 0.1,
|
|
313
|
+
shadowRadius: 4,
|
|
314
|
+
elevation: 3,
|
|
315
|
+
}),
|
|
316
|
+
},
|
|
317
|
+
primaryButtonText: {
|
|
318
|
+
fontSize: 16,
|
|
319
|
+
fontWeight: '600',
|
|
320
|
+
color: '#FFFFFF',
|
|
321
|
+
},
|
|
322
|
+
secondaryButton: {
|
|
323
|
+
borderWidth: 2,
|
|
324
|
+
backgroundColor: 'transparent',
|
|
325
|
+
},
|
|
326
|
+
secondaryButtonText: {
|
|
327
|
+
fontSize: 16,
|
|
328
|
+
fontWeight: '600',
|
|
329
|
+
},
|
|
330
|
+
supportContainer: {
|
|
331
|
+
width: '100%',
|
|
332
|
+
marginTop: 8,
|
|
333
|
+
},
|
|
334
|
+
});
|