@ovok/native 1.10.2 → 1.10.4
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 +5 -5
- package/lib/commonjs/modules/auth/default-translation.js +22 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +3 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +3 -6
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +1 -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/reset-password-form-provider.js +4 -3
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +5 -2
- package/lib/commonjs/modules/auth/session/logout-session.js.map +1 -1
- package/lib/commonjs/modules/auth/session/session-store-refresh.js +125 -0
- package/lib/commonjs/modules/auth/session/session-store-refresh.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store-request-state.js +73 -0
- package/lib/commonjs/modules/auth/session/session-store-request-state.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store-types.js +17 -0
- package/lib/commonjs/modules/auth/session/session-store-types.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store.js +56 -123
- package/lib/commonjs/modules/auth/session/session-store.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-in-error.js +10 -4
- package/lib/commonjs/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js +36 -1
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js +25 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js +6 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js +22 -36
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +74 -34
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +19 -16
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +219 -16
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-record-timing.js +52 -0
- package/lib/commonjs/modules/data-sync/utils/health-record-timing.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js +1 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js +74 -0
- package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
- package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js +41 -0
- package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
- package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js +56 -15
- package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js.map +1 -1
- package/lib/commonjs/modules/picker-sheet/index.js +11 -0
- package/lib/commonjs/modules/picker-sheet/index.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/README.md +59 -20
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +41 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +43 -5
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/index.js +20 -0
- package/lib/commonjs/modules/questionnaire-response-form/index.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-form-values.js +4 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +6 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/response-values.js +4 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
- package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +148 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js +127 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
- package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js +71 -64
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js +23 -5
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +10 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +83 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +54 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +75 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +63 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +117 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +109 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js +36 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +49 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +31 -15
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/prerequisite-gate.js +73 -0
- package/lib/commonjs/modules/ui/components/prerequisite-gate.js.map +1 -0
- package/lib/commonjs/modules/ui/default-translation.js +50 -0
- package/lib/commonjs/modules/ui/default-translation.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/polyfills/index.js +9 -7
- package/lib/commonjs/polyfills/index.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +22 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +3 -0
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-provider.js +3 -6
- package/lib/module/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +1 -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/reset-password-form-provider.js +3 -3
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +5 -2
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/session/session-store-refresh.js +121 -0
- package/lib/module/modules/auth/session/session-store-refresh.js.map +1 -0
- package/lib/module/modules/auth/session/session-store-request-state.js +69 -0
- package/lib/module/modules/auth/session/session-store-request-state.js.map +1 -0
- package/lib/module/modules/auth/session/session-store-types.js +13 -0
- package/lib/module/modules/auth/session/session-store-types.js.map +1 -0
- package/lib/module/modules/auth/session/session-store.js +56 -123
- package/lib/module/modules/auth/session/session-store.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-in-error.js +9 -4
- package/lib/module/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js +33 -1
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js +20 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js +4 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js +21 -35
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +74 -34
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +19 -16
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +219 -16
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-record-timing.js +47 -0
- package/lib/module/modules/data-sync/utils/health-record-timing.js.map +1 -0
- package/lib/module/modules/data-sync/utils/health-units.js +1 -0
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js +69 -0
- package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
- package/lib/module/modules/picker-sheet/components/value-wheel-picker.js +36 -0
- package/lib/module/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
- package/lib/module/modules/picker-sheet/components/wheel-picker.js +56 -15
- package/lib/module/modules/picker-sheet/components/wheel-picker.js.map +1 -1
- package/lib/module/modules/picker-sheet/index.js +1 -0
- package/lib/module/modules/picker-sheet/index.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/README.md +59 -20
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +42 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +41 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
- package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
- package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
- package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
- package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/index.js +2 -0
- package/lib/module/modules/questionnaire-response-form/index.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-form-values.js +2 -0
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +4 -0
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/types/response-values.js +2 -0
- package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
- package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +140 -0
- package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js +122 -0
- package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
- package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/form-utils.js +71 -64
- package/lib/module/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/form-validation.js +23 -5
- package/lib/module/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +5 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +77 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +49 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +71 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +57 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +112 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +105 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js +31 -0
- package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +44 -0
- package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +31 -15
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/prerequisite-gate.js +67 -0
- package/lib/module/modules/ui/components/prerequisite-gate.js.map +1 -0
- package/lib/module/modules/ui/default-translation.js +45 -0
- package/lib/module/modules/ui/default-translation.js.map +1 -0
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/polyfills/index.js +11 -1
- package/lib/module/polyfills/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.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/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/logout-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts +1 -18
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.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/types/background-sync.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
- 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/utils/convert-generic-health-data.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +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-form.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/hooks/use-initial-selected-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
- 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-state.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -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-form-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -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/questionnaire-response-form/types/response-values.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts +7 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +22 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +4 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form-provider.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/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/logout-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts +23 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts +33 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts +1 -18
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts +4 -2
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.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/types/background-sync.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
- 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/utils/convert-generic-health-data.d.ts +3 -2
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
- package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
- package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/picker-sheet/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +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-form.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/hooks/use-initial-selected-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
- 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-state.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -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-form-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -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/questionnaire-response-form/types/response-values.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/default-translation.d.ts +30 -0
- package/lib/typescript/module/src/modules/ui/default-translation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/polyfills/index.d.ts +7 -1
- package/lib/typescript/module/src/polyfills/index.d.ts.map +1 -1
- package/package.json +5 -8
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const compare = (value, bound) => {
|
|
4
|
+
if (typeof value === "number" && typeof bound === "number") {
|
|
5
|
+
return value - bound;
|
|
6
|
+
}
|
|
7
|
+
if (typeof value === "string" && typeof bound === "string") {
|
|
8
|
+
if (/^\d{4}(?:-\d{2}){0,2}$/.test(value) && /^\d{4}(?:-\d{2}){0,2}$/.test(bound)) {
|
|
9
|
+
return value.localeCompare(bound);
|
|
10
|
+
}
|
|
11
|
+
if (value.includes("T") && bound.includes("T")) {
|
|
12
|
+
const valueTime = Date.parse(value);
|
|
13
|
+
const boundTime = Date.parse(bound);
|
|
14
|
+
if (Number.isFinite(valueTime) && Number.isFinite(boundTime)) {
|
|
15
|
+
return valueTime - boundTime;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return value.localeCompare(bound);
|
|
19
|
+
}
|
|
20
|
+
return Number.NaN;
|
|
21
|
+
};
|
|
22
|
+
const getDateInterval = value => {
|
|
23
|
+
if (value.includes("T")) {
|
|
24
|
+
const timestamp = Date.parse(value);
|
|
25
|
+
return Number.isFinite(timestamp) ? {
|
|
26
|
+
start: timestamp,
|
|
27
|
+
end: timestamp
|
|
28
|
+
} : undefined;
|
|
29
|
+
}
|
|
30
|
+
const match = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/.exec(value);
|
|
31
|
+
if (!match) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const year = Number(match[1]);
|
|
35
|
+
const month = Number(match[2] ?? 1);
|
|
36
|
+
const startDay = Number(match[3] ?? 1);
|
|
37
|
+
const endDay = match[3] ? startDay : match[2] ? new Date(year, month, 0).getDate() : 31;
|
|
38
|
+
const start = new Date(year, month - 1, startDay).getTime();
|
|
39
|
+
const end = new Date(year, match[2] ? month - 1 : 11, endDay, 23, 59, 59, 999).getTime();
|
|
40
|
+
return {
|
|
41
|
+
start,
|
|
42
|
+
end
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const getTimeValue = value => {
|
|
46
|
+
const match = /^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/.exec(value);
|
|
47
|
+
if (!match) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const hours = Number(match[1]);
|
|
51
|
+
const minutes = Number(match[2]);
|
|
52
|
+
const seconds = Number(match[3] ?? 0);
|
|
53
|
+
if (hours > 23 || minutes > 59 || seconds > 59) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const fractionalSeconds = match[4] ? Number(`0.${match[4]}`) : 0;
|
|
57
|
+
return hours * 3600 + minutes * 60 + seconds + fractionalSeconds;
|
|
58
|
+
};
|
|
59
|
+
const validateDateConstraints = (answer, constraints) => {
|
|
60
|
+
const {
|
|
61
|
+
minValue: min,
|
|
62
|
+
maxValue: max
|
|
63
|
+
} = constraints;
|
|
64
|
+
const answerInterval = getDateInterval(answer);
|
|
65
|
+
const minInterval = typeof min === "string" ? getDateInterval(min) : undefined;
|
|
66
|
+
const maxInterval = typeof max === "string" ? getDateInterval(max) : undefined;
|
|
67
|
+
if (!answerInterval || min !== undefined && !minInterval || max !== undefined && !maxInterval) {
|
|
68
|
+
return "invalid-answer";
|
|
69
|
+
}
|
|
70
|
+
return minInterval && answerInterval.start < minInterval.start || maxInterval && answerInterval.end > maxInterval.end ? "out-of-range" : undefined;
|
|
71
|
+
};
|
|
72
|
+
const validateTimeConstraints = (answer, constraints) => {
|
|
73
|
+
const {
|
|
74
|
+
minValue: min,
|
|
75
|
+
maxValue: max
|
|
76
|
+
} = constraints;
|
|
77
|
+
const answerTime = getTimeValue(answer);
|
|
78
|
+
const minTime = typeof min === "string" ? getTimeValue(min) : undefined;
|
|
79
|
+
const maxTime = typeof max === "string" ? getTimeValue(max) : undefined;
|
|
80
|
+
if (answerTime === undefined || min !== undefined && minTime === undefined || max !== undefined && maxTime === undefined) {
|
|
81
|
+
return "invalid-answer";
|
|
82
|
+
}
|
|
83
|
+
return minTime !== undefined && answerTime < minTime || maxTime !== undefined && answerTime > maxTime ? "out-of-range" : undefined;
|
|
84
|
+
};
|
|
85
|
+
const validateOtherStringConstraints = (answer, constraints) => {
|
|
86
|
+
const {
|
|
87
|
+
minValue: min,
|
|
88
|
+
maxValue: max
|
|
89
|
+
} = constraints;
|
|
90
|
+
if (min !== undefined && max !== undefined && compare(min, max) > 0) {
|
|
91
|
+
return "out-of-range";
|
|
92
|
+
}
|
|
93
|
+
return min !== undefined && compare(answer, min) < 0 || max !== undefined && compare(answer, max) > 0 ? "out-of-range" : undefined;
|
|
94
|
+
};
|
|
95
|
+
const validateStringConstraints = (answer, item, constraints) => {
|
|
96
|
+
if (item.type === "date" || item.type === "dateTime") {
|
|
97
|
+
return validateDateConstraints(answer, constraints);
|
|
98
|
+
}
|
|
99
|
+
if (item.type === "time") {
|
|
100
|
+
return validateTimeConstraints(answer, constraints);
|
|
101
|
+
}
|
|
102
|
+
return validateOtherStringConstraints(answer, constraints);
|
|
103
|
+
};
|
|
104
|
+
export { validateStringConstraints };
|
|
105
|
+
//# sourceMappingURL=questionnaire-string-constraint-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["compare","value","bound","test","localeCompare","includes","valueTime","Date","parse","boundTime","Number","isFinite","NaN","getDateInterval","timestamp","start","end","undefined","match","exec","year","month","startDay","endDay","getDate","getTime","getTimeValue","hours","minutes","seconds","fractionalSeconds","validateDateConstraints","answer","constraints","minValue","min","maxValue","max","answerInterval","minInterval","maxInterval","validateTimeConstraints","answerTime","minTime","maxTime","validateOtherStringConstraints","validateStringConstraints","item","type"],"sourceRoot":"../../../../../src","sources":["modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.ts"],"mappings":";;AAIA,MAAMA,OAAO,GAAGA,CAACC,KAAsB,EAAEC,KAAsB,KAAa;EAC1E,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;IAC1D,OAAOD,KAAK,GAAGC,KAAK;EACtB;EAEA,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;IAC1D,IACE,wBAAwB,CAACC,IAAI,CAACF,KAAK,CAAC,IACpC,wBAAwB,CAACE,IAAI,CAACD,KAAK,CAAC,EACpC;MACA,OAAOD,KAAK,CAACG,aAAa,CAACF,KAAK,CAAC;I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
|
|
4
4
|
export class QuestionnaireSubmitUtils {
|
|
5
|
-
static createQuestionnaireResponse(responses, pages, questionnaire) {
|
|
5
|
+
static createQuestionnaireResponse(responses, pages, questionnaire, renderItem, resolver, unitOptionsResolver) {
|
|
6
6
|
const responseItems = FormUtils.createQuestionnaireResponseItems(responses, pages);
|
|
7
7
|
const response = {
|
|
8
8
|
resourceType: "QuestionnaireResponse",
|
|
9
9
|
questionnaire: `Questionnaire/${questionnaire.id}`,
|
|
10
|
-
status: "completed",
|
|
10
|
+
status: FormUtils.hasUnansweredRequiredItems(pages, responses, renderItem, resolver, unitOptionsResolver) ? "in-progress" : "completed",
|
|
11
11
|
item: responseItems,
|
|
12
12
|
authored: new Date().toISOString()
|
|
13
13
|
};
|
package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FormUtils","QuestionnaireSubmitUtils","createQuestionnaireResponse","responses","pages","questionnaire","responseItems","createQuestionnaireResponseItems","response","resourceType","id","status","item","authored","Date","toISOString"],"sourceRoot":"../../../../../src","sources":["modules/questionnaire-response-form/utils/questionnaire-submit-utils.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["FormUtils","QuestionnaireSubmitUtils","createQuestionnaireResponse","responses","pages","questionnaire","renderItem","resolver","unitOptionsResolver","responseItems","createQuestionnaireResponseItems","response","resourceType","id","status","hasUnansweredRequiredItems","item","authored","Date","toISOString"],"sourceRoot":"../../../../../src","sources":["modules/questionnaire-response-form/utils/questionnaire-submit-utils.ts"],"mappings":";;AAMA,SAASA,SAAS,QAAQ,iBAAc;AAMxC,OAAO,MAAMC,wBAAwB,CAAC;EACpC,OAAOC,2BAA2BA,CAChCC,SAAyB,EACzBC,KAAkC,EAClCC,aAA4B,EAC5BC,UAAsC,EACtCC,QAA0C,EAC1CC,mBAAsD,EAC/B;IACvB,MAAMC,aAAa,GAAGT,SAAS,CAACU,gCAAgC,CAC9DP,SAAS,EACTC,KACF,CAAC;IAED,MAAMO,QAA+B,GAAG;MACtCC,YAAY,EAAE,uBAAuB;MACrCP,aAAa,EAAE,iBAAiBA,aAAa,CAACQ,EAAE,EAAE;MAClDC,MAAM,EAAEd,SAAS,CAACe,0BAA0B,CAC1CX,KAAK,EACLD,SAAS,EACTG,UAAU,EACVC,QAAQ,EACRC,mBACF,CAAC,GACG,aAAa,GACb,WAAW;MACfQ,IAAI,EAAEP,aAAa;MACnBQ,QAAQ,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC;IACnC,CAAC;IAED,OAAOR,QAAQ;EACjB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const TRANSLATION_EXTENSION = "http://hl7.org/fhir/StructureDefinition/translation";
|
|
4
|
+
const normalizeLanguage = language => language.trim().replace(/_/g, "-").toLowerCase();
|
|
5
|
+
|
|
6
|
+
/** Resolves the standard FHIR translation extension for a primitive string. */
|
|
7
|
+
export const translateFhirText = (value, element, language) => {
|
|
8
|
+
const requestedLanguage = normalizeLanguage(language ?? "");
|
|
9
|
+
const requestedBaseLanguage = requestedLanguage.split("-")[0];
|
|
10
|
+
const translations = (element?.extension ?? []).filter(({
|
|
11
|
+
url
|
|
12
|
+
}) => url === TRANSLATION_EXTENSION).map(({
|
|
13
|
+
extension = []
|
|
14
|
+
}) => {
|
|
15
|
+
const translationLanguage = extension.find(({
|
|
16
|
+
url
|
|
17
|
+
}) => url === "lang")?.valueCode;
|
|
18
|
+
const content = extension.find(({
|
|
19
|
+
url
|
|
20
|
+
}) => url === "content");
|
|
21
|
+
const translatedValue = content?.valueString ?? content?.valueMarkdown;
|
|
22
|
+
return typeof translationLanguage === "string" && typeof translatedValue === "string" ? {
|
|
23
|
+
language: normalizeLanguage(translationLanguage),
|
|
24
|
+
value: translatedValue
|
|
25
|
+
} : undefined;
|
|
26
|
+
}).filter(translation => translation !== undefined);
|
|
27
|
+
const exactTranslation = translations.find(translation => translation.language === requestedLanguage);
|
|
28
|
+
const baseTranslation = translations.find(translation => translation.language.split("-")[0] === requestedBaseLanguage);
|
|
29
|
+
return exactTranslation?.value ?? baseTranslation?.value ?? value ?? "";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=translate-fhir-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TRANSLATION_EXTENSION","normalizeLanguage","language","trim","replace","toLowerCase","translateFhirText","value","element","requestedLanguage","requestedBaseLanguage","split","translations","extension","filter","url","map","translationLanguage","find","valueCode","content","translatedValue","valueString","valueMarkdown","undefined","translation","exactTranslation","baseTranslation"],"sourceRoot":"../../../../../src","sources":["modules/questionnaire-response-form/utils/translate-fhir-text.ts"],"mappings":";;AAEA,MAAMA,qBAAqB,GACzB,qDAAqD;AAEvD,MAAMC,iBAAiB,GAAIC,QAAgB,IACzCA,QAAQ,CAACC,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACC,WAAW,CAAC,CAAC;;AAElD;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,KAAyB,EACzBC,OAA4B,EAC5BN,QAA4B,KACjB;EACX,MAAMO,iBAAiB,GAAGR,iBAAiB,CAACC,QAAQ,IAAI,EAAE,CAAC;EAC3D,MAAMQ,qBAAqB,GAAGD,iBAAiB,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAE7D,MAAMC,YAAY,GAAG,CAACJ,OAAO,EAAEK,SAAS,IAAI,EAAE,EAC3CC,MAAM,CAAC,CAAC;IAAEC;EAAI,CAAC,KAAKA,GAAG,KAAKf,qBAAqB,CAAC,CAClDgB,GAAG,CAAC,CAAC;IAAEH,SAAS,GAAG;EAAG,CAAC,KAAK;IAC3B,MAAMI,mBAAmB,GAAGJ,SAAS,CAACK,IAAI,CACxC,CAAC;MAAEH;IAAI,CAAC,KAAKA,GAAG,KAAK,MACvB,CAAC,EAAEI,SAAS;IAEZ,MAAMC,OAAO,GAAGP,SAAS,CAACK,IAAI,CAAC,CAAC;MAAEH;IAAI,CAAC,KAAKA,GAAG,KAAK,SAAS,CAAC;IAC9D,MAAMM,eAAe,GAAGD,OAAO,EAAEE,WAAW,IAAIF,OAAO,EAAEG,aAAa;IAEtE,OAAO,OAAON,mBAAmB,KAAK,QAAQ,IAC5C,OAAOI,eAAe,KAAK,QAAQ,GACjC;MAAEnB,QAAQ,EAAED,iBAAiB,CAACgB,mBAAmB,CAAC;MAAEV,KAAK,EAAEc;IAAgB,CAAC,GAC5EG,SAAS;EACf,CAAC,CAAC,CACDV,MAAM,CAAEW,WAAW,IAAKA,WAAW,KAAKD,SAAS,CAAC;EAErD,MAAME,gBAAgB,GAAGd,YAAY,CAACM,IAAI,CACvCO,WAAW,IAAKA,WAAW,CAACvB,QAAQ,KAAKO,iBAC5C,CAAC;EAED,MAAMkB,eAAe,GAAGf,YAAY,CAACM,IAAI,CACtCO,WAAW,IAAKA,WAAW,CAACvB,QAAQ,CAACS,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAKD,qBAC1D,CAAC;EAED,OAAOgB,gBAAgB,EAAEnB,KAAK,IAAIoB,eAAe,EAAEpB,KAAK,IAAIA,KAAK,IAAI,EAAE;AACzE,CAAC","ignoreList":[]}
|
package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createAnswerFromValue } from "./create-answer-from-value.js";
|
|
4
|
+
import { getAnswerValueKey } from "./is-valid-questionnaire-answer.js";
|
|
5
|
+
import { getQuestionnaireItemConstraints } from "./questionnaire-item-constraints.js";
|
|
6
|
+
import { validateAnswerLength, validateNumberConstraints, validateQuantityConstraints } from "./questionnaire-item-value-constraint-validators.js";
|
|
7
|
+
import { validateStringConstraints } from "./questionnaire-string-constraint-validator.js";
|
|
8
|
+
const hasValue = value => value !== undefined && value !== null && value !== "";
|
|
9
|
+
const getAnswerValue = (value, item) => {
|
|
10
|
+
const answer = createAnswerFromValue(value, item);
|
|
11
|
+
if (!answer) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const key = getAnswerValueKey(answer);
|
|
15
|
+
return key ? answer[key] : undefined;
|
|
16
|
+
};
|
|
17
|
+
export const validateQuestionnaireItemValue = (value, item, answers = {}, resolver, unitOptionsResolver) => {
|
|
18
|
+
if (!hasValue(value)) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
const answer = getAnswerValue(value, item);
|
|
22
|
+
if (answer === undefined) {
|
|
23
|
+
return "invalid-answer";
|
|
24
|
+
}
|
|
25
|
+
const constraints = getQuestionnaireItemConstraints(item, answers, resolver, unitOptionsResolver);
|
|
26
|
+
if (constraints.unresolvedDynamicBounds.length > 0) {
|
|
27
|
+
return "unresolved-constraint";
|
|
28
|
+
}
|
|
29
|
+
const lengthViolation = validateAnswerLength(value, answer, item, constraints);
|
|
30
|
+
if (lengthViolation) {
|
|
31
|
+
return lengthViolation;
|
|
32
|
+
}
|
|
33
|
+
if (typeof answer === "number") {
|
|
34
|
+
return validateNumberConstraints(answer, constraints);
|
|
35
|
+
}
|
|
36
|
+
if (typeof answer === "string") {
|
|
37
|
+
return validateStringConstraints(answer, item, constraints);
|
|
38
|
+
}
|
|
39
|
+
if (typeof answer === "object" && answer !== null && "value" in answer) {
|
|
40
|
+
return validateQuantityConstraints(answer, constraints);
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=validate-questionnaire-item-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createAnswerFromValue","getAnswerValueKey","getQuestionnaireItemConstraints","validateAnswerLength","validateNumberConstraints","validateQuantityConstraints","validateStringConstraints","hasValue","value","undefined","getAnswerValue","item","answer","key","validateQuestionnaireItemValue","answers","resolver","unitOptionsResolver","constraints","unresolvedDynamicBounds","length","lengthViolation"],"sourceRoot":"../../../../../src","sources":["modules/questionnaire-response-form/utils/validate-questionnaire-item-value.ts"],"mappings":";;AAKA,SAASA,qBAAqB,QAAQ,+BAA4B;AAClE,SAASC,iBAAiB,QAAQ,oCAAiC;AACnE,SACEC,+BAA+B,QAG1B,qCAAkC;AACzC,SACEC,oBAAoB,EACpBC,yBAAyB,EACzBC,2BAA2B,QACtB,qDAAkD;AACzD,SAASC,yBAAyB,QAAQ,gDAA6C;AAUvF,MAAMC,QAAQ,GAAIC,KAAc,IAC9BA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,EAAE;AAEvD,MAAME,cAAc,GAAGA,CACrBF,KAA6B,EAC7BG,IAA+B,KACnB;EACZ,MAAMC,MAAM,GAAGZ,qBAAqB,CAACQ,KAAK,EAAEG,IAAI,CAAC;EAEjD,IAAI,CAACC,MAAM,EAAE;IACX,OAAOH,SAAS;EAClB;EAEA,MAAMI,GAAG,GAAGZ,iBAAiB,CAACW,MAAM,CAAC;EAErC,OAAOC,GAAG,GAAID,MAAM,CAA6BC,GAAG,CAAC,GAAGJ,SAAS;AACnE,CAAC;AAED,OAAO,MAAMK,8BAA8B,GAAGA,CAC5CN,KAA6B,EAC7BG,IAA+B,EAC/BI,OAAuB,GAAG,CAAC,CAAC,EAC5BC,QAA0C,EAC1CC,mBAAsD,KACN;EAChD,IAAI,CAACV,QAAQ,CAACC,KAAK,CAAC,EAAE;IACpB,OAAOC,SAAS;EAClB;EAEA,MAAMG,MAAM,GAAGF,cAAc,CAACF,KAAK,EAAEG,IAAI,CAAC;EAE1C,IAAIC,MAAM,KAAKH,SAAS,EAAE;IACxB,OAAO,gBAAgB;EACzB;EAEA,MAAMS,WAAW,GAAGhB,+BAA+B,CACjDS,IAAI,EACJI,OAAO,EACPC,QAAQ,EACRC,mBACF,CAAC;EAED,IAAIC,WAAW,CAACC,uBAAuB,CAACC,MAAM,GAAG,CAAC,EAAE;IAClD,OAAO,uBAAuB;EAChC;EAEA,MAAMC,eAAe,GAAGlB,oBAAoB,CAC1CK,KAAK,EACLI,MAAM,EACND,IAAI,EACJO,WACF,CAAC;EAED,IAAIG,eAAe,EAAE;IACnB,OAAOA,eAAe;EACxB;EAEA,IAAI,OAAOT,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAOR,yBAAyB,CAACQ,MAAM,EAAEM,WAAW,CAAC;EACvD;EAEA,IAAI,OAAON,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAON,yBAAyB,CAACM,MAAM,EAAED,IAAI,EAAEO,WAAW,CAAC;EAC7D;EAEA,IAAI,OAAON,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,IAAI,OAAO,IAAIA,MAAM,EAAE;IACtE,OAAOP,2BAA2B,CAACO,MAAM,EAAcM,WAAW,CAAC;EACrE;EAEA,OAAOT,SAAS;AAClB,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
3
5
|
import * as React from "react";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
4
7
|
import { Linking, Platform, StyleSheet, View } from "react-native";
|
|
5
8
|
import { Button as PaperButton, Card as PaperCard, Text as PaperText } from "react-native-paper";
|
|
6
9
|
import { useBluetoothState } from "../../bt-management/index.js";
|
|
10
|
+
import "../default-translation.js";
|
|
7
11
|
import { useOvokUi } from "../use-ovok-ui.js";
|
|
8
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
13
|
export const BluetoothStateNotice = ({
|
|
@@ -16,6 +20,9 @@ export const BluetoothStateNotice = ({
|
|
|
16
20
|
testID,
|
|
17
21
|
...uiProps
|
|
18
22
|
}) => {
|
|
23
|
+
const {
|
|
24
|
+
t
|
|
25
|
+
} = useTranslation();
|
|
19
26
|
const {
|
|
20
27
|
theme,
|
|
21
28
|
slots
|
|
@@ -33,7 +40,7 @@ export const BluetoothStateNotice = ({
|
|
|
33
40
|
requestPermission
|
|
34
41
|
});
|
|
35
42
|
const [busy, setBusy] = React.useState(false);
|
|
36
|
-
const [
|
|
43
|
+
const [actionFailed, setActionFailed] = React.useState(false);
|
|
37
44
|
if (state === "on") {
|
|
38
45
|
return null;
|
|
39
46
|
}
|
|
@@ -57,7 +64,7 @@ export const BluetoothStateNotice = ({
|
|
|
57
64
|
};
|
|
58
65
|
const takeAction = async () => {
|
|
59
66
|
setBusy(true);
|
|
60
|
-
|
|
67
|
+
setActionFailed(false);
|
|
61
68
|
try {
|
|
62
69
|
if (settingsAction || state === "unauthorized" && permissionStatus === "blocked") {
|
|
63
70
|
await openPermissionSettings();
|
|
@@ -70,28 +77,37 @@ export const BluetoothStateNotice = ({
|
|
|
70
77
|
if (state === "off") {
|
|
71
78
|
await openBluetoothSettings();
|
|
72
79
|
}
|
|
73
|
-
} catch
|
|
74
|
-
|
|
80
|
+
} catch {
|
|
81
|
+
setActionFailed(true);
|
|
75
82
|
} finally {
|
|
76
83
|
setBusy(false);
|
|
77
84
|
}
|
|
78
85
|
};
|
|
79
86
|
const copy = state === "unsupported" ? {
|
|
80
|
-
heading: title ?? "
|
|
81
|
-
body: "
|
|
87
|
+
heading: title ?? t("bluetooth-state-notice.unsupported.heading"),
|
|
88
|
+
body: t("bluetooth-state-notice.unsupported.body"),
|
|
82
89
|
action: undefined
|
|
90
|
+
} : state === "unauthorized" && permissionStatus === "blocked" ? {
|
|
91
|
+
heading: title ?? t("bluetooth-state-notice.blocked.heading"),
|
|
92
|
+
body: t("bluetooth-state-notice.blocked.body"),
|
|
93
|
+
action: t("bluetooth-state-notice.blocked.action")
|
|
94
|
+
} : state === "unauthorized" && permissionStatus === "denied" ? {
|
|
95
|
+
heading: title ?? t("bluetooth-state-notice.denied.heading"),
|
|
96
|
+
body: t("bluetooth-state-notice.denied.body"),
|
|
97
|
+
action: t("bluetooth-state-notice.denied.action")
|
|
83
98
|
} : state === "unauthorized" ? {
|
|
84
|
-
heading: title ?? "
|
|
85
|
-
body:
|
|
86
|
-
action:
|
|
99
|
+
heading: title ?? t("bluetooth-state-notice.unauthorized.heading"),
|
|
100
|
+
body: t("bluetooth-state-notice.unauthorized.body"),
|
|
101
|
+
action: t("bluetooth-state-notice.unauthorized.action")
|
|
87
102
|
} : {
|
|
88
|
-
heading: title ?? "
|
|
89
|
-
body: "
|
|
90
|
-
action: "
|
|
103
|
+
heading: title ?? t("bluetooth-state-notice.off.heading"),
|
|
104
|
+
body: t("bluetooth-state-notice.off.body"),
|
|
105
|
+
action: t("bluetooth-state-notice.off.action")
|
|
91
106
|
};
|
|
92
107
|
const resolvedCopy = {
|
|
93
108
|
...copy,
|
|
94
|
-
...copyOverride?.[state]
|
|
109
|
+
...copyOverride?.[state],
|
|
110
|
+
...copyOverride?.[permissionStatus]
|
|
95
111
|
};
|
|
96
112
|
const action = settingsAction ?? resolvedCopy.action;
|
|
97
113
|
return /*#__PURE__*/_jsx(Card, {
|
|
@@ -109,12 +125,12 @@ export const BluetoothStateNotice = ({
|
|
|
109
125
|
}), /*#__PURE__*/_jsx(Text, {
|
|
110
126
|
theme: theme,
|
|
111
127
|
children: resolvedCopy.body
|
|
112
|
-
}),
|
|
128
|
+
}), actionFailed && /*#__PURE__*/_jsx(Text, {
|
|
113
129
|
theme: theme,
|
|
114
130
|
style: {
|
|
115
131
|
color: theme.colors.error
|
|
116
132
|
},
|
|
117
|
-
children:
|
|
133
|
+
children: t("bluetooth-state-notice.action-error")
|
|
118
134
|
}), action && /*#__PURE__*/_jsx(Button, {
|
|
119
135
|
theme: theme,
|
|
120
136
|
loading: busy,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Linking","Platform","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","useBluetoothState","useOvokUi","jsx","_jsx","jsxs","_jsxs","BluetoothStateNotice","bleManager","requestPermission","onOpenSettings","title","copy","copyOverride","settingsAction","testID","uiProps","theme","slots","state","request","permissionStatus","openSettings","openAppSettings","busy","setBusy","useState","
|
|
1
|
+
{"version":3,"names":["React","useTranslation","Linking","Platform","StyleSheet","View","Button","PaperButton","Card","PaperCard","Text","PaperText","useBluetoothState","useOvokUi","jsx","_jsx","jsxs","_jsxs","BluetoothStateNotice","bleManager","requestPermission","onOpenSettings","title","copy","copyOverride","settingsAction","testID","uiProps","t","theme","slots","state","request","permissionStatus","openSettings","openAppSettings","busy","setBusy","useState","actionFailed","setActionFailed","openBluetoothSettings","OS","sendIntent","openURL","openPermissionSettings","takeAction","granted","heading","body","action","undefined","resolvedCopy","style","borderRadius","children","styles","content","variant","color","colors","error","loading","disabled","mode","onPress","create","gap","padding"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/bluetooth-state-notice.tsx"],"mappings":";;AAAA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,OAAO,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAElE,SACEC,MAAM,IAAIC,WAAW,EACrBC,IAAI,IAAIC,SAAS,EACjBC,IAAI,IAAIC,SAAS,QACZ,oBAAoB;AAI3B,SAASC,iBAAiB,QAAQ,8BAAqB;AACvD,OAAO,2BAAwB;AAE/B,SAASC,SAAS,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuB3C,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,UAAU;EACVC,iBAAiB;EACjBC,cAAc;EACdC,KAAK;EACLC,IAAI,EAAEC,YAAY;EAClBC,cAAc;EACdC,MAAM;EACN,GAAGC;AACsB,CAAC,KAAK;EAC/B,MAAM;IAAEC;EAAE,CAAC,GAAG3B,cAAc,CAAC,CAAC;EAC9B,MAAM;IAAE4B,KAAK;IAAEC;EAAM,CAAC,GAAGjB,SA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AChBC,OAAO,EAAEA,CAAA,KAAM,KAAKnB,UAAU,CAAC,CAAE;QAAAS,QAAA,EAEhCL;MAAM,CACD,CACT;IAAA,CACG;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGpD,UAAU,CAAC8D,MAAM,CAAC;EAAET,OAAO,EAAE;IAAEU,GAAG,EAAE,EAAE;IAAEC,OAAO,EAAE;EAAG;AAAE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
/**
|
|
6
|
+
* Loads host-defined, account-scoped prerequisites before rendering children.
|
|
7
|
+
* This is a UI gate only; backend authorization remains authoritative.
|
|
8
|
+
*/
|
|
9
|
+
export const PrerequisiteGate = ({
|
|
10
|
+
scopeKey,
|
|
11
|
+
check,
|
|
12
|
+
pending = null,
|
|
13
|
+
renderRequired,
|
|
14
|
+
onError,
|
|
15
|
+
children
|
|
16
|
+
}) => {
|
|
17
|
+
const checkRef = React.useRef(check);
|
|
18
|
+
const onErrorRef = React.useRef(onError);
|
|
19
|
+
const [attempt, setAttempt] = React.useState(0);
|
|
20
|
+
const [result, setResult] = React.useState();
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
checkRef.current = check;
|
|
23
|
+
onErrorRef.current = onError;
|
|
24
|
+
}, [check, onError]);
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
let active = true;
|
|
27
|
+
void Promise.resolve().then(() => checkRef.current()).then(requirement => {
|
|
28
|
+
if (active) {
|
|
29
|
+
setResult({
|
|
30
|
+
scopeKey,
|
|
31
|
+
attempt,
|
|
32
|
+
requirement: requirement ?? null
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}).catch(error => {
|
|
36
|
+
if (active) {
|
|
37
|
+
setResult({
|
|
38
|
+
scopeKey,
|
|
39
|
+
attempt,
|
|
40
|
+
requirement: null
|
|
41
|
+
});
|
|
42
|
+
onErrorRef.current?.(error);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
active = false;
|
|
47
|
+
};
|
|
48
|
+
}, [scopeKey, attempt]);
|
|
49
|
+
const refresh = React.useCallback(() => {
|
|
50
|
+
setAttempt(current => current + 1);
|
|
51
|
+
}, []);
|
|
52
|
+
const currentResult = result?.scopeKey === scopeKey && result.attempt === attempt ? result : undefined;
|
|
53
|
+
if (!currentResult) {
|
|
54
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
55
|
+
children: pending
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (currentResult.requirement === null) {
|
|
59
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
64
|
+
children: renderRequired(currentResult.requirement, refresh)
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=prerequisite-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Fragment","_Fragment","jsx","_jsx","PrerequisiteGate","scopeKey","check","pending","renderRequired","onError","children","checkRef","useRef","onErrorRef","attempt","setAttempt","useState","result","setResult","useEffect","current","active","Promise","resolve","then","requirement","catch","error","refresh","useCallback","currentResult","undefined"],"sourceRoot":"../../../../../src","sources":["modules/ui/components/prerequisite-gate.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AA0B/B;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGA,CAAK;EACnCC,QAAQ;EACRC,KAAK;EACLC,OAAO,GAAG,IAAI;EACdC,cAAc;EACdC,OAAO;EACPC;AACwB,CAAC,KAAK;EAC9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K,OAAO,IAAKA,OAAO,GAAG,CAAC,CAAC;EACtC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMU,aAAa,GACjBb,MAAM,EAAEZ,QAAQ,KAAKA,QAAQ,IAAIY,MAAM,CAACH,OAAO,KAAKA,OAAO,GACvDG,MAAM,GACNc,SAAS;EAEf,IAAI,CAACD,aAAa,EAAE;IAClB,oBAAO3B,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGH;IAAO,CAAG,CAAC;EACvB;EAEA,IAAIuB,aAAa,CAACL,WAAW,KAAK,IAAI,EAAE;IACtC,oBAAOtB,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACxB;EAEA,oBAAOP,IAAA,CAAAF,SAAA;IAAAS,QAAA,EAAGF,cAAc,CAACsB,aAAa,CAACL,WAAW,EAAEG,OAAO;EAAC,CAAG,CAAC;AAClE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import i18n from "i18next";
|
|
4
|
+
export const defaultUiTranslation = {
|
|
5
|
+
"bluetooth-state-notice": {
|
|
6
|
+
off: {
|
|
7
|
+
heading: "Bluetooth is off",
|
|
8
|
+
body: "Turn on Bluetooth to find and connect to health devices.",
|
|
9
|
+
action: "Open Bluetooth settings"
|
|
10
|
+
},
|
|
11
|
+
unsupported: {
|
|
12
|
+
heading: "Bluetooth is not supported",
|
|
13
|
+
body: "This device cannot use Bluetooth Low Energy."
|
|
14
|
+
},
|
|
15
|
+
unauthorized: {
|
|
16
|
+
heading: "Bluetooth permission is required",
|
|
17
|
+
body: "Allow Bluetooth access to find health devices.",
|
|
18
|
+
action: "Allow access"
|
|
19
|
+
},
|
|
20
|
+
denied: {
|
|
21
|
+
heading: "Bluetooth permission is required",
|
|
22
|
+
body: "Allow Bluetooth access to find health devices.",
|
|
23
|
+
action: "Allow access"
|
|
24
|
+
},
|
|
25
|
+
blocked: {
|
|
26
|
+
heading: "Bluetooth permission is blocked",
|
|
27
|
+
body: "Allow Bluetooth access in app settings to find health devices.",
|
|
28
|
+
action: "Open app settings"
|
|
29
|
+
},
|
|
30
|
+
"action-error": "Bluetooth settings could not be opened. Please try again."
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
if (typeof i18n.addResourceBundle === "function") {
|
|
34
|
+
i18n.addResourceBundle("en", "translation", defaultUiTranslation, true, false);
|
|
35
|
+
} else {
|
|
36
|
+
const resources = i18n.options.resources ?? {};
|
|
37
|
+
const englishResources = Object.assign({}, resources.en);
|
|
38
|
+
const existingTranslation = Object.assign({}, englishResources.translation);
|
|
39
|
+
i18n.options.resources = Object.assign({}, resources, {
|
|
40
|
+
en: Object.assign({}, englishResources, {
|
|
41
|
+
translation: Object.assign({}, defaultUiTranslation, existingTranslation)
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=default-translation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["i18n","defaultUiTranslation","off","heading","body","action","unsupported","unauthorized","denied","blocked","addResourceBundle","resources","options","englishResources","Object","assign","en","existingTranslation","translation"],"sourceRoot":"../../../../src","sources":["modules/ui/default-translation.ts"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,SAAS;AAE1B,OAAO,MAAMC,oBAAoB,GAAG;EAClC,wBAAwB,EAAE;IACxBC,GAAG,EAAE;MACHC,OAAO,EAAE,kBAAkB;MAC3BC,IAAI,EAAE,0DAA0D;MAChEC,MAAM,EAAE;IACV,CAAC;IACDC,WAAW,EAAE;MACXH,OAAO,EAAE,4BAA4B;MACrCC,IAAI,EAAE;IACR,CAAC;IACDG,YAAY,EAAE;MACZJ,OAAO,EAAE,kCAAkC;MAC3CC,IAAI,EAAE,gDAAgD;MACtDC,MAAM,EAAE;IACV,CAAC;IACDG,MAAM,EAAE;MACNL,OAAO,EAAE,kCAAkC;MAC3CC,IAAI,EAAE,gDAAgD;MACtDC,MAAM,EAAE;IACV,CAAC;IACDI,OAAO,EAAE;MACPN,OAAO,EAAE,iCAAiC;MAC1CC,IAAI,EAAE,gEAAgE;MACtEC,MAAM,EAAE;IACV,CAAC;IACD,cAAc,EAAE;EAClB;AACF,CAAC;AAED,IAAI,OAAOL,IAAI,CAACU,iBAAiB,KAAK,UAAU,EAAE;EAChDV,IAAI,CAACU,iBAAiB,CACpB,IAAI,EACJ,aAAa,EACbT,oBAAoB,EACpB,IAAI,EACJ,KACF,CAAC;AACH,CAAC,MAAM;EACL,MAAMU,SAAS,GAAGX,IAAI,CAACY,OAAO,CAACD,SAAS,IAAI,CAAC,CAAC;EAE9C,MAAME,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,SAAS,CAACK,EAAE,CAGtD;EAED,MAAMC,mBAAmB,GAAGH,MAAM,CAACC,MAAM,CACvC,CAAC,CAAC,EACFF,gBAAgB,CAACK,WACnB,CAA4B;EAE5BlB,IAAI,CAACY,OAAO,CAACD,SAAS,GAAGG,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,SAAS,EAAE;IACpDK,EAAE,EAAEF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEF,gBAAgB,EAAE;MACtCK,WAAW,EAAEJ,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEd,oBAAoB,EAAEgB,mBAAmB;IAC1E,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ export * from "./types.js";
|
|
|
4
4
|
export * from "./use-ovok-ui.js";
|
|
5
5
|
export * from "./components/ecg-strip-viewer.js";
|
|
6
6
|
export * from "./components/flow-frame.js";
|
|
7
|
+
export * from "./components/prerequisite-gate.js";
|
|
7
8
|
export * from "./components/manual-entry-form.js";
|
|
8
9
|
export * from "./components/supported-devices-catalog-list.js";
|
|
9
10
|
export * from "./components/bluetooth-state-notice.js";
|
|
@@ -1 +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,4BAAyB;AACvC,cAAc,mCAAgC;AAC9C,cAAc,gDAA6C;AAC3D,cAAc,wCAAqC;AACnD,cAAc,8BAA2B;AACzC,cAAc,sCAAmC;AACjD,cAAc,mCAAgC;AAC9C,cAAc,oCAAiC;AAC/C,cAAc,yCAAsC;AACpD,cAAc,yCAAsC;AACpD,cAAc,0BAAuB;AACrC,cAAc,iCAA8B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/ui/index.ts"],"mappings":";;AAAA,cAAc,YAAS;AACvB,cAAc,kBAAe;AAC7B,cAAc,kCAA+B;AAC7C,cAAc,4BAAyB;AACvC,cAAc,mCAAgC;AAC9C,cAAc,mCAAgC;AAC9C,cAAc,gDAA6C;AAC3D,cAAc,wCAAqC;AACnD,cAAc,8BAA2B;AACzC,cAAc,sCAAmC;AACjD,cAAc,mCAAgC;AAC9C,cAAc,oCAAiC;AAC/C,cAAc,yCAAsC;AACpD,cAAc,yCAAsC;AACpD,cAAc,0BAAuB;AACrC,cAAc,iCAA8B","ignoreList":[]}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/* eslint-disable import/group-exports */
|
|
4
|
+
|
|
5
|
+
import { polyfillMedplumWebAPIs as polyfillOvokWebAPIs } from "@medplum/expo-polyfills";
|
|
6
|
+
export { ExpoClientStorage, ExtendedExpoCrypto, IExpoClientStorage, PolyfillEnabledConfig, cleanupMedplumWebAPIs, cleanupMedplumWebAPIs as cleanupOvokNativeRuntime, initWebSocketManager } from "@medplum/expo-polyfills";
|
|
7
|
+
export { polyfillOvokWebAPIs };
|
|
8
|
+
|
|
9
|
+
/** @deprecated Use polyfillOvokWebAPIs instead. */
|
|
10
|
+
export const polyfillMedplumWebAPIs = polyfillOvokWebAPIs;
|
|
11
|
+
|
|
12
|
+
/** @deprecated Use polyfillOvokWebAPIs instead. */
|
|
13
|
+
export const initializeOvokNativeRuntime = polyfillOvokWebAPIs;
|
|
4
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["polyfillMedplumWebAPIs","
|
|
1
|
+
{"version":3,"names":["polyfillMedplumWebAPIs","polyfillOvokWebAPIs","ExpoClientStorage","ExtendedExpoCrypto","IExpoClientStorage","PolyfillEnabledConfig","cleanupMedplumWebAPIs","cleanupOvokNativeRuntime","initWebSocketManager","initializeOvokNativeRuntime"],"sourceRoot":"../../../src","sources":["polyfills/index.ts"],"mappings":";;AAAA;;AAEA,SAASA,sBAAsB,IAAIC,mBAAmB,QAAQ,yBAAyB;AAEvF,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,qBAAqB,EACrBC,qBAAqB,EACrBA,qBAAqB,IAAIC,wBAAwB,EACjDC,oBAAoB,QACf,yBAAyB;AAEhC,SAASP,mBAAmB;;AAE5B;AACA,OAAO,MAAMD,sBAAsB,GAAGC,mBAAmB;;AAEzD;AACA,OAAO,MAAMQ,2BAA2B,GAAGR,mBAAmB","ignoreList":[]}
|
|
@@ -7,8 +7,21 @@ export declare const defaultTranslation: {
|
|
|
7
7
|
cancel: string;
|
|
8
8
|
delete: string;
|
|
9
9
|
};
|
|
10
|
+
"questionnaire-form": {
|
|
11
|
+
item: {
|
|
12
|
+
unsupported: string;
|
|
13
|
+
};
|
|
14
|
+
picker: {
|
|
15
|
+
increase: string;
|
|
16
|
+
decrease: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
10
19
|
profile: {
|
|
11
20
|
form: {
|
|
21
|
+
error: {
|
|
22
|
+
network: string;
|
|
23
|
+
generic: string;
|
|
24
|
+
};
|
|
12
25
|
phone: {
|
|
13
26
|
country: string;
|
|
14
27
|
invalid: string;
|
|
@@ -20,6 +33,10 @@ export declare const defaultTranslation: {
|
|
|
20
33
|
register: {
|
|
21
34
|
"already-have-account": string;
|
|
22
35
|
button: string;
|
|
36
|
+
errors: {
|
|
37
|
+
network: string;
|
|
38
|
+
generic: string;
|
|
39
|
+
};
|
|
23
40
|
name: string;
|
|
24
41
|
"full-name": string;
|
|
25
42
|
"or-register-with": string;
|
|
@@ -31,9 +48,14 @@ export declare const defaultTranslation: {
|
|
|
31
48
|
"reset-password": {
|
|
32
49
|
accountType: string;
|
|
33
50
|
email: string;
|
|
51
|
+
errors: {
|
|
52
|
+
network: string;
|
|
53
|
+
generic: string;
|
|
54
|
+
};
|
|
34
55
|
patient: string;
|
|
35
56
|
practitioner: string;
|
|
36
57
|
"reset-password": string;
|
|
58
|
+
success: string;
|
|
37
59
|
subtitle: string;
|
|
38
60
|
title: string;
|
|
39
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoF9B,CAAC"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { useClient } from "@ovok/core";
|
|
1
|
+
import { useClient, type OvokSavedAccount } from "@ovok/core";
|
|
2
2
|
import { OvokNativeSession, SessionRevokeOption, SessionStatus } from "../types/session";
|
|
3
3
|
type Client = ReturnType<typeof useClient>;
|
|
4
4
|
type Profile = Awaited<ReturnType<Client["getProfileAsync"]>>;
|
|
5
5
|
interface UseSessionResult {
|
|
6
6
|
status: SessionStatus;
|
|
7
7
|
isAuthenticated: boolean;
|
|
8
|
+
accounts: OvokSavedAccount[];
|
|
8
9
|
profile: Profile;
|
|
9
10
|
sessions: OvokNativeSession[];
|
|
10
11
|
loading: boolean;
|
|
11
12
|
error?: Error;
|
|
12
13
|
refresh: () => Promise<void>;
|
|
13
14
|
refreshSessions: () => Promise<void>;
|
|
15
|
+
switchAccount: (accountId: string) => Promise<void>;
|
|
16
|
+
removeAccount: (accountId: string) => Promise<void>;
|
|
14
17
|
logout: () => Promise<void>;
|
|
15
18
|
revokeSessions: (option: SessionRevokeOption) => Promise<void>;
|
|
16
19
|
}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAM9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAE1B,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC3C,KAAK,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAC9D,UAAU,gBAAgB;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,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,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,gGAAgG;AAChG,QAAA,MAAM,UAAU,GAAI,oDAGjB,iBAAsB,KAAG,gBAkD3B,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAQ/D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACxC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CA6J1C,CAAC"}
|