@ovok/native 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/android/src/main/AndroidManifest.xml +1 -20
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokBackgroundSyncModule.java +25 -3
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokHealthConnectWorker.java +6 -2
- package/app.plugin.js +86 -7
- package/lib/commonjs/index.js +5 -115
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/default-translation.js +69 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -0
- 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-session.js +47 -17
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/index.js +1 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/login-link.js +4 -3
- package/lib/commonjs/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +6 -3
- 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 +2 -2
- 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 +6 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +8 -6
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-out-google.js +16 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/status.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/commonjs/modules/bt-device/constants/supported-devices.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/bluetooth-device-picker.js +2 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +43 -54
- 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 +18 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- 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 +22 -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 +4 -1
- 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 +75 -37
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +97 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +52 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- 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 +43 -28
- 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 +10 -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 +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.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 +81 -1
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +17 -0
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/title.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/title.js.map +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +7 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js +55 -0
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +40 -6
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/commonjs/modules/diary/components/no-data.js +1 -2
- package/lib/commonjs/modules/diary/components/no-data.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-select.js +13 -13
- package/lib/commonjs/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +11 -4
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +2 -3
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +133 -46
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/commonjs/modules/image/components/optimized-image.js +29 -8
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js +0 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js +0 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/date-range.js +4 -3
- package/lib/commonjs/modules/measurement/components/date-range.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/setting/components/list-header.js +1 -2
- package/lib/commonjs/modules/setting/components/list-header.js.map +1 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js +0 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/commonjs/modules/tab/components/tab-item.js +0 -1
- package/lib/commonjs/modules/tab/components/tab-item.js.map +1 -1
- package/lib/commonjs/modules/theme/utils/generate-theme.js +35 -4
- package/lib/commonjs/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/commonjs/modules/tile/components/measured-value.js +0 -3
- package/lib/commonjs/modules/tile/components/measured-value.js.map +1 -1
- package/lib/commonjs/modules/tile/components/title.js +0 -1
- package/lib/commonjs/modules/tile/components/title.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 +20 -4
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/commonjs/modules/ui/components/health-import-card.js +25 -2
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js +95 -0
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +103 -34
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +11 -4
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/commonjs/modules/ui/components/urine-test-result.js +7 -2
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/modules/ui/use-ovok-ui.js +5 -2
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/module/index.js +3 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +68 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -0
- 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-session.js +47 -17
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/index.js +1 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/module/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/description.js +0 -1
- package/lib/module/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/title.js +5 -2
- package/lib/module/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/register/components/login-link.js +4 -3
- package/lib/module/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/module/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/module/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +6 -3
- 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 +2 -2
- 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 +6 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/module/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +8 -6
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/module/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/module/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/module/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/module/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-out-google.js +12 -0
- package/lib/module/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/module/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/status.js +1 -2
- package/lib/module/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/module/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/title.js +1 -2
- package/lib/module/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/module/modules/bt-device/constants/supported-devices.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/bluetooth-device-picker.js +2 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +42 -53
- 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 +18 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- 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 +2 -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 +4 -1
- 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 +75 -37
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +98 -2
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js +68 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +48 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- 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 +44 -29
- 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 +10 -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 +2 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.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 +79 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +12 -0
- package/lib/module/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/module/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/module/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/module/modules/content/content-card/components/title.js +1 -3
- package/lib/module/modules/content/content-card/components/title.js.map +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +8 -2
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-observation-device.js +50 -0
- package/lib/module/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/module/modules/data-sync/utils/retry-save.js +39 -7
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/module/modules/diary/components/no-data.js +1 -2
- package/lib/module/modules/diary/components/no-data.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-select.js +13 -13
- package/lib/module/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/module/modules/helpers/index.js +1 -1
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +3 -4
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +133 -46
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/module/modules/image/components/optimized-image.js +29 -8
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/journal/past-journal/components/title.js +0 -1
- package/lib/module/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/module/modules/language-switcher/components/option/label.js +0 -1
- package/lib/module/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/module/modules/measurement/components/date-range.js +4 -3
- package/lib/module/modules/measurement/components/date-range.js.map +1 -1
- package/lib/module/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/module/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/setting/components/list-header.js +1 -2
- package/lib/module/modules/setting/components/list-header.js.map +1 -1
- package/lib/module/modules/setting/components/setting-list-item.js +0 -1
- package/lib/module/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/module/modules/tab/components/tab-item.js +0 -1
- package/lib/module/modules/tab/components/tab-item.js.map +1 -1
- package/lib/module/modules/theme/utils/generate-theme.js +35 -4
- package/lib/module/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/module/modules/tile/components/measured-value.js +0 -3
- package/lib/module/modules/tile/components/measured-value.js.map +1 -1
- package/lib/module/modules/tile/components/title.js +0 -1
- package/lib/module/modules/tile/components/title.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 +20 -4
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/module/modules/ui/components/health-import-card.js +25 -2
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/module/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/module/modules/ui/components/measurement-trend-chart.js +91 -0
- package/lib/module/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +106 -37
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +12 -5
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/module/modules/ui/components/urine-test-result.js +7 -2
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/modules/ui/use-ovok-ui.js +6 -3
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -0
- 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-session.d.ts +8 -2
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -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 +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/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.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/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/login-link.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 +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/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- 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/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-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/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/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 +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +9 -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/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -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 +7 -0
- 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/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 +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +2 -0
- 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 +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- 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/custom-device-definition.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- 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/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.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/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.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/health-observation-device.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -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 +3 -2
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.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/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.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 +4 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -10
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -0
- 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-session.d.ts +8 -2
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -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 +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/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.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/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/login-link.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 +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/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- 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/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-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/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/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 +2 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +9 -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/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -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 +7 -0
- 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/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 +17 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +2 -0
- 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 +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- 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/custom-device-definition.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- 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/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.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/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.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/health-observation-device.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -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 +3 -2
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.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/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.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 +4 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -105,18 +105,24 @@ export const measurementFieldCatalog = {
|
|
|
105
105
|
unit: "mmHg",
|
|
106
106
|
min: 30,
|
|
107
107
|
max: 300,
|
|
108
|
+
normalMin: 90,
|
|
109
|
+
normalMax: 120,
|
|
108
110
|
required: true
|
|
109
111
|
},
|
|
110
112
|
diastolic: {
|
|
111
113
|
unit: "mmHg",
|
|
112
114
|
min: 10,
|
|
113
115
|
max: 220,
|
|
116
|
+
normalMin: 60,
|
|
117
|
+
normalMax: 80,
|
|
114
118
|
required: true
|
|
115
119
|
},
|
|
116
120
|
heartRate: {
|
|
117
121
|
unit: "bpm",
|
|
118
122
|
min: 20,
|
|
119
|
-
max: 300
|
|
123
|
+
max: 300,
|
|
124
|
+
normalMin: 60,
|
|
125
|
+
normalMax: 100
|
|
120
126
|
}
|
|
121
127
|
},
|
|
122
128
|
[MeasurementTypeKey.bodyWeight]: {
|
|
@@ -132,6 +138,8 @@ export const measurementFieldCatalog = {
|
|
|
132
138
|
unit: "Cel",
|
|
133
139
|
min: 25,
|
|
134
140
|
max: 45,
|
|
141
|
+
normalMin: 36.5,
|
|
142
|
+
normalMax: 37.3,
|
|
135
143
|
required: true
|
|
136
144
|
}
|
|
137
145
|
},
|
|
@@ -148,12 +156,16 @@ export const measurementFieldCatalog = {
|
|
|
148
156
|
unit: "%",
|
|
149
157
|
min: 50,
|
|
150
158
|
max: 100,
|
|
159
|
+
normalMin: 95,
|
|
160
|
+
normalMax: 100,
|
|
151
161
|
required: true
|
|
152
162
|
},
|
|
153
163
|
pulseRate: {
|
|
154
164
|
unit: "bpm",
|
|
155
165
|
min: 20,
|
|
156
166
|
max: 300,
|
|
167
|
+
normalMin: 60,
|
|
168
|
+
normalMax: 100,
|
|
157
169
|
required: true
|
|
158
170
|
},
|
|
159
171
|
perfusionIndex: {
|
|
@@ -172,6 +184,8 @@ export const measurementFieldCatalog = {
|
|
|
172
184
|
unit: "bpm",
|
|
173
185
|
min: 20,
|
|
174
186
|
max: 300,
|
|
187
|
+
normalMin: 60,
|
|
188
|
+
normalMax: 100,
|
|
175
189
|
required: true
|
|
176
190
|
}
|
|
177
191
|
},
|
|
@@ -180,9 +194,12 @@ export const measurementFieldCatalog = {
|
|
|
180
194
|
unit: "/min",
|
|
181
195
|
min: 2,
|
|
182
196
|
max: 90,
|
|
197
|
+
normalMin: 12,
|
|
198
|
+
normalMax: 20,
|
|
183
199
|
required: true
|
|
184
200
|
}
|
|
185
201
|
},
|
|
202
|
+
[MeasurementTypeKey.urineAnalysis]: urineAnalyteCatalog,
|
|
186
203
|
[MeasurementTypeKey.uricAcid]: urineAnalyteCatalog
|
|
187
204
|
};
|
|
188
205
|
//# sourceMappingURL=measurement-field-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","URINE_ANALYTE_DEFINITIONS","urineAnalyteRanges","uro","min","max","normalMin","normalMax","bld","bil","ket","glu","pro","ph","nit","leu","sg","vc","urineAnalyteCatalog","Object","fromEntries","entries","map","key","range","definition","find","analyte","Error","display","unit","measurementFieldCatalog","bloodPressure","systolic","required","diastolic","heartRate","bodyWeight","temperature","bodyTemp","bloodGlucose","bloodOxygenPulseRate","bloodOxygen","pulseRate","perfusionIndex","rrInterval","respiratoryRate","uricAcid"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/constants/measurement-field-catalog.ts"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,yBAAyB,QACpB,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,MAAMC,kBAAkB,GAAG;EACzBC,GAAG,EAAE;IAAEC,GAAG,EAAE,GAAG;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,GAAG;IAAEC,SAAS,EAAE;EAAE,CAAC;EACvDC,GAAG,EAAE;IAAEJ,GAAG,EAAE,CAAC;IAAEC,GAAG,EAAE,GAAG;IAAEC,SAAS,EAAE,CAAC;IAAEC,SAAS,EAAE;EAAE,CAAC;EACrDE,GAAG,EAAE;IAAEL,GAAG,EAAE,CAAC;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,CAAC;IAAEC,SAAS,EAAE;EAAE,CAAC;EACnDG,GAAG,EAAE;IAAEN,GAAG,EAAE,CAAC;IAAEC,GAAG,EAAE,EAAE;IAAEC,SAAS,EAAE,CAAC;IAAEC,SAAS,EAAE;EAAG,CAAC;EACrDI,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C,KAAK;IACRK,OAAO,EAAEJ,UAAU,CAACI,OAAO;IAE3B;IACA;IACAC,IAAI,EAAEL,UAAU,CAACK,IAAI,IAAI;EAC3B,CAAC,CACF;AACH,CAAC,CACH,CAAiC;AAEjC,OAAO,MAAMC,uBAEZ,GAAG;EACF,CAAC/B,kBAAkB,CAACgC,aAAa,GAAG;IAClCC,QAAQ,EAAE;MAAEH,IAAI,EAAE,MAAM;MAAE1B,GAAG,EAAE,EAAE;MAAEC,GAAG,EAAE,GAAG;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","URINE_ANALYTE_DEFINITIONS","urineAnalyteRanges","uro","min","max","normalMin","normalMax","bld","bil","ket","glu","pro","ph","nit","leu","sg","vc","urineAnalyteCatalog","Object","fromEntries","entries","map","key","range","definition","find","analyte","Error","display","unit","measurementFieldCatalog","bloodPressure","systolic","required","diastolic","heartRate","bodyWeight","temperature","bodyTemp","bloodGlucose","bloodOxygenPulseRate","bloodOxygen","pulseRate","perfusionIndex","rrInterval","respiratoryRate","urineAnalysis","uricAcid"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/constants/measurement-field-catalog.ts"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,yBAAyB,QACpB,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,MAAMC,kBAAkB,GAAG;EACzBC,GAAG,EAAE;IAAEC,GAAG,EAAE,GAAG;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,GAAG;IAAEC,SAAS,EAAE;EAAE,CAAC;EACvDC,GAAG,EAAE;IAAEJ,GAAG,EAAE,CAAC;IAAEC,GAAG,EAAE,GAAG;IAAEC,SAAS,EAAE,CAAC;IAAEC,SAAS,EAAE;EAAE,CAAC;EACrDE,GAAG,EAAE;IAAEL,GAAG,EAAE,CAAC;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,CAAC;IAA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EAAE;MAAEC,SAAS,EAAE,EAAE;MAAEC,SAAS,EAAE,EAAE;MAAE2B,QAAQ,EAAE;IAAK;EACjG,CAAC;EACD,CAAClC,kBAAkB,CAAC+C,aAAa,GAAG7B,mBAAmB;EACvD,CAAClB,kBAAkB,CAACgD,QAAQ,GAAG9B;AACjC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/* eslint-disable import/group-exports */
|
|
3
|
+
/* eslint-disable import/group-exports, max-lines */
|
|
4
4
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -10,6 +10,25 @@ export const createBluetoothRuntime = bleManager => {
|
|
|
10
10
|
let currentManager;
|
|
11
11
|
let currentDevices = [];
|
|
12
12
|
const subscribers = new Set();
|
|
13
|
+
const pairedState = new Map();
|
|
14
|
+
const getPairedState = storageKey => {
|
|
15
|
+
const current = pairedState.get(storageKey);
|
|
16
|
+
if (current) {
|
|
17
|
+
return current;
|
|
18
|
+
}
|
|
19
|
+
const next = {
|
|
20
|
+
revision: 0
|
|
21
|
+
};
|
|
22
|
+
pairedState.set(storageKey, next);
|
|
23
|
+
return next;
|
|
24
|
+
};
|
|
25
|
+
const notifyPairedDevices = storageKey => {
|
|
26
|
+
const value = {
|
|
27
|
+
storageKey
|
|
28
|
+
};
|
|
29
|
+
listeners.get("pairedDevices")?.forEach(callback => callback(value));
|
|
30
|
+
subscribers.forEach(notify => notify());
|
|
31
|
+
};
|
|
13
32
|
return {
|
|
14
33
|
bleManager,
|
|
15
34
|
get manager() {
|
|
@@ -24,6 +43,10 @@ export const createBluetoothRuntime = bleManager => {
|
|
|
24
43
|
listeners.set(event, eventListeners);
|
|
25
44
|
return () => eventListeners.delete(callback);
|
|
26
45
|
},
|
|
46
|
+
subscribeState: callback => {
|
|
47
|
+
subscribers.add(callback);
|
|
48
|
+
return () => subscribers.delete(callback);
|
|
49
|
+
},
|
|
27
50
|
hasListeners: event => (listeners.get(event)?.size ?? 0) > 0,
|
|
28
51
|
emit: (event, value) => {
|
|
29
52
|
listeners.get(event)?.forEach(callback => callback(value));
|
|
@@ -33,6 +56,38 @@ export const createBluetoothRuntime = bleManager => {
|
|
|
33
56
|
currentManager = manager;
|
|
34
57
|
subscribers.forEach(notify => notify());
|
|
35
58
|
},
|
|
59
|
+
setAutoConnect: (enabled, delayMs, onDeviceSelectionRequired) => {
|
|
60
|
+
currentManager?.setAutoConnect(enabled, delayMs, onDeviceSelectionRequired);
|
|
61
|
+
},
|
|
62
|
+
getPairedDeviceIds: storageKey => getPairedState(storageKey).value,
|
|
63
|
+
loadPairedDeviceIds: (storageKey, load) => {
|
|
64
|
+
const state = getPairedState(storageKey);
|
|
65
|
+
if (state.value) {
|
|
66
|
+
return Promise.resolve(state.value);
|
|
67
|
+
}
|
|
68
|
+
if (state.loading) {
|
|
69
|
+
return state.loading;
|
|
70
|
+
}
|
|
71
|
+
const revision = state.revision;
|
|
72
|
+
state.loading = load().then(value => {
|
|
73
|
+
const next = [...new Set(value)];
|
|
74
|
+
if (state.revision === revision) {
|
|
75
|
+
state.value = next;
|
|
76
|
+
notifyPairedDevices(storageKey);
|
|
77
|
+
return next;
|
|
78
|
+
}
|
|
79
|
+
return state.value ?? next;
|
|
80
|
+
}).finally(() => {
|
|
81
|
+
state.loading = undefined;
|
|
82
|
+
});
|
|
83
|
+
return state.loading;
|
|
84
|
+
},
|
|
85
|
+
setPairedDeviceIds: (storageKey, ids) => {
|
|
86
|
+
const state = getPairedState(storageKey);
|
|
87
|
+
state.revision += 1;
|
|
88
|
+
state.value = [...new Set(ids)];
|
|
89
|
+
notifyPairedDevices(storageKey);
|
|
90
|
+
},
|
|
36
91
|
upsertDevice: device => {
|
|
37
92
|
const existing = currentDevices.findIndex(item => item.id === device.id);
|
|
38
93
|
const next = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","jsx","_jsx","RuntimeContext","createContext","createBluetoothRuntime","bleManager","listeners","Map","currentManager","currentDevices","subscribers","Set","
|
|
1
|
+
{"version":3,"names":["React","jsx","_jsx","RuntimeContext","createContext","createBluetoothRuntime","bleManager","listeners","Map","currentManager","currentDevices","subscribers","Set","pairedState","getPairedState","storageKey","current","get","next","revision","set","notifyPairedDevices","value","forEach","callback","notify","manager","devices","subscribe","event","eventListeners","add","delete","subscribeState","hasListeners","size","emit","setManager","setAutoConnect","enabled","delayMs","onDeviceSelectionRequired","getPairedDeviceIds","loadPairedDeviceIds","load","state","Promise","resolve","loading","then","finally","undefined","setPairedDeviceIds","ids","upsertDevice","device","existing","findIndex","item","id","deviceData","status","map","index","setDeviceStatus","BluetoothRuntimeProvider","runtime","children","Provider","useBluetoothRuntime","useContext","Error","useRuntimeEvent","callbackRef","useRef","useEffect"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/runtime-context.tsx"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwE/B,MAAMC,cAAc,gBAAGH,KAAK,CAACI,aAAa,CAA0B,IAAI,CAAC;AAEzE,OAAO,MAAMC,sBAAsB,GACjCC,UAAuB,IACF;EACrB,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAA8C,CAAC;EACxE,IAAIC,cAES;EACb,IAAIC,cAA+B,GAAG,EAAE;EACxC,MAAMC,WAAW,GAAG,IAAIC,GAAG,CAAa,CAAC;EAEzC,MAAMC,WAAW,GAAG,IAAIL,GAAG,CAOzB,CAAC;EAEH,MAAMM,cAAc,GAAIC,UAAkB,IAAK;IAC7C,MAAMC,OAAO,GAAGH,WAAW,CAACI,GAAG,CAACF,UAAU,CAAC;IAE3C,IAAIC,OAAO,EAAE;MACX,OAAOA,OAAO;IAChB;IAEA,MAAME,IAIL,GAAG;MAAEC,QAAQ,EAAE;IAAE,CAAC;IAEnBN,WAAW,CAACO,GAAG,CAACL,UAAU,EAAEG,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AE,GAAGD,IAAI;QAAEE,UAAU;QAAEC;MAAO,CAAC,GAAGH,IAChE,CAAC;MACD/C,WAAW,CAACY,OAAO,CAAEE,MAAM,IAAKA,MAAM,CAAC,CAAC,CAAC;IAC3C;EACF,CAAC;AACH,CAAC;AAED,OAAO,MAAMwC,wBAAwB,GAAGA,CAAC;EACvCC,OAAO;EACPC;AACsD,CAAC,kBACvDjE,IAAA,CAACC,cAAc,CAACiE,QAAQ;EAAC9C,KAAK,EAAE4C,OAAQ;EAAAC,QAAA,EAAEA;AAAQ,CAA0B,CAC7E;AAED,OAAO,MAAME,mBAAmB,GAAGA,CAAA,KAAwB;EACzD,MAAMH,OAAO,GAAGlE,KAAK,CAACsE,UAAU,CAACnE,cAAc,CAAC;EAEhD,IAAI,CAAC+D,OAAO,EAAE;IACZ,MAAM,IAAIK,KAAK,CAAC,oDAAoD,CAAC;EACvE;EAEA,OAAOL,OAAO;AAChB,CAAC;AAED,OAAO,MAAMM,eAAe,GAAGA,CAC7B3C,KAAmB,EACnBL,QAA4B,KACnB;EACT,MAAM0C,OAAO,GAAGG,mBAAmB,CAAC,CAAC;EACrC,MAAMI,WAAW,GAAGzE,KAAK,CAAC0E,MAAM,CAAClD,QAAQ,CAAC;EAE1CiD,WAAW,CAACzD,OAAO,GAAGQ,QAAQ;EAE9BxB,KAAK,CAAC2E,SAAS,CACb,MAAMT,OAAO,CAACtC,SAAS,CAAIC,KAAK,EAAGP,KAAK,IAAKmD,WAAW,CAACzD,OAAO,CAACM,KAAK,CAAC,CAAC,EACxE,CAACO,KAAK,EAAEqC,OAAO,CACjB,CAAC;AACH,CAAC;;AAED","ignoreList":[]}
|
|
@@ -13,13 +13,17 @@ export const useBackgroundSync = ({
|
|
|
13
13
|
const [enabled, setEnabledState] = React.useState(initialEnabled);
|
|
14
14
|
const [error, setError] = React.useState();
|
|
15
15
|
const [status, setStatus] = React.useState(initialEnabled ? "on" : "off");
|
|
16
|
+
React.useSyncExternalStore(runtime.subscribeState, () => runtime.manager, () => undefined);
|
|
16
17
|
const setEnabled = React.useCallback(async next => {
|
|
17
18
|
setError(undefined);
|
|
18
|
-
if (next && canEnable && !(await canEnable())) {
|
|
19
|
-
setStatus("restricted");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
19
|
try {
|
|
20
|
+
if (next && canEnable && !(await canEnable())) {
|
|
21
|
+
setStatus("restricted");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (next && !runtime.manager) {
|
|
25
|
+
throw new Error("Bluetooth background sync is not ready yet.");
|
|
26
|
+
}
|
|
23
27
|
runtime.manager?.setBackgroundScanEnabled(next);
|
|
24
28
|
await onEnabledChange?.(next);
|
|
25
29
|
setEnabledState(next);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","useBackgroundSync","enabled","initialEnabled","canEnable","onEnabledChange","runtime","setEnabledState","useState","error","setError","status","setStatus","
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","useBackgroundSync","enabled","initialEnabled","canEnable","onEnabledChange","runtime","setEnabledState","useState","error","setError","status","setStatus","useSyncExternalStore","subscribeState","manager","undefined","setEnabled","useCallback","next","Error","setBackgroundScanEnabled","cause","nextError","String","reason"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-background-sync.ts"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,mBAAmB,QAAQ,sBAAmB;AAUvD,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,OAAO,EAAEC,cAAc,GAAG,KAAK;EAC/BC,SAAS;EACTC;AACwB,CAAC,GAAG,CAAC,CAAC,KAM3B;EACH,MAAMC,OAAO,GAAGN,mBAAmB,CAAC,CAAC;EACrC,MAAM,CAACE,OAAO,EAAEK,eAAe,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAACL,cAAc,CAAC;EACjE,MAAM,CAACM,KAAK,EAAEC,QAAQ,CAAC,GAAG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AAChI,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,10 @@ export const useDeviceConnection = id => {
|
|
|
6
6
|
const runtime = useBluetoothRuntime();
|
|
7
7
|
const [status, setStatus] = React.useState(() => runtime.devices.find(device => device.id === id)?.status);
|
|
8
8
|
const [events, setEvents] = React.useState([]);
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
setStatus(runtime.devices.find(device => device.id === id)?.status);
|
|
11
|
+
setEvents([]);
|
|
12
|
+
}, [id, runtime]);
|
|
9
13
|
React.useEffect(() => {
|
|
10
14
|
const unsubStatus = runtime.subscribe("status", value => {
|
|
11
15
|
if (value.deviceData.id === id) {
|
|
@@ -14,7 +18,7 @@ export const useDeviceConnection = id => {
|
|
|
14
18
|
});
|
|
15
19
|
const unsubEvent = runtime.subscribe("connection", event => {
|
|
16
20
|
if (event.deviceData.id === id) {
|
|
17
|
-
setEvents(current => [...current, event]);
|
|
21
|
+
setEvents(current => [...current, event].slice(-100));
|
|
18
22
|
}
|
|
19
23
|
});
|
|
20
24
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","useDeviceConnection","id","runtime","status","setStatus","useState","devices","find","device","events","setEvents","useEffect","unsubStatus","subscribe","value","deviceData","unsubEvent","event","current"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-device-connection.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAK9B,SAASC,mBAAmB,QAAQ,sBAAmB;AAEvD,OAAO,MAAMC,mBAAmB,GAC9BC,EAAW,IAC6D;EACxE,MAAMC,OAAO,GAAGH,mBAAmB,CAAC,CAAC;EAErC,MAAM,CAACI,MAAM,EAAEC,SAAS,CAAC,GAAGN,KAAK,CAACO,QAAQ,CACxC,MAAMH,OAAO,CAACI,OAAO,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACP,EAAE,KAAKA,EAAE,CAAC,EAAEE,MAC5D,CAAC;EAED,MAAM,CAACM,MAAM,EAAEC,SAAS,CAAC,GAAGZ,KAAK,CAACO,QAAQ,CAAmC,EAAE,CAAC;EAEhFP,KAAK,CAACa,SAAS,CAAC,MAAM;IACpB,MAAMC,WAAW,GAAGV,OAAO,CAACW,SAAS,CACnC,QAAQ,EACPC,KAAK,IAAK;MACT,IAAIA,KAAK,CAACC,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;QAACG,SAAS,CAACU,KAAK,CAACX,MAAM,CAAC;MAAC;IAC3D,CACF,CAAC;IAED,MAAMa,UAAU,GAAGd,OAAO,CAACW,SAAS,CAAwB,YAAY,EAAGI,KAAK,IAAK;MACnF,IAAIA,KAAK,CAACF,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","useDeviceConnection","id","runtime","status","setStatus","useState","devices","find","device","events","setEvents","useEffect","unsubStatus","subscribe","value","deviceData","unsubEvent","event","current","slice"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-device-connection.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAK9B,SAASC,mBAAmB,QAAQ,sBAAmB;AAEvD,OAAO,MAAMC,mBAAmB,GAC9BC,EAAW,IAC6D;EACxE,MAAMC,OAAO,GAAGH,mBAAmB,CAAC,CAAC;EAErC,MAAM,CAACI,MAAM,EAAEC,SAAS,CAAC,GAAGN,KAAK,CAACO,QAAQ,CACxC,MAAMH,OAAO,CAACI,OAAO,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACP,EAAE,KAAKA,EAAE,CAAC,EAAEE,MAC5D,CAAC;EAED,MAAM,CAACM,MAAM,EAAEC,SAAS,CAAC,GAAGZ,KAAK,CAACO,QAAQ,CAAmC,EAAE,CAAC;EAEhFP,KAAK,CAACa,SAAS,CAAC,MAAM;IACpBP,SAAS,CAACF,OAAO,CAACI,OAAO,CAACC,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACP,EAAE,KAAKA,EAAE,CAAC,EAAEE,MAAM,CAAC;IACrEO,SAAS,CAAC,EAAE,CAAC;EACf,CAAC,EAAE,CAACT,EAAE,EAAEC,OAAO,CAAC,CAAC;EAEjBJ,KAAK,CAACa,SAAS,CAAC,MAAM;IACpB,MAAMC,WAAW,GAAGV,OAAO,CAACW,SAAS,CACnC,QAAQ,EACPC,KAAK,IAAK;MACT,IAAIA,KAAK,CAACC,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;QAACG,SAAS,CAACU,KAAK,CAACX,MAAM,CAAC;MAAC;IAC3D,CACF,CAAC;IAED,MAAMa,UAAU,GAAGd,OAAO,CAACW,SAAS,CAAwB,YAAY,EAAGI,KAAK,IAAK;MACnF,IAAIA,KAAK,CAACF,UAAU,CAACd,EAAE,KAAKA,EAAE,EAAE;QAC9BS,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,CAACf,EAAE,EAAEC,OAAO,CAAC,CAAC;EAEjB,OAAO;IAAEC,MAAM;IAAEM;EAAO,CAAC;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -9,25 +9,61 @@ export const useHealthImport = ({
|
|
|
9
9
|
const [enabled, setEnabled] = React.useState(false);
|
|
10
10
|
const [statusByType, setStatusByType] = React.useState({});
|
|
11
11
|
const [error, setError] = React.useState();
|
|
12
|
+
const typesKey = React.useMemo(() => types.join("\u0000"), [types]);
|
|
13
|
+
const configRef = React.useRef({
|
|
14
|
+
adapter,
|
|
15
|
+
types,
|
|
16
|
+
background
|
|
17
|
+
});
|
|
18
|
+
configRef.current = {
|
|
19
|
+
adapter,
|
|
20
|
+
types,
|
|
21
|
+
background
|
|
22
|
+
};
|
|
12
23
|
const refresh = React.useCallback(async () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
void typesKey;
|
|
25
|
+
const {
|
|
26
|
+
adapter: currentAdapter,
|
|
27
|
+
types: currentTypes
|
|
28
|
+
} = configRef.current;
|
|
29
|
+
const entries = await Promise.allSettled(currentTypes.map(async type => [type, await currentAdapter.getStatus(type)]));
|
|
30
|
+
const rejected = entries.find(entry => entry.status === "rejected");
|
|
31
|
+
setStatusByType(current => {
|
|
32
|
+
const next = {
|
|
33
|
+
...current
|
|
34
|
+
};
|
|
35
|
+
entries.forEach(entry => {
|
|
36
|
+
if (entry.status === "fulfilled") {
|
|
37
|
+
next[entry.value[0]] = entry.value[1];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return next;
|
|
41
|
+
});
|
|
42
|
+
setEnabled(currentTypes.length > 0 && entries.every(entry => entry.status === "fulfilled" && entry.value[1] === "authorized"));
|
|
43
|
+
setError(rejected ? rejected.reason instanceof Error ? rejected.reason : new Error(String(rejected.reason)) : undefined);
|
|
44
|
+
}, [typesKey]);
|
|
20
45
|
React.useEffect(() => {
|
|
21
46
|
void refresh();
|
|
22
47
|
}, [refresh]);
|
|
23
48
|
const setEnabledForTypes = React.useCallback(async next => {
|
|
49
|
+
const {
|
|
50
|
+
adapter: currentAdapter,
|
|
51
|
+
types: currentTypes,
|
|
52
|
+
background: currentBackground
|
|
53
|
+
} = configRef.current;
|
|
24
54
|
setError(undefined);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
55
|
+
try {
|
|
56
|
+
if (next) {
|
|
57
|
+
await currentAdapter.request(currentTypes, currentBackground);
|
|
58
|
+
await refresh();
|
|
59
|
+
}
|
|
60
|
+
setEnabled(next);
|
|
61
|
+
} catch (cause) {
|
|
62
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
63
|
+
setError(nextError);
|
|
64
|
+
throw nextError;
|
|
28
65
|
}
|
|
29
|
-
|
|
30
|
-
}, [adapter, background, refresh, types]);
|
|
66
|
+
}, [refresh]);
|
|
31
67
|
const notShared = types.filter(type => statusByType[type] === "refused");
|
|
32
68
|
return {
|
|
33
69
|
enabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useHealthImport","types","background","adapter","enabled","setEnabled","useState","statusByType","setStatusByType","error","setError","refresh","useCallback","entries","Promise","
|
|
1
|
+
{"version":3,"names":["React","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"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-health-import.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAO9B,OAAO,MAAMC,eAAe,GAAGA,CAAuB;EACpDC,KAAK;EACLC,UAAU,GAAG,KAAK;EAClBC;AAKF,CAAC,KAMI;EACH,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGT,KAAK,CAACO,QAAQ,CAAyB,CAAC,CAAC,CAAC;EAClF,MAAM,CAACG,KAAK,EAAEC,QAAQ,CAAC,GAAGX,KAAK,CAACO,QAAQ,CAAQ,CAAC;EACjD,MAAMK,QAAQ,GAAGZ,KAAK,CAACa,OAAO,CAAC,MAAMX,KAAK,CAACY,IAAI,CAAC,QAAQ,CAAC,EAAE,CAACZ,KAAK,CAAC,CAAC;EACnE,MAAMa,SAAS,GAAGf,KAAK,CAACgB,MAAM,CAAC;IAAEZ,OAAO;IAAEF,KAAK;IAAEC;EAAW,CAAC,CAAC;EAE9DY,S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AC,GACpCG,SACN,CAAC;EACH,CAAC,EAAE,CAAC5B,QAAQ,CAAC,CAAC;EAEdZ,KAAK,CAACyC,SAAS,CAAC,MAAM;IAAE,KAAKvB,OAAO,CAAC,CAAC;EAAE,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAErD,MAAMwB,kBAAkB,GAAG1C,KAAK,CAACmB,WAAW,CAAC,MAAOa,IAAa,IAAK;IACpE,MAAM;MACJ5B,OAAO,EAAEgB,cAAc;MACvBlB,KAAK,EAAEmB,YAAY;MACnBlB,UAAU,EAAEwC;IACd,CAAC,GAAG5B,SAAS,CAACE,OAAO;IAErBN,QAAQ,CAAC6B,SAAS,CAAC;IAEnB,IAAI;MACF,IAAIR,IAAI,EAAE;QACR,MAAMZ,cAAc,CAACwB,OAAO,CAACvB,YAAY,EAAEsB,iBAAiB,CAAC;QAC7D,MAAMzB,OAAO,CAAC,CAAC;MACjB;MAEAZ,UAAU,CAAC0B,IAAI,CAAC;IAClB,CAAC,CAAC,OAAOa,KAAK,EAAE;MACd,MAAMC,SAAS,GAAGD,KAAK,YAAYP,KAAK,GAAGO,KAAK,GAAG,IAAIP,KAAK,CAACC,MAAM,CAACM,KAAK,CAAC,CAAC;MAE3ElC,QAAQ,CAACmC,SAAS,CAAC;MACnB,MAAMA,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","ignoreList":[]}
|
|
@@ -9,10 +9,40 @@ export const useMeasurements = (onResult, {
|
|
|
9
9
|
const runtime = useBluetoothRuntime();
|
|
10
10
|
const [measurements, setMeasurements] = React.useState([]);
|
|
11
11
|
const seen = React.useRef(new Set());
|
|
12
|
+
const seenMeasurementKinds = React.useRef(new Set());
|
|
13
|
+
const seenDailyTotals = React.useRef(new Set());
|
|
12
14
|
const onResultRef = React.useRef(onResult);
|
|
13
15
|
onResultRef.current = onResult;
|
|
16
|
+
const acceptsResult = React.useCallback(result => {
|
|
17
|
+
const measurementTypeKey = String(result.data.measurementTypeKey);
|
|
18
|
+
if (policy === "first-reading-per-kind-per-connection") {
|
|
19
|
+
if (seenMeasurementKinds.current.has(measurementTypeKey)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
seenMeasurementKinds.current.add(measurementTypeKey);
|
|
23
|
+
}
|
|
24
|
+
if (policy === "daily-totals-only") {
|
|
25
|
+
const temporal = result.data;
|
|
26
|
+
const end = temporal.end instanceof Date ? temporal.end : undefined;
|
|
27
|
+
if (end && end.getTime() > Date.now()) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
const day = temporal.end ?? temporal.start ?? temporal.recordedAt;
|
|
31
|
+
if (day instanceof Date) {
|
|
32
|
+
const key = `${measurementTypeKey}:${day.toISOString().slice(0, 10)}`;
|
|
33
|
+
if (seenDailyTotals.current.has(key)) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
seenDailyTotals.current.add(key);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}, [policy]);
|
|
14
41
|
React.useEffect(() => {
|
|
15
42
|
return runtime.subscribe("result", result => {
|
|
43
|
+
if (!acceptsResult(result)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
16
46
|
if (seen.current.has(result.id)) {
|
|
17
47
|
return;
|
|
18
48
|
}
|
|
@@ -20,30 +50,22 @@ export const useMeasurements = (onResult, {
|
|
|
20
50
|
setMeasurements(current => [...current, result].slice(-maxResults));
|
|
21
51
|
onResultRef.current?.(result);
|
|
22
52
|
});
|
|
23
|
-
}, [maxResults, runtime]);
|
|
24
|
-
|
|
25
|
-
// The manager applies device policies at source; this is a host-side guard for
|
|
26
|
-
// consumers that want a single stream policy without changing the scan config.
|
|
53
|
+
}, [acceptsResult, maxResults, runtime]);
|
|
27
54
|
React.useEffect(() => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return current.filter(result => {
|
|
34
|
-
const key = String(result.data.measurementTypeKey);
|
|
35
|
-
if (policy === "first-reading-per-kind-per-connection" && byKind.has(key)) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
byKind.add(key);
|
|
39
|
-
return true;
|
|
40
|
-
});
|
|
55
|
+
const unsubscribe = runtime.subscribe("connection", event => {
|
|
56
|
+
if (event.kind === "bonded") {
|
|
57
|
+
seenMeasurementKinds.current.clear();
|
|
58
|
+
seenDailyTotals.current.clear();
|
|
59
|
+
}
|
|
41
60
|
});
|
|
42
|
-
|
|
61
|
+
return unsubscribe;
|
|
62
|
+
}, [runtime]);
|
|
43
63
|
return {
|
|
44
64
|
measurements,
|
|
45
65
|
clear: () => {
|
|
46
66
|
seen.current.clear();
|
|
67
|
+
seenMeasurementKinds.current.clear();
|
|
68
|
+
seenDailyTotals.current.clear();
|
|
47
69
|
setMeasurements([]);
|
|
48
70
|
}
|
|
49
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","useMeasurements","onResult","policy","maxResults","runtime","measurements","setMeasurements","useState","seen","useRef","Set","onResultRef","current","
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","useMeasurements","onResult","policy","maxResults","runtime","measurements","setMeasurements","useState","seen","useRef","Set","seenMeasurementKinds","seenDailyTotals","onResultRef","current","acceptsResult","useCallback","result","measurementTypeKey","String","data","has","add","temporal","end","Date","undefined","getTime","now","day","start","recordedAt","key","toISOString","slice","useEffect","subscribe","id","unsubscribe","event","kind","clear"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-measurements.ts"],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qC,SAAS,CAAC,MAAM;IACpB,MAAMG,WAAW,GAAGlC,OAAO,CAACgC,SAAS,CAAyB,YAAY,EAAGG,KAAK,IAAK;MACrF,IAAIA,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE;QAC3B7B,oBAAoB,CAACG,OAAO,CAAC2B,KAAK,CAAC,CAAC;QACpC7B,eAAe,CAACE,OAAO,CAAC2B,KAAK,CAAC,CAAC;MACjC;IACF,CAAC,CAAC;IAEF,OAAOH,WAAW;EACpB,CAAC,EAAE,CAAClC,OAAO,CAAC,CAAC;EAEb,OAAO;IACLC,YAAY;IACZoC,KAAK,EAAEA,CAAA,KAAM;MACXjC,IAAI,CAACM,OAAO,CAAC2B,KAAK,CAAC,CAAC;MACpB9B,oBAAoB,CAACG,OAAO,CAAC2B,KAAK,CAAC,CAAC;MACpC7B,eAAe,CAACE,OAAO,CAAC2B,KAAK,CAAC,CAAC;MAC/BnC,eAAe,CAAC,EAAE,CAAC;IACrB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,14 @@ import { useBluetoothRuntime } from "./runtime-context.js";
|
|
|
5
5
|
export const useNearbyDevices = () => {
|
|
6
6
|
const runtime = useBluetoothRuntime();
|
|
7
7
|
const [, redraw] = React.useReducer(value => value + 1, 0);
|
|
8
|
-
React.useEffect(() =>
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const unsubscribeFound = runtime.subscribe("deviceFound", redraw);
|
|
10
|
+
const unsubscribeStatus = runtime.subscribe("status", redraw);
|
|
11
|
+
return () => {
|
|
12
|
+
unsubscribeFound();
|
|
13
|
+
unsubscribeStatus();
|
|
14
|
+
};
|
|
15
|
+
}, [runtime]);
|
|
9
16
|
return {
|
|
10
17
|
devices: runtime.devices,
|
|
11
18
|
pair: async id => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","useNearbyDevices","runtime","redraw","useReducer","value","useEffect","subscribe","devices","pair","id","device","find","item","connect"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-nearby-devices.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAAwBC,mBAAmB,QAAQ,sBAAmB;AAEtE,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAG3B;EACH,MAAMC,OAAO,GAAGF,mBAAmB,CAAC,CAAC;EACrC,MAAM,GAAGG,MAAM,CAAC,GAAGJ,KAAK,CAACK,UAAU,CAAEC,KAAK,IAAKA,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;EAE5DN,KAAK,CAACO,SAAS,CAAC,
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","useNearbyDevices","runtime","redraw","useReducer","value","useEffect","unsubscribeFound","subscribe","unsubscribeStatus","devices","pair","id","device","find","item","connect"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-nearby-devices.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAI9B,SAAwBC,mBAAmB,QAAQ,sBAAmB;AAEtE,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAG3B;EACH,MAAMC,OAAO,GAAGF,mBAAmB,CAAC,CAAC;EACrC,MAAM,GAAGG,MAAM,CAAC,GAAGJ,KAAK,CAACK,UAAU,CAAEC,KAAK,IAAKA,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;EAE5DN,KAAK,CAACO,SAAS,CAAC,MAAM;IACpB,MAAMC,gBAAgB,GAAGL,OAAO,CAACM,SAAS,CAAC,aAAa,EAAEL,MAAM,CAAC;IACjE,MAAMM,iBAAiB,GAAGP,OAAO,CAACM,SAAS,CAAC,QAAQ,EAAEL,MAAM,CAAC;IAE7D,OAAO,MAAM;MACXI,gBAAgB,CAAC,CAAC;MAClBE,iBAAiB,CAAC,CAAC;IACrB,CAAC;EACH,CAAC,EAAE,CAACP,OAAO,CAAC,CAAC;EAEb,OAAO;IACLQ,OAAO,EAAER,OAAO,CAACQ,OAAO;IACxBC,IAAI,EAAE,MAAOC,EAAE,IAAK;MAClB,MAAMC,MAAM,GAAGX,OAAO,CAACQ,OAAO,CAACI,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACH,EAAE,KAAKA,EAAE,CAAC;MAE7D,IAAIC,MAAM,EAAE;QAAC,MAAMA,MAAM,CAACA,MAAM,CAACG,OAAO,CAAC,CAAC;MAAC;MAE3C,OAAOH,MAAM;IACf;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -10,21 +10,36 @@ export const usePairedDevices = ({
|
|
|
10
10
|
autoPair = false
|
|
11
11
|
}) => {
|
|
12
12
|
const runtime = useBluetoothRuntime();
|
|
13
|
-
const [paired, setPaired] = React.useState([]);
|
|
13
|
+
const [paired, setPaired] = React.useState(() => runtime.getPairedDeviceIds(storageKey) ?? []);
|
|
14
|
+
const pairedRef = React.useRef(paired);
|
|
14
15
|
const save = React.useCallback(async next => {
|
|
16
|
+
pairedRef.current = next;
|
|
15
17
|
setPaired(next);
|
|
18
|
+
runtime.setPairedDeviceIds(storageKey, next);
|
|
16
19
|
await storage.setItem(storageKey, JSON.stringify(next));
|
|
17
|
-
}, [storage, storageKey]);
|
|
20
|
+
}, [runtime, storage, storageKey]);
|
|
21
|
+
React.useEffect(() => runtime.subscribe("pairedDevices", event => {
|
|
22
|
+
if (event.storageKey !== storageKey) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const next = runtime.getPairedDeviceIds(storageKey) ?? [];
|
|
26
|
+
pairedRef.current = next;
|
|
27
|
+
setPaired(next);
|
|
28
|
+
}), [runtime, storageKey]);
|
|
18
29
|
React.useEffect(() => {
|
|
19
|
-
void
|
|
30
|
+
void runtime.loadPairedDeviceIds(storageKey, async () => {
|
|
31
|
+
const value = await storage.getItem(storageKey);
|
|
20
32
|
try {
|
|
21
33
|
const parsed = value ? JSON.parse(value) : [];
|
|
22
|
-
|
|
34
|
+
return Array.isArray(parsed) ? parsed.filter(id => typeof id === "string") : [];
|
|
23
35
|
} catch {
|
|
24
|
-
|
|
36
|
+
return [];
|
|
25
37
|
}
|
|
38
|
+
}).then(next => {
|
|
39
|
+
pairedRef.current = next;
|
|
40
|
+
setPaired(next);
|
|
26
41
|
});
|
|
27
|
-
}, [storage, storageKey]);
|
|
42
|
+
}, [runtime, storage, storageKey]);
|
|
28
43
|
React.useEffect(() => {
|
|
29
44
|
if (!autoPair) {
|
|
30
45
|
return;
|
|
@@ -33,10 +48,13 @@ export const usePairedDevices = ({
|
|
|
33
48
|
}, [autoPair, paired, runtime, runtime.devices]);
|
|
34
49
|
return {
|
|
35
50
|
paired,
|
|
36
|
-
pair: device => save([...new Set([...
|
|
51
|
+
pair: device => save([...new Set([...pairedRef.current, device.id])]),
|
|
37
52
|
forget: async id => {
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
if (!runtime.manager) {
|
|
54
|
+
throw new Error("Bluetooth manager is not ready; try forgetting the device again.");
|
|
55
|
+
}
|
|
56
|
+
await runtime.manager.forget(id);
|
|
57
|
+
await save(pairedRef.current.filter(candidate => candidate !== id));
|
|
40
58
|
}
|
|
41
59
|
};
|
|
42
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","usePairedDevices","storage","storageKey","autoPair","runtime","paired","setPaired","useState","save","useCallback","next","setItem","JSON","stringify","useEffect","
|
|
1
|
+
{"version":3,"names":["React","useBluetoothRuntime","usePairedDevices","storage","storageKey","autoPair","runtime","paired","setPaired","useState","getPairedDeviceIds","pairedRef","useRef","save","useCallback","next","current","setPairedDeviceIds","setItem","JSON","stringify","useEffect","subscribe","event","loadPairedDeviceIds","value","getItem","parsed","parse","Array","isArray","filter","id","then","devices","device","includes","forEach","connect","pair","Set","forget","manager","Error","candidate"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-paired-devices.ts"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAAwBC,mBAAmB,QAA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AAC,kEAAkE,CAAC;MACrF;MAEA,MAAMrC,OAAO,CAACoC,OAAO,CAACD,MAAM,CAACT,EAAE,CAAC;MAChC,MAAMnB,IAAI,CAACF,SAAS,CAACK,OAAO,CAACe,MAAM,CAAEa,SAAS,IAAKA,SAAS,KAAKZ,EAAE,CAAC,CAAC;IACvE;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -15,17 +15,14 @@ export const useRequestPermissions = ({
|
|
|
15
15
|
}, []);
|
|
16
16
|
React.useEffect(() => {
|
|
17
17
|
const requestPermissions = async () => {
|
|
18
|
-
const
|
|
19
|
-
android: [PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, PERMISSIONS.ANDROID.BLUETOOTH_SCAN, PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION],
|
|
20
|
-
ios: [PERMISSIONS.IOS.BLUETOOTH]
|
|
21
|
-
});
|
|
18
|
+
const requestedPermissions = Platform.OS === "android" ? Number(Platform.Version) >= 31 ? [PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, PERMISSIONS.ANDROID.BLUETOOTH_SCAN] : [PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION] : [PERMISSIONS.IOS.BLUETOOTH];
|
|
22
19
|
sentryLogger("info", "BT_PROVIDER: Permissions requesting", {
|
|
23
|
-
permissions
|
|
20
|
+
permissions: requestedPermissions
|
|
24
21
|
});
|
|
25
|
-
requestMultiple(
|
|
26
|
-
const allGranted =
|
|
22
|
+
requestMultiple(requestedPermissions).then(grantedPermissions => {
|
|
23
|
+
const allGranted = requestedPermissions.every(permission => grantedPermissions[permission] === "granted");
|
|
27
24
|
sentryLogger("info", "BT_PROVIDER: Permissions requested", {
|
|
28
|
-
permissions,
|
|
25
|
+
permissions: grantedPermissions,
|
|
29
26
|
allGranted
|
|
30
27
|
});
|
|
31
28
|
onChangeRef.current?.(allGranted);
|