@ovok/native 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/android/src/main/AndroidManifest.xml +1 -20
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokBackgroundSyncModule.java +25 -3
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokHealthConnectWorker.java +6 -2
- package/app.plugin.js +86 -7
- package/lib/commonjs/index.js +5 -115
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/default-translation.js +69 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +47 -17
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/index.js +1 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/login-link.js +4 -3
- package/lib/commonjs/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +6 -3
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +8 -6
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-out-google.js +16 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/status.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-device/index.js +0 -22
- package/lib/commonjs/modules/bt-device/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device-instructions/index.js +39 -0
- package/lib/commonjs/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +64 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +2 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +43 -54
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +18 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js +21 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +22 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +4 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +75 -37
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +97 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +52 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +43 -28
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +10 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/push-notification.js +39 -0
- package/lib/commonjs/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +81 -1
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +17 -0
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/title.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/title.js.map +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +7 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js +55 -0
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +40 -6
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/commonjs/modules/diary/components/no-data.js +1 -2
- package/lib/commonjs/modules/diary/components/no-data.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-select.js +13 -13
- package/lib/commonjs/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +11 -4
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +2 -3
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +133 -46
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/commonjs/modules/image/components/optimized-image.js +29 -8
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js +0 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js +0 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/date-range.js +4 -3
- package/lib/commonjs/modules/measurement/components/date-range.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/setting/components/list-header.js +1 -2
- package/lib/commonjs/modules/setting/components/list-header.js.map +1 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js +0 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/commonjs/modules/tab/components/tab-item.js +0 -1
- package/lib/commonjs/modules/tab/components/tab-item.js.map +1 -1
- package/lib/commonjs/modules/theme/utils/generate-theme.js +35 -4
- package/lib/commonjs/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/commonjs/modules/tile/components/measured-value.js +0 -3
- package/lib/commonjs/modules/tile/components/measured-value.js.map +1 -1
- package/lib/commonjs/modules/tile/components/title.js +0 -1
- package/lib/commonjs/modules/tile/components/title.js.map +1 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +20 -4
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/commonjs/modules/ui/components/health-import-card.js +25 -2
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js +95 -0
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +103 -34
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +11 -4
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/commonjs/modules/ui/components/urine-test-result.js +7 -2
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/modules/ui/use-ovok-ui.js +5 -2
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/module/index.js +3 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +68 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +47 -17
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/index.js +1 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +30 -3
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/module/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +10 -8
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/description.js +0 -1
- package/lib/module/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/title.js +5 -2
- package/lib/module/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/register/components/login-link.js +4 -3
- package/lib/module/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/module/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/module/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +6 -3
- package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/module/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +8 -6
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/module/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +4 -3
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/module/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/module/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/module/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-out-google.js +12 -0
- package/lib/module/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/module/modules/background-sync/background-safe-storage.js +3 -6
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/status.js +1 -2
- package/lib/module/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/module/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/title.js +1 -2
- package/lib/module/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-device/index.js +0 -2
- package/lib/module/modules/bt-device/index.js.map +1 -1
- package/lib/module/modules/bt-device-instructions/index.js +6 -0
- package/lib/module/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +58 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +2 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +42 -53
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +18 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +56 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +8 -4
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +5 -1
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-health-import.js +48 -12
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-measurements.js +40 -18
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +8 -1
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +27 -9
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-scan-control.js +16 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +2 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +4 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +75 -37
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +98 -2
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js +68 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +48 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +4 -3
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +44 -29
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +10 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +2 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/push-notification.js +34 -0
- package/lib/module/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +79 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +8 -2
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +12 -0
- package/lib/module/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +1 -1
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -1
- package/lib/module/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/module/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/module/modules/content/content-card/components/title.js +1 -3
- package/lib/module/modules/content/content-card/components/title.js.map +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +12 -3
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +8 -2
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +13 -0
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +19 -4
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +30 -21
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-observation-device.js +50 -0
- package/lib/module/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/module/modules/data-sync/utils/retry-save.js +39 -7
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -1
- package/lib/module/modules/diary/components/no-data.js +1 -2
- package/lib/module/modules/diary/components/no-data.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-select.js +13 -13
- package/lib/module/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/module/modules/helpers/index.js +1 -1
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +3 -4
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +133 -46
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -1
- package/lib/module/modules/image/components/optimized-image.js +29 -8
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/journal/past-journal/components/title.js +0 -1
- package/lib/module/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/module/modules/language-switcher/components/option/label.js +0 -1
- package/lib/module/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/module/modules/measurement/components/date-range.js +4 -3
- package/lib/module/modules/measurement/components/date-range.js.map +1 -1
- package/lib/module/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/module/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +3 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/setting/components/list-header.js +1 -2
- package/lib/module/modules/setting/components/list-header.js.map +1 -1
- package/lib/module/modules/setting/components/setting-list-item.js +0 -1
- package/lib/module/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/module/modules/tab/components/tab-item.js +0 -1
- package/lib/module/modules/tab/components/tab-item.js.map +1 -1
- package/lib/module/modules/theme/utils/generate-theme.js +35 -4
- package/lib/module/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/module/modules/tile/components/measured-value.js +0 -3
- package/lib/module/modules/tile/components/measured-value.js.map +1 -1
- package/lib/module/modules/tile/components/title.js +0 -1
- package/lib/module/modules/tile/components/title.js.map +1 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +20 -4
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +33 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +10 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -1
- package/lib/module/modules/ui/components/health-import-card.js +25 -2
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/module/modules/ui/components/manual-entry-form.js +14 -1
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -1
- package/lib/module/modules/ui/components/measurement-trend-chart.js +91 -0
- package/lib/module/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +106 -37
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +12 -5
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/module/modules/ui/components/urine-test-result.js +7 -2
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/modules/ui/use-ovok-ui.js +6 -3
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -10
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +2 -5
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +3 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +9 -3
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +3 -2
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +3 -2
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +2 -1
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Keep this dependency out of the root Bluetooth barrel. It is loaded only when an
|
|
4
|
+
// app opts into background notifications, while the notifications subpath remains the
|
|
5
|
+
// public API for permission management.
|
|
6
|
+
const notificationsModuleName = "expo-notifications";
|
|
7
|
+
const getNotifications = () => {
|
|
8
|
+
try {
|
|
9
|
+
return require(notificationsModuleName);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
throw new Error("Background notifications require expo-notifications. Install it and configure its app plugin before using this feature.", {
|
|
12
|
+
cause: error
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const showBackgroundPushNotification = async ({
|
|
17
|
+
title,
|
|
18
|
+
body,
|
|
19
|
+
data
|
|
20
|
+
}) => {
|
|
21
|
+
await getNotifications().scheduleNotificationAsync({
|
|
22
|
+
content: {
|
|
23
|
+
title,
|
|
24
|
+
...(body === undefined ? {} : {
|
|
25
|
+
body
|
|
26
|
+
}),
|
|
27
|
+
...(data === undefined ? {} : {
|
|
28
|
+
data
|
|
29
|
+
})
|
|
30
|
+
},
|
|
31
|
+
trigger: null
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=push-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["notificationsModuleName","getNotifications","require","error","Error","cause","showBackgroundPushNotification","title","body","data","scheduleNotificationAsync","content","undefined","trigger"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/push-notification.ts"],"mappings":";;AAiBA;AACA;AACA;AACA,MAAMA,uBAAuB,GAAG,oBAAoB;AAEpD,MAAMC,gBAAgB,GAAGA,CAAA,KAA2B;EAClD,IAAI;IACF,OAAOC,OAAO,CAACF,uBAAuB,CAAC;EACzC,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,MAAM,IAAIC,KAAK,CACb,yHAAyH,EACzH;MAAEC,KAAK,EAAEF;IAAM,CACjB,CAAC;EACH;AACF,CAAC;AAED,OAAO,MAAMG,8BAA8B,GAAG,MAAAA,CAAO;EACnDC,KAAK;EACLC,IAAI;EACJC;AACuB,CAAC,KAAoB;EAC5C,MAAMR,gBAAgB,CAAC,CAAC,CAACS,yBAAyB,CAAC;IACjDC,OAAO,EAAE;MACPJ,KAAK;MACL,IAAIC,IAAI,KAAKI,SAAS,GAAG,CAAC,CAAC,GAAG;QAAEJ;MAAK,CAAC,CAAC;MACvC,IAAIC,IAAI,KAAKG,SAAS,GAAG,CAAC,CAAC,GAAG;QAAEH;MAAK,CAAC;IACxC,CAAC;IACDI,OAAO,EAAE;EACX,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,84 @@ import { State } from "react-native-ble-plx";
|
|
|
6
6
|
|
|
7
7
|
/** A deterministic BLE manager for hook and scan integration tests. No hardware is used. */
|
|
8
8
|
|
|
9
|
+
const characteristicKey = (serviceUuid, characteristicUuid) => `${serviceUuid}/${characteristicUuid}`;
|
|
10
|
+
|
|
11
|
+
/** Creates a GATT-capable fake device for connection and notification tests. */
|
|
12
|
+
export const createFakeBleDevice = ({
|
|
13
|
+
id,
|
|
14
|
+
name = id,
|
|
15
|
+
localName = name,
|
|
16
|
+
manufacturerData = "",
|
|
17
|
+
serviceUUIDs = [],
|
|
18
|
+
mtu = 23,
|
|
19
|
+
characteristics = {}
|
|
20
|
+
}) => {
|
|
21
|
+
let connected = false;
|
|
22
|
+
let currentMtu = mtu;
|
|
23
|
+
const values = new Map(Object.entries(characteristics));
|
|
24
|
+
const disconnectedCallbacks = new Set();
|
|
25
|
+
const notificationCallbacks = new Map();
|
|
26
|
+
const fake = {
|
|
27
|
+
id,
|
|
28
|
+
name,
|
|
29
|
+
localName,
|
|
30
|
+
manufacturerData,
|
|
31
|
+
serviceUUIDs: [...serviceUUIDs],
|
|
32
|
+
mtu: currentMtu,
|
|
33
|
+
isConnected: async () => connected,
|
|
34
|
+
connect: async () => {
|
|
35
|
+
connected = true;
|
|
36
|
+
return fake;
|
|
37
|
+
},
|
|
38
|
+
cancelConnection: async () => {
|
|
39
|
+
connected = false;
|
|
40
|
+
disconnectedCallbacks.forEach(callback => callback(null, fake));
|
|
41
|
+
return fake;
|
|
42
|
+
},
|
|
43
|
+
discoverAllServicesAndCharacteristics: async () => fake,
|
|
44
|
+
onDisconnected: callback => {
|
|
45
|
+
disconnectedCallbacks.add(callback);
|
|
46
|
+
return {
|
|
47
|
+
remove: () => disconnectedCallbacks.delete(callback)
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
requestMTU: async requestedMtu => {
|
|
51
|
+
currentMtu = requestedMtu;
|
|
52
|
+
return {
|
|
53
|
+
mtu: currentMtu
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
readCharacteristicForService: async (serviceUuid, characteristicUuid) => ({
|
|
57
|
+
value: values.get(characteristicKey(serviceUuid, characteristicUuid)) ?? null
|
|
58
|
+
}),
|
|
59
|
+
monitorCharacteristicForService: (serviceUuid, characteristicUuid, callback) => {
|
|
60
|
+
const key = characteristicKey(serviceUuid, characteristicUuid);
|
|
61
|
+
const callbacks = notificationCallbacks.get(key) ?? new Set();
|
|
62
|
+
callbacks.add(callback);
|
|
63
|
+
notificationCallbacks.set(key, callbacks);
|
|
64
|
+
return {
|
|
65
|
+
remove: () => callbacks.delete(callback)
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
writeCharacteristicWithResponseForService: async () => fake,
|
|
69
|
+
writeCharacteristicWithoutResponseForService: async () => fake
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
device: fake,
|
|
73
|
+
emitCharacteristic: (serviceUuid, characteristicUuid, value) => {
|
|
74
|
+
const key = characteristicKey(serviceUuid, characteristicUuid);
|
|
75
|
+
const characteristic = {
|
|
76
|
+
uuid: characteristicUuid,
|
|
77
|
+
value
|
|
78
|
+
};
|
|
79
|
+
values.set(key, value);
|
|
80
|
+
notificationCallbacks.get(key)?.forEach(callback => callback(null, characteristic));
|
|
81
|
+
},
|
|
82
|
+
disconnect: async () => {
|
|
83
|
+
await fake.cancelConnection();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
9
87
|
export const createFakeBleManager = ({
|
|
10
88
|
state = State.PoweredOn,
|
|
11
89
|
devices = []
|
|
@@ -35,6 +113,7 @@ export const createFakeBleManager = ({
|
|
|
35
113
|
};
|
|
36
114
|
return {
|
|
37
115
|
manager,
|
|
116
|
+
createDevice: createFakeBleDevice,
|
|
38
117
|
emitDevice: device => scanCallback?.(null, device),
|
|
39
118
|
emitError: error => scanCallback?.(error, null),
|
|
40
119
|
setState: nextState => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["State","
|
|
1
|
+
{"version":3,"names":["State","characteristicKey","serviceUuid","characteristicUuid","createFakeBleDevice","id","name","localName","manufacturerData","serviceUUIDs","mtu","characteristics","connected","currentMtu","values","Map","Object","entries","disconnectedCallbacks","Set","notificationCallbacks","fake","isConnected","connect","cancelConnection","forEach","callback","discoverAllServicesAndCharacteristics","onDisconnected","add","remove","delete","requestMTU","requestedMtu","readCharacteristicForService","value","get","monitorCharacteristicForService","key","callbacks","set","writeCharacteristicWithResponseForService","writeCharacteristicWithoutResponseForService","device","emitCharacteristic","characteristic","uuid","disconnect","createFakeBleManager","state","PoweredOn","devices","currentState","scanCallback","stateCallbacks","scannedServiceUUIDs","manager","onStateChange","emitCurrentState","startDeviceScan","_options","stopDeviceScan","undefined","createDevice","emitDevice","emitError","error","setState","nextState","getScannedServiceUUIDs"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/testing/fake-ble-manager.ts"],"mappings":";;AAAA;;AAEA,SAA6BA,KAAK,QAAsB,sBAAsB;;AA2B9E;;AAWA,MAAMC,iBAAiB,GAAGA,CAACC,WAAmB,EAAEC,kBAA0B,KACxE,GAAGD,WAAW,IAAIC,kBAAkB,EAAE;;AAExC;AACA,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,EAAE;EACFC,IAAI,GAAGD,EAAE;EACTE,SAAS,GAAGD,IAAI;EAChBE,gBAAgB,GAAG,EAAE;EACrBC,YAAY,GAAG,EAAE;EACjBC,GAAG,GAAG,EAAE;EACRC,eAAe,GAAG,CAAC;AACC,CAAC,KAAoB;EACzC,IAAIC,SAAS,GAAG,KAAK;EACrB,IAAIC,UAAU,GAAGH,GAAG;EACpB,MAAMI,MAAM,GAAG,IAAIC,GAAG,CAACC,MAA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C","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ export let BluetoothErrorCode = /*#__PURE__*/function (BluetoothErrorCode) {
|
|
|
6
6
|
BluetoothErrorCode["UNKNOWN"] = "bluetooth.unknown";
|
|
7
7
|
BluetoothErrorCode["PERMISSION_DENIED"] = "bluetooth.permission-denied";
|
|
8
8
|
BluetoothErrorCode["UNSUPPORTED"] = "bluetooth.unsupported";
|
|
9
|
+
BluetoothErrorCode["POWERED_OFF"] = "bluetooth.powered-off";
|
|
9
10
|
BluetoothErrorCode["SCAN_FAILED"] = "bluetooth.scan-failed";
|
|
10
11
|
BluetoothErrorCode["CONNECTION_FAILED"] = "bluetooth.connection-failed";
|
|
11
12
|
BluetoothErrorCode["PAIRING_REQUIRED"] = "bluetooth.pairing-required";
|
|
@@ -40,17 +41,22 @@ export const bluetoothErrorCodeFor = error => {
|
|
|
40
41
|
return error.code;
|
|
41
42
|
}
|
|
42
43
|
const message = messageFor(error);
|
|
43
|
-
const
|
|
44
|
+
const structured = error;
|
|
45
|
+
const errorCode = structured?.errorCode;
|
|
46
|
+
const structuredCodes = [errorCode, structured?.androidErrorCode, structured?.iosErrorCode].map(value => String(value ?? "").toLowerCase());
|
|
44
47
|
if (/permission|unauthori[sz]ed|denied/i.test(message)) {
|
|
45
48
|
return BluetoothErrorCode.PERMISSION_DENIED;
|
|
46
49
|
}
|
|
47
50
|
if (/unsupported/i.test(message)) {
|
|
48
51
|
return BluetoothErrorCode.UNSUPPORTED;
|
|
49
52
|
}
|
|
53
|
+
if (structuredCodes.some(code => /poweredoff|bluetoothoff/.test(code)) || /bluetooth(?:le)?\s+(?:is\s+)?(?:currently\s+)?(?:powered\s+)?off/i.test(message)) {
|
|
54
|
+
return BluetoothErrorCode.POWERED_OFF;
|
|
55
|
+
}
|
|
50
56
|
if (/scan/i.test(message) || errorCode === "ScanStartFailed") {
|
|
51
57
|
return BluetoothErrorCode.SCAN_FAILED;
|
|
52
58
|
}
|
|
53
|
-
if (/pair|bond|authentication/i.test(message)) {
|
|
59
|
+
if (structuredCodes.some(code => /pair|bond|auth|encryption|insufficientsecurity/.test(code)) || [5, 8, 15, 137].includes(Number(structured?.androidErrorCode)) || /pair|bond|authentication|passkey|pin/i.test(message)) {
|
|
54
60
|
return BluetoothErrorCode.PAIRING_REQUIRED;
|
|
55
61
|
}
|
|
56
62
|
if (/connect|disconnect/i.test(message)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BluetoothErrorCode","BluetoothError","Error","name","constructor","code","message","translationKey","originalError","translationKeyFor","test","undefined","messageFor","error","String","bluetoothErrorCodeFor","errorCode","PERMISSION_DENIED","UNSUPPORTED","SCAN_FAILED","PAIRING_REQUIRED","CONNECTION_FAILED","FRAME_INVALID","MEASUREMENT_FAILED","UNKNOWN","toBluetoothError"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/bluetooth-error.ts"],"mappings":";;AAAA;;AAIA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;
|
|
1
|
+
{"version":3,"names":["BluetoothErrorCode","BluetoothError","Error","name","constructor","code","message","translationKey","originalError","translationKeyFor","test","undefined","messageFor","error","String","bluetoothErrorCodeFor","structured","errorCode","structuredCodes","androidErrorCode","iosErrorCode","map","value","toLowerCase","PERMISSION_DENIED","UNSUPPORTED","some","POWERED_OFF","SCAN_FAILED","includes","Number","PAIRING_REQUIRED","CONNECTION_FAILED","FRAME_INVALID","MEASUREMENT_FAILED","UNKNOWN","toBluetoothError"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/bluetooth-error.ts"],"mappings":";;AAAA;;AAIA,WAAYA,kBAAkB,0BAAlBA,kBAA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OAAOlC,kBAAkB,CAACmC,OAAO;AACnC,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAIvB,KAAc,IAAqB;EAClE,IAAIA,KAAK,YAAYZ,cAAc,EAAE;IACnC,OAAOY,KAAK;EACd;EAEA,MAAMP,OAAO,GAAGM,UAAU,CAACC,KAAK,CAAC;EAEjC,OAAO,IAAIZ,cAAc,CACvBc,qBAAqB,CAACF,KAAK,CAAC,EAC5BP,OAAO,EACPG,iBAAiB,CAACH,OAAO,CAAC,EAC1BO,KACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the most useful human-readable name for a connected device.
|
|
5
|
+
* Reported maker/model data is more specific than the advertised name, while
|
|
6
|
+
* the catalog name remains a safe fallback for devices that expose neither.
|
|
7
|
+
*/
|
|
8
|
+
export const deviceTitle = deviceData => {
|
|
9
|
+
const reportedTitle = [deviceData.manufacturerName, deviceData.model].filter(Boolean).join(" ").trim();
|
|
10
|
+
return reportedTitle || deviceData.localName || String(deviceData.name);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=device-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["deviceTitle","deviceData","reportedTitle","manufacturerName","model","filter","Boolean","join","trim","localName","String","name"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/device-title.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAIC,UAAsB,IAAa;EAC7D,MAAMC,aAAa,GAAG,CAACD,UAAU,CAACE,gBAAgB,EAAEF,UAAU,CAACG,KAAK,CAAC,CAClEC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,IAAI,CAAC,CAAC;EAET,OAAON,aAAa,IAAID,UAAU,CAACQ,SAAS,IAAIC,MAAM,CAACT,UAAU,CAACU,IAAI,CAAC;AACzE,CAAC","ignoreList":[]}
|
|
@@ -31,7 +31,7 @@ const hash = value => {
|
|
|
31
31
|
* delivery metadata is deliberately not part of the key.
|
|
32
32
|
*/
|
|
33
33
|
export const createStableResultId = (deviceData, data) => {
|
|
34
|
-
const deviceIdentity = deviceData.sn || deviceData.
|
|
34
|
+
const deviceIdentity = deviceData.sn || deviceData.manufacturerData || deviceData.model || deviceData.name || deviceData.id;
|
|
35
35
|
return `ovok:${hash(JSON.stringify(canonicalize({
|
|
36
36
|
device: deviceIdentity,
|
|
37
37
|
name: deviceData.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["canonicalize","value","Date","toISOString","Array","isArray","map","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","padStart","createStableResultId","deviceData","data","deviceIdentity","sn","
|
|
1
|
+
{"version":3,"names":["canonicalize","value","Date","toISOString","Array","isArray","map","Object","fromEntries","entries","sort","left","right","localeCompare","key","nested","hash","first","second","index","length","code","charCodeAt","Math","imul","toString","padStart","createStableResultId","deviceData","data","deviceIdentity","sn","manufacturerData","model","name","id","JSON","stringify","device","reviveResultDates","revive","current","includes","date","Number","isNaN","getTime","item","childKey","childValue"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/result-identity.ts"],"mappings":";;AAAA;;AAMA,MAAMA,YAAY,GAAIC,KAAc,IAAc;EAChD,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB,OAAOD,KAAK,CAACE,WAAW,CAAC,CAAC;EAC5B;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK,CAACK,GAAG,CAACN,YAAY,CAAC;EAChC;EAEA,IAAIC,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACtC,OAAOM,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACR,KAAK,CAAC,CAClBS,IAAI,CAAC,C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,IAAI,CAACC,SAAS,CACZrC,YAAY,CAAC;IACXsC,MAAM,EAAER,cAAc;IACtBI,IAAI,EAAEN,UAAU,CAACM,IAAI;IACrBL;EACF,CAAC,CACH,CACF,CAAC,EAAE;AACL,CAAC;AAED,OAAO,MAAMU,iBAAiB,GAAOtC,KAAQ,IAAQ;EACnD,MAAMuC,MAAM,GAAGA,CAACC,OAAgB,EAAE3B,GAAY,KAAc;IAC1D,IACE,OAAO2B,OAAO,KAAK,QAAQ,IAC3B,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,CAACC,QAAQ,CAAC5B,GAAG,IAAI,EAAE,CAAC,EAClD;MACA,MAAM6B,IAAI,GAAG,IAAIzC,IAAI,CAACuC,OAAO,CAAC;MAE9B,OAAOG,MAAM,CAACC,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,GAAGL,OAAO,GAAGE,IAAI;IACtD;IAEA,IAAIvC,KAAK,CAACC,OAAO,CAACoC,OAAO,CAAC,EAAE;MAC1B,OAAOA,OAAO,CAACnC,GAAG,CAAEyC,IAAI,IAAKP,MAAM,CAACO,IAAI,CAAC,CAAC;IAC5C;IAEA,IAAIN,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAC1C,OAAOlC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACgC,OAAO,CAAC,CAACnC,GAAG,CAAC,CAAC,CAAC0C,QAAQ,EAAEC,UAAU,CAAC,KAAK,CACtDD,QAAQ,EACRR,MAAM,CAACS,UAAU,EAAED,QAAQ,CAAC,CAC7B,CACH,CAAC;IACH;IAEA,OAAOP,OAAO;EAChB,CAAC;EAED,OAAOD,MAAM,CAACvC,KAAK,CAAC;AACtB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","Text","useAppTheme","jsx","_jsx","CoverBadge","label","size","style","textStyle","children","testID","theme","textVariant","charAt","toUpperCase","slice","styles","container","backgroundColor","colors","surface","top","spacing","left","paddingHorizontal","paddingVertical","borderRadius","variant","text","color","primary","undefined","create","position","zIndex"
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","Text","useAppTheme","jsx","_jsx","CoverBadge","label","size","style","textStyle","children","testID","theme","textVariant","charAt","toUpperCase","slice","styles","container","backgroundColor","colors","surface","top","spacing","left","paddingHorizontal","paddingVertical","borderRadius","variant","text","color","primary","undefined","create","position","zIndex"],"sourceRoot":"../../../../../../src","sources":["modules/content/content-card/components/cover-badge.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,IAAI,QAAQ,oBAAoB;AAGzC,SAASC,WAAW,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG7C,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,KAAK;EACLC,IAAI,GAAG,OAAO;EACdC,KAAK;EACLC,SAAS;EACTC,QAAQ;EACRC;AAC0B,CAAC,KAAK;EAChC,MAAMC,KAAK,GAAGV,WAAW,CAAC,CAAC;EAE3B,MAAMW,WAAW,GACf,QAAQN,IAAI,CAACO,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGR,IAAI,CAACS,KAAK,CAAC,CAAC,CAAC,EAAwB;EAE9E,oBACEZ,IAAA,CAACJ,IAAI;IACHQ,KAAK,EAAE,CACLS,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEP,KAAK,CAACQ,MAAM,CAACC,OAAO;MACrCC,GAAG,EAAEV,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC;MACrBC,IAAI,EAAEZ,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC;MACtBE,iBAAiB,EAAEb,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC;MACnCG,eAAe,EAAEd,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC;MACjCI,YAAY,EAAEf,KAAK,CAACe,YAAY,CAAC,IAAI;IACvC,CAAC,EACDnB,KAAK,CACL;IACFG,MAAM,EAAEA,MAAO;IAAAD,QAAA,eAEfN,IAAA,CAACH,IAAI;MACH2B,OAAO,EAAEf,WAAY;MACrBL,KAAK,EAAE,CAACS,MAAM,CAACY,IAAI,EAAE;QAAEC,KAAK,EAAElB,KAAK,CAACQ,MAAM,CAACW;MAAQ,CAAC,EAAEtB,SAAS,CAAE;MACjEE,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,OAAO,GAAGqB,SAAU;MAAAtB,QAAA,EAE7CJ,KAAK,IAAII;IAAQ,CACd;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGlB,UAAU,CAACkC,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV,CAAC;EACDN,IAAI,EAAE,CACN;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","jsx","_jsx","Title","children","style","variant","testID","props","numberOfLines","styles","title","create"
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","jsx","_jsx","Title","children","style","variant","testID","props","numberOfLines","styles","title","create"],"sourceRoot":"../../../../../../src","sources":["modules/content/content-card/components/title.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,IAAI,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAI1C,OAAO,MAAMC,KAAK,GAAGA,CAAC;EACpBC,QAAQ;EACRC,KAAK;EACLC,OAAO,GAAG,YAAY;EACtBC,MAAM;EACN,GAAGC;AACkB,CAAC,KAAK;EAC3B,oBACEN,IAAA,CAACF,IAAI;IACHS,aAAa,EAAE,CAAE;IAAA,GACbD,KAAK;IACTF,OAAO,EAAEA,OAAQ;IACjBD,KAAK,EAAE,CAACK,MAAM,CAACC,KAAK,EAAEN,KAAK,CAAE;IAC7BE,MAAM,EAAEA,MAAO;IAAAH,QAAA,EAEdA;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGX,UAAU,CAACa,MAAM,CAAC;EAC/BD,KAAK,EAAE,CACP;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useWindowDimensions","RenderHtml","HTMLElementModel","HTMLContentModel","OptimizedImage","useAppTheme","useComposition","jsx","_jsx","customHTMLElementModels","img","fromCustomModel","tagName","contentModel","mixed","renderers","tnode","src","width","height","attributes","uri","Number","undefined","ContentDetailRichContent","content","props","composition","theme","htmlContent","useMemo","section","find","s","text","div","baseStyle","fontSize","fontFamily","color","colors","onSurface","Error","contentWidth","enableExperimentalMarginCollapsing","source","html"],"sourceRoot":"../../../../../../src","sources":["modules/content/content-detail/components/content-detail-rich-content.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,cAAc;AAClD,OAAOC,UAAU,IACfC,gBAAgB,EAChBC,gBAAgB,QAEX,0BAA0B;AAEjC,SAASC,cAAc,QAAQ,8CAA2C;AAC1E,SAASC,WAAW,QAAQ,yBAAgB;AAC5C,SAASC,cAAc,QAAQ,qCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlE,MAAMC,uBAAuB,GAAG;EAC9BC,GAAG,EAAER,gBAAgB,CAACS,eAAe,CAAC;IACpCC,OAAO,EAAE,KAAK;IACdC,YAAY,EAAEV,gBAAgB,CAACW;EACjC,CAAC;AACH,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBL,GAAG,EAAEA,CAAC;IAAEM;EAAwB,CAAC,KAAK;IACpC,MAAM;MAAEC,GAAG;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGH,KAAK,CAACI,UAAU;IAE/C,oBACEZ,IAAA,CAACJ,cAAc;MACbiB,GAAG,EAAEJ,GAAc;MACnBC,KAAK,EAAEA,KAAK,GAAGI,MAAM,CAACJ,KAAK,CAAC,GAAG,MAAO;MACtCC,MAAM,EAAEA,MAAM,GAAGG,MAAM,CAACH,MAAM,CAAC,GAAGI;IAAU,CAC7C,CAAC;EAEN;AACF,CAAC;AAED,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACvCC,OAAO;EACP,GAAGC;AAC0B,CAAC,KAAK;EACnC,MAAM;IAAER;EAAM,CAAC,GAAGlB,mBAAmB,CAAC,CAAC;EACvC,MAAM;IAAE2B;EAAY,CAAC,GAAGrB,cAAc,CAAC,CAAC;EACxC,MAAMsB,KAAK,GAAGvB,WAAW,CAAC,CAAC;EAE3B,MAAMwB,WAAW,GAAG9B,KAAK,CAAC+B,OAAO,CAAC,MAAM;IACtC,IAAIL,OAAO,EAAE;MACX,OAAOA,OAAO;IAChB;;IAEA;IACA;IACA,MAAMM,OAAO,GAAGJ,WAAW,EAAEI,OAAO,EAAEC,IAAI,CACvCC,CAAC,IAAK,CAAC,CAACA,CAAC,EAAEC,IAAI,EAAEC,GACpB,CAAC;IAED,OAAOJ,OAAO,EAAEG,IAAI,EAAEC,GAAG,IAAI,EAAE;EACjC,CAAC,EAAE,CAACR,WAAW,EAAEI,OAAO,EAAEN,OAAO,CAAC,CAAC;EAEnC,MAAMW,SAAS,GAAGrC,KAAK,CAAC+B,OAAO,CAAC,MAAM;IACpC,OAAO;MACLO,QAAQ,EAAE,EAAE;MACZC,UAAU,
|
|
1
|
+
{"version":3,"names":["React","useWindowDimensions","RenderHtml","HTMLElementModel","HTMLContentModel","OptimizedImage","useAppTheme","useComposition","jsx","_jsx","customHTMLElementModels","img","fromCustomModel","tagName","contentModel","mixed","renderers","tnode","src","width","height","attributes","uri","Number","undefined","ContentDetailRichContent","content","props","composition","theme","htmlContent","useMemo","section","find","s","text","div","baseStyle","fontSize","fontFamily","fonts","bodyMedium","color","colors","onSurface","Error","contentWidth","enableExperimentalMarginCollapsing","source","html"],"sourceRoot":"../../../../../../src","sources":["modules/content/content-detail/components/content-detail-rich-content.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,cAAc;AAClD,OAAOC,UAAU,IACfC,gBAAgB,EAChBC,gBAAgB,QAEX,0BAA0B;AAEjC,SAASC,cAAc,QAAQ,8CAA2C;AAC1E,SAASC,WAAW,QAAQ,yBAAgB;AAC5C,SAASC,cAAc,QAAQ,qCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlE,MAAMC,uBAAuB,GAAG;EAC9BC,GAAG,EAAER,gBAAgB,CAACS,eAAe,CAAC;IACpCC,OAAO,EAAE,KAAK;IACdC,YAAY,EAAEV,gBAAgB,CAACW;EACjC,CAAC;AACH,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBL,GAAG,EAAEA,CAAC;IAAEM;EAAwB,CAAC,KAAK;IACpC,MAAM;MAAEC,GAAG;MAAEC,KAAK;MAAEC;IAAO,CAAC,GAAGH,KAAK,CAACI,UAAU;IAE/C,oBACEZ,IAAA,CAACJ,cAAc;MACbiB,GAAG,EAAEJ,GAAc;MACnBC,KAAK,EAAEA,KAAK,GAAGI,MAAM,CAACJ,KAAK,CAAC,GAAG,MAAO;MACtCC,MAAM,EAAEA,MAAM,GAAGG,MAAM,CAACH,MAAM,CAAC,GAAGI;IAAU,CAC7C,CAAC;EAEN;AACF,CAAC;AAED,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACvCC,OAAO;EACP,GAAGC;AAC0B,CAAC,KAAK;EACnC,MAAM;IAAER;EAAM,CAAC,GAAGlB,mBAAmB,CAAC,CAAC;EACvC,MAAM;IAAE2B;EAAY,CAAC,GAAGrB,cAAc,CAAC,CAAC;EACxC,MAAMsB,KAAK,GAAGvB,WAAW,CAAC,CAAC;EAE3B,MAAMwB,WAAW,GAAG9B,KAAK,CAAC+B,OAAO,CAAC,MAAM;IACtC,IAAIL,OAAO,EAAE;MACX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|
|
3
5
|
import * as React from "react";
|
|
4
6
|
import { AppState } from "react-native";
|
|
5
7
|
import { getGrantedPermissions, initialize, requestPermission } from "react-native-health-connect";
|
|
6
8
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const toError = error => error instanceof Error ? error : new Error(String(error));
|
|
10
|
+
const isHealthConnectUnavailable = error => /not available|not installed|unsupported|unavailable/i.test(error instanceof Error ? error.message : String(error));
|
|
8
11
|
const useHealthConnectAuthorization = (readIdentifiers, writeIdentifiers, backgroundAccess = false, onStatusChange) => {
|
|
9
12
|
const [status, setStatus] = React.useState({
|
|
10
13
|
state: "unknown"
|
|
@@ -45,7 +48,10 @@ const useHealthConnectAuthorization = (readIdentifiers, writeIdentifiers, backgr
|
|
|
45
48
|
const error = new Error("Health Connect is not available");
|
|
46
49
|
updateStatus({
|
|
47
50
|
state: "error",
|
|
48
|
-
error
|
|
51
|
+
error,
|
|
52
|
+
...(backgroundAccess ? {
|
|
53
|
+
backgroundAccess: "unsupported"
|
|
54
|
+
} : {})
|
|
49
55
|
});
|
|
50
56
|
return;
|
|
51
57
|
}
|
|
@@ -63,10 +69,13 @@ const useHealthConnectAuthorization = (readIdentifiers, writeIdentifiers, backgr
|
|
|
63
69
|
} catch (error) {
|
|
64
70
|
updateStatus({
|
|
65
71
|
state: "error",
|
|
66
|
-
error: toError(error)
|
|
72
|
+
error: toError(error),
|
|
73
|
+
...(backgroundAccess && isHealthConnectUnavailable(error) ? {
|
|
74
|
+
backgroundAccess: "unsupported"
|
|
75
|
+
} : {})
|
|
67
76
|
});
|
|
68
77
|
}
|
|
69
|
-
}, [updateStatus]);
|
|
78
|
+
}, [backgroundAccess, updateStatus]);
|
|
70
79
|
const requestAuthorization = React.useCallback(async () => {
|
|
71
80
|
hasRequestedRef.current = true;
|
|
72
81
|
updateStatus({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AppState","getGrantedPermissions","initialize","requestPermission","Fragment","_Fragment","jsx","_jsx","toError","error","Error","String","useHealthConnectAuthorization","readIdentifiers","writeIdentifiers","backgroundAccess","onStatusChange","status","setStatus","useState","state","hasRequestedRef","useRef","identifiersRef","permissionsRef","current","readPermissions","map","recordType","accessType","writePermissions","backgroundPermissions","updateStatus","useCallback","nextStatus","checkAuthorization","isInitialized","grantedPermissions","backgroundPermission","find","permission","requiredPermissions","filter","allGranted","every","some","granted","backgroundGranted","undefined","requestAuthorization","useEffect","subscription","addEventListener","remove","AndroidHealthConnectAuthorizationProvider","memo","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","shouldRenderManualRequestUI","includes","shouldRenderFallback"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,qBAAqB,EACrBC,UAAU,EACVC,iBAAiB,QACZ,6BAA6B;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAWrC,MAAMC,OAAO,GAAIC,KAAc,IAC7BA,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC;AAE3D,MAAMG,6BAA6B,GAAGA,CACpCC,eAA6B,EAC7BC,gBAA+B,EAC/BC,gBAAgB,GAAG,KAAK,EACxBC,cAA0E,KACP;EACnE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"names":["React","AppState","getGrantedPermissions","initialize","requestPermission","Fragment","_Fragment","jsx","_jsx","toError","error","Error","String","isHealthConnectUnavailable","test","message","useHealthConnectAuthorization","readIdentifiers","writeIdentifiers","backgroundAccess","onStatusChange","status","setStatus","useState","state","hasRequestedRef","useRef","identifiersRef","permissionsRef","current","readPermissions","map","recordType","accessType","writePermissions","backgroundPermissions","updateStatus","useCallback","nextStatus","checkAuthorization","isInitialized","grantedPermissions","backgroundPermission","find","permission","requiredPermissions","filter","allGranted","every","some","granted","backgroundGranted","undefined","requestAuthorization","useEffect","subscription","addEventListener","remove","AndroidHealthConnectAuthorizationProvider","memo","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","shouldRenderManualRequestUI","includes","shouldRenderFallback"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,qBAAqB,EACrBC,UAAU,EACVC,iBAAiB,QACZ,6BAA6B;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAWrC,MAAMC,OAAO,GAAIC,KAAc,IAC7BA,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC;AAE3D,MAAMG,0BAA0B,GAAIH,KAAc,IAChD,sDAAsD,CAACI,IAAI,CACzDJ,KAAK,YAAYC,KAAK,GAAGD,KAAK,CAACK,OAAO,GAAGH,MAAM,CAACF,KAAK,CACvD,CAAC;AAEH,MAAMM,6BAA6B,GAAGA,CACpCC,eAA6B,EAC7BC,gBAA+B,EAC/BC,gBAAgB,GAAG,KAAK,EACxBC,cAA0E,KACP;EACnE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GACvBtB,KAAK,CAACuB,QAAQ,CAA0C;IACtDC,KAAK,EAAE;EACT,CAAC,CAAC;EAEJ,MAAMC,eAAe,GAAGzB,KAAK,CAAC0B,MAAM,CAAC,KAAK,CAAC;EAC3C,MAAMC,cAAc,GAAG3B,KAAK,CAAC0B,MAAM,CAAC;IAAET,eAAe;IAAEC;EAAiB,CAAC,CAAC;EAE1E,MAAMU,cAAc,GAAG5B,KAAK,CAAC0B,MAAM,CAEjC,EAA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,EAAE;IAC3C,OAAO,IAAI;EACb;EAEA,OAAO,IAAI;AACb,CACF,CAAC","ignoreList":[]}
|
|
@@ -10,14 +10,14 @@ export const ManuallyRequestSheetDescription = props => {
|
|
|
10
10
|
variant: "bodyMedium",
|
|
11
11
|
...props,
|
|
12
12
|
style: [styles.description, {
|
|
13
|
-
color: theme.colors.onSurface
|
|
13
|
+
color: theme.colors.onSurface,
|
|
14
|
+
fontFamily: theme.fonts.bodyLarge.fontFamily
|
|
14
15
|
}, props.style]
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
18
|
const styles = StyleSheet.create({
|
|
18
19
|
description: {
|
|
19
20
|
fontSize: 16,
|
|
20
|
-
fontFamily: "DMSans_400Regular",
|
|
21
21
|
fontWeight: "400",
|
|
22
22
|
textAlign: "center"
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","useAppTheme","jsx","_jsx","ManuallyRequestSheetDescription","props","theme","variant","style","styles","description","color","colors","onSurface","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","useAppTheme","jsx","_jsx","ManuallyRequestSheetDescription","props","theme","variant","style","styles","description","color","colors","onSurface","fontFamily","fonts","bodyLarge","create","fontSize","fontWeight","textAlign"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/manually-request-sheet/description.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAA0BC,IAAI,QAAmB,oBAAoB;AAErE,SAASC,WAAW,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7C,OAAO,MAAMC,+BAA+B,GAC1CC,KAAmB,IAChB;EACH,MAAMC,KAAK,GAAGL,WAAW,CAAC,CAAC;EAE3B,oBACEE,IAAA,CAACH,IAAI;IACHO,OAAO,EAAC,YAAY;IAAA,GAChBF,KAAK;IACTG,KAAK,EAAE,CACLC,MAAM,CAACC,WAAW,EAClB;MACEC,KAAK,EAAEL,KAAK,CAACM,MAAM,CAACC,SAAS;MAC7BC,UAAU,EAAER,KAAK,CAACS,KAAK,CAACC,SAAS,CAACF;IACpC,CAAC,EACDT,KAAK,CAACG,KAAK;EACX,CACH,CAAC;AAEN,CAAC;AAED,MAAMC,MAAM,GAAGV,UAAU,CAACkB,MAAM,CAAC;EAC/BP,WAAW,EAAE;IACXQ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","useAppTheme","jsx","_jsx","ManuallyRequestSheetTitle","props","theme","variant","style","styles","title","color","colors","onSurface","create","fontSize","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Text","useAppTheme","jsx","_jsx","ManuallyRequestSheetTitle","props","theme","variant","style","styles","title","color","colors","onSurface","create","fontSize","fontWeight","textAlign"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/manually-request-sheet/title.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAA0BC,IAAI,QAAmB,oBAAoB;AAErE,SAASC,WAAW,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7C,OAAO,MAAMC,yBAAyB,GACpCC,KAAmB,IAChB;EACH,MAAMC,KAAK,GAAGL,WAAW,CAAC,CAAC;EAE3B,oBACEE,IAAA,CAACH,IAAI;IACHO,OAAO,EAAC,YAAY;IAAA,GAChBF,KAAK;IACTG,KAAK,EAAE,CAACC,MAAM,CAACC,KAAK,EAAE;MAAEC,KAAK,EAAEL,KAAK,CAACM,MAAM,CAACC;IAAU,CAAC,EAAER,KAAK,CAACG,KAAK;EAAE,CACvE,CAAC;AAEN,CAAC;AAED,MAAMC,MAAM,GAAGV,UAAU,CAACe,MAAM,CAAC;EAC/BJ,KAAK,EAAE;IACLK,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { StyleSheet, View } from "react-native";
|
|
6
|
-
import { Text } from "react-native-paper";
|
|
6
|
+
import { Text as PaperText } from "react-native-paper";
|
|
7
7
|
import { useAppTheme } from "../../../theme/index.js";
|
|
8
8
|
import { SyncProgressBar } from "./sync-progress-bar.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const SyncProgressListComponent = ({
|
|
11
|
-
progress
|
|
11
|
+
progress,
|
|
12
|
+
labelForType,
|
|
13
|
+
statusLabels,
|
|
14
|
+
reasonLabels,
|
|
15
|
+
Text = PaperText
|
|
12
16
|
}) => {
|
|
13
17
|
const {
|
|
14
18
|
t
|
|
@@ -25,27 +29,32 @@ const SyncProgressListComponent = ({
|
|
|
25
29
|
style: {
|
|
26
30
|
gap: theme.spacing(3)
|
|
27
31
|
},
|
|
28
|
-
children: Object.entries(progress).map(([key, value]) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
style: [styles.statusRow],
|
|
32
|
+
children: Object.entries(progress).map(([key, value]) => {
|
|
33
|
+
if (!value) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
37
|
+
style: {
|
|
38
|
+
gap: theme.spacing(1)
|
|
39
|
+
},
|
|
37
40
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
38
|
-
variant: "
|
|
39
|
-
children: t(`
|
|
40
|
-
}), /*#__PURE__*/_jsxs(
|
|
41
|
-
|
|
42
|
-
children: [
|
|
41
|
+
variant: "bodyLarge",
|
|
42
|
+
children: labelForType?.(key) ?? t(`tile.${key}.label`)
|
|
43
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: [styles.statusRow],
|
|
45
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
46
|
+
variant: "bodyMedium",
|
|
47
|
+
children: [statusLabels?.[value.status] ?? t(`data-sync.status.${value.status}`), value.reason ? ` (${reasonLabels?.[value.reason] ?? value.reason})` : ""]
|
|
48
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
49
|
+
variant: "bodyMedium",
|
|
50
|
+
children: [value.progress?.done ?? 0, " / ", value.progress?.total ?? 0]
|
|
51
|
+
})]
|
|
52
|
+
}), /*#__PURE__*/_jsx(SyncProgressBar, {
|
|
53
|
+
progress: value,
|
|
54
|
+
testID: `progress-bar-${value.measurementTypeKey}`
|
|
43
55
|
})]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
testID: `progress-bar-${value.measurementTypeKey}`
|
|
47
|
-
})]
|
|
48
|
-
}, key))
|
|
56
|
+
}, key);
|
|
57
|
+
})
|
|
49
58
|
});
|
|
50
59
|
};
|
|
51
60
|
const styles = StyleSheet.create({
|
package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useTranslation","StyleSheet","View","Text","useAppTheme","SyncProgressBar","jsx","_jsx","jsxs","_jsxs","SyncProgressListComponent","progress","t","theme","style","gap","spacing","children","Object","entries","map","key","value","variant","styles","statusRow","status","done","total","testID","measurementTypeKey","create","flexDirection","justifyContent","SyncProgressList","memo"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/sync-progress-list/sync-progress-list.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["React","useTranslation","StyleSheet","View","Text","PaperText","useAppTheme","SyncProgressBar","jsx","_jsx","jsxs","_jsxs","SyncProgressListComponent","progress","labelForType","statusLabels","reasonLabels","t","theme","style","gap","spacing","children","Object","entries","map","key","value","variant","styles","statusRow","status","reason","done","total","testID","measurementTypeKey","create","flexDirection","justifyContent","SyncProgressList","memo"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/sync-progress-list/sync-progress-list.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,IAAI,IAAIC,SAAS,QAAQ,oBAAoB;AAEtD,SAASC,WAAW,QAAQ,yBAAgB;AAG5C,SAASC,eAAe,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAatD,MAAMC,yBAAyB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,YAAY;EACZC,YAAY;EACZC,YAAY;EACZZ,IAAI,GAAGC;AACc,CAAC,KAAK;EAC3B,MAAM;IAAEY;EAAE,CAAC,GAAGhB,cAAc,CAAC,CAAC;EAE9B,MAAMiB,KAAK,GAAGZ,WAAW,CAAC,CAAC;EAE3B,IAAI,CAACO,QAAQ,EAAE;IACb,oBAAOJ,IAAA,CAACN,IAAI;MAACgB,KAAK,EAAE;QAAEC,GAAG,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAC;MAAE;IAAE,CAAE,CAAC;EACnD;EAEA,oBACEZ,IAAA,CAACN,IAAI;IAACgB,KAAK,EAAE;MAAEC,GAAG,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAC;IAAE,CAAE;IAAAC,QAAA,EACpCC,MAAM,CAACC,OAAO,CAACX,QAAQ,CAAC,CAACY,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MAC9C,IAAI,CAACA,KAAK,EAAE;QACV,OAAO,IAAI;MACb;MAEA,oBACEhB,KAAA,CAACR,IAAI;QAAWgB,KAAK,EAAE;UAAEC,GAAG,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAC;QAAE,CAAE;QAAAC,QAAA,gBAC/Cb,IAAA,CAACL,IAAI;UAACwB,OAAO,EAA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, recordOvokMetric, withOvokSpan } from "../../helpers/utils/telemetry.js";
|
|
6
|
-
import { withSyncRetries } from "../utils/retry-save.js";
|
|
6
|
+
import { isSyncRetryCancelled, withSyncRetries } from "../utils/retry-save.js";
|
|
7
7
|
import { DataProcessor } from "./managers/data-processor.js";
|
|
8
8
|
import { StorageManager } from "./managers/storage-manager.js";
|
|
9
9
|
import { SyncProgressManager } from "./managers/sync-progress-manager.js";
|
|
@@ -105,7 +105,10 @@ export class BaseHealthSyncService {
|
|
|
105
105
|
if (entries.length !== 0 && !this.stateManager.shouldStopSync) {
|
|
106
106
|
try {
|
|
107
107
|
const startedAt = Date.now();
|
|
108
|
-
const result = await withSyncRetries(() => this.storageManager.saveObservations(entries));
|
|
108
|
+
const result = await withSyncRetries(() => this.storageManager.saveObservations(entries), () => this.stateManager.shouldStopSync);
|
|
109
|
+
if (this.stateManager.shouldStopSync) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
109
112
|
recordOvokMetric("ovok.health.samples.imported", entries.length, {
|
|
110
113
|
provider: this.getProviderName(),
|
|
111
114
|
measurementTypeKey
|
|
@@ -117,6 +120,9 @@ export class BaseHealthSyncService {
|
|
|
117
120
|
this.progressManager.incrementSyncedObservations(measurementTypeKey, entries.length);
|
|
118
121
|
this.storageManager.saveAnchors(anchors);
|
|
119
122
|
} catch (error) {
|
|
123
|
+
if (isSyncRetryCancelled(error) || this.stateManager.shouldStopSync) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
120
126
|
this.progressManager.setStatus(measurementTypeKey, "failed");
|
|
121
127
|
this.onSyncError(error);
|
|
122
128
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["recordOvokDuration","recordOvokMetric","withOvokSpan","withSyncRetries","DataProcessor","StorageManager","SyncProgressManager","SyncStateManager","BaseHealthSyncService","constructor","props","client","patientId","dataToSync","onSyncError","progressManager","updateProgress","stateManager","storageManager","getProviderName","dataProcessor","chunkSize","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","startSync","once","provider","runSync","isInitialized","Error","resume","setNotStartedStatuses","initialDataFetched","initializeSync","processAllDataTypes","setPauseStatuses","pauseReason","error","stopSync","resetAll","reset","shouldStopSync","pauseSync","reason","pause","latestObservationDates","getLatestObservationDates","calculateTotalCounts","key","Object","keys","measurementTypeKey","data","getDataForMeasurementType","latestValidStartDate","getLatestValidStartDate","totalCount","getTotalRecordsCountForType","setTotalObservations","setStatus","syncDataByType","hasAnchor","observationBodies","currentHasAnchor","anchors","getObservationBodiesForType","entries","generateObservationEntries","length","startedAt","Date","now","result","saveObservations","addResult","incrementSyncedObservations","saveAnchors"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/services/base-health-sync-service.ts"],"mappings":";;AAAA;;AAUA,SACEA,kBAAkB,EAClBC,gBAAgB,EAChBC,YAAY,QACP,kCAA+B;AAWtC,SAASC,eAAe,QAAQ,wBAAqB;
|
|
1
|
+
{"version":3,"names":["recordOvokDuration","recordOvokMetric","withOvokSpan","isSyncRetryCancelled","withSyncRetries","DataProcessor","StorageManager","SyncProgressManager","SyncStateManager","BaseHealthSyncService","constructor","props","client","patientId","dataToSync","onSyncError","progressManager","updateProgress","stateManager","storageManager","getProviderName","dataProcessor","chunkSize","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","startSync","once","provider","runSync","isInitialized","Error","resume","setNotStartedStatuses","initialDataFetched","initializeSync","processAllDataTypes","setPauseStatuses","pauseReason","error","stopSync","resetAll","reset","shouldStopSync","pauseSync","reason","pause","latestObservationDates","getLatestObservationDates","calculateTotalCounts","key","Object","keys","measurementTypeKey","data","getDataForMeasurementType","latestValidStartDate","getLatestValidStartDate","totalCount","getTotalRecordsCountForType","setTotalObservations","setStatus","syncDataByType","hasAnchor","observationBodies","currentHasAnchor","anchors","getObservationBodiesForType","entries","generateObservationEntries","length","startedAt","Date","now","result","saveObservations","addResult","incrementSyncedObservations","saveAnchors"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/services/base-health-s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