@bifold/core 1.0.0 → 2.0.1
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/lib/commonjs/App.js +26 -22
- package/lib/commonjs/App.js.map +1 -1
- package/lib/commonjs/components/inputs/BiometryControl.js +176 -0
- package/lib/commonjs/components/inputs/BiometryControl.js.map +1 -0
- package/lib/commonjs/components/misc/ConnectionAlert.js +2 -2
- package/lib/commonjs/components/misc/ConnectionAlert.js.map +1 -1
- package/lib/commonjs/components/misc/InfoBox.js +3 -2
- package/lib/commonjs/components/misc/InfoBox.js.map +1 -1
- package/lib/commonjs/components/misc/{PINCreateHeader.js → PINHeader.js} +4 -4
- package/lib/commonjs/components/misc/PINHeader.js.map +1 -0
- package/lib/commonjs/components/misc/PINValidationHelper.js +50 -0
- package/lib/commonjs/components/misc/PINValidationHelper.js.map +1 -0
- package/lib/commonjs/components/views/PushNotificationsContent.js +52 -0
- package/lib/commonjs/components/views/PushNotificationsContent.js.map +1 -0
- package/lib/commonjs/components/views/PushNotificationsDisabledContent.js +47 -0
- package/lib/commonjs/components/views/PushNotificationsDisabledContent.js.map +1 -0
- package/lib/commonjs/container-api.js +8 -3
- package/lib/commonjs/container-api.js.map +1 -1
- package/lib/commonjs/container-impl.js +25 -21
- package/lib/commonjs/container-impl.js.map +1 -1
- package/lib/commonjs/contexts/activity.js +17 -41
- package/lib/commonjs/contexts/activity.js.map +1 -1
- package/lib/commonjs/contexts/auth.js +16 -6
- package/lib/commonjs/contexts/auth.js.map +1 -1
- package/lib/commonjs/contexts/navigation.js +24 -0
- package/lib/commonjs/contexts/navigation.js.map +1 -0
- package/lib/commonjs/contexts/reducers/store.js +14 -0
- package/lib/commonjs/contexts/reducers/store.js.map +1 -1
- package/lib/commonjs/contexts/theme.js +36 -3
- package/lib/commonjs/contexts/theme.js.map +1 -1
- package/lib/commonjs/hooks/deep-links.js +2 -4
- package/lib/commonjs/hooks/deep-links.js.map +1 -1
- package/lib/commonjs/hooks/{initialize-agent.js → useBifoldAgentSetup.js} +24 -44
- package/lib/commonjs/hooks/useBifoldAgentSetup.js.map +1 -0
- package/lib/commonjs/hooks/useOnboardingState.js +3 -3
- package/lib/commonjs/hooks/useOnboardingState.js.map +1 -1
- package/lib/commonjs/hooks/usePINValidation.js +82 -0
- package/lib/commonjs/hooks/usePINValidation.js.map +1 -0
- package/lib/commonjs/index.js +34 -33
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/en/index.js +31 -25
- package/lib/commonjs/localization/en/index.js.map +1 -1
- package/lib/commonjs/localization/fr/index.js +18 -6
- package/lib/commonjs/localization/fr/index.js.map +1 -1
- package/lib/commonjs/localization/pt-br/index.js +43 -37
- package/lib/commonjs/localization/pt-br/index.js.map +1 -1
- package/lib/commonjs/navigators/MainStack.js +31 -8
- package/lib/commonjs/navigators/MainStack.js.map +1 -1
- package/lib/commonjs/navigators/OnboardingScreens.js +8 -8
- package/lib/commonjs/navigators/OnboardingScreens.js.map +1 -1
- package/lib/commonjs/navigators/OnboardingStack.js +20 -12
- package/lib/commonjs/navigators/OnboardingStack.js.map +1 -1
- package/lib/commonjs/navigators/RootStack.js +27 -30
- package/lib/commonjs/navigators/RootStack.js.map +1 -1
- package/lib/commonjs/navigators/SettingStack.js +14 -15
- package/lib/commonjs/navigators/SettingStack.js.map +1 -1
- package/lib/commonjs/navigators/defaultStackOptions.js +13 -2
- package/lib/commonjs/navigators/defaultStackOptions.js.map +1 -1
- package/lib/commonjs/onboarding.js +12 -5
- package/lib/commonjs/onboarding.js.map +1 -1
- package/lib/commonjs/screens/Biometry.js +62 -0
- package/lib/commonjs/screens/Biometry.js.map +1 -0
- package/lib/commonjs/screens/CredentialOffer.js +2 -2
- package/lib/commonjs/screens/CredentialOffer.js.map +1 -1
- package/lib/commonjs/screens/Onboarding.js.map +1 -1
- package/lib/commonjs/screens/PINChange.js +212 -0
- package/lib/commonjs/screens/PINChange.js.map +1 -0
- package/lib/commonjs/screens/PINCreate.js +47 -224
- package/lib/commonjs/screens/PINCreate.js.map +1 -1
- package/lib/commonjs/screens/Preface.js.map +1 -1
- package/lib/commonjs/screens/ProofRequest.js +112 -33
- package/lib/commonjs/screens/ProofRequest.js.map +1 -1
- package/lib/commonjs/screens/PushNotifications.js +71 -0
- package/lib/commonjs/screens/PushNotifications.js.map +1 -0
- package/lib/commonjs/screens/Settings.js +8 -24
- package/lib/commonjs/screens/Settings.js.map +1 -1
- package/lib/commonjs/screens/Splash.js +7 -23
- package/lib/commonjs/screens/Splash.js.map +1 -1
- package/lib/commonjs/screens/Terms.js.map +1 -1
- package/lib/commonjs/screens/ToggleBiometry.js +135 -0
- package/lib/commonjs/screens/ToggleBiometry.js.map +1 -0
- package/lib/commonjs/screens/{PushNotification.js → TogglePushNotifications.js} +41 -99
- package/lib/commonjs/screens/TogglePushNotifications.js.map +1 -0
- package/lib/commonjs/theme.js +4 -2
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/commonjs/types/navigators.js +5 -2
- package/lib/commonjs/types/navigators.js.map +1 -1
- package/lib/commonjs/utils/{PINCreationValidation.js → PINValidation.js} +4 -4
- package/lib/commonjs/utils/PINValidation.js.map +1 -0
- package/lib/commonjs/utils/agent.js.map +1 -1
- package/lib/commonjs/utils/helpers.js +2 -0
- package/lib/commonjs/utils/helpers.js.map +1 -1
- package/lib/module/App.js +24 -20
- package/lib/module/App.js.map +1 -1
- package/lib/module/components/inputs/BiometryControl.js +167 -0
- package/lib/module/components/inputs/BiometryControl.js.map +1 -0
- package/lib/module/components/misc/ConnectionAlert.js +2 -2
- package/lib/module/components/misc/ConnectionAlert.js.map +1 -1
- package/lib/module/components/misc/InfoBox.js +3 -2
- package/lib/module/components/misc/InfoBox.js.map +1 -1
- package/lib/module/components/misc/{PINCreateHeader.js → PINHeader.js} +4 -4
- package/lib/module/components/misc/PINHeader.js.map +1 -0
- package/lib/module/components/misc/PINValidationHelper.js +43 -0
- package/lib/module/components/misc/PINValidationHelper.js.map +1 -0
- package/lib/module/components/views/PushNotificationsContent.js +45 -0
- package/lib/module/components/views/PushNotificationsContent.js.map +1 -0
- package/lib/module/components/views/PushNotificationsDisabledContent.js +40 -0
- package/lib/module/components/views/PushNotificationsDisabledContent.js.map +1 -0
- package/lib/module/container-api.js +7 -2
- package/lib/module/container-api.js.map +1 -1
- package/lib/module/container-impl.js +25 -21
- package/lib/module/container-impl.js.map +1 -1
- package/lib/module/contexts/activity.js +17 -41
- package/lib/module/contexts/activity.js.map +1 -1
- package/lib/module/contexts/auth.js +16 -6
- package/lib/module/contexts/auth.js.map +1 -1
- package/lib/module/contexts/navigation.js +17 -0
- package/lib/module/contexts/navigation.js.map +1 -0
- package/lib/module/contexts/reducers/store.js +14 -0
- package/lib/module/contexts/reducers/store.js.map +1 -1
- package/lib/module/contexts/theme.js +36 -4
- package/lib/module/contexts/theme.js.map +1 -1
- package/lib/module/hooks/deep-links.js +2 -4
- package/lib/module/hooks/deep-links.js.map +1 -1
- package/lib/module/hooks/{initialize-agent.js → useBifoldAgentSetup.js} +25 -45
- package/lib/module/hooks/useBifoldAgentSetup.js.map +1 -0
- package/lib/module/hooks/useOnboardingState.js +3 -3
- package/lib/module/hooks/useOnboardingState.js.map +1 -1
- package/lib/module/hooks/usePINValidation.js +75 -0
- package/lib/module/hooks/usePINValidation.js.map +1 -0
- package/lib/module/index.js +6 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/en/index.js +31 -25
- package/lib/module/localization/en/index.js.map +1 -1
- package/lib/module/localization/fr/index.js +18 -6
- package/lib/module/localization/fr/index.js.map +1 -1
- package/lib/module/localization/pt-br/index.js +43 -37
- package/lib/module/localization/pt-br/index.js.map +1 -1
- package/lib/module/navigators/MainStack.js +32 -9
- package/lib/module/navigators/MainStack.js.map +1 -1
- package/lib/module/navigators/OnboardingScreens.js +8 -8
- package/lib/module/navigators/OnboardingScreens.js.map +1 -1
- package/lib/module/navigators/OnboardingStack.js +21 -12
- package/lib/module/navigators/OnboardingStack.js.map +1 -1
- package/lib/module/navigators/RootStack.js +26 -29
- package/lib/module/navigators/RootStack.js.map +1 -1
- package/lib/module/navigators/SettingStack.js +14 -15
- package/lib/module/navigators/SettingStack.js.map +1 -1
- package/lib/module/navigators/defaultStackOptions.js +13 -2
- package/lib/module/navigators/defaultStackOptions.js.map +1 -1
- package/lib/module/onboarding.js +10 -4
- package/lib/module/onboarding.js.map +1 -1
- package/lib/module/screens/Biometry.js +53 -0
- package/lib/module/screens/Biometry.js.map +1 -0
- package/lib/module/screens/CredentialOffer.js +2 -2
- package/lib/module/screens/CredentialOffer.js.map +1 -1
- package/lib/module/screens/Onboarding.js.map +1 -1
- package/lib/module/screens/PINChange.js +203 -0
- package/lib/module/screens/PINChange.js.map +1 -0
- package/lib/module/screens/PINCreate.js +49 -226
- package/lib/module/screens/PINCreate.js.map +1 -1
- package/lib/module/screens/Preface.js.map +1 -1
- package/lib/module/screens/ProofRequest.js +113 -34
- package/lib/module/screens/ProofRequest.js.map +1 -1
- package/lib/module/screens/PushNotifications.js +63 -0
- package/lib/module/screens/PushNotifications.js.map +1 -0
- package/lib/module/screens/Settings.js +9 -25
- package/lib/module/screens/Settings.js.map +1 -1
- package/lib/module/screens/Splash.js +7 -23
- package/lib/module/screens/Splash.js.map +1 -1
- package/lib/module/screens/Terms.js.map +1 -1
- package/lib/module/screens/ToggleBiometry.js +126 -0
- package/lib/module/screens/ToggleBiometry.js.map +1 -0
- package/lib/module/screens/TogglePushNotifications.js +112 -0
- package/lib/module/screens/TogglePushNotifications.js.map +1 -0
- package/lib/module/theme.js +3 -1
- package/lib/module/theme.js.map +1 -1
- package/lib/module/types/navigators.js +5 -2
- package/lib/module/types/navigators.js.map +1 -1
- package/lib/module/utils/{PINCreationValidation.js → PINValidation.js} +2 -2
- package/lib/module/utils/PINValidation.js.map +1 -0
- package/lib/module/utils/agent.js.map +1 -1
- package/lib/module/utils/helpers.js +2 -0
- package/lib/module/utils/helpers.js.map +1 -1
- package/lib/typescript/src/App.d.ts +3 -3
- package/lib/typescript/src/App.d.ts.map +1 -1
- package/lib/typescript/src/components/inputs/BiometryControl.d.ts +9 -0
- package/lib/typescript/src/components/inputs/BiometryControl.d.ts.map +1 -0
- package/lib/typescript/src/components/misc/ConnectionAlert.d.ts +1 -1
- package/lib/typescript/src/components/misc/ConnectionAlert.d.ts.map +1 -1
- package/lib/typescript/src/components/misc/InfoBox.d.ts +1 -0
- package/lib/typescript/src/components/misc/InfoBox.d.ts.map +1 -1
- package/lib/typescript/src/components/misc/PINHeader.d.ts +6 -0
- package/lib/typescript/src/components/misc/PINHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/misc/PINValidationHelper.d.ts +8 -0
- package/lib/typescript/src/components/misc/PINValidationHelper.d.ts.map +1 -0
- package/lib/typescript/src/components/views/PushNotificationsContent.d.ts +4 -0
- package/lib/typescript/src/components/views/PushNotificationsContent.d.ts.map +1 -0
- package/lib/typescript/src/components/views/PushNotificationsDisabledContent.d.ts +4 -0
- package/lib/typescript/src/components/views/PushNotificationsDisabledContent.d.ts.map +1 -0
- package/lib/typescript/src/container-api.d.ts +24 -13
- package/lib/typescript/src/container-api.d.ts.map +1 -1
- package/lib/typescript/src/container-impl.d.ts +4 -2
- package/lib/typescript/src/container-impl.d.ts.map +1 -1
- package/lib/typescript/src/contexts/activity.d.ts.map +1 -1
- package/lib/typescript/src/contexts/auth.d.ts +3 -1
- package/lib/typescript/src/contexts/auth.d.ts.map +1 -1
- package/lib/typescript/src/contexts/navigation.d.ts +8 -0
- package/lib/typescript/src/contexts/navigation.d.ts.map +1 -0
- package/lib/typescript/src/contexts/reducers/store.d.ts +3 -1
- package/lib/typescript/src/contexts/reducers/store.d.ts.map +1 -1
- package/lib/typescript/src/contexts/theme.d.ts +9 -3
- package/lib/typescript/src/contexts/theme.d.ts.map +1 -1
- package/lib/typescript/src/hooks/deep-links.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useBifoldAgentSetup.d.ts +10 -0
- package/lib/typescript/src/hooks/useBifoldAgentSetup.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useOnboardingState.d.ts +2 -1
- package/lib/typescript/src/hooks/useOnboardingState.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePINValidation.d.ts +20 -0
- package/lib/typescript/src/hooks/usePINValidation.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +9 -7
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/en/index.d.ts +23 -17
- package/lib/typescript/src/localization/en/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/fr/index.d.ts +14 -2
- package/lib/typescript/src/localization/fr/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/pt-br/index.d.ts +23 -17
- package/lib/typescript/src/localization/pt-br/index.d.ts.map +1 -1
- package/lib/typescript/src/navigators/MainStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/OnboardingScreens.d.ts +3 -3
- package/lib/typescript/src/navigators/OnboardingScreens.d.ts.map +1 -1
- package/lib/typescript/src/navigators/OnboardingStack.d.ts +7 -1
- package/lib/typescript/src/navigators/OnboardingStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/RootStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/SettingStack.d.ts.map +1 -1
- package/lib/typescript/src/navigators/defaultStackOptions.d.ts.map +1 -1
- package/lib/typescript/src/onboarding.d.ts +4 -2
- package/lib/typescript/src/onboarding.d.ts.map +1 -1
- package/lib/typescript/src/screens/Biometry.d.ts +4 -0
- package/lib/typescript/src/screens/Biometry.d.ts.map +1 -0
- package/lib/typescript/src/screens/{PushNotification.d.ts → PINChange.d.ts} +3 -3
- package/lib/typescript/src/screens/PINChange.d.ts.map +1 -0
- package/lib/typescript/src/screens/PINCreate.d.ts.map +1 -1
- package/lib/typescript/src/screens/ProofRequest.d.ts.map +1 -1
- package/lib/typescript/src/screens/PushNotifications.d.ts +4 -0
- package/lib/typescript/src/screens/PushNotifications.d.ts.map +1 -0
- package/lib/typescript/src/screens/Settings.d.ts.map +1 -1
- package/lib/typescript/src/screens/Splash.d.ts +7 -4
- package/lib/typescript/src/screens/Splash.d.ts.map +1 -1
- package/lib/typescript/src/screens/ToggleBiometry.d.ts +4 -0
- package/lib/typescript/src/screens/ToggleBiometry.d.ts.map +1 -0
- package/lib/typescript/src/screens/TogglePushNotifications.d.ts +4 -0
- package/lib/typescript/src/screens/TogglePushNotifications.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +3 -1
- package/lib/typescript/src/theme.d.ts.map +1 -1
- package/lib/typescript/src/types/navigators.d.ts +11 -13
- package/lib/typescript/src/types/navigators.d.ts.map +1 -1
- package/lib/typescript/src/types/state.d.ts +1 -0
- package/lib/typescript/src/types/state.d.ts.map +1 -1
- package/lib/typescript/src/utils/{PINCreationValidation.d.ts → PINValidation.d.ts} +2 -2
- package/lib/typescript/src/utils/PINValidation.d.ts.map +1 -0
- package/lib/typescript/src/utils/agent.d.ts +1 -2
- package/lib/typescript/src/utils/agent.d.ts.map +1 -1
- package/lib/typescript/src/utils/helpers.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/App.tsx +41 -40
- package/src/components/inputs/BiometryControl.tsx +176 -0
- package/src/components/misc/ConnectionAlert.tsx +3 -3
- package/src/components/misc/InfoBox.tsx +3 -1
- package/src/components/misc/{PINCreateHeader.tsx → PINHeader.tsx} +4 -4
- package/src/components/misc/PINValidationHelper.tsx +48 -0
- package/src/components/views/PushNotificationsContent.tsx +51 -0
- package/src/components/views/PushNotificationsDisabledContent.tsx +47 -0
- package/src/container-api.ts +27 -11
- package/src/container-impl.ts +31 -27
- package/src/contexts/activity.tsx +17 -42
- package/src/contexts/auth.tsx +18 -6
- package/src/contexts/navigation.tsx +19 -0
- package/src/contexts/reducers/store.ts +12 -0
- package/src/contexts/theme.tsx +51 -0
- package/src/hooks/deep-links.ts +2 -4
- package/src/hooks/{initialize-agent.ts → useBifoldAgentSetup.ts} +32 -54
- package/src/hooks/useOnboardingState.ts +10 -3
- package/src/hooks/usePINValidation.ts +98 -0
- package/src/index.ts +12 -14
- package/src/localization/en/index.ts +26 -20
- package/src/localization/fr/index.ts +32 -20
- package/src/localization/pt-br/index.ts +39 -33
- package/src/navigators/MainStack.tsx +29 -8
- package/src/navigators/OnboardingScreens.ts +11 -11
- package/src/navigators/OnboardingStack.tsx +26 -14
- package/src/navigators/RootStack.tsx +31 -25
- package/src/navigators/SettingStack.tsx +15 -16
- package/src/navigators/defaultStackOptions.tsx +13 -2
- package/src/onboarding.ts +12 -5
- package/src/screens/Biometry.tsx +57 -0
- package/src/screens/CredentialOffer.tsx +2 -2
- package/src/screens/Onboarding.tsx +2 -2
- package/src/screens/PINChange.tsx +250 -0
- package/src/screens/PINCreate.tsx +51 -267
- package/src/screens/Preface.tsx +2 -2
- package/src/screens/ProofRequest.tsx +140 -48
- package/src/screens/PushNotifications.tsx +59 -0
- package/src/screens/Settings.tsx +5 -10
- package/src/screens/Splash.tsx +10 -22
- package/src/screens/Terms.tsx +2 -2
- package/src/screens/ToggleBiometry.tsx +167 -0
- package/src/screens/TogglePushNotifications.tsx +118 -0
- package/src/theme.ts +5 -1
- package/src/types/navigators.ts +11 -12
- package/src/types/state.ts +1 -0
- package/src/utils/{PINCreationValidation.ts → PINValidation.ts} +1 -1
- package/src/utils/agent.ts +1 -2
- package/src/utils/helpers.ts +2 -0
- package/lib/commonjs/components/misc/ActivityLogLink.js +0 -44
- package/lib/commonjs/components/misc/ActivityLogLink.js.map +0 -1
- package/lib/commonjs/components/misc/PINCreateHeader.js.map +0 -1
- package/lib/commonjs/components/modals/NotificationModal.js +0 -121
- package/lib/commonjs/components/modals/NotificationModal.js.map +0 -1
- package/lib/commonjs/components/texts/Label.js +0 -57
- package/lib/commonjs/components/texts/Label.js.map +0 -1
- package/lib/commonjs/components/texts/Title.js +0 -29
- package/lib/commonjs/components/texts/Title.js.map +0 -1
- package/lib/commonjs/components/views/ModularView.js +0 -41
- package/lib/commonjs/components/views/ModularView.js.map +0 -1
- package/lib/commonjs/hooks/initialize-agent.js.map +0 -1
- package/lib/commonjs/screens/PushNotification.js.map +0 -1
- package/lib/commonjs/screens/UseBiometry.js +0 -315
- package/lib/commonjs/screens/UseBiometry.js.map +0 -1
- package/lib/commonjs/utils/PINCreationValidation.js.map +0 -1
- package/lib/module/components/misc/ActivityLogLink.js +0 -37
- package/lib/module/components/misc/ActivityLogLink.js.map +0 -1
- package/lib/module/components/misc/PINCreateHeader.js.map +0 -1
- package/lib/module/components/modals/NotificationModal.js +0 -112
- package/lib/module/components/modals/NotificationModal.js.map +0 -1
- package/lib/module/components/texts/Label.js +0 -50
- package/lib/module/components/texts/Label.js.map +0 -1
- package/lib/module/components/texts/Title.js +0 -22
- package/lib/module/components/texts/Title.js.map +0 -1
- package/lib/module/components/views/ModularView.js +0 -34
- package/lib/module/components/views/ModularView.js.map +0 -1
- package/lib/module/hooks/initialize-agent.js.map +0 -1
- package/lib/module/screens/PushNotification.js +0 -170
- package/lib/module/screens/PushNotification.js.map +0 -1
- package/lib/module/screens/UseBiometry.js +0 -306
- package/lib/module/screens/UseBiometry.js.map +0 -1
- package/lib/module/utils/PINCreationValidation.js.map +0 -1
- package/lib/typescript/src/components/misc/ActivityLogLink.d.ts +0 -4
- package/lib/typescript/src/components/misc/ActivityLogLink.d.ts.map +0 -1
- package/lib/typescript/src/components/misc/PINCreateHeader.d.ts +0 -6
- package/lib/typescript/src/components/misc/PINCreateHeader.d.ts.map +0 -1
- package/lib/typescript/src/components/modals/NotificationModal.d.ts +0 -17
- package/lib/typescript/src/components/modals/NotificationModal.d.ts.map +0 -1
- package/lib/typescript/src/components/texts/Label.d.ts +0 -9
- package/lib/typescript/src/components/texts/Label.d.ts.map +0 -1
- package/lib/typescript/src/components/texts/Title.d.ts +0 -8
- package/lib/typescript/src/components/texts/Title.d.ts.map +0 -1
- package/lib/typescript/src/components/views/ModularView.d.ts +0 -9
- package/lib/typescript/src/components/views/ModularView.d.ts.map +0 -1
- package/lib/typescript/src/hooks/initialize-agent.d.ts +0 -7
- package/lib/typescript/src/hooks/initialize-agent.d.ts.map +0 -1
- package/lib/typescript/src/screens/PushNotification.d.ts.map +0 -1
- package/lib/typescript/src/screens/UseBiometry.d.ts +0 -4
- package/lib/typescript/src/screens/UseBiometry.d.ts.map +0 -1
- package/lib/typescript/src/utils/PINCreationValidation.d.ts.map +0 -1
- package/src/components/misc/ActivityLogLink.tsx +0 -34
- package/src/components/modals/NotificationModal.tsx +0 -127
- package/src/components/texts/Label.tsx +0 -51
- package/src/components/texts/Title.tsx +0 -25
- package/src/components/views/ModularView.tsx +0 -35
- package/src/contexts/theme.ts +0 -9
- package/src/screens/PushNotification.tsx +0 -186
- package/src/screens/UseBiometry.tsx +0 -357
package/src/App.tsx
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { useEffect, useMemo } from 'react'
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
4
2
|
import { StatusBar } from 'react-native'
|
|
5
3
|
import SplashScreen from 'react-native-splash-screen'
|
|
6
4
|
import Toast from 'react-native-toast-message'
|
|
7
5
|
|
|
6
|
+
import { useNavigationContainerRef } from '@react-navigation/native'
|
|
7
|
+
import { isTablet } from 'react-native-device-info'
|
|
8
|
+
import Orientation from 'react-native-orientation-locker'
|
|
8
9
|
import { animatedComponents } from './animated-components'
|
|
9
10
|
import ErrorModal from './components/modals/ErrorModal'
|
|
10
11
|
import NetInfo from './components/network/NetInfo'
|
|
11
12
|
import toastConfig from './components/toast/ToastConfig'
|
|
13
|
+
import { tours } from './constants'
|
|
12
14
|
import { Container, ContainerProvider } from './container-api'
|
|
13
|
-
import { ActivityProvider } from './contexts/activity'
|
|
14
15
|
import { AnimatedComponentsProvider } from './contexts/animated-components'
|
|
15
16
|
import { AuthProvider } from './contexts/auth'
|
|
17
|
+
import NavContainer from './contexts/navigation'
|
|
16
18
|
import { NetworkProvider } from './contexts/network'
|
|
17
19
|
import { StoreProvider } from './contexts/store'
|
|
18
20
|
import { ThemeProvider } from './contexts/theme'
|
|
19
21
|
import { TourProvider } from './contexts/tour/tour-provider'
|
|
20
|
-
import {
|
|
22
|
+
import { initStoredLanguage } from './localization'
|
|
21
23
|
import RootStack from './navigators/RootStack'
|
|
22
|
-
import {
|
|
23
|
-
import { OpenIDCredentialRecordProvider } from './modules/openid/context/OpenIDCredentialRecordProvider'
|
|
24
|
-
import { tours } from './constants'
|
|
24
|
+
import { bifoldTheme, themes } from './theme'
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const createApp = (container: Container): React.FC => {
|
|
27
|
+
const AppComponent: React.FC = () => {
|
|
28
|
+
const navigationRef = useNavigationContainerRef()
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
useMemo(() => {
|
|
30
|
+
useEffect(() => {
|
|
31
31
|
initStoredLanguage().then()
|
|
32
32
|
}, [])
|
|
33
33
|
|
|
@@ -37,35 +37,35 @@ const App = (system: Container): React.FC => {
|
|
|
37
37
|
SplashScreen.hide()
|
|
38
38
|
}, [])
|
|
39
39
|
|
|
40
|
+
if (!isTablet()) {
|
|
41
|
+
Orientation.lockToPortrait()
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
return (
|
|
41
|
-
<ContainerProvider value={
|
|
45
|
+
<ContainerProvider value={container}>
|
|
42
46
|
<StoreProvider>
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</AnimatedComponentsProvider>
|
|
66
|
-
</ThemeProvider>
|
|
67
|
-
</OpenIDCredentialRecordProvider>
|
|
68
|
-
</AgentProvider>
|
|
47
|
+
<ThemeProvider themes={themes} defaultThemeName={bifoldTheme.themeName}>
|
|
48
|
+
<NavContainer navigationRef={navigationRef}>
|
|
49
|
+
<AnimatedComponentsProvider value={animatedComponents}>
|
|
50
|
+
<AuthProvider>
|
|
51
|
+
<NetworkProvider>
|
|
52
|
+
<StatusBar
|
|
53
|
+
hidden={false}
|
|
54
|
+
barStyle="light-content"
|
|
55
|
+
backgroundColor={bifoldTheme.ColorPallet.brand.primary}
|
|
56
|
+
translucent={false}
|
|
57
|
+
/>
|
|
58
|
+
<NetInfo />
|
|
59
|
+
<ErrorModal />
|
|
60
|
+
<TourProvider tours={tours} overlayColor={'gray'} overlayOpacity={0.7}>
|
|
61
|
+
<RootStack />
|
|
62
|
+
</TourProvider>
|
|
63
|
+
<Toast topOffset={15} config={toastConfig} />
|
|
64
|
+
</NetworkProvider>
|
|
65
|
+
</AuthProvider>
|
|
66
|
+
</AnimatedComponentsProvider>
|
|
67
|
+
</NavContainer>
|
|
68
|
+
</ThemeProvider>
|
|
69
69
|
</StoreProvider>
|
|
70
70
|
</ContainerProvider>
|
|
71
71
|
)
|
|
@@ -73,4 +73,5 @@ const App = (system: Container): React.FC => {
|
|
|
73
73
|
|
|
74
74
|
return AppComponent
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
export default createApp
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { Linking, Platform, ScrollView, StyleSheet, View } from 'react-native'
|
|
4
|
+
import { check, PERMISSIONS, PermissionStatus, request, RESULTS } from 'react-native-permissions'
|
|
5
|
+
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
6
|
+
|
|
7
|
+
import ToggleButton from '../buttons/ToggleButton'
|
|
8
|
+
import DismissiblePopupModal from '../modals/DismissiblePopupModal'
|
|
9
|
+
import { ThemedText } from '../texts/ThemedText'
|
|
10
|
+
import { useAuth } from '../../contexts/auth'
|
|
11
|
+
import { useTheme } from '../../contexts/theme'
|
|
12
|
+
import { testIdWithKey } from '../../utils/testable'
|
|
13
|
+
|
|
14
|
+
const BIOMETRY_PERMISSION = PERMISSIONS.IOS.FACE_ID
|
|
15
|
+
|
|
16
|
+
export interface BiometryControlProps {
|
|
17
|
+
biometryEnabled: boolean
|
|
18
|
+
onBiometryToggle: (newValue: boolean) => void
|
|
19
|
+
children?: React.ReactNode
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const BiometryControl: React.FC<BiometryControlProps> = ({ biometryEnabled, onBiometryToggle, children }) => {
|
|
23
|
+
const { t } = useTranslation()
|
|
24
|
+
const { isBiometricsActive } = useAuth()
|
|
25
|
+
const [biometryAvailable, setBiometryAvailable] = useState(false)
|
|
26
|
+
const [settingsPopupConfig, setSettingsPopupConfig] = useState<null | { title: string; description: string }>(null)
|
|
27
|
+
const { ColorPallet, Assets } = useTheme()
|
|
28
|
+
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
height: '100%',
|
|
32
|
+
padding: 20,
|
|
33
|
+
backgroundColor: ColorPallet.brand.primaryBackground,
|
|
34
|
+
},
|
|
35
|
+
image: {
|
|
36
|
+
minWidth: 200,
|
|
37
|
+
minHeight: 200,
|
|
38
|
+
marginBottom: 66,
|
|
39
|
+
},
|
|
40
|
+
biometryAvailableRowGap: {
|
|
41
|
+
rowGap: 20,
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
isBiometricsActive().then((result) => {
|
|
47
|
+
setBiometryAvailable(result)
|
|
48
|
+
})
|
|
49
|
+
}, [isBiometricsActive])
|
|
50
|
+
|
|
51
|
+
const onOpenSettingsTouched = async () => {
|
|
52
|
+
await Linking.openSettings()
|
|
53
|
+
onOpenSettingsDismissed()
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const onOpenSettingsDismissed = () => {
|
|
57
|
+
setSettingsPopupConfig(null)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const onRequestSystemBiometrics = useCallback(async (newToggleValue: boolean) => {
|
|
61
|
+
const permissionResult: PermissionStatus = await request(BIOMETRY_PERMISSION)
|
|
62
|
+
switch (permissionResult) {
|
|
63
|
+
case RESULTS.GRANTED:
|
|
64
|
+
case RESULTS.LIMITED:
|
|
65
|
+
// Granted
|
|
66
|
+
onBiometryToggle(newToggleValue)
|
|
67
|
+
break
|
|
68
|
+
default:
|
|
69
|
+
break
|
|
70
|
+
}
|
|
71
|
+
}, [onBiometryToggle])
|
|
72
|
+
|
|
73
|
+
const onCheckSystemBiometrics = useCallback(async (): Promise<PermissionStatus> => {
|
|
74
|
+
if (Platform.OS === 'android') {
|
|
75
|
+
// Android doesn't need to prompt biometric permission
|
|
76
|
+
// for an app to use it.
|
|
77
|
+
return biometryAvailable ? RESULTS.GRANTED : RESULTS.UNAVAILABLE
|
|
78
|
+
} else if (Platform.OS === 'ios') {
|
|
79
|
+
return await check(BIOMETRY_PERMISSION)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return RESULTS.UNAVAILABLE
|
|
83
|
+
}, [biometryAvailable])
|
|
84
|
+
|
|
85
|
+
const toggleSwitch = useCallback(async () => {
|
|
86
|
+
const newValue = !biometryEnabled
|
|
87
|
+
|
|
88
|
+
if (!newValue) {
|
|
89
|
+
// Turning off doesn't require OS biometrics enabled
|
|
90
|
+
onBiometryToggle(newValue)
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// If the user is turning it on, they need
|
|
95
|
+
// to first authenticate the OS biometrics before this action is accepted
|
|
96
|
+
const permissionResult: PermissionStatus = await onCheckSystemBiometrics()
|
|
97
|
+
switch (permissionResult) {
|
|
98
|
+
case RESULTS.GRANTED:
|
|
99
|
+
case RESULTS.LIMITED:
|
|
100
|
+
// Already granted
|
|
101
|
+
onBiometryToggle(newValue)
|
|
102
|
+
break
|
|
103
|
+
case RESULTS.UNAVAILABLE:
|
|
104
|
+
setSettingsPopupConfig({
|
|
105
|
+
title: t('Biometry.SetupBiometricsTitle'),
|
|
106
|
+
description: t('Biometry.SetupBiometricsDesc'),
|
|
107
|
+
})
|
|
108
|
+
break
|
|
109
|
+
case RESULTS.BLOCKED:
|
|
110
|
+
// Previously denied
|
|
111
|
+
setSettingsPopupConfig({
|
|
112
|
+
title: t('Biometry.AllowBiometricsTitle'),
|
|
113
|
+
description: t('Biometry.AllowBiometricsDesc'),
|
|
114
|
+
})
|
|
115
|
+
break
|
|
116
|
+
case RESULTS.DENIED:
|
|
117
|
+
// Has not been requested
|
|
118
|
+
await onRequestSystemBiometrics(newValue)
|
|
119
|
+
break
|
|
120
|
+
default:
|
|
121
|
+
break
|
|
122
|
+
}
|
|
123
|
+
}, [onRequestSystemBiometrics, onCheckSystemBiometrics, biometryEnabled, t, onBiometryToggle])
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<SafeAreaView edges={['left', 'right', 'bottom']}>
|
|
127
|
+
{settingsPopupConfig && (
|
|
128
|
+
<DismissiblePopupModal
|
|
129
|
+
title={settingsPopupConfig.title}
|
|
130
|
+
description={settingsPopupConfig.description}
|
|
131
|
+
onCallToActionLabel={t('Biometry.OpenSettings')}
|
|
132
|
+
onCallToActionPressed={onOpenSettingsTouched}
|
|
133
|
+
onDismissPressed={onOpenSettingsDismissed}
|
|
134
|
+
/>
|
|
135
|
+
)}
|
|
136
|
+
<ScrollView style={styles.container}>
|
|
137
|
+
<View style={{ alignItems: 'center' }}>
|
|
138
|
+
<Assets.svg.biometrics style={styles.image} />
|
|
139
|
+
</View>
|
|
140
|
+
{biometryAvailable ? (
|
|
141
|
+
<View style={styles.biometryAvailableRowGap}>
|
|
142
|
+
<ThemedText>{t('Biometry.EnabledText1')}</ThemedText>
|
|
143
|
+
<ThemedText>
|
|
144
|
+
{t('Biometry.EnabledText2')}
|
|
145
|
+
<ThemedText variant="bold"> {t('Biometry.Warning')}</ThemedText>
|
|
146
|
+
</ThemedText>
|
|
147
|
+
</View>
|
|
148
|
+
) : (
|
|
149
|
+
<View style={styles.biometryAvailableRowGap}>
|
|
150
|
+
<ThemedText>{t('Biometry.NotEnabledText1')}</ThemedText>
|
|
151
|
+
<ThemedText>{t('Biometry.NotEnabledText2')}</ThemedText>
|
|
152
|
+
</View>
|
|
153
|
+
)}
|
|
154
|
+
<View style={{ flexDirection: 'row', marginVertical: 20 }}>
|
|
155
|
+
<View style={{ flexShrink: 1, marginRight: 10, justifyContent: 'center' }}>
|
|
156
|
+
<ThemedText variant="bold">{t('Biometry.UseToUnlock')}</ThemedText>
|
|
157
|
+
</View>
|
|
158
|
+
<View style={{ justifyContent: 'center' }}>
|
|
159
|
+
<ToggleButton
|
|
160
|
+
testID={testIdWithKey('ToggleBiometrics')}
|
|
161
|
+
isEnabled={biometryEnabled}
|
|
162
|
+
isAvailable={true}
|
|
163
|
+
toggleAction={toggleSwitch}
|
|
164
|
+
disabled={false}
|
|
165
|
+
enabledIcon="check"
|
|
166
|
+
disabledIcon="close"
|
|
167
|
+
/>
|
|
168
|
+
</View>
|
|
169
|
+
</View>
|
|
170
|
+
</ScrollView>
|
|
171
|
+
{children}
|
|
172
|
+
</SafeAreaView>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export default BiometryControl
|
|
@@ -16,10 +16,10 @@ import UnorderedList from './UnorderedList'
|
|
|
16
16
|
import { ThemedText } from '../texts/ThemedText'
|
|
17
17
|
|
|
18
18
|
interface ConnectionAlertProps {
|
|
19
|
-
|
|
19
|
+
connectionLabel?: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const ConnectionAlert: React.FC<ConnectionAlertProps> = ({
|
|
22
|
+
const ConnectionAlert: React.FC<ConnectionAlertProps> = ({ connectionLabel }) => {
|
|
23
23
|
const { t } = useTranslation()
|
|
24
24
|
const { ColorPallet } = useTheme()
|
|
25
25
|
const [infoCardVisible, setInfoCardVisible] = useState(false)
|
|
@@ -113,7 +113,7 @@ const ConnectionAlert: React.FC<ConnectionAlertProps> = ({ connectionID }) => {
|
|
|
113
113
|
)}
|
|
114
114
|
<ThemedText style={styles.notifyText}>
|
|
115
115
|
{t('ConnectionAlert.NotificationBodyUpper') +
|
|
116
|
-
(
|
|
116
|
+
(connectionLabel ?? t('ContactDetails.AContact').toLowerCase()) +
|
|
117
117
|
t('ConnectionAlert.NotificationBodyLower')}
|
|
118
118
|
</ThemedText>
|
|
119
119
|
</View>
|
|
@@ -38,6 +38,7 @@ interface InfoBoxProps {
|
|
|
38
38
|
onCallToActionLabel?: string
|
|
39
39
|
onClosePressed?: GenericFn
|
|
40
40
|
showVersionFooter?: boolean
|
|
41
|
+
renderShowDetails?: boolean
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const InfoBox: React.FC<InfoBoxProps> = ({
|
|
@@ -56,11 +57,12 @@ const InfoBox: React.FC<InfoBoxProps> = ({
|
|
|
56
57
|
onCallToActionLabel,
|
|
57
58
|
onClosePressed,
|
|
58
59
|
showVersionFooter,
|
|
60
|
+
renderShowDetails = false,
|
|
59
61
|
}) => {
|
|
60
62
|
const { width } = useWindowDimensions()
|
|
61
63
|
const { t } = useTranslation()
|
|
62
64
|
const { TextTheme, ColorPallet } = useTheme()
|
|
63
|
-
const [showDetails, setShowDetails] = useState<boolean>(
|
|
65
|
+
const [showDetails, setShowDetails] = useState<boolean>(renderShowDetails)
|
|
64
66
|
const [{ showDetailsInfo }] = useServices([TOKENS.CONFIG])
|
|
65
67
|
const styles = StyleSheet.create({
|
|
66
68
|
container: {
|
|
@@ -3,18 +3,18 @@ import { useTheme } from '../../contexts/theme'
|
|
|
3
3
|
import { View } from 'react-native'
|
|
4
4
|
import { ThemedText } from '../texts/ThemedText'
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface PINHeaderProps {
|
|
7
7
|
updatePin?: boolean
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const PINHeader = ({ updatePin }: PINHeaderProps) => {
|
|
11
11
|
const { TextTheme } = useTheme()
|
|
12
12
|
const { t } = useTranslation()
|
|
13
13
|
return (
|
|
14
14
|
<View>
|
|
15
15
|
<ThemedText style={{ marginBottom: 16 }}>
|
|
16
16
|
<ThemedText style={{ fontWeight: TextTheme.bold.fontWeight }}>
|
|
17
|
-
{updatePin ? t('
|
|
17
|
+
{updatePin ? t('PINChange.RememberChangePIN') : t('PINCreate.RememberPIN')}
|
|
18
18
|
</ThemedText>{' '}
|
|
19
19
|
{t('PINCreate.PINDisclaimer')}
|
|
20
20
|
</ThemedText>
|
|
@@ -22,4 +22,4 @@ const PINCreateHeader = ({ updatePin }: PINCreateHeaderProps) => {
|
|
|
22
22
|
)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export default
|
|
25
|
+
export default PINHeader
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { View } from 'react-native'
|
|
4
|
+
import Icon from 'react-native-vector-icons/MaterialIcons'
|
|
5
|
+
|
|
6
|
+
import { useTheme } from '../../contexts/theme'
|
|
7
|
+
import { PINValidationsType } from '../../utils/PINValidation'
|
|
8
|
+
import { ThemedText } from '../texts/ThemedText'
|
|
9
|
+
|
|
10
|
+
interface PINValidationHelperProps {
|
|
11
|
+
validations: PINValidationsType[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const iconSize = 24
|
|
15
|
+
|
|
16
|
+
const PINValidationHelper: React.FC<PINValidationHelperProps> = ({ validations }) => {
|
|
17
|
+
const { t } = useTranslation()
|
|
18
|
+
const { ColorPallet } = useTheme()
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={{ marginBottom: 16 }}>
|
|
22
|
+
{validations.map((validation, index) => (
|
|
23
|
+
<View style={{ flexDirection: 'row' }} key={index}>
|
|
24
|
+
{validation.isInvalid ? (
|
|
25
|
+
<Icon
|
|
26
|
+
accessibilityLabel={t('PINCreate.Helper.ClearIcon')}
|
|
27
|
+
name="clear"
|
|
28
|
+
size={iconSize}
|
|
29
|
+
color={ColorPallet.notification.errorIcon}
|
|
30
|
+
/>
|
|
31
|
+
) : (
|
|
32
|
+
<Icon
|
|
33
|
+
accessibilityLabel={t('PINCreate.Helper.CheckIcon')}
|
|
34
|
+
name="check"
|
|
35
|
+
size={iconSize}
|
|
36
|
+
color={ColorPallet.notification.successIcon}
|
|
37
|
+
/>
|
|
38
|
+
)}
|
|
39
|
+
<ThemedText style={{ paddingLeft: 4 }}>
|
|
40
|
+
{t(`PINCreate.Helper.${validation.errorName}`, validation?.errorTextAddition)}
|
|
41
|
+
</ThemedText>
|
|
42
|
+
</View>
|
|
43
|
+
))}
|
|
44
|
+
</View>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default PINValidationHelper
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
import { useTheme } from '../../contexts/theme'
|
|
5
|
+
import { ThemedText } from '../texts/ThemedText'
|
|
6
|
+
|
|
7
|
+
const PushNotificationsContent: React.FC = () => {
|
|
8
|
+
const { t } = useTranslation()
|
|
9
|
+
const { TextTheme, Assets } = useTheme()
|
|
10
|
+
const list = [
|
|
11
|
+
t('PushNotifications.BulletOne'),
|
|
12
|
+
t('PushNotifications.BulletTwo'),
|
|
13
|
+
t('PushNotifications.BulletThree'),
|
|
14
|
+
t('PushNotifications.BulletFour'),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
const style = StyleSheet.create({
|
|
18
|
+
image: {
|
|
19
|
+
height: 200,
|
|
20
|
+
marginBottom: 20,
|
|
21
|
+
},
|
|
22
|
+
heading: {
|
|
23
|
+
marginBottom: 20,
|
|
24
|
+
},
|
|
25
|
+
listItem: {
|
|
26
|
+
...TextTheme.normal,
|
|
27
|
+
flex: 1,
|
|
28
|
+
paddingLeft: 5,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<View style={style.image}>
|
|
35
|
+
<Assets.svg.pushNotificationImg />
|
|
36
|
+
</View>
|
|
37
|
+
<ThemedText variant="headingThree" style={style.heading}>
|
|
38
|
+
{t('PushNotifications.EnableNotifications')}
|
|
39
|
+
</ThemedText>
|
|
40
|
+
<ThemedText>{t('PushNotifications.BeNotified')}</ThemedText>
|
|
41
|
+
{list.map((item, index) => (
|
|
42
|
+
<View style={{ flexDirection: 'row', marginTop: 20 }} key={index}>
|
|
43
|
+
<ThemedText>{'\u2022'}</ThemedText>
|
|
44
|
+
<ThemedText style={style.listItem}>{item}</ThemedText>
|
|
45
|
+
</View>
|
|
46
|
+
))}
|
|
47
|
+
</>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default PushNotificationsContent
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useTranslation } from 'react-i18next'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
import { useTheme } from '../../contexts/theme'
|
|
5
|
+
import { ThemedText } from '../texts/ThemedText'
|
|
6
|
+
|
|
7
|
+
const PushNotificationsDisabledContent: React.FC = () => {
|
|
8
|
+
const { t } = useTranslation()
|
|
9
|
+
const { TextTheme } = useTheme()
|
|
10
|
+
const settingsInstructions = [
|
|
11
|
+
t('PushNotifications.InstructionsOne'),
|
|
12
|
+
t('PushNotifications.InstructionsTwo'),
|
|
13
|
+
t('PushNotifications.InstructionsThree'),
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
const style = StyleSheet.create({
|
|
17
|
+
heading: {
|
|
18
|
+
marginBottom: 20,
|
|
19
|
+
},
|
|
20
|
+
listItem: {
|
|
21
|
+
...TextTheme.normal,
|
|
22
|
+
flex: 1,
|
|
23
|
+
paddingLeft: 5,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<ThemedText variant="headingThree" style={style.heading}>
|
|
30
|
+
{t('PushNotifications.EnableNotifications')}
|
|
31
|
+
</ThemedText>
|
|
32
|
+
<ThemedText>{t('PushNotifications.NotificationsOffMessage')}</ThemedText>
|
|
33
|
+
<View>
|
|
34
|
+
<ThemedText variant="bold">{t('PushNotifications.NotificationsOffTitle')}</ThemedText>
|
|
35
|
+
<ThemedText>{t('PushNotifications.NotificationsInstructionTitle')}</ThemedText>
|
|
36
|
+
{settingsInstructions.map((item, index) => (
|
|
37
|
+
<View style={{ flexDirection: 'row', marginTop: 20 }} key={index}>
|
|
38
|
+
<ThemedText>{`${index + 1}. `}</ThemedText>
|
|
39
|
+
<ThemedText style={style.listItem}>{item}</ThemedText>
|
|
40
|
+
</View>
|
|
41
|
+
))}
|
|
42
|
+
</View>
|
|
43
|
+
</>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default PushNotificationsDisabledContent
|
package/src/container-api.ts
CHANGED
|
@@ -10,32 +10,40 @@ import { Button } from './components/buttons/Button-api'
|
|
|
10
10
|
import { ReducerAction } from './contexts/reducers/store'
|
|
11
11
|
import { IHistoryManager } from './modules/history'
|
|
12
12
|
import Onboarding from './screens/Onboarding'
|
|
13
|
+
import { SplashProps } from './screens/Splash'
|
|
13
14
|
import UpdateAvailable from './screens/UpdateAvailable'
|
|
14
15
|
import { AttestationMonitor } from './types/attestation'
|
|
15
16
|
import { IVersionCheckService } from './types/version-check'
|
|
16
17
|
import { GenericFn } from './types/fn'
|
|
17
|
-
import {
|
|
18
|
+
import { OnboardingStackParams, ScreenLayoutConfig, ScreenOptionsType, OnboardingTask } from './types/navigators'
|
|
18
19
|
import { CustomNotification } from './types/notification'
|
|
19
20
|
import { Config, HistoryEventsLoggerConfig } from './types/config'
|
|
20
21
|
import { State } from './types/state'
|
|
21
22
|
import { NotificationReturnType, NotificationsInputProps } from './hooks/notifications'
|
|
22
23
|
import { NotificationListItemProps } from './components/listItems/NotificationListItem'
|
|
23
|
-
import {
|
|
24
|
+
import { PINHeaderProps } from './components/misc/PINHeader'
|
|
24
25
|
import { PINExplainerProps } from './screens/PINExplainer'
|
|
25
26
|
import { CredentialListFooterProps } from './types/credential-list-footer'
|
|
26
27
|
import { ContactListItemProps } from './components/listItems/ContactListItem'
|
|
27
28
|
import { ContactCredentialListItemProps } from './components/listItems/ContactCredentialListItem'
|
|
28
29
|
import { InlineErrorConfig } from './types/error'
|
|
29
30
|
import { BifoldLogger } from './services/logger'
|
|
31
|
+
import { AgentSetupReturnType } from './hooks/useBifoldAgentSetup'
|
|
32
|
+
import { OnboardingStackProps } from './navigators/OnboardingStack'
|
|
30
33
|
|
|
31
34
|
export type FN_ONBOARDING_DONE = (
|
|
32
35
|
dispatch: React.Dispatch<ReducerAction<unknown>>,
|
|
33
|
-
navigation: StackNavigationProp<
|
|
36
|
+
navigation: StackNavigationProp<OnboardingStackParams>
|
|
34
37
|
) => GenericFn
|
|
35
38
|
|
|
36
39
|
type LoadStateFn = (dispatch: React.Dispatch<ReducerAction<unknown>>) => Promise<void>
|
|
37
40
|
|
|
38
|
-
type GenerateOnboardingWorkflowStepsFn = (
|
|
41
|
+
type GenerateOnboardingWorkflowStepsFn = (
|
|
42
|
+
state: State,
|
|
43
|
+
config: Config,
|
|
44
|
+
termsVersion: number,
|
|
45
|
+
agent: Agent | null
|
|
46
|
+
) => Array<OnboardingTask>
|
|
39
47
|
|
|
40
48
|
type ProofRequestTemplateFn = (useDevTemplates: boolean) => Array<ProofRequestTemplate>
|
|
41
49
|
|
|
@@ -54,7 +62,8 @@ export const SCREEN_TOKENS = {
|
|
|
54
62
|
SCREEN_ONBOARDING_PAGES: 'screen.onboarding.pages',
|
|
55
63
|
SCREEN_SPLASH: 'screen.splash',
|
|
56
64
|
SCREEN_SCAN: 'screen.scan',
|
|
57
|
-
|
|
65
|
+
SCREEN_BIOMETRY: 'screen.biometry',
|
|
66
|
+
SCREEN_TOGGLE_BIOMETRY: 'screen.toggle-biometry',
|
|
58
67
|
SCREEN_PIN_EXPLAINER: 'screen.pin-explainer',
|
|
59
68
|
} as const
|
|
60
69
|
|
|
@@ -62,13 +71,17 @@ export const NAV_TOKENS = {
|
|
|
62
71
|
CUSTOM_NAV_STACK_1: 'nav.slot1',
|
|
63
72
|
} as const
|
|
64
73
|
|
|
74
|
+
export const HOOK_TOKENS = {
|
|
75
|
+
HOOK_USE_AGENT_SETUP: 'hook.useAgentSetup',
|
|
76
|
+
} as const
|
|
77
|
+
|
|
65
78
|
export const COMPONENT_TOKENS = {
|
|
66
79
|
COMPONENT_HOME_HEADER: 'component.home.header',
|
|
67
80
|
COMPONENT_HOME_NOTIFICATIONS_EMPTY_LIST: 'component.home.notifications-empty-list',
|
|
68
81
|
COMPONENT_HOME_FOOTER: 'component.home.footer',
|
|
69
82
|
COMPONENT_CRED_EMPTY_LIST: 'component.cred.empty-list',
|
|
70
83
|
COMPONENT_RECORD: 'component.record',
|
|
71
|
-
|
|
84
|
+
COMPONENT_PIN_HEADER: 'component.pin-create-header',
|
|
72
85
|
COMPONENT_CONTACT_LIST_ITEM: 'component.contact-list-item',
|
|
73
86
|
COMPONENT_CONTACT_DETAILS_CRED_LIST_ITEM: 'component.contact-details-cred-list-item',
|
|
74
87
|
COMPONENT_CONNECTION_ALERT: 'component.connection-alert',
|
|
@@ -137,6 +150,7 @@ export const TOKENS = {
|
|
|
137
150
|
...PROOF_TOKENS,
|
|
138
151
|
...COMPONENT_TOKENS,
|
|
139
152
|
...SCREEN_TOKENS,
|
|
153
|
+
...HOOK_TOKENS,
|
|
140
154
|
...NAV_TOKENS,
|
|
141
155
|
...SERVICE_TOKENS,
|
|
142
156
|
...STACK_TOKENS,
|
|
@@ -162,15 +176,17 @@ export type TokenMapping = {
|
|
|
162
176
|
[TOKENS.GROUP_BY_REFERENT]: boolean
|
|
163
177
|
[TOKENS.SCREEN_PREFACE]: React.FC
|
|
164
178
|
[TOKENS.SCREEN_UPDATE_AVAILABLE]: typeof UpdateAvailable
|
|
165
|
-
[TOKENS.STACK_ONBOARDING]: React.FC
|
|
179
|
+
[TOKENS.STACK_ONBOARDING]: React.FC<OnboardingStackProps>
|
|
166
180
|
[TOKENS.SCREEN_TERMS]: { screen: React.FC; version: boolean | string }
|
|
167
181
|
[TOKENS.SCREEN_DEVELOPER]: React.FC
|
|
168
182
|
[TOKENS.SCREEN_ONBOARDING_PAGES]: (onTutorialCompleted: GenericFn, OnboardingTheme: any) => Array<Element>
|
|
169
|
-
[TOKENS.SCREEN_SPLASH]: React.FC
|
|
183
|
+
[TOKENS.SCREEN_SPLASH]: React.FC<SplashProps>
|
|
170
184
|
[TOKENS.SCREEN_SCAN]: React.FC
|
|
171
|
-
[TOKENS.
|
|
185
|
+
[TOKENS.SCREEN_BIOMETRY]: React.FC
|
|
186
|
+
[TOKENS.SCREEN_TOGGLE_BIOMETRY]: React.FC
|
|
172
187
|
[TOKENS.SCREEN_ONBOARDING]: typeof Onboarding
|
|
173
188
|
[TOKENS.SCREEN_PIN_EXPLAINER]: React.FC<PINExplainerProps>
|
|
189
|
+
[TOKENS.HOOK_USE_AGENT_SETUP]: () => AgentSetupReturnType
|
|
174
190
|
[TOKENS.FN_ONBOARDING_DONE]: FN_ONBOARDING_DONE
|
|
175
191
|
[TOKENS.LOAD_STATE]: LoadStateFn
|
|
176
192
|
[TOKENS.COMP_BUTTON]: Button
|
|
@@ -181,7 +197,7 @@ export type TokenMapping = {
|
|
|
181
197
|
[TOKENS.NOTIFICATIONS_LIST_ITEM]: React.FC<NotificationListItemProps>
|
|
182
198
|
[TOKENS.OBJECT_SCREEN_CONFIG]: ScreenOptionsType
|
|
183
199
|
[TOKENS.OBJECT_LAYOUT_CONFIG]: ScreenLayoutConfig
|
|
184
|
-
[TOKENS.
|
|
200
|
+
[TOKENS.COMPONENT_PIN_HEADER]: React.FC<PINHeaderProps>
|
|
185
201
|
[TOKENS.CACHE_CRED_DEFS]: { did: string; id: string }[]
|
|
186
202
|
[TOKENS.CACHE_SCHEMAS]: { did: string; id: string }[]
|
|
187
203
|
[TOKENS.UTIL_LOGGER]: BifoldLogger
|
|
@@ -207,7 +223,7 @@ export type TokenMapping = {
|
|
|
207
223
|
[TOKENS.COMPONENT_CONTACT_DETAILS_CRED_LIST_ITEM]: React.FC<ContactCredentialListItemProps>
|
|
208
224
|
[TOKENS.INLINE_ERRORS]: InlineErrorConfig
|
|
209
225
|
[TOKENS.CUSTOM_NAV_STACK_1]: React.FC
|
|
210
|
-
[TOKENS.COMPONENT_CONNECTION_ALERT]: React.FC<{
|
|
226
|
+
[TOKENS.COMPONENT_CONNECTION_ALERT]: React.FC<{ connectionLabel?: string }>
|
|
211
227
|
}
|
|
212
228
|
|
|
213
229
|
export interface Container {
|