@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
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import { ActivityIndicator, Button as PaperButton, Card as PaperCard, Switch, Text as PaperText } from "react-native-paper";
|
|
6
6
|
import { useHealthImport } from "../../bt-management/index.js";
|
|
7
|
+
import { SyncProgressList } from "../../data-sync/index.js";
|
|
7
8
|
import { useOvokUi } from "../use-ovok-ui.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const statusLabel = status => {
|
|
@@ -26,6 +27,9 @@ export const HealthImportCard = ({
|
|
|
26
27
|
background = false,
|
|
27
28
|
title = "Health data import",
|
|
28
29
|
labelForType = type => type,
|
|
30
|
+
progress,
|
|
31
|
+
statusLabels,
|
|
32
|
+
reasonLabels,
|
|
29
33
|
testID,
|
|
30
34
|
...uiProps
|
|
31
35
|
}) => {
|
|
@@ -36,6 +40,8 @@ export const HealthImportCard = ({
|
|
|
36
40
|
const Button = slots.Button ?? PaperButton;
|
|
37
41
|
const Card = slots.Card ?? PaperCard;
|
|
38
42
|
const Text = slots.Text ?? PaperText;
|
|
43
|
+
const SwitchSlot = slots.Switch ?? Switch;
|
|
44
|
+
const Activity = slots.ActivityIndicator ?? ActivityIndicator;
|
|
39
45
|
const {
|
|
40
46
|
enabled,
|
|
41
47
|
setEnabled,
|
|
@@ -57,6 +63,7 @@ export const HealthImportCard = ({
|
|
|
57
63
|
}
|
|
58
64
|
};
|
|
59
65
|
return /*#__PURE__*/_jsx(Card, {
|
|
66
|
+
theme: theme,
|
|
60
67
|
testID: testID,
|
|
61
68
|
style: {
|
|
62
69
|
borderRadius: theme.borderRadius(2)
|
|
@@ -66,31 +73,47 @@ export const HealthImportCard = ({
|
|
|
66
73
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
67
74
|
style: styles.header,
|
|
68
75
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
+
theme: theme,
|
|
69
77
|
variant: "titleMedium",
|
|
70
78
|
style: styles.grow,
|
|
71
79
|
children: title
|
|
72
|
-
}), busy ? /*#__PURE__*/_jsx(
|
|
80
|
+
}), busy ? /*#__PURE__*/_jsx(Activity, {
|
|
81
|
+
theme: theme
|
|
82
|
+
}) : /*#__PURE__*/_jsx(SwitchSlot, {
|
|
83
|
+
accessibilityLabel: title,
|
|
84
|
+
theme: theme,
|
|
73
85
|
value: enabled,
|
|
74
86
|
onValueChange: value => void toggle(value)
|
|
75
87
|
})]
|
|
76
88
|
}), types.map(type => /*#__PURE__*/_jsxs(View, {
|
|
77
89
|
style: styles.row,
|
|
78
90
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
91
|
+
theme: theme,
|
|
79
92
|
children: labelForType(type)
|
|
80
93
|
}), /*#__PURE__*/_jsx(Text, {
|
|
94
|
+
theme: theme,
|
|
81
95
|
children: statusLabel(statusByType[type])
|
|
82
96
|
})]
|
|
83
|
-
}, type)),
|
|
97
|
+
}, type)), progress && /*#__PURE__*/_jsx(SyncProgressList, {
|
|
98
|
+
progress: progress,
|
|
99
|
+
labelForType: type => labelForType(type),
|
|
100
|
+
statusLabels: statusLabels,
|
|
101
|
+
reasonLabels: reasonLabels,
|
|
102
|
+
Text: Text
|
|
103
|
+
}), notShared.length > 0 && /*#__PURE__*/_jsx(Text, {
|
|
104
|
+
theme: theme,
|
|
84
105
|
style: [styles.notice, {
|
|
85
106
|
color: theme.colors.onSurfaceVariant
|
|
86
107
|
}],
|
|
87
108
|
children: "Some data types are not shared. You can enable them in your health app."
|
|
88
109
|
}), error && /*#__PURE__*/_jsx(Text, {
|
|
110
|
+
theme: theme,
|
|
89
111
|
style: {
|
|
90
112
|
color: theme.colors.error
|
|
91
113
|
},
|
|
92
114
|
children: error.message
|
|
93
115
|
}), /*#__PURE__*/_jsx(Button, {
|
|
116
|
+
theme: theme,
|
|
94
117
|
mode: "outlined",
|
|
95
118
|
disabled: busy,
|
|
96
119
|
onPress: () => void toggle(!enabled),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ActivityIndicator","Button","PaperButton","Card","PaperCard","Switch","Text","PaperText","useHealthImport","useOvokUi","jsx","_jsx","jsxs","_jsxs","statusLabel","status","HealthImportCard","types","adapter","background","title","labelForType","type","testID","uiProps","theme","slots","enabled","setEnabled","statusByType","notShared","error","busy","setBusy","useState","toggle","next","style","borderRadius","children","styles","content","header","variant","grow","value","onValueChange","map","row","length","notice","color","colors","onSurfaceVariant","message","mode","disabled","onPress","create","padding","alignItems","flexDirection","gap","flex","justifyContent","paddingVertical","paddingBottom","paddingTop"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/health-import-card.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SACEC,iBAAiB,EACjBC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,MAAM,EACNC,IAAI,IAAIC,SAAS,QACZ,oBAAoB;AAE3B,SAA8BC,eAAe,QAAQ,8BAAqB;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ActivityIndicator","Button","PaperButton","Card","PaperCard","Switch","Text","PaperText","useHealthImport","SyncProgressList","useOvokUi","jsx","_jsx","jsxs","_jsxs","statusLabel","status","HealthImportCard","types","adapter","background","title","labelForType","type","progress","statusLabels","reasonLabels","testID","uiProps","theme","slots","SwitchSlot","Activity","enabled","setEnabled","statusByType","notShared","error","busy","setBusy","useState","toggle","next","style","borderRadius","children","styles","content","header","variant","grow","accessibilityLabel","value","onValueChange","map","row","length","notice","color","colors","onSurfaceVariant","message","mode","disabled","onPress","create","padding","alignItems","flexDirection","gap","flex","justifyContent","paddingVertical","paddingBottom","paddingTop"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/health-import-card.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SACEC,iBAAiB,EACjBC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,MAAM,EACNC,IAAI,IAAIC,SAAS,QACZ,oBAAoB;AAE3B,SAA8BC,eAAe,QAAQ,8BAAqB;AAC1E,SAAuBC,gBAAgB,QAAQ,0BAAiB;AAEhE,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA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AAI,EAAE;IAAEoB,IAAI,EAAE;EAAE,CAAC;EACjBf,GAAG,EAAE;IAAEa,aAAa,EAAE,KAAK;IAAEG,cAAc,EAAE,eAAe;IAAEC,eAAe,EAAE;EAAE,CAAC;EAClFf,MAAM,EAAE;IAAEgB,aAAa,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAE;AAC7C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ export const ManualEntryForm = ({
|
|
|
17
17
|
labelForField = field => field,
|
|
18
18
|
testID,
|
|
19
19
|
onSaved,
|
|
20
|
+
labelForUnit = unit => unit === "Cel" ? "°C" : unit,
|
|
20
21
|
...uiProps
|
|
21
22
|
}) => {
|
|
22
23
|
const {
|
|
@@ -31,7 +32,11 @@ export const ManualEntryForm = ({
|
|
|
31
32
|
const [dateText, setDateText] = React.useState(recordedAt.toISOString());
|
|
32
33
|
const [error, setError] = React.useState();
|
|
33
34
|
const [saving, setSaving] = React.useState(false);
|
|
35
|
+
const savingRef = React.useRef(false);
|
|
34
36
|
const save = async () => {
|
|
37
|
+
if (savingRef.current) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
35
40
|
const data = {};
|
|
36
41
|
for (const [field, definition] of Object.entries(fields)) {
|
|
37
42
|
const raw = values[field]?.trim() ?? "";
|
|
@@ -54,6 +59,7 @@ export const ManualEntryForm = ({
|
|
|
54
59
|
return;
|
|
55
60
|
}
|
|
56
61
|
setError(undefined);
|
|
62
|
+
savingRef.current = true;
|
|
57
63
|
setSaving(true);
|
|
58
64
|
const input = {
|
|
59
65
|
measurementTypeKey,
|
|
@@ -66,10 +72,12 @@ export const ManualEntryForm = ({
|
|
|
66
72
|
} catch (cause) {
|
|
67
73
|
setError(cause instanceof Error ? cause.message : String(cause));
|
|
68
74
|
} finally {
|
|
75
|
+
savingRef.current = false;
|
|
69
76
|
setSaving(false);
|
|
70
77
|
}
|
|
71
78
|
};
|
|
72
79
|
return /*#__PURE__*/_jsx(Card, {
|
|
80
|
+
theme: theme,
|
|
73
81
|
testID: testID,
|
|
74
82
|
style: {
|
|
75
83
|
borderRadius: theme.borderRadius(2)
|
|
@@ -77,10 +85,12 @@ export const ManualEntryForm = ({
|
|
|
77
85
|
children: /*#__PURE__*/_jsxs(View, {
|
|
78
86
|
style: styles.content,
|
|
79
87
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
88
|
+
theme: theme,
|
|
80
89
|
variant: "titleMedium",
|
|
81
90
|
children: title
|
|
82
91
|
}), Object.entries(fields).map(([field, definition]) => /*#__PURE__*/_jsx(TextInput, {
|
|
83
|
-
|
|
92
|
+
theme: theme,
|
|
93
|
+
label: `${labelForField(field)} (${labelForUnit(definition.unit)})`,
|
|
84
94
|
value: values[field] ?? "",
|
|
85
95
|
onChangeText: value => setValues(current => ({
|
|
86
96
|
...current,
|
|
@@ -89,16 +99,19 @@ export const ManualEntryForm = ({
|
|
|
89
99
|
keyboardType: "decimal-pad",
|
|
90
100
|
error: Boolean(error && error.startsWith(labelForField(field)))
|
|
91
101
|
}, field)), /*#__PURE__*/_jsx(TextInput, {
|
|
102
|
+
theme: theme,
|
|
92
103
|
label: "Measured at (ISO 8601)",
|
|
93
104
|
value: dateText,
|
|
94
105
|
onChangeText: setDateText,
|
|
95
106
|
autoCapitalize: "none"
|
|
96
107
|
}), error && /*#__PURE__*/_jsx(Text, {
|
|
108
|
+
theme: theme,
|
|
97
109
|
style: {
|
|
98
110
|
color: theme.colors.error
|
|
99
111
|
},
|
|
100
112
|
children: error
|
|
101
113
|
}), /*#__PURE__*/_jsx(Button, {
|
|
114
|
+
theme: theme,
|
|
102
115
|
mode: "contained",
|
|
103
116
|
loading: saving,
|
|
104
117
|
disabled: saving,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","TextInput","measurementFieldCatalog","useOvokUi","jsx","_jsx","jsxs","_jsxs","ManualEntryForm","measurementTypeKey","saveMeasurement","initialValues","recordedAt","Date","title","labelForField","field","testID","onSaved","uiProps","theme","slots","fields","values","setValues","useState","Object","fromEntries","keys","map","toString","dateText","setDateText","toISOString","error","setError","saving","setSaving","save","data","definition","entries","raw","trim","value","Number","required","isFinite","min","max","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","TextInput","measurementFieldCatalog","useOvokUi","jsx","_jsx","jsxs","_jsxs","ManualEntryForm","measurementTypeKey","saveMeasurement","initialValues","recordedAt","Date","title","labelForField","field","testID","onSaved","labelForUnit","unit","uiProps","theme","slots","fields","values","setValues","useState","Object","fromEntries","keys","map","toString","dateText","setDateText","toISOString","error","setError","saving","setSaving","savingRef","useRef","save","current","data","definition","entries","raw","trim","value","Number","required","isFinite","min","max","nextDate","isNaN","getTime","undefined","input","cause","Error","message","String","style","borderRadius","children","styles","content","variant","label","onChangeText","keyboardType","Boolean","startsWith","autoCapitalize","color","colors","mode","loading","disabled","onPress","create","gap","padding"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/manual-entry-form.tsx"],"mappings":";;AAAA;;AAGA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SACEC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,IAAI,IAAIC,SAAS,EACjBC,SAAS,QACJ,oBAAoB;AAE3B,SAASC,uBAAuB,QAAQ,8BAAqB;AAE7D,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoB3C,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,kBAAkB;EAClBC,eAAe;EACfC,aAAa,GAAG,CAAC,CAAC;EAClBC,UAAU,GAAG,IAAIC,IAAI,CAAC,CAAC;EACvBC,KAAK,GAAG,iBAAiB;EACzBC,aAAa,GAAIC,KAAK,IAAKA,KAAK;EAChCC,MAAM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AAIA,KAAK,CAACsC,UAAU,CAAC3D,aAAa,CAACC,KAAK,CAAC,CAAC;MAAE,GAL3DA,KAMN,CACF,CAAC,eACFX,IAAA,CAACJ,SAAS;QACRqB,KAAK,EAAEA,KAAM;QACbgD,KAAK,EAAC,wBAAwB;QAC9BrB,KAAK,EAAEhB,QAAS;QAChBsC,YAAY,EAAErC,WAAY;QAC1ByC,cAAc,EAAC;MAAM,CACtB,CAAC,EACDvC,KAAK,iBAAI/B,IAAA,CAACN,IAAI;QAACuB,KAAK,EAAEA,KAAM;QAAC0C,KAAK,EAAE;UAAEY,KAAK,EAAEtD,KAAK,CAACuD,MAAM,CAACzC;QAAM,CAAE;QAAA8B,QAAA,EAAE9B;MAAK,CAAO,CAAC,eAClF/B,IAAA,CAACV,MAAM;QAAC2B,KAAK,EAAEA,KAAM;QAACwD,IAAI,EAAC,WAAW;QAACC,OAAO,EAAEzC,MAAO;QAAC0C,QAAQ,EAAE1C,MAAO;QAAC2C,OAAO,EAAEA,CAAA,KAAM,KAAKvC,IAAI,CAAC,CAAE;QAAAwB,QAAA,EAAC;MAEtG,CAAQ,CAAC;IAAA,CACL;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMC,MAAM,GAAG1E,UAAU,CAACyF,MAAM,CAAC;EAAEd,OAAO,EAAE;IAAEe,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AAAE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import Svg, { Line, Polyline, Rect } from "react-native-svg";
|
|
6
|
+
import { useOvokUi } from "../use-ovok-ui.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const MeasurementTrendChartComponent = ({
|
|
9
|
+
readings,
|
|
10
|
+
normalRange,
|
|
11
|
+
thresholds = [],
|
|
12
|
+
width = 320,
|
|
13
|
+
height = 160,
|
|
14
|
+
testID,
|
|
15
|
+
...uiProps
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
theme
|
|
19
|
+
} = useOvokUi(uiProps);
|
|
20
|
+
const padding = 8;
|
|
21
|
+
const values = readings.flatMap(reading => reading.values);
|
|
22
|
+
const domainValues = [...values, ...(normalRange ?? []), ...thresholds];
|
|
23
|
+
if (!domainValues.length) {
|
|
24
|
+
return /*#__PURE__*/_jsx(View, {
|
|
25
|
+
testID: testID,
|
|
26
|
+
style: {
|
|
27
|
+
height,
|
|
28
|
+
width
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const min = Math.min(...domainValues);
|
|
33
|
+
const max = Math.max(...domainValues);
|
|
34
|
+
const range = max === min ? 1 : max - min;
|
|
35
|
+
const times = readings.map(reading => reading.at);
|
|
36
|
+
const firstAt = times[0] ?? 0;
|
|
37
|
+
const lastAt = times[times.length - 1] ?? firstAt;
|
|
38
|
+
const timeRange = lastAt === firstAt ? 1 : lastAt - firstAt;
|
|
39
|
+
const x = (at, index) => padding + (lastAt === firstAt ? index / Math.max(1, readings.length - 1) : (at - firstAt) / timeRange) * (width - padding * 2);
|
|
40
|
+
const y = value => padding + (max - value) / range * (height - padding * 2);
|
|
41
|
+
const seriesCount = Math.max(...readings.map(reading => reading.values.length), 0);
|
|
42
|
+
return /*#__PURE__*/_jsx(View, {
|
|
43
|
+
testID: testID,
|
|
44
|
+
style: styles.container,
|
|
45
|
+
children: /*#__PURE__*/_jsxs(Svg, {
|
|
46
|
+
width: width,
|
|
47
|
+
height: height,
|
|
48
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
49
|
+
children: [normalRange && /*#__PURE__*/_jsx(Rect, {
|
|
50
|
+
x: padding,
|
|
51
|
+
y: y(normalRange[1]),
|
|
52
|
+
width: width - padding * 2,
|
|
53
|
+
height: Math.max(0, y(normalRange[0]) - y(normalRange[1])),
|
|
54
|
+
fill: theme.colors.secondaryContainer,
|
|
55
|
+
opacity: 0.55
|
|
56
|
+
}), thresholds.map(threshold => /*#__PURE__*/_jsx(Line, {
|
|
57
|
+
x1: padding,
|
|
58
|
+
x2: width - padding,
|
|
59
|
+
y1: y(threshold),
|
|
60
|
+
y2: y(threshold),
|
|
61
|
+
stroke: theme.colors.error,
|
|
62
|
+
strokeDasharray: "4 4"
|
|
63
|
+
}, threshold)), Array.from({
|
|
64
|
+
length: seriesCount
|
|
65
|
+
}, (_, series) => /*#__PURE__*/_jsx(Polyline, {
|
|
66
|
+
points: readings.map((reading, index) => {
|
|
67
|
+
const value = reading.values[series];
|
|
68
|
+
return value === undefined ? undefined : `${x(reading.at, index)},${y(value)}`;
|
|
69
|
+
}).filter(point => point !== undefined).join(" "),
|
|
70
|
+
fill: "none",
|
|
71
|
+
stroke: theme.colors.primary,
|
|
72
|
+
strokeWidth: 2,
|
|
73
|
+
strokeLinejoin: "round",
|
|
74
|
+
strokeLinecap: "round"
|
|
75
|
+
}, series))]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const MeasurementTrendChart = /*#__PURE__*/React.memo(MeasurementTrendChartComponent);
|
|
80
|
+
const Sparkline = /*#__PURE__*/React.memo(props => /*#__PURE__*/_jsx(MeasurementTrendChart, {
|
|
81
|
+
...props,
|
|
82
|
+
height: props.height ?? 48,
|
|
83
|
+
width: props.width ?? 160
|
|
84
|
+
}));
|
|
85
|
+
const styles = StyleSheet.create({
|
|
86
|
+
container: {
|
|
87
|
+
overflow: "hidden"
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export { MeasurementTrendChart, Sparkline };
|
|
91
|
+
//# sourceMappingURL=measurement-trend-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","Svg","Line","Polyline","Rect","useOvokUi","jsx","_jsx","jsxs","_jsxs","MeasurementTrendChartComponent","readings","normalRange","thresholds","width","height","testID","uiProps","theme","padding","values","flatMap","reading","domainValues","length","style","min","Math","max","range","times","map","at","firstAt","lastAt","timeRange","x","index","y","value","seriesCount","styles","container","children","viewBox","fill","colors","secondaryContainer","opacity","threshold","x1","x2","y1","y2","stroke","error","strokeDasharray","Array","from","_","series","points","undefined","filter","point","join","primary","strokeWidth","strokeLinejoin","strokeLinecap","MeasurementTrendChart","memo","Sparkline","props","create","overflow"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/measurement-trend-chart.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,GAAG,IAAIC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,kBAAkB;AAG5D,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgB3C,MAAMC,8BAA8B,GAAGA,CAAC;EACtCC,QAAQ;EACRC,WAAW;EACXC,UAAU,GAAG,EAAE;EACfC,KAAK,GAAG,GAAG;EACXC,MAAM,GAAG,GAAG;EACZC,MAAM;EACN,GAAGC;AACuB,CAAC,KAAK;EAChC,MAAM;IAAEC;EAAM,CAAC,GAAGb,SAAS,CAACY,OAAO,CAAC;EACpC,MAAME,OAAO,GAAG,CAAC;EACjB,MAAMC,MAAM,GAAGT,QAAQ,CAACU,OAAO,CAAEC,OAAO,IAAKA,OAAO,CAACF,MAAM,CAAC;EAC5D,MAAMG,YAAY,GAAG,CAAC,GAAGH,MAAM,EAAE,IAAIR,WAAW,IAAI,EAAE,CAAC,EAAE,GAAGC,UAAU,CAAC;EAEvE,IAAI,CAACU,YAAY,CAACC,MAAM,EAAE;IACxB,oBAAOjB,IAAA,CAACP,IAAI;MAACgB,MAAM,EAAEA,MAAO;MAACS,KAAK,EAAE;QAAEV,MAAM;QAAED;MAAM;IAAE,CAAE,CAAC;EAC3D;EAEA,MAAMY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GA,SAAS,GAAG,GAAG1B,CAAC,CAACd,OAAO,CAACU,EAAE,EAAEK,KAAK,CAAC,IAAIC,CAAC,CAACC,KAAK,CAAC,EAAE;QAChF,CAAC,CAAC,CACDwB,MAAM,CAAEC,KAAK,IAAsBA,KAAK,KAAKF,SAAS,CAAC,CACvDG,IAAI,CAAC,GAAG,CAAE;QACbpB,IAAI,EAAC,MAAM;QACXS,MAAM,EAAEpC,KAAK,CAAC4B,MAAM,CAACoB,OAAQ;QAC7BC,WAAW,EAAE,CAAE;QACfC,cAAc,EAAC,OAAO;QACtBC,aAAa,EAAC;MAAO,GAbhBT,MAcN,CACF,CAAC;IAAA,CACC;EAAC,CACF,CAAC;AAEX,CAAC;AAED,MAAMU,qBAAqB,gBAAGxE,KAAK,CAACyE,IAAI,CAAC7D,8BAA8B,CAAC;AAExE,MAAM8D,SAAS,gBAAG1E,KAAK,CAACyE,IAAI,CACzBE,KAAiC,iBAChClE,IAAA,CAAC+D,qBAAqB;EAAA,GAAKG,KAAK;EAAE1D,MAAM,EAAE0D,KAAK,CAAC1D,MAAM,IAAI,EAAG;EAACD,KAAK,EAAE2D,KAAK,CAAC3D,KAAK,IAAI;AAAI,CAAE,CAE9F,CAAC;AAED,MAAM2B,MAAM,GAAG1C,UAAU,CAAC2E,MAAM,CAAC;EAC/BhC,SAAS,EAAE;IAAEiC,QAAQ,EAAE;EAAS;AAClC,CAAC,CAAC;AAGF,SAASL,qBAAqB,EAAEE,SAAS","ignoreList":[]}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { FlatList, Image, Pressable, StyleSheet, View } from "react-native";
|
|
7
|
-
import { Button as PaperButton, Card as PaperCard, Text as PaperText, TextInput } from "react-native-paper";
|
|
8
|
-
import { useNearbyDevices, usePairedDevices, useRuntimeEvent } from "../../bt-management/index.js";
|
|
7
|
+
import { ActivityIndicator as PaperActivityIndicator, Button as PaperButton, Card as PaperCard, Text as PaperText, TextInput } from "react-native-paper";
|
|
8
|
+
import { deviceTitle, useNearbyDevices, usePairedDevices, useRuntimeEvent } from "../../bt-management/index.js";
|
|
9
9
|
import { useOvokUi } from "../use-ovok-ui.js";
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
const deviceLabel = device =>
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
const deviceLabel = device => deviceTitle(device.deviceData);
|
|
12
12
|
export const PairingFlow = ({
|
|
13
13
|
storage,
|
|
14
14
|
storageKey,
|
|
@@ -16,6 +16,10 @@ export const PairingFlow = ({
|
|
|
16
16
|
onPaired,
|
|
17
17
|
onPairingCode,
|
|
18
18
|
onError,
|
|
19
|
+
renderHeader,
|
|
20
|
+
renderEmpty,
|
|
21
|
+
renderDevice: renderDeviceOverride,
|
|
22
|
+
labels,
|
|
19
23
|
testID,
|
|
20
24
|
theme: themeOverride,
|
|
21
25
|
slots
|
|
@@ -33,7 +37,8 @@ export const PairingFlow = ({
|
|
|
33
37
|
} = useNearbyDevices();
|
|
34
38
|
const {
|
|
35
39
|
paired,
|
|
36
|
-
pair: remember
|
|
40
|
+
pair: remember,
|
|
41
|
+
forget
|
|
37
42
|
} = usePairedDevices({
|
|
38
43
|
storage,
|
|
39
44
|
storageKey
|
|
@@ -42,16 +47,30 @@ export const PairingFlow = ({
|
|
|
42
47
|
const [status, setStatus] = React.useState("idle");
|
|
43
48
|
const [code, setCode] = React.useState("");
|
|
44
49
|
const [error, setError] = React.useState();
|
|
50
|
+
const bondedRef = React.useRef(false);
|
|
51
|
+
const pairingCodeRequiredRef = React.useRef(false);
|
|
45
52
|
const Text = uiSlots.Text ?? PaperText;
|
|
46
53
|
const Button = uiSlots.Button ?? PaperButton;
|
|
47
54
|
const Card = uiSlots.Card ?? PaperCard;
|
|
55
|
+
const Input = uiSlots.TextInput ?? TextInput;
|
|
56
|
+
const Activity = uiSlots.ActivityIndicator ?? PaperActivityIndicator;
|
|
57
|
+
const copy = (key, fallback) => labels?.[key] ?? fallback;
|
|
58
|
+
const renderState = {
|
|
59
|
+
devices,
|
|
60
|
+
paired,
|
|
61
|
+
selected,
|
|
62
|
+
status,
|
|
63
|
+
error
|
|
64
|
+
};
|
|
48
65
|
useRuntimeEvent("connection", event => {
|
|
49
66
|
if (!selected || event.deviceData.id !== selected.id) {
|
|
50
67
|
return;
|
|
51
68
|
}
|
|
52
69
|
if (event.kind === "pairing" && event.pairingCodeRequired) {
|
|
70
|
+
pairingCodeRequiredRef.current = true;
|
|
53
71
|
setStatus("code-required");
|
|
54
72
|
} else if (event.kind === "bonded") {
|
|
73
|
+
bondedRef.current = true;
|
|
55
74
|
setStatus("paired");
|
|
56
75
|
}
|
|
57
76
|
});
|
|
@@ -59,15 +78,21 @@ export const PairingFlow = ({
|
|
|
59
78
|
setSelected(device);
|
|
60
79
|
setError(undefined);
|
|
61
80
|
setStatus("pairing");
|
|
81
|
+
bondedRef.current = false;
|
|
82
|
+
pairingCodeRequiredRef.current = false;
|
|
62
83
|
try {
|
|
63
84
|
await pairNearby(device.id);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
85
|
+
if (bondedRef.current) {
|
|
86
|
+
await remember(device);
|
|
87
|
+
setStatus("paired");
|
|
88
|
+
onPaired?.(device);
|
|
89
|
+
}
|
|
67
90
|
} catch (cause) {
|
|
68
91
|
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
69
|
-
|
|
70
|
-
|
|
92
|
+
if (!pairingCodeRequiredRef.current) {
|
|
93
|
+
setStatus("error");
|
|
94
|
+
setError(nextError.message);
|
|
95
|
+
}
|
|
71
96
|
onError?.(nextError, device);
|
|
72
97
|
}
|
|
73
98
|
};
|
|
@@ -86,12 +111,10 @@ export const PairingFlow = ({
|
|
|
86
111
|
onError?.(nextError, selected);
|
|
87
112
|
}
|
|
88
113
|
};
|
|
89
|
-
const
|
|
90
|
-
item
|
|
91
|
-
}) => {
|
|
114
|
+
const renderDefaultDevice = item => {
|
|
92
115
|
const image = getDeviceImage?.(item);
|
|
93
116
|
return /*#__PURE__*/_jsxs(Pressable, {
|
|
94
|
-
|
|
117
|
+
accessible: false,
|
|
95
118
|
onPress: () => void startPairing(item),
|
|
96
119
|
style: ({
|
|
97
120
|
pressed
|
|
@@ -106,77 +129,115 @@ export const PairingFlow = ({
|
|
|
106
129
|
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
107
130
|
style: styles.deviceCopy,
|
|
108
131
|
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
132
|
+
theme: theme,
|
|
109
133
|
variant: "titleMedium",
|
|
110
134
|
children: deviceLabel(item)
|
|
111
135
|
}) : null, Text ? /*#__PURE__*/_jsx(Text, {
|
|
136
|
+
theme: theme,
|
|
112
137
|
variant: "bodySmall",
|
|
113
|
-
children: item.deviceData.manufacturerName || "Bluetooth device"
|
|
138
|
+
children: item.deviceData.manufacturerName || copy("device", "Bluetooth device")
|
|
114
139
|
}) : null]
|
|
115
140
|
}), Button ? /*#__PURE__*/_jsx(Button, {
|
|
141
|
+
theme: theme,
|
|
116
142
|
mode: "outlined",
|
|
117
143
|
compact: true,
|
|
118
144
|
onPress: () => void startPairing(item),
|
|
119
|
-
children: "Pair"
|
|
145
|
+
children: copy("pair", "Pair")
|
|
120
146
|
}) : null]
|
|
121
147
|
});
|
|
122
148
|
};
|
|
149
|
+
const renderDevice = ({
|
|
150
|
+
item
|
|
151
|
+
}) => {
|
|
152
|
+
const custom = renderDeviceOverride?.(item, {
|
|
153
|
+
pair: () => startPairing(item),
|
|
154
|
+
forget: () => forget(item.id),
|
|
155
|
+
status
|
|
156
|
+
});
|
|
157
|
+
return custom === undefined ? renderDefaultDevice(item) : /*#__PURE__*/_jsx(_Fragment, {
|
|
158
|
+
children: custom
|
|
159
|
+
});
|
|
160
|
+
};
|
|
123
161
|
const content = /*#__PURE__*/_jsxs(View, {
|
|
124
162
|
testID: testID,
|
|
125
163
|
style: styles.container,
|
|
126
|
-
children: [
|
|
127
|
-
variant: "headlineSmall",
|
|
128
|
-
children: "Add a device"
|
|
129
|
-
}) : null, Text ? /*#__PURE__*/_jsx(Text, {
|
|
130
|
-
variant: "bodyMedium",
|
|
131
|
-
children: "Wake your monitor and choose it when it appears nearby."
|
|
132
|
-
}) : null, /*#__PURE__*/_jsx(FlatList, {
|
|
164
|
+
children: [/*#__PURE__*/_jsx(FlatList, {
|
|
133
165
|
data: devices,
|
|
134
166
|
keyExtractor: item => item.id,
|
|
135
167
|
renderItem: renderDevice,
|
|
136
|
-
|
|
168
|
+
ListHeaderComponent: renderHeader ? /*#__PURE__*/_jsx(_Fragment, {
|
|
169
|
+
children: renderHeader(renderState)
|
|
170
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
171
|
+
style: styles.header,
|
|
172
|
+
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
173
|
+
theme: theme,
|
|
174
|
+
variant: "headlineSmall",
|
|
175
|
+
children: copy("header", "Add a device")
|
|
176
|
+
}) : null, Text ? /*#__PURE__*/_jsx(Text, {
|
|
177
|
+
theme: theme,
|
|
178
|
+
variant: "bodyMedium",
|
|
179
|
+
children: copy("description", "Wake your monitor and choose it when it appears nearby.")
|
|
180
|
+
}) : null]
|
|
181
|
+
}),
|
|
182
|
+
ListEmptyComponent: renderEmpty ? /*#__PURE__*/_jsx(_Fragment, {
|
|
183
|
+
children: renderEmpty(renderState)
|
|
184
|
+
}) : Text ? /*#__PURE__*/_jsx(Text, {
|
|
185
|
+
theme: theme,
|
|
137
186
|
variant: "bodyMedium",
|
|
138
|
-
children: "No supported devices found yet."
|
|
187
|
+
children: copy("empty", "No supported devices found yet.")
|
|
139
188
|
}) : null,
|
|
140
189
|
contentContainerStyle: styles.list
|
|
141
190
|
}), selected && status === "code-required" ? /*#__PURE__*/_jsxs(View, {
|
|
142
191
|
style: styles.codePrompt,
|
|
143
192
|
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
193
|
+
theme: theme,
|
|
144
194
|
variant: "titleMedium",
|
|
145
|
-
children: "Type the code your monitor shows"
|
|
146
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
147
|
-
|
|
195
|
+
children: copy("pairingCodePrompt", "Type the code your monitor shows")
|
|
196
|
+
}) : null, /*#__PURE__*/_jsx(Input, {
|
|
197
|
+
theme: theme,
|
|
198
|
+
label: copy("pairingCode", "Pairing code"),
|
|
148
199
|
value: code,
|
|
149
200
|
onChangeText: setCode,
|
|
150
201
|
keyboardType: "number-pad",
|
|
151
202
|
autoFocus: true,
|
|
152
203
|
testID: testID ? `${testID}-code` : undefined
|
|
153
204
|
}), Button ? /*#__PURE__*/_jsx(Button, {
|
|
205
|
+
theme: theme,
|
|
154
206
|
mode: "contained",
|
|
155
207
|
onPress: () => void submitCode(),
|
|
156
|
-
children: "Continue"
|
|
208
|
+
children: copy("continue", "Continue")
|
|
157
209
|
}) : null]
|
|
158
|
-
}) : null, selected && status === "pairing" &&
|
|
159
|
-
|
|
160
|
-
children: [
|
|
161
|
-
|
|
210
|
+
}) : null, selected && status === "pairing" && /*#__PURE__*/_jsxs(View, {
|
|
211
|
+
style: styles.status,
|
|
212
|
+
children: [/*#__PURE__*/_jsx(Activity, {}), /*#__PURE__*/_jsx(Text, {
|
|
213
|
+
theme: theme,
|
|
214
|
+
variant: "bodyMedium",
|
|
215
|
+
children: copy("pairing", `Pairing ${deviceLabel(selected)}…`)
|
|
216
|
+
})]
|
|
217
|
+
}), selected && status === "paired" && Text ? /*#__PURE__*/_jsx(Text, {
|
|
218
|
+
theme: theme,
|
|
162
219
|
variant: "bodyMedium",
|
|
163
|
-
children:
|
|
220
|
+
children: copy("paired", `${deviceLabel(selected)} is ready.`)
|
|
164
221
|
}) : null, error && Text ? /*#__PURE__*/_jsx(Text, {
|
|
222
|
+
theme: theme,
|
|
165
223
|
variant: "bodyMedium",
|
|
166
224
|
style: {
|
|
167
225
|
color: theme.colors.error
|
|
168
226
|
},
|
|
169
227
|
children: error
|
|
170
228
|
}) : null, selected && status === "error" && Button ? /*#__PURE__*/_jsx(Button, {
|
|
229
|
+
theme: theme,
|
|
171
230
|
mode: "outlined",
|
|
172
231
|
onPress: () => void startPairing(selected),
|
|
173
|
-
children: "Try again"
|
|
174
|
-
}) : null, Text && paired.length > 0 ? /*#__PURE__*/
|
|
232
|
+
children: copy("retry", "Try again")
|
|
233
|
+
}) : null, Text && paired.length > 0 ? /*#__PURE__*/_jsx(Text, {
|
|
234
|
+
theme: theme,
|
|
175
235
|
variant: "bodySmall",
|
|
176
|
-
children:
|
|
236
|
+
children: copy("remembered", `${paired.length} device${paired.length === 1 ? "" : "s"} remembered`)
|
|
177
237
|
}) : null]
|
|
178
238
|
});
|
|
179
239
|
return Card ? /*#__PURE__*/_jsx(Card, {
|
|
240
|
+
theme: theme,
|
|
180
241
|
mode: "contained",
|
|
181
242
|
children: content
|
|
182
243
|
}) : content;
|
|
@@ -186,6 +247,9 @@ const styles = StyleSheet.create({
|
|
|
186
247
|
gap: 12,
|
|
187
248
|
padding: 16
|
|
188
249
|
},
|
|
250
|
+
header: {
|
|
251
|
+
gap: 6
|
|
252
|
+
},
|
|
189
253
|
list: {
|
|
190
254
|
gap: 8
|
|
191
255
|
},
|
|
@@ -211,6 +275,11 @@ const styles = StyleSheet.create({
|
|
|
211
275
|
},
|
|
212
276
|
codePrompt: {
|
|
213
277
|
gap: 10
|
|
278
|
+
},
|
|
279
|
+
status: {
|
|
280
|
+
alignItems: "center",
|
|
281
|
+
flexDirection: "row",
|
|
282
|
+
gap: 8
|
|
214
283
|
}
|
|
215
284
|
});
|
|
216
285
|
//# sourceMappingURL=pairing-flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FlatList","Image","Pressable","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","TextInput","useNearbyDevices","usePairedDevices","useRuntimeEvent","useOvokUi","jsx","_jsx","jsxs","_jsxs","deviceLabel","device","deviceData","model","localName","String","name","PairingFlow","storage","storageKey","getDeviceImage","onPaired","onPairingCode","onError","testID","theme","themeOverride","slots","uiSlots","devices","pair","pairNearby","paired","remember","selected","setSelected","useState","status","setStatus","code","setCode","error","setError","event","id","kind","pairingCodeRequired","startPairing","undefined","cause","nextError","Error","message","submitCode","trim","renderDevice","item","image","accessibilityRole","onPress","style","pressed","styles","deviceRow","borderColor","colors","outlineVariant","children","source","uri","deviceCopy","variant","manufacturerName","mode","compact","content","container","data","keyExtractor","renderItem","ListEmptyComponent","contentContainerStyle","list","codePrompt","label","value","onChangeText","keyboardType","autoFocus","color","length","create","gap","padding","alignItems","borderWidth","hairlineWidth","borderRadius","flexDirection","flex","height","width","opacity"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/pairing-flow.tsx"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC3E,SACEC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,IAAI,IAAIC,SAAS,EACjBC,SAAS,QACJ,oBAAoB;AAE3B,SAIEC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,QACV,8BAAqB;AAE5B,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc3C,MAAMC,WAAW,GAAIC,MAAqB,IACxCA,MAAM,CAACC,UAAU,CAACC,KAAK,IAAIF,MAAM,CAACC,UAAU,CAACE,SAAS,IAAIC,MAAM,CAACJ,MAAM,CAACC,UAAU,CAACI,IAAI,CAAC;AAE1F,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC,OAAO;EACPC,UAAU;EACVC,cAAc;EACdC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,MAAM;EACNC,KAAK,EAAEC,aAAa;EACpBC;AACgB,C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,EAAC,aAAW;IAAA,CAAM,CAAC,GAAG,IAAI;EAAA,CAClI,CACP;EAED,OAAO7F,IAAI,gBAAGU,IAAA,CAACV,IAAI;IAAC4E,IAAI,EAAC,WAAW;IAAAN,QAAA,EAAEQ;EAAO,CAAO,CAAC,GAAGA,OAAO;AACjE,CAAC;AAED,MAAMb,MAAM,GAAGrE,UAAU,CAACkG,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IAAEgB,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG,CAAC;EACnCX,IAAI,EAAE;IAAEU,GAAG,EAAE;EAAE,CAAC;EAChB7B,SAAS,EAAE;IAAE+B,UAAU,EAAE,QAAQ;IAAEC,WAAW,EAAEtG,UAAU,CAACuG,aAAa;IAAEC,YAAY,EAAE,EAAE;IAAEC,aAAa,EAAE,KAAK;IAAEN,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG,CAAC;EACxIvB,UAAU,EAAE;IAAE6B,IAAI,EAAE,CAAC;IAAEP,GAAG,EAAE;EAAE,CAAC;EAC/BnC,KAAK,EAAE;IAAEwC,YAAY,EAAE,CAAC;IAAEG,MAAM,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAC;EACjDxC,OAAO,EAAE;IAAEyC,OAAO,EAAE;EAAK,CAAC;EAC1BnB,UAAU,EAAE;IAAES,GAAG,EAAE;EAAG;AACxB,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","FlatList","Image","Pressable","StyleSheet","View","ActivityIndicator","PaperActivityIndicator","Button","PaperButton","Card","PaperCard","Text","PaperText","TextInput","deviceTitle","useNearbyDevices","usePairedDevices","useRuntimeEvent","useOvokUi","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","deviceLabel","device","deviceData","PairingFlow","storage","storageKey","getDeviceImage","onPaired","onPairingCode","onError","renderHeader","renderEmpty","renderDevice","renderDeviceOverride","labels","testID","theme","themeOverride","slots","uiSlots","devices","pair","pairNearby","paired","remember","forget","selected","setSelected","useState","status","setStatus","code","setCode","error","setError","bondedRef","useRef","pairingCodeRequiredRef","Input","Activity","copy","key","fallback","renderState","event","id","kind","pairingCodeRequired","current","startPairing","undefined","cause","nextError","Error","String","message","submitCode","trim","renderDefaultDevice","item","image","accessible","onPress","style","pressed","styles","deviceRow","borderColor","colors","outlineVariant","children","source","uri","deviceCopy","variant","manufacturerName","mode","compact","custom","content","container","data","keyExtractor","renderItem","ListHeaderComponent","header","ListEmptyComponent","contentContainerStyle","list","codePrompt","label","value","onChangeText","keyboardType","autoFocus","color","length","create","gap","padding","alignItems","borderWidth","hairlineWidth","borderRadius","flexDirection","flex","height","width","opacity"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/pairing-flow.tsx"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC3E,SACEC,iBAAiB,IAAIC,sBAAsB,EAC3CC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,IAAI,IAAIC,SAAS,EACjBC,SAAS,QACJ,oBAAoB;AAE3B,SAIEC,WAAW,EACXC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,QACV,8BAAqB;AAE5B,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAiC3C,MAAMC,WAAW,GAAIC,MAAqB,IAAaZ,WAAW,CAACY,MAAM,CAACC,UAAU,CAAC;AAErF,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC1BC,OAAO;EACPC,UAAU;EACVC,cAAc;EACdC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,YAAY;EACZC,WAAW;EACXC,YAAY,EAAEC,oBAAoB;EAClCC,MAAM;EACNC,MAAM;EACNC,KAAK,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