@ovok/native 1.5.6 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -19
- package/android/src/main/AndroidManifest.xml +1 -20
- package/app.plugin.js +181 -0
- package/lib/commonjs/index.js +5 -104
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js +23 -0
- package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js +105 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +44 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +5 -2
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +50 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/commonjs/modules/auth/session/events.js +19 -0
- package/lib/commonjs/modules/auth/session/events.js.map +1 -0
- package/lib/commonjs/modules/auth/session/index.js +13 -0
- package/lib/commonjs/modules/auth/session/index.js.map +1 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +26 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/types/session.js +2 -0
- package/lib/commonjs/modules/auth/types/session.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +76 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/commonjs/modules/background-sync/index.js +11 -0
- package/lib/commonjs/modules/background-sync/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device/index.js +0 -22
- package/lib/commonjs/modules/bt-device/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device-instructions/index.js +39 -0
- package/lib/commonjs/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +64 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +1 -0
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +95 -0
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +51 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +40 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +82 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +79 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +33 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +58 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js +21 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +154 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +91 -22
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +107 -4
- 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 +9 -1
- 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.file-transfer.js +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/push-notification.js +39 -0
- package/lib/commonjs/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +132 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
- package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +82 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +29 -4
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +29 -21
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +99 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +23 -4
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
- package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +27 -17
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +230 -0
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/commonjs/modules/image/components/optimized-image.js +31 -6
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
- package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +123 -0
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +119 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +175 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js +141 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +136 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +247 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +107 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js +99 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +116 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -0
- package/lib/commonjs/modules/ui/types.js +6 -0
- package/lib/commonjs/modules/ui/types.js.map +1 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/module/index.js +3 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js +17 -0
- package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-session.js +99 -0
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/module/modules/auth/index.js +4 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +5 -2
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +50 -1
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
- package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +76 -0
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/module/modules/auth/session/events.js +13 -0
- package/lib/module/modules/auth/session/events.js.map +1 -0
- package/lib/module/modules/auth/session/index.js +4 -0
- package/lib/module/modules/auth/session/index.js.map +1 -0
- package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
- package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +26 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/types/session.js +2 -0
- package/lib/module/modules/auth/types/session.js.map +1 -0
- package/lib/module/modules/auth/utils/rate-limit.js +31 -0
- package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/background-sync/background-safe-storage.js +71 -0
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/module/modules/background-sync/index.js +1 -0
- package/lib/module/modules/background-sync/index.js.map +1 -1
- package/lib/module/modules/bt-device/index.js +0 -2
- package/lib/module/modules/bt-device/index.js.map +1 -1
- package/lib/module/modules/bt-device-instructions/index.js +6 -0
- package/lib/module/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +58 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +1 -0
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +86 -0
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +45 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +34 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js +76 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js +73 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +27 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +52 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js +16 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +14 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +91 -22
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +107 -4
- 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 +9 -1
- 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.file-transfer.js +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/module/modules/bt-management/services/push-notification.js +34 -0
- package/lib/module/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +127 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/module/modules/bt-management/testing/index.js +5 -0
- package/lib/module/modules/bt-management/testing/index.js.map +1 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js +76 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/module/modules/bt-management/types/result-policy.js +4 -0
- package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +29 -4
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +29 -21
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/retry-save.js +92 -0
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/module/modules/helpers/form-items/form-field.js +2 -0
- package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/module/modules/helpers/index.js +2 -1
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/s-log.js +4 -12
- package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +25 -14
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +218 -0
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/module/modules/image/components/optimized-image.js +32 -7
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/module/modules/tile/components/task-icon.js +2 -1
- package/lib/module/modules/tile/components/task-icon.js.map +1 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +117 -0
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +113 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +169 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/module/modules/ui/components/health-import-card.js +135 -0
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/module/modules/ui/components/manual-entry-form.js +130 -0
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +241 -0
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +101 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/module/modules/ui/components/urine-test-result.js +94 -0
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/module/modules/ui/index.js +13 -0
- package/lib/module/modules/ui/index.js.map +1 -0
- package/lib/module/modules/ui/types.js +4 -0
- package/lib/module/modules/ui/types.js.map +1 -0
- package/lib/module/modules/ui/use-ovok-ui.js +45 -0
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +0 -9
- 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-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- 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-button.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/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.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/components/session-list.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- 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/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -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.file-transfer.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -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/command-sequencer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +69 -0
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +0 -9
- 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-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- 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-button.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/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.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/components/session-list.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +10 -0
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +31 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- 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/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -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.file-transfer.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -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/command-sequencer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +69 -0
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +21 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/package.json +146 -7
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBackgroundSync = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
/* eslint-disable import/group-exports */
|
|
11
|
+
|
|
12
|
+
const useBackgroundSync = ({
|
|
13
|
+
enabled: initialEnabled = false,
|
|
14
|
+
canEnable,
|
|
15
|
+
onEnabledChange
|
|
16
|
+
} = {}) => {
|
|
17
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
18
|
+
const [enabled, setEnabledState] = React.useState(initialEnabled);
|
|
19
|
+
const [error, setError] = React.useState();
|
|
20
|
+
const [status, setStatus] = React.useState(initialEnabled ? "on" : "off");
|
|
21
|
+
React.useSyncExternalStore(runtime.subscribeState, () => runtime.manager, () => undefined);
|
|
22
|
+
const setEnabled = React.useCallback(async next => {
|
|
23
|
+
setError(undefined);
|
|
24
|
+
try {
|
|
25
|
+
if (next && canEnable && !(await canEnable())) {
|
|
26
|
+
setStatus("restricted");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (next && !runtime.manager) {
|
|
30
|
+
throw new Error("Bluetooth background sync is not ready yet.");
|
|
31
|
+
}
|
|
32
|
+
runtime.manager?.setBackgroundScanEnabled(next);
|
|
33
|
+
await onEnabledChange?.(next);
|
|
34
|
+
setEnabledState(next);
|
|
35
|
+
setStatus(next ? "on" : "off");
|
|
36
|
+
} catch (cause) {
|
|
37
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
38
|
+
setError(nextError);
|
|
39
|
+
setStatus("blocked");
|
|
40
|
+
}
|
|
41
|
+
}, [canEnable, onEnabledChange, runtime]);
|
|
42
|
+
return {
|
|
43
|
+
enabled,
|
|
44
|
+
setEnabled,
|
|
45
|
+
status,
|
|
46
|
+
error,
|
|
47
|
+
reason: status === "restricted" ? "background access is restricted" : undefined
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.useBackgroundSync = useBackgroundSync;
|
|
51
|
+
//# sourceMappingURL=use-background-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useBackgroundSync","enabled","initialEnabled","canEnable","onEnabledChange","runtime","useBluetoothRuntime","setEnabledState","useState","error","setError","status","setStatus","useSyncExternalStore","subscribeState","manager","undefined","setEnabled","useCallback","next","Error","setBackgroundScanEnabled","cause","nextError","String","reason","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-background-sync.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAAwD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,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,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAJxD;;AAcO,MAAMkB,iBAAiB,GAAGA,CAAC;EAChCC,OAAO,EAAEC,cAAc,GAAG,KAAK;EAC/BC,SAA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MACnBX,SAAS,CAAC,SAAS,CAAC;IACtB;EACF,CAAC,EAAE,CAACT,SAAS,EAAEC,eAAe,EAAEC,OAAO,CAAC,CAAC;EAEzC,OAAO;IAAEJ,OAAO;IAAEgB,UAAU;IAAEN,MAAM;IAAEF,KAAK;IAAEgB,MAAM,EAAEd,MAAM,KAAK,YAAY,GAAG,iCAAiC,GAAGK;EAAU,CAAC;AAChI,CAAC;AAACU,OAAA,CAAA1B,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBluetoothState = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeBlePlx = require("react-native-ble-plx");
|
|
10
|
+
var _reactNativePermissions = require("react-native-permissions");
|
|
11
|
+
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); }
|
|
12
|
+
/* eslint-disable import/group-exports */
|
|
13
|
+
|
|
14
|
+
const requestBluetoothPermission = async () => {
|
|
15
|
+
const permissions = _reactNative.Platform.select({
|
|
16
|
+
android: [_reactNativePermissions.PERMISSIONS.ANDROID.BLUETOOTH_SCAN, _reactNativePermissions.PERMISSIONS.ANDROID.BLUETOOTH_CONNECT],
|
|
17
|
+
ios: [_reactNativePermissions.PERMISSIONS.IOS.BLUETOOTH],
|
|
18
|
+
default: []
|
|
19
|
+
});
|
|
20
|
+
const result = await (0, _reactNativePermissions.requestMultiple)(permissions);
|
|
21
|
+
return Object.values(result).every(value => value === "granted");
|
|
22
|
+
};
|
|
23
|
+
const useBluetoothState = ({
|
|
24
|
+
bleManager,
|
|
25
|
+
requestPermission = requestBluetoothPermission
|
|
26
|
+
} = {}) => {
|
|
27
|
+
const [state, setState] = React.useState(bleManager ? "off" : "unsupported");
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
if (!bleManager) {
|
|
30
|
+
setState("unsupported");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const subscription = bleManager.onStateChange(nextState => {
|
|
34
|
+
setState(nextState === _reactNativeBlePlx.State.PoweredOn ? "on" : nextState === _reactNativeBlePlx.State.Unsupported ? "unsupported" : nextState === _reactNativeBlePlx.State.Unauthorized ? "unauthorized" : "off");
|
|
35
|
+
}, true);
|
|
36
|
+
return () => subscription.remove();
|
|
37
|
+
}, [bleManager]);
|
|
38
|
+
const request = React.useCallback(async () => {
|
|
39
|
+
const granted = await requestPermission();
|
|
40
|
+
if (!granted) {
|
|
41
|
+
setState("unauthorized");
|
|
42
|
+
}
|
|
43
|
+
return granted;
|
|
44
|
+
}, [requestPermission]);
|
|
45
|
+
return {
|
|
46
|
+
state,
|
|
47
|
+
requestPermission: request
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.useBluetoothState = useBluetoothState;
|
|
51
|
+
//# sourceMappingURL=use-bluetooth-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeBlePlx","_reactNativePermissions","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","requestBluetoothPermission","permissions","Platform","select","android","PERMISSIONS","ANDROID","BLUETOOTH_SCAN","BLUETOOTH_CONNECT","ios","IOS","BLUETOOTH","result","requestMultiple","values","every","value","useBluetoothState","bleManager","requestPermission","state","setState","useState","useEffect","subscription","onStateChange","nextState","State","PoweredOn","Unsupported","Unauthorized","remove","request","useCallback","granted","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-bluetooth-state.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAH,OAAA;AAAwE,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,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,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,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EACpC,CAAC,EAAE,CAACb,UAAU,CAAC,CAAC;EAEhB,MAAMc,OAAO,GAAGzD,KAAK,CAAC0D,WAAW,CAAC,YAAY;IAC5C,MAAMC,OAAO,GAAG,MAAMf,iBAAiB,CAAC,CAAC;IAEzC,IAAI,CAACe,OAAO,EAAE;MAACb,QAAQ,CAAC,cAAc,CAAC;IAAC;IAExC,OAAOa,OAAO;EAChB,CAAC,EAAE,CAACf,iBAAiB,CAAC,CAAC;EAEvB,OAAO;IAAEC,KAAK;IAAED,iBAAiB,EAAEa;EAAQ,CAAC;AAC9C,CAAC;AAACG,OAAA,CAAAlB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDeviceConnection = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
const useDeviceConnection = id => {
|
|
11
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
12
|
+
const [status, setStatus] = React.useState(() => runtime.devices.find(device => device.id === id)?.status);
|
|
13
|
+
const [events, setEvents] = React.useState([]);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
setStatus(runtime.devices.find(device => device.id === id)?.status);
|
|
16
|
+
setEvents([]);
|
|
17
|
+
}, [id, runtime]);
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
const unsubStatus = runtime.subscribe("status", value => {
|
|
20
|
+
if (value.deviceData.id === id) {
|
|
21
|
+
setStatus(value.status);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const unsubEvent = runtime.subscribe("connection", event => {
|
|
25
|
+
if (event.deviceData.id === id) {
|
|
26
|
+
setEvents(current => [...current, event].slice(-100));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
unsubStatus();
|
|
31
|
+
unsubEvent();
|
|
32
|
+
};
|
|
33
|
+
}, [id, runtime]);
|
|
34
|
+
return {
|
|
35
|
+
status,
|
|
36
|
+
events
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.useDeviceConnection = useDeviceConnection;
|
|
40
|
+
//# sourceMappingURL=use-device-connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useDeviceConnection","id","runtime","useBluetoothRuntime","status","setStatus","useState","devices","find","device","events","setEvents","useEffect","unsubStatus","subscribe","value","deviceData","unsubEvent","event","current","slice","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-device-connection.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,eAAA,GAAAD,OAAA;AAAwD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL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AAM,CAACR,EAAE,KAAKA,EAAE,CAAC,EAAEG,MAAM,CAAC;IACrEO,SAAS,CAAC,EAAE,CAAC;EACf,CAAC,EAAE,CAACV,EAAE,EAAEC,OAAO,CAAC,CAAC;EAEjBzB,KAAK,CAACmC,SAAS,CAAC,MAAM;IACpB,MAAMC,WAAW,GAAGX,OAAO,CAACY,SAAS,CACnC,QAAQ,EACPC,KAAK,IAAK;MACT,IAAIA,KAAK,CAACC,UAAU,CAACf,EAAE,KAAKA,EAAE,EAAE;QAACI,SAAS,CAACU,KAAK,CAACX,MAAM,CAAC;MAAC;IAC3D,CACF,CAAC;IAED,MAAMa,UAAU,GAAGf,OAAO,CAACY,SAAS,CAAwB,YAAY,EAAGI,KAAK,IAAK;MACnF,IAAIA,KAAK,CAACF,UAAU,CAACf,EAAE,KAAKA,EAAE,EAAE;QAC9BU,SAAS,CAAEQ,OAAO,IAAK,CAAC,GAAGA,OAAO,EAAED,KAAK,CAAC,CAACE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;MACzD;IACF,CAAC,CAAC;IAEF,OAAO,MAAM;MACXP,WAAW,CAAC,CAAC;MACbI,UAAU,CAAC,CAAC;IACd,CAAC;EACH,CAAC,EAAE,CAAChB,EAAE,EAAEC,OAAO,CAAC,CAAC;EAEjB,OAAO;IAAEE,MAAM;IAAEM;EAAO,CAAC;AAC3B,CAAC;AAACW,OAAA,CAAArB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useHealthImport = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
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); }
|
|
9
|
+
const useHealthImport = ({
|
|
10
|
+
types,
|
|
11
|
+
background = false,
|
|
12
|
+
adapter
|
|
13
|
+
}) => {
|
|
14
|
+
const [enabled, setEnabled] = React.useState(false);
|
|
15
|
+
const [statusByType, setStatusByType] = React.useState({});
|
|
16
|
+
const [error, setError] = React.useState();
|
|
17
|
+
const typesKey = React.useMemo(() => types.join("\u0000"), [types]);
|
|
18
|
+
const configRef = React.useRef({
|
|
19
|
+
adapter,
|
|
20
|
+
types,
|
|
21
|
+
background
|
|
22
|
+
});
|
|
23
|
+
configRef.current = {
|
|
24
|
+
adapter,
|
|
25
|
+
types,
|
|
26
|
+
background
|
|
27
|
+
};
|
|
28
|
+
const refresh = React.useCallback(async () => {
|
|
29
|
+
void typesKey;
|
|
30
|
+
const {
|
|
31
|
+
adapter: currentAdapter,
|
|
32
|
+
types: currentTypes
|
|
33
|
+
} = configRef.current;
|
|
34
|
+
const entries = await Promise.allSettled(currentTypes.map(async type => [type, await currentAdapter.getStatus(type)]));
|
|
35
|
+
const rejected = entries.find(entry => entry.status === "rejected");
|
|
36
|
+
setStatusByType(current => {
|
|
37
|
+
const next = {
|
|
38
|
+
...current
|
|
39
|
+
};
|
|
40
|
+
entries.forEach(entry => {
|
|
41
|
+
if (entry.status === "fulfilled") {
|
|
42
|
+
next[entry.value[0]] = entry.value[1];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return next;
|
|
46
|
+
});
|
|
47
|
+
setEnabled(currentTypes.length > 0 && entries.every(entry => entry.status === "fulfilled" && entry.value[1] === "authorized"));
|
|
48
|
+
setError(rejected ? rejected.reason instanceof Error ? rejected.reason : new Error(String(rejected.reason)) : undefined);
|
|
49
|
+
}, [typesKey]);
|
|
50
|
+
React.useEffect(() => {
|
|
51
|
+
void refresh();
|
|
52
|
+
}, [refresh]);
|
|
53
|
+
const setEnabledForTypes = React.useCallback(async next => {
|
|
54
|
+
const {
|
|
55
|
+
adapter: currentAdapter,
|
|
56
|
+
types: currentTypes,
|
|
57
|
+
background: currentBackground
|
|
58
|
+
} = configRef.current;
|
|
59
|
+
setError(undefined);
|
|
60
|
+
try {
|
|
61
|
+
if (next) {
|
|
62
|
+
await currentAdapter.request(currentTypes, currentBackground);
|
|
63
|
+
await refresh();
|
|
64
|
+
}
|
|
65
|
+
setEnabled(next);
|
|
66
|
+
} catch (cause) {
|
|
67
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
68
|
+
setError(nextError);
|
|
69
|
+
throw nextError;
|
|
70
|
+
}
|
|
71
|
+
}, [refresh]);
|
|
72
|
+
const notShared = types.filter(type => statusByType[type] === "refused");
|
|
73
|
+
return {
|
|
74
|
+
enabled,
|
|
75
|
+
setEnabled: setEnabledForTypes,
|
|
76
|
+
statusByType: statusByType,
|
|
77
|
+
notShared,
|
|
78
|
+
error
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
exports.useHealthImport = useHealthImport;
|
|
82
|
+
//# sourceMappingURL=use-health-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useHealthImport","types","background","adapter","enabled","setEnabled","useState","statusByType","setStatusByType","error","setError","typesKey","useMemo","join","configRef","useRef","current","refresh","useCallback","currentAdapter","currentTypes","entries","Promise","allSettled","map","type","getStatus","rejected","find","entry","status","next","forEach","value","length","every","reason","Error","String","undefined","useEffect","setEnabledForTypes","currentBackground","request","cause","nextError","notShared","filter","exports"],"sourceRoot":"../../../../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AAMA,SAAS;IACjB;EACF,CAAC,EAAE,CAAC5B,OAAO,CAAC,CAAC;EAEb,MAAM6B,SAAS,GAAG7C,KAAK,CAAC8C,MAAM,CAAEtB,IAAI,IAAKlB,YAAY,CAACkB,IAAI,CAAC,KAAK,SAAS,CAAC;EAE1E,OAAO;IAAErB,OAAO;IAAEC,UAAU,EAAEoC,kBAAkB;IAAElC,YAAY,EAAEA,YAAqB;IAAEuC,SAAS;IAAErC;EAAM,CAAC;AAC3G,CAAC;AAACuC,OAAA,CAAAhD,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useMeasurements = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
const useMeasurements = (onResult, {
|
|
11
|
+
policy = "all",
|
|
12
|
+
maxResults = 100
|
|
13
|
+
} = {}) => {
|
|
14
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
15
|
+
const [measurements, setMeasurements] = React.useState([]);
|
|
16
|
+
const seen = React.useRef(new Set());
|
|
17
|
+
const seenMeasurementKinds = React.useRef(new Set());
|
|
18
|
+
const seenDailyTotals = React.useRef(new Set());
|
|
19
|
+
const onResultRef = React.useRef(onResult);
|
|
20
|
+
onResultRef.current = onResult;
|
|
21
|
+
const acceptsResult = React.useCallback(result => {
|
|
22
|
+
const measurementTypeKey = String(result.data.measurementTypeKey);
|
|
23
|
+
if (policy === "first-reading-per-kind-per-connection") {
|
|
24
|
+
if (seenMeasurementKinds.current.has(measurementTypeKey)) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
seenMeasurementKinds.current.add(measurementTypeKey);
|
|
28
|
+
}
|
|
29
|
+
if (policy === "daily-totals-only") {
|
|
30
|
+
const temporal = result.data;
|
|
31
|
+
const end = temporal.end instanceof Date ? temporal.end : undefined;
|
|
32
|
+
if (end && end.getTime() > Date.now()) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const day = temporal.end ?? temporal.start ?? temporal.recordedAt;
|
|
36
|
+
if (day instanceof Date) {
|
|
37
|
+
const key = `${measurementTypeKey}:${day.toISOString().slice(0, 10)}`;
|
|
38
|
+
if (seenDailyTotals.current.has(key)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
seenDailyTotals.current.add(key);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
}, [policy]);
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
return runtime.subscribe("result", result => {
|
|
48
|
+
if (!acceptsResult(result)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (seen.current.has(result.id)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
seen.current.add(result.id);
|
|
55
|
+
setMeasurements(current => [...current, result].slice(-maxResults));
|
|
56
|
+
onResultRef.current?.(result);
|
|
57
|
+
});
|
|
58
|
+
}, [acceptsResult, maxResults, runtime]);
|
|
59
|
+
React.useEffect(() => {
|
|
60
|
+
const unsubscribe = runtime.subscribe("connection", event => {
|
|
61
|
+
if (event.kind === "bonded") {
|
|
62
|
+
seenMeasurementKinds.current.clear();
|
|
63
|
+
seenDailyTotals.current.clear();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return unsubscribe;
|
|
67
|
+
}, [runtime]);
|
|
68
|
+
return {
|
|
69
|
+
measurements,
|
|
70
|
+
clear: () => {
|
|
71
|
+
seen.current.clear();
|
|
72
|
+
seenMeasurementKinds.current.clear();
|
|
73
|
+
seenDailyTotals.current.clear();
|
|
74
|
+
setMeasurements([]);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
exports.useMeasurements = useMeasurements;
|
|
79
|
+
//# sourceMappingURL=use-measurements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useMeasurements","onResult","policy","maxResults","runtime","useBluetoothRuntime","measurements","setMeasurements","useState","seen","useRef","Set","seenMeasurementKinds","seenDailyTotals","onResultRef","current","acceptsResult","useCallback","result","measurementTypeKey","String","data","add","temporal","end","Date","undefined","getTime","now","day","start","recordedAt","key","toISOString","slice","useEffect","subscribe","id","unsubscribe","event","kind","clear","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-measurements.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAI2B,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,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,uBAA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AAA","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useNearbyDevices = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
const useNearbyDevices = () => {
|
|
11
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
12
|
+
const [, redraw] = React.useReducer(value => value + 1, 0);
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
const unsubscribeFound = runtime.subscribe("deviceFound", redraw);
|
|
15
|
+
const unsubscribeStatus = runtime.subscribe("status", redraw);
|
|
16
|
+
return () => {
|
|
17
|
+
unsubscribeFound();
|
|
18
|
+
unsubscribeStatus();
|
|
19
|
+
};
|
|
20
|
+
}, [runtime]);
|
|
21
|
+
return {
|
|
22
|
+
devices: runtime.devices,
|
|
23
|
+
pair: async id => {
|
|
24
|
+
const device = runtime.devices.find(item => item.id === id);
|
|
25
|
+
if (device) {
|
|
26
|
+
await device.device.connect();
|
|
27
|
+
}
|
|
28
|
+
return device;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
exports.useNearbyDevices = useNearbyDevices;
|
|
33
|
+
//# sourceMappingURL=use-nearby-devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useNearbyDevices","runtime","useBluetoothRuntime","redraw","useReducer","value","useEffect","unsubscribeFound","subscribe","unsubscribeStatus","devices","pair","id","device","find","item","connect","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-nearby-devices.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAAuE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,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,CAAAM,GAAA,IAA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
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
/* eslint-disable import/group-exports */
|
|
11
|
+
|
|
12
|
+
const usePairedDevices = ({
|
|
13
|
+
storage,
|
|
14
|
+
storageKey = "@ovok/native/paired-devices",
|
|
15
|
+
autoPair = false
|
|
16
|
+
}) => {
|
|
17
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
18
|
+
const [paired, setPaired] = React.useState([]);
|
|
19
|
+
const pairedRef = React.useRef([]);
|
|
20
|
+
const [, redraw] = React.useReducer(value => value + 1, 0);
|
|
21
|
+
const save = React.useCallback(async next => {
|
|
22
|
+
pairedRef.current = next;
|
|
23
|
+
setPaired(next);
|
|
24
|
+
await storage.setItem(storageKey, JSON.stringify(next));
|
|
25
|
+
}, [storage, storageKey]);
|
|
26
|
+
React.useEffect(() => runtime.subscribe("deviceFound", redraw), [runtime]);
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
void storage.getItem(storageKey).then(value => {
|
|
29
|
+
try {
|
|
30
|
+
const parsed = value ? JSON.parse(value) : [];
|
|
31
|
+
const next = Array.isArray(parsed) ? parsed.filter(id => typeof id === "string") : [];
|
|
32
|
+
pairedRef.current = next;
|
|
33
|
+
setPaired(next);
|
|
34
|
+
} catch {
|
|
35
|
+
setPaired([]);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}, [storage, storageKey]);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
if (!autoPair) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
runtime.devices.filter(device => paired.includes(device.id)).forEach(device => void device.device.connect());
|
|
44
|
+
}, [autoPair, paired, runtime, runtime.devices]);
|
|
45
|
+
return {
|
|
46
|
+
paired,
|
|
47
|
+
pair: device => save([...new Set([...pairedRef.current, device.id])]),
|
|
48
|
+
forget: async id => {
|
|
49
|
+
if (!runtime.manager) {
|
|
50
|
+
throw new Error("Bluetooth manager is not ready; try forgetting the device again.");
|
|
51
|
+
}
|
|
52
|
+
await runtime.manager.forget(id);
|
|
53
|
+
await save(pairedRef.current.filter(candidate => candidate !== id));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
exports.usePairedDevices = usePairedDevices;
|
|
58
|
+
//# sourceMappingURL=use-paired-devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","usePairedDevices","storage","storageKey","autoPair","runtime","useBluetoothRuntime","paired","setPaired","useState","pairedRef","useRef","redraw","useReducer","value","save","useCallback","next","current","setItem","JSON","stringify","useEffect","subscribe","getItem","then","parsed","parse","Array","isArray","filter","id","devices","device","includes","forEach","connect","pair","Set","forget","manager","Error","candidate","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-paired-devices.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAAuE,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAA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AAC,CAAC,CAC9CI,OAAO,CAAEF,MAAM,IAAK,KAAKA,MAAM,CAACA,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC;EACtD,CAAC,EAAE,CAAChC,QAAQ,EAAEG,MAAM,EAAEF,OAAO,EAAEA,OAAO,CAAC2B,OAAO,CAAC,CAAC;EAEhD,OAAO;IACLzB,MAAM;IACN8B,IAAI,EAAGJ,MAAM,IAAKlB,IAAI,CAAC,CAAC,GAAG,IAAIuB,GAAG,CAAC,CAAC,GAAG5B,SAAS,CAACQ,OAAO,EAAEe,MAAM,CAACF,EAAE,CAAC,CAAC,CAAC,CAAC;IACvEQ,MAAM,EAAE,MAAOR,EAAE,IAAK;MACpB,IAAI,CAAC1B,OAAO,CAACmC,OAAO,EAAE;QACpB,MAAM,IAAIC,KAAK,CAAC,kEAAkE,CAAC;MACrF;MAEA,MAAMpC,OAAO,CAACmC,OAAO,CAACD,MAAM,CAACR,EAAE,CAAC;MAChC,MAAMhB,IAAI,CAACL,SAAS,CAACQ,OAAO,CAACY,MAAM,CAAEY,SAAS,IAAKA,SAAS,KAAKX,EAAE,CAAC,CAAC;IACvE;EACF,CAAC;AACH,CAAC;AAACY,OAAA,CAAA1C,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useScanControl = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _runtimeContext = require("./runtime-context.js");
|
|
9
|
+
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); }
|
|
10
|
+
/** Exposes scan pause/resume to apps using BTProvider. */
|
|
11
|
+
const useScanControl = () => {
|
|
12
|
+
const runtime = (0, _runtimeContext.useBluetoothRuntime)();
|
|
13
|
+
React.useSyncExternalStore(runtime.subscribeState, () => runtime.manager, () => undefined);
|
|
14
|
+
return {
|
|
15
|
+
canControl: Boolean(runtime.manager),
|
|
16
|
+
pauseScan: () => runtime.manager?.pauseScan(),
|
|
17
|
+
resumeScan: () => runtime.manager?.resumeScan()
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.useScanControl = useScanControl;
|
|
21
|
+
//# sourceMappingURL=use-scan-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_runtimeContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useScanControl","runtime","useBluetoothRuntime","useSyncExternalStore","subscribeState","manager","undefined","canControl","Boolean","pauseScan","resumeScan","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-scan-control.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAAwD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,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,iBAA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