@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,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import * as React from "react";
|
|
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";
|
|
9
|
+
import { useOvokUi } from "../use-ovok-ui.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const deviceLabel = device => device.deviceData.model || device.deviceData.localName || String(device.deviceData.name);
|
|
12
|
+
export const PairingFlow = ({
|
|
13
|
+
storage,
|
|
14
|
+
storageKey,
|
|
15
|
+
getDeviceImage,
|
|
16
|
+
onPaired,
|
|
17
|
+
onPairingCode,
|
|
18
|
+
onError,
|
|
19
|
+
testID,
|
|
20
|
+
theme: themeOverride,
|
|
21
|
+
slots
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
theme,
|
|
25
|
+
slots: uiSlots
|
|
26
|
+
} = useOvokUi({
|
|
27
|
+
theme: themeOverride,
|
|
28
|
+
slots
|
|
29
|
+
});
|
|
30
|
+
const {
|
|
31
|
+
devices,
|
|
32
|
+
pair: pairNearby
|
|
33
|
+
} = useNearbyDevices();
|
|
34
|
+
const {
|
|
35
|
+
paired,
|
|
36
|
+
pair: remember
|
|
37
|
+
} = usePairedDevices({
|
|
38
|
+
storage,
|
|
39
|
+
storageKey
|
|
40
|
+
});
|
|
41
|
+
const [selected, setSelected] = React.useState();
|
|
42
|
+
const [status, setStatus] = React.useState("idle");
|
|
43
|
+
const [code, setCode] = React.useState("");
|
|
44
|
+
const [error, setError] = React.useState();
|
|
45
|
+
const bondedRef = React.useRef(false);
|
|
46
|
+
const pairingCodeRequiredRef = React.useRef(false);
|
|
47
|
+
const Text = uiSlots.Text ?? PaperText;
|
|
48
|
+
const Button = uiSlots.Button ?? PaperButton;
|
|
49
|
+
const Card = uiSlots.Card ?? PaperCard;
|
|
50
|
+
useRuntimeEvent("connection", event => {
|
|
51
|
+
if (!selected || event.deviceData.id !== selected.id) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (event.kind === "pairing" && event.pairingCodeRequired) {
|
|
55
|
+
pairingCodeRequiredRef.current = true;
|
|
56
|
+
setStatus("code-required");
|
|
57
|
+
} else if (event.kind === "bonded") {
|
|
58
|
+
bondedRef.current = true;
|
|
59
|
+
setStatus("paired");
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const startPairing = async device => {
|
|
63
|
+
setSelected(device);
|
|
64
|
+
setError(undefined);
|
|
65
|
+
setStatus("pairing");
|
|
66
|
+
bondedRef.current = false;
|
|
67
|
+
pairingCodeRequiredRef.current = false;
|
|
68
|
+
try {
|
|
69
|
+
await pairNearby(device.id);
|
|
70
|
+
if (bondedRef.current) {
|
|
71
|
+
await remember(device);
|
|
72
|
+
setStatus("paired");
|
|
73
|
+
onPaired?.(device);
|
|
74
|
+
}
|
|
75
|
+
} catch (cause) {
|
|
76
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
77
|
+
if (!pairingCodeRequiredRef.current) {
|
|
78
|
+
setStatus("error");
|
|
79
|
+
setError(nextError.message);
|
|
80
|
+
}
|
|
81
|
+
onError?.(nextError, device);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const submitCode = async () => {
|
|
85
|
+
if (!selected || !code.trim()) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
await onPairingCode?.(code.trim(), selected);
|
|
90
|
+
setCode("");
|
|
91
|
+
setStatus("pairing");
|
|
92
|
+
} catch (cause) {
|
|
93
|
+
const nextError = cause instanceof Error ? cause : new Error(String(cause));
|
|
94
|
+
setStatus("error");
|
|
95
|
+
setError(nextError.message);
|
|
96
|
+
onError?.(nextError, selected);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const renderDevice = ({
|
|
100
|
+
item
|
|
101
|
+
}) => {
|
|
102
|
+
const image = getDeviceImage?.(item);
|
|
103
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
104
|
+
accessible: false,
|
|
105
|
+
onPress: () => void startPairing(item),
|
|
106
|
+
style: ({
|
|
107
|
+
pressed
|
|
108
|
+
}) => [styles.deviceRow, {
|
|
109
|
+
borderColor: theme.colors.outlineVariant
|
|
110
|
+
}, pressed && styles.pressed],
|
|
111
|
+
children: [image ? /*#__PURE__*/_jsx(Image, {
|
|
112
|
+
source: {
|
|
113
|
+
uri: image
|
|
114
|
+
},
|
|
115
|
+
style: styles.image
|
|
116
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
117
|
+
style: styles.deviceCopy,
|
|
118
|
+
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
119
|
+
theme: theme,
|
|
120
|
+
variant: "titleMedium",
|
|
121
|
+
children: deviceLabel(item)
|
|
122
|
+
}) : null, Text ? /*#__PURE__*/_jsx(Text, {
|
|
123
|
+
theme: theme,
|
|
124
|
+
variant: "bodySmall",
|
|
125
|
+
children: item.deviceData.manufacturerName || "Bluetooth device"
|
|
126
|
+
}) : null]
|
|
127
|
+
}), Button ? /*#__PURE__*/_jsx(Button, {
|
|
128
|
+
theme: theme,
|
|
129
|
+
mode: "outlined",
|
|
130
|
+
compact: true,
|
|
131
|
+
onPress: () => void startPairing(item),
|
|
132
|
+
children: "Pair"
|
|
133
|
+
}) : null]
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
const content = /*#__PURE__*/_jsxs(View, {
|
|
137
|
+
testID: testID,
|
|
138
|
+
style: styles.container,
|
|
139
|
+
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
140
|
+
theme: theme,
|
|
141
|
+
variant: "headlineSmall",
|
|
142
|
+
children: "Add a device"
|
|
143
|
+
}) : null, Text ? /*#__PURE__*/_jsx(Text, {
|
|
144
|
+
theme: theme,
|
|
145
|
+
variant: "bodyMedium",
|
|
146
|
+
children: "Wake your monitor and choose it when it appears nearby."
|
|
147
|
+
}) : null, /*#__PURE__*/_jsx(FlatList, {
|
|
148
|
+
data: devices,
|
|
149
|
+
keyExtractor: item => item.id,
|
|
150
|
+
renderItem: renderDevice,
|
|
151
|
+
ListEmptyComponent: Text ? /*#__PURE__*/_jsx(Text, {
|
|
152
|
+
theme: theme,
|
|
153
|
+
variant: "bodyMedium",
|
|
154
|
+
children: "No supported devices found yet."
|
|
155
|
+
}) : null,
|
|
156
|
+
contentContainerStyle: styles.list
|
|
157
|
+
}), selected && status === "code-required" ? /*#__PURE__*/_jsxs(View, {
|
|
158
|
+
style: styles.codePrompt,
|
|
159
|
+
children: [Text ? /*#__PURE__*/_jsx(Text, {
|
|
160
|
+
theme: theme,
|
|
161
|
+
variant: "titleMedium",
|
|
162
|
+
children: "Type the code your monitor shows"
|
|
163
|
+
}) : null, /*#__PURE__*/_jsx(TextInput, {
|
|
164
|
+
theme: theme,
|
|
165
|
+
label: "Pairing code",
|
|
166
|
+
value: code,
|
|
167
|
+
onChangeText: setCode,
|
|
168
|
+
keyboardType: "number-pad",
|
|
169
|
+
autoFocus: true,
|
|
170
|
+
testID: testID ? `${testID}-code` : undefined
|
|
171
|
+
}), Button ? /*#__PURE__*/_jsx(Button, {
|
|
172
|
+
theme: theme,
|
|
173
|
+
mode: "contained",
|
|
174
|
+
onPress: () => void submitCode(),
|
|
175
|
+
children: "Continue"
|
|
176
|
+
}) : null]
|
|
177
|
+
}) : null, selected && status === "pairing" && Text ? /*#__PURE__*/_jsxs(Text, {
|
|
178
|
+
theme: theme,
|
|
179
|
+
variant: "bodyMedium",
|
|
180
|
+
children: ["Pairing ", deviceLabel(selected), "\u2026"]
|
|
181
|
+
}) : null, selected && status === "paired" && Text ? /*#__PURE__*/_jsxs(Text, {
|
|
182
|
+
theme: theme,
|
|
183
|
+
variant: "bodyMedium",
|
|
184
|
+
children: [deviceLabel(selected), " is ready."]
|
|
185
|
+
}) : null, error && Text ? /*#__PURE__*/_jsx(Text, {
|
|
186
|
+
theme: theme,
|
|
187
|
+
variant: "bodyMedium",
|
|
188
|
+
style: {
|
|
189
|
+
color: theme.colors.error
|
|
190
|
+
},
|
|
191
|
+
children: error
|
|
192
|
+
}) : null, selected && status === "error" && Button ? /*#__PURE__*/_jsx(Button, {
|
|
193
|
+
theme: theme,
|
|
194
|
+
mode: "outlined",
|
|
195
|
+
onPress: () => void startPairing(selected),
|
|
196
|
+
children: "Try again"
|
|
197
|
+
}) : null, Text && paired.length > 0 ? /*#__PURE__*/_jsxs(Text, {
|
|
198
|
+
theme: theme,
|
|
199
|
+
variant: "bodySmall",
|
|
200
|
+
children: [paired.length, " device", paired.length === 1 ? "" : "s", " remembered"]
|
|
201
|
+
}) : null]
|
|
202
|
+
});
|
|
203
|
+
return Card ? /*#__PURE__*/_jsx(Card, {
|
|
204
|
+
theme: theme,
|
|
205
|
+
mode: "contained",
|
|
206
|
+
children: content
|
|
207
|
+
}) : content;
|
|
208
|
+
};
|
|
209
|
+
const styles = StyleSheet.create({
|
|
210
|
+
container: {
|
|
211
|
+
gap: 12,
|
|
212
|
+
padding: 16
|
|
213
|
+
},
|
|
214
|
+
list: {
|
|
215
|
+
gap: 8
|
|
216
|
+
},
|
|
217
|
+
deviceRow: {
|
|
218
|
+
alignItems: "center",
|
|
219
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
220
|
+
borderRadius: 12,
|
|
221
|
+
flexDirection: "row",
|
|
222
|
+
gap: 12,
|
|
223
|
+
padding: 12
|
|
224
|
+
},
|
|
225
|
+
deviceCopy: {
|
|
226
|
+
flex: 1,
|
|
227
|
+
gap: 2
|
|
228
|
+
},
|
|
229
|
+
image: {
|
|
230
|
+
borderRadius: 8,
|
|
231
|
+
height: 48,
|
|
232
|
+
width: 48
|
|
233
|
+
},
|
|
234
|
+
pressed: {
|
|
235
|
+
opacity: 0.65
|
|
236
|
+
},
|
|
237
|
+
codePrompt: {
|
|
238
|
+
gap: 10
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
//# sourceMappingURL=pairing-flow.js.map
|
|
@@ -0,0 +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","bondedRef","useRef","pairingCodeRequiredRef","event","id","kind","pairingCodeRequired","current","startPairing","undefined","cause","nextError","Error","message","submitCode","trim","renderDevice","item","image","accessible","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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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { FlatList, Image, Linking, StyleSheet, View } from "react-native";
|
|
5
|
+
import { Button as PaperButton, Card as PaperCard, Text as PaperText } from "react-native-paper";
|
|
6
|
+
import { SUPPORTED_DEVICES } from "../../bt-device/index.js";
|
|
7
|
+
import { useOvokUi } from "../use-ovok-ui.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const SupportedDevicesCatalogList = ({
|
|
10
|
+
devices = SUPPORTED_DEVICES,
|
|
11
|
+
onSelect,
|
|
12
|
+
renderPhoto,
|
|
13
|
+
renderCredit,
|
|
14
|
+
renderMeasurementTypes,
|
|
15
|
+
renderManual,
|
|
16
|
+
renderPairingTips,
|
|
17
|
+
labelForMeasurementType = type => type,
|
|
18
|
+
testID,
|
|
19
|
+
...uiProps
|
|
20
|
+
}) => {
|
|
21
|
+
const {
|
|
22
|
+
theme,
|
|
23
|
+
slots
|
|
24
|
+
} = useOvokUi(uiProps);
|
|
25
|
+
const Button = slots.Button ?? PaperButton;
|
|
26
|
+
const Card = slots.Card ?? PaperCard;
|
|
27
|
+
const Text = slots.Text ?? PaperText;
|
|
28
|
+
const renderItem = ({
|
|
29
|
+
item
|
|
30
|
+
}) => /*#__PURE__*/_jsx(Card, {
|
|
31
|
+
theme: theme,
|
|
32
|
+
testID: testID ? `${testID}-${item.id}` : undefined,
|
|
33
|
+
style: {
|
|
34
|
+
borderRadius: theme.borderRadius(2)
|
|
35
|
+
},
|
|
36
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
37
|
+
style: styles.content,
|
|
38
|
+
children: [renderPhoto?.(item) ?? /*#__PURE__*/_jsx(Image, {
|
|
39
|
+
accessibilityLabel: item.name,
|
|
40
|
+
source: {
|
|
41
|
+
uri: item.logo
|
|
42
|
+
},
|
|
43
|
+
style: styles.image
|
|
44
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
45
|
+
theme: theme,
|
|
46
|
+
variant: "titleMedium",
|
|
47
|
+
children: item.name
|
|
48
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
49
|
+
theme: theme,
|
|
50
|
+
children: item.manufacturer
|
|
51
|
+
}), renderMeasurementTypes?.(item) ?? /*#__PURE__*/_jsxs(Text, {
|
|
52
|
+
theme: theme,
|
|
53
|
+
children: ["Measures: ", item.measurementTypes.map(labelForMeasurementType).join(", ") || "Not specified"]
|
|
54
|
+
}), renderPairingTips?.(item) ?? /*#__PURE__*/_jsx(Text, {
|
|
55
|
+
theme: theme,
|
|
56
|
+
children: "Follow the device instructions before pairing."
|
|
57
|
+
}), renderCredit?.(item) ?? /*#__PURE__*/_jsxs(Text, {
|
|
58
|
+
theme: theme,
|
|
59
|
+
selectable: true,
|
|
60
|
+
style: {
|
|
61
|
+
color: theme.colors.onSurfaceVariant
|
|
62
|
+
},
|
|
63
|
+
children: ["Image credit: ", item.creditsForImage]
|
|
64
|
+
}), item.manualUrl && (renderManual?.(item) ?? /*#__PURE__*/_jsx(Button, {
|
|
65
|
+
theme: theme,
|
|
66
|
+
mode: "text",
|
|
67
|
+
onPress: () => void Linking.openURL(item.manualUrl),
|
|
68
|
+
children: "Open device manual"
|
|
69
|
+
})), onSelect && /*#__PURE__*/_jsx(Button, {
|
|
70
|
+
theme: theme,
|
|
71
|
+
mode: "outlined",
|
|
72
|
+
onPress: () => onSelect(item),
|
|
73
|
+
children: "Select device"
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
return /*#__PURE__*/_jsx(FlatList, {
|
|
78
|
+
testID: testID,
|
|
79
|
+
data: devices,
|
|
80
|
+
keyExtractor: item => item.id,
|
|
81
|
+
renderItem: renderItem,
|
|
82
|
+
contentContainerStyle: [styles.list, {
|
|
83
|
+
gap: theme.spacing(2)
|
|
84
|
+
}]
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
content: {
|
|
89
|
+
gap: 8,
|
|
90
|
+
padding: 16
|
|
91
|
+
},
|
|
92
|
+
image: {
|
|
93
|
+
alignSelf: "center",
|
|
94
|
+
height: 140,
|
|
95
|
+
width: 140
|
|
96
|
+
},
|
|
97
|
+
list: {
|
|
98
|
+
padding: 16
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=supported-devices-catalog-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","FlatList","Image","Linking","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","SUPPORTED_DEVICES","useOvokUi","jsx","_jsx","jsxs","_jsxs","SupportedDevicesCatalogList","devices","onSelect","renderPhoto","renderCredit","renderMeasurementTypes","renderManual","renderPairingTips","labelForMeasurementType","type","testID","uiProps","theme","slots","renderItem","item","id","undefined","style","borderRadius","children","styles","content","accessibilityLabel","name","source","uri","logo","image","variant","manufacturer","measurementTypes","map","join","selectable","color","colors","onSurfaceVariant","creditsForImage","manualUrl","mode","onPress","openURL","data","keyExtractor","contentContainerStyle","list","gap","spacing","create","padding","alignSelf","height","width"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/supported-devices-catalog-list.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,KAAK,EAAEC,OAAO,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzE,SACEC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,IAAI,IAAIC,SAAS,QACZ,oBAAoB;AAE3B,SACEC,iBAAiB,QAEZ,0BAAiB;AAExB,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc3C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC1CC,OAAO,GAAGP,iBAAiB;EAC3BQ,QA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AY,EAAG7B,IAAI,IAAKA,IAAI,CAACC,EAAG;IAChCF,UAAU,EAAEA,UAAW;IACvB+B,qBAAqB,EAAE,CAACxB,MAAM,CAACyB,IAAI,EAAE;MAAEC,GAAG,EAAEnC,KAAK,CAACoC,OAAO,CAAC,CAAC;IAAE,CAAC;EAAE,CACjE,CAAC;AAEN,CAAC;AAED,MAAM3B,MAAM,GAAGnC,UAAU,CAAC+D,MAAM,CAAC;EAC/B3B,OAAO,EAAE;IAAEyB,GAAG,EAAE,CAAC;IAAEG,OAAO,EAAE;EAAG,CAAC;EAChCtB,KAAK,EAAE;IAAEuB,SAAS,EAAE,QAAQ;IAAEC,MAAM,EAAE,GAAG;IAAEC,KAAK,EAAE;EAAI,CAAC;EACvDP,IAAI,EAAE;IAAEI,OAAO,EAAE;EAAG;AACtB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MeasurementTypeKey, URINE_ANALYTE_DEFINITIONS } from "@ovok/core";
|
|
4
|
+
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import { Card as PaperCard, Text as PaperText } from "react-native-paper";
|
|
6
|
+
import { measurementFieldCatalog } from "../../bt-management/index.js";
|
|
7
|
+
import { useOvokUi } from "../use-ovok-ui.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const qualitativeKeys = new Set(["nit"]);
|
|
10
|
+
const formatValue = (key, value, unit) => {
|
|
11
|
+
if (qualitativeKeys.has(key)) {
|
|
12
|
+
return value === 0 ? "Negative" : "Positive";
|
|
13
|
+
}
|
|
14
|
+
return `${value}${unit ? ` ${unit}` : ""}`;
|
|
15
|
+
};
|
|
16
|
+
export const UrineTestResult = ({
|
|
17
|
+
measurement,
|
|
18
|
+
showOnlyMeasured = false,
|
|
19
|
+
labelForAnalyte = (_key, fallback) => fallback,
|
|
20
|
+
testID,
|
|
21
|
+
...uiProps
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
theme,
|
|
25
|
+
slots
|
|
26
|
+
} = useOvokUi(uiProps);
|
|
27
|
+
const Card = slots.Card ?? PaperCard;
|
|
28
|
+
const Text = slots.Text ?? PaperText;
|
|
29
|
+
const catalog = measurementFieldCatalog[MeasurementTypeKey.urineAnalysis] ?? measurementFieldCatalog[MeasurementTypeKey.uricAcid] ?? {};
|
|
30
|
+
const rows = URINE_ANALYTE_DEFINITIONS.filter(({
|
|
31
|
+
key
|
|
32
|
+
}) => {
|
|
33
|
+
const value = measurement[key];
|
|
34
|
+
return !showOnlyMeasured || typeof value === "number";
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/_jsx(Card, {
|
|
37
|
+
theme: theme,
|
|
38
|
+
testID: testID,
|
|
39
|
+
style: {
|
|
40
|
+
borderRadius: theme.borderRadius(2)
|
|
41
|
+
},
|
|
42
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
43
|
+
style: styles.content,
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
45
|
+
theme: theme,
|
|
46
|
+
variant: "titleMedium",
|
|
47
|
+
children: "Urine test result"
|
|
48
|
+
}), rows.map(({
|
|
49
|
+
key,
|
|
50
|
+
display,
|
|
51
|
+
unit
|
|
52
|
+
}) => {
|
|
53
|
+
const value = measurement[key];
|
|
54
|
+
const definition = catalog[key];
|
|
55
|
+
const measured = typeof value === "number";
|
|
56
|
+
const inUsualRange = measured && definition?.normalMin !== undefined && definition.normalMax !== undefined ? value >= definition.normalMin && value <= definition.normalMax : undefined;
|
|
57
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
58
|
+
style: styles.row,
|
|
59
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
60
|
+
style: styles.grow,
|
|
61
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
62
|
+
theme: theme,
|
|
63
|
+
children: labelForAnalyte(key, display)
|
|
64
|
+
}), inUsualRange !== undefined && /*#__PURE__*/_jsx(Text, {
|
|
65
|
+
theme: theme,
|
|
66
|
+
style: {
|
|
67
|
+
color: inUsualRange ? theme.colors.primary : theme.colors.error
|
|
68
|
+
},
|
|
69
|
+
children: inUsualRange ? "Within usual range" : "Outside usual range"
|
|
70
|
+
})]
|
|
71
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
72
|
+
theme: theme,
|
|
73
|
+
children: measured ? formatValue(key, value, unit) : "Not measured"
|
|
74
|
+
})]
|
|
75
|
+
}, key);
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const styles = StyleSheet.create({
|
|
81
|
+
content: {
|
|
82
|
+
gap: 10,
|
|
83
|
+
padding: 16
|
|
84
|
+
},
|
|
85
|
+
grow: {
|
|
86
|
+
flex: 1
|
|
87
|
+
},
|
|
88
|
+
row: {
|
|
89
|
+
alignItems: "flex-start",
|
|
90
|
+
flexDirection: "row",
|
|
91
|
+
gap: 8
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=urine-test-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","URINE_ANALYTE_DEFINITIONS","StyleSheet","View","Card","PaperCard","Text","PaperText","measurementFieldCatalog","useOvokUi","jsx","_jsx","jsxs","_jsxs","qualitativeKeys","Set","formatValue","key","value","unit","has","UrineTestResult","measurement","showOnlyMeasured","labelForAnalyte","_key","fallback","testID","uiProps","theme","slots","catalog","urineAnalysis","uricAcid","rows","filter","style","borderRadius","children","styles","content","variant","map","display","definition","measured","inUsualRange","normalMin","undefined","normalMax","row","grow","color","colors","primary","error","create","gap","padding","flex","alignItems","flexDirection"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/urine-test-result.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,yBAAyB,QAEpB,YAAY;AACnB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAAS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CAACL,IAAI;cAACuB,KAAK,EAAEA,KAAM;cAACO,KAAK,EAAE;gBAAEgB,KAAK,EAAEN,YAAY,GAAGjB,KAAK,CAACwB,MAAM,CAACC,OAAO,GAAGzB,KAAK,CAACwB,MAAM,CAACE;cAAM,CAAE;cAAAjB,QAAA,EAC5FQ,YAAY,GAAG,oBAAoB,GAAG;YAAqB,CACxD,CACP;UAAA,CACG,CAAC,eACPnC,IAAA,CAACL,IAAI;YAACuB,KAAK,EAAEA,KAAM;YAAAS,QAAA,EAAEO,QAAQ,GAAG7B,WAAW,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,CAAC,GAAG;UAAc,CAAO,CAAC;QAAA,GAT7EF,GAUL,CAAC;MAEX,CAAC,CAAC;IAAA,CACE;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMsB,MAAM,GAAGrC,UAAU,CAACsD,MAAM,CAAC;EAC/BhB,OAAO,EAAE;IAAEiB,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG,CAAC;EACjCP,IAAI,EAAE;IAAEQ,IAAI,EAAE;EAAE,CAAC;EACjBT,GAAG,EAAE;IAAEU,UAAU,EAAE,YAAY;IAAEC,aAAa,EAAE,KAAK;IAAEJ,GAAG,EAAE;EAAE;AAChE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export * from "./use-ovok-ui.js";
|
|
5
|
+
export * from "./components/ecg-strip-viewer.js";
|
|
6
|
+
export * from "./components/manual-entry-form.js";
|
|
7
|
+
export * from "./components/supported-devices-catalog-list.js";
|
|
8
|
+
export * from "./components/bluetooth-state-notice.js";
|
|
9
|
+
export * from "./components/pairing-flow.js";
|
|
10
|
+
export * from "./components/urine-test-result.js";
|
|
11
|
+
export * from "./components/health-import-card.js";
|
|
12
|
+
export * from "./components/background-sync-setting.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/ui/index.ts"],"mappings":";;AAAA,cAAc,YAAS;AACvB,cAAc,kBAAe;AAC7B,cAAc,kCAA+B;AAC7C,cAAc,mCAAgC;AAC9C,cAAc,gDAA6C;AAC3D,cAAc,wCAAqC;AACnD,cAAc,8BAA2B;AACzC,cAAc,mCAAgC;AAC9C,cAAc,oCAAiC;AAC/C,cAAc,yCAAsC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/ui/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { Button as PaperButton, Card as PaperCard, MD3LightTheme, Text as PaperText, useTheme } from "react-native-paper";
|
|
6
|
+
const defaultTheme = {
|
|
7
|
+
...MD3LightTheme,
|
|
8
|
+
spacing: value => value * 4,
|
|
9
|
+
borderRadius: value => value * 4
|
|
10
|
+
};
|
|
11
|
+
export const mergeOvokTheme = (base, override) => ({
|
|
12
|
+
...base,
|
|
13
|
+
...override,
|
|
14
|
+
colors: {
|
|
15
|
+
...base.colors,
|
|
16
|
+
...override?.colors
|
|
17
|
+
},
|
|
18
|
+
fonts: {
|
|
19
|
+
...base.fonts,
|
|
20
|
+
...override?.fonts
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export const useOvokUi = ({
|
|
24
|
+
theme: override,
|
|
25
|
+
slots
|
|
26
|
+
} = {}) => {
|
|
27
|
+
const paperTheme = useTheme();
|
|
28
|
+
const appTheme = paperTheme;
|
|
29
|
+
const base = {
|
|
30
|
+
...defaultTheme,
|
|
31
|
+
...paperTheme,
|
|
32
|
+
spacing: typeof appTheme.spacing === "function" ? appTheme.spacing : defaultTheme.spacing,
|
|
33
|
+
borderRadius: typeof appTheme.borderRadius === "function" ? appTheme.borderRadius : defaultTheme.borderRadius
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
theme: mergeOvokTheme(base, override),
|
|
37
|
+
slots: {
|
|
38
|
+
Button: PaperButton,
|
|
39
|
+
Card: PaperCard,
|
|
40
|
+
Text: PaperText,
|
|
41
|
+
...slots
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=use-ovok-ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Button","PaperButton","Card","PaperCard","MD3LightTheme","Text","PaperText","useTheme","defaultTheme","spacing","value","borderRadius","mergeOvokTheme","base","override","colors","fonts","useOvokUi","theme","slots","paperTheme","appTheme"],"sourceRoot":"../../../../src","sources":["modules/ui/use-ovok-ui.ts"],"mappings":";;AAAA;;AAEA,SACEA,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,aAAa,EACbC,IAAI,IAAIC,SAAS,EACjBC,QAAQ,QACH,oBAAoB;AAI3B,MAAMC,YAAuB,GAAG;EAC9B,GAAGJ,aAAa;EAChBK,OAAO,EAAGC,KAAK,IAAKA,KAAK,GAAG,CAAC;EAC7BC,YAAY,EAAGD,KAAK,IAAKA,KAAK,GAAG;AACnC,CAAC;AAED,OAAO,MAAME,cAAc,GAAGA,CAC5BC,IAAe,EACfC,QAA4B,MACb;EACf,GAAGD,IAAI;EACP,GAAGC,QAAQ;EACXC,MAAM,EAAE;IAAE,GAAGF,IAAI,CAACE,MAAM;IAAE,GAAGD,QAAQ,EAAEC;EAAO,CAAC;EAC/CC,KAAK,EAAE;IAAE,GAAGH,IAAI,CAACG,KAAK;IAAE,GAAGF,QAAQ,EAAEE;EAAM;AAC7C,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBC,KAAK,EAAEJ,QAAQ;EACfK;AACW,CAAC,GAAG,CAAC,CAAC,KAAwD;EACzE,MAAMC,UAAU,GAAGb,QAAQ,CAAC,CAAC;EAC7B,MAAMc,QAAQ,GAAGD,UAAgC;EAEjD,MAAMP,IAAe,GAAG;IACtB,GAAGL,YAAY;IACf,GAAGY,UAAU;IACbX,OAAO,EAAE,OAAOY,QAAQ,CAACZ,OAAO,KAAK,UAAU,GAAGY,QAAQ,CAACZ,OAAO,GAAGD,YAAY,CAACC,OAAO;IACzFE,YAAY,EAAE,OAAOU,QAAQ,CAACV,YAAY,KAAK,UAAU,GAAGU,QAAQ,CAACV,YAAY,GAAGH,YAAY,CAACG;EACnG,CAAC;EAED,OAAO;IACLO,KAAK,EAAEN,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC;IACrCK,KAAK,EAAE;MACLnB,MAAM,EAAEC,WAAW;MACnBC,IAAI,EAAEC,SAAS;MACfE,IAAI,EAAEC,SAAS;MACf,GAAGa;IACL;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -10,18 +10,9 @@ export * from "./modules/observation-detail";
|
|
|
10
10
|
export * from "./modules/content";
|
|
11
11
|
export * from "./modules/bt-management";
|
|
12
12
|
export * from "./polyfills";
|
|
13
|
-
export * from "./modules/pdf";
|
|
14
|
-
export * from "./modules/picker-sheet";
|
|
15
|
-
export * from "./modules/bt-device";
|
|
16
13
|
export * from "./modules/language-switcher";
|
|
17
14
|
export * from "./modules/journal";
|
|
18
|
-
export * from "./modules/breathing-exercise";
|
|
19
15
|
export * from "./modules/progress-bar";
|
|
20
16
|
export * from "./modules/patient";
|
|
21
|
-
export * from "./modules/bt-management/components/bt-provider";
|
|
22
|
-
export * from "./modules/socket";
|
|
23
17
|
export * from "./modules/questionnaire-response-form";
|
|
24
|
-
export * from "./modules/image";
|
|
25
|
-
export * from "./modules/data-sync";
|
|
26
|
-
export * from "./modules/background-sync";
|
|
27
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uCAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-account-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/delete-account-button/components/delete-account-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-account-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/delete-account-button/components/delete-account-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,eAAO,MAAM,mBAAmB,GAAI,kDAMjC,wBAAwB,sBAqG1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-rate-limit-cooldown.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-rate-limit-cooldown.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,MAgBrD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useClient } from "@ovok/core";
|
|
2
|
+
import { OvokNativeSession, SessionRevokeOption, SessionStatus } from "../types/session";
|
|
3
|
+
export interface UseSessionResult {
|
|
4
|
+
status: SessionStatus;
|
|
5
|
+
isAuthenticated: boolean;
|
|
6
|
+
profile: Awaited<ReturnType<ReturnType<typeof useClient>["getProfileAsync"]>>;
|
|
7
|
+
sessions: OvokNativeSession[];
|
|
8
|
+
loading: boolean;
|
|
9
|
+
error?: Error;
|
|
10
|
+
refresh: () => Promise<void>;
|
|
11
|
+
logout: () => Promise<void>;
|
|
12
|
+
revokeSessions: (option: SessionRevokeOption) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/** Reads and manages the server-side sessions exposed by @ovok/core. */
|
|
15
|
+
export declare const useSession: () => UseSessionResult;
|
|
16
|
+
//# sourceMappingURL=use-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAuB1B,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,wEAAwE;AACxE,eAAO,MAAM,UAAU,QAAO,gBAwG7B,CAAC"}
|
|
@@ -4,4 +4,8 @@ export * from "./profile";
|
|
|
4
4
|
export * from "./delete-account-button";
|
|
5
5
|
export * from "./logout-button";
|
|
6
6
|
export * from "./reset-password";
|
|
7
|
+
export * from "./hooks/use-rate-limit-cooldown";
|
|
8
|
+
export * from "./utils/rate-limit";
|
|
9
|
+
export * from "./hooks/use-session";
|
|
10
|
+
export * from "./session";
|
|
7
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
|
package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/logout-button/components/logout-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"logout-button.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/logout-button/components/logout-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAO,MAAM,YAAY,GAAI,kDAM1B,iBAAiB,sBAwBnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,sBA4KpE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-button.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,eAAO,MAAM,cAAc,GAAI,mEAK5B,mBAAmB,gCAsCrB,CAAC"}
|