@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,106 @@
|
|
|
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 CheckListItem from '../../../components/lists/CheckListItem';
|
|
10
|
+
import AnimatedAlert from '../../../components/icons/animated/maintenance/AnimatedAlert';
|
|
11
|
+
import { getColor } from '../../../utils/client';
|
|
12
|
+
import type { UnplannedOutageScreenProps } from '../../../types';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Unplanned Outage Screen
|
|
16
|
+
*
|
|
17
|
+
* Displayed during unplanned service disruptions.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const UnplannedOutageScreen: React.FC<UnplannedOutageScreenProps> = ({
|
|
21
|
+
title = 'Service Disruption',
|
|
22
|
+
description = 'We\'re aware of an issue affecting our services and are working urgently to fix it.',
|
|
23
|
+
onCheckAgain,
|
|
24
|
+
onNotifyWhenBack,
|
|
25
|
+
checkButtonText = 'Check Again',
|
|
26
|
+
notifyButtonText = 'Notify Me When Back',
|
|
27
|
+
support,
|
|
28
|
+
theme,
|
|
29
|
+
primaryColor,
|
|
30
|
+
backgroundColor,
|
|
31
|
+
}) => {
|
|
32
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
36
|
+
{/* Icon with badge */}
|
|
37
|
+
<IconWithBadge
|
|
38
|
+
icon={<AnimatedAlert size={48} color={warningColor} />}
|
|
39
|
+
iconBackgroundColor="#FED7AA"
|
|
40
|
+
badge={<Text style={styles.badgeIcon}>🕐</Text>}
|
|
41
|
+
badgeBackgroundColor={warningColor}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{/* Status badge */}
|
|
45
|
+
<StatusBadge
|
|
46
|
+
text="Service Alert"
|
|
47
|
+
backgroundColor="#FED7AA"
|
|
48
|
+
textColor={warningColor}
|
|
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
|
+
{/* What's happening card */}
|
|
62
|
+
<ContentCard title="What's happening?">
|
|
63
|
+
<CheckListItem text="Our team is actively working on this" />
|
|
64
|
+
<CheckListItem text="Your data is safe and secure" />
|
|
65
|
+
<CheckListItem text="We'll be back as soon as possible" />
|
|
66
|
+
</ContentCard>
|
|
67
|
+
|
|
68
|
+
{/* Action buttons */}
|
|
69
|
+
{onCheckAgain && (
|
|
70
|
+
<PrimaryButton onPress={onCheckAgain} backgroundColor={warningColor}>
|
|
71
|
+
{checkButtonText}
|
|
72
|
+
</PrimaryButton>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{onNotifyWhenBack && (
|
|
76
|
+
<SecondaryButton onPress={onNotifyWhenBack}>
|
|
77
|
+
{notifyButtonText}
|
|
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
|
+
badgeIcon: {
|
|
102
|
+
fontSize: 16,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export default UnplannedOutageScreen;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Maintenance Screens - Barrel Export
|
|
2
|
+
export { PlannedMaintenanceScreen } from './PlannedMaintenanceScreen';
|
|
3
|
+
export { UnplannedOutageScreen } from './UnplannedOutageScreen';
|
|
4
|
+
export { EmergencyOutageScreen } from './EmergencyOutageScreen';
|
|
5
|
+
export { SystemMaintenanceScreen } from './SystemMaintenanceScreen';
|
|
6
|
+
export { default as ServiceUnavailableScreen } from './ServiceUnavailableScreen';
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Animated } from 'react-native';
|
|
3
|
+
import { DownloadIcon, XIcon } from '../../../components/icons/utilities';
|
|
4
|
+
import { getColor, getColorWithOpacity, isWeb } from '../../../utils/client';
|
|
5
|
+
import type { AppUpdateScreenProps } from '../../../types';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* App Update Screen Component
|
|
9
|
+
*
|
|
10
|
+
* Fully customizable app update screen.
|
|
11
|
+
* All content, actions, and styling are configurable via props.
|
|
12
|
+
*/
|
|
13
|
+
export const AppUpdateScreen: React.FC<AppUpdateScreenProps> = ({
|
|
14
|
+
// Update type (for default config)
|
|
15
|
+
updateType,
|
|
16
|
+
|
|
17
|
+
// Content customization
|
|
18
|
+
title,
|
|
19
|
+
description,
|
|
20
|
+
icon,
|
|
21
|
+
|
|
22
|
+
// Version info (optional)
|
|
23
|
+
currentVersion,
|
|
24
|
+
newVersion,
|
|
25
|
+
showVersionInfo = true,
|
|
26
|
+
|
|
27
|
+
// Release notes (optional)
|
|
28
|
+
releaseNotes,
|
|
29
|
+
showReleaseNotes = true,
|
|
30
|
+
|
|
31
|
+
// Actions
|
|
32
|
+
onUpdate,
|
|
33
|
+
onSkip,
|
|
34
|
+
onRemindLater,
|
|
35
|
+
|
|
36
|
+
// Button text
|
|
37
|
+
updateButtonText = 'Update Now',
|
|
38
|
+
skipButtonText = 'Skip this version',
|
|
39
|
+
remindLaterButtonText = 'Remind Me Later',
|
|
40
|
+
|
|
41
|
+
// Variant
|
|
42
|
+
variant = 'fullscreen',
|
|
43
|
+
|
|
44
|
+
// Styling
|
|
45
|
+
theme,
|
|
46
|
+
primaryColor,
|
|
47
|
+
}) => {
|
|
48
|
+
// Animation
|
|
49
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
50
|
+
const scaleAnim = useRef(new Animated.Value(0.9)).current;
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
Animated.parallel([
|
|
54
|
+
Animated.timing(fadeAnim, {
|
|
55
|
+
toValue: 1,
|
|
56
|
+
duration: 300,
|
|
57
|
+
useNativeDriver: true,
|
|
58
|
+
}),
|
|
59
|
+
Animated.spring(scaleAnim, {
|
|
60
|
+
toValue: 1,
|
|
61
|
+
tension: 50,
|
|
62
|
+
friction: 7,
|
|
63
|
+
useNativeDriver: true,
|
|
64
|
+
}),
|
|
65
|
+
]).start();
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
// Get default config based on updateType (fallback)
|
|
69
|
+
const getDefaultConfig = () => {
|
|
70
|
+
const errorColor = theme?.error || getColor('error');
|
|
71
|
+
const warningColor = theme?.warning || getColor('warning');
|
|
72
|
+
const successColor = theme?.success || getColor('success');
|
|
73
|
+
const primaryColorDefault = theme?.primary || getColor('primary');
|
|
74
|
+
|
|
75
|
+
switch (updateType) {
|
|
76
|
+
case 'critical':
|
|
77
|
+
return {
|
|
78
|
+
color: errorColor,
|
|
79
|
+
title: 'Critical Security Update',
|
|
80
|
+
description: 'A critical security update is available. Please update immediately to keep your data safe.',
|
|
81
|
+
badge: 'Security',
|
|
82
|
+
canSkip: false,
|
|
83
|
+
};
|
|
84
|
+
case 'force':
|
|
85
|
+
return {
|
|
86
|
+
color: warningColor,
|
|
87
|
+
title: 'Update Required',
|
|
88
|
+
description: 'A new version is required to continue using the app. Please update now.',
|
|
89
|
+
badge: 'Required',
|
|
90
|
+
canSkip: false,
|
|
91
|
+
};
|
|
92
|
+
case 'optional':
|
|
93
|
+
return {
|
|
94
|
+
color: successColor,
|
|
95
|
+
title: 'Update Available',
|
|
96
|
+
description: 'A new version with exciting features is available. Update now to get the latest improvements.',
|
|
97
|
+
badge: 'New Features',
|
|
98
|
+
canSkip: true,
|
|
99
|
+
};
|
|
100
|
+
case 'soft':
|
|
101
|
+
default:
|
|
102
|
+
return {
|
|
103
|
+
color: primaryColorDefault,
|
|
104
|
+
title: 'Update Available',
|
|
105
|
+
description: 'A new version is available with bug fixes and improvements.',
|
|
106
|
+
badge: null,
|
|
107
|
+
canSkip: true,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const defaultConfig = updateType ? getDefaultConfig() : null;
|
|
113
|
+
|
|
114
|
+
// Use custom values or fallback to defaults
|
|
115
|
+
const finalTitle = title || defaultConfig?.title || 'Update Available';
|
|
116
|
+
const finalDescription = description || defaultConfig?.description || 'A new version is available.';
|
|
117
|
+
const finalIcon = icon || <DownloadIcon size={48} color={primaryColor || defaultConfig?.color || theme?.primary || getColor('primary')} />;
|
|
118
|
+
const finalColor = primaryColor || defaultConfig?.color || theme?.primary || getColor('primary');
|
|
119
|
+
const canSkip = defaultConfig?.canSkip !== false; // Default to true if no updateType
|
|
120
|
+
const badge = defaultConfig?.badge;
|
|
121
|
+
|
|
122
|
+
// Format release notes
|
|
123
|
+
const formattedReleaseNotes = Array.isArray(releaseNotes)
|
|
124
|
+
? releaseNotes.join('\n• ')
|
|
125
|
+
: releaseNotes;
|
|
126
|
+
|
|
127
|
+
if (variant === 'banner') {
|
|
128
|
+
return (
|
|
129
|
+
<View style={[styles.banner, { backgroundColor: finalColor }]}>
|
|
130
|
+
<View style={styles.bannerContent}>
|
|
131
|
+
<DownloadIcon size={20} color="#FFFFFF" />
|
|
132
|
+
<Text style={styles.bannerText}>
|
|
133
|
+
Update to {newVersion ? `v${newVersion}` : 'latest version'} available
|
|
134
|
+
</Text>
|
|
135
|
+
</View>
|
|
136
|
+
<View style={styles.bannerActions}>
|
|
137
|
+
{onUpdate && (
|
|
138
|
+
<TouchableOpacity onPress={onUpdate} activeOpacity={0.7} style={styles.bannerButton}>
|
|
139
|
+
<Text style={styles.bannerButtonText}>{updateButtonText}</Text>
|
|
140
|
+
</TouchableOpacity>
|
|
141
|
+
)}
|
|
142
|
+
{canSkip && onSkip && (
|
|
143
|
+
<TouchableOpacity onPress={onSkip} activeOpacity={0.7}>
|
|
144
|
+
<XIcon size={20} color="#FFFFFF" />
|
|
145
|
+
</TouchableOpacity>
|
|
146
|
+
)}
|
|
147
|
+
</View>
|
|
148
|
+
</View>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Fullscreen variant
|
|
153
|
+
return (
|
|
154
|
+
<View style={[styles.container, theme?.background ? { backgroundColor: theme.background } : undefined]}>
|
|
155
|
+
<ScrollView
|
|
156
|
+
contentContainerStyle={styles.scrollContent}
|
|
157
|
+
showsVerticalScrollIndicator={false}
|
|
158
|
+
>
|
|
159
|
+
<Animated.View
|
|
160
|
+
style={[
|
|
161
|
+
styles.content,
|
|
162
|
+
{
|
|
163
|
+
opacity: fadeAnim,
|
|
164
|
+
transform: [{ scale: scaleAnim }],
|
|
165
|
+
},
|
|
166
|
+
]}
|
|
167
|
+
>
|
|
168
|
+
{/* Icon */}
|
|
169
|
+
<View style={[styles.iconContainer, { backgroundColor: getColorWithOpacity(finalColor, 0.1) }]}>
|
|
170
|
+
{finalIcon}
|
|
171
|
+
</View>
|
|
172
|
+
|
|
173
|
+
{/* Badge (optional) */}
|
|
174
|
+
{badge && (
|
|
175
|
+
<View style={[styles.badge, { backgroundColor: getColorWithOpacity(finalColor, 0.1) }]}>
|
|
176
|
+
<Text style={[styles.badgeText, { color: finalColor }]}>
|
|
177
|
+
{badge}
|
|
178
|
+
</Text>
|
|
179
|
+
</View>
|
|
180
|
+
)}
|
|
181
|
+
|
|
182
|
+
{/* Title */}
|
|
183
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
184
|
+
{finalTitle}
|
|
185
|
+
</Text>
|
|
186
|
+
|
|
187
|
+
{/* Description */}
|
|
188
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
189
|
+
{finalDescription}
|
|
190
|
+
</Text>
|
|
191
|
+
|
|
192
|
+
{/* Version Info (optional) */}
|
|
193
|
+
{showVersionInfo && currentVersion && newVersion && (
|
|
194
|
+
<View style={styles.versionContainer}>
|
|
195
|
+
<View style={styles.versionItem}>
|
|
196
|
+
<Text style={styles.versionLabel}>Current</Text>
|
|
197
|
+
<Text style={styles.versionNumber}>{currentVersion}</Text>
|
|
198
|
+
</View>
|
|
199
|
+
<Text style={styles.versionArrow}>→</Text>
|
|
200
|
+
<View style={styles.versionItem}>
|
|
201
|
+
<Text style={styles.versionLabel}>New</Text>
|
|
202
|
+
<Text style={[styles.versionNumber, { color: finalColor }]}>
|
|
203
|
+
{newVersion}
|
|
204
|
+
</Text>
|
|
205
|
+
</View>
|
|
206
|
+
</View>
|
|
207
|
+
)}
|
|
208
|
+
|
|
209
|
+
{/* Release Notes (optional) */}
|
|
210
|
+
{showReleaseNotes && formattedReleaseNotes && (
|
|
211
|
+
<View style={styles.releaseNotesContainer}>
|
|
212
|
+
<Text style={styles.releaseNotesTitle}>What's New:</Text>
|
|
213
|
+
<Text style={styles.releaseNotesText}>
|
|
214
|
+
{Array.isArray(releaseNotes) ? '• ' : ''}{formattedReleaseNotes}
|
|
215
|
+
</Text>
|
|
216
|
+
</View>
|
|
217
|
+
)}
|
|
218
|
+
|
|
219
|
+
{/* Action Buttons */}
|
|
220
|
+
<View style={styles.buttonsContainer}>
|
|
221
|
+
{onUpdate && (
|
|
222
|
+
<TouchableOpacity
|
|
223
|
+
style={[styles.button, styles.primaryButton, { backgroundColor: finalColor }]}
|
|
224
|
+
onPress={onUpdate}
|
|
225
|
+
activeOpacity={0.8}
|
|
226
|
+
>
|
|
227
|
+
<DownloadIcon size={20} color="#FFFFFF" />
|
|
228
|
+
<Text style={styles.primaryButtonText}>{updateButtonText}</Text>
|
|
229
|
+
</TouchableOpacity>
|
|
230
|
+
)}
|
|
231
|
+
|
|
232
|
+
{canSkip && onRemindLater && (
|
|
233
|
+
<TouchableOpacity
|
|
234
|
+
style={[styles.button, styles.secondaryButton, { borderColor: finalColor }]}
|
|
235
|
+
onPress={onRemindLater}
|
|
236
|
+
activeOpacity={0.8}
|
|
237
|
+
>
|
|
238
|
+
<Text style={[styles.secondaryButtonText, { color: finalColor }]}>
|
|
239
|
+
{remindLaterButtonText}
|
|
240
|
+
</Text>
|
|
241
|
+
</TouchableOpacity>
|
|
242
|
+
)}
|
|
243
|
+
|
|
244
|
+
{canSkip && onSkip && (
|
|
245
|
+
<TouchableOpacity onPress={onSkip} activeOpacity={0.7}>
|
|
246
|
+
<Text style={styles.skipText}>{skipButtonText}</Text>
|
|
247
|
+
</TouchableOpacity>
|
|
248
|
+
)}
|
|
249
|
+
</View>
|
|
250
|
+
</Animated.View>
|
|
251
|
+
</ScrollView>
|
|
252
|
+
</View>
|
|
253
|
+
);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const styles = StyleSheet.create({
|
|
257
|
+
// Fullscreen
|
|
258
|
+
container: {
|
|
259
|
+
flex: 1,
|
|
260
|
+
backgroundColor: '#FFFFFF',
|
|
261
|
+
},
|
|
262
|
+
scrollContent: {
|
|
263
|
+
flexGrow: 1,
|
|
264
|
+
justifyContent: 'center',
|
|
265
|
+
padding: 24,
|
|
266
|
+
},
|
|
267
|
+
content: {
|
|
268
|
+
alignItems: 'center',
|
|
269
|
+
maxWidth: 480,
|
|
270
|
+
width: '100%',
|
|
271
|
+
alignSelf: 'center',
|
|
272
|
+
},
|
|
273
|
+
iconContainer: {
|
|
274
|
+
width: 96,
|
|
275
|
+
height: 96,
|
|
276
|
+
borderRadius: 48,
|
|
277
|
+
justifyContent: 'center',
|
|
278
|
+
alignItems: 'center',
|
|
279
|
+
marginBottom: 16,
|
|
280
|
+
},
|
|
281
|
+
badge: {
|
|
282
|
+
paddingHorizontal: 12,
|
|
283
|
+
paddingVertical: 6,
|
|
284
|
+
borderRadius: 12,
|
|
285
|
+
marginBottom: 16,
|
|
286
|
+
},
|
|
287
|
+
badgeText: {
|
|
288
|
+
fontSize: 12,
|
|
289
|
+
fontWeight: '700',
|
|
290
|
+
textTransform: 'uppercase',
|
|
291
|
+
},
|
|
292
|
+
title: {
|
|
293
|
+
fontSize: 24,
|
|
294
|
+
fontWeight: '700',
|
|
295
|
+
color: '#1F2937',
|
|
296
|
+
textAlign: 'center',
|
|
297
|
+
marginBottom: 12,
|
|
298
|
+
},
|
|
299
|
+
description: {
|
|
300
|
+
fontSize: 16,
|
|
301
|
+
color: '#6B7280',
|
|
302
|
+
textAlign: 'center',
|
|
303
|
+
lineHeight: 24,
|
|
304
|
+
marginBottom: 24,
|
|
305
|
+
},
|
|
306
|
+
versionContainer: {
|
|
307
|
+
flexDirection: 'row',
|
|
308
|
+
alignItems: 'center',
|
|
309
|
+
marginBottom: 24,
|
|
310
|
+
padding: 16,
|
|
311
|
+
backgroundColor: '#F9FAFB',
|
|
312
|
+
borderRadius: 12,
|
|
313
|
+
},
|
|
314
|
+
versionItem: {
|
|
315
|
+
alignItems: 'center',
|
|
316
|
+
marginHorizontal: 8,
|
|
317
|
+
},
|
|
318
|
+
versionLabel: {
|
|
319
|
+
fontSize: 12,
|
|
320
|
+
color: '#6B7280',
|
|
321
|
+
marginBottom: 4,
|
|
322
|
+
},
|
|
323
|
+
versionNumber: {
|
|
324
|
+
fontSize: 18,
|
|
325
|
+
fontWeight: '700',
|
|
326
|
+
color: '#1F2937',
|
|
327
|
+
},
|
|
328
|
+
versionArrow: {
|
|
329
|
+
fontSize: 20,
|
|
330
|
+
color: '#6B7280',
|
|
331
|
+
},
|
|
332
|
+
releaseNotesContainer: {
|
|
333
|
+
width: '100%',
|
|
334
|
+
padding: 16,
|
|
335
|
+
backgroundColor: '#F9FAFB',
|
|
336
|
+
borderRadius: 12,
|
|
337
|
+
marginBottom: 24,
|
|
338
|
+
},
|
|
339
|
+
releaseNotesTitle: {
|
|
340
|
+
fontSize: 14,
|
|
341
|
+
fontWeight: '600',
|
|
342
|
+
color: '#1F2937',
|
|
343
|
+
marginBottom: 8,
|
|
344
|
+
},
|
|
345
|
+
releaseNotesText: {
|
|
346
|
+
fontSize: 14,
|
|
347
|
+
color: '#6B7280',
|
|
348
|
+
lineHeight: 20,
|
|
349
|
+
},
|
|
350
|
+
buttonsContainer: {
|
|
351
|
+
width: '100%',
|
|
352
|
+
alignItems: 'center',
|
|
353
|
+
},
|
|
354
|
+
button: {
|
|
355
|
+
flexDirection: 'row',
|
|
356
|
+
alignItems: 'center',
|
|
357
|
+
justifyContent: 'center',
|
|
358
|
+
paddingVertical: 14,
|
|
359
|
+
paddingHorizontal: 32,
|
|
360
|
+
borderRadius: 12,
|
|
361
|
+
width: '100%',
|
|
362
|
+
maxWidth: 280,
|
|
363
|
+
marginBottom: 12,
|
|
364
|
+
},
|
|
365
|
+
buttonIcon: {
|
|
366
|
+
marginRight: 8,
|
|
367
|
+
},
|
|
368
|
+
primaryButton: {
|
|
369
|
+
...(!isWeb() && {
|
|
370
|
+
shadowColor: '#000',
|
|
371
|
+
shadowOffset: { width: 0, height: 2 },
|
|
372
|
+
shadowOpacity: 0.1,
|
|
373
|
+
shadowRadius: 4,
|
|
374
|
+
elevation: 3,
|
|
375
|
+
}),
|
|
376
|
+
},
|
|
377
|
+
primaryButtonText: {
|
|
378
|
+
fontSize: 16,
|
|
379
|
+
fontWeight: '600',
|
|
380
|
+
color: '#FFFFFF',
|
|
381
|
+
},
|
|
382
|
+
secondaryButton: {
|
|
383
|
+
borderWidth: 2,
|
|
384
|
+
backgroundColor: 'transparent',
|
|
385
|
+
},
|
|
386
|
+
secondaryButtonText: {
|
|
387
|
+
fontSize: 16,
|
|
388
|
+
fontWeight: '600',
|
|
389
|
+
},
|
|
390
|
+
skipText: {
|
|
391
|
+
fontSize: 14,
|
|
392
|
+
color: '#9CA3AF',
|
|
393
|
+
marginTop: 8,
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
// Banner
|
|
397
|
+
banner: {
|
|
398
|
+
position: 'absolute',
|
|
399
|
+
top: 0,
|
|
400
|
+
left: 0,
|
|
401
|
+
right: 0,
|
|
402
|
+
flexDirection: 'row',
|
|
403
|
+
alignItems: 'center',
|
|
404
|
+
justifyContent: 'space-between',
|
|
405
|
+
paddingHorizontal: 16,
|
|
406
|
+
paddingVertical: 12,
|
|
407
|
+
zIndex: 1000,
|
|
408
|
+
},
|
|
409
|
+
bannerContent: {
|
|
410
|
+
flexDirection: 'row',
|
|
411
|
+
alignItems: 'center',
|
|
412
|
+
flex: 1,
|
|
413
|
+
},
|
|
414
|
+
bannerIcon: {
|
|
415
|
+
marginRight: 12,
|
|
416
|
+
},
|
|
417
|
+
bannerText: {
|
|
418
|
+
fontSize: 14,
|
|
419
|
+
fontWeight: '600',
|
|
420
|
+
color: '#FFFFFF',
|
|
421
|
+
},
|
|
422
|
+
bannerActions: {
|
|
423
|
+
flexDirection: 'row',
|
|
424
|
+
alignItems: 'center',
|
|
425
|
+
},
|
|
426
|
+
bannerActionButton: {
|
|
427
|
+
marginLeft: 12,
|
|
428
|
+
},
|
|
429
|
+
bannerButton: {
|
|
430
|
+
paddingHorizontal: 12,
|
|
431
|
+
paddingVertical: 6,
|
|
432
|
+
backgroundColor: 'rgba(255, 255, 255, 0.2)',
|
|
433
|
+
borderRadius: 6,
|
|
434
|
+
},
|
|
435
|
+
bannerButtonText: {
|
|
436
|
+
fontSize: 14,
|
|
437
|
+
fontWeight: '600',
|
|
438
|
+
color: '#FFFFFF',
|
|
439
|
+
},
|
|
440
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
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 VersionDisplay from '../../../components/status/VersionDisplay';
|
|
9
|
+
import AnimatedDownload from '../../../components/icons/animated/general/AnimatedDownload';
|
|
10
|
+
import { getColor } from '../../../utils/client';
|
|
11
|
+
import type { ForceUpdateScreenProps } from '../../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Force Update Screen
|
|
15
|
+
*
|
|
16
|
+
* Displayed when an update is required to continue using the app.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const ForceUpdateScreen: React.FC<ForceUpdateScreenProps> = ({
|
|
20
|
+
title = 'Update Required',
|
|
21
|
+
description = 'Please update to the latest version to continue using the app.',
|
|
22
|
+
currentVersion,
|
|
23
|
+
newVersion,
|
|
24
|
+
features,
|
|
25
|
+
onUpdate,
|
|
26
|
+
updateButtonText = 'Update Now',
|
|
27
|
+
support,
|
|
28
|
+
theme,
|
|
29
|
+
primaryColor,
|
|
30
|
+
backgroundColor,
|
|
31
|
+
}) => {
|
|
32
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
36
|
+
{/* Icon with badge */}
|
|
37
|
+
<IconWithBadge
|
|
38
|
+
icon={<AnimatedDownload size={48} color={warningColor} />}
|
|
39
|
+
iconBackgroundColor="#FED7AA"
|
|
40
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
41
|
+
badgeBackgroundColor={warningColor}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{/* Status badge */}
|
|
45
|
+
<StatusBadge
|
|
46
|
+
text="Required"
|
|
47
|
+
backgroundColor="#FED7AA"
|
|
48
|
+
textColor={warningColor}
|
|
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
|
+
{/* Version display */}
|
|
62
|
+
{currentVersion && newVersion && (
|
|
63
|
+
<VersionDisplay
|
|
64
|
+
currentVersion={currentVersion}
|
|
65
|
+
newVersion={newVersion}
|
|
66
|
+
primaryColor={warningColor}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
|
|
70
|
+
{/* What's New card */}
|
|
71
|
+
{features && features.length > 0 && (
|
|
72
|
+
<ContentCard title="What's New">
|
|
73
|
+
{features.map((feature, index) => (
|
|
74
|
+
<Text key={index} style={styles.featureText}>
|
|
75
|
+
• {feature}
|
|
76
|
+
</Text>
|
|
77
|
+
))}
|
|
78
|
+
</ContentCard>
|
|
79
|
+
)}
|
|
80
|
+
|
|
81
|
+
{/* Action button */}
|
|
82
|
+
{onUpdate && (
|
|
83
|
+
<PrimaryButton onPress={onUpdate} backgroundColor={warningColor}>
|
|
84
|
+
{updateButtonText}
|
|
85
|
+
</PrimaryButton>
|
|
86
|
+
)}
|
|
87
|
+
</ScreenContainer>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const styles = StyleSheet.create({
|
|
92
|
+
title: {
|
|
93
|
+
fontSize: 24,
|
|
94
|
+
fontWeight: '700',
|
|
95
|
+
color: '#1F2937',
|
|
96
|
+
textAlign: 'center',
|
|
97
|
+
marginBottom: 12,
|
|
98
|
+
lineHeight: 32,
|
|
99
|
+
},
|
|
100
|
+
description: {
|
|
101
|
+
fontSize: 16,
|
|
102
|
+
fontWeight: '400',
|
|
103
|
+
color: '#6B7280',
|
|
104
|
+
textAlign: 'center',
|
|
105
|
+
lineHeight: 24,
|
|
106
|
+
marginBottom: 24,
|
|
107
|
+
},
|
|
108
|
+
featureText: {
|
|
109
|
+
fontSize: 14,
|
|
110
|
+
color: '#6B7280',
|
|
111
|
+
lineHeight: 20,
|
|
112
|
+
marginBottom: 8,
|
|
113
|
+
},
|
|
114
|
+
badgeIcon: {
|
|
115
|
+
color: '#FFFFFF',
|
|
116
|
+
fontSize: 20,
|
|
117
|
+
fontWeight: '700',
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
export default ForceUpdateScreen;
|