@ovok/native 1.6.1 → 1.6.3
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/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 +4 -2
- 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 +22 -6
- 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 +27 -1
- 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/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 +4 -1
- 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 +5 -3
- 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/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/android-background-sync.js.map +1 -1
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +12 -1
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.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-management/components/android-bluetooth-foreground-service.js +12 -1
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +109 -39
- 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 +37 -14
- 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 +32 -8
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +52 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +20 -11
- 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/index.js +11 -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 +5 -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 +56 -16
- 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 +0 -1
- 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 +22 -2
- 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 +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +4 -0
- 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/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-sync.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-sync.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/index.js +11 -0
- package/lib/commonjs/modules/data-sync/index.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/android-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +40 -5
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/get-data-from-provider-props.js +4 -0
- package/lib/commonjs/modules/data-sync/types/get-total-count-props.js +4 -0
- package/lib/commonjs/modules/data-sync/types/health-data.js +12 -0
- package/lib/commonjs/modules/data-sync/types/health-data.js.map +1 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +39 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +232 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +36 -6
- 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 +40 -9
- 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 +1 -0
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-latest-observation-dates-by-code.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +90 -14
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +100 -14
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js +12 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +21 -17
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.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/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/image/components/optimized-image.js +18 -0
- 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/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/ui/components/background-sync-setting.js +11 -5
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +19 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/health-import-card.js +15 -3
- package/lib/commonjs/modules/ui/components/health-import-card.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 +75 -31
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +3 -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 +6 -4
- 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 +3 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.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 +22 -6
- 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 +27 -1
- 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/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 +4 -1
- 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 +5 -3
- 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/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/android-background-sync.js.map +1 -1
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +12 -1
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.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-management/components/android-bluetooth-foreground-service.js +12 -1
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +110 -41
- 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 +37 -14
- 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 +32 -8
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +52 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +20 -11
- 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/index.js +1 -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 +5 -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 +56 -16
- 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 +0 -1
- 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 +22 -2
- 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 +1 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +4 -0
- 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/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-sync.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-sync.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/index.js +1 -0
- package/lib/module/modules/data-sync/index.js.map +1 -1
- package/lib/module/modules/data-sync/services/android-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +40 -5
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/module/modules/data-sync/types/get-data-from-provider-props.js +2 -0
- package/lib/module/modules/data-sync/types/get-total-count-props.js +2 -0
- package/lib/module/modules/data-sync/types/health-data.js +7 -0
- package/lib/module/modules/data-sync/types/health-data.js.map +1 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js +38 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +227 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +37 -7
- 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 +41 -10
- 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 +1 -0
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-latest-observation-dates-by-code.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +92 -16
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +100 -14
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-records-count.js +12 -1
- package/lib/module/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +20 -16
- package/lib/module/modules/data-sync/utils/get-total-samples-count.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/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/image/components/optimized-image.js +18 -0
- 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/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/ui/components/background-sync-setting.js +11 -5
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +19 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/health-import-card.js +15 -3
- package/lib/module/modules/ui/components/health-import-card.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 +78 -34
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +4 -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 +6 -4
- 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 +4 -1
- package/lib/module/modules/ui/use-ovok-ui.js.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/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/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/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/android-background-sync.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/background-sync/android-background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.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-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +13 -4
- 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 +4 -0
- 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 +6 -2
- 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-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/index.d.ts +1 -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 +6 -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/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/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/data-sync/components/android/android-health-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-sync.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/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/android-health-sync-service.d.ts +4 -4
- package/lib/typescript/commonjs/src/modules/data-sync/services/android-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts +1 -3
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +7 -9
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +6 -6
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/convert-data-props.d.ts +6 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/convert-data-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-total-count-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-total-count-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +7 -5
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts +1 -2
- 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 +1 -2
- 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/get-latest-observation-dates-by-code.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +6 -8
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +20 -4
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts +3 -8
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.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/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/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/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/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/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/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/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/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/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/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/android-background-sync.d.ts +3 -2
- package/lib/typescript/module/src/modules/background-sync/android-background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.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-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +13 -4
- 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 +4 -0
- 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 +6 -2
- 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-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/index.d.ts +1 -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 +6 -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/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/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/data-sync/components/android/android-health-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-sync.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/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/android-health-sync-service.d.ts +4 -4
- package/lib/typescript/module/src/modules/data-sync/services/android-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts +1 -3
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +7 -9
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +6 -6
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/convert-data-props.d.ts +6 -2
- package/lib/typescript/module/src/modules/data-sync/types/convert-data-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-total-count-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/get-total-count-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +3 -3
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts +14 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +19 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +7 -5
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts +1 -2
- 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 +1 -2
- 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/get-latest-observation-dates-by-code.d.ts +3 -3
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +6 -8
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +20 -4
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts +3 -8
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.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/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/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/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/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/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/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 +2 -2
|
@@ -31,31 +31,36 @@ const urineAnalyteRanges = {
|
|
|
31
31
|
min: 0,
|
|
32
32
|
max: 250,
|
|
33
33
|
normalMin: 0,
|
|
34
|
-
normalMax: 0
|
|
34
|
+
normalMax: 0,
|
|
35
|
+
negativeAtZero: true
|
|
35
36
|
},
|
|
36
37
|
bil: {
|
|
37
38
|
min: 0,
|
|
38
39
|
max: 6,
|
|
39
40
|
normalMin: 0,
|
|
40
|
-
normalMax: 0
|
|
41
|
+
normalMax: 0,
|
|
42
|
+
negativeAtZero: true
|
|
41
43
|
},
|
|
42
44
|
ket: {
|
|
43
45
|
min: 0,
|
|
44
46
|
max: 80,
|
|
45
47
|
normalMin: 0,
|
|
46
|
-
normalMax: 15
|
|
48
|
+
normalMax: 15,
|
|
49
|
+
negativeAtZero: true
|
|
47
50
|
},
|
|
48
51
|
glu: {
|
|
49
52
|
min: 0,
|
|
50
53
|
max: 1000,
|
|
51
54
|
normalMin: 0,
|
|
52
|
-
normalMax: 0
|
|
55
|
+
normalMax: 0,
|
|
56
|
+
negativeAtZero: true
|
|
53
57
|
},
|
|
54
58
|
pro: {
|
|
55
59
|
min: 0,
|
|
56
60
|
max: 300,
|
|
57
61
|
normalMin: 0,
|
|
58
|
-
normalMax: 14
|
|
62
|
+
normalMax: 14,
|
|
63
|
+
negativeAtZero: true
|
|
59
64
|
},
|
|
60
65
|
ph: {
|
|
61
66
|
min: 5,
|
|
@@ -67,13 +72,16 @@ const urineAnalyteRanges = {
|
|
|
67
72
|
min: 0,
|
|
68
73
|
max: 1,
|
|
69
74
|
normalMin: 0,
|
|
70
|
-
normalMax: 0
|
|
75
|
+
normalMax: 0,
|
|
76
|
+
negativeAtZero: true,
|
|
77
|
+
qualitative: true
|
|
71
78
|
},
|
|
72
79
|
leu: {
|
|
73
80
|
min: 0,
|
|
74
81
|
max: 500,
|
|
75
82
|
normalMin: 0,
|
|
76
|
-
normalMax: 25
|
|
83
|
+
normalMax: 25,
|
|
84
|
+
negativeAtZero: true
|
|
77
85
|
},
|
|
78
86
|
sg: {
|
|
79
87
|
min: 1.005,
|
|
@@ -105,18 +113,24 @@ export const measurementFieldCatalog = {
|
|
|
105
113
|
unit: "mmHg",
|
|
106
114
|
min: 30,
|
|
107
115
|
max: 300,
|
|
116
|
+
normalMin: 90,
|
|
117
|
+
normalMax: 120,
|
|
108
118
|
required: true
|
|
109
119
|
},
|
|
110
120
|
diastolic: {
|
|
111
121
|
unit: "mmHg",
|
|
112
122
|
min: 10,
|
|
113
123
|
max: 220,
|
|
124
|
+
normalMin: 60,
|
|
125
|
+
normalMax: 80,
|
|
114
126
|
required: true
|
|
115
127
|
},
|
|
116
128
|
heartRate: {
|
|
117
129
|
unit: "bpm",
|
|
118
130
|
min: 20,
|
|
119
|
-
max: 300
|
|
131
|
+
max: 300,
|
|
132
|
+
normalMin: 60,
|
|
133
|
+
normalMax: 100
|
|
120
134
|
}
|
|
121
135
|
},
|
|
122
136
|
[MeasurementTypeKey.bodyWeight]: {
|
|
@@ -132,6 +146,8 @@ export const measurementFieldCatalog = {
|
|
|
132
146
|
unit: "Cel",
|
|
133
147
|
min: 25,
|
|
134
148
|
max: 45,
|
|
149
|
+
normalMin: 36.5,
|
|
150
|
+
normalMax: 37.3,
|
|
135
151
|
required: true
|
|
136
152
|
}
|
|
137
153
|
},
|
|
@@ -148,12 +164,16 @@ export const measurementFieldCatalog = {
|
|
|
148
164
|
unit: "%",
|
|
149
165
|
min: 50,
|
|
150
166
|
max: 100,
|
|
167
|
+
normalMin: 95,
|
|
168
|
+
normalMax: 100,
|
|
151
169
|
required: true
|
|
152
170
|
},
|
|
153
171
|
pulseRate: {
|
|
154
172
|
unit: "bpm",
|
|
155
173
|
min: 20,
|
|
156
174
|
max: 300,
|
|
175
|
+
normalMin: 60,
|
|
176
|
+
normalMax: 100,
|
|
157
177
|
required: true
|
|
158
178
|
},
|
|
159
179
|
perfusionIndex: {
|
|
@@ -172,6 +192,8 @@ export const measurementFieldCatalog = {
|
|
|
172
192
|
unit: "bpm",
|
|
173
193
|
min: 20,
|
|
174
194
|
max: 300,
|
|
195
|
+
normalMin: 60,
|
|
196
|
+
normalMax: 100,
|
|
175
197
|
required: true
|
|
176
198
|
}
|
|
177
199
|
},
|
|
@@ -180,6 +202,8 @@ export const measurementFieldCatalog = {
|
|
|
180
202
|
unit: "/min",
|
|
181
203
|
min: 2,
|
|
182
204
|
max: 90,
|
|
205
|
+
normalMin: 12,
|
|
206
|
+
normalMax: 20,
|
|
183
207
|
required: true
|
|
184
208
|
}
|
|
185
209
|
},
|
|
@@ -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","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;;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","URINE_ANALYTE_DEFINITIONS","urineAnalyteRanges","uro","min","max","normalMin","normalMax","bld","negativeAtZero","bil","ket","glu","pro","ph","nit","qualitative","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;;AAmBA,MAAMC,kBAAkB,GAAG;EACzBC,GAAG,EAAE;IAAEC,GAAG,EAAE,GAA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,GAAG,EAAE,CAAC;MAAEC,GAAG,EAAE;IAAG,CAAC;IAC9C0C,UAAU,EAAE;MAAEf,IAAI,EAAE,IAAI;MAAE5B,GAAG,EAAE,GAAG;MAAEC,GAAG,EAAE;IAAK;EAChD,CAAC;EACD,CAACL,kBAAkB,CAACsC,SAAS,GAAG;IAC9BA,SAAS,EAAE;MAAEN,IAAI,EAAE,KAAK;MAAE5B,GAAG,EAAE,EAAE;MAAEC,GAAG,EAAE,GAAG;MAAEC,SAAS,EAAE,EAAE;MAAEC,SAAS,EAAE,GAAG;MAAE6B,QAAQ,EAAE;IAAK;EAC7F,CAAC;EACD,CAACpC,kBAAkB,CAACgD,eAAe,GAAG;IACpCA,eAAe,EAAE;MAAEhB,IAAI,EAAE,MAAM;MAAE5B,GAAG,EAAE,CAAC;MAAEC,GAAG,EAAE,EAAE;MAAEC,SAAS,EAAE,EAAE;MAAEC,SAAS,EAAE,EAAE;MAAE6B,QAAQ,EAAE;IAAK;EACjG,CAAC;EACD,CAACpC,kBAAkB,CAACiD,aAAa,GAAG7B,mBAAmB;EACvD,CAACpB,kBAAkB,CAACkD,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() {
|
|
@@ -37,6 +56,38 @@ export const createBluetoothRuntime = bleManager => {
|
|
|
37
56
|
currentManager = manager;
|
|
38
57
|
subscribers.forEach(notify => notify());
|
|
39
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
|
+
},
|
|
40
91
|
upsertDevice: device => {
|
|
41
92
|
const existing = currentDevices.findIndex(item => item.id === device.id);
|
|
42
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,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const usePairedDevices = ({
|
|
|
10
10
|
autoPair = false
|
|
11
11
|
}) => {
|
|
12
12
|
const runtime = useBluetoothRuntime();
|
|
13
|
-
const [paired, setPaired] = React.useState([]);
|
|
14
|
-
const pairedRef = React.useRef(
|
|
15
|
-
const [, redraw] = React.useReducer(value => value + 1, 0);
|
|
13
|
+
const [paired, setPaired] = React.useState(() => runtime.getPairedDeviceIds(storageKey) ?? []);
|
|
14
|
+
const pairedRef = React.useRef(paired);
|
|
16
15
|
const save = React.useCallback(async next => {
|
|
17
16
|
pairedRef.current = next;
|
|
18
17
|
setPaired(next);
|
|
18
|
+
runtime.setPairedDeviceIds(storageKey, next);
|
|
19
19
|
await storage.setItem(storageKey, JSON.stringify(next));
|
|
20
|
-
}, [storage, storageKey]);
|
|
21
|
-
React.useEffect(() => runtime.subscribe("
|
|
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]);
|
|
22
29
|
React.useEffect(() => {
|
|
23
|
-
void
|
|
30
|
+
void runtime.loadPairedDeviceIds(storageKey, async () => {
|
|
31
|
+
const value = await storage.getItem(storageKey);
|
|
24
32
|
try {
|
|
25
33
|
const parsed = value ? JSON.parse(value) : [];
|
|
26
|
-
|
|
27
|
-
pairedRef.current = next;
|
|
28
|
-
setPaired(next);
|
|
34
|
+
return Array.isArray(parsed) ? parsed.filter(id => typeof id === "string") : [];
|
|
29
35
|
} catch {
|
|
30
|
-
|
|
36
|
+
return [];
|
|
31
37
|
}
|
|
38
|
+
}).then(next => {
|
|
39
|
+
pairedRef.current = next;
|
|
40
|
+
setPaired(next);
|
|
32
41
|
});
|
|
33
|
-
}, [storage, storageKey]);
|
|
42
|
+
}, [runtime, storage, storageKey]);
|
|
34
43
|
React.useEffect(() => {
|
|
35
44
|
if (!autoPair) {
|
|
36
45
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useBluetoothRuntime","usePairedDevices","storage","storageKey","autoPair","runtime","paired","setPaired","useState","
|
|
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,QAAQ,sBAAmB;AAatE,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAC/BC,OAAO;EACPC,UAAU,GAAG,6BAA6B;EAC1CC,QAAQ,GAAG;AACY,CAAC,KAIrB;EACH,MAAMC,OAAO,GAAGL,mBAAmB,CAAC,CAAC;EAErC,MAAM,CAACM,MAAM,EAAEC,SAAS,CAAC,GAAGR,KAAK,CAACS,QAAQ,CACxC,MAAMH,OAAO,CAACI,kBAAkB,CAACN,UAAU,CAAC,IAAI,EAClD,CAAC;EAED,MAAMO,SAAS,GAAGX,KAAK,CAACY,MAAM,CAAoBL,MAAM,CAAC;EAEzD,MAAMM,IAAI,GAAGb,KAAK,CAACc,WAAW,CAAC,MAAOC,IAAuB,IAAK;IAChEJ,SAAS,CAACK,OAAO,GAAGD,IAAI;IACxBP,SAAS,CAACO,IAAI,CAAC;IACfT,OAAO,CAACW,kBAAkB,CAACb,UAAU,EAAEW,IAAI,CAAC;IAC5C,MAAMZ,OAAO,CAACe,OAAO,CAACd,UAAU,EAAEe,IAAI,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AC4B,OAAO,CACZH,MAAM,CAAEI,MAAM,IAAK5B,MAAM,CAAC6B,QAAQ,CAACD,MAAM,CAACH,EAAE,CAAC,CAAC,CAC9CK,OAAO,CAAEF,MAAM,IAAK,KAAKA,MAAM,CAACA,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC;EACtD,CAAC,EAAE,CAACjC,QAAQ,EAAEE,MAAM,EAAED,OAAO,EAAEA,OAAO,CAAC4B,OAAO,CAAC,CAAC;EAEhD,OAAO;IACL3B,MAAM;IACNgC,IAAI,EAAGJ,MAAM,IAAKtB,IAAI,CAAC,CAAC,GAAG,IAAI2B,GAAG,CAAC,CAAC,GAAG7B,SAAS,CAACK,OAAO,EAAEmB,MAAM,CAACH,EAAE,CAAC,CAAC,CAAC,CAAC;IACvES,MAAM,EAAE,MAAOT,EAAE,IAAK;MACpB,IAAI,CAAC1B,OAAO,CAACoC,OAAO,EAAE;QACpB,MAAM,IAAIC,KAAK,CAAC,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);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AppState","Linking","Platform","PERMISSIONS","requestMultiple","slog","sentryLogger","useRequestPermissions","onAccessPermissionChanged","onChangeRef","useRef","accessPermission","setAccessPermission","useState","undefined","openBleSetting","useCallback","openSettings","useEffect","requestPermissions","
|
|
1
|
+
{"version":3,"names":["React","AppState","Linking","Platform","PERMISSIONS","requestMultiple","slog","sentryLogger","useRequestPermissions","onAccessPermissionChanged","onChangeRef","useRef","accessPermission","setAccessPermission","useState","undefined","openBleSetting","useCallback","openSettings","useEffect","requestPermissions","requestedPermissions","OS","Number","Version","ANDROID","BLUETOOTH_CONNECT","BLUETOOTH_SCAN","ACCESS_FINE_LOCATION","IOS","BLUETOOTH","permissions","then","grantedPermissions","allGranted","every","permission","current","catch","error","listener","addEventListener","state","remove"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/hooks/use-request-permissions.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAC1D,SAASC,WAAW,EAAEC,eAAe,QAAQ,0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,OAAO,GAAGH,UAAU,CAAC;QACjCrB,mBAAmB,CAACqB,UAAU,CAAC;MACjC,CAAC,CAAC,CACDI,KAAK,CAAEC,KAAK,IAAKjC,IAAI,CAACiC,KAAK,EAAE,6BAA6B,CAAC,CAAC;IACjE,CAAC;IAED,MAAMC,QAAQ,GAAGvC,QAAQ,CAACwC,gBAAgB,CAAC,QAAQ,EAAGC,KAAK,IAAK;MAC9D,IAAIA,KAAK,KAAK,QAAQ,EAAE;QACtB;MACF;MACAtB,kBAAkB,CAAC,CAAC;IACtB,CAAC,CAAC;IAEFA,kBAAkB,CAAC,CAAC;IAEpB,OAAO,MAAM;MACXoB,QAAQ,CAACG,MAAM,CAAC,CAAC;IACnB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN3C,KAAK,CAACmB,SAAS,CAAC,MAAM;IACpBT,WAAW,CAAC2B,OAAO,GAAG5B,yBAAyB;EACjD,CAAC,EAAE,CAACA,yBAAyB,CAAC,CAAC;EAE/B,OAAO;IACLG,gBAAgB;IAChBI;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -43,6 +43,7 @@ export * from "./services/background-sync/background-ble-manager.js";
|
|
|
43
43
|
export * from "./services/background-sync/background-sync-coordinator.js";
|
|
44
44
|
export * from "./services/background-sync/background-service-uuids.js";
|
|
45
45
|
export * from "./utils/result-identity.js";
|
|
46
|
+
export * from "./utils/device-title.js";
|
|
46
47
|
export * from "./testing/index.js";
|
|
47
48
|
export * from "./services/custom/define-custom-device.js";
|
|
48
49
|
export * from "./services/devices/standard-gatt/standard-gatt.devices.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,c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AA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/bt-management/index.ts"],"mappings":";;AAAA,cAAc,gCAA6B;AAC3C,cAAc,4BAAyB;AACvC,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,6BAA0B;AACxC,cAAc,qCAAkC;AAChD,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,8BAA2B;AACzC,cAAc,8BAA2B;AACzC,cAAc,6BAA0B;AACxC,cAAc,+BAA4B;AAC1C,cAAc,gCAA6B;AAC3C,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,2BAAwB;AACtC,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,0BAAuB;AACrC,cAAc,+BAA4B;AAC1C,cAAc,6BAA0B;AACxC,cAAc,yBAAsB;AACpC,cAAc,0BAAuB;AACrC,cAAc,6BAA0B;AACxC,cAAc,sCAAmC;AACjD,cAAc,4BAAyB;AACvC,cAAc,4BAAyB;AACvC,cAAc,2BAAwB;AACtC,cAAc,4BAAyB;AACvC,cAAc,0CAAuC;AACrD,cAAc,oCAAiC;AAC/C,cAAc,0BAAuB;AAErC,cAAc,yCAAsC;AACpD,cAAc,0DAAuD;AACrE,cAAc,4CAAyC;AACvD,cAAc,0BAAuB;AACrC,cAAc,sDAAmD;AACjE,cAAc,2DAAwD;AACtE,cAAc,wDAAqD;AACnE,cAAc,4BAAyB;AACvC,cAAc,yBAAsB;AACpC,cAAc,oBAAW;AACzB,cAAc,2CAAwC;AACtD,cAAc,2DAAwD;AACtE,cAAc,yCAAsC;AACpD,cAAc,oDAAiD;AAC/D,cAAc,mDAAgD;AAC9D,cAAc,0DAAuD;AACrE,cAAc,kDAA+C;AAC7D,cAAc,uDAAoD;AAClE,cAAc,0DAAuD;AACrE,cAAc,mDAAgD;AAC9D,cAAc,4CAAyC;AACvD,cAAc,4CAAyC;AACvD,cAAc,iDAA8C;AAC5D,cAAc,+CAA4C;AAC1D,cAAc,mDAAgD;AAC9D,cAAc,+CAA4C;AAC1D,cAAc,2CAAwC;AACtD,cAAc,8CAA2C;AACzD,cAAc,4CAAyC;AACvD,cAAc,0CAAuC;AACrD,cAAc,6CAA0C;AACxD,cAAc,+CAA4C;AAC1D,cAAc,+CAA4C;AAE1D,cAAc,0CAAuC;AAErD,cAAc,6BAA0B;AACxC,cAAc,yCAAsC;AACpD,cAAc,6CAA0C;AACxD,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,+BAA4B;AAC1C,cAAc,kCAA+B;AAC7C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,8BAA2B;AACzC,cAAc,6BAA0B","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js
CHANGED
|
@@ -76,7 +76,11 @@ class BackgroundSyncCoordinator {
|
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
78
|
} catch (error) {
|
|
79
|
-
|
|
79
|
+
const queueError = new Error(`Background sync queue could not be read: ${error instanceof Error ? error.message : String(error)}`);
|
|
80
|
+
await this.options.storage.setItem(`${this.storageKey}.corrupt`, serialized);
|
|
81
|
+
await this.options.storage.setItem(this.storageKey, "[]");
|
|
82
|
+
this.options.onError?.(queueError);
|
|
83
|
+
return [];
|
|
80
84
|
}
|
|
81
85
|
};
|
|
82
86
|
writeQueue = async queue => {
|
package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["recordOvokMetric","reviveResultDates","DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","createQueueId","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","stableId","id","push","queueId","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","error","message","String","setItem","stringify","changed","exhausted","resetExhausted","includeExhausted","onResult","splice","indexOf","measurementTypeKey","data","Number","MAX_SAFE_INTEGER"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,qCAAkC;AAInE,SAASC,iBAAiB,QAAQ,gCAA6B;AAiB/D,MAAMC,iBAAiB,GAAG,sCAAsC;AAChE,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,IAAIC,cAAc,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGA,CAAA,KAAc;EACnCD,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIH,cAAc,IAAII,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACrF,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAc;EAClCR,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CA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,EAAE,IAAI0B,KAAK,CAAC1B,EAAE,IAAIxB,cAAc,CAAC;UAC9C;QACF,CAAC;MACH,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOmD,KAAK,EAAE;MACd,
|
|
1
|
+
{"version":3,"names":["recordOvokMetric","reviveResultDates","DEFAULT_QUEUE_KEY","DEFAULT_MAX_RETRIES","DEFAULT_RETRY_BACKOFF_MS","resultSequence","createResultId","Date","now","Math","random","toString","slice","createQueueId","BackgroundSyncCoordinator","operation","Promise","resolve","constructor","options","storageKey","maxRetries","max","retryBackoffMs","enqueue","result","runExclusive","queue","readQueue","stableId","id","push","queueId","queuedAt","toISOString","attempt","nextAttemptAt","writeQueue","length","flushQueue","flush","next","then","catch","undefined","serialized","storage","getItem","parsed","JSON","parse","Array","isArray","Error","map","item","typed","error","queueError","message","String","setItem","onError","stringify","changed","exhausted","resetExhausted","includeExhausted","onResult","splice","indexOf","measurementTypeKey","data","Number","MAX_SAFE_INTEGER"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/background-sync/background-sync-coordinator.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,qCAAkC;AAInE,SAASC,iBAAiB,QAAQ,gCAA6B;AAiB/D,MAAMC,iBAAiB,GAAG,sCAAsC;AAChE,MAAMC,mBAAmB,GAAG,CAAC;AAC7B,MAAMC,wBAAwB,GAAG,MAAM;AAEvC,IAAIC,cAAc,GAAG,CAAC;AAEtB,MAAMC,cAAc,GAAGA,CAAA,KAAc;EACnCD,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIH,cAAc,IAAII,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACrF,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAc;EAClCR,cAAc,IAAI,CAAC;EAEnB,OAAO,GAAGE,IAAI,CAAC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S,EAAE;UAAK,CAAC,CAAC;QAC3E;QACAD,OAAO,GAAG,IAAI;MAChB;IACF;IAEA,IAAIA,OAAO,EAAE;MACX,MAAM,IAAI,CAAC3B,UAAU,CAACV,KAAK,CAAC;MAC5B3B,gBAAgB,CAAC,kBAAkB,EAAE2B,KAAK,CAACW,MAAM,CAAC;IACpD;EACF,CAAC;AACH;AAEA,SAASxB,yBAAyB,EAAEZ,iBAAiB","ignoreList":[]}
|
|
@@ -16,6 +16,8 @@ const bluetoothErrorCallback = error => {
|
|
|
16
16
|
code: normalized.code
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
+
const SCAN_RETRY_DELAY_MS = 1_000;
|
|
20
|
+
const SCAN_RESTART_DELAY_MS = 1_000;
|
|
19
21
|
class BTManager {
|
|
20
22
|
static MAX_DEVICES = 15; // Safety limit to prevent unbounded growth
|
|
21
23
|
devices = new Map();
|
|
@@ -33,6 +35,21 @@ class BTManager {
|
|
|
33
35
|
this.deviceCreator = new DeviceCreator(this.acceptedDevices);
|
|
34
36
|
this.backgroundScanEnabled = options.backgroundEnabled === true;
|
|
35
37
|
}
|
|
38
|
+
setAutoConnect = (enabledOrOptions, delayMs, onDeviceSelectionRequired) => {
|
|
39
|
+
const enabled = typeof enabledOrOptions === "boolean" ? enabledOrOptions : enabledOrOptions.enabled;
|
|
40
|
+
const nextDelayMs = typeof enabledOrOptions === "boolean" ? delayMs : enabledOrOptions.delayMs;
|
|
41
|
+
const nextSelectionHandler = typeof enabledOrOptions === "boolean" ? onDeviceSelectionRequired : enabledOrOptions.onDeviceSelectionRequired;
|
|
42
|
+
this.options.autoConnect = enabled;
|
|
43
|
+
this.options.autoConnectDelayMs = nextDelayMs ?? this.options.autoConnectDelayMs;
|
|
44
|
+
this.options.onDeviceSelectionRequired = nextSelectionHandler;
|
|
45
|
+
if (!enabled) {
|
|
46
|
+
this.autoConnectCandidates.clear();
|
|
47
|
+
if (this.autoConnectTimer) {
|
|
48
|
+
clearTimeout(this.autoConnectTimer);
|
|
49
|
+
this.autoConnectTimer = undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
36
53
|
destroy = () => {
|
|
37
54
|
sentryLogger("info", "BT_MANAGER: Destroying BTManager");
|
|
38
55
|
this.destroyed = true;
|
|
@@ -49,7 +66,7 @@ class BTManager {
|
|
|
49
66
|
this.onDeviceStatusChangedCallback = undefined;
|
|
50
67
|
this.onConnectionEventCallback = undefined;
|
|
51
68
|
this.devices.forEach(device => {
|
|
52
|
-
device.
|
|
69
|
+
void device.disconnect();
|
|
53
70
|
});
|
|
54
71
|
this.devices.clear();
|
|
55
72
|
this.forgottenDeviceIds.clear();
|
|
@@ -61,20 +78,18 @@ class BTManager {
|
|
|
61
78
|
}
|
|
62
79
|
const generation = ++this.scanGeneration;
|
|
63
80
|
let subscription;
|
|
64
|
-
let poweredOnBeforeSubscription = false;
|
|
65
81
|
const onStateChange = state => {
|
|
66
82
|
if (this.destroyed || generation !== this.scanGeneration) {
|
|
67
83
|
return;
|
|
68
84
|
}
|
|
69
85
|
if (state === State.PoweredOn) {
|
|
70
|
-
if (subscription) {
|
|
71
|
-
this.removeStateChangeListener(subscription);
|
|
72
|
-
} else {
|
|
73
|
-
poweredOnBeforeSubscription = true;
|
|
74
|
-
}
|
|
75
86
|
this.startDeviceScan(generation);
|
|
76
87
|
return;
|
|
77
88
|
}
|
|
89
|
+
this.scanActive = false;
|
|
90
|
+
this.scanStarting = false;
|
|
91
|
+
this.bleManager.stopDeviceScan();
|
|
92
|
+
this.onErrorCallback?.(bluetoothErrorCallback("Bluetooth is powered off"));
|
|
78
93
|
sentryLogger("warning", "BT_MANAGER: State is not PoweredOn, sending intent to enable Bluetooth");
|
|
79
94
|
|
|
80
95
|
// Only send intent on Android — iOS has no programmatic way to power on
|
|
@@ -92,12 +107,8 @@ class BTManager {
|
|
|
92
107
|
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
93
108
|
return;
|
|
94
109
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} else {
|
|
98
|
-
this.stateChangeListener = subscription;
|
|
99
|
-
this.eventSubscriptions.push(subscription);
|
|
100
|
-
}
|
|
110
|
+
this.stateChangeListener = subscription;
|
|
111
|
+
this.eventSubscriptions.push(subscription);
|
|
101
112
|
};
|
|
102
113
|
|
|
103
114
|
/** Switches only the scan policy; the app can keep a foreground scan broad. */
|
|
@@ -115,6 +126,7 @@ class BTManager {
|
|
|
115
126
|
this.scanGeneration += 1;
|
|
116
127
|
this.scanActive = false;
|
|
117
128
|
this.scanStarting = false;
|
|
129
|
+
this.clearScanTimers();
|
|
118
130
|
this.removeStateChangeListener();
|
|
119
131
|
this.bleManager.stopDeviceScan();
|
|
120
132
|
|
|
@@ -129,7 +141,7 @@ class BTManager {
|
|
|
129
141
|
this.onDeviceStatusChangedCallback = undefined;
|
|
130
142
|
this.onConnectionEventCallback = undefined;
|
|
131
143
|
this.devices.forEach(device => {
|
|
132
|
-
device.
|
|
144
|
+
void device.disconnect();
|
|
133
145
|
});
|
|
134
146
|
this.devices.clear();
|
|
135
147
|
};
|
|
@@ -148,6 +160,7 @@ class BTManager {
|
|
|
148
160
|
this.scanGeneration += 1;
|
|
149
161
|
this.scanActive = false;
|
|
150
162
|
this.scanStarting = false;
|
|
163
|
+
this.clearScanTimers();
|
|
151
164
|
this.removeStateChangeListener();
|
|
152
165
|
this.bleManager.stopDeviceScan();
|
|
153
166
|
};
|
|
@@ -172,9 +185,32 @@ class BTManager {
|
|
|
172
185
|
this.scanGeneration += 1;
|
|
173
186
|
this.scanActive = false;
|
|
174
187
|
this.scanStarting = false;
|
|
188
|
+
this.clearScanTimers();
|
|
175
189
|
this.removeStateChangeListener();
|
|
176
190
|
this.bleManager.stopDeviceScan();
|
|
177
|
-
this.
|
|
191
|
+
this.scanRestartTimer = setTimeout(() => {
|
|
192
|
+
this.scanRestartTimer = undefined;
|
|
193
|
+
this.startScan();
|
|
194
|
+
}, SCAN_RESTART_DELAY_MS);
|
|
195
|
+
};
|
|
196
|
+
clearScanTimers = () => {
|
|
197
|
+
if (this.scanRetryTimer) {
|
|
198
|
+
clearTimeout(this.scanRetryTimer);
|
|
199
|
+
this.scanRetryTimer = undefined;
|
|
200
|
+
}
|
|
201
|
+
if (this.scanRestartTimer) {
|
|
202
|
+
clearTimeout(this.scanRestartTimer);
|
|
203
|
+
this.scanRestartTimer = undefined;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
scheduleScanRetry = generation => {
|
|
207
|
+
if (this.destroyed || generation !== this.scanGeneration || this.scanRetryTimer) {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.scanRetryTimer = setTimeout(() => {
|
|
211
|
+
this.scanRetryTimer = undefined;
|
|
212
|
+
this.startDeviceScan(generation);
|
|
213
|
+
}, SCAN_RETRY_DELAY_MS);
|
|
178
214
|
};
|
|
179
215
|
removeStateChangeListener = (subscription = this.stateChangeListener) => {
|
|
180
216
|
if (!subscription) {
|
|
@@ -199,6 +235,7 @@ class BTManager {
|
|
|
199
235
|
return;
|
|
200
236
|
}
|
|
201
237
|
this.scanStarting = true;
|
|
238
|
+
let scanFailed = false;
|
|
202
239
|
try {
|
|
203
240
|
this.bleManager.startDeviceScan(this.backgroundScanEnabled ? [...serviceUUIDs] : null, {
|
|
204
241
|
scanMode: this.backgroundScanEnabled ? ScanMode.LowPower : ScanMode.Balanced
|
|
@@ -207,17 +244,20 @@ class BTManager {
|
|
|
207
244
|
return;
|
|
208
245
|
}
|
|
209
246
|
if (error) {
|
|
247
|
+
scanFailed = true;
|
|
210
248
|
this.scanActive = false;
|
|
249
|
+
this.scheduleScanRetry(generation);
|
|
211
250
|
}
|
|
212
251
|
this.onScanResult(error, device);
|
|
213
252
|
});
|
|
214
|
-
this.scanActive =
|
|
253
|
+
this.scanActive = !scanFailed;
|
|
215
254
|
sentryLogger("info", "BT_MANAGER: Scan started (continuous mode)");
|
|
216
255
|
addOvokSpanEvent("bluetooth.scan.started", {
|
|
217
256
|
platform: Platform.OS,
|
|
218
257
|
background: this.backgroundScanEnabled
|
|
219
258
|
});
|
|
220
259
|
} catch (error) {
|
|
260
|
+
this.scheduleScanRetry(generation);
|
|
221
261
|
this.onErrorCallback?.(bluetoothErrorCallback(error));
|
|
222
262
|
} finally {
|
|
223
263
|
this.scanStarting = false;
|