@ovok/native 1.5.6 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -19
- package/android/src/main/AndroidManifest.xml +1 -20
- package/app.plugin.js +181 -0
- package/lib/commonjs/index.js +5 -104
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js +23 -0
- package/lib/commonjs/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js +105 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +44 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +5 -2
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js +50 -1
- package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +12 -0
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +82 -0
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/commonjs/modules/auth/session/events.js +19 -0
- package/lib/commonjs/modules/auth/session/events.js.map +1 -0
- package/lib/commonjs/modules/auth/session/index.js +13 -0
- package/lib/commonjs/modules/auth/session/index.js.map +1 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js +6 -0
- package/lib/commonjs/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js +26 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js +58 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/commonjs/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/types/session.js +2 -0
- package/lib/commonjs/modules/auth/types/session.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js +37 -0
- package/lib/commonjs/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/background-sync/background-safe-storage.js +76 -0
- package/lib/commonjs/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/commonjs/modules/background-sync/index.js +11 -0
- package/lib/commonjs/modules/background-sync/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device/index.js +0 -22
- package/lib/commonjs/modules/bt-device/index.js.map +1 -1
- package/lib/commonjs/modules/bt-device-instructions/index.js +39 -0
- package/lib/commonjs/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +64 -0
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +1 -0
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +95 -0
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js +51 -0
- package/lib/commonjs/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js +51 -0
- package/lib/commonjs/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js +40 -0
- package/lib/commonjs/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js +82 -0
- package/lib/commonjs/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js +79 -0
- package/lib/commonjs/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js +33 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +58 -0
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js +21 -0
- package/lib/commonjs/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +154 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +91 -22
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +107 -4
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +9 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/commonjs/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/commonjs/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/push-notification.js +39 -0
- package/lib/commonjs/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js +132 -0
- package/lib/commonjs/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/index.js +28 -0
- package/lib/commonjs/modules/bt-management/testing/index.js.map +1 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js +23 -0
- package/lib/commonjs/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +82 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js +6 -0
- package/lib/commonjs/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js +6 -0
- package/lib/commonjs/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js +63 -0
- package/lib/commonjs/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +29 -4
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +29 -21
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/retry-save.js +99 -0
- package/lib/commonjs/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -0
- package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/index.js +23 -4
- package/lib/commonjs/modules/helpers/index.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/s-log.js +4 -13
- package/lib/commonjs/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js +27 -17
- package/lib/commonjs/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/commonjs/modules/helpers/utils/telemetry.js +230 -0
- package/lib/commonjs/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/commonjs/modules/image/components/optimized-image.js +31 -6
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +18 -9
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/commonjs/modules/tile/components/task-icon.js +2 -1
- package/lib/commonjs/modules/tile/components/task-icon.js.map +1 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/commonjs/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +123 -0
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +119 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js +175 -0
- package/lib/commonjs/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js +141 -0
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js +136 -0
- package/lib/commonjs/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +247 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +107 -0
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js +99 -0
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +116 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -0
- package/lib/commonjs/modules/ui/types.js +6 -0
- package/lib/commonjs/modules/ui/types.js.map +1 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js +51 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/module/index.js +3 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js +17 -0
- package/lib/module/modules/auth/hooks/use-rate-limit-cooldown.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-session.js +99 -0
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -0
- package/lib/module/modules/auth/index.js +4 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +5 -2
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/inputs.js +50 -1
- package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +4 -0
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +6 -0
- package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +12 -0
- package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +4 -0
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +7 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +76 -0
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -0
- package/lib/module/modules/auth/session/events.js +13 -0
- package/lib/module/modules/auth/session/events.js.map +1 -0
- package/lib/module/modules/auth/session/index.js +4 -0
- package/lib/module/modules/auth/session/index.js.map +1 -0
- package/lib/module/modules/auth/session/types/session-list-props.js +4 -0
- package/lib/module/modules/auth/session/types/session-list-props.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js +26 -0
- package/lib/module/modules/auth/sign-in/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js +48 -1
- package/lib/module/modules/auth/sign-in/components/form/login-form-provider.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js +52 -0
- package/lib/module/modules/auth/sign-in/components/form/mfa-code-input.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js +2 -0
- package/lib/module/modules/auth/sign-in/components/form/sign-in-with-email.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +13 -5
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/types/session.js +2 -0
- package/lib/module/modules/auth/types/session.js.map +1 -0
- package/lib/module/modules/auth/utils/rate-limit.js +31 -0
- package/lib/module/modules/auth/utils/rate-limit.js.map +1 -0
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +3 -2
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/background-sync/background-safe-storage.js +71 -0
- package/lib/module/modules/background-sync/background-safe-storage.js.map +1 -0
- package/lib/module/modules/background-sync/index.js +1 -0
- package/lib/module/modules/background-sync/index.js.map +1 -1
- package/lib/module/modules/bt-device/index.js +0 -2
- package/lib/module/modules/bt-device/index.js.map +1 -1
- package/lib/module/modules/bt-device-instructions/index.js +6 -0
- package/lib/module/modules/bt-device-instructions/index.js.map +1 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +58 -0
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +94 -26
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +1 -0
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +86 -0
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js +45 -0
- package/lib/module/modules/bt-management/hooks/use-background-sync.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js +45 -0
- package/lib/module/modules/bt-management/hooks/use-bluetooth-state.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js +34 -0
- package/lib/module/modules/bt-management/hooks/use-device-connection.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js +76 -0
- package/lib/module/modules/bt-management/hooks/use-health-import.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js +73 -0
- package/lib/module/modules/bt-management/hooks/use-measurements.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js +27 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-devices.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +52 -0
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js +16 -0
- package/lib/module/modules/bt-management/hooks/use-scan-control.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +14 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +41 -5
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +91 -22
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +59 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +107 -4
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +9 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js +5 -3
- package/lib/module/modules/bt-management/services/devices/measurement-state-machine.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js +12 -0
- package/lib/module/modules/bt-management/services/devices/spo/spo2.main-services.js.map +1 -1
- package/lib/module/modules/bt-management/services/push-notification.js +34 -0
- package/lib/module/modules/bt-management/services/push-notification.js.map +1 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js +127 -0
- package/lib/module/modules/bt-management/testing/fake-ble-manager.js.map +1 -0
- package/lib/module/modules/bt-management/testing/index.js +5 -0
- package/lib/module/modules/bt-management/testing/index.js.map +1 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js +17 -0
- package/lib/module/modules/bt-management/testing/recorded-frames.js.map +1 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js +76 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js +4 -0
- package/lib/module/modules/bt-management/types/device-connection-event.js.map +1 -0
- package/lib/module/modules/bt-management/types/result-policy.js +4 -0
- package/lib/module/modules/bt-management/types/result-policy.js.map +1 -0
- package/lib/module/modules/bt-management/utils/result-identity.js +57 -0
- package/lib/module/modules/bt-management/utils/result-identity.js.map +1 -0
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +20 -5
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +29 -4
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +2 -2
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +29 -21
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/retry-save.js +92 -0
- package/lib/module/modules/data-sync/utils/retry-save.js.map +1 -0
- package/lib/module/modules/helpers/form-items/form-field.js +2 -0
- package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
- package/lib/module/modules/helpers/index.js +2 -1
- package/lib/module/modules/helpers/index.js.map +1 -1
- package/lib/module/modules/helpers/utils/s-log.js +4 -12
- package/lib/module/modules/helpers/utils/s-log.js.map +1 -1
- package/lib/module/modules/helpers/utils/sentry-logger.js +25 -14
- package/lib/module/modules/helpers/utils/sentry-logger.js.map +1 -1
- package/lib/module/modules/helpers/utils/telemetry.js +218 -0
- package/lib/module/modules/helpers/utils/telemetry.js.map +1 -0
- package/lib/module/modules/image/components/optimized-image.js +32 -7
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js +20 -11
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-error.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js +3 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js +4 -2
- package/lib/module/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +44 -17
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +2 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.js.map +1 -1
- package/lib/module/modules/tile/components/task-icon.js +2 -1
- package/lib/module/modules/tile/components/task-icon.js.map +1 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js +4 -1
- package/lib/module/modules/tile/constants/measurement-icon-svg.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +117 -0
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +113 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js +169 -0
- package/lib/module/modules/ui/components/ecg-strip-viewer.js.map +1 -0
- package/lib/module/modules/ui/components/health-import-card.js +135 -0
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -0
- package/lib/module/modules/ui/components/manual-entry-form.js +130 -0
- package/lib/module/modules/ui/components/manual-entry-form.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +241 -0
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +101 -0
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -0
- package/lib/module/modules/ui/components/urine-test-result.js +94 -0
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -0
- package/lib/module/modules/ui/index.js +13 -0
- package/lib/module/modules/ui/index.js.map +1 -0
- package/lib/module/modules/ui/types.js +4 -0
- package/lib/module/modules/ui/types.js.map +1 -0
- package/lib/module/modules/ui/use-ovok-ui.js +45 -0
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +0 -9
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts +69 -0
- package/lib/typescript/commonjs/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +0 -9
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-rate-limit-cooldown.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +16 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/events.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/session/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/session/types/session-list-props.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/login-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/mfa-code-input.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/sign-in-with-email.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +4 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/sign-in/contexts/login-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/sign-in/hooks/use-login-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts +11 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/login-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/types/session.d.ts +10 -0
- package/lib/typescript/module/src/modules/auth/types/session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts +11 -0
- package/lib/typescript/module/src/modules/auth/utils/rate-limit.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts +31 -0
- package/lib/typescript/module/src/modules/background-sync/background-safe-storage.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/background-sync/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/index.d.ts +0 -2
- package/lib/typescript/module/src/modules/bt-device/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-device-instructions/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +48 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-bluetooth-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-device-connection.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-health-import.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-scan-control.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +10 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/measurement-state-machine.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/spo/spo2.main-services.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/services/push-notification.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/testing/fake-ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/testing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/testing/recorded-frames.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts +5 -2
- package/lib/typescript/module/src/modules/bt-management/types/error-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/i-bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-callback.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/result-policy.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/result-identity.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +4 -0
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts +6 -0
- package/lib/typescript/module/src/modules/data-sync/utils/retry-save.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +4 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts +2 -1
- package/lib/typescript/module/src/modules/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/s-log.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts +7 -1
- package/lib/typescript/module/src/modules/helpers/utils/sentry-logger.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts +69 -0
- package/lib/typescript/module/src/modules/helpers/utils/telemetry.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts +4 -0
- package/lib/typescript/module/src/modules/image/types/optimized-image-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-next-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/navigation/questionnaire-navigation-submit-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/contexts/questionnaire-navigation-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +2 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/components/task-icon.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts +1 -0
- package/lib/typescript/module/src/modules/tile/constants/measurement-icon-svg.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +9 -0
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +12 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts +17 -0
- package/lib/typescript/module/src/modules/ui/components/ecg-strip-viewer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +13 -0
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts +21 -0
- package/lib/typescript/module/src/modules/ui/components/manual-entry-form.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +15 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts +16 -0
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts +10 -0
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +11 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts +24 -0
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts +7 -0
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -0
- package/package.json +146 -7
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HealthImportCard = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativePaper = require("react-native-paper");
|
|
10
|
+
var _index = require("../../bt-management/index.js");
|
|
11
|
+
var _useOvokUi = require("../use-ovok-ui.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const statusLabel = status => {
|
|
15
|
+
switch (status) {
|
|
16
|
+
case "authorized":
|
|
17
|
+
return "Up to date";
|
|
18
|
+
case "shouldRequest":
|
|
19
|
+
return "Waiting for permission";
|
|
20
|
+
case "refused":
|
|
21
|
+
return "Not shared";
|
|
22
|
+
case "unsupported":
|
|
23
|
+
return "Unavailable on this device";
|
|
24
|
+
default:
|
|
25
|
+
return "Checking access";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const HealthImportCard = ({
|
|
29
|
+
types,
|
|
30
|
+
adapter,
|
|
31
|
+
background = false,
|
|
32
|
+
title = "Health data import",
|
|
33
|
+
labelForType = type => type,
|
|
34
|
+
testID,
|
|
35
|
+
...uiProps
|
|
36
|
+
}) => {
|
|
37
|
+
const {
|
|
38
|
+
theme,
|
|
39
|
+
slots
|
|
40
|
+
} = (0, _useOvokUi.useOvokUi)(uiProps);
|
|
41
|
+
const Button = slots.Button ?? _reactNativePaper.Button;
|
|
42
|
+
const Card = slots.Card ?? _reactNativePaper.Card;
|
|
43
|
+
const Text = slots.Text ?? _reactNativePaper.Text;
|
|
44
|
+
const {
|
|
45
|
+
enabled,
|
|
46
|
+
setEnabled,
|
|
47
|
+
statusByType,
|
|
48
|
+
notShared,
|
|
49
|
+
error
|
|
50
|
+
} = (0, _index.useHealthImport)({
|
|
51
|
+
types,
|
|
52
|
+
background,
|
|
53
|
+
adapter
|
|
54
|
+
});
|
|
55
|
+
const [busy, setBusy] = React.useState(false);
|
|
56
|
+
const toggle = async next => {
|
|
57
|
+
setBusy(true);
|
|
58
|
+
try {
|
|
59
|
+
await setEnabled(next);
|
|
60
|
+
} finally {
|
|
61
|
+
setBusy(false);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
|
|
65
|
+
theme: theme,
|
|
66
|
+
testID: testID,
|
|
67
|
+
style: {
|
|
68
|
+
borderRadius: theme.borderRadius(2)
|
|
69
|
+
},
|
|
70
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
71
|
+
style: styles.content,
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
73
|
+
style: styles.header,
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
75
|
+
theme: theme,
|
|
76
|
+
variant: "titleMedium",
|
|
77
|
+
style: styles.grow,
|
|
78
|
+
children: title
|
|
79
|
+
}), busy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.ActivityIndicator, {
|
|
80
|
+
theme: theme
|
|
81
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.Switch, {
|
|
82
|
+
accessibilityLabel: title,
|
|
83
|
+
theme: theme,
|
|
84
|
+
value: enabled,
|
|
85
|
+
onValueChange: value => void toggle(value)
|
|
86
|
+
})]
|
|
87
|
+
}), types.map(type => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
88
|
+
style: styles.row,
|
|
89
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
90
|
+
theme: theme,
|
|
91
|
+
children: labelForType(type)
|
|
92
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
93
|
+
theme: theme,
|
|
94
|
+
children: statusLabel(statusByType[type])
|
|
95
|
+
})]
|
|
96
|
+
}, type)), notShared.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
97
|
+
theme: theme,
|
|
98
|
+
style: [styles.notice, {
|
|
99
|
+
color: theme.colors.onSurfaceVariant
|
|
100
|
+
}],
|
|
101
|
+
children: "Some data types are not shared. You can enable them in your health app."
|
|
102
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
103
|
+
theme: theme,
|
|
104
|
+
style: {
|
|
105
|
+
color: theme.colors.error
|
|
106
|
+
},
|
|
107
|
+
children: error.message
|
|
108
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
109
|
+
theme: theme,
|
|
110
|
+
mode: "outlined",
|
|
111
|
+
disabled: busy,
|
|
112
|
+
onPress: () => void toggle(!enabled),
|
|
113
|
+
children: enabled ? "Stop import" : "Connect health data"
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
exports.HealthImportCard = HealthImportCard;
|
|
119
|
+
const styles = _reactNative.StyleSheet.create({
|
|
120
|
+
content: {
|
|
121
|
+
padding: 16
|
|
122
|
+
},
|
|
123
|
+
header: {
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
flexDirection: "row",
|
|
126
|
+
gap: 8
|
|
127
|
+
},
|
|
128
|
+
grow: {
|
|
129
|
+
flex: 1
|
|
130
|
+
},
|
|
131
|
+
row: {
|
|
132
|
+
flexDirection: "row",
|
|
133
|
+
justifyContent: "space-between",
|
|
134
|
+
paddingVertical: 6
|
|
135
|
+
},
|
|
136
|
+
notice: {
|
|
137
|
+
paddingBottom: 10,
|
|
138
|
+
paddingTop: 4
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//# sourceMappingURL=health-import-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativePaper","_index","_useOvokUi","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","statusLabel","status","HealthImportCard","types","adapter","background","title","labelForType","type","testID","uiProps","theme","slots","useOvokUi","Button","PaperButton","Card","PaperCard","Text","PaperText","enabled","setEnabled","statusByType","notShared","error","useHealthImport","busy","setBusy","useState","toggle","next","jsx","style","borderRadius","children","jsxs","View","styles","content","header","variant","grow","ActivityIndicator","Switch","accessibilityLabel","value","onValueChange","map","row","length","notice","color","colors","onSurfaceVariant","message","mode","disabled","onPress","exports","StyleSheet","create","padding","alignItems","flexDirection","gap","flex","justifyContent","paddingVertical","paddingBottom","paddingT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E,CAAC;EACjBjB,GAAG,EAAE;IAAEe,aAAa,EAAE,KAAK;IAAEG,cAAc,EAAE,eAAe;IAAEC,eAAe,EAAE;EAAE,CAAC;EAClFjB,MAAM,EAAE;IAAEkB,aAAa,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAE;AAC7C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ManualEntryForm = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativePaper = require("react-native-paper");
|
|
10
|
+
var _index = require("../../bt-management/index.js");
|
|
11
|
+
var _useOvokUi = require("../use-ovok-ui.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
/* eslint-disable import/group-exports */
|
|
15
|
+
|
|
16
|
+
const ManualEntryForm = ({
|
|
17
|
+
measurementTypeKey,
|
|
18
|
+
saveMeasurement,
|
|
19
|
+
initialValues = {},
|
|
20
|
+
recordedAt = new Date(),
|
|
21
|
+
title = "Add measurement",
|
|
22
|
+
labelForField = field => field,
|
|
23
|
+
testID,
|
|
24
|
+
onSaved,
|
|
25
|
+
labelForUnit = unit => unit === "Cel" ? "°C" : unit,
|
|
26
|
+
...uiProps
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
theme,
|
|
30
|
+
slots
|
|
31
|
+
} = (0, _useOvokUi.useOvokUi)(uiProps);
|
|
32
|
+
const Button = slots.Button ?? _reactNativePaper.Button;
|
|
33
|
+
const Card = slots.Card ?? _reactNativePaper.Card;
|
|
34
|
+
const Text = slots.Text ?? _reactNativePaper.Text;
|
|
35
|
+
const fields = _index.measurementFieldCatalog[measurementTypeKey] ?? {};
|
|
36
|
+
const [values, setValues] = React.useState(() => Object.fromEntries(Object.keys(fields).map(field => [field, initialValues[field]?.toString() ?? ""])));
|
|
37
|
+
const [dateText, setDateText] = React.useState(recordedAt.toISOString());
|
|
38
|
+
const [error, setError] = React.useState();
|
|
39
|
+
const [saving, setSaving] = React.useState(false);
|
|
40
|
+
const savingRef = React.useRef(false);
|
|
41
|
+
const save = async () => {
|
|
42
|
+
if (savingRef.current) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const data = {};
|
|
46
|
+
for (const [field, definition] of Object.entries(fields)) {
|
|
47
|
+
const raw = values[field]?.trim() ?? "";
|
|
48
|
+
const value = Number(raw);
|
|
49
|
+
if (definition.required && raw === "") {
|
|
50
|
+
setError(`${labelForField(field)} is required`);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (raw !== "" && (!Number.isFinite(value) || value < definition.min || value > definition.max)) {
|
|
54
|
+
setError(`${labelForField(field)} must be between ${definition.min} and ${definition.max} ${definition.unit}`);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (raw !== "") {
|
|
58
|
+
data[field] = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const nextDate = new Date(dateText);
|
|
62
|
+
if (Number.isNaN(nextDate.getTime())) {
|
|
63
|
+
setError("Enter a valid measurement date");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
setError(undefined);
|
|
67
|
+
savingRef.current = true;
|
|
68
|
+
setSaving(true);
|
|
69
|
+
const input = {
|
|
70
|
+
measurementTypeKey,
|
|
71
|
+
data,
|
|
72
|
+
recordedAt: nextDate
|
|
73
|
+
};
|
|
74
|
+
try {
|
|
75
|
+
await saveMeasurement(input);
|
|
76
|
+
onSaved?.(input);
|
|
77
|
+
} catch (cause) {
|
|
78
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
79
|
+
} finally {
|
|
80
|
+
savingRef.current = false;
|
|
81
|
+
setSaving(false);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
|
|
85
|
+
theme: theme,
|
|
86
|
+
testID: testID,
|
|
87
|
+
style: {
|
|
88
|
+
borderRadius: theme.borderRadius(2)
|
|
89
|
+
},
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
91
|
+
style: styles.content,
|
|
92
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
93
|
+
theme: theme,
|
|
94
|
+
variant: "titleMedium",
|
|
95
|
+
children: title
|
|
96
|
+
}), Object.entries(fields).map(([field, definition]) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.TextInput, {
|
|
97
|
+
theme: theme,
|
|
98
|
+
label: `${labelForField(field)} (${labelForUnit(definition.unit)})`,
|
|
99
|
+
value: values[field] ?? "",
|
|
100
|
+
onChangeText: value => setValues(current => ({
|
|
101
|
+
...current,
|
|
102
|
+
[field]: value
|
|
103
|
+
})),
|
|
104
|
+
keyboardType: "decimal-pad",
|
|
105
|
+
error: Boolean(error && error.startsWith(labelForField(field)))
|
|
106
|
+
}, field)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.TextInput, {
|
|
107
|
+
theme: theme,
|
|
108
|
+
label: "Measured at (ISO 8601)",
|
|
109
|
+
value: dateText,
|
|
110
|
+
onChangeText: setDateText,
|
|
111
|
+
autoCapitalize: "none"
|
|
112
|
+
}), error && /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
113
|
+
theme: theme,
|
|
114
|
+
style: {
|
|
115
|
+
color: theme.colors.error
|
|
116
|
+
},
|
|
117
|
+
children: error
|
|
118
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
119
|
+
theme: theme,
|
|
120
|
+
mode: "contained",
|
|
121
|
+
loading: saving,
|
|
122
|
+
disabled: saving,
|
|
123
|
+
onPress: () => void save(),
|
|
124
|
+
children: "Save measurement"
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
exports.ManualEntryForm = ManualEntryForm;
|
|
130
|
+
const styles = _reactNative.StyleSheet.create({
|
|
131
|
+
content: {
|
|
132
|
+
gap: 10,
|
|
133
|
+
padding: 16
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
//# sourceMappingURL=manual-entry-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativePaper","_index","_useOvokUi","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ManualEntryForm","measurementTypeKey","saveMeasurement","initialValues","recordedAt","Date","title","labelForField","field","testID","onSaved","labelForUnit","unit","uiProps","theme","slots","useOvokUi","Button","PaperButton","Card","PaperCard","Text","PaperText","fields","measurementFieldCatalog","values","setValues","useState","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","jsx","style","borderRadius","children","jsxs","View","styles","content","variant","TextInput","label","onChangeText","keyboardType","Boolean","startsWith","autoCapitalize","color","colors","mode","loading","disabled","onPress","exports","StyleSheet","create","gap","padding"],"sourceRoot":"../../../../../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,CAAC;EAAEjB,OAAO,EAAE;IAAEkB,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AAAE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PairingFlow = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativePaper = require("react-native-paper");
|
|
10
|
+
var _index = require("../../bt-management/index.js");
|
|
11
|
+
var _useOvokUi = require("../use-ovok-ui.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
/* eslint-disable import/group-exports */
|
|
15
|
+
|
|
16
|
+
const deviceLabel = device => device.deviceData.model || device.deviceData.localName || String(device.deviceData.name);
|
|
17
|
+
const PairingFlow = ({
|
|
18
|
+
storage,
|
|
19
|
+
storageKey,
|
|
20
|
+
getDeviceImage,
|
|
21
|
+
onPaired,
|
|
22
|
+
onPairingCode,
|
|
23
|
+
onError,
|
|
24
|
+
testID,
|
|
25
|
+
theme: themeOverride,
|
|
26
|
+
slots
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
theme,
|
|
30
|
+
slots: uiSlots
|
|
31
|
+
} = (0, _useOvokUi.useOvokUi)({
|
|
32
|
+
theme: themeOverride,
|
|
33
|
+
slots
|
|
34
|
+
});
|
|
35
|
+
const {
|
|
36
|
+
devices,
|
|
37
|
+
pair: pairNearby
|
|
38
|
+
} = (0, _index.useNearbyDevices)();
|
|
39
|
+
const {
|
|
40
|
+
paired,
|
|
41
|
+
pair: remember
|
|
42
|
+
} = (0, _index.usePairedDevices)({
|
|
43
|
+
storage,
|
|
44
|
+
storageKey
|
|
45
|
+
});
|
|
46
|
+
const [selected, setSelected] = React.useState();
|
|
47
|
+
const [status, setStatus] = React.useState("idle");
|
|
48
|
+
const [code, setCode] = React.useState("");
|
|
49
|
+
const [error, setError] = React.useState();
|
|
50
|
+
const bondedRef = React.useRef(false);
|
|
51
|
+
const pairingCodeRequiredRef = React.useRef(false);
|
|
52
|
+
const Text = uiSlots.Text ?? _reactNativePaper.Text;
|
|
53
|
+
const Button = uiSlots.Button ?? _reactNativePaper.Button;
|
|
54
|
+
const Card = uiSlots.Card ?? _reactNativePaper.Card;
|
|
55
|
+
(0, _index.useRuntimeEvent)("connection", event => {
|
|
56
|
+
if (!selected || event.deviceData.id !== selected.id) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (event.kind === "pairing" && event.pairingCodeRequired) {
|
|
60
|
+
pairingCodeRequiredRef.current = true;
|
|
61
|
+
setStatus("code-required");
|
|
62
|
+
} else if (event.kind === "bonded") {
|
|
63
|
+
bondedRef.current = true;
|
|
64
|
+
setStatus("paired");
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const startPairing = async device => {
|
|
68
|
+
setSelected(device);
|
|
69
|
+
setError(undefined);
|
|
70
|
+
setStatus("pairing");
|
|
71
|
+
bondedRef.current = false;
|
|
72
|
+
pairingCodeRequiredRef.current = false;
|
|
73
|
+
try {
|
|
74
|
+
await pairNearby(device.id);
|
|
75
|
+
if (bondedRef.current) {
|
|
76
|
+
await remember(device);
|
|
77
|
+
setStatus("paired");
|
|
78
|
+
onPaired?.(device);
|
|
79
|
+
}
|
|
80
|
+
} catch (cause) {
|
|
81
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
82
|
+
if (!pairingCodeRequiredRef.current) {
|
|
83
|
+
setStatus("error");
|
|
84
|
+
setError(nextError.message);
|
|
85
|
+
}
|
|
86
|
+
onError?.(nextError, device);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const submitCode = async () => {
|
|
90
|
+
if (!selected || !code.trim()) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
await onPairingCode?.(code.trim(), selected);
|
|
95
|
+
setCode("");
|
|
96
|
+
setStatus("pairing");
|
|
97
|
+
} catch (cause) {
|
|
98
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
99
|
+
setStatus("error");
|
|
100
|
+
setError(nextError.message);
|
|
101
|
+
onError?.(nextError, selected);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const renderDevice = ({
|
|
105
|
+
item
|
|
106
|
+
}) => {
|
|
107
|
+
const image = getDeviceImage?.(item);
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
109
|
+
accessible: false,
|
|
110
|
+
onPress: () => void startPairing(item),
|
|
111
|
+
style: ({
|
|
112
|
+
pressed
|
|
113
|
+
}) => [styles.deviceRow, {
|
|
114
|
+
borderColor: theme.colors.outlineVariant
|
|
115
|
+
}, pressed && styles.pressed],
|
|
116
|
+
children: [image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
117
|
+
source: {
|
|
118
|
+
uri: image
|
|
119
|
+
},
|
|
120
|
+
style: styles.image
|
|
121
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
122
|
+
style: styles.deviceCopy,
|
|
123
|
+
children: [Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
124
|
+
theme: theme,
|
|
125
|
+
variant: "titleMedium",
|
|
126
|
+
children: deviceLabel(item)
|
|
127
|
+
}) : null, Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
128
|
+
theme: theme,
|
|
129
|
+
variant: "bodySmall",
|
|
130
|
+
children: item.deviceData.manufacturerName || "Bluetooth device"
|
|
131
|
+
}) : null]
|
|
132
|
+
}), Button ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
133
|
+
theme: theme,
|
|
134
|
+
mode: "outlined",
|
|
135
|
+
compact: true,
|
|
136
|
+
onPress: () => void startPairing(item),
|
|
137
|
+
children: "Pair"
|
|
138
|
+
}) : null]
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
142
|
+
testID: testID,
|
|
143
|
+
style: styles.container,
|
|
144
|
+
children: [Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
145
|
+
theme: theme,
|
|
146
|
+
variant: "headlineSmall",
|
|
147
|
+
children: "Add a device"
|
|
148
|
+
}) : null, Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
149
|
+
theme: theme,
|
|
150
|
+
variant: "bodyMedium",
|
|
151
|
+
children: "Wake your monitor and choose it when it appears nearby."
|
|
152
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
153
|
+
data: devices,
|
|
154
|
+
keyExtractor: item => item.id,
|
|
155
|
+
renderItem: renderDevice,
|
|
156
|
+
ListEmptyComponent: Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
157
|
+
theme: theme,
|
|
158
|
+
variant: "bodyMedium",
|
|
159
|
+
children: "No supported devices found yet."
|
|
160
|
+
}) : null,
|
|
161
|
+
contentContainerStyle: styles.list
|
|
162
|
+
}), selected && status === "code-required" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
163
|
+
style: styles.codePrompt,
|
|
164
|
+
children: [Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
165
|
+
theme: theme,
|
|
166
|
+
variant: "titleMedium",
|
|
167
|
+
children: "Type the code your monitor shows"
|
|
168
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.TextInput, {
|
|
169
|
+
theme: theme,
|
|
170
|
+
label: "Pairing code",
|
|
171
|
+
value: code,
|
|
172
|
+
onChangeText: setCode,
|
|
173
|
+
keyboardType: "number-pad",
|
|
174
|
+
autoFocus: true,
|
|
175
|
+
testID: testID ? `${testID}-code` : undefined
|
|
176
|
+
}), Button ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
177
|
+
theme: theme,
|
|
178
|
+
mode: "contained",
|
|
179
|
+
onPress: () => void submitCode(),
|
|
180
|
+
children: "Continue"
|
|
181
|
+
}) : null]
|
|
182
|
+
}) : null, selected && status === "pairing" && Text ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(Text, {
|
|
183
|
+
theme: theme,
|
|
184
|
+
variant: "bodyMedium",
|
|
185
|
+
children: ["Pairing ", deviceLabel(selected), "\u2026"]
|
|
186
|
+
}) : null, selected && status === "paired" && Text ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(Text, {
|
|
187
|
+
theme: theme,
|
|
188
|
+
variant: "bodyMedium",
|
|
189
|
+
children: [deviceLabel(selected), " is ready."]
|
|
190
|
+
}) : null, error && Text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Text, {
|
|
191
|
+
theme: theme,
|
|
192
|
+
variant: "bodyMedium",
|
|
193
|
+
style: {
|
|
194
|
+
color: theme.colors.error
|
|
195
|
+
},
|
|
196
|
+
children: error
|
|
197
|
+
}) : null, selected && status === "error" && Button ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Button, {
|
|
198
|
+
theme: theme,
|
|
199
|
+
mode: "outlined",
|
|
200
|
+
onPress: () => void startPairing(selected),
|
|
201
|
+
children: "Try again"
|
|
202
|
+
}) : null, Text && paired.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(Text, {
|
|
203
|
+
theme: theme,
|
|
204
|
+
variant: "bodySmall",
|
|
205
|
+
children: [paired.length, " device", paired.length === 1 ? "" : "s", " remembered"]
|
|
206
|
+
}) : null]
|
|
207
|
+
});
|
|
208
|
+
return Card ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Card, {
|
|
209
|
+
theme: theme,
|
|
210
|
+
mode: "contained",
|
|
211
|
+
children: content
|
|
212
|
+
}) : content;
|
|
213
|
+
};
|
|
214
|
+
exports.PairingFlow = PairingFlow;
|
|
215
|
+
const styles = _reactNative.StyleSheet.create({
|
|
216
|
+
container: {
|
|
217
|
+
gap: 12,
|
|
218
|
+
padding: 16
|
|
219
|
+
},
|
|
220
|
+
list: {
|
|
221
|
+
gap: 8
|
|
222
|
+
},
|
|
223
|
+
deviceRow: {
|
|
224
|
+
alignItems: "center",
|
|
225
|
+
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
226
|
+
borderRadius: 12,
|
|
227
|
+
flexDirection: "row",
|
|
228
|
+
gap: 12,
|
|
229
|
+
padding: 12
|
|
230
|
+
},
|
|
231
|
+
deviceCopy: {
|
|
232
|
+
flex: 1,
|
|
233
|
+
gap: 2
|
|
234
|
+
},
|
|
235
|
+
image: {
|
|
236
|
+
borderRadius: 8,
|
|
237
|
+
height: 48,
|
|
238
|
+
width: 48
|
|
239
|
+
},
|
|
240
|
+
pressed: {
|
|
241
|
+
opacity: 0.65
|
|
242
|
+
},
|
|
243
|
+
codePrompt: {
|
|
244
|
+
gap: 10
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
//# sourceMappingURL=pairing-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativePaper","_index","_useOvokUi","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","deviceLabel","device","deviceData","model","localName","String","name","PairingFlow","storage","storageKey","getDeviceImage","onPaired","onPairingCode","onError","testID","theme","themeOverride","slots","uiSlots","useOvokUi","devices","pair","pairNearby","useNearbyDevices","paired","remember","usePairedDevices","selected","setSelected","useState","status","setStatus","code","setCode","error","setError","bondedRef","useRef","pairingCodeRequiredRef","Text","PaperText","Button","PaperButton","Card","PaperCard","useRuntimeEvent","event","id","kind","pairingCodeRequired","current","startPairing","undefined","cause","nextError","Error","message","submitCode","trim","renderDevice","item","image","jsxs","Pressable","accessible","onPress","style","pressed","styles","deviceRow","borderColor","colors","outlineVariant","children","jsx","Image","source","uri","View","deviceCopy","variant","manufacturerName","mode","compact","content","container","FlatList","data","keyExtractor","renderItem","ListEmptyComponent","contentContainerStyle","list","codePrompt","TextInput","label","value","onChangeText","keyboardType","autoFocus","color","length","exports","StyleSheet","create","gap","padding","alignItems","borderWidth","hairlineWidth","borderRadius","flexDirection","flex","height","width","opacity"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/pairing-flow.tsx"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AASA,IAAAI,UAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAA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