@ovok/native 1.10.1 → 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 +17 -57
- 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 +4 -0
- package/lib/commonjs/modules/auth/profile/components/profile-form-choice-field.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.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-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/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/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/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 +10 -55
- 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 +5 -1
- package/lib/module/modules/auth/profile/components/profile-form-choice-field.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-provider.js +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-provider.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-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/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/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/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 +1 -6
- 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-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-field.d.ts +4 -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-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/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/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 +1 -6
- 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-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/types/profile-form-field.d.ts +4 -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-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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_formik","require","_libphonenumberJs","React","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativePaper","_index","_profileFormContext","_phone","_phoneCountries","_formPhoneCountryPicker","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FormPhoneField","name","fieldName","label","defaultCountry","countryName","disabled","testID","i18n","useTranslation","theme","useAppTheme","language","phoneCountries","useMemo","getPhoneCountries","values","errors","touched","setFieldValue","setFieldTouched","useContext","ProfileFormContext","storedValue","getIn","countryFieldName","phoneCountryFieldName","storedCountry","parsedStoredValue","parsePhoneNumberFromString","parsedStoredNational","formatNational","country","setCountry","useState","draft","setDraft","lastInputValue","useRef","error","useEffect","current","handlePhoneChange","value","e164Value","toPhoneE164","handleCountryChange","item","handleBlur","parsed","number","countryLabel","find","jsxs","View","style","gap","spacing","children","jsx","FormPhoneCountryPicker","countries","onChange","searchPlaceholder","undefined","TextInput","mode","editable","keyboardType","autoCapitalize","accessibilityLabel","onChangeText","onBlur","roundness","borderRadius","width","accessibilityHint","HelperText","type","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/form-phone-field.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAV,OAAA;AAMA,IAAAW,uBAAA,GAAAX,OAAA;AAAqE,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAG,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,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,CAA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CAAC,CAAC;QAAE,CAAE;QAC5CnB,KAAK,EAAE;UAAEoB,KAAK,EAAE;QAAO,CAAE;QACzBC,iBAAiB,EAAEzB;MAAa,CACjC,CAAC;IAAA,CACE,CAAC,EACNZ,KAAK,gBAAG,IAAA3D,WAAA,CAAA+E,GAAA,EAACrF,iBAAA,CAAAuG,UAAU;MAACC,IAAI,EAAC,OAAO;MAAApB,QAAA,EAAE5E,CAAC,CAACyD,KAAK;IAAC,CAAa,CAAC,GAAG,IAAI;EAAA,CAC5D,CAAC;AAEX,CAAC;AAACwC,OAAA,CAAA/E,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -53,6 +53,10 @@ const ProfileFormChoiceField = ({
|
|
|
53
53
|
disabled: disabled,
|
|
54
54
|
testID: testID ? `${testID}-${option.value}` : undefined,
|
|
55
55
|
position: "leading",
|
|
56
|
+
style: {
|
|
57
|
+
marginLeft: _reactNative.Platform.OS === "android" ? -8 : -6,
|
|
58
|
+
paddingHorizontal: 0
|
|
59
|
+
},
|
|
56
60
|
labelStyle: {
|
|
57
61
|
textAlign: "left"
|
|
58
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_formik","require","React","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativePaper","_index","_profileFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormChoiceField","name","label","options","disabled","testID","theme","useAppTheme","useTranslation","values","errors","touched","setFieldValue","setFieldTouched","useContext","ProfileFormContext","value","getIn","error","jsxs","View","style","gap","spacing","children","jsx","Text","variant","RadioButton","Group","onValueChange","nextValue","map","option","Item","undefined","position","labelStyle","textAlign","HelperText","type","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-choice-field.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBA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K,EAAE+B,MAAM,CAAC/B,KAAM;QACpBc,KAAK,EAAEiB,MAAM,CAACjB,KAAM;QACpBZ,QAAQ,EAAEA,QAAS;QACnBC,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAI4B,MAAM,CAACjB,KAAK,EAAE,GAAGmB,SAAU;QACzDC,QAAQ,EAAC,SAAS;
|
|
1
|
+
{"version":3,"names":["_formik","require","React","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativePaper","_index","_profileFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormChoiceField","name","label","options","disabled","testID","theme","useAppTheme","useTranslation","values","errors","touched","setFieldValue","setFieldTouched","useContext","ProfileFormContext","value","getIn","error","jsxs","View","style","gap","spacing","children","jsx","Text","variant","RadioButton","Group","onValueChange","nextValue","map","option","Item","undefined","position","marginLeft","Platform","OS","paddingHorizontal","labelStyle","textAlign","HelperText","type","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-choice-field.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAAsE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,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,EAA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nBE,KAAK,gBAAG,IAAAtC,WAAA,CAAA6C,GAAA,EAAChD,iBAAA,CAAAkE,UAAU;MAACC,IAAI,EAAC,OAAO;MAAApB,QAAA,EAAE1C,CAAC,CAACoC,KAAK;IAAC,CAAa,CAAC,GAAG,IAAI;EAAA,CAC5D,CAAC;AAEX,CAAC;AAAC2B,OAAA,CAAA7C,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -95,7 +95,7 @@ const ProfileFormProvider = ({
|
|
|
95
95
|
});
|
|
96
96
|
const response = await client.patchResource("Patient", activeProfile?.id ?? "", operations.filter(op => op.path !== "/submit"));
|
|
97
97
|
client.refetchProfile();
|
|
98
|
-
onSuccess?.(response, submittedValues);
|
|
98
|
+
await onSuccess?.(response, submittedValues);
|
|
99
99
|
} catch (error) {
|
|
100
100
|
if (error instanceof Error) {
|
|
101
101
|
formikHelpers.setFieldError("submit", error.message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_formik","_libphonenumberJs","_react","_interopRequireDefault","Yup","_interopRequireWildcard","_useShallowStableValue","_profileFormContext","_phone","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","useClient","submitInProgress","React","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","toPhoneE164","defaultCountry","name","phoneCountryFieldName","parsePhoneNumberFromString","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","isPhoneValidForCountry","object","shape","formik","useFormik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","getPatchOperationType","path","includes","split","filter","Boolean","join","response","patchResource","id","error","Error","setFieldError","message","contextValue","useShallowStableValue","jsx","ProfileFormContext","Provider","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-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jB,aAAa,EAAEkB,EAAE,IAAI,EAAE,EACvBd,UAAU,CAACS,MAAM,
|
|
1
|
+
{"version":3,"names":["_core","require","_formik","_libphonenumberJs","_react","_interopRequireDefault","Yup","_interopRequireWildcard","_useShallowStableValue","_profileFormContext","_phone","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","useClient","submitInProgress","React","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","toPhoneE164","defaultCountry","name","phoneCountryFieldName","parsePhoneNumberFromString","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","isPhoneValidForCountry","object","shape","formik","useFormik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","getPatchOperationType","path","includes","split","filter","Boolean","join","response","patchResource","id","error","Error","setFieldError","message","contextValue","useShallowStableValue","jsx","ProfileFormContext","Provider","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-provider.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,GAAA,GAAAC,uBAAA,CAAAN,OAAA;AAEA,IAAAO,sBAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AAGA,IAAAS,MAAA,GAAAT,OAAA;AAIwB,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAM,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,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AAC,CAAC;EAEF,MAAM0B,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IAAE,GAAGhC;EAAO,CAAC,CAAC;EAEzD,oBACE,IAAAvD,WAAA,CAAAwF,GAAA,EAAC1F,mBAAA,CAAA2F,kBAAkB,CAACC,QAAQ;IAACtD,KAAK,EAAEkD,YAAa;IAAAjE,QAAA,EAC9CA;EAAQ,CACkB,CAAC;AAElC,CAAC;AAACsE,OAAA,CAAAvE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPhoneCountries = void 0;
|
|
7
|
+
var _countriesList = require("countries-list");
|
|
8
|
+
var isoCountries = _interopRequireWildcard(require("i18n-iso-countries"));
|
|
9
|
+
var _de = _interopRequireDefault(require("i18n-iso-countries/langs/de.json"));
|
|
10
|
+
var _libphonenumberJs = require("libphonenumber-js");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
13
|
+
isoCountries.registerLocale(_de.default);
|
|
14
|
+
const phoneCountriesByLanguage = new Map();
|
|
15
|
+
const getPhoneCountries = (language, countryName) => {
|
|
16
|
+
if (!countryName) {
|
|
17
|
+
const cached = phoneCountriesByLanguage.get(language);
|
|
18
|
+
if (cached) {
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const DisplayNames = Intl.DisplayNames;
|
|
23
|
+
const languageCode = language.split(/[-_]/)[0]?.toLowerCase() ?? "en";
|
|
24
|
+
let displayNames;
|
|
25
|
+
try {
|
|
26
|
+
displayNames = DisplayNames ? new DisplayNames([language], {
|
|
27
|
+
type: "region"
|
|
28
|
+
}) : undefined;
|
|
29
|
+
} catch {
|
|
30
|
+
displayNames = undefined;
|
|
31
|
+
}
|
|
32
|
+
const phoneCountries = (0, _libphonenumberJs.getCountries)().filter(code => Boolean(_countriesList.countries[code])).map(code => {
|
|
33
|
+
const localizedName = countryName?.(code, language);
|
|
34
|
+
const displayName = languageCode === "de" ? isoCountries.getName(code, "de") : displayNames?.of(code);
|
|
35
|
+
const fallbackName = _countriesList.countries[code]?.name ?? code;
|
|
36
|
+
const name = localizedName || displayName || fallbackName;
|
|
37
|
+
return {
|
|
38
|
+
value: code,
|
|
39
|
+
label: `${name} (+${(0, _libphonenumberJs.getCountryCallingCode)(code)})`
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
let collator;
|
|
43
|
+
try {
|
|
44
|
+
collator = new Intl.Collator(language);
|
|
45
|
+
} catch {
|
|
46
|
+
collator = new Intl.Collator();
|
|
47
|
+
}
|
|
48
|
+
phoneCountries.sort((first, second) => collator.compare(first.label, second.label));
|
|
49
|
+
if (!countryName) {
|
|
50
|
+
phoneCountriesByLanguage.set(language, phoneCountries);
|
|
51
|
+
}
|
|
52
|
+
return phoneCountries;
|
|
53
|
+
};
|
|
54
|
+
exports.getPhoneCountries = getPhoneCountries;
|
|
55
|
+
//# sourceMappingURL=phone-countries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_countriesList","require","isoCountries","_interopRequireWildcard","_de","_interopRequireDefault","_libphonenumberJs","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","registerLocale","germanCountryNames","phoneCountriesByLanguage","Map","getPhoneCountries","language","countryName","cached","DisplayNames","Intl","languageCode","split","toLowerCase","displayNames","type","undefined","phoneCountries","getCountries","filter","code","Boolean","countries","map","localizedName","displayName","getName","of","fallbackName","name","value","label","getCountryCallingCode","collator","Collator","sort","first","second","compare","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/utils/phone-countries.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAI2B,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAI,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,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAA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fd,YAAY,KAAK,IAAI,GACjBlC,YAAY,CAACiD,OAAO,CAACN,IAAI,EAAE,IAAI,CAAC,GAChCN,YAAY,EAAEa,EAAE,CAACP,IAAI,CAAC;IAE5B,MAAMQ,YAAY,GAAGN,wBAAS,CAACF,IAAI,CAAiB,EAAES,IAAI,IAAIT,IAAI;IAClE,MAAMS,IAAI,GAAGL,aAAa,IAAIC,WAAW,IAAIG,YAAY;IAEzD,OAAO;MACLE,KAAK,EAAEV,IAAI;MACXW,KAAK,EAAE,GAAGF,IAAI,MAAM,IAAAG,uCAAqB,EAACZ,IAAI,CAAC;IACjD,CAAC;EACH,CAAC,CAAC;EAEJ,IAAIa,QAAuB;EAE3B,IAAI;IACFA,QAAQ,GAAG,IAAIvB,IAAI,CAACwB,QAAQ,CAAC5B,QAAQ,CAAC;EACxC,CAAC,CAAC,MAAM;IACN2B,QAAQ,GAAG,IAAIvB,IAAI,CAACwB,QAAQ,CAAC,CAAC;EAChC;EAEAjB,cAAc,CAACkB,IAAI,CAAC,CAACC,KAAK,EAAEC,MAAM,KAChCJ,QAAQ,CAACK,OAAO,CAACF,KAAK,CAACL,KAAK,EAAEM,MAAM,CAACN,KAAK,CAC5C,CAAC;EAED,IAAI,CAACxB,WAAW,EAAE;IAChBJ,wBAAwB,CAACR,GAAG,CAACW,QAAQ,EAAEW,cAAc,CAAC;EACxD;EAEA,OAAOA,cAAc;AACvB,CAAC;AAACsB,OAAA,CAAAlC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -60,6 +60,7 @@ const Inputs = ({
|
|
|
60
60
|
context: _registerFormContext.RegisterFormContext,
|
|
61
61
|
...inputProps,
|
|
62
62
|
inputRef: fullNameRef,
|
|
63
|
+
autoCapitalize: inputProps?.autoCapitalize ?? "words",
|
|
63
64
|
autoFocus: inputProps?.autoFocus ?? true,
|
|
64
65
|
returnKeyType: inputProps?.returnKeyType ?? "next",
|
|
65
66
|
onChangeText: fullName => {
|
|
@@ -84,6 +85,7 @@ const Inputs = ({
|
|
|
84
85
|
context: _registerFormContext.RegisterFormContext,
|
|
85
86
|
...inputProps,
|
|
86
87
|
inputRef: nameRef,
|
|
88
|
+
autoCapitalize: inputProps?.autoCapitalize ?? "words",
|
|
87
89
|
autoFocus: inputProps?.autoFocus ?? !defaultValues?.name,
|
|
88
90
|
returnKeyType: inputProps?.returnKeyType ?? "next",
|
|
89
91
|
onSubmitEditing: event => {
|
|
@@ -100,6 +102,7 @@ const Inputs = ({
|
|
|
100
102
|
context: _registerFormContext.RegisterFormContext,
|
|
101
103
|
...inputProps,
|
|
102
104
|
inputRef: surnameRef,
|
|
105
|
+
autoCapitalize: inputProps?.autoCapitalize ?? "words",
|
|
103
106
|
autoFocus: inputProps?.autoFocus ?? (!!defaultValues?.name && !defaultValues?.surname),
|
|
104
107
|
returnKeyType: inputProps?.returnKeyType ?? "next",
|
|
105
108
|
onSubmitEditing: event => {
|
|
@@ -114,10 +117,10 @@ const Inputs = ({
|
|
|
114
117
|
label: t("sign-in.email"),
|
|
115
118
|
keyboardType: "email-address",
|
|
116
119
|
name: "email",
|
|
117
|
-
autoCapitalize: "none",
|
|
118
120
|
context: _registerFormContext.RegisterFormContext,
|
|
119
121
|
...inputProps,
|
|
120
122
|
inputRef: emailRef,
|
|
123
|
+
autoCapitalize: "none",
|
|
121
124
|
autoFocus: inputProps?.autoFocus ?? (nameField === "single" ? !!defaultValues?.fullName || !!defaultValues?.name && !!defaultValues?.surname : !!defaultValues?.name && !!defaultValues?.surname),
|
|
122
125
|
returnKeyType: inputProps?.returnKeyType ?? "next",
|
|
123
126
|
onSubmitEditing: event => {
|
|
@@ -144,6 +147,7 @@ const Inputs = ({
|
|
|
144
147
|
}),
|
|
145
148
|
...inputProps,
|
|
146
149
|
inputRef: passwordRef,
|
|
150
|
+
autoCapitalize: "none",
|
|
147
151
|
autoFocus: inputProps?.autoFocus ?? (!!defaultValues?.name && !!defaultValues?.surname && !!defaultValues?.email && !defaultValues?.password),
|
|
148
152
|
returnKeyType: inputProps?.returnKeyType ?? (defaultValues?.passwordConfirm || defaultValues?.password ? "done" : "next"),
|
|
149
153
|
onSubmitEditing: event => {
|
|
@@ -170,6 +174,7 @@ const Inputs = ({
|
|
|
170
174
|
}),
|
|
171
175
|
...inputProps,
|
|
172
176
|
inputRef: passwordConfirmRef,
|
|
177
|
+
autoCapitalize: "none",
|
|
173
178
|
autoFocus: inputProps?.autoFocus ?? (!!defaultValues?.name && !!defaultValues?.surname && !!defaultValues?.email && !!defaultValues?.password && !defaultValues?.passwordConfirm),
|
|
174
179
|
returnKeyType: inputProps?.returnKeyType ?? "done",
|
|
175
180
|
onSubmitEditing: event => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_iconsaxReactNativejs","require","React","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativePaper","_index","_index2","_registerFormContext","_useRegisterForm","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Inputs","testID","inputProps","style","useTranslation","theme","useAppTheme","defaultValues","handleSubmit","setFieldValue","nameField","toRegisterNames","useRegisterForm","showPassword","setShowPassword","useState","showPasswordConfirm","setShowPasswordConfirm","nameRef","useRef","fullNameRef","surnameRef","emailRef","passwordRef","passwordConfirmRef","submitOrFocus","useCallback","refs","next","find","ref","current","focus","jsxs","View","gap","spacing","children","jsx","Conditional","condition","fullName","name","surname","FormField","label","context","RegisterFormContext","inputRef","autoFocus","returnKeyType","onChangeText","names","onSubmitEditing","event","containerStyle","email","keyboardType","
|
|
1
|
+
{"version":3,"names":["_iconsaxReactNativejs","require","React","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativePaper","_index","_index2","_registerFormContext","_useRegisterForm","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Inputs","testID","inputProps","style","useTranslation","theme","useAppTheme","defaultValues","handleSubmit","setFieldValue","nameField","toRegisterNames","useRegisterForm","showPassword","setShowPassword","useState","showPasswordConfirm","setShowPasswordConfirm","nameRef","useRef","fullNameRef","surnameRef","emailRef","passwordRef","passwordConfirmRef","submitOrFocus","useCallback","refs","next","find","ref","current","focus","jsxs","View","gap","spacing","children","jsx","Conditional","condition","fullName","name","surname","FormField","label","context","RegisterFormContext","inputRef","autoCapitalize","autoFocus","returnKeyType","onChangeText","names","onSubmitEditing","event","containerStyle","email","keyboardType","password","secureTextEntry","maxLength","right","TextInput","Icon","icon","props","Eye","EyeSlash","onPress","prev","passwordConfirm","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/inputs.tsx"],"mappings":";;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AAAgE,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAE,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,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,C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oB;QAC7Bc,SAAS,EAAE,EAAG;QACdC,KAAK,eACH,IAAAlF,WAAA,CAAA0D,GAAA,EAAC/D,iBAAA,CAAAwF,SAAS,CAACC,IAAI;UACbC,IAAI,EAAGC,KAAK,IACV,CAAClD,mBAAmB,gBAClB,IAAApC,WAAA,CAAA0D,GAAA,EAACrE,qBAAA,CAAAkG,GAAG;YAAA,GAAKD;UAAK,CAAG,CAAC,gBAElB,IAAAtF,WAAA,CAAA0D,GAAA,EAACrE,qBAAA,CAAAmG,QAAQ;YAAA,GAAKF;UAAK,CAAG,CAEzB;UACDG,OAAO,EAAEA,CAAA,KAAMpD,sBAAsB,CAAEqD,IAAI,IAAK,CAACA,IAAI;QAAE,CACxD,CACF;QAAA,GACGpE,UAAU;QACd8C,QAAQ,EAAExB,kBAAmB;QAC7ByB,cAAc,EAAC,MAAM;QACrBC,SAAS,EACPhD,UAAU,EAAEgD,SAAS,KACpB,CAAC,CAAC3C,aAAa,EAAEmC,IAAI,IACpB,CAAC,CAACnC,aAAa,EAAEoC,OAAO,IACxB,CAAC,CAACpC,aAAa,EAAEkD,KAAK,IACtB,CAAC,CAAClD,aAAa,EAAEoD,QAAQ,IACzB,CAACpD,aAAa,EAAEgE,eAAe,CAClC;QACDpB,aAAa,EAAEjD,UAAU,EAAEiD,aAAa,IAAI,MAAO;QACnDG,eAAe,EAAGC,KAAK,IAAK;UAC1BrD,UAAU,EAAEoD,eAAe,GAAGC,KAAK,CAAC;UACpC,KAAK/C,YAAY,CAAC,CAAC;QACrB,CAAE;QACFL,KAAK,EAAE,CAACD,UAAU,EAAEsD,cAAc;MAAE,CACrC;IAAC,CACS,CAAC;EAAA,CACV,CAAC;AAEX,CAAC;AAACgB,OAAA,CAAAxE,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -8,9 +8,9 @@ var _core = require("@ovok/core");
|
|
|
8
8
|
var _formik = require("formik");
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _useShallowStableValue = require("../../../../helpers/hooks/use-shallow-stable-value.js");
|
|
11
|
-
var _safeJsonParse = require("../../../../helpers/utils/safe-json-parse.js");
|
|
12
11
|
var _events = require("../../../session/events.js");
|
|
13
12
|
var _rateLimit = require("../../../utils/rate-limit.js");
|
|
13
|
+
var _signInError = require("../../../utils/sign-in-error.js");
|
|
14
14
|
var _registerFormContext = require("../../contexts/register-form-context.js");
|
|
15
15
|
var _createRegisterValidationSchema = require("../../utils/create-register-validation-schema.js");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -77,25 +77,25 @@ const RegisterFormProvider = ({
|
|
|
77
77
|
const data = {
|
|
78
78
|
accessToken: registerResponse.accessToken,
|
|
79
79
|
refreshToken: registerResponse.refreshToken,
|
|
80
|
-
profile: registerResponse.profile
|
|
81
|
-
project: registerResponse.project
|
|
80
|
+
profile: registerResponse.profile,
|
|
81
|
+
project: registerResponse.project
|
|
82
82
|
};
|
|
83
83
|
await client.setActiveLogin(data);
|
|
84
84
|
(0, _events.notifySessionChanged)();
|
|
85
85
|
onSuccess?.(registerResponse);
|
|
86
86
|
} catch (error) {
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
const parsedError = (0, _signInError.parseSignInError)(error, {
|
|
88
|
+
isSignIn: false
|
|
89
|
+
});
|
|
90
|
+
onError?.(parsedError.error);
|
|
91
|
+
if ((0, _rateLimit.setRateLimitFormError)(parsedError.error, formikHelpers)) {
|
|
89
92
|
return;
|
|
90
93
|
}
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const
|
|
94
|
-
const fieldErrors = parsedError?.error?.errors ?? [];
|
|
95
|
-
const emailError = fieldErrors.find(error => error.path.includes("email"))?.message;
|
|
96
|
-
const passwordError = fieldErrors.find(error => error.path.includes("password"))?.message;
|
|
94
|
+
const fieldErrors = parsedError.fieldErrors;
|
|
95
|
+
const emailError = fieldErrors.find(fieldError => fieldError.path.includes("email"))?.message;
|
|
96
|
+
const passwordError = fieldErrors.find(fieldError => fieldError.path.includes("password"))?.message;
|
|
97
97
|
if (!emailError && !passwordError) {
|
|
98
|
-
formikHelpers.setFieldError("submit",
|
|
98
|
+
formikHelpers.setFieldError("submit", parsedError.error.message);
|
|
99
99
|
}
|
|
100
100
|
formikHelpers.setFieldError("email", emailError);
|
|
101
101
|
formikHelpers.setFieldError("password", passwordError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_formik","_react","_interopRequireDefault","_useShallowStableValue","
|
|
1
|
+
{"version":3,"names":["_core","require","_formik","_react","_interopRequireDefault","_useShallowStableValue","_events","_rateLimit","_signInError","_registerFormContext","_createRegisterValidationSchema","_jsxRuntime","e","__esModule","default","isClinicianInviteStep","response","nextStep","RegisterFormProvider","children","customValidations","defaultValues","tenantCode","continueAsPatientToken","nameField","toRegisterNames","onSubmit","onSuccess","onError","onNextStep","client","useClient","singleName","registerValidationSchema","React","useMemo","createRegisterValidationSchema","disablePasswordConfirm","passwordConfirm","initialValues","email","password","name","surname","fullName","filter","Boolean","join","submit","formik","useFormik","validateOnBlur","validationSchema","values","formikHelpers","mappedNames","undefined","registerValues","updatedValues","registerResponse","register","data","accessToken","refreshToken","profile","project","setActiveLogin","notifySessionChanged","error","parsedError","parseSignInError","isSignIn","setRateLimitFormError","fieldErrors","emailError","find","fieldError","path","includes","message","passwordError","setFieldError","contextValue","useShallowStableValue","jsx","RegisterFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/register-form-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAGA,I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GAAA,EAAC3E,oBAAA,CAAA4E,mBAAmB,CAACC,QAAQ;IAACC,KAAK,EAAEL,YAAa;IAAA/D,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC,CAAC;AAACqE,OAAA,CAAAtE,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js
CHANGED
|
@@ -9,6 +9,7 @@ var _formik = require("formik");
|
|
|
9
9
|
var Yup = _interopRequireWildcard(require("yup"));
|
|
10
10
|
var _useShallowStableValue = require("../../../../helpers/hooks/use-shallow-stable-value.js");
|
|
11
11
|
var _rateLimit = require("../../../utils/rate-limit.js");
|
|
12
|
+
var _signInError = require("../../../utils/sign-in-error.js");
|
|
12
13
|
var _resetPasswordFormContext = require("../../contexts/reset-password-form-context.js");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
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); }
|
|
@@ -43,14 +44,14 @@ const ResetPasswordFormProvider = ({
|
|
|
43
44
|
};
|
|
44
45
|
onSuccess?.(data);
|
|
45
46
|
} catch (error) {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
const parsedError = (0, _signInError.parseSignInError)(error, {
|
|
48
|
+
isSignIn: false
|
|
49
|
+
});
|
|
50
|
+
onError?.(parsedError.error);
|
|
51
|
+
if ((0, _rateLimit.setRateLimitFormError)(parsedError.error, helpers)) {
|
|
48
52
|
return;
|
|
49
53
|
}
|
|
50
|
-
|
|
51
|
-
// TODO: fix this after backend is fixed
|
|
52
|
-
helpers.setFieldError("submit", "Something went wrong");
|
|
53
|
-
onError?.(new Error("Something went wrong"));
|
|
54
|
+
helpers.setFieldError("submit", parsedError.error.message);
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
});
|
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,IAA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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
|
}
|