@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,311 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, Linking } from 'react-native';
|
|
3
|
+
import type { SupportContact, SupportVariant, ThemeColors } from '../../types';
|
|
4
|
+
|
|
5
|
+
interface SupportButtonsProps {
|
|
6
|
+
support: SupportContact;
|
|
7
|
+
variant?: SupportVariant;
|
|
8
|
+
theme?: ThemeColors;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const SupportButtons: React.FC<SupportButtonsProps> = ({
|
|
12
|
+
support,
|
|
13
|
+
variant = 'icon-only',
|
|
14
|
+
theme,
|
|
15
|
+
}) => {
|
|
16
|
+
const primaryColor = theme?.primary || '#2563EB';
|
|
17
|
+
const whatsappColor = '#25D366';
|
|
18
|
+
const phoneColor = '#2563EB';
|
|
19
|
+
const emailColor = '#6B7280';
|
|
20
|
+
|
|
21
|
+
const handleWhatsApp = () => {
|
|
22
|
+
if (support.whatsapp) {
|
|
23
|
+
const url = `https://wa.me/${support.whatsapp.number.replace(/[^0-9]/g, '')}`;
|
|
24
|
+
Linking.openURL(url);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const handlePhone = () => {
|
|
29
|
+
if (support.phone) {
|
|
30
|
+
const url = `tel:${support.phone.number}`;
|
|
31
|
+
Linking.openURL(url);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const handleEmail = () => {
|
|
36
|
+
if (support.email) {
|
|
37
|
+
const url = `mailto:${support.email.address}`;
|
|
38
|
+
Linking.openURL(url);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const renderIconOnly = () => (
|
|
43
|
+
<View style={styles.iconOnlyContainer}>
|
|
44
|
+
{support.whatsapp && (
|
|
45
|
+
<TouchableOpacity
|
|
46
|
+
style={[styles.iconButton, { backgroundColor: whatsappColor }]}
|
|
47
|
+
onPress={handleWhatsApp}
|
|
48
|
+
activeOpacity={0.8}
|
|
49
|
+
>
|
|
50
|
+
<Text style={styles.iconText}>💬</Text>
|
|
51
|
+
</TouchableOpacity>
|
|
52
|
+
)}
|
|
53
|
+
{support.phone && (
|
|
54
|
+
<TouchableOpacity
|
|
55
|
+
style={[styles.iconButton, { backgroundColor: phoneColor }]}
|
|
56
|
+
onPress={handlePhone}
|
|
57
|
+
activeOpacity={0.8}
|
|
58
|
+
>
|
|
59
|
+
<Text style={styles.iconText}>📞</Text>
|
|
60
|
+
</TouchableOpacity>
|
|
61
|
+
)}
|
|
62
|
+
{support.email && (
|
|
63
|
+
<TouchableOpacity
|
|
64
|
+
style={[styles.iconButton, { backgroundColor: emailColor }]}
|
|
65
|
+
onPress={handleEmail}
|
|
66
|
+
activeOpacity={0.8}
|
|
67
|
+
>
|
|
68
|
+
<Text style={styles.iconText}>✉️</Text>
|
|
69
|
+
</TouchableOpacity>
|
|
70
|
+
)}
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const renderTextOnly = () => (
|
|
75
|
+
<View style={styles.textOnlyContainer}>
|
|
76
|
+
{support.whatsapp && (
|
|
77
|
+
<TouchableOpacity
|
|
78
|
+
style={[styles.textButton, { borderColor: whatsappColor }]}
|
|
79
|
+
onPress={handleWhatsApp}
|
|
80
|
+
activeOpacity={0.8}
|
|
81
|
+
>
|
|
82
|
+
<Text style={[styles.textButtonLabel, { color: whatsappColor }]}>
|
|
83
|
+
{support.whatsapp.label || 'WhatsApp'}
|
|
84
|
+
</Text>
|
|
85
|
+
</TouchableOpacity>
|
|
86
|
+
)}
|
|
87
|
+
{support.phone && (
|
|
88
|
+
<TouchableOpacity
|
|
89
|
+
style={[styles.textButton, { borderColor: phoneColor }]}
|
|
90
|
+
onPress={handlePhone}
|
|
91
|
+
activeOpacity={0.8}
|
|
92
|
+
>
|
|
93
|
+
<Text style={[styles.textButtonLabel, { color: phoneColor }]}>
|
|
94
|
+
{support.phone.label || 'Call'}
|
|
95
|
+
</Text>
|
|
96
|
+
</TouchableOpacity>
|
|
97
|
+
)}
|
|
98
|
+
{support.email && (
|
|
99
|
+
<TouchableOpacity
|
|
100
|
+
style={[styles.textButton, { borderColor: emailColor }]}
|
|
101
|
+
onPress={handleEmail}
|
|
102
|
+
activeOpacity={0.8}
|
|
103
|
+
>
|
|
104
|
+
<Text style={[styles.textButtonLabel, { color: emailColor }]}>
|
|
105
|
+
{support.email.label || 'Email'}
|
|
106
|
+
</Text>
|
|
107
|
+
</TouchableOpacity>
|
|
108
|
+
)}
|
|
109
|
+
</View>
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const renderCombined = () => (
|
|
113
|
+
<View style={styles.combinedContainer}>
|
|
114
|
+
{support.whatsapp && (
|
|
115
|
+
<TouchableOpacity
|
|
116
|
+
style={[styles.combinedButton, { backgroundColor: whatsappColor }]}
|
|
117
|
+
onPress={handleWhatsApp}
|
|
118
|
+
activeOpacity={0.8}
|
|
119
|
+
>
|
|
120
|
+
<Text style={styles.combinedIcon}>💬</Text>
|
|
121
|
+
<Text style={styles.combinedLabel}>
|
|
122
|
+
{support.whatsapp.label || 'WhatsApp'}
|
|
123
|
+
</Text>
|
|
124
|
+
</TouchableOpacity>
|
|
125
|
+
)}
|
|
126
|
+
{support.phone && (
|
|
127
|
+
<TouchableOpacity
|
|
128
|
+
style={[styles.combinedButton, { backgroundColor: phoneColor }]}
|
|
129
|
+
onPress={handlePhone}
|
|
130
|
+
activeOpacity={0.8}
|
|
131
|
+
>
|
|
132
|
+
<Text style={styles.combinedIcon}>📞</Text>
|
|
133
|
+
<Text style={styles.combinedLabel}>
|
|
134
|
+
{support.phone.label || 'Call'}
|
|
135
|
+
</Text>
|
|
136
|
+
</TouchableOpacity>
|
|
137
|
+
)}
|
|
138
|
+
{support.email && (
|
|
139
|
+
<TouchableOpacity
|
|
140
|
+
style={[styles.combinedButton, { backgroundColor: emailColor }]}
|
|
141
|
+
onPress={handleEmail}
|
|
142
|
+
activeOpacity={0.8}
|
|
143
|
+
>
|
|
144
|
+
<Text style={styles.combinedIcon}>✉️</Text>
|
|
145
|
+
<Text style={styles.combinedLabel}>
|
|
146
|
+
{support.email.label || 'Email'}
|
|
147
|
+
</Text>
|
|
148
|
+
</TouchableOpacity>
|
|
149
|
+
)}
|
|
150
|
+
</View>
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
const renderCompact = () => (
|
|
154
|
+
<View style={styles.compactContainer}>
|
|
155
|
+
{support.whatsapp && (
|
|
156
|
+
<TouchableOpacity
|
|
157
|
+
style={[styles.compactButton, { backgroundColor: whatsappColor }]}
|
|
158
|
+
onPress={handleWhatsApp}
|
|
159
|
+
activeOpacity={0.8}
|
|
160
|
+
>
|
|
161
|
+
<Text style={styles.compactIcon}>💬</Text>
|
|
162
|
+
<Text style={styles.compactLabel}>
|
|
163
|
+
{support.whatsapp.label || 'WhatsApp'}
|
|
164
|
+
</Text>
|
|
165
|
+
</TouchableOpacity>
|
|
166
|
+
)}
|
|
167
|
+
{support.phone && (
|
|
168
|
+
<TouchableOpacity
|
|
169
|
+
style={[styles.compactButton, { backgroundColor: phoneColor }]}
|
|
170
|
+
onPress={handlePhone}
|
|
171
|
+
activeOpacity={0.8}
|
|
172
|
+
>
|
|
173
|
+
<Text style={styles.compactIcon}>📞</Text>
|
|
174
|
+
<Text style={styles.compactLabel}>
|
|
175
|
+
{support.phone.label || 'Call'}
|
|
176
|
+
</Text>
|
|
177
|
+
</TouchableOpacity>
|
|
178
|
+
)}
|
|
179
|
+
{support.email && (
|
|
180
|
+
<TouchableOpacity
|
|
181
|
+
style={[styles.compactButton, { backgroundColor: emailColor }]}
|
|
182
|
+
onPress={handleEmail}
|
|
183
|
+
activeOpacity={0.8}
|
|
184
|
+
>
|
|
185
|
+
<Text style={styles.compactIcon}>✉️</Text>
|
|
186
|
+
<Text style={styles.compactLabel}>
|
|
187
|
+
{support.email.label || 'Email'}
|
|
188
|
+
</Text>
|
|
189
|
+
</TouchableOpacity>
|
|
190
|
+
)}
|
|
191
|
+
</View>
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<View style={styles.container}>
|
|
196
|
+
{variant === 'icon-only' && renderIconOnly()}
|
|
197
|
+
{variant === 'text-only' && renderTextOnly()}
|
|
198
|
+
{variant === 'combined' && renderCombined()}
|
|
199
|
+
{variant === 'compact' && renderCompact()}
|
|
200
|
+
</View>
|
|
201
|
+
);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const styles = StyleSheet.create({
|
|
205
|
+
container: {
|
|
206
|
+
marginTop: 20,
|
|
207
|
+
},
|
|
208
|
+
// Icon-only variant
|
|
209
|
+
iconOnlyContainer: {
|
|
210
|
+
flexDirection: 'row',
|
|
211
|
+
justifyContent: 'center',
|
|
212
|
+
alignItems: 'center',
|
|
213
|
+
gap: 12,
|
|
214
|
+
backgroundColor: '#FFFFFF',
|
|
215
|
+
paddingVertical: 12,
|
|
216
|
+
paddingHorizontal: 20,
|
|
217
|
+
borderRadius: 30,
|
|
218
|
+
shadowColor: '#000',
|
|
219
|
+
shadowOffset: { width: 0, height: 2 },
|
|
220
|
+
shadowOpacity: 0.1,
|
|
221
|
+
shadowRadius: 8,
|
|
222
|
+
elevation: 3,
|
|
223
|
+
alignSelf: 'center',
|
|
224
|
+
},
|
|
225
|
+
iconButton: {
|
|
226
|
+
width: 48,
|
|
227
|
+
height: 48,
|
|
228
|
+
borderRadius: 24,
|
|
229
|
+
justifyContent: 'center',
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
shadowColor: '#000',
|
|
232
|
+
shadowOffset: { width: 0, height: 2 },
|
|
233
|
+
shadowOpacity: 0.15,
|
|
234
|
+
shadowRadius: 4,
|
|
235
|
+
elevation: 2,
|
|
236
|
+
},
|
|
237
|
+
iconText: {
|
|
238
|
+
fontSize: 24,
|
|
239
|
+
},
|
|
240
|
+
// Text-only variant
|
|
241
|
+
textOnlyContainer: {
|
|
242
|
+
flexDirection: 'row',
|
|
243
|
+
justifyContent: 'center',
|
|
244
|
+
alignItems: 'center',
|
|
245
|
+
gap: 12,
|
|
246
|
+
},
|
|
247
|
+
textButton: {
|
|
248
|
+
paddingVertical: 12,
|
|
249
|
+
paddingHorizontal: 24,
|
|
250
|
+
borderRadius: 8,
|
|
251
|
+
borderWidth: 1.5,
|
|
252
|
+
backgroundColor: '#FFFFFF',
|
|
253
|
+
},
|
|
254
|
+
textButtonLabel: {
|
|
255
|
+
fontSize: 15,
|
|
256
|
+
fontWeight: '600',
|
|
257
|
+
},
|
|
258
|
+
// Combined variant
|
|
259
|
+
combinedContainer: {
|
|
260
|
+
gap: 12,
|
|
261
|
+
},
|
|
262
|
+
combinedButton: {
|
|
263
|
+
flexDirection: 'row',
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
justifyContent: 'center',
|
|
266
|
+
paddingVertical: 14,
|
|
267
|
+
paddingHorizontal: 20,
|
|
268
|
+
borderRadius: 12,
|
|
269
|
+
gap: 10,
|
|
270
|
+
},
|
|
271
|
+
combinedIcon: {
|
|
272
|
+
fontSize: 20,
|
|
273
|
+
},
|
|
274
|
+
combinedLabel: {
|
|
275
|
+
color: '#FFFFFF',
|
|
276
|
+
fontSize: 16,
|
|
277
|
+
fontWeight: '600',
|
|
278
|
+
},
|
|
279
|
+
// Compact variant
|
|
280
|
+
compactContainer: {
|
|
281
|
+
flexDirection: 'row',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
alignItems: 'center',
|
|
284
|
+
gap: 12,
|
|
285
|
+
},
|
|
286
|
+
compactButton: {
|
|
287
|
+
flexDirection: 'row',
|
|
288
|
+
alignItems: 'center',
|
|
289
|
+
justifyContent: 'center',
|
|
290
|
+
paddingVertical: 12,
|
|
291
|
+
paddingHorizontal: 20,
|
|
292
|
+
borderRadius: 12,
|
|
293
|
+
gap: 8,
|
|
294
|
+
flex: 1,
|
|
295
|
+
shadowColor: '#000',
|
|
296
|
+
shadowOffset: { width: 0, height: 2 },
|
|
297
|
+
shadowOpacity: 0.1,
|
|
298
|
+
shadowRadius: 4,
|
|
299
|
+
elevation: 2,
|
|
300
|
+
},
|
|
301
|
+
compactIcon: {
|
|
302
|
+
fontSize: 18,
|
|
303
|
+
},
|
|
304
|
+
compactLabel: {
|
|
305
|
+
color: '#FFFFFF',
|
|
306
|
+
fontSize: 15,
|
|
307
|
+
fontWeight: '600',
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
export default SupportButtons;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface CountdownTimerProps {
|
|
5
|
+
estimatedEndTime: Date;
|
|
6
|
+
onComplete?: () => void;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const CountdownTimer: React.FC<CountdownTimerProps> = ({
|
|
12
|
+
estimatedEndTime,
|
|
13
|
+
onComplete,
|
|
14
|
+
backgroundColor = '#FFFFFF',
|
|
15
|
+
borderColor = '#E5E7EB',
|
|
16
|
+
}) => {
|
|
17
|
+
const [timeRemaining, setTimeRemaining] = useState({
|
|
18
|
+
hours: 0,
|
|
19
|
+
minutes: 0,
|
|
20
|
+
seconds: 0,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const updateCountdown = () => {
|
|
25
|
+
const now = new Date().getTime();
|
|
26
|
+
const end = new Date(estimatedEndTime).getTime();
|
|
27
|
+
const distance = end - now;
|
|
28
|
+
|
|
29
|
+
if (distance < 0) {
|
|
30
|
+
setTimeRemaining({ hours: 0, minutes: 0, seconds: 0 });
|
|
31
|
+
onComplete?.();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const hours = Math.floor(distance / (1000 * 60 * 60));
|
|
36
|
+
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
37
|
+
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
|
38
|
+
|
|
39
|
+
setTimeRemaining({ hours, minutes, seconds });
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
updateCountdown();
|
|
43
|
+
const interval = setInterval(updateCountdown, 1000);
|
|
44
|
+
|
|
45
|
+
return () => clearInterval(interval);
|
|
46
|
+
}, [estimatedEndTime, onComplete]);
|
|
47
|
+
|
|
48
|
+
const formatTime = (value: number) => {
|
|
49
|
+
return value.toString().padStart(2, '0');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const formatDate = () => {
|
|
53
|
+
const date = new Date(estimatedEndTime);
|
|
54
|
+
const hours = date.getHours();
|
|
55
|
+
const minutes = date.getMinutes();
|
|
56
|
+
const day = date.toLocaleDateString('en-US', { weekday: 'short' });
|
|
57
|
+
const dayNum = date.getDate();
|
|
58
|
+
const month = date.toLocaleDateString('en-US', { month: 'short' });
|
|
59
|
+
|
|
60
|
+
return `Expected to be back by ${hours}:${formatTime(minutes)} on ${day} ${dayNum} ${month}`;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<View
|
|
65
|
+
style={[
|
|
66
|
+
styles.container,
|
|
67
|
+
{
|
|
68
|
+
backgroundColor,
|
|
69
|
+
borderColor,
|
|
70
|
+
},
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
<Text style={styles.title}>Estimated Time Remaining</Text>
|
|
74
|
+
<View style={styles.timerContainer}>
|
|
75
|
+
<View style={styles.timeBox}>
|
|
76
|
+
<Text style={styles.timeValue}>{formatTime(timeRemaining.hours)}</Text>
|
|
77
|
+
<Text style={styles.timeLabel}>Hours</Text>
|
|
78
|
+
</View>
|
|
79
|
+
<View style={styles.timeBox}>
|
|
80
|
+
<Text style={styles.timeValue}>{formatTime(timeRemaining.minutes)}</Text>
|
|
81
|
+
<Text style={styles.timeLabel}>Min</Text>
|
|
82
|
+
</View>
|
|
83
|
+
<View style={styles.timeBox}>
|
|
84
|
+
<Text style={styles.timeValue}>{formatTime(timeRemaining.seconds)}</Text>
|
|
85
|
+
<Text style={styles.timeLabel}>Sec</Text>
|
|
86
|
+
</View>
|
|
87
|
+
</View>
|
|
88
|
+
<Text style={styles.expectedText}>{formatDate()}</Text>
|
|
89
|
+
</View>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const styles = StyleSheet.create({
|
|
94
|
+
container: {
|
|
95
|
+
borderRadius: 12,
|
|
96
|
+
padding: 24,
|
|
97
|
+
marginBottom: 24,
|
|
98
|
+
borderWidth: 1,
|
|
99
|
+
width: '100%',
|
|
100
|
+
},
|
|
101
|
+
title: {
|
|
102
|
+
fontSize: 16,
|
|
103
|
+
fontWeight: '600',
|
|
104
|
+
color: '#1F2937',
|
|
105
|
+
textAlign: 'center',
|
|
106
|
+
marginBottom: 20,
|
|
107
|
+
},
|
|
108
|
+
timerContainer: {
|
|
109
|
+
flexDirection: 'row',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
gap: 16,
|
|
112
|
+
marginBottom: 16,
|
|
113
|
+
},
|
|
114
|
+
timeBox: {
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
minWidth: 70,
|
|
117
|
+
},
|
|
118
|
+
timeValue: {
|
|
119
|
+
fontSize: 48,
|
|
120
|
+
fontWeight: '700',
|
|
121
|
+
color: '#1F2937',
|
|
122
|
+
lineHeight: 56,
|
|
123
|
+
},
|
|
124
|
+
timeLabel: {
|
|
125
|
+
fontSize: 14,
|
|
126
|
+
color: '#6B7280',
|
|
127
|
+
marginTop: 4,
|
|
128
|
+
},
|
|
129
|
+
expectedText: {
|
|
130
|
+
fontSize: 13,
|
|
131
|
+
color: '#9CA3AF',
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
export default CountdownTimer;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import type { RetryInfo, ThemeColors } from '../../types';
|
|
4
|
+
|
|
5
|
+
interface RetryCounterProps {
|
|
6
|
+
retryInfo: RetryInfo;
|
|
7
|
+
theme?: ThemeColors;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const RetryCounter: React.FC<RetryCounterProps> = ({ retryInfo, theme }) => {
|
|
11
|
+
const textColor = theme?.textSecondary || '#6B7280';
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<View style={styles.container}>
|
|
15
|
+
<Text style={[styles.text, { color: textColor }]}>
|
|
16
|
+
Retry attempt {retryInfo.attempt} of {retryInfo.maxAttempts}
|
|
17
|
+
</Text>
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
container: {
|
|
24
|
+
marginVertical: 12,
|
|
25
|
+
},
|
|
26
|
+
text: {
|
|
27
|
+
fontSize: 14,
|
|
28
|
+
textAlign: 'center',
|
|
29
|
+
fontWeight: '500',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default RetryCounter;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Cross-Platform UI Kit - Main Export
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
// Export all types
|
|
6
|
+
export * from './types';
|
|
7
|
+
|
|
8
|
+
// Export all client utilities
|
|
9
|
+
export * from './utils';
|
|
10
|
+
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Error Handling Screens
|
|
13
|
+
// ============================================================================
|
|
14
|
+
export { ErrorBoundaryScreen } from './screens/errors/ErrorBoundaryScreen';
|
|
15
|
+
export { ServerErrorScreen } from './screens/errors/ServerErrorScreen';
|
|
16
|
+
export { ClientErrorScreen } from './screens/errors/ClientErrorScreen';
|
|
17
|
+
export { InvalidResponseScreen } from './screens/errors/InvalidResponseScreen';
|
|
18
|
+
export { ApiErrorScreen } from './screens/errors/ApiErrorScreen';
|
|
19
|
+
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Network & Connectivity Screens
|
|
22
|
+
// ============================================================================
|
|
23
|
+
export { NetworkOfflineScreen } from './screens/network/NetworkOfflineScreen';
|
|
24
|
+
export { NetworkSlowConnectionScreen } from './screens/network/NetworkSlowConnectionScreen';
|
|
25
|
+
export { ApiTimeoutScreen } from './screens/network/ApiTimeoutScreen';
|
|
26
|
+
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// Permission Screens
|
|
29
|
+
// ============================================================================
|
|
30
|
+
export { PermissionScreen } from './screens/permissions/PermissionScreen';
|
|
31
|
+
export { PermissionDeniedScreen } from './screens/permissions/PermissionDeniedScreen';
|
|
32
|
+
export { PermissionRequestScreen, MultiPermissionRequestScreen } from './screens/permissions/PermissionRequestScreen';
|
|
33
|
+
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// System Screens
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// Update Screens
|
|
38
|
+
export { SoftUpdateScreen } from './screens/system/updates/SoftUpdateScreen';
|
|
39
|
+
export { OptionalUpdateScreen } from './screens/system/updates/OptionalUpdateScreen';
|
|
40
|
+
export { ForceUpdateScreen } from './screens/system/updates/ForceUpdateScreen';
|
|
41
|
+
export { SecurityUpdateScreen } from './screens/system/updates/SecurityUpdateScreen';
|
|
42
|
+
export { AppUpdateScreen } from './screens/system/updates/AppUpdateScreen';
|
|
43
|
+
|
|
44
|
+
// Maintenance Screens
|
|
45
|
+
export { PlannedMaintenanceScreen } from './screens/system/maintenance/PlannedMaintenanceScreen';
|
|
46
|
+
export { UnplannedOutageScreen } from './screens/system/maintenance/UnplannedOutageScreen';
|
|
47
|
+
export { EmergencyOutageScreen } from './screens/system/maintenance/EmergencyOutageScreen';
|
|
48
|
+
export { SystemMaintenanceScreen } from './screens/system/maintenance/SystemMaintenanceScreen';
|
|
49
|
+
export { default as ServiceUnavailableScreen } from './screens/system/maintenance/ServiceUnavailableScreen';
|
|
50
|
+
|
|
51
|
+
// ============================================================================
|
|
52
|
+
// Shared Design System Components
|
|
53
|
+
// ============================================================================
|
|
54
|
+
export { default as ScreenContainer } from './components/layout/ScreenContainer';
|
|
55
|
+
export { default as IconWithBadge } from './components/icons/utilities/IconWithBadge';
|
|
56
|
+
export { default as ContentCard } from './components/cards/ContentCard';
|
|
57
|
+
export { default as PrimaryButton } from './components/buttons/PrimaryButton';
|
|
58
|
+
export { default as SecondaryButton } from './components/buttons/SecondaryButton';
|
|
59
|
+
export { default as CheckListItem } from './components/lists/CheckListItem';
|
|
60
|
+
export { default as StatusBadge } from './components/feedback/StatusBadge';
|
|
61
|
+
export { default as VersionDisplay } from './components/status/VersionDisplay';
|
|
62
|
+
|
|
63
|
+
// Other Shared Components
|
|
64
|
+
export { default as SupportButtons } from './components/support/SupportButtons';
|
|
65
|
+
export { default as RetryCounter } from './components/timers/RetryCounter';
|
|
66
|
+
export { default as DualButtonLayout } from './components/layout/DualButtonLayout';
|
|
67
|
+
export { default as TopBanner } from './components/feedback/TopBanner';
|
|
68
|
+
export { default as ExpandableSection } from './components/feedback/ExpandableSection';
|
|
69
|
+
export { default as WhatsNewCard } from './components/cards/WhatsNewCard';
|
|
70
|
+
export { default as StatusCheckList } from './components/lists/StatusCheckList';
|
|
71
|
+
export { default as CountdownTimer } from './components/timers/CountdownTimer';
|
|
72
|
+
export { default as InfoCard } from './components/cards/InfoCard';
|
|
73
|
+
export { default as WarningCard } from './components/cards/WarningCard';
|
|
74
|
+
export { default as SecurityBanner } from './components/feedback/SecurityBanner';
|
|
75
|
+
|
|
76
|
+
// ============================================================================
|
|
77
|
+
// Animated Icons
|
|
78
|
+
// ============================================================================
|
|
79
|
+
// Network Icons
|
|
80
|
+
export { default as AnimatedWifiOff } from './components/icons/animated/network/AnimatedWifiOff';
|
|
81
|
+
export { default as AnimatedSpeedGauge } from './components/icons/animated/network/AnimatedSpeedGauge';
|
|
82
|
+
export { default as AnimatedTimeout } from './components/icons/animated/network/AnimatedTimeout';
|
|
83
|
+
|
|
84
|
+
// Error Icons
|
|
85
|
+
export { default as AnimatedCrash } from './components/icons/animated/errors/AnimatedCrash';
|
|
86
|
+
export { default as AnimatedServerError } from './components/icons/animated/errors/AnimatedServerError';
|
|
87
|
+
export { default as AnimatedClientError } from './components/icons/animated/errors/AnimatedClientError';
|
|
88
|
+
export { default as AnimatedInvalidData } from './components/icons/animated/errors/AnimatedInvalidData';
|
|
89
|
+
|
|
90
|
+
// Permission Icons
|
|
91
|
+
export { default as AnimatedPermission } from './components/icons/animated/permissions/AnimatedPermission';
|
|
92
|
+
export { default as AnimatedPermissionDenied } from './components/icons/animated/permissions/AnimatedPermissionDenied';
|
|
93
|
+
|
|
94
|
+
// Maintenance Icons
|
|
95
|
+
export { default as AnimatedAlert } from './components/icons/animated/maintenance/AnimatedAlert';
|
|
96
|
+
export { default as AnimatedEmergency } from './components/icons/animated/maintenance/AnimatedEmergency';
|
|
97
|
+
export { default as AnimatedWrench } from './components/icons/animated/maintenance/AnimatedWrench';
|
|
98
|
+
|
|
99
|
+
// Other Icons
|
|
100
|
+
export { default as AnimatedClock } from './components/icons/animated/general/AnimatedClock';
|
|
101
|
+
export { default as AnimatedWarning } from './components/icons/animated/general/AnimatedWarning';
|
|
102
|
+
export { default as AnimatedShield } from './components/icons/animated/general/AnimatedShield';
|
|
103
|
+
export { default as AnimatedCalendar } from './components/icons/animated/general/AnimatedCalendar';
|
|
104
|
+
export { default as AnimatedDocument } from './components/icons/animated/general/AnimatedDocument';
|
|
105
|
+
export { default as AnimatedCamera } from './components/icons/animated/general/AnimatedCamera';
|
|
106
|
+
export { default as AnimatedLightning } from './components/icons/animated/general/AnimatedLightning';
|
|
107
|
+
export { default as AnimatedLocationPin } from './components/icons/animated/general/AnimatedLocationPin';
|
|
108
|
+
export { default as AnimatedSparkle } from './components/icons/animated/general/AnimatedSparkle';
|
|
109
|
+
export { default as AnimatedDownload } from './components/icons/animated/general/AnimatedDownload';
|
|
110
|
+
|
|
111
|
+
// Icon Badges
|
|
112
|
+
export { default as DownloadBadge } from './components/icons/badges/DownloadBadge';
|
|
113
|
+
export { default as ClockBadge } from './components/icons/badges/ClockBadge';
|
|
114
|
+
export { default as XBadge } from './components/icons/badges/XBadge';
|
|
115
|
+
|
|
116
|
+
// ============================================================================
|
|
117
|
+
// Adapter Layer
|
|
118
|
+
// ============================================================================
|
|
119
|
+
export {
|
|
120
|
+
createSupportHandler,
|
|
121
|
+
createRetryHandler,
|
|
122
|
+
createErrorContext,
|
|
123
|
+
type RetryHandler,
|
|
124
|
+
type SupportHandler,
|
|
125
|
+
} from './adapters/supportAdapter';
|