@ovok/native 1.10.3 → 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/lib/commonjs/modules/auth/default-translation.js +17 -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/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 +1 -0
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.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.map +1 -1
- package/lib/commonjs/modules/auth/session/session-store.js +36 -115
- package/lib/commonjs/modules/auth/session/session-store.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-in-error.js +4 -2
- package/lib/commonjs/modules/auth/utils/sign-in-error.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 +47 -21
- 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 +168 -5
- 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/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/prerequisite-gate.js +73 -0
- package/lib/commonjs/modules/ui/components/prerequisite-gate.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 +17 -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/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 +1 -0
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.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.map +1 -1
- package/lib/module/modules/auth/session/session-store.js +36 -115
- package/lib/module/modules/auth/session/session-store.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-in-error.js +4 -2
- package/lib/module/modules/auth/utils/sign-in-error.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 +47 -21
- 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 +168 -5
- 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/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/prerequisite-gate.js +67 -0
- package/lib/module/modules/ui/components/prerequisite-gate.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 +17 -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/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/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 +8 -2
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts +1 -1
- 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 +2 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.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 +3 -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/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/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/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 +17 -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/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/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 +8 -2
- package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts +1 -1
- 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 +2 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.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 +3 -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/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/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/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 +3 -3
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import { addEventListener as addNetworkEventListener } from "@react-native-community/netinfo";
|
|
4
4
|
import { logoutSession } from "./logout-session.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { createSessionRefreshActions } from "./session-store-refresh.js";
|
|
6
|
+
import { SessionStoreRequestState } from "./session-store-request-state.js";
|
|
7
7
|
const stores = new WeakMap();
|
|
8
8
|
const createSessionStore = client => {
|
|
9
9
|
const sessionClient = client;
|
|
10
10
|
const listeners = new Set();
|
|
11
|
+
const requestState = new SessionStoreRequestState(client, sessionClient);
|
|
11
12
|
let unsubscribeNetwork;
|
|
12
13
|
let wasConnected;
|
|
13
|
-
let profileRequest;
|
|
14
|
-
let sessionsRequest;
|
|
15
14
|
let logoutRequest;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const storeRef = {};
|
|
16
|
+
const notify = () => listeners.forEach(listener => listener());
|
|
17
|
+
const refreshActions = createSessionRefreshActions(client, requestState, () => storeRef.current, notify);
|
|
18
18
|
const store = {
|
|
19
19
|
snapshot: {
|
|
20
20
|
status: "loading",
|
|
21
|
+
accounts: requestState.getAccounts(),
|
|
21
22
|
sessions: []
|
|
22
23
|
},
|
|
23
24
|
subscribe: listener => {
|
|
@@ -41,116 +42,33 @@ const createSessionStore = client => {
|
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
store.snapshot = {
|
|
58
|
-
...store.snapshot,
|
|
59
|
-
status: "loading",
|
|
60
|
-
error: undefined
|
|
61
|
-
};
|
|
62
|
-
listeners.forEach(listener => listener());
|
|
63
|
-
}
|
|
64
|
-
profileRequest ??= (profileNeedsRefresh ? client.refetchProfile() : client.getProfileAsync()).then(profile => {
|
|
65
|
-
profileNeedsRefresh = false;
|
|
66
|
-
return profile;
|
|
67
|
-
}).catch(cause => {
|
|
68
|
-
profileNeedsRefresh = true;
|
|
69
|
-
throw cause;
|
|
70
|
-
}).finally(() => {
|
|
71
|
-
profileRequest = undefined;
|
|
72
|
-
});
|
|
73
|
-
const currentProfileRequest = profileRequest;
|
|
74
|
-
if (includeSessions) {
|
|
75
|
-
sessionsRequest ??= sessionClient.getSessions().finally(() => {
|
|
76
|
-
sessionsRequest = undefined;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
const currentSessionsRequest = sessionsRequest;
|
|
80
|
-
const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
|
|
81
|
-
profile
|
|
82
|
-
}), error => ({
|
|
83
|
-
error
|
|
84
|
-
})), (includeSessions && currentSessionsRequest ? currentSessionsRequest : Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
|
|
85
|
-
sessions
|
|
86
|
-
}), error => ({
|
|
87
|
-
error
|
|
88
|
-
}))]);
|
|
89
|
-
if (revision !== authRevision) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
|
|
93
|
-
const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
|
|
94
|
-
const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
|
|
95
|
-
if (!client.getActiveLogin() || getHttpStatus(error) === 401) {
|
|
96
|
-
store.snapshot = {
|
|
97
|
-
status: "signed-out",
|
|
98
|
-
sessions: [],
|
|
99
|
-
error: error === undefined ? undefined : toError(error)
|
|
100
|
-
};
|
|
101
|
-
} else if ("error" in profileResult) {
|
|
102
|
-
store.snapshot = {
|
|
103
|
-
status: "offline",
|
|
104
|
-
profile,
|
|
105
|
-
sessions: sessions.map(normalizeSession),
|
|
106
|
-
error: toError(profileResult.error)
|
|
107
|
-
};
|
|
108
|
-
} else {
|
|
109
|
-
store.snapshot = {
|
|
110
|
-
status: "authenticated",
|
|
111
|
-
profile,
|
|
112
|
-
sessions: sessions.map(normalizeSession),
|
|
113
|
-
error: "error" in sessionsResult ? toError(sessionsResult.error) : undefined
|
|
114
|
-
};
|
|
45
|
+
...refreshActions,
|
|
46
|
+
switchAccount: async accountId => {
|
|
47
|
+
requestState.invalidate();
|
|
48
|
+
store.snapshot = {
|
|
49
|
+
status: "loading",
|
|
50
|
+
accounts: requestState.getAccounts(),
|
|
51
|
+
sessions: []
|
|
52
|
+
};
|
|
53
|
+
notify();
|
|
54
|
+
try {
|
|
55
|
+
await sessionClient.switchAccount(accountId);
|
|
56
|
+
} finally {
|
|
57
|
+
await store.refresh(true);
|
|
115
58
|
}
|
|
116
|
-
listeners.forEach(listener => listener());
|
|
117
59
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
sessionsRequest ??= sessionClient.getSessions().finally(() => {
|
|
128
|
-
sessionsRequest = undefined;
|
|
129
|
-
});
|
|
60
|
+
removeAccount: async accountId => {
|
|
61
|
+
requestState.invalidate();
|
|
62
|
+
store.snapshot = {
|
|
63
|
+
status: "loading",
|
|
64
|
+
accounts: requestState.getAccounts(),
|
|
65
|
+
sessions: []
|
|
66
|
+
};
|
|
67
|
+
notify();
|
|
130
68
|
try {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
sessions: sessions.map(normalizeSession),
|
|
135
|
-
error: undefined
|
|
136
|
-
};
|
|
137
|
-
listeners.forEach(listener => listener());
|
|
138
|
-
} catch (cause) {
|
|
139
|
-
const error = toError(cause);
|
|
140
|
-
if (!client.getActiveLogin() || getHttpStatus(cause) === 401) {
|
|
141
|
-
store.snapshot = {
|
|
142
|
-
status: "signed-out",
|
|
143
|
-
sessions: [],
|
|
144
|
-
error
|
|
145
|
-
};
|
|
146
|
-
} else {
|
|
147
|
-
store.snapshot = {
|
|
148
|
-
...store.snapshot,
|
|
149
|
-
error
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
listeners.forEach(listener => listener());
|
|
153
|
-
throw error;
|
|
69
|
+
await sessionClient.removeAccount(accountId);
|
|
70
|
+
} finally {
|
|
71
|
+
await store.refresh(true);
|
|
154
72
|
}
|
|
155
73
|
},
|
|
156
74
|
logout: async () => {
|
|
@@ -158,15 +76,17 @@ const createSessionStore = client => {
|
|
|
158
76
|
return logoutRequest;
|
|
159
77
|
}
|
|
160
78
|
logoutRequest = (async () => {
|
|
161
|
-
|
|
79
|
+
requestState.invalidate();
|
|
162
80
|
try {
|
|
163
81
|
await logoutSession(sessionClient);
|
|
164
82
|
} finally {
|
|
83
|
+
requestState.invalidate();
|
|
165
84
|
store.snapshot = {
|
|
166
85
|
status: "signed-out",
|
|
86
|
+
accounts: requestState.getAccounts(),
|
|
167
87
|
sessions: []
|
|
168
88
|
};
|
|
169
|
-
|
|
89
|
+
notify();
|
|
170
90
|
logoutRequest = undefined;
|
|
171
91
|
}
|
|
172
92
|
})();
|
|
@@ -177,6 +97,7 @@ const createSessionStore = client => {
|
|
|
177
97
|
await store.refresh(true);
|
|
178
98
|
}
|
|
179
99
|
};
|
|
100
|
+
storeRef.current = store;
|
|
180
101
|
return store;
|
|
181
102
|
};
|
|
182
103
|
const getSessionStore = client => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addEventListener","addNetworkEventListener","logoutSession","
|
|
1
|
+
{"version":3,"names":["addEventListener","addNetworkEventListener","logoutSession","createSessionRefreshActions","SessionStoreRequestState","stores","WeakMap","createSessionStore","client","sessionClient","listeners","Set","requestState","unsubscribeNetwork","wasConnected","logoutRequest","storeRef","notify","forEach","listener","refreshActions","current","store","snapshot","status","accounts","getAccounts","sessions","subscribe","add","state","isConnected","isInternetReachable","shouldRefresh","refresh","delete","size","undefined","switchAccount","accountId","invalidate","removeAccount","logout","revokeSessions","option","getSessionStore","key","existing","get","next","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store.ts"],"mappings":";;AAAA,SAASA,gBAAgB,IAAIC,uBAAuB,QAAQ,iCAAiC;AAQ7F,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,2BAA2B,QAAQ,4BAAyB;AACrE,SAASC,wBAAwB,QAAQ,kCAA+B;AAExE,MAAMC,MAAM,GAAG,IAAIC,OAAO,CAAuB,CAAC;AAElD,MAAMC,kBAAkB,GAAIC,MAAc,IAAmB;EAC3D,MAAMC,aAAa,GAAGD,MAAkC;EACxD,MAAME,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EACvC,MAAMC,YAAY,GAAG,IAAIR,wBAAwB,CAACI,MAAM,EAAEC,aAAa,CAAC;EACxE,IAAII,kBAA4C;EAChD,IAAIC,YAAiC;EACrC,IAAIC,aAAwC;EAC5C,MAAMC,QAAoC,GAAG,CAAC,CAAC;EAE/C,MAAMC,MAAM,GAAGA,CAAA,KAAMP,SAAS,CAACQ,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;EAEhE,MAAMC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AAC;IAC3B;EACF,CAAC;EAEDlB,QAAQ,CAACK,OAAO,GAAGC,KAAK;EAExB,OAAOA,KAAK;AACd,CAAC;AAED,MAAMuB,eAAe,GAAIrC,MAAc,IAAmB;EACxD,MAAMsC,GAAG,GAAGtC,MAAgB;EAC5B,MAAMuC,QAAQ,GAAG1C,MAAM,CAAC2C,GAAG,CAACF,GAAG,CAAC;EAEhC,IAAIC,QAAQ,EAAE;IACZ,OAAOA,QAAQ;EACjB;EAEA,MAAME,IAAI,GAAG1C,kBAAkB,CAACC,MAAM,CAAC;EAEvCH,MAAM,CAAC6C,GAAG,CAACJ,GAAG,EAAEG,IAAI,CAAC;EAErB,OAAOA,IAAI;AACb,CAAC;AAED,SAASJ,eAAe","ignoreList":[]}
|
|
@@ -38,7 +38,7 @@ const isNetworkError = (error, message) => {
|
|
|
38
38
|
return error instanceof TypeError || typeof errorMessage === "string" && /network request failed|network error|failed to fetch|fetch failed|unknownhostexception|no route to host|network is unreachable|unable to resolve host|could not resolve host|name resolution/i.test(errorMessage);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/** Converts transport/server failures to safe, translatable
|
|
41
|
+
/** Converts auth transport/server failures to safe, translatable error keys. */
|
|
42
42
|
const parseSignInError = (error, options = {}) => {
|
|
43
43
|
const root = asRecord(error);
|
|
44
44
|
const originalMessage = error instanceof Error ? error.message : root?.message;
|
|
@@ -49,7 +49,9 @@ const parseSignInError = (error, options = {}) => {
|
|
|
49
49
|
const code = stringValue(body?.code, nestedError?.code, root?.code);
|
|
50
50
|
const requestId = stringValue(body?.requestId, root?.requestId);
|
|
51
51
|
const fieldErrors = Array.isArray(body?.errors) ? body.errors : Array.isArray(nestedError?.errors) ? nestedError.errors : [];
|
|
52
|
-
const
|
|
52
|
+
const genericErrorKey = options.errorScope ? `${options.errorScope}.errors.generic` : "sign-in.errors.generic";
|
|
53
|
+
const networkErrorKey = options.errorScope ? `${options.errorScope}.errors.network` : "sign-in.errors.network";
|
|
54
|
+
const message = messageKeyForStatus(status, options.isMfaVerification === true, options.isSignIn !== false) ?? (isNetworkError(error, originalMessage) ? networkErrorKey : genericErrorKey);
|
|
53
55
|
const signInError = new Error(message);
|
|
54
56
|
if (status !== undefined) {
|
|
55
57
|
signInError.status = status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["asRecord","value","undefined","parseJsonRecord","JSON","parse","numberValue","values","find","candidate","Number","isFinite","stringValue","length","messageKeyForStatus","status","isMfaVerification","isSignIn","isNetworkError","error","message","errorMessage","Error","TypeError","test","parseSignInError","options","root","originalMessage","response","body","data","nestedError","statusCode","code","requestId","fieldErrors","Array","isArray","errors","signInError"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-in-error.ts"],"mappings":";;AAeA,MAAMA,QAAQ,GAAIC,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,GACtCA,KAAK,GACNC,SAAS;AAEf,MAAMC,eAAe,GAAIF,KAAc,IAA8B;EACnE,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOC,SAAS;EAClB;EAEA,IAAI;IACF,OAAOF,QAAQ,CAACI,IAAI,CAACC,KAAK,CAACJ,KAAK,CAAC,CAAC;EACpC,CAAC,CAAC,MAAM;IACN,OAAOC,SAAS;EAClB;AACF,CAAC;AAED,MAAMI,WAAW,GAAGA,CAAC,GAAGC,MAAiB,KAAyB;EAChE,MAAMN,KAAK,GAAGM,MAAM,CAACC,IAAI,CACtBC,SAAS,IAAK,OAAOA,SAAS,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACF,SAAS,CAC3E,CAAC;EAED,OAAO,OAAOR,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,SAAS;AACtD,CAAC;AAED,MAAMU,WAAW,GAAGA,CAAC,GAAGL,MAAiB,KAAyB;EAChE,MAAMN,KAAK,GAAGM,MAAM,CAACC,IAAI,CACtBC,SAAS,IAAK,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,CAACI,MAAM,GAAG,CACrE,CAAC;EAED,OAAO,OAAOZ,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,SAAS;AACtD,CAAC;AAED,MAAMY,mBAAmB,GAAGA,CAC1BC,MAA0B,EAC1BC,iBAA0B,EAC1BC,QAAiB,KACd;EACH,QAAQF,MAAM;IACZ,KAAK,GAAG;IACR,KAAK,GAAG;MACN,OAAOE,QAAQ,GACXD,iBAAiB,GACf,qBAAqB,GACrB,oCAAoC,GACtCd,SAAS;IACf,KAAK,GAAG;IACR,KAAK,GAAG;MACN,OAAOe,QAAQ,GAAG,4BAA4B,GAAGf,SAAS;IAC5D,KAAK,GAAG;MACN,OAAO,iBAAiB;IAC1B;MACE,OAAOA,SAAS;EACpB;AACF,CAAC;AAED,MAAMgB,cAAc,GAAGA,CAACC,KAAc,EAAEC,OAAiB,KAAK;EAC5D,MAAMC,YAAY,GAChBD,OAAO,KACND,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACC,OAAO,GAAGpB,QAAQ,CAACmB,KAAK,CAAC,EAAEC,OAAO,CAAC;EAErE,OACED,KAAK,YAAYI,SAAS,IACzB,OAAOF,YAAY,KAAK,QAAQ,IAC/B,+LAA+L,CAACG,IAAI,CAClMH,YACF,CAAE;AAER,CAAC;;AAED;AACA,MAAMI,gBAAgB,GAAGA,CACvBN,KAAc,EACdO,
|
|
1
|
+
{"version":3,"names":["asRecord","value","undefined","parseJsonRecord","JSON","parse","numberValue","values","find","candidate","Number","isFinite","stringValue","length","messageKeyForStatus","status","isMfaVerification","isSignIn","isNetworkError","error","message","errorMessage","Error","TypeError","test","parseSignInError","options","root","originalMessage","response","body","data","nestedError","statusCode","code","requestId","fieldErrors","Array","isArray","errors","genericErrorKey","errorScope","networkErrorKey","signInError"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-in-error.ts"],"mappings":";;AAeA,MAAMA,QAAQ,GAAIC,KAAc,IAC9B,OAA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IAAI,CAAC;EACnE,MAAMC,SAAS,GAAGvB,WAAW,CAACkB,IAAI,EAAEK,SAAS,EAAER,IAAI,EAAEQ,SAAS,CAAC;EAE/D,MAAMC,WAAW,GACfC,KAAK,CAACC,OAAO,CAACR,IAAI,EAAES,MAAM,CAAC,GACvBT,IAAI,CAACS,MAAM,GACXF,KAAK,CAACC,OAAO,CAACN,WAAW,EAAEO,MAAM,CAAC,GAChCP,WAAW,CAACO,MAAM,GAClB,EACc;EAEtB,MAAMC,eAAe,GAAGd,OAAO,CAACe,UAAU,GACtC,GAAGf,OAAO,CAACe,UAAU,iBAAiB,GACtC,wBAAwB;EAE5B,MAAMC,eAAe,GAAGhB,OAAO,CAACe,UAAU,GACtC,GAAGf,OAAO,CAACe,UAAU,iBAAiB,GACtC,wBAAwB;EAE5B,MAAMrB,OAAO,GACXN,mBAAmB,CACjBC,MAAM,EACNW,OAAO,CAACV,iBAAiB,KAAK,IAAI,EAClCU,OAAO,CAACT,QAAQ,KAAK,KACvB,CAAC,KACAC,cAAc,CAACC,KAAK,EAAES,eAAe,CAAC,GACnCc,eAAe,GACfF,eAAe,CAAC;EAEtB,MAAMG,WAAW,GAAG,IAAIrB,KAAK,CAACF,OAAO,CAAgB;EAErD,IAAIL,MAAM,KAAKb,SAAS,EAAE;IACxByC,WAAW,CAAC5B,MAAM,GAAGA,MAAM;EAC7B;EACA,IAAIoB,SAAS,KAAKjC,SAAS,EAAE;IAC3ByC,WAAW,CAACR,SAAS,GAAGA,SAAS;EACnC;EACA,IAAID,IAAI,KAAKhC,SAAS,EAAE;IACtByC,WAAW,CAACT,IAAI,GAAGA,IAAI;EACzB;EAEA,OAAO;IAAEf,KAAK,EAAEwB,WAAW;IAAEP;EAAY,CAAC;AAC5C,CAAC;AAED,SACElB,cAAc,EACdO,gBAAgB","ignoreList":[]}
|
package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRequestStatusForAuthorization","HKAuthorizationRequestStatus","useHealthkitAuthorization","React","HealthAuthorizationContext","AppleHealthAuthorizationContext","getNotRequestedIdentifiers","Fragment","_Fragment","jsx","_jsx","AppleHealthAuthorizationProvider","memo","readIdentifiers","writeIdentifiers","dataToSync","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","requestAuthorization","requestState","setRequestState","useState","notRequestedReadIdentifiers","setNotRequestedReadIdentifiers","notRequestedWriteIdentifiers","setNotRequestedWriteIdentifiers","requestError","setRequestError","requestKey","join","identifiersRef","useRef","current","previousRequestKey","status","useMemo","error","state","notRequestedMeasurementTypes","Object","entries","filter","data","typeIdentifiers","some","typeIdentifier","includes","map","key","useEffect","inspectAuthorization","useCallback","currentRead","currentWrite","notRequestedRead","notRequestedWrite","Promise","all","identifier","requestAccess","undefined","normalizedError","Error","String","shouldRequest","currentState","then","catch","needsAuthorization","shouldRenderManualRequestUI","shouldRenderFallback","exposedStatus","authorizationValue","platform","missingTypes","request","content","unknown","unnecessary","Provider","value"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/apple/apple-health-authorization-provider.tsx"],"mappings":";;AAAA,SACEA,gCAAgC,EAChCC,4BAA4B,
|
|
1
|
+
{"version":3,"names":["getRequestStatusForAuthorization","HKAuthorizationRequestStatus","useHealthkitAuthorization","React","HealthAuthorizationContext","AppleHealthAuthorizationContext","getNotRequestedIdentifiers","Fragment","_Fragment","jsx","_jsx","AppleHealthAuthorizationProvider","memo","readIdentifiers","writeIdentifiers","dataToSync","fallback","children","skipRequest","renderManualRequestUI","onAuthorizationStatusChange","authorizationStatus","requestAuthorization","requestState","setRequestState","useState","notRequestedReadIdentifiers","setNotRequestedReadIdentifiers","notRequestedWriteIdentifiers","setNotRequestedWriteIdentifiers","requestError","setRequestError","requestKey","join","identifiersRef","useRef","current","previousRequestKey","status","useMemo","error","state","notRequestedMeasurementTypes","Object","entries","filter","data","typeIdentifiers","some","typeIdentifier","includes","map","key","useEffect","inspectAuthorization","useCallback","currentRead","currentWrite","notRequestedRead","notRequestedWrite","Promise","all","identifier","requestAccess","undefined","normalizedError","Error","String","shouldRequest","currentState","then","catch","needsAuthorization","shouldRenderManualRequestUI","shouldRenderFallback","exposedStatus","authorizationValue","platform","missingTypes","request","content","unknown","unnecessary","Provider","value"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/components/apple/apple-health-authorization-provider.tsx"],"mappings":";;AAAA,SACEA,gCAAgC,EAChCC,4BAA4B,EAE5BC,yBAAyB,QACpB,oCAAoC;AAC3C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,0BAA0B,QAAQ,gDAA6C;AAIxF,SAASC,+BAA+B,QAAQ,yCAAsC;AACtF,SAASC,0BAA0B,QAAQ,uCAAoC;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAEhF,OAAO,MAAMC,gCAAgC,gBAAGR,KAAK,CAACS,IAAI,CACxD,CAAC;EACCC,eAAe;EACfC,gBAAgB;EAChBC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,WAAW;EACXC,qBAAqB;EACrBC;AAC8D,CAAC,KAAK;EACpE,MAAM,CAACC,mBAAmB,EAAEC,oBAAoB,CAAC,GAC/CpB,yBAAyB,CACvBW,eAAe,EACfC,gBACF,CAAC;EAEH,MAAM,CAACS,YAAY,EAAEC,eAAe,CAAC,GACnCrB,KAAK,CAACsB,QAAQ,CAA0C,SAAS,CAAC;EAEpE,MAAM,CAACC,2BAA2B,EAAEC,8BAA8B,CAAC,GACjExB,KAAK,CAACsB,QAAQ,CAACZ,eAAe,CAAC;EAEjC,MAAM,CAACe,4BAA4B,EAAEC,+BAA+B,CAAC,GACnE1B,KAAK,CAACsB,QAAQ,CAACX,gBAAgB,IAAI,EAAE,CAAC;EAExC,MAAM,CAACgB,YAAY,EAAEC,eAAe,CAAC,GAAG5B,KAAK,CAACsB,QAAQ,CAAQ,CAAC;EAE/D,MAAMO,UA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2BAA2B,EAAE;IACtCO,OAAO,GAAG7D,qBAAqB,GAAG4C,aAAa,CAAC;EAClD,CAAC,MAAM,IAAIW,oBAAoB,EAAE;IAC/BM,OAAO,gBAAGtE,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGD,QAAQ,IAAI;IAAI,CAAG,CAAC;EACnC;EAEA,oBACEN,IAAA,CAACN,0BAA0B,CAAC+E,QAAQ;IAACC,KAAK,EAAER,kBAAmB;IAAA3D,QAAA,eAC7DP,IAAA,CAACL,+BAA+B,CAAC8E,QAAQ;MAACC,KAAK,EAAET,aAAc;MAAA1D,QAAA,EAC5D+D;IAAO,CACgC;EAAC,CACR,CAAC;AAE1C,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Healthkit","HKUpdateFrequency","React","useListenChanges","dataToSync","onChange","backgroundDelivery","onError","timeoutRef","useRef","undefined","onChangeRef","onErrorRef","identifiers","useMemo","Object","values","flatMap","data","typeIdentifiers","map","identifier","typeIdentifier","backgroundDeliveryEnabled","backgroundDeliveryFrequency","frequency","hourly","debouncedOnChange","useCallback","current","clearTimeout","setTimeout","useEffect","subscriptions","initSubscriptions","Promise","all","enableBackgroundDelivery","subscription","subscribeToChanges","push","error","forEach","disableBackgroundDelivery","catch"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/hooks/use-listen-changes.ts"],"mappings":";;AAAA,OAAOA,SAAS,IAEdC,iBAAiB,QACZ,oCAAoC;AAC3C,OAAO,KAAKC,KAAK,MAAM,OAAO;
|
|
1
|
+
{"version":3,"names":["Healthkit","HKUpdateFrequency","React","useListenChanges","dataToSync","onChange","backgroundDelivery","onError","timeoutRef","useRef","undefined","onChangeRef","onErrorRef","identifiers","useMemo","Object","values","flatMap","data","typeIdentifiers","map","identifier","typeIdentifier","backgroundDeliveryEnabled","backgroundDeliveryFrequency","frequency","hourly","debouncedOnChange","useCallback","current","clearTimeout","setTimeout","useEffect","subscriptions","initSubscriptions","Promise","all","enableBackgroundDelivery","subscription","subscribeToChanges","push","error","forEach","disableBackgroundDelivery","catch"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/hooks/use-listen-changes.ts"],"mappings":";;AAAA,OAAOA,SAAS,IAEdC,iBAAiB,QACZ,oCAAoC;AAC3C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAO9B,OAAO,MAAMC,gBAAgB,GAAGA,CAC9BC,UAA8C,EAC9CC,QAAyD,EACzDC,kBAA+D,EAC/DC,OAAgC,KAC7B;EACH,MAAMC,UAAU,GAAGN,KAAK,CAACO,MAAM,CAA6BC,SAAS,CAAC;EAEtE,MAAMC,WAAW,GAAGT,KAAK,CAACO,MAAM,CAACJ,QAAQ,CAAC;EAC1C,MAAMO,UAAU,GAAGV,KAAK,CAACO,MAAM,CAACF,OAAO,CAAC;EAExC,MAAMM,WAAW,GAAGX,KAAK,CAACY,OAAO,CAAC,MAAM;IACtC,OAAOC,MAAM,CAACC,MAAM,CAACZ,UAAU,CAAC,CAACa,OAAO,CAAEC,IAAI,IAC5CA,IAAI,EAAEC,eAAe,CAACC,GAAG,CAAEC,UAAU,IAAKA,UAAU,CAACC,cAAc,CACrE,CAAC;EACH,CAAC,EAAE,CAAClB,UAAU,CAAC,CAAC;EAEhB,MAAMmB,yBAAyB,GAAGjB,kBAAkB,KAAKI,SAAS;EAElE,MAAMc,2BAA2B,GAC/BlB,kBAAkB,EAAEmB,SAAS,IAAIxB,iBAAiB,CAACyB,MAAM;EAE3D,MAAMC,iBAAiB,GAAGzB,KAAK,CAAC0B,WAAW,CACxCP,UAAyC,IAAK;IAC7C,IAAIb,UAAU,CAACqB,OAAO,EAAE;MACtBC,YAAY,CAACtB,UAAU,CAACqB,OAAO,CAAC;IAClC;IAEArB,UAAU,CAACqB,OAAO,GAAGE,UAAU,CAAC,MAAM;MACpCpB,WAAW,CAACkB,OAAO,CAACR,UAAU,CAAC;MAC/Bb,UAAU,CAACqB,OAAO,GAAGnB,SAAS;IAChC,CAAC,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AK;QACtCA,YAAY,GAAG,CAAC;MAClB,CAAC,CAAC;MAEF,IAAIf,yBAAyB,EAAE;QAC7B,KAAKY,OAAO,CAACC,GAAG,CACdvB,WAAW,CAACO,GAAG,CAAEC,UAAU,IACzBrB,SAAS,CAAC2C,yBAAyB,CACjCtB,UACF,CACF,CACF,CAAC,CAACuB,KAAK,CAAEH,KAAc,IAAK7B,UAAU,CAACiB,OAAO,GAAGY,KAAc,CAAC,CAAC;MACnE;IACF,CAAC;EACH,CAAC,EAAE,CACD5B,WAAW,EACXc,iBAAiB,EACjBJ,yBAAyB,EACzBC,2BAA2B,CAC5B,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["convertSamplesToObservation","getSamplesFromHealth","getTotalSamplesCount","BaseHealthSyncService","InstanceManager","AppleHealthSyncService","constructor","props","getProviderName","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","getInstance","getInstanceInternal"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/services/apple-health-sync-service.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["convertSamplesToObservation","getSamplesFromHealth","getTotalSamplesCount","BaseHealthSyncService","InstanceManager","AppleHealthSyncService","constructor","props","getProviderName","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","getInstance","getInstanceInternal"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/services/apple-health-sync-service.ts"],"mappings":";;AAYA,SAASA,2BAA2B,QAAQ,4CAAyC;AACrF,SAASC,oBAAoB,QAAQ,qCAAkC;AACvE,SAASC,oBAAoB,QAAQ,qCAAkC;AAEvE,SAASC,qBAAqB,QAAQ,+BAA4B;AAClE,SAASC,eAAe,QAAQ,gCAA6B;AAM7D,OAAO,MAAMC,sBAAsB,SAASF,qBAAqB,CAI/D;EACQG,WAAWA,CAACC,KAAkC,EAAE;IACtD,KAAK,CAACA,KAAK,CAAC;EACd;EAEUC,eAAeA,CAAA,EAAmB;IAC1C,OAAO,cAAc;EACvB;EAEUC,sBAAsBA,CAAA,EAEX;IACnB,OAAOP,oBAAoB;EAC7B;EAEUQ,2BAA2BA,CAAA,EAOnC;IACA,OAAOT,oBAAoB;EAC7B;EAEUU,oBAAoBA,CAAA,EAEF;IAC1B,OAAOX,2BAA2B;EACpC;EAEA,OAAOY,WAAWA,CAChBL,KAAkC,EACV;IACxB,OAAOH,eAAe,CAACS,mBAAmB,CACxC,wBAAwB,EACxBN,KAAK,EACL,MAAM,IAAIF,sBAAsB,CAACE,KAAK,CACxC,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ const FHIR_UNIT_SYSTEM = "http://unitsofmeasure.org";
|
|
|
8
8
|
const LOINC_SYSTEM = "http://loinc.org";
|
|
9
9
|
const HEALTH_RECORD_DATA_EXTENSION = "https://api.ovok.com/fhir/StructureDefinition/health-record-data";
|
|
10
10
|
const HEALTHKIT_BODY_MASS_INDEX = "HKQuantityTypeIdentifierBodyMassIndex";
|
|
11
|
-
|
|
11
|
+
const convertGenericHealthDataToObservation = async ({
|
|
12
12
|
data,
|
|
13
13
|
patientId,
|
|
14
14
|
mode,
|
|
@@ -133,6 +133,13 @@ const extractValue = raw => {
|
|
|
133
133
|
unit: String(raw.unit ?? "1")
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
+
const quantity = raw.quantity;
|
|
137
|
+
if (typeof quantity?.value === "number") {
|
|
138
|
+
return {
|
|
139
|
+
value: quantity.value,
|
|
140
|
+
unit: String(quantity.unit ?? raw.unit ?? "1")
|
|
141
|
+
};
|
|
142
|
+
}
|
|
136
143
|
const candidates = [["height", "inMeters", "m"], ["bodyFat", "percentage", "%"], ["mass", "inKilograms", "kg"], ["weight", "inKilograms", "kg"], ["distance", "inMeters", "m"], ["energy", "inKilocalories", "kcal"]];
|
|
137
144
|
for (const [containerKey, valueKey, fallbackUnit] of candidates) {
|
|
138
145
|
const container = raw[containerKey];
|
|
@@ -167,9 +174,12 @@ const extractValue = raw => {
|
|
|
167
174
|
const getInterval = data => {
|
|
168
175
|
const intervals = data.map(item => {
|
|
169
176
|
const raw = item;
|
|
170
|
-
const startValue = raw.startDate ?? raw.startTime ??
|
|
177
|
+
const startValue = raw.startDate ?? raw.startTime ?? raw.time ?? raw.endDate ?? raw.endTime;
|
|
178
|
+
if (startValue === undefined) {
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
171
181
|
const start = new Date(startValue);
|
|
172
|
-
const endValue = raw.endDate ?? raw.endTime ??
|
|
182
|
+
const endValue = raw.endDate ?? raw.endTime ?? raw.time ?? raw.startDate ?? raw.startTime;
|
|
173
183
|
const end = new Date(endValue);
|
|
174
184
|
return Number.isNaN(start.getTime()) || Number.isNaN(end.getTime()) ? undefined : {
|
|
175
185
|
start,
|
|
@@ -179,14 +189,16 @@ const getInterval = data => {
|
|
|
179
189
|
if (intervals.length === 0) {
|
|
180
190
|
return undefined;
|
|
181
191
|
}
|
|
182
|
-
|
|
183
|
-
start
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
const start = new Date(Math.min(...intervals.map(({
|
|
193
|
+
start
|
|
194
|
+
}) => start.getTime())));
|
|
195
|
+
const end = new Date(Math.max(...intervals.map(({
|
|
196
|
+
end
|
|
197
|
+
}) => end.getTime())));
|
|
198
|
+
return end.getTime() > start.getTime() ? {
|
|
199
|
+
start,
|
|
200
|
+
end
|
|
201
|
+
} : undefined;
|
|
190
202
|
};
|
|
191
203
|
const getDate = value => {
|
|
192
204
|
const raw = value;
|
|
@@ -233,13 +245,18 @@ const component = (label, value, unit) => ({
|
|
|
233
245
|
},
|
|
234
246
|
valueQuantity: quantity(value, unit)
|
|
235
247
|
});
|
|
236
|
-
const quantity = (value, unit, typeIdentifier) =>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
248
|
+
const quantity = (value, unit, typeIdentifier) => {
|
|
249
|
+
const code = getUcumCode(unit, typeIdentifier);
|
|
250
|
+
return {
|
|
251
|
+
value,
|
|
252
|
+
unit,
|
|
253
|
+
...(code ? {
|
|
254
|
+
system: FHIR_UNIT_SYSTEM,
|
|
255
|
+
code
|
|
256
|
+
} : {})
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
const getUcumCode = (unit, typeIdentifier) => {
|
|
243
260
|
if (unit === "count/min") {
|
|
244
261
|
if (["HKQuantityTypeIdentifierHeartRate", "HKQuantityTypeIdentifierRestingHeartRate", "HKQuantityTypeIdentifierWalkingHeartRateAverage", "HeartRate", "RestingHeartRate"].includes(typeIdentifier ?? "")) {
|
|
245
262
|
return "{beats}/min";
|
|
@@ -249,10 +266,12 @@ const normalizeUnit = (unit, typeIdentifier) => {
|
|
|
249
266
|
}
|
|
250
267
|
return "{counts}/min";
|
|
251
268
|
}
|
|
252
|
-
|
|
269
|
+
const normalized = {
|
|
253
270
|
kilometers: "km",
|
|
254
271
|
meters: "m",
|
|
255
|
-
miles: "
|
|
272
|
+
miles: "[mi_i]",
|
|
273
|
+
count: "{count}",
|
|
274
|
+
steps: "{steps}",
|
|
256
275
|
kilograms: "kg",
|
|
257
276
|
grams: "g",
|
|
258
277
|
milligrams: "mg",
|
|
@@ -260,11 +279,17 @@ const normalizeUnit = (unit, typeIdentifier) => {
|
|
|
260
279
|
calories: "cal",
|
|
261
280
|
minutes: "min",
|
|
262
281
|
seconds: "s",
|
|
263
|
-
beatsPerMinute: "
|
|
282
|
+
beatsPerMinute: "{beats}/min",
|
|
283
|
+
bpm: "{beats}/min",
|
|
284
|
+
"breaths/min": "{breaths}/min",
|
|
285
|
+
"°C": "Cel",
|
|
264
286
|
mmHg: "mm[Hg]",
|
|
265
287
|
degC: "Cel"
|
|
266
288
|
}[unit] ?? unit;
|
|
289
|
+
return UCUM_CODES.has(normalized) ? normalized : undefined;
|
|
267
290
|
};
|
|
291
|
+
const UCUM_CODES = new Set(["1", "%", "Cel", "cal", "g", "h", "kcal", "kg", "kg/m2", "km", "m", "mL/kg/min", "mg", "mg/dL", "min", "[mi_i]", "mm[Hg]", "mmol/L", "ms", "mV", "s", "{beats}/min", "{breaths}/min", "{count}", "{counts}/min", "{ratio}", "{steps}"]);
|
|
292
|
+
const normalizeUnit = (unit, typeIdentifier) => getUcumCode(unit, typeIdentifier) ?? unit;
|
|
268
293
|
const getStableObservationId = ({
|
|
269
294
|
typeIdentifier,
|
|
270
295
|
code,
|
|
@@ -276,4 +301,5 @@ const getStableObservationId = ({
|
|
|
276
301
|
const value = measurement.valueQuantity?.value ?? measurement.valueString ?? "empty";
|
|
277
302
|
return `health-${[typeIdentifier, code, time, value].join("-").replace(/[^a-zA-Z0-9.-]/g, "-").slice(0, 64)}`;
|
|
278
303
|
};
|
|
304
|
+
export { convertGenericHealthDataToObservation, getUcumCode };
|
|
279
305
|
//# sourceMappingURL=convert-generic-health-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isAggregatedHealthData","getHealthObservationDevice","FHIR_UNIT_SYSTEM","LOINC_SYSTEM","HEALTH_RECORD_DATA_EXTENSION","HEALTHKIT_BODY_MASS_INDEX","convertGenericHealthDataToObservation","data","patientId","mode","typeIdentifier","configuredTypeIdentifier","typeIdentifierCodes","typeIdentifierCodeSystems","typeIdentifierCodeDisplays","first","value","String","quantityType","categoryType","recordType","configuredCode","code","configuredSystem","system","isLoincCode","undefined","interval","getInterval","measurement","getMeasurement","metadata","getMetadata","device","observationDate","start","getDate","observation","resourceType","id","getStableObservationId","date","status","subject","reference","coding","display","extension","url","valueString","JSON","stringify","map","toPortableRecordData","effectivePeriod","toISOString","end","effectiveDateTime","component","minimum","unit","maximum","stageComponents","getSleepStageComponents","length","test","OMITTED_RECORD_FIELDS","Set","Date","Array","isArray","Object","fromEntries","entries","filter","key","has","child","raw","number","kind","average","valueQuantity","quantity","getTime","extracted","extractValue","candidates","containerKey","valueKey","fallbackUnit","container","normalizeUnit","alternateCandidates","scalarCandidates","intervals","item","startValue","startDate","startTime","endValue","endDate","endTime","Number","isNaN","Boolean","Math","min","max","time","parsed","sourceRevision","source","manufacturer","dataOrigin","model","sourceApp","name","recordingMethod","flatMap","stages","duration","isFinite","stage","label","text","includes","kilometers","meters","miles","kilograms","grams","milligrams","kilocalories","calories","minutes","seconds","beatsPerMinute","mmHg","degC","join","replace","slice"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-generic-health-data.ts"],"mappings":";;AAAA;;AAKA,SAASA,sBAAsB,QAAQ,yBAAsB;AAG7D,SAASC,0BAA0B,QAAQ,gCAA6B;AAMxE,MAAMC,gBAAgB,GAAG,2BAA2B;AACpD,MAAMC,YAAY,GAAG,kBAAkB;AAEvC,MAAMC,4BAA4B,GAChC,kEAAkE;AAEpE,MAAMC,yBAAyB,GAAG,uCAAuC;AAEzE,OAAO,MAAMC,qCAAqC,GAAG,MAAAA,CAAO;EAC1DC,IAAI;EACJC,SAAS;EACTC,IAAI;EACJC,cAAc,EAAEC,wBAAwB;EACxCC,mBAAmB;EACnBC,yBAAyB;EACzBC;AACsB,CAAC,KAA6B;EACpD,MAAMC,KAAK,GAAGR,IAAI,CAAC,CAAC,CAAC;EAErB,IAAI,CAACQ,KAAK,EAAE;IACV,OAAO,EAAE;EACX;EAEA,MAAMC,KAAK,GAAGD,KAAgC;EAE9C,MAAML,cAAc,GAAGO,MAAM,CAC3BN,wBAAwB,IACtBK,KAAK,CAACN,cAAc,IACpBM,KAAK,CAACE,YAAY,IAClBF,KAAK,CAACG,YAAY,IAClBH,KAAK,CAACI,UAAU,IAChB,aACJ,CAAC;EAED,MAAMC,cAAc,GAAGT,mBAAmB,GAAGF,cAAc,CAAC;EAC5D,MAAMY,IAAI,GAAGD,cAAc,IAAIX,cAAc;EAE7C,MAAMa,gBAAgB,GAAGV,yBAAyB,GAAGH,cAAc,CAAC;EAEpE,MAAMc,MAAM,GACVD,gBAAgB,KAAKpB,YAAY,GAC7BkB,cAAc,IA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HIR_UNIT_SYSTEM","LOINC_SYSTEM","HEALTH_RECORD_DATA_EXTENSION","HEALTHKIT_BODY_MASS_INDEX","convertGenericHealthDataToObservation","data","patientId","mode","typeIdentifier","configuredTypeIdentifier","typeIdentifierCodes","typeIdentifierCodeSystems","typeIdentifierCodeDisplays","first","value","String","quantityType","categoryType","recordType","configuredCode","code","configuredSystem","system","isLoincCode","undefined","interval","getInterval","measurement","getMeasurement","metadata","getMetadata","device","observationDate","start","getDate","observation","resourceType","id","getStableObservationId","date","status","subject","reference","coding","display","extension","url","valueString","JSON","stringify","map","toPortableRecordData","effectivePeriod","toISOString","end","effectiveDateTime","component","minimum","unit","maximum","stageComponents","getSleepStageComponents","length","test","OMITTED_RECORD_FIELDS","Set","Date","Array","isArray","Object","fromEntries","entries","filter","key","has","child","raw","number","kind","average","valueQuantity","quantity","getTime","extracted","extractValue","candidates","containerKey","valueKey","fallbackUnit","container","normalizeUnit","alternateCandidates","scalarCandidates","intervals","item","startValue","startDate","startTime","time","endDate","endTime","endValue","Number","isNaN","Boolean","Math","min","max","parsed","sourceRevision","source","manufacturer","dataOrigin","model","sourceApp","name","recordingMethod","flatMap","stages","duration","isFinite","stage","label","text","getUcumCode","includes","normalized","kilometers","meters","miles","count","steps","kilograms","grams","milligrams","kilocalories","calories","minutes","seconds","beatsPerMinute","bpm","mmHg","degC","UCUM_CODES","join","replace","slice"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-generic-health-data.ts"],"mappings":";;AAAA;;AAKA,SAASA,sBAAsB,QAAQ,yBAAsB;AAG7D,SAASC,0BAA0B,QAAQ,gCAA6B;AAMxE,MAAMC,gBAAgB,GAAG,2BAA2B;AACpD,MAAMC,YAAY,GAAG,kBAAkB;AAEvC,MAAMC,4BAA4B,GAChC,kEAAkE;AAEpE,MAAMC,yBAAyB,GAAG,uCAAuC;AAEzE,MAAMC,qCAAqC,GAAG,MAAAA,CAAO;EACnDC,IAAI;EACJC,SAAS;EACTC,IAAI;EACJC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AuB,KAC1DoH,WAAW,CAAClE,IAAI,EAAElD,cAAc,CAAC,IAAIkD,IAAI;AAE3C,MAAMpB,sBAAsB,GAAGA,CAAC;EAC9B9B,cAAc;EACdY,IAAI;EACJK,QAAQ;EACRc,IAAI;EACJZ;AAOF,CAAC,KAAa;EACZ,MAAMuE,IAAI,GAAGzE,QAAQ,GACjB,GAAGA,QAAQ,CAACQ,KAAK,CAACoB,WAAW,CAAC,CAAC,IAAI5B,QAAQ,CAAC6B,GAAG,CAACD,WAAW,CAAC,CAAC,EAAE,GAC/Dd,IAAI,EAAEc,WAAW,CAAC,CAAC,IAAI,SAAS;EAEpC,MAAMvC,KAAK,GACTa,WAAW,CAACqD,aAAa,EAAElE,KAAK,IAAIa,WAAW,CAACoB,WAAW,IAAI,OAAO;EAExE,OAAO,UAAU,CAACvC,cAAc,EAAEY,IAAI,EAAE8E,IAAI,EAAEpF,KAAK,CAAC,CACjDkI,IAAI,CAAC,GAAG,CAAC,CACTC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAC/BC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACnB,CAAC;AAED,SAAS9I,qCAAqC,EAAEwH,WAAW","ignoreList":[]}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import { MeasurementTypeKey, ObservationServiceCreator } from "@ovok/core";
|
|
4
4
|
import { convertGenericHealthDataToObservation } from "./convert-generic-health-data.js";
|
|
5
5
|
import { getHealthObservationDevice } from "./health-observation-device.js";
|
|
6
|
+
import { withHealthRecordTiming } from "./health-record-timing.js";
|
|
7
|
+
import { hasConfiguredNonLoincCoding, normalizeCoreHealthObservation } from "./normalize-core-health-observation.js";
|
|
6
8
|
export const convertRecordsToObservation = async props => {
|
|
7
9
|
const {
|
|
8
10
|
data,
|
|
@@ -20,6 +22,12 @@ export const convertRecordsToObservation = async props => {
|
|
|
20
22
|
if (!record) {
|
|
21
23
|
return [];
|
|
22
24
|
}
|
|
25
|
+
if (hasConfiguredNonLoincCoding(props)) {
|
|
26
|
+
return convertGenericHealthDataToObservation({
|
|
27
|
+
...props,
|
|
28
|
+
mode
|
|
29
|
+
});
|
|
30
|
+
}
|
|
23
31
|
if (!isCoreMeasurementTypeKey(measurementTypeKey)) {
|
|
24
32
|
return convertGenericHealthDataToObservation({
|
|
25
33
|
...props,
|
|
@@ -35,35 +43,30 @@ export const convertRecordsToObservation = async props => {
|
|
|
35
43
|
const observationBody = await client.generateObservationBodiesByMeasurement({
|
|
36
44
|
measurement
|
|
37
45
|
});
|
|
38
|
-
const
|
|
46
|
+
const typedRecordTiming = record;
|
|
39
47
|
const device = getHealthObservationDevice({
|
|
40
48
|
manufacturer: typedRecord.metadata?.device?.manufacturer,
|
|
41
49
|
model: typedRecord.metadata?.device?.model,
|
|
42
50
|
sourceApp: typedRecord.metadata?.dataOrigin,
|
|
43
51
|
recordingMethod: typedRecord.metadata?.recordingMethod
|
|
44
52
|
});
|
|
45
|
-
return observationBody.map(observation => ({
|
|
53
|
+
return observationBody.map(observation => normalizeCoreHealthObservation(withHealthRecordTiming({
|
|
46
54
|
...observation,
|
|
47
55
|
...(device ? {
|
|
48
56
|
device: {
|
|
49
57
|
...(observation.device ?? {}),
|
|
50
58
|
...device
|
|
51
59
|
}
|
|
52
|
-
} : {})
|
|
53
|
-
|
|
60
|
+
} : {})
|
|
61
|
+
}, typedRecordTiming.time !== undefined ? {
|
|
62
|
+
point: typedRecordTiming.time
|
|
63
|
+
} : {
|
|
64
|
+
start: typedRecordTiming.startTime,
|
|
65
|
+
end: typedRecordTiming.endTime
|
|
66
|
+
}), {
|
|
67
|
+
...props,
|
|
68
|
+
applyCatalogCoding: observationBody.length === 1 && data.length === 1
|
|
54
69
|
}));
|
|
55
70
|
};
|
|
56
71
|
const isCoreMeasurementTypeKey = value => Object.values(MeasurementTypeKey).includes(value);
|
|
57
|
-
const getRecordTime = record => {
|
|
58
|
-
if ("time" in record) {
|
|
59
|
-
return record.time;
|
|
60
|
-
}
|
|
61
|
-
if ("endTime" in record) {
|
|
62
|
-
return record.endTime;
|
|
63
|
-
}
|
|
64
|
-
if ("startTime" in record) {
|
|
65
|
-
return record.startTime;
|
|
66
|
-
}
|
|
67
|
-
return undefined;
|
|
68
|
-
};
|
|
69
72
|
//# sourceMappingURL=convert-records-to-observation.js.map
|