@ovok/native 1.10.0 → 1.10.2
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/index.js +13 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +17 -2
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-auth-action.js +12 -5
- package/lib/commonjs/modules/auth/hooks/use-auth-action.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-sign-in.js +4 -4
- package/lib/commonjs/modules/auth/hooks/use-sign-in.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.js +2 -10
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.js.map +1 -1
- package/lib/commonjs/modules/auth/index.js +11 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/form-phone-country-picker.js +97 -0
- package/lib/commonjs/modules/auth/profile/components/form-phone-country-picker.js.map +1 -0
- package/lib/commonjs/modules/auth/profile/components/form-phone-field.js +21 -38
- package/lib/commonjs/modules/auth/profile/components/form-phone-field.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-choice-field.js +8 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-choice-field.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-field-component.js +2 -0
- package/lib/commonjs/modules/auth/profile/components/profile-form-field-component.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +45 -35
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js +2 -0
- package/lib/commonjs/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/utils/phone-countries.js +55 -0
- package/lib/commonjs/modules/auth/profile/utils/phone-countries.js.map +1 -0
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +6 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +12 -12
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -6
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/session-errors.js +21 -0
- package/lib/commonjs/modules/auth/session/session-errors.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store.js +54 -21
- package/lib/commonjs/modules/auth/session/session-store.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js +5 -10
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +4 -9
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-in-error.js +4 -4
- package/lib/commonjs/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-out-google.js +10 -3
- package/lib/commonjs/modules/auth/utils/sign-out-google.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +2 -2
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +7 -3
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +30 -6
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider.js +12 -4
- package/lib/commonjs/modules/bt-management/components/bt-provider.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/default-permission-fallback.js +43 -3
- package/lib/commonjs/modules/bt-management/components/default-permission-fallback.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js +44 -0
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +12 -2
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js +7 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +11 -2
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js +11 -15
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js +3 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +12 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +5 -2
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +4 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +2 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-permission-status.js +2 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-permission-status.js.map +1 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/commonjs/modules/progress-ring/components/progress-ring.js +94 -0
- package/lib/commonjs/modules/progress-ring/components/progress-ring.js.map +1 -0
- package/lib/commonjs/modules/progress-ring/index.js +28 -0
- package/lib/commonjs/modules/progress-ring/index.js.map +1 -0
- package/lib/commonjs/modules/progress-ring/types/progress-ring-props.js +6 -0
- package/lib/commonjs/modules/progress-ring/types/progress-ring-props.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +15 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/flow-frame.js +163 -0
- package/lib/commonjs/modules/ui/components/flow-frame.js.map +1 -0
- package/lib/commonjs/modules/ui/components/nearby-device-prompt.js +7 -4
- package/lib/commonjs/modules/ui/components/nearby-device-prompt.js.map +1 -1
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/polyfills/index.js +12 -0
- package/lib/commonjs/polyfills/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +17 -2
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-auth-action.js +12 -5
- package/lib/module/modules/auth/hooks/use-auth-action.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +1 -1
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-sign-in.js +4 -4
- package/lib/module/modules/auth/hooks/use-sign-in.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-social-sign-in.js +2 -10
- package/lib/module/modules/auth/hooks/use-social-sign-in.js.map +1 -1
- package/lib/module/modules/auth/index.js +1 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/profile/components/form-phone-country-picker.js +92 -0
- package/lib/module/modules/auth/profile/components/form-phone-country-picker.js.map +1 -0
- package/lib/module/modules/auth/profile/components/form-phone-field.js +18 -40
- package/lib/module/modules/auth/profile/components/form-phone-field.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-choice-field.js +9 -2
- package/lib/module/modules/auth/profile/components/profile-form-choice-field.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-field-component.js +2 -0
- package/lib/module/modules/auth/profile/components/profile-form-field-component.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-provider.js +45 -35
- package/lib/module/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form.js +2 -0
- package/lib/module/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/module/modules/auth/profile/utils/phone-countries.js +49 -0
- package/lib/module/modules/auth/profile/utils/phone-countries.js.map +1 -0
- package/lib/module/modules/auth/register/components/form/inputs.js +6 -1
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +12 -12
- package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -6
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/session-errors.js +16 -0
- package/lib/module/modules/auth/session/session-errors.js.map +1 -0
- package/lib/module/modules/auth/session/session-store.js +54 -21
- package/lib/module/modules/auth/session/session-store.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +5 -10
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +4 -9
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-in-error.js +4 -4
- package/lib/module/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-out-google.js +10 -3
- package/lib/module/modules/auth/utils/sign-out-google.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +3 -3
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +7 -3
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +31 -7
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider.js +12 -4
- package/lib/module/modules/bt-management/components/bt-provider.js.map +1 -1
- package/lib/module/modules/bt-management/components/default-permission-fallback.js +43 -4
- package/lib/module/modules/bt-management/components/default-permission-fallback.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js +39 -0
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/runtime-context.js +12 -2
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js +2 -1
- package/lib/module/modules/bt-management/hooks/use-bluetooth-permission.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +11 -2
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js +11 -15
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js +3 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +5 -2
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +4 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +2 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-permission-status.js +2 -0
- package/lib/module/modules/bt-management/types/bluetooth-permission-status.js.map +1 -0
- package/lib/module/modules/helpers/form-items/form-field.js +1 -1
- package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/module/modules/progress-ring/components/progress-ring.js +88 -0
- package/lib/module/modules/progress-ring/components/progress-ring.js.map +1 -0
- package/lib/module/modules/progress-ring/index.js +5 -0
- package/lib/module/modules/progress-ring/index.js.map +1 -0
- package/lib/module/modules/progress-ring/types/progress-ring-props.js +4 -0
- package/lib/module/modules/progress-ring/types/progress-ring-props.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +15 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/flow-frame.js +157 -0
- package/lib/module/modules/ui/components/flow-frame.js.map +1 -0
- package/lib/module/modules/ui/components/nearby-device-prompt.js +7 -4
- package/lib/module/modules/ui/components/nearby-device-prompt.js.map +1 -1
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/polyfills/index.js +1 -1
- package/lib/module/polyfills/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-auth-action.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-country-picker.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-country-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-field.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-choice-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-field-component.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-field.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-props.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/utils/phone-countries.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/auth/profile/utils/phone-countries.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/session-errors.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/default-permission-fallback.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/bt-management/components/default-permission-fallback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-permission-status.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-permission-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-props.d.ts +9 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement.d.ts +5 -7
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +7 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/progress-ring/components/progress-ring.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/progress-ring/components/progress-ring.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/progress-ring/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/progress-ring/types/progress-ring-props.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/progress-ring/types/progress-ring-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/flow-frame.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/ui/components/flow-frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/nearby-device-prompt.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/type-tests/result-callback.d.ts +9 -0
- package/lib/typescript/commonjs/type-tests/result-callback.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-auth-action.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/form-phone-country-picker.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/profile/components/form-phone-country-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/profile/components/form-phone-field.d.ts +4 -2
- package/lib/typescript/module/src/modules/auth/profile/components/form-phone-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form-choice-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form-field-component.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/types/profile-form-field.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/profile/types/profile-form-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/types/profile-form-props.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/profile/types/profile-form-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/utils/phone-countries.d.ts +10 -0
- package/lib/typescript/module/src/modules/auth/profile/utils/phone-countries.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/session-errors.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/session/session-errors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/default-permission-fallback.d.ts +3 -3
- package/lib/typescript/module/src/modules/bt-management/components/default-permission-fallback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-permission.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-permission-status.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-permission-status.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-props.d.ts +9 -2
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement.d.ts +5 -7
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +7 -2
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/progress-ring/components/progress-ring.d.ts +3 -0
- package/lib/typescript/module/src/modules/progress-ring/components/progress-ring.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/progress-ring/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/progress-ring/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/progress-ring/types/progress-ring-props.d.ts +12 -0
- package/lib/typescript/module/src/modules/progress-ring/types/progress-ring-props.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/flow-frame.d.ts +23 -0
- package/lib/typescript/module/src/modules/ui/components/flow-frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/nearby-device-prompt.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/polyfills/index.d.ts +1 -1
- package/lib/typescript/module/src/polyfills/index.d.ts.map +1 -1
- package/lib/typescript/module/type-tests/result-callback.d.ts +9 -0
- package/lib/typescript/module/type-tests/result-callback.d.ts.map +1 -0
- package/package.json +5 -3
package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_formik","Yup","_interopRequireWildcard","_useShallowStableValue","_rateLimit","_resetPasswordFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","useClient","formik","useFormik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","error","
|
|
1
|
+
{"version":3,"names":["_core","require","_formik","Yup","_interopRequireWildcard","_useShallowStableValue","_rateLimit","_signInError","_resetPasswordFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","useClient","formik","useFormik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","error","parsedError","parseSignInError","isSignIn","setRateLimitFormError","setFieldError","contextValue","useShallowStableValue","typeLocked","undefined","jsx","ResetPasswordFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/reset-password/components/form/reset-password-form-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAsF,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAG,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CA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,CAAC;;QAElC;QACA,MAAMG,IAAI,GAAG;UACXC,OAAO,EAAE;QACX,CAAC;QAEDrB,SAAS,GAAGoB,IAAI,CAAC;MACnB,CAAC,CAAC,OAAOE,KAAK,EAAE;QACd,MAAMC,WAAW,GAAG,IAAAC,6BAAgB,EAACF,KAAK,EAAE;UAAEG,QAAQ,EAAE;QAAM,CAAC,CAAC;QAEhExB,OAAO,GAAGsB,WAAW,CAACD,KAAK,CAAC;QAE5B,IAAI,IAAAI,gCAAqB,EAACH,WAAW,CAACD,KAAK,EAAEJ,OAAO,CAAC,EAAE;UAErD;QACF;QAEAA,OAAO,CAACS,aAAa,CAAC,QAAQ,EAAEJ,WAAW,CAACD,KAAK,CAACD,OAAO,CAAC;MAC5D;IACF;EACF,CAAC,CAAC;EAEF,MAAMO,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IACzC,GAAGzB,MAAM;IACT0B,UAAU,EAAEhC,IAAI,KAAKiC;EACvB,CAAC,CAAC;EAEF,oBACE,IAAAvD,WAAA,CAAAwD,GAAA,EAACzD,yBAAA,CAAA0D,wBAAwB,CAACC,QAAQ;IAACC,KAAK,EAAEP,YAAa;IAAA/B,QAAA,EACpDA;EAAQ,CACwB,CAAC;AAExC,CAAC;AAACuC,OAAA,CAAAxC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toError = exports.getHttpStatus = void 0;
|
|
7
|
+
const getHttpStatus = cause => {
|
|
8
|
+
if (!cause || typeof cause !== "object") {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
const error = cause;
|
|
12
|
+
const status = error.status ?? error.statusCode ?? error.response?.status;
|
|
13
|
+
if (typeof status === "number") {
|
|
14
|
+
return status;
|
|
15
|
+
}
|
|
16
|
+
return error.cause === cause ? undefined : getHttpStatus(error.cause);
|
|
17
|
+
};
|
|
18
|
+
exports.getHttpStatus = getHttpStatus;
|
|
19
|
+
const toError = cause => cause instanceof Error ? cause : new Error(String(cause));
|
|
20
|
+
exports.toError = toError;
|
|
21
|
+
//# sourceMappingURL=session-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getHttpStatus","cause","undefined","error","status","statusCode","response","exports","toError","Error","String"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-errors.ts"],"mappings":";;;;;;AAAA,MAAMA,aAAa,GAAIC,KAAc,IAAyB;EAC5D,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACvC,OAAOC,SAAS;EAClB;EAEA,MAAMC,KAAK,GAAGF,KAKb;EAED,MAAMG,MAAM,GAAGD,KAAK,CAACC,MAAM,IAAID,KAAK,CAACE,UAAU,IAAIF,KAAK,CAACG,QAAQ,EAAEF,MAAM;EAEzE,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAOA,MAAM;EACf;EAEA,OAAOD,KAAK,CAACF,KAAK,KAAKA,KAAK,GAAGC,SAAS,GAAGF,aAAa,CAACG,KAAK,CAACF,KAAK,CAAC;AACvE,CAAC;AAACM,OAAA,CAAAP,aAAA,GAAAA,aAAA;AAEF,MAAMQ,OAAO,GAAIP,KAAc,IAC7BA,KAAK,YAAYQ,KAAK,GAAGR,KAAK,GAAG,IAAIQ,KAAK,CAACC,MAAM,CAACT,KAAK,CAAC,CAAC;AAACM,OAAA,CAAAC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getSessionStore = void 0;
|
|
7
7
|
var _logoutSession = require("./logout-session.js");
|
|
8
|
+
var _sessionErrors = require("./session-errors.js");
|
|
8
9
|
const stores = new WeakMap();
|
|
9
10
|
const normalizeSession = session => {
|
|
10
11
|
const legacy = session;
|
|
@@ -21,6 +22,7 @@ const createSessionStore = client => {
|
|
|
21
22
|
let profileRequest;
|
|
22
23
|
let sessionsRequest;
|
|
23
24
|
let logoutRequest;
|
|
25
|
+
let profileNeedsRefresh = false;
|
|
24
26
|
let authRevision = 0;
|
|
25
27
|
const store = {
|
|
26
28
|
snapshot: {
|
|
@@ -42,7 +44,8 @@ const createSessionStore = client => {
|
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
const revision = ++authRevision;
|
|
45
|
-
|
|
47
|
+
const previousSnapshot = store.snapshot;
|
|
48
|
+
if (store.snapshot.status !== "authenticated" && store.snapshot.status !== "offline") {
|
|
46
49
|
store.snapshot = {
|
|
47
50
|
...store.snapshot,
|
|
48
51
|
status: "loading",
|
|
@@ -50,7 +53,13 @@ const createSessionStore = client => {
|
|
|
50
53
|
};
|
|
51
54
|
listeners.forEach(listener => listener());
|
|
52
55
|
}
|
|
53
|
-
profileRequest ??= client.getProfileAsync().
|
|
56
|
+
profileRequest ??= (profileNeedsRefresh ? client.refetchProfile() : client.getProfileAsync()).then(profile => {
|
|
57
|
+
profileNeedsRefresh = false;
|
|
58
|
+
return profile;
|
|
59
|
+
}).catch(cause => {
|
|
60
|
+
profileNeedsRefresh = true;
|
|
61
|
+
throw cause;
|
|
62
|
+
}).finally(() => {
|
|
54
63
|
profileRequest = undefined;
|
|
55
64
|
});
|
|
56
65
|
const currentProfileRequest = profileRequest;
|
|
@@ -60,24 +69,40 @@ const createSessionStore = client => {
|
|
|
60
69
|
});
|
|
61
70
|
}
|
|
62
71
|
const currentSessionsRequest = sessionsRequest;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
|
|
73
|
+
profile
|
|
74
|
+
}), error => ({
|
|
75
|
+
error
|
|
76
|
+
})), (includeSessions && currentSessionsRequest ? currentSessionsRequest : Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
|
|
77
|
+
sessions
|
|
78
|
+
}), error => ({
|
|
79
|
+
error
|
|
80
|
+
}))]);
|
|
81
|
+
if (revision !== authRevision) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
|
|
85
|
+
const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
|
|
86
|
+
const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
|
|
87
|
+
if (!client.getActiveLogin() || (0, _sessionErrors.getHttpStatus)(error) === 401) {
|
|
68
88
|
store.snapshot = {
|
|
69
|
-
status: "
|
|
89
|
+
status: "signed-out",
|
|
90
|
+
sessions: [],
|
|
91
|
+
error: error === undefined ? undefined : (0, _sessionErrors.toError)(error)
|
|
92
|
+
};
|
|
93
|
+
} else if ("error" in profileResult) {
|
|
94
|
+
store.snapshot = {
|
|
95
|
+
status: "offline",
|
|
70
96
|
profile,
|
|
71
|
-
sessions: sessions.map(normalizeSession)
|
|
97
|
+
sessions: sessions.map(normalizeSession),
|
|
98
|
+
error: (0, _sessionErrors.toError)(profileResult.error)
|
|
72
99
|
};
|
|
73
|
-
}
|
|
74
|
-
if (revision !== authRevision) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
100
|
+
} else {
|
|
77
101
|
store.snapshot = {
|
|
78
|
-
status: "
|
|
79
|
-
|
|
80
|
-
|
|
102
|
+
status: "authenticated",
|
|
103
|
+
profile,
|
|
104
|
+
sessions: sessions.map(normalizeSession),
|
|
105
|
+
error: "error" in sessionsResult ? (0, _sessionErrors.toError)(sessionsResult.error) : undefined
|
|
81
106
|
};
|
|
82
107
|
}
|
|
83
108
|
listeners.forEach(listener => listener());
|
|
@@ -103,11 +128,19 @@ const createSessionStore = client => {
|
|
|
103
128
|
};
|
|
104
129
|
listeners.forEach(listener => listener());
|
|
105
130
|
} catch (cause) {
|
|
106
|
-
const error =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
131
|
+
const error = (0, _sessionErrors.toError)(cause);
|
|
132
|
+
if (!client.getActiveLogin() || (0, _sessionErrors.getHttpStatus)(cause) === 401) {
|
|
133
|
+
store.snapshot = {
|
|
134
|
+
status: "signed-out",
|
|
135
|
+
sessions: [],
|
|
136
|
+
error
|
|
137
|
+
};
|
|
138
|
+
} else {
|
|
139
|
+
store.snapshot = {
|
|
140
|
+
...store.snapshot,
|
|
141
|
+
error
|
|
142
|
+
};
|
|
143
|
+
}
|
|
111
144
|
listeners.forEach(listener => listener());
|
|
112
145
|
throw error;
|
|
113
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_logoutSession","require","stores","WeakMap","normalizeSession","session","legacy","id","authMethod","remoteAddress","ip","lastUpdated","lastActiveAt","createdAt","createSessionStore","client","sessionClient","listeners","Set","profileRequest","sessionsRequest","logoutRequest","authRevision","store","snapshot","status","sessions","subscribe","listener","add","delete","refresh","includeSessions","getActiveLogin","forEach","revision","error","undefined","getProfileAsync","finally","currentProfileRequest","getSessions","currentSessionsRequest","
|
|
1
|
+
{"version":3,"names":["_logoutSession","require","_sessionErrors","stores","WeakMap","normalizeSession","session","legacy","id","authMethod","remoteAddress","ip","lastUpdated","lastActiveAt","createdAt","createSessionStore","client","sessionClient","listeners","Set","profileRequest","sessionsRequest","logoutRequest","profileNeedsRefresh","authRevision","store","snapshot","status","sessions","subscribe","listener","add","delete","refresh","includeSessions","getActiveLogin","forEach","revision","previousSnapshot","error","undefined","refetchProfile","getProfileAsync","then","profile","catch","cause","finally","currentProfileRequest","getSessions","currentSessionsRequest","profileResult","sessionsResult","Promise","all","resolve","getHttpStatus","toError","map","refreshSessions","logout","logoutSession","revokeSessions","option","getSessionStore","key","existing","get","next","set","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store.ts"],"mappings":";;;;;;AAIA,IAAAA,cAAA,GAAAC,OAAA;A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GAAG,CAACJ,GAAG,EAAEG,IAAI,CAAC;EAErB,OAAOA,IAAI;AACb,CAAC;AAACE,OAAA,CAAAN,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
11
|
var _index = require("../../../../theme/index.js");
|
|
12
12
|
var _events = require("../../../session/events.js");
|
|
13
|
+
var _signInError = require("../../../utils/sign-in-error.js");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -46,14 +47,8 @@ const AppleLoginButton = ({
|
|
|
46
47
|
const data = {
|
|
47
48
|
accessToken: loginResponse.accessToken,
|
|
48
49
|
refreshToken: loginResponse.refreshToken,
|
|
49
|
-
profile:
|
|
50
|
-
|
|
51
|
-
display: loginResponse.profile.display
|
|
52
|
-
},
|
|
53
|
-
project: {
|
|
54
|
-
reference: typeof loginResponse.project.reference === "string" ? loginResponse.project.reference : loginResponse.project.reference.reference,
|
|
55
|
-
display: loginResponse.project.display
|
|
56
|
-
}
|
|
50
|
+
profile: loginResponse.profile,
|
|
51
|
+
project: loginResponse.project
|
|
57
52
|
};
|
|
58
53
|
await client.setActiveLogin(data);
|
|
59
54
|
(0, _events.notifySessionChanged)();
|
|
@@ -61,14 +56,14 @@ const AppleLoginButton = ({
|
|
|
61
56
|
} catch (cause) {
|
|
62
57
|
const error = cause;
|
|
63
58
|
if (error.code !== "ERR_REQUEST_CANCELED" && error.code !== "ERR_REQUEST_UNKNOWN") {
|
|
64
|
-
onError?.(error);
|
|
59
|
+
onError?.((0, _signInError.parseSignInError)(error).error);
|
|
65
60
|
}
|
|
66
61
|
} finally {
|
|
67
62
|
setIsLoading(false);
|
|
68
63
|
}
|
|
69
64
|
}, [client, internalId, onError, onSuccess]);
|
|
70
65
|
_react.default.useEffect(() => {
|
|
71
|
-
AppleAuthentication.isAvailableAsync().then(setIsAppleLoginAvailable).catch(onError);
|
|
66
|
+
AppleAuthentication.isAvailableAsync().then(setIsAppleLoginAvailable).catch(error => onError?.((0, _signInError.parseSignInError)(error).error));
|
|
72
67
|
}, [onError]);
|
|
73
68
|
if (!isAppleLoginAvailable) {
|
|
74
69
|
return null;
|
package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","AppleAuthentication","_interopRequireWildcard","_react","_interopRequireDefault","_reactNative","_index","_events","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AppleLoginButton","testID","internalId","onSuccess","onError","style","disabled","children","props","client","useClient","theme","useAppTheme","isAppleLoginAvailable","setIsAppleLoginAvailable","React","useState","isLoading","setIsLoading","handleAppleLogin","useCallback","credentials","signInAsync","requestedScopes","AppleAuthenticationScope","FULL_NAME","EMAIL","identityToken","authorizationCode","Error","loginResponse","appleLogin","email","data","accessToken","refreshToken","profile","
|
|
1
|
+
{"version":3,"names":["_core","require","AppleAuthentication","_interopRequireWildcard","_react","_interopRequireDefault","_reactNative","_index","_events","_signInError","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AppleLoginButton","testID","internalId","onSuccess","onError","style","disabled","children","props","client","useClient","theme","useAppTheme","isAppleLoginAvailable","setIsAppleLoginAvailable","React","useState","isLoading","setIsLoading","handleAppleLogin","useCallback","credentials","signInAsync","requestedScopes","AppleAuthenticationScope","FULL_NAME","EMAIL","identityToken","authorizationCode","Error","loginResponse","appleLogin","email","data","accessToken","refreshToken","profile","project","setActiveLogin","notifySessionChanged","cause","error","code","parseSignInError","useEffect","isAvailableAsync","then","catch","jsx","TouchableOpacity","styles","container","gap","spacing","paddingVertical","backgroundColor","borderColor","dark","colors","gray","onPress","exports","StyleSheet","create","flexDirection","alignItems","justifyContent","flexGrow","borderWidth","hairlineWidth","borderRadius","opacity"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login-button.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAAgE,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAI,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,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AACO,aAAa;IACrCC,YAAY,EAAE;EAChB,CAAC;EACDhE,QAAQ,EAAE;IACRiE,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
var _index = require("../../../../helpers/index.js");
|
|
12
12
|
var _index2 = require("../../../../theme/index.js");
|
|
13
13
|
var _events = require("../../../session/events.js");
|
|
14
|
+
var _signInError = require("../../../utils/sign-in-error.js");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
17
|
const GoogleLoginButton = ({
|
|
@@ -56,21 +57,15 @@ const GoogleLoginButton = ({
|
|
|
56
57
|
const data = {
|
|
57
58
|
accessToken: loginResponse.accessToken,
|
|
58
59
|
refreshToken: loginResponse.refreshToken,
|
|
59
|
-
profile:
|
|
60
|
-
|
|
61
|
-
display: loginResponse.profile.display
|
|
62
|
-
},
|
|
63
|
-
project: {
|
|
64
|
-
reference: typeof loginResponse.project.reference === "string" ? loginResponse.project.reference : loginResponse.project.reference.reference,
|
|
65
|
-
display: loginResponse.project.display
|
|
66
|
-
}
|
|
60
|
+
profile: loginResponse.profile,
|
|
61
|
+
project: loginResponse.project
|
|
67
62
|
};
|
|
68
63
|
await client.setActiveLogin(data);
|
|
69
64
|
(0, _events.notifySessionChanged)();
|
|
70
65
|
onSuccess?.(loginResponse);
|
|
71
66
|
} catch (error) {
|
|
72
67
|
if (!(0, _googleSignin.isCancelledResponse)(error)) {
|
|
73
|
-
onError?.(error);
|
|
68
|
+
onError?.((0, _signInError.parseSignInError)(error).error);
|
|
74
69
|
}
|
|
75
70
|
} finally {
|
|
76
71
|
setIsLoading(false);
|
package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_googleSignin","React","_interopRequireWildcard","_reactNative","_index","_index2","_events","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GoogleLoginButton","googleIosClientId","googleWebClientId","internalId","onSuccess","onError","testID","style","disabled","children","props","theme","useAppTheme","client","useClient","isConfigured","setIsConfigured","useState","isLoading","setIsLoading","isDisabled","handleGetIdToken","useCallback","hasPlayServices","GoogleSignin","Error","response","signIn","isSuccessResponse","tokens","getTokens","idToken","handleGoogleSignIn","loginResponse","googleLogin","data","accessToken","refreshToken","profile","
|
|
1
|
+
{"version":3,"names":["_core","require","_googleSignin","React","_interopRequireWildcard","_reactNative","_index","_index2","_events","_signInError","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GoogleLoginButton","googleIosClientId","googleWebClientId","internalId","onSuccess","onError","testID","style","disabled","children","props","theme","useAppTheme","client","useClient","isConfigured","setIsConfigured","useState","isLoading","setIsLoading","isDisabled","handleGetIdToken","useCallback","hasPlayServices","GoogleSignin","Error","response","signIn","isSuccessResponse","tokens","getTokens","idToken","handleGoogleSignIn","loginResponse","googleLogin","data","accessToken","refreshToken","profile","project","setActiveLogin","notifySessionChanged","error","isCancelledResponse","parseSignInError","useEffect","configure","iosClientId","webClientId","slog","jsx","TouchableOpacity","styles","container","gap","spacing","paddingVertical","backgroundColor","dark","borderColor","colors","gray","onPress","exports","StyleSheet","create","flexDirection","alignItems","justifyContent","flexGrow","borderWidth","hairlineWidth","borderRadius","opacity"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/google-login-button.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAAgE,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,C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AC,EAAE,CAACzC,iBAAiB,EAAEC,iBAAiB,CAAC,CAAC;EAE1C,oBACE,IAAAtB,WAAA,CAAAsE,GAAA,EAAC3E,YAAA,CAAA4E,gBAAgB;IAAA,GACXzC,KAAK;IACTH,KAAK,EAAE,CACL6C,MAAM,CAACC,SAAS,EAChB;MACEC,GAAG,EAAE3C,KAAK,CAAC4C,OAAO,CAAC,CAAC,CAAC;MACrBC,eAAe,EAAE7C,KAAK,CAAC4C,OAAO,CAAC,CAAC,CAAC;MACjCE,eAAe,EAAE9C,KAAK,CAAC+C,IAAI,GAAG,MAAM,GAAG,MAAM;MAC7CC,WAAW,EAAEhD,KAAK,CAAC+C,IAAI,GACnB/C,KAAK,CAACiD,MAAM,CAACC,IAAI,CAAC,GAAG,CAAC,GACtBlD,KAAK,CAACiD,MAAM,CAACC,IAAI,CAAC,GAAG;IAC3B,CAAC,EACDzC,UAAU,IAAIgC,MAAM,CAAC5C,QAAQ,EAC7BD,KAAK,CACL;IACFC,QAAQ,EAAEY,UAAW;IACrB0C,OAAO,EAAE9B,kBAAmB;IAC5B1B,MAAM,EAAEA,MAAO;IAAAG,QAAA,EAEdA;EAAQ,CACO,CAAC;AAEvB,CAAC;AAACsD,OAAA,CAAA/D,iBAAA,GAAAA,iBAAA;AAEF,MAAMoD,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,SAAS,EAAE;IACTa,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,CAAC;IACXC,WAAW,EAAEN,uBAAU,CAACO,aAAa;IACrCC,YAAY,EAAE;EAChB,CAAC;EACDhE,QAAQ,EAAE;IACRiE,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -23,14 +23,14 @@ const stringValue = (...values) => {
|
|
|
23
23
|
const value = values.find(candidate => typeof candidate === "string" && candidate.length > 0);
|
|
24
24
|
return typeof value === "string" ? value : undefined;
|
|
25
25
|
};
|
|
26
|
-
const messageKeyForStatus = (status, isMfaVerification) => {
|
|
26
|
+
const messageKeyForStatus = (status, isMfaVerification, isSignIn) => {
|
|
27
27
|
switch (status) {
|
|
28
28
|
case 400:
|
|
29
29
|
case 401:
|
|
30
|
-
return isMfaVerification ? "sign-in.mfa.invalid" : "sign-in.errors.invalid-credentials";
|
|
30
|
+
return isSignIn ? isMfaVerification ? "sign-in.mfa.invalid" : "sign-in.errors.invalid-credentials" : undefined;
|
|
31
31
|
case 403:
|
|
32
32
|
case 404:
|
|
33
|
-
return "sign-in.errors.unavailable";
|
|
33
|
+
return isSignIn ? "sign-in.errors.unavailable" : undefined;
|
|
34
34
|
case 429:
|
|
35
35
|
return "auth.rate-limit";
|
|
36
36
|
default:
|
|
@@ -50,7 +50,7 @@ const parseSignInError = (error, options = {}) => {
|
|
|
50
50
|
const code = stringValue(body?.code, nestedError?.code, root?.code);
|
|
51
51
|
const requestId = stringValue(body?.requestId, root?.requestId);
|
|
52
52
|
const fieldErrors = Array.isArray(body?.errors) ? body.errors : Array.isArray(nestedError?.errors) ? nestedError.errors : [];
|
|
53
|
-
const message = messageKeyForStatus(status, options.isMfaVerification === true) ?? (isNetworkError(error, originalMessage) ? "sign-in.errors.network" : "sign-in.errors.generic");
|
|
53
|
+
const message = messageKeyForStatus(status, options.isMfaVerification === true, options.isSignIn !== false) ?? (isNetworkError(error, originalMessage) ? "sign-in.errors.network" : "sign-in.errors.generic");
|
|
54
54
|
const signInError = new Error(message);
|
|
55
55
|
if (status !== undefined) {
|
|
56
56
|
signInError.status = status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["asRecord","value","undefined","parseJsonRecord","JSON","parse","numberValue","values","find","candidate","Number","isFinite","stringValue","length","messageKeyForStatus","status","isMfaVerification","isNetworkError","error","message","TypeError","test","parseSignInError","options","root","originalMessage","Error","response","body","data","nestedError","statusCode","code","requestId","fieldErrors","Array","isArray","errors","signInError","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-in-error.ts"],"mappings":";;;;;;AAeA,MAAMA,QAAQ,GAAIC,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,GACtCA,KAAK,GACNC,SAAS;AAEf,MAAMC,eAAe,GAAIF,KAAc,IAA8B;EACnE,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOC,SAAS;EAClB;EAEA,IAAI;IACF,OAAOF,QAAQ,CAACI,IAAI,CAACC,KAAK,CAACJ,KAAK,CAAC,CAAC;EACpC,CAAC,CAAC,MAAM;IACN,OAAOC,SAAS;EAClB;AACF,CAAC;AAED,MAAMI,WAAW,GAAGA,CAAC,GAAGC,MAAiB,KAAyB;EAChE,MAAMN,KAAK,GAAGM,MAAM,CAACC,IAAI,CACtBC,SAAS,IACR,OAAOA,SAAS,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,SAAS,CAC9D,CAAC;EAED,OAAO,OAAOR,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,SAAS;AACtD,CAAC;AAED,MAAMU,WAAW,GAAGA,CAAC,GAAGL,MAAiB,KAAyB;EAChE,MAAMN,KAAK,GAAGM,MAAM,CAACC,IAAI,CACtBC,SAAS,IAAK,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,CAACI,MAAM,GAAG,CACrE,CAAC;EAED,OAAO,OAAOZ,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,SAAS;AACtD,CAAC;AAED,MAAMY,mBAAmB,GAAGA,CAC1BC,MAA0B,EAC1BC,iBAA0B,
|
|
1
|
+
{"version":3,"names":["asRecord","value","undefined","parseJsonRecord","JSON","parse","numberValue","values","find","candidate","Number","isFinite","stringValue","length","messageKeyForStatus","status","isMfaVerification","isSignIn","isNetworkError","error","message","TypeError","test","parseSignInError","options","root","originalMessage","Error","response","body","data","nestedError","statusCode","code","requestId","fieldErrors","Array","isArray","errors","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,WAAW,CAACiB,IAAI,EAAEK,SAAS,EAAET,IAAI,EAAES,SAAS,CAAC;EAE/D,MAAMC,WAAW,GAAIC,KAAK,CAACC,OAAO,CAACR,IAAI,EAAES,MAAM,CAAC,GAC5CT,IAAI,CAACS,MAAM,GACXF,KAAK,CAACC,OAAO,CAACN,WAAW,EAAEO,MAAM,CAAC,GAChCP,WAAW,CAACO,MAAM,GAClB,EAAwB;EAE9B,MAAMlB,OAAO,GACXN,mBAAmB,CACjBC,MAAM,EACNS,OAAO,CAACR,iBAAiB,KAAK,IAAI,EAClCQ,OAAO,CAACP,QAAQ,KAAK,KACvB,CAAC,KACAC,cAAc,CAACC,KAAK,EAAEO,eAAe,CAAC,GACnC,wBAAwB,GACxB,wBAAwB,CAAC;EAE/B,MAAMa,WAAW,GAAG,IAAIZ,KAAK,CAACP,OAAO,CAAgB;EAErD,IAAIL,MAAM,KAAKb,SAAS,EAAE;IACxBqC,WAAW,CAACxB,MAAM,GAAGA,MAAM;EAC7B;EACA,IAAImB,SAAS,KAAKhC,SAAS,EAAE;IAC3BqC,WAAW,CAACL,SAAS,GAAGA,SAAS;EACnC;EACA,IAAID,IAAI,KAAK/B,SAAS,EAAE;IACtBqC,WAAW,CAACN,IAAI,GAAGA,IAAI;EACzB;EAEA,OAAO;IAAEd,KAAK,EAAEoB,WAAW;IAAEJ;EAAY,CAAC;AAC5C,CAAC;AAACK,OAAA,CAAAjB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -5,12 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.signOutGoogleIfNeeded = void 0;
|
|
7
7
|
var _googleSignin = require("@react-native-google-signin/google-signin");
|
|
8
|
+
var _index = require("../../helpers/index.js");
|
|
8
9
|
/** Clears the native Google account only when this app has one signed in. */
|
|
9
10
|
const signOutGoogleIfNeeded = async () => {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
try {
|
|
12
|
+
if (typeof _googleSignin.GoogleSignin.getCurrentUser !== "function" || !_googleSignin.GoogleSignin.getCurrentUser()) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
await _googleSignin.GoogleSignin.signOut();
|
|
16
|
+
} catch {
|
|
17
|
+
// Native provider cleanup is best-effort; do not expose provider details or
|
|
18
|
+
// prevent the app session from being cleared.
|
|
19
|
+
(0, _index.slog)(new Error("Google sign-out failed"), "google-sign-out");
|
|
12
20
|
}
|
|
13
|
-
await _googleSignin.GoogleSignin.signOut();
|
|
14
21
|
};
|
|
15
22
|
exports.signOutGoogleIfNeeded = signOutGoogleIfNeeded;
|
|
16
23
|
//# sourceMappingURL=sign-out-google.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_googleSignin","require","signOutGoogleIfNeeded","GoogleSignin","getCurrentUser","signOut","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-out-google.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA;AACO,
|
|
1
|
+
{"version":3,"names":["_googleSignin","require","_index","signOutGoogleIfNeeded","GoogleSignin","getCurrentUser","signOut","slog","Error","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-out-google.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA;AACO,MAAME,qBAAqB,GAAG,MAAAA,CAAA,KAA2B;EAC9D,IAAI;IACF,IACE,OAAOC,0BAAY,CAACC,cAAc,KAAK,UAAU,IACjD,CAACD,0BAAY,CAACC,cAAc,CAAC,CAAC,EAC9B;MACA;IACF;IAEA,MAAMD,0BAAY,CAACE,OAAO,CAAC,CAAC;EAC9B,CAAC,CAAC,MAAM;IACN;IACA;IACA,IAAAC,WAAI,EAAC,IAAIC,KAAK,CAAC,wBAAwB,CAAC,EAAE,iBAAiB,CAAC;EAC9D;AACF,CAAC;AAACC,OAAA,CAAAN,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -59,6 +59,6 @@ const catalogEntry = (name, nameKey, manufacturer, manufacturerKey, logo, credit
|
|
|
59
59
|
logo,
|
|
60
60
|
creditsForImage
|
|
61
61
|
});
|
|
62
|
-
const lepuViatomModelCatalog = _lepuDeviceNames.LEPU_DEVICE_NAMES.filter(model => model !== "Checkme" && !_lepuDeviceNames.LEPU_CATALOG_EXCLUDED_DEVICE_NAMES.includes(model)).map((model, index) => catalogEntry(model, modelKey(model, index), "Lepu Medical / Viatom", "devices.catalog.manufacturers.lepu-viatom", modelImage(model), modelCredit(model)));
|
|
63
|
-
const additionalSupportedDevices = exports.additionalSupportedDevices = [catalogEntry("TaiDoc TD4216", "devices.catalog.taidoc-td4216.name", "TaiDoc Technology Corporation", "devices.catalog.manufacturers.taidoc", _deviceImages.deviceImages.taidocTD4216DeviceImage, _supportedDeviceCatalogAssets.taidocCredit), catalogEntry("GlucoCheck Gold", "devices.catalog.glucocheck-gold.name", "GlucoCheck", "devices.catalog.manufacturers.glucocheck", _deviceImages.deviceImages.glucocheckDeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("Andesfit TEMP", "devices.catalog.andesfit-temp.name", "Andesfit", "devices.catalog.manufacturers.andesfit", _deviceImages.deviceImages.andesfitB33ADeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("FORA IR20", "devices.catalog.fora-ir20.name", "ForaCare", "devices.catalog.manufacturers.fora", _deviceImages.deviceImages.foraIR20DeviceImage, _supportedDeviceCatalogAssets.foraCredit), catalogEntry("cosinuss° Two", "devices.catalog.cosinuss-two.name", "cosinuss°", "devices.catalog.manufacturers.cosinuss", _deviceImages.deviceImages.cosinussDeviceImage, _supportedDeviceCatalogAssets.cosinussCredit), catalogEntry("FORA W550", "devices.catalog.fora-w550.name", "ForaCare", "devices.catalog.manufacturers.fora", _deviceImages.deviceImages.foraW550DeviceImage, _supportedDeviceCatalogAssets.foraCredit), catalogEntry("Transtek GBS-2012-B", "devices.catalog.transtek-gbs-2012-b.name", "Transtek Electronics", "devices.catalog.manufacturers.transtek", _deviceImages.deviceImages.telerpmDeviceImage, _supportedDeviceCatalogAssets.transtekCredit), catalogEntry("TaiDoc TD1107", "devices.catalog.taidoc-td1107.name", "TaiDoc Technology Corporation", "devices.catalog.manufacturers.taidoc", _deviceImages.deviceImages.taidocTD1107DeviceImage, _supportedDeviceCatalogAssets.taidocCredit), catalogEntry("cosinuss° c-med° alpha", "devices.catalog.cosinuss-cmed-alpha.name", "cosinuss°", "devices.catalog.manufacturers.cosinuss", _deviceImages.deviceImages.cosinussDeviceImage, _supportedDeviceCatalogAssets.cosinussCredit), catalogEntry("Pulmo80B", "devices.catalog.pulmo80b.name", "Lepu Medical", "devices.catalog.manufacturers.lepu", _deviceImages.deviceImages.sp80bDeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("
|
|
62
|
+
const lepuViatomModelCatalog = _lepuDeviceNames.LEPU_DEVICE_NAMES.filter(model => model !== "Checkme" && !_lepuDeviceNames.LEPU_CATALOG_EXCLUDED_DEVICE_NAMES.includes(model)).map((model, index) => catalogEntry(model, modelKey(model, index), "Lepu Medical / Viatom", "devices.catalog.manufacturers.lepu-viatom", modelImage(model), modelCredit(model))).filter(device => !_lepuDeviceNames.LEPU_CATALOG_HIDDEN_DEVICE_NAMES.includes(device.name));
|
|
63
|
+
const additionalSupportedDevices = exports.additionalSupportedDevices = [catalogEntry("TaiDoc TD4216", "devices.catalog.taidoc-td4216.name", "TaiDoc Technology Corporation", "devices.catalog.manufacturers.taidoc", _deviceImages.deviceImages.taidocTD4216DeviceImage, _supportedDeviceCatalogAssets.taidocCredit), catalogEntry("GlucoCheck Gold", "devices.catalog.glucocheck-gold.name", "GlucoCheck", "devices.catalog.manufacturers.glucocheck", _deviceImages.deviceImages.glucocheckDeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("Andesfit TEMP", "devices.catalog.andesfit-temp.name", "Andesfit", "devices.catalog.manufacturers.andesfit", _deviceImages.deviceImages.andesfitB33ADeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("FORA IR20", "devices.catalog.fora-ir20.name", "ForaCare", "devices.catalog.manufacturers.fora", _deviceImages.deviceImages.foraIR20DeviceImage, _supportedDeviceCatalogAssets.foraCredit), catalogEntry("cosinuss° Two", "devices.catalog.cosinuss-two.name", "cosinuss°", "devices.catalog.manufacturers.cosinuss", _deviceImages.deviceImages.cosinussDeviceImage, _supportedDeviceCatalogAssets.cosinussCredit), catalogEntry("FORA W550", "devices.catalog.fora-w550.name", "ForaCare", "devices.catalog.manufacturers.fora", _deviceImages.deviceImages.foraW550DeviceImage, _supportedDeviceCatalogAssets.foraCredit), catalogEntry("Transtek GBS-2012-B", "devices.catalog.transtek-gbs-2012-b.name", "Transtek Electronics", "devices.catalog.manufacturers.transtek", _deviceImages.deviceImages.telerpmDeviceImage, _supportedDeviceCatalogAssets.transtekCredit), catalogEntry("TaiDoc TD1107", "devices.catalog.taidoc-td1107.name", "TaiDoc Technology Corporation", "devices.catalog.manufacturers.taidoc", _deviceImages.deviceImages.taidocTD1107DeviceImage, _supportedDeviceCatalogAssets.taidocCredit), catalogEntry("cosinuss° c-med° alpha", "devices.catalog.cosinuss-cmed-alpha.name", "cosinuss°", "devices.catalog.manufacturers.cosinuss", _deviceImages.deviceImages.cosinussDeviceImage, _supportedDeviceCatalogAssets.cosinussCredit), catalogEntry("Pulmo80B", "devices.catalog.pulmo80b.name", "Lepu Medical", "devices.catalog.manufacturers.lepu", _deviceImages.deviceImages.sp80bDeviceImage, _supportedDeviceCatalogAssets.bundledAssetCredit), catalogEntry("AliveCor KardiaMobile", "devices.catalog.alivecor-kardiamobile.name", "AliveCor", "devices.catalog.manufacturers.alivecor", _deviceImages.deviceImages.alivecorDeviceImage, _supportedDeviceCatalogAssets.alivecorCredit), catalogEntry("TeleBGM Gen1 BLE", "devices.catalog.telebgm-gen1.name", "TaiDoc Technology Corporation", "devices.catalog.manufacturers.taidoc", _deviceImages.deviceImages.bgmDeviceImage, _supportedDeviceCatalogAssets.taidocCredit), ...lepuViatomModelCatalog];
|
|
64
64
|
//# sourceMappingURL=supported-device-catalog-entries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lepuDeviceNames","require","_babySleepClipCatalogAsset","_deviceImages","_supportedDeviceCatalogAssets","modelKey","model","index","toLowerCase","replace","modelImage","babySleepClipImage","viatomR20Image","viatomR200Image","test","viatomBp3Image","viatomEr1Image","viatomF4Image","viatomO2RingImage","modelCredit","babySleepClipImageCredit","viatomR20Credit","viatomR200Credit","viatomBp3Credit","viatomEcgCredit","viatomBodyScaleCredit","viatomOximeterCredit","catalogEntry","name","nameKey","manufacturer","manufacturerKey","logo","creditsForImage","lepuViatomModelCatalog","LEPU_DEVICE_NAMES","filter","LEPU_CATALOG_EXCLUDED_DEVICE_NAMES","includes","map","additionalSupportedDevices","exports","deviceImages","taidocTD4216DeviceImage","taidocCredit","glucocheckDeviceImage","bundledAssetCredit","andesfitB33ADeviceImage","foraIR20DeviceImage","foraCredit","cosinussDeviceImage","cosinussCredit","foraW550DeviceImage","telerpmDeviceImage","transtekCredit","taidocTD1107DeviceImage","sp80bDeviceImage","
|
|
1
|
+
{"version":3,"names":["_lepuDeviceNames","require","_babySleepClipCatalogAsset","_deviceImages","_supportedDeviceCatalogAssets","modelKey","model","index","toLowerCase","replace","modelImage","babySleepClipImage","viatomR20Image","viatomR200Image","test","viatomBp3Image","viatomEr1Image","viatomF4Image","viatomO2RingImage","modelCredit","babySleepClipImageCredit","viatomR20Credit","viatomR200Credit","viatomBp3Credit","viatomEcgCredit","viatomBodyScaleCredit","viatomOximeterCredit","catalogEntry","name","nameKey","manufacturer","manufacturerKey","logo","creditsForImage","lepuViatomModelCatalog","LEPU_DEVICE_NAMES","filter","LEPU_CATALOG_EXCLUDED_DEVICE_NAMES","includes","map","device","LEPU_CATALOG_HIDDEN_DEVICE_NAMES","additionalSupportedDevices","exports","deviceImages","taidocTD4216DeviceImage","taidocCredit","glucocheckDeviceImage","bundledAssetCredit","andesfitB33ADeviceImage","foraIR20DeviceImage","foraCredit","cosinussDeviceImage","cosinussCredit","foraW550DeviceImage","telerpmDeviceImage","transtekCredit","taidocTD1107DeviceImage","sp80bDeviceImage","alivecorDeviceImage","alivecorCredit","bgmDeviceImage"],"sourceRoot":"../../../../../src","sources":["modules/bt-device/constants/supported-device-catalog-entries.ts"],"mappings":";;;;;;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AAMA,IAAAC,0BAAA,GAAAD,OAAA;AAIA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AAqBA,MAAMI,QAAQ,GAAGA,CAACC,KAAa,EAAEC,KAAa,KAC5C,+BAA+BA,KAAK,IAAID,KAAK,CAC1CE,WAAW,CAAC,CAAC,CACbC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAC3BA,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE;AAE5B,MAAMC,UAAU,GAAIJ,KAAa,IAAa;EAC5C,IAAIA,KAAK,KAAK,UAAU,EAAE;IACxB,OAAOK,6CAAkB;EAC3B;EAEA,IAAIL,KAAK,KAAK,KAAK,EAAE;IACnB,OAAOM,4CAAc;EACvB;EAEA,IAAIN,KAAK,KAAK,MAAM,EAAE;IACpB,OAAOO,6CAAe;EACxB;EAEA,IAAI,MAAM,CAACC,IAAI,CAACR,KAAK,CAAC,EAAE;IACtB,OAAOS,4CAAc;EACvB;EAEA,IAAI,WAAW,CAACD,IAAI,CAACR,KAAK,CAAC,EAAE;IAC3B,OAAOU,4CAAc;EACvB;EAEA,IAAI,wBAAwB,CAACF,IAAI,CAACR,KAAK,CAAC,EAAE;IACxC,OAAOW,2CAAa;EACtB;EAEA,OAAOC,+CAAiB;AAC1B,CAAC;AAED,MAAMC,WAAW,GAAIb,KAAa,IAAa;EAC7C,IAAIA,KAAK,KAAK,UAAU,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kB,EAClB,mCAAmC,EACnC,+BAA+B,EAC/B,sCAAsC,EACtCiB,0BAAY,CAACiB,cAAc,EAC3Bf,0CACF,CAAC,EACD,GAAGZ,sBAAsB,CACoB","ignoreList":[]}
|
|
@@ -603,7 +603,6 @@ const definitionsFor = name => {
|
|
|
603
603
|
"BBSM BS1": _integratedDevices.IntegratedDevices.VIATOM_BBSM_BS1,
|
|
604
604
|
"BBSM S3": _integratedDevices.IntegratedDevices.BBSM_S3,
|
|
605
605
|
"Viatom F4 / Lescale": _integratedDevices.IntegratedDevices.F4,
|
|
606
|
-
"Lepu Le S5": _integratedDevices.IntegratedDevices.LEPU_F4_SCALE,
|
|
607
606
|
"Le S5": _integratedDevices.IntegratedDevices.S5,
|
|
608
607
|
"Lescale F3": _integratedDevices.IntegratedDevices.LEPU_F4_SCALE,
|
|
609
608
|
"Lescale F4P": _integratedDevices.IntegratedDevices.LEPU_F4_SCALE,
|
|
@@ -653,10 +652,15 @@ const definitionsFor = name => {
|
|
|
653
652
|
/** One joined catalog for apps that need names, artwork and ready-made accept-list entries. */
|
|
654
653
|
const supportedDevices = exports.supportedDevices = Devices.map(device => {
|
|
655
654
|
const definitions = definitionsFor(device.name);
|
|
655
|
+
const isLepuWeightScale = device.manufacturerKey === "devices.catalog.manufacturers.lepu-viatom" && definitions.measurementTypes.includes(_core.MeasurementTypeKey.bodyWeight);
|
|
656
656
|
return {
|
|
657
657
|
...device,
|
|
658
|
-
|
|
659
|
-
...
|
|
658
|
+
...definitions,
|
|
659
|
+
...(isLepuWeightScale ? {
|
|
660
|
+
logo: _supportedDeviceCatalogAssets.viatomF4Image,
|
|
661
|
+
creditsForImage: _supportedDeviceCatalogAssets.viatomBodyScaleCredit
|
|
662
|
+
} : {}),
|
|
663
|
+
id: customId(device.name)
|
|
660
664
|
};
|
|
661
665
|
}).filter(device => device.acceptedDevices.length > 0);
|
|
662
666
|
const SUPPORTED_DEVICES = exports.SUPPORTED_DEVICES = supportedDevices;
|