@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,276 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
ScrollView,
|
|
7
|
+
Animated,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
10
|
+
import SupportButtons from '../../components/support/SupportButtons';
|
|
11
|
+
import AnimatedServerError from '../../components/icons/animated/errors/AnimatedServerError';
|
|
12
|
+
import AnimatedAlert from '../../components/icons/animated/maintenance/AnimatedAlert';
|
|
13
|
+
import AnimatedTimeout from '../../components/icons/animated/network/AnimatedTimeout';
|
|
14
|
+
import { getColor, getColorWithOpacity } from '../../utils/client';
|
|
15
|
+
import type { ApiErrorScreenProps, ApiErrorType } from '../../types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Error configurations matching error-ui-kit design
|
|
19
|
+
*/
|
|
20
|
+
const errorConfigs: Record<
|
|
21
|
+
ApiErrorType,
|
|
22
|
+
{
|
|
23
|
+
icon: React.ComponentType<{ size?: number; color?: string }>;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
color: string;
|
|
27
|
+
bgColor: string;
|
|
28
|
+
}
|
|
29
|
+
> = {
|
|
30
|
+
timeout: {
|
|
31
|
+
icon: AnimatedTimeout,
|
|
32
|
+
title: 'Request Timed Out',
|
|
33
|
+
description:
|
|
34
|
+
'The server is taking too long to respond. This might be due to high traffic or slow connection.',
|
|
35
|
+
color: getColor('warning'),
|
|
36
|
+
bgColor: getColorWithOpacity(getColor('warning'), 0.1),
|
|
37
|
+
},
|
|
38
|
+
server_error: {
|
|
39
|
+
icon: AnimatedServerError,
|
|
40
|
+
title: 'Server Error',
|
|
41
|
+
description:
|
|
42
|
+
'Something went wrong on our end. Our team has been notified and is working on a fix.',
|
|
43
|
+
color: getColor('error'),
|
|
44
|
+
bgColor: getColorWithOpacity(getColor('error'), 0.1),
|
|
45
|
+
},
|
|
46
|
+
client_error: {
|
|
47
|
+
icon: AnimatedAlert,
|
|
48
|
+
title: 'Request Failed',
|
|
49
|
+
description:
|
|
50
|
+
'There was an issue with your request. Please try again or contact support if the problem persists.',
|
|
51
|
+
color: getColor('error'),
|
|
52
|
+
bgColor: getColorWithOpacity(getColor('error'), 0.1),
|
|
53
|
+
},
|
|
54
|
+
invalid_response: {
|
|
55
|
+
icon: AnimatedAlert,
|
|
56
|
+
title: 'Invalid Response',
|
|
57
|
+
description:
|
|
58
|
+
'We received an unexpected response from the server. This is usually temporary.',
|
|
59
|
+
color: getColor('warning'),
|
|
60
|
+
bgColor: getColorWithOpacity(getColor('warning'), 0.1),
|
|
61
|
+
},
|
|
62
|
+
network_error: {
|
|
63
|
+
icon: AnimatedAlert,
|
|
64
|
+
title: 'Connection Error',
|
|
65
|
+
description:
|
|
66
|
+
'Unable to reach our servers. Please check your internet connection.',
|
|
67
|
+
color: getColor('offline'),
|
|
68
|
+
bgColor: getColorWithOpacity(getColor('offline'), 0.1),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* ApiErrorScreen Component
|
|
74
|
+
* 100% design fidelity port from error-ui-kit
|
|
75
|
+
*/
|
|
76
|
+
export const ApiErrorScreen: React.FC<ApiErrorScreenProps> = ({
|
|
77
|
+
// Content customization
|
|
78
|
+
title,
|
|
79
|
+
description,
|
|
80
|
+
icon,
|
|
81
|
+
iconColor,
|
|
82
|
+
iconBackgroundColor,
|
|
83
|
+
|
|
84
|
+
// Actions
|
|
85
|
+
onRetry,
|
|
86
|
+
|
|
87
|
+
// Button configuration
|
|
88
|
+
retryButtonText = 'Try Again',
|
|
89
|
+
showRetryButton = true,
|
|
90
|
+
|
|
91
|
+
// Support
|
|
92
|
+
support,
|
|
93
|
+
supportVariant = 'icon-only',
|
|
94
|
+
|
|
95
|
+
// Additional info
|
|
96
|
+
statusCode,
|
|
97
|
+
errorCode,
|
|
98
|
+
errorType = 'server_error',
|
|
99
|
+
|
|
100
|
+
// Styling
|
|
101
|
+
theme,
|
|
102
|
+
primaryColor,
|
|
103
|
+
backgroundColor,
|
|
104
|
+
}) => {
|
|
105
|
+
const config = errorConfigs[errorType];
|
|
106
|
+
const IconComponent = icon || config.icon;
|
|
107
|
+
|
|
108
|
+
const finalIconColor = iconColor || theme?.error || config.color;
|
|
109
|
+
const finalIconBgColor =
|
|
110
|
+
iconBackgroundColor || theme?.surface || config.bgColor;
|
|
111
|
+
const finalPrimaryColor = primaryColor || theme?.primary || getColor('primary');
|
|
112
|
+
const finalBgColor = backgroundColor || theme?.background || '#FFFFFF';
|
|
113
|
+
|
|
114
|
+
// Animation values
|
|
115
|
+
const scaleAnim = React.useRef(new Animated.Value(0)).current;
|
|
116
|
+
const fadeAnim = React.useRef(new Animated.Value(0)).current;
|
|
117
|
+
|
|
118
|
+
React.useEffect(() => {
|
|
119
|
+
Animated.parallel([
|
|
120
|
+
Animated.spring(scaleAnim, {
|
|
121
|
+
toValue: 1,
|
|
122
|
+
tension: 50,
|
|
123
|
+
friction: 7,
|
|
124
|
+
useNativeDriver: true,
|
|
125
|
+
}),
|
|
126
|
+
Animated.timing(fadeAnim, {
|
|
127
|
+
toValue: 1,
|
|
128
|
+
duration: 400,
|
|
129
|
+
useNativeDriver: true,
|
|
130
|
+
}),
|
|
131
|
+
]).start();
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<ScrollView
|
|
136
|
+
style={[styles.container, { backgroundColor: finalBgColor }]}
|
|
137
|
+
contentContainerStyle={styles.contentContainer}
|
|
138
|
+
>
|
|
139
|
+
<Animated.View
|
|
140
|
+
style={[
|
|
141
|
+
styles.content,
|
|
142
|
+
{
|
|
143
|
+
opacity: fadeAnim,
|
|
144
|
+
transform: [{ scale: scaleAnim }],
|
|
145
|
+
},
|
|
146
|
+
]}
|
|
147
|
+
>
|
|
148
|
+
{/* Error Icon */}
|
|
149
|
+
<View
|
|
150
|
+
style={[
|
|
151
|
+
styles.iconContainer,
|
|
152
|
+
{ backgroundColor: finalIconBgColor },
|
|
153
|
+
]}
|
|
154
|
+
>
|
|
155
|
+
{typeof IconComponent === 'function' ? (
|
|
156
|
+
<IconComponent size={40} color={finalIconColor} />
|
|
157
|
+
) : (
|
|
158
|
+
IconComponent
|
|
159
|
+
)}
|
|
160
|
+
</View>
|
|
161
|
+
|
|
162
|
+
{/* Status Code Badge */}
|
|
163
|
+
{statusCode && (
|
|
164
|
+
<View
|
|
165
|
+
style={[
|
|
166
|
+
styles.badge,
|
|
167
|
+
{ backgroundColor: finalIconBgColor },
|
|
168
|
+
]}
|
|
169
|
+
>
|
|
170
|
+
<Text
|
|
171
|
+
style={[
|
|
172
|
+
styles.badgeText,
|
|
173
|
+
{ color: finalIconColor },
|
|
174
|
+
]}
|
|
175
|
+
>
|
|
176
|
+
Error {statusCode}
|
|
177
|
+
</Text>
|
|
178
|
+
</View>
|
|
179
|
+
)}
|
|
180
|
+
|
|
181
|
+
{/* Title */}
|
|
182
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
183
|
+
{title || config.title}
|
|
184
|
+
</Text>
|
|
185
|
+
|
|
186
|
+
{/* Description */}
|
|
187
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
188
|
+
{description || config.description}
|
|
189
|
+
</Text>
|
|
190
|
+
|
|
191
|
+
{/* Retry Button */}
|
|
192
|
+
{showRetryButton && onRetry && (
|
|
193
|
+
<View style={styles.buttonContainer}>
|
|
194
|
+
<PrimaryButton
|
|
195
|
+
onPress={onRetry}
|
|
196
|
+
backgroundColor={finalPrimaryColor}
|
|
197
|
+
>
|
|
198
|
+
{retryButtonText}
|
|
199
|
+
</PrimaryButton>
|
|
200
|
+
</View>
|
|
201
|
+
)}
|
|
202
|
+
|
|
203
|
+
{/* Support Contact */}
|
|
204
|
+
{support && (
|
|
205
|
+
<View style={styles.supportContainer}>
|
|
206
|
+
<SupportButtons
|
|
207
|
+
support={support}
|
|
208
|
+
variant={supportVariant}
|
|
209
|
+
theme={theme}
|
|
210
|
+
/>
|
|
211
|
+
</View>
|
|
212
|
+
)}
|
|
213
|
+
</Animated.View>
|
|
214
|
+
</ScrollView>
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const styles = StyleSheet.create({
|
|
219
|
+
container: {
|
|
220
|
+
flex: 1,
|
|
221
|
+
},
|
|
222
|
+
contentContainer: {
|
|
223
|
+
flexGrow: 1,
|
|
224
|
+
justifyContent: 'center',
|
|
225
|
+
alignItems: 'center',
|
|
226
|
+
padding: 16,
|
|
227
|
+
},
|
|
228
|
+
content: {
|
|
229
|
+
maxWidth: 400,
|
|
230
|
+
width: '100%',
|
|
231
|
+
alignItems: 'center',
|
|
232
|
+
},
|
|
233
|
+
iconContainer: {
|
|
234
|
+
width: 80,
|
|
235
|
+
height: 80,
|
|
236
|
+
borderRadius: 40,
|
|
237
|
+
justifyContent: 'center',
|
|
238
|
+
alignItems: 'center',
|
|
239
|
+
marginBottom: 24,
|
|
240
|
+
},
|
|
241
|
+
badge: {
|
|
242
|
+
paddingHorizontal: 12,
|
|
243
|
+
paddingVertical: 6,
|
|
244
|
+
borderRadius: 16,
|
|
245
|
+
marginBottom: 16,
|
|
246
|
+
},
|
|
247
|
+
badgeText: {
|
|
248
|
+
fontSize: 14,
|
|
249
|
+
fontWeight: '600',
|
|
250
|
+
fontFamily: 'monospace',
|
|
251
|
+
},
|
|
252
|
+
title: {
|
|
253
|
+
fontSize: 24,
|
|
254
|
+
fontWeight: 'bold',
|
|
255
|
+
textAlign: 'center',
|
|
256
|
+
marginBottom: 12,
|
|
257
|
+
color: '#111827',
|
|
258
|
+
},
|
|
259
|
+
description: {
|
|
260
|
+
fontSize: 16,
|
|
261
|
+
textAlign: 'center',
|
|
262
|
+
marginBottom: 24,
|
|
263
|
+
color: '#6B7280',
|
|
264
|
+
lineHeight: 24,
|
|
265
|
+
},
|
|
266
|
+
buttonContainer: {
|
|
267
|
+
width: '100%',
|
|
268
|
+
marginBottom: 24,
|
|
269
|
+
},
|
|
270
|
+
retryButton: {
|
|
271
|
+
width: '100%',
|
|
272
|
+
},
|
|
273
|
+
supportContainer: {
|
|
274
|
+
marginTop: 8,
|
|
275
|
+
},
|
|
276
|
+
});
|
|
@@ -0,0 +1,135 @@
|
|
|
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 PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
8
|
+
import AnimatedClientError from '../../components/icons/animated/errors/AnimatedClientError';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
import type { ClientErrorScreenProps } from '../../types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Client Error Screen (4xx errors)
|
|
14
|
+
*
|
|
15
|
+
* Displayed when the client makes an invalid request.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const ClientErrorScreen: React.FC<ClientErrorScreenProps> = ({
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
statusCode = 404,
|
|
22
|
+
onGoBack,
|
|
23
|
+
onHome,
|
|
24
|
+
goBackButtonText = 'Go Back',
|
|
25
|
+
homeButtonText = 'Go Home',
|
|
26
|
+
support,
|
|
27
|
+
theme,
|
|
28
|
+
primaryColor,
|
|
29
|
+
backgroundColor,
|
|
30
|
+
}) => {
|
|
31
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
32
|
+
|
|
33
|
+
// Get default content based on status code
|
|
34
|
+
const getDefaultContent = () => {
|
|
35
|
+
switch (statusCode) {
|
|
36
|
+
case 400:
|
|
37
|
+
return {
|
|
38
|
+
title: 'Bad Request',
|
|
39
|
+
description: 'The request could not be understood. Please check and try again.',
|
|
40
|
+
};
|
|
41
|
+
case 401:
|
|
42
|
+
return {
|
|
43
|
+
title: 'Unauthorized',
|
|
44
|
+
description: 'You need to sign in to access this resource.',
|
|
45
|
+
};
|
|
46
|
+
case 403:
|
|
47
|
+
return {
|
|
48
|
+
title: 'Access Denied',
|
|
49
|
+
description: 'You don\'t have permission to access this resource.',
|
|
50
|
+
};
|
|
51
|
+
case 404:
|
|
52
|
+
return {
|
|
53
|
+
title: 'Page Not Found',
|
|
54
|
+
description: 'The page you\'re looking for doesn\'t exist or has been moved.',
|
|
55
|
+
};
|
|
56
|
+
default:
|
|
57
|
+
return {
|
|
58
|
+
title: 'Client Error',
|
|
59
|
+
description: 'There was a problem with your request. Please try again.',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const defaultContent = getDefaultContent();
|
|
65
|
+
const finalTitle = title || defaultContent.title;
|
|
66
|
+
const finalDescription = description || defaultContent.description;
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
70
|
+
{/* Icon with badge */}
|
|
71
|
+
<IconWithBadge
|
|
72
|
+
icon={<AnimatedClientError size={48} color={warningColor} />}
|
|
73
|
+
iconBackgroundColor="#FED7AA"
|
|
74
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
75
|
+
badgeBackgroundColor={warningColor}
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
{/* Status code badge */}
|
|
79
|
+
<StatusBadge
|
|
80
|
+
text={`Error ${statusCode}`}
|
|
81
|
+
backgroundColor="#FED7AA"
|
|
82
|
+
textColor={warningColor}
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
{/* Title */}
|
|
86
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
87
|
+
{finalTitle}
|
|
88
|
+
</Text>
|
|
89
|
+
|
|
90
|
+
{/* Description */}
|
|
91
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
92
|
+
{finalDescription}
|
|
93
|
+
</Text>
|
|
94
|
+
|
|
95
|
+
{/* Action buttons */}
|
|
96
|
+
{onGoBack && (
|
|
97
|
+
<PrimaryButton onPress={onGoBack} backgroundColor={warningColor}>
|
|
98
|
+
{goBackButtonText}
|
|
99
|
+
</PrimaryButton>
|
|
100
|
+
)}
|
|
101
|
+
|
|
102
|
+
{onHome && (
|
|
103
|
+
<SecondaryButton onPress={onHome}>
|
|
104
|
+
{homeButtonText}
|
|
105
|
+
</SecondaryButton>
|
|
106
|
+
)}
|
|
107
|
+
</ScreenContainer>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const styles = StyleSheet.create({
|
|
112
|
+
title: {
|
|
113
|
+
fontSize: 24,
|
|
114
|
+
fontWeight: '700',
|
|
115
|
+
color: '#1F2937',
|
|
116
|
+
textAlign: 'center',
|
|
117
|
+
marginBottom: 12,
|
|
118
|
+
lineHeight: 32,
|
|
119
|
+
},
|
|
120
|
+
description: {
|
|
121
|
+
fontSize: 16,
|
|
122
|
+
fontWeight: '400',
|
|
123
|
+
color: '#6B7280',
|
|
124
|
+
textAlign: 'center',
|
|
125
|
+
lineHeight: 24,
|
|
126
|
+
marginBottom: 24,
|
|
127
|
+
},
|
|
128
|
+
badgeIcon: {
|
|
129
|
+
color: '#FFFFFF',
|
|
130
|
+
fontSize: 20,
|
|
131
|
+
fontWeight: '700',
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export default ClientErrorScreen;
|
|
@@ -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 AnimatedCrash from '../../components/icons/animated/errors/AnimatedCrash';
|
|
10
|
+
import { getColor } from '../../utils/client';
|
|
11
|
+
import type { ErrorFallbackProps } from '../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* App Crash Screen (Error Boundary Screen)
|
|
15
|
+
*
|
|
16
|
+
* Displayed when the app encounters an unhandled error.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const ErrorBoundaryScreen: React.FC<ErrorFallbackProps> = ({
|
|
20
|
+
title = 'Something Went Wrong',
|
|
21
|
+
description = 'The app encountered an unexpected error. We apologize for the inconvenience.',
|
|
22
|
+
onReset,
|
|
23
|
+
onHome,
|
|
24
|
+
resetButtonText = 'Restart App',
|
|
25
|
+
homeButtonText = 'Go Home',
|
|
26
|
+
support,
|
|
27
|
+
theme,
|
|
28
|
+
}) => {
|
|
29
|
+
const errorColor = theme?.error || getColor('error');
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ScreenContainer backgroundColor={theme?.background}>
|
|
33
|
+
{/* Icon with badge */}
|
|
34
|
+
<IconWithBadge
|
|
35
|
+
icon={<AnimatedCrash size={48} color={errorColor} />}
|
|
36
|
+
iconBackgroundColor="#FEE2E2"
|
|
37
|
+
badge={<Text style={styles.badgeIcon}>✕</Text>}
|
|
38
|
+
badgeBackgroundColor={errorColor}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
{/* Title */}
|
|
42
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
43
|
+
{title}
|
|
44
|
+
</Text>
|
|
45
|
+
|
|
46
|
+
{/* Description */}
|
|
47
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
48
|
+
{description}
|
|
49
|
+
</Text>
|
|
50
|
+
|
|
51
|
+
{/* What happened card */}
|
|
52
|
+
<ContentCard title="What happened?">
|
|
53
|
+
<CheckListItem text="An unexpected error occurred" />
|
|
54
|
+
<CheckListItem text="Your data is safe" />
|
|
55
|
+
<CheckListItem text="Restarting should fix the issue" />
|
|
56
|
+
</ContentCard>
|
|
57
|
+
|
|
58
|
+
{/* Action buttons */}
|
|
59
|
+
{onReset && (
|
|
60
|
+
<PrimaryButton onPress={onReset} backgroundColor={errorColor}>
|
|
61
|
+
{resetButtonText}
|
|
62
|
+
</PrimaryButton>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{onHome && (
|
|
66
|
+
<SecondaryButton onPress={onHome}>
|
|
67
|
+
{homeButtonText}
|
|
68
|
+
</SecondaryButton>
|
|
69
|
+
)}
|
|
70
|
+
</ScreenContainer>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const styles = StyleSheet.create({
|
|
75
|
+
title: {
|
|
76
|
+
fontSize: 24,
|
|
77
|
+
fontWeight: '700',
|
|
78
|
+
color: '#1F2937',
|
|
79
|
+
textAlign: 'center',
|
|
80
|
+
marginBottom: 12,
|
|
81
|
+
lineHeight: 32,
|
|
82
|
+
},
|
|
83
|
+
description: {
|
|
84
|
+
fontSize: 16,
|
|
85
|
+
fontWeight: '400',
|
|
86
|
+
color: '#6B7280',
|
|
87
|
+
textAlign: 'center',
|
|
88
|
+
lineHeight: 24,
|
|
89
|
+
marginBottom: 24,
|
|
90
|
+
},
|
|
91
|
+
badgeIcon: {
|
|
92
|
+
color: '#FFFFFF',
|
|
93
|
+
fontSize: 20,
|
|
94
|
+
fontWeight: '700',
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export default ErrorBoundaryScreen;
|
|
@@ -0,0 +1,104 @@
|
|
|
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 AnimatedInvalidData from '../../components/icons/animated/errors/AnimatedInvalidData';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
import type { InvalidResponseScreenProps } from '../../types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Invalid Response Screen
|
|
14
|
+
*
|
|
15
|
+
* Displayed when the server returns invalid or corrupted data.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const InvalidResponseScreen: React.FC<InvalidResponseScreenProps> = ({
|
|
19
|
+
title = 'Invalid Response',
|
|
20
|
+
description = 'The server returned data that couldn\'t be processed. Please try again.',
|
|
21
|
+
onRetry,
|
|
22
|
+
onReportError,
|
|
23
|
+
retryButtonText = 'Try Again',
|
|
24
|
+
reportButtonText = 'Report Issue',
|
|
25
|
+
support,
|
|
26
|
+
theme,
|
|
27
|
+
primaryColor,
|
|
28
|
+
backgroundColor,
|
|
29
|
+
}) => {
|
|
30
|
+
const errorColor = primaryColor || theme?.error || getColor('error');
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
34
|
+
{/* Icon with badge */}
|
|
35
|
+
<IconWithBadge
|
|
36
|
+
icon={<AnimatedInvalidData size={48} color={errorColor} />}
|
|
37
|
+
iconBackgroundColor="#FEE2E2"
|
|
38
|
+
badge={<Text style={styles.badgeIcon}>?</Text>}
|
|
39
|
+
badgeBackgroundColor={errorColor}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{/* Title */}
|
|
43
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
44
|
+
{title}
|
|
45
|
+
</Text>
|
|
46
|
+
|
|
47
|
+
{/* Description */}
|
|
48
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
49
|
+
{description}
|
|
50
|
+
</Text>
|
|
51
|
+
|
|
52
|
+
{/* What happened card */}
|
|
53
|
+
<ContentCard title="What happened?">
|
|
54
|
+
<Text style={styles.cardText}>
|
|
55
|
+
The data received from the server was invalid or corrupted. This is usually a temporary issue.
|
|
56
|
+
</Text>
|
|
57
|
+
</ContentCard>
|
|
58
|
+
|
|
59
|
+
{/* Action buttons */}
|
|
60
|
+
{onRetry && (
|
|
61
|
+
<PrimaryButton onPress={onRetry} backgroundColor={errorColor}>
|
|
62
|
+
{retryButtonText}
|
|
63
|
+
</PrimaryButton>
|
|
64
|
+
)}
|
|
65
|
+
|
|
66
|
+
{onReportError && (
|
|
67
|
+
<SecondaryButton onPress={onReportError}>
|
|
68
|
+
{reportButtonText}
|
|
69
|
+
</SecondaryButton>
|
|
70
|
+
)}
|
|
71
|
+
</ScreenContainer>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
title: {
|
|
77
|
+
fontSize: 24,
|
|
78
|
+
fontWeight: '700',
|
|
79
|
+
color: '#1F2937',
|
|
80
|
+
textAlign: 'center',
|
|
81
|
+
marginBottom: 12,
|
|
82
|
+
lineHeight: 32,
|
|
83
|
+
},
|
|
84
|
+
description: {
|
|
85
|
+
fontSize: 16,
|
|
86
|
+
fontWeight: '400',
|
|
87
|
+
color: '#6B7280',
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
lineHeight: 24,
|
|
90
|
+
marginBottom: 24,
|
|
91
|
+
},
|
|
92
|
+
cardText: {
|
|
93
|
+
fontSize: 14,
|
|
94
|
+
color: '#6B7280',
|
|
95
|
+
lineHeight: 20,
|
|
96
|
+
},
|
|
97
|
+
badgeIcon: {
|
|
98
|
+
color: '#FFFFFF',
|
|
99
|
+
fontSize: 20,
|
|
100
|
+
fontWeight: '700',
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export default InvalidResponseScreen;
|