@ovok/native 1.10.3 → 1.10.5
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 +21 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-delete-account.js +1 -1
- package/lib/commonjs/modules/auth/hooks/use-delete-account.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +5 -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/logout-session.js +6 -1
- package/lib/commonjs/modules/auth/session/logout-session.js.map +1 -1
- package/lib/commonjs/modules/auth/session/session-store-refresh.js +130 -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 +69 -120
- 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/helpers/form-items/form-field.js +12 -3
- package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
- 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 +82 -23
- 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 +52 -13
- 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 +77 -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 +21 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-delete-account.js +1 -1
- package/lib/module/modules/auth/hooks/use-delete-account.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +5 -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/logout-session.js +6 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/session/session-store-refresh.js +126 -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 +70 -121
- 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/helpers/form-items/form-field.js +12 -3
- package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
- 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 +82 -23
- 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 +52 -13
- 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 +77 -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 +21 -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 +6 -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/logout-session.d.ts +4 -2
- 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 +10 -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/helpers/form-items/form-field.d.ts.map +1 -1
- 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 +6 -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 +21 -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 +6 -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/logout-session.d.ts +4 -2
- 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 +10 -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/helpers/form-items/form-field.d.ts.map +1 -1
- 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 +6 -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 +18 -3
|
@@ -21,7 +21,12 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
21
21
|
itemHeight = 40,
|
|
22
22
|
visibleItems = 5,
|
|
23
23
|
decelerationRate = "fast",
|
|
24
|
-
containerProps
|
|
24
|
+
containerProps,
|
|
25
|
+
accessibilityLabel,
|
|
26
|
+
accessibilityHint,
|
|
27
|
+
nestedScrollEnabled = true,
|
|
28
|
+
accessibilityIncrementLabel,
|
|
29
|
+
accessibilityDecrementLabel
|
|
25
30
|
}) => {
|
|
26
31
|
const theme = useAppTheme();
|
|
27
32
|
|
|
@@ -43,7 +48,8 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
43
48
|
}, [options, paddingItems]);
|
|
44
49
|
|
|
45
50
|
// Calculate container height
|
|
46
|
-
const containerHeight = itemHeight * Math.min(visibleItems, paddedOptions.length);
|
|
51
|
+
const containerHeight = itemCount ? itemHeight * Math.min(visibleItems, paddedOptions.length) : 0;
|
|
52
|
+
const safeSelectedIndex = Math.max(0, Math.min(selectedIndex, Math.max(itemCount - 1, 0)));
|
|
47
53
|
|
|
48
54
|
// Calculate the offset to center the selected item
|
|
49
55
|
const centerOffset = Math.floor(visibleItems / 2) * itemHeight;
|
|
@@ -57,22 +63,24 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
57
63
|
isScrolling.value = true;
|
|
58
64
|
},
|
|
59
65
|
onMomentumEnd: event => {
|
|
66
|
+
const userInitiatedScroll = isScrolling.value;
|
|
60
67
|
isScrolling.value = false;
|
|
68
|
+
if (!itemCount) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
61
71
|
const offsetY = event.contentOffset.y;
|
|
62
|
-
const rawIndex = Math.round(offsetY / itemHeight);
|
|
63
|
-
|
|
64
|
-
// Since we're using initialScrollIndex which already accounts for padding,
|
|
65
|
-
// we need to keep the same logic here
|
|
72
|
+
const rawIndex = Math.round(offsetY / itemHeight) - paddingItems;
|
|
66
73
|
const clampedIndex = Math.max(0, Math.min(rawIndex, itemCount - 1));
|
|
67
74
|
|
|
68
75
|
// Ensure perfect snap position first
|
|
69
|
-
const targetY =
|
|
76
|
+
const targetY = (clampedIndex + paddingItems) * itemHeight;
|
|
70
77
|
if (targetY !== offsetY) {
|
|
71
78
|
scrollTo(flatListRef, 0, targetY, true);
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
//
|
|
75
|
-
|
|
81
|
+
// A user can deliberately confirm the value currently displayed as a
|
|
82
|
+
// default. Programmatic scrolls do not count as user selections.
|
|
83
|
+
if (userInitiatedScroll) {
|
|
76
84
|
runOnJS(onChange)(clampedIndex);
|
|
77
85
|
}
|
|
78
86
|
}
|
|
@@ -89,7 +97,7 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
89
97
|
React.useEffect(() => {
|
|
90
98
|
if (!mountedRef.current) {
|
|
91
99
|
mountedRef.current = true;
|
|
92
|
-
const initialY = (
|
|
100
|
+
const initialY = (safeSelectedIndex + paddingItems) * itemHeight;
|
|
93
101
|
requestAnimationFrame(() => {
|
|
94
102
|
if (flatListRef.current) {
|
|
95
103
|
scrollTo(flatListRef, 0, initialY, false);
|
|
@@ -97,14 +105,14 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
97
105
|
}
|
|
98
106
|
});
|
|
99
107
|
}
|
|
100
|
-
}, [flatListRef,
|
|
108
|
+
}, [flatListRef, safeSelectedIndex, paddingItems, itemHeight, scrollPosition]);
|
|
101
109
|
|
|
102
110
|
// Scroll to selected index when it changes
|
|
103
111
|
React.useEffect(() => {
|
|
104
112
|
if (!isInitialized.current) {
|
|
105
113
|
return;
|
|
106
114
|
}
|
|
107
|
-
if (selectedIndex < 0 || selectedIndex >=
|
|
115
|
+
if (!itemCount || selectedIndex < 0 || selectedIndex >= itemCount) {
|
|
108
116
|
// Log warning instead of throwing error for better UX
|
|
109
117
|
// eslint-disable-next-line no-console
|
|
110
118
|
console.warn(`Selected index ${selectedIndex} is out of bounds [0, ${options.length - 1}]`);
|
|
@@ -114,7 +122,7 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
114
122
|
const targetY = (selectedIndex + paddingItems) * itemHeight;
|
|
115
123
|
scrollTo(flatListRef, 0, targetY, true);
|
|
116
124
|
}
|
|
117
|
-
}, [flatListRef, selectedIndex, paddingItems, itemHeight, options.length, isScrolling]);
|
|
125
|
+
}, [flatListRef, selectedIndex, paddingItems, itemHeight, itemCount, options.length, isScrolling]);
|
|
118
126
|
|
|
119
127
|
// Render item
|
|
120
128
|
const renderItem = React.useCallback(({
|
|
@@ -131,10 +139,42 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
131
139
|
}, `${index}-${option}`), [itemHeight, itemStyle, itemTextStyle, scrollPosition, visibleItems]);
|
|
132
140
|
const keyExtractor = React.useCallback((item, index) => `item-${item}-${index}`, []);
|
|
133
141
|
return /*#__PURE__*/_jsxs(View, {
|
|
142
|
+
...containerProps,
|
|
134
143
|
style: [styles.container, {
|
|
135
144
|
height: containerHeight
|
|
136
145
|
}, containerStyle],
|
|
137
|
-
|
|
146
|
+
accessible: itemCount > 0,
|
|
147
|
+
accessibilityRole: "adjustable",
|
|
148
|
+
accessibilityLabel: accessibilityLabel,
|
|
149
|
+
accessibilityHint: accessibilityHint,
|
|
150
|
+
accessibilityValue: itemCount ? {
|
|
151
|
+
min: 1,
|
|
152
|
+
max: itemCount,
|
|
153
|
+
now: safeSelectedIndex + 1,
|
|
154
|
+
text: options[safeSelectedIndex]
|
|
155
|
+
} : undefined,
|
|
156
|
+
accessibilityActions: [{
|
|
157
|
+
name: "increment",
|
|
158
|
+
label: accessibilityIncrementLabel
|
|
159
|
+
}, {
|
|
160
|
+
name: "decrement",
|
|
161
|
+
label: accessibilityDecrementLabel
|
|
162
|
+
}],
|
|
163
|
+
onAccessibilityAction: ({
|
|
164
|
+
nativeEvent
|
|
165
|
+
}) => {
|
|
166
|
+
if (nativeEvent.actionName === "increment") {
|
|
167
|
+
const nextIndex = Math.min(safeSelectedIndex + 1, itemCount - 1);
|
|
168
|
+
if (nextIndex !== safeSelectedIndex) {
|
|
169
|
+
onChange(nextIndex);
|
|
170
|
+
}
|
|
171
|
+
} else if (nativeEvent.actionName === "decrement") {
|
|
172
|
+
const previousIndex = Math.max(safeSelectedIndex - 1, 0);
|
|
173
|
+
if (previousIndex !== safeSelectedIndex) {
|
|
174
|
+
onChange(previousIndex);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
138
178
|
children: [/*#__PURE__*/_jsx(View, {
|
|
139
179
|
style: [styles.selectedIndicator, {
|
|
140
180
|
backgroundColor: theme.colors.surfaceVariant,
|
|
@@ -159,7 +199,8 @@ export const WheelPicker = /*#__PURE__*/React.memo(({
|
|
|
159
199
|
renderItem: renderItem,
|
|
160
200
|
keyExtractor: keyExtractor,
|
|
161
201
|
getItemLayout: getItemLayout,
|
|
162
|
-
initialScrollIndex:
|
|
202
|
+
initialScrollIndex: safeSelectedIndex + paddingItems,
|
|
203
|
+
nestedScrollEnabled: nestedScrollEnabled,
|
|
163
204
|
initialNumToRender: visibleItems * 2,
|
|
164
205
|
maxToRenderPerBatch: visibleItems * 2,
|
|
165
206
|
windowSize: 7,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","FlatList","ScrollView","Animated","useSharedValue","useAnimatedScrollHandler","runOnJS","useAnimatedRef","scrollTo","useAppTheme","WheelPickerItem","jsx","_jsx","jsxs","_jsxs","AnimatedFlatList","createAnimatedComponent","AnimatedScrollView","WheelPicker","memo","selectedIndex","options","onChange","selectedIndicatorStyle","containerStyle","itemStyle","itemTextStyle","itemHeight","visibleItems","decelerationRate","containerProps","theme","flatListRef","isInitialized","useRef","mountedRef","scrollPosition","itemCount","length","isScrolling","paddingItems","Math","floor","paddedOptions","useMemo","padding","Array","fill","containerHeight","min","centerOffset","handleScroll","onScroll","event","value","contentOffset","y","onBeginDrag","onMomentumEnd","offsetY","rawIndex","round","clampedIndex","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","FlatList","ScrollView","Animated","useSharedValue","useAnimatedScrollHandler","runOnJS","useAnimatedRef","scrollTo","useAppTheme","WheelPickerItem","jsx","_jsx","jsxs","_jsxs","AnimatedFlatList","createAnimatedComponent","AnimatedScrollView","WheelPicker","memo","selectedIndex","options","onChange","selectedIndicatorStyle","containerStyle","itemStyle","itemTextStyle","itemHeight","visibleItems","decelerationRate","containerProps","accessibilityLabel","accessibilityHint","nestedScrollEnabled","accessibilityIncrementLabel","accessibilityDecrementLabel","theme","flatListRef","isInitialized","useRef","mountedRef","scrollPosition","itemCount","length","isScrolling","paddingItems","Math","floor","paddedOptions","useMemo","padding","Array","fill","containerHeight","min","safeSelectedIndex","max","centerOffset","handleScroll","onScroll","event","value","contentOffset","y","onBeginDrag","onMomentumEnd","userInitiatedScroll","offsetY","rawIndex","round","clampedIndex","targetY","getItemLayout","useCallback","_","index","offset","useEffect","current","initialY","requestAnimationFrame","console","warn","renderItem","item","option","height","position","style","textStyle","keyExtractor","styles","container","accessible","accessibilityRole","accessibilityValue","now","text","undefined","accessibilityActions","name","label","onAccessibilityAction","nativeEvent","actionName","nextIndex","previousIndex","children","selectedIndicator","backgroundColor","colors","surfaceVariant","borderRadius","top","transform","ref","scrollView","contentContainerStyle","contentContainer","showsVerticalScrollIndicator","scrollEventThrottle","snapToInterval","snapToAlignment","overScrollMode","removeClippedSubviews","data","initialScrollIndex","initialNumToRender","maxToRenderPerBatch","windowSize","updateCellsBatchingPeriod","maintainVisibleContentPosition","minIndexForVisible","autoscrollToTopThreshold","renderScrollComponent","props","create","overflow","paddingVertical","width","zIndex","flex"],"sourceRoot":"../../../../../src","sources":["modules/picker-sheet/components/wheel-picker.tsx"],"mappings":";;AAAA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAIEC,IAAI,EAEJC,UAAU,EACVC,QAAQ,QACH,cAAc;AACrB,SAASC,UAAU,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F,UAAU,CAACwI,MAAM,CAAC;EAC/B5C,SAAS,EAAE;IACTL,QAAQ,EAAE,UAAU;IACpBkD,QAAQ,EAAE;EACZ,CAAC;EACDnB,gBAAgB,EAAE;IAChBoB,eAAe,EAAE;EACnB,CAAC;EACD9B,iBAAiB,EAAE;IACjBrB,QAAQ,EAAE,UAAU;IACpBoD,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,CAAC;EACX,CAAC;EACDxB,UAAU,EAAE;IACVyB,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/picker-sheet/index.ts"],"mappings":";;AAAA,cAAc,8BAA2B;
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/picker-sheet/index.ts"],"mappings":";;AAAA,cAAc,8BAA2B;AACzC,cAAc,oCAAiC;AAE/C,cAAc,8BAA2B","ignoreList":[]}
|
|
@@ -64,22 +64,72 @@ const MyComponent = () => {
|
|
|
64
64
|
|
|
65
65
|
## Props
|
|
66
66
|
|
|
67
|
-
| Prop
|
|
68
|
-
|
|
|
69
|
-
| questionnaire
|
|
70
|
-
| onSubmit
|
|
71
|
-
| onSuccess
|
|
72
|
-
| onError
|
|
73
|
-
| initialValues
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
67
|
+
| Prop | Type | Description |
|
|
68
|
+
| ------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
69
|
+
| questionnaire | Questionnaire | The FHIR Questionnaire resource to render |
|
|
70
|
+
| onSubmit | (values: QuestionnaireFormValues, formikHelpers?: FormikHelpers<QuestionnaireFormValues>) => Promise<void> | Optional callback for form submission |
|
|
71
|
+
| onSuccess | (response: QuestionnaireResponse) => void | Optional callback when form is submitted successfully |
|
|
72
|
+
| onError | (error: Error) => void | Optional callback when form submission fails |
|
|
73
|
+
| initialValues | Partial<QuestionnaireFormValues> | Optional initial values for the form |
|
|
74
|
+
| renderItem | QuestionnaireItemRenderer | Optional host control for any non-group FHIR item |
|
|
75
|
+
| resolveQuestionnaireConstraint | QuestionnaireConstraintResolver | Resolves SDC calculated min/max values with the host's expression context |
|
|
76
|
+
| resolveQuestionnaireUnitOptions | QuestionnaireUnitOptionsResolver | Supplies a cached expansion for an SDC `unitValueSet` canonical |
|
|
77
|
+
| children | ReactNode | Child components for custom layout |
|
|
78
|
+
| style | ViewStyle | Optional styles for the container |
|
|
79
|
+
| testID | string | Test ID for testing |
|
|
77
80
|
|
|
78
81
|
Choose either the host-owned `onSubmit(values, formikHelpers?)` mode or the SDK-managed
|
|
79
82
|
`onSuccess(response)` mode. `onError(error)` is optional in the SDK-managed mode. The
|
|
80
|
-
SDK-managed path requires the active `@ovok/core` client/profile context,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
SDK-managed path requires the active `@ovok/core` client/profile context, adds the
|
|
84
|
+
patient subject and a stable identifier, and persists the `QuestionnaireResponse` with
|
|
85
|
+
`createResourceIfNoneExist`.
|
|
86
|
+
|
|
87
|
+
When the Questionnaire or one of its items carries the standard SDC
|
|
88
|
+
`sdc-questionnaire-observationExtract` extension set to `true`, SDK-managed submission
|
|
89
|
+
also calls OVOK's `QuestionnaireResponse/$extract` operation. The Questionnaire's
|
|
90
|
+
FHIR mappings define the extracted Observations; the SDK does not infer codes or
|
|
91
|
+
profile mappings from labels. It saves the response as `in-progress`, then submits the
|
|
92
|
+
extracted Observations and changes the response to `completed` in one FHIR transaction.
|
|
93
|
+
The Medplum project must have the `transaction-bundles` feature enabled. If it is not
|
|
94
|
+
enabled, the SDK fails before creating the response rather than leaving partial data.
|
|
95
|
+
The SDK retains the submission identifier for a mapped form instance and adds a
|
|
96
|
+
conditional identifier to extracted Observations, so retrying the same submission does
|
|
97
|
+
not create duplicates. A response is reported as successful only after the transaction
|
|
98
|
+
succeeds and the completed response can be read back. Unmapped SDK-managed forms keep
|
|
99
|
+
their existing behavior and can create a new response on a later submit.
|
|
100
|
+
|
|
101
|
+
This orchestration applies only to SDK-managed `onSuccess(response)` submission.
|
|
102
|
+
When `onSubmit` is provided, the host owns persistence and extraction. The extraction
|
|
103
|
+
operation currently persists mapped Observations; it does not imply arbitrary Patient
|
|
104
|
+
demographic fields are updated. Those mappings and any other resource writes must be
|
|
105
|
+
supported by the Questionnaire and backend operation.
|
|
106
|
+
|
|
107
|
+
Custom `renderItem` controls receive a `constraints` object with `minValue`,
|
|
108
|
+
`maxValue`, `minQuantity`, `maxQuantity`, `step`, `minLength`, `maxLength`,
|
|
109
|
+
`unitOptions`, `unitValueSet`, and `unitOpen`. This lets an app use its own
|
|
110
|
+
controls and terminology cache without coupling the SDK to an expression or
|
|
111
|
+
terminology service. Implement `resolveQuestionnaireConstraint` for calculated
|
|
112
|
+
SDC bounds and `resolveQuestionnaireUnitOptions` for cached ValueSet expansions;
|
|
113
|
+
both callbacks are synchronous. If a calculated bound or unit ValueSet is not
|
|
114
|
+
resolved, a non-empty answer using it is not accepted as valid. Quantity bounds
|
|
115
|
+
are compared only when the answer and bound use the same UCUM code; convert
|
|
116
|
+
units in the host control before returning the answer when conversions are
|
|
117
|
+
needed.
|
|
118
|
+
|
|
119
|
+
Static date/dateTime bounds are passed to the date picker, numeric bounds and
|
|
120
|
+
steps are checked on navigation and submission, and simple-type length limits
|
|
121
|
+
are checked before submission. Bounded integer items and decimal items with an
|
|
122
|
+
explicit step use a touch wheel when the generated range contains at most 1,000
|
|
123
|
+
values; unconstrained, invalid, or larger ranges retain text entry. A displayed
|
|
124
|
+
wheel default is not saved until the person changes the selection. The typed
|
|
125
|
+
`ValueWheelPicker<T>` in `@ovok/native/picker-sheet` can render `unitOptions`;
|
|
126
|
+
use its `value` prop for the committed selection and `defaultIndex` only for a
|
|
127
|
+
display-only initial position.
|
|
128
|
+
|
|
129
|
+
Host-rendered quantity and duration controls can combine `minQuantity`,
|
|
130
|
+
`maxQuantity`, `unitOptions`, and the host-resolved `unitValueSet` in one or
|
|
131
|
+
more typed wheels. This keeps UCUM conversion and terminology lookup in the
|
|
132
|
+
host app while reusing the same generic picker in different forms and styles.
|
|
83
133
|
|
|
84
134
|
## Extended Properties
|
|
85
135
|
|
|
@@ -168,6 +218,15 @@ The form supports various field types through specialized components:
|
|
|
168
218
|
- **QuestionnaireDateField**: Date picker
|
|
169
219
|
- **QuestionnaireItemRenderer**: Dynamic field type renderer
|
|
170
220
|
|
|
221
|
+
The optional `renderItem` callback can provide host-designed controls for item
|
|
222
|
+
types without a built-in control, including `url`, `open-choice`, `quantity`,
|
|
223
|
+
`attachment`, and `reference`. Its `onChange` accepts either a primitive value
|
|
224
|
+
for built-in types or a typed FHIR answer value such as
|
|
225
|
+
`{ valueQuantity: { value: 2, unit: "mg" } }`. This preserves the corresponding
|
|
226
|
+
FHIR `value[x]` field in SDK-created responses and makes required custom items
|
|
227
|
+
participate in validation. Without a custom renderer, unsupported items show a
|
|
228
|
+
fallback and do not prevent continuing through the form.
|
|
229
|
+
|
|
171
230
|
## Context and Hooks
|
|
172
231
|
|
|
173
232
|
The form provides a context and hooks for advanced customization:
|
|
@@ -253,16 +312,16 @@ const MyComponent = () => {
|
|
|
253
312
|
|
|
254
313
|
#### QuestionnaireForm Props
|
|
255
314
|
|
|
256
|
-
| Prop | Type
|
|
257
|
-
| ------------- |
|
|
258
|
-
| questionnaire | Questionnaire
|
|
259
|
-
| onSubmit | (values: QuestionnaireFormValues, formikHelpers?) => Promise<void> | Host-owned submit callback
|
|
260
|
-
| onSuccess | (response: QuestionnaireResponse) => void
|
|
261
|
-
| onError | (error: Error) => void
|
|
262
|
-
| initialValues | Partial<QuestionnaireFormValues>
|
|
263
|
-
| paged | boolean
|
|
264
|
-
| style | StyleProp<ViewStyle>
|
|
265
|
-
| testID | string
|
|
315
|
+
| Prop | Type | Description |
|
|
316
|
+
| ------------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
|
|
317
|
+
| questionnaire | Questionnaire | The questionnaire object to render |
|
|
318
|
+
| onSubmit | (values: QuestionnaireFormValues, formikHelpers?) => Promise<void> | Host-owned submit callback |
|
|
319
|
+
| onSuccess | (response: QuestionnaireResponse) => void | Called after SDK-managed persistence |
|
|
320
|
+
| onError | (error: Error) => void | Called when SDK-managed persistence fails |
|
|
321
|
+
| initialValues | Partial<QuestionnaireFormValues> | Initial values for the form |
|
|
322
|
+
| paged | boolean | Whether to show one item at a time; defaults to true |
|
|
323
|
+
| style | StyleProp<ViewStyle> | Style for the container |
|
|
324
|
+
| testID | string | Test ID for the component |
|
|
266
325
|
|
|
267
326
|
#### QuestionnaireForm.Header Props
|
|
268
327
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
import { useQuestionnaireForm } from "../../hooks/use-questionnaire-form.js";
|
|
6
|
+
import { getQuestionnaireItemConstraints } from "../../utils/questionnaire-item-constraints.js";
|
|
6
7
|
import { QuestionnaireItemRenderer } from "../fields/questionnaire-item-renderer.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export const QuestionnaireContentItem = /*#__PURE__*/React.memo(({
|
|
@@ -12,6 +13,10 @@ export const QuestionnaireContentItem = /*#__PURE__*/React.memo(({
|
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
14
15
|
currentItem,
|
|
16
|
+
locale,
|
|
17
|
+
renderItem,
|
|
18
|
+
resolveQuestionnaireConstraint,
|
|
19
|
+
resolveQuestionnaireUnitOptions,
|
|
15
20
|
values,
|
|
16
21
|
setFieldValue
|
|
17
22
|
} = useQuestionnaireForm();
|
|
@@ -34,6 +39,9 @@ export const QuestionnaireContentItem = /*#__PURE__*/React.memo(({
|
|
|
34
39
|
item: currentItem,
|
|
35
40
|
value: value,
|
|
36
41
|
onChange: onChange,
|
|
42
|
+
locale: locale,
|
|
43
|
+
renderItem: renderItem,
|
|
44
|
+
constraints: getQuestionnaireItemConstraints(currentItem, values, resolveQuestionnaireConstraint, resolveQuestionnaireUnitOptions),
|
|
37
45
|
testID: testID ? `${testID}-${itemId}` : `item-${itemId}`
|
|
38
46
|
})
|
|
39
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","useQuestionnaireForm","QuestionnaireItemRenderer","jsx","_jsx","QuestionnaireContentItem","memo","style","testID","props","currentItem","values","setFieldValue","onChange","useCallback","val","linkId","itemId","value","children","item"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-item.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAmB,cAAc;AAE9C,SAASC,oBAAoB,QAAQ,uCAAoC;
|
|
1
|
+
{"version":3,"names":["React","View","useQuestionnaireForm","getQuestionnaireItemConstraints","QuestionnaireItemRenderer","jsx","_jsx","QuestionnaireContentItem","memo","style","testID","props","currentItem","locale","renderItem","resolveQuestionnaireConstraint","resolveQuestionnaireUnitOptions","values","setFieldValue","onChange","useCallback","val","linkId","itemId","value","children","item","constraints"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-item.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAmB,cAAc;AAE9C,SAASC,oBAAoB,QAAQ,uCAAoC;AAEzE,SAASC,+BAA+B,QAAQ,+CAA4C;AAC5F,SAASC,yBAAyB,QAAQ,0CAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElF,OAAO,MAAMC,wBAAwB,gBAAGP,KAAK,CAACQ,IAAI,CAChD,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAE,GAAGC;AAAiB,CAAC,KAAK;EAC1C,MAAM;IACJC,WAAW;IACXC,MAAM;IACNC,UAAU;IACVC,8BAA8B;IAC9BC,+BAA+B;IAC/BC,MAAM;IACNC;EACF,CAAC,GAAGhB,oBAAoB,CAAC,CAAC;EAE1B,MAAMiB,QAAQ,GAAGnB,KAAK,CAACoB,WAAW,CAC/BC,GAA2B,IAAK;IAC/B,IAAI,CAACT,WAAW,EAAEU,MAAM,EAAE;MACxB;IACF;IAEAJ,aAAa,CAACN,WAAW,CAACU,MAAM,EAAED,GAAG,CAAC;EACxC,CAAC,EACD,CAACT,WAAW,EAAEU,MAAM,EAAEJ,aAAa,CACrC,CAAC;EAED,IAAI,CAACN,WAAW,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,MAAMW,MAAM,GAAGX,WAAW,CAACU,MAAM,IAAI,EAAE;EACvC,MAAME,KAAK,GAAGP,MAAM,CAACM,MAAM,CAAC;EAE5B,oBACEjB,IAAA,CAACL,IAAI;IAAA,GAAKU,KAAK;IAAEF,KAAK,EAAEA,KAAM;IAACC,MAAM,EAAEA,MAAO;IAAAe,QAAA,eAC5CnB,IAAA,CAACF,yBAAyB;MACxBsB,IAAI,EAAEd,WAAY;MAClBY,KAAK,EAAEA,KAAM;MACbL,QAAQ,EAAEA,QAAS;MACnBN,MAAM,EAAEA,MAAO;MACfC,UAAU,EAAEA,UAAW;MACvBa,WAAW,EAAExB,+BAA+B,CAC1CS,WAAW,EACXK,MAAM,EACNF,8BAA8B,EAC9BC,+BACF,CAAE;MACFN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIa,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
import { useQuestionnaireForm } from "../../hooks/use-questionnaire-form.js";
|
|
6
|
+
import { getQuestionnaireItemConstraints } from "../../utils/questionnaire-item-constraints.js";
|
|
6
7
|
import { QuestionnaireItemRenderer } from "../fields/questionnaire-item-renderer.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
const QuestionnaireContentSpecificItemComponent = /*#__PURE__*/React.memo(({
|
|
@@ -12,6 +13,10 @@ const QuestionnaireContentSpecificItemComponent = /*#__PURE__*/React.memo(({
|
|
|
12
13
|
...props
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
16
|
+
locale,
|
|
17
|
+
renderItem,
|
|
18
|
+
resolveQuestionnaireConstraint,
|
|
19
|
+
resolveQuestionnaireUnitOptions,
|
|
15
20
|
values,
|
|
16
21
|
setFieldValue
|
|
17
22
|
} = useQuestionnaireForm();
|
|
@@ -34,6 +39,9 @@ const QuestionnaireContentSpecificItemComponent = /*#__PURE__*/React.memo(({
|
|
|
34
39
|
item: item,
|
|
35
40
|
value: value,
|
|
36
41
|
onChange: onChange,
|
|
42
|
+
locale: locale,
|
|
43
|
+
renderItem: renderItem,
|
|
44
|
+
constraints: getQuestionnaireItemConstraints(item, values, resolveQuestionnaireConstraint, resolveQuestionnaireUnitOptions),
|
|
37
45
|
testID: testID ? `${testID}-${itemId}` : `item-${itemId}`
|
|
38
46
|
})
|
|
39
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","useQuestionnaireForm","QuestionnaireItemRenderer","jsx","_jsx","QuestionnaireContentSpecificItemComponent","memo","style","testID","item","props","values","setFieldValue","onChange","useCallback","val","linkId","itemId","value","children","QuestionnaireContentSpecificItem"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAmB,cAAc;AAE9C,SAASC,oBAAoB,QAAQ,uCAAoC;
|
|
1
|
+
{"version":3,"names":["React","View","useQuestionnaireForm","getQuestionnaireItemConstraints","QuestionnaireItemRenderer","jsx","_jsx","QuestionnaireContentSpecificItemComponent","memo","style","testID","item","props","locale","renderItem","resolveQuestionnaireConstraint","resolveQuestionnaireUnitOptions","values","setFieldValue","onChange","useCallback","val","linkId","itemId","value","children","constraints","QuestionnaireContentSpecificItem"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAmB,cAAc;AAE9C,SAASC,oBAAoB,QAAQ,uCAAoC;AAGzE,SAASC,+BAA+B,QAAQ,+CAA4C;AAC5F,SAASC,yBAAyB,QAAQ,0CAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElF,MAAMC,yCAAyC,gBAAGP,KAAK,CAACQ,IAAI,CAC1D,CAAC;EACCC,KAAK;EACLC,MAAM;EACNC,IAAI;EACJ,GAAGC;AAC4C,CAAC,KAAK;EACrD,MAAM;IACJC,MAAM;IACNC,UAAU;IACVC,8BAA8B;IAC9BC,+BAA+B;IAC/BC,MAAM;IACNC;EACF,CAAC,GAAGhB,oBAAoB,CAAC,CAAC;EAE1B,MAAMiB,QAAQ,GAAGnB,KAAK,CAACoB,WAAW,CAC/BC,GAA2B,IAAK;IAC/B,IAAI,CAACV,IAAI,EAAEW,MAAM,EAAE;MACjB;IACF;IAEAJ,aAAa,CAACP,IAAI,CAACW,MAAM,EAAED,GAAG,CAAC;EACjC,CAAC,EACD,CAACV,IAAI,EAAEW,MAAM,EAAEJ,aAAa,CAC9B,CAAC;EAED,IAAI,CAACP,IAAI,EAAE;IACT,OAAO,IAAI;EACb;EAEA,MAAMY,MAAM,GAAGZ,IAAI,CAACW,MAAM,IAAI,EAAE;EAChC,MAAME,KAAK,GAAGP,MAAM,CAACM,MAAM,CAAC;EAE5B,oBACEjB,IAAA,CAACL,IAAI;IAAA,GAAKW,KAAK;IAAEH,KAAK,EAAEA,KAAM;IAACC,MAAM,EAAEA,MAAO;IAAAe,QAAA,eAC5CnB,IAAA,CAACF,yBAAyB;MACxBO,IAAI,EAAEA,IAAK;MACXa,KAAK,EAAEA,KAAM;MACbL,QAAQ,EAAEA,QAAS;MACnBN,MAAM,EAAEA,MAAO;MACfC,UAAU,EAAEA,UAAW;MACvBY,WAAW,EAAEvB,+BAA+B,CAC1CQ,IAAI,EACJM,MAAM,EACNF,8BAA8B,EAC9BC,+BACF,CAAE;MACFN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIa,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAED,OAAO,MAAMI,gCAAgC,GAC3CpB,yCAAyC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ import { StyleSheet, View } from "react-native";
|
|
|
5
5
|
import { Text } from "react-native-paper";
|
|
6
6
|
import { useAppTheme } from "../../../../theme/index.js";
|
|
7
7
|
import { useQuestionnaireForm } from "../../../hooks/index.js";
|
|
8
|
+
import { translateFhirText } from "../../../utils/translate-fhir-text.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
export const QuestionnaireFieldWrapper = /*#__PURE__*/React.memo(({
|
|
10
11
|
item,
|
|
@@ -14,8 +15,12 @@ export const QuestionnaireFieldWrapper = /*#__PURE__*/React.memo(({
|
|
|
14
15
|
}) => {
|
|
15
16
|
const theme = useAppTheme();
|
|
16
17
|
const {
|
|
18
|
+
locale,
|
|
17
19
|
paged
|
|
18
20
|
} = useQuestionnaireForm();
|
|
21
|
+
const prefix = translateFhirText(item.prefix, item._prefix, locale);
|
|
22
|
+
const questionText = translateFhirText(item.text, item._text, locale);
|
|
23
|
+
const helperText = translateFhirText(item.helperText, item._helperText, locale);
|
|
19
24
|
return /*#__PURE__*/_jsxs(View, {
|
|
20
25
|
testID: testID,
|
|
21
26
|
style: [styles.container, {
|
|
@@ -26,18 +31,18 @@ export const QuestionnaireFieldWrapper = /*#__PURE__*/React.memo(({
|
|
|
26
31
|
style: [styles.title, {
|
|
27
32
|
color: theme.colors.onSurface
|
|
28
33
|
}],
|
|
29
|
-
children: [
|
|
34
|
+
children: [prefix ? `${prefix} ` : "", questionText, item.required && /*#__PURE__*/_jsx(Text, {
|
|
30
35
|
style: {
|
|
31
36
|
color: theme.colors.error
|
|
32
37
|
},
|
|
33
38
|
children: " *"
|
|
34
39
|
})]
|
|
35
|
-
}), children,
|
|
40
|
+
}), children, helperText && /*#__PURE__*/_jsx(Text, {
|
|
36
41
|
variant: "bodySmall",
|
|
37
42
|
style: [{
|
|
38
43
|
color: theme.colors.onSurfaceVariant
|
|
39
44
|
}],
|
|
40
|
-
children:
|
|
45
|
+
children: helperText
|
|
41
46
|
})]
|
|
42
47
|
});
|
|
43
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","Text","useAppTheme","useQuestionnaireForm","jsx","_jsx","jsxs","_jsxs","QuestionnaireFieldWrapper","memo","item","children","testID","style","theme","paged","styles","container","gap","spacing","variant","title","color","colors","onSurface","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","Text","useAppTheme","useQuestionnaireForm","translateFhirText","jsx","_jsx","jsxs","_jsxs","QuestionnaireFieldWrapper","memo","item","children","testID","style","theme","locale","paged","prefix","_prefix","questionText","text","_text","helperText","_helperText","styles","container","gap","spacing","variant","title","color","colors","onSurface","required","error","onSurfaceVariant","create","width","fontWeight"],"sourceRoot":"../../../../../../../src","sources":["modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAC1D,SAASC,IAAI,QAAQ,oBAAoB;AAEzC,SAASC,WAAW,QAAQ,4BAAmB;AAC/C,SAASC,oBAAoB,QAAQ,yBAAgB;AAErD,SAASC,iBAAiB,QAAQ,uCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASvE,OAAO,MAAMC,yBAAyB,gBAAGX,KAAK,CAACY,IAAI,CACjD,CAAC;EAAEC,IAAI;EAAE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A,CAACL,IAAI;MACH4B,OAAO,EAAC,WAAW;MACnBf,KAAK,EAAE,CAAC;QAAEiB,KAAK,EAAEhB,KAAK,CAACiB,MAAM,CAACI;MAAiB,CAAC,CAAE;MAAAxB,QAAA,EAEnDW;IAAU,CACL,CACP;EAAA,CACG,CAAC;AAEX,CACF,CAAC;AAED,MAAME,MAAM,GAAG1B,UAAU,CAACsC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,KAAK,EAAE;EACT,CAAC;EACDR,KAAK,EAAE;IACLS,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { useQuestionnaireForm } from "../../hooks/use-questionnaire-form.js";
|
|
4
5
|
import { getOptionText } from "../../utils/fields/get-option-text.js";
|
|
5
6
|
import { getOptionValue } from "../../utils/fields/get-option-value.js";
|
|
6
7
|
import { QuestionnaireFieldWrapper, QuestionnaireOptionButton, QuestionnaireOptionsContainer } from "./common/index.js";
|
|
@@ -10,10 +11,11 @@ const MemoizedOptionButton = /*#__PURE__*/React.memo(({
|
|
|
10
11
|
index,
|
|
11
12
|
value,
|
|
12
13
|
onChange,
|
|
14
|
+
locale,
|
|
13
15
|
testID
|
|
14
16
|
}) => {
|
|
15
17
|
const optionValue = React.useMemo(() => getOptionValue(option), [option]);
|
|
16
|
-
const optionText = React.useMemo(() => getOptionText(option), [option]);
|
|
18
|
+
const optionText = React.useMemo(() => getOptionText(option, locale), [option, locale]);
|
|
17
19
|
const isSelected = React.useMemo(() => value === optionValue, [value, optionValue]);
|
|
18
20
|
return /*#__PURE__*/_jsx(QuestionnaireOptionButton, {
|
|
19
21
|
value: optionValue,
|
|
@@ -29,10 +31,13 @@ export const QuestionnaireChoiceField = /*#__PURE__*/React.memo(({
|
|
|
29
31
|
onChange,
|
|
30
32
|
testID
|
|
31
33
|
}) => {
|
|
32
|
-
|
|
34
|
+
const {
|
|
35
|
+
locale
|
|
36
|
+
} = useQuestionnaireForm();
|
|
37
|
+
const options = React.useMemo(() => item.answerOption || [], [item.answerOption]);
|
|
38
|
+
if (options.length === 0) {
|
|
33
39
|
return null;
|
|
34
40
|
}
|
|
35
|
-
const options = React.useMemo(() => item.answerOption || [], [item.answerOption]);
|
|
36
41
|
return /*#__PURE__*/_jsx(QuestionnaireFieldWrapper, {
|
|
37
42
|
testID: testID,
|
|
38
43
|
item: item,
|
|
@@ -44,6 +49,7 @@ export const QuestionnaireChoiceField = /*#__PURE__*/React.memo(({
|
|
|
44
49
|
return /*#__PURE__*/_jsx(MemoizedOptionButton, {
|
|
45
50
|
option: option,
|
|
46
51
|
index: index,
|
|
52
|
+
locale: locale,
|
|
47
53
|
onChange: onChange,
|
|
48
54
|
testID: testID,
|
|
49
55
|
value: value || ""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","getOptionText","getOptionValue","QuestionnaireFieldWrapper","QuestionnaireOptionButton","QuestionnaireOptionsContainer","jsx","_jsx","MemoizedOptionButton","memo","option","index","value","onChange","testID","optionValue","useMemo","optionText","isSelected","label","onPress","QuestionnaireChoiceField","item","
|
|
1
|
+
{"version":3,"names":["React","useQuestionnaireForm","getOptionText","getOptionValue","QuestionnaireFieldWrapper","QuestionnaireOptionButton","QuestionnaireOptionsContainer","jsx","_jsx","MemoizedOptionButton","memo","option","index","value","onChange","locale","testID","optionValue","useMemo","optionText","isSelected","label","onPress","QuestionnaireChoiceField","item","options","answerOption","length","children","onValueChange","map"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/fields/questionnaire-choice-field.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB,QAAQ,uCAAoC;AAKzE,SAASC,aAAa,QAAQ,uCAAoC;AAClE,SAASC,cAAc,QAAQ,wCAAqC;AAEpE,SACEC,yBAAyB,EACzBC,yBAAyB,EACzBC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,OAAO,IAAI;EACb;EAEA,oBACEnB,IAAA,CAACJ,yBAAyB;IAACY,MAAM,EAAEA,MAAO;IAACQ,IAAI,EAAEA,IAAK;IAAAI,QAAA,eACpDpB,IAAA,CAACF,6BAA6B;MAC5BO,KAAK,EAAEA,KAAK,IAAI,EAAG;MACnBgB,aAAa,EAAEf,QAAS;MACxBE,MAAM,EAAE,GAAGA,MAAM,UAAW;MAAAY,QAAA,EAE3BH,OAAO,CAACK,GAAG,CAAC,CAACnB,MAAM,EAAEC,KAAK,KAAK;QAC9B,oBACEJ,IAAA,CAACC,oBAAoB;UAEnBE,MAAM,EAAEA,MAAO;UACfC,KAAK,EAAEA,KAAM;UACbG,MAAM,EAAEA,MAAO;UACfD,QAAQ,EAAEA,QAAS;UACnBE,MAAM,EAAEA,MAAO;UACfH,KAAK,EAAEA,KAAK,IAAI;QAAG,GANdD,KAON,CAAC;MAEN,CAAC;IAAC,CAC2B;EAAC,CACP,CAAC;AAEhC,CACF,CAAC","ignoreList":[]}
|
package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js
CHANGED
|
@@ -7,12 +7,14 @@ import DateTimePickerModal from "react-native-modal-datetime-picker";
|
|
|
7
7
|
import { Text } from "react-native-paper";
|
|
8
8
|
import { useAppTheme } from "../../../theme/index.js";
|
|
9
9
|
import { useQuestionnaireForm } from "../../hooks/index.js";
|
|
10
|
+
import { isQuestionnaireDateOutsideBounds, parseQuestionnaireDate } from "../../utils/questionnaire-date-utils.js";
|
|
10
11
|
import { QuestionnaireFieldWrapper } from "./common/index.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
export const QuestionnaireDateField = /*#__PURE__*/React.memo(({
|
|
13
14
|
item,
|
|
14
15
|
value,
|
|
15
16
|
onChange,
|
|
17
|
+
constraints,
|
|
16
18
|
testID
|
|
17
19
|
}) => {
|
|
18
20
|
const theme = useAppTheme();
|
|
@@ -20,6 +22,9 @@ export const QuestionnaireDateField = /*#__PURE__*/React.memo(({
|
|
|
20
22
|
const {
|
|
21
23
|
paged
|
|
22
24
|
} = useQuestionnaireForm();
|
|
25
|
+
const minimumDate = parseQuestionnaireDate(constraints?.minValue, item.type, "minimum");
|
|
26
|
+
const maximumDate = parseQuestionnaireDate(constraints?.maxValue, item.type, "maximum");
|
|
27
|
+
const initialPickerDate = parseQuestionnaireDate(value, item.type, "minimum");
|
|
23
28
|
const showPicker = React.useCallback(() => setPickerVisible(true), []);
|
|
24
29
|
const hidePicker = React.useCallback(() => setPickerVisible(false), []);
|
|
25
30
|
const handleConfirm = React.useCallback(selectedDate => {
|
|
@@ -38,22 +43,22 @@ export const QuestionnaireDateField = /*#__PURE__*/React.memo(({
|
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
time: () => {
|
|
41
|
-
const timeString = selectedDate.
|
|
42
|
-
hour: "2-digit",
|
|
43
|
-
minute: "2-digit"
|
|
44
|
-
});
|
|
46
|
+
const timeString = [selectedDate.getHours(), selectedDate.getMinutes(), selectedDate.getSeconds()].map(part => String(part).padStart(2, "0")).join(":");
|
|
45
47
|
if (timeString) {
|
|
46
48
|
onChange(timeString);
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
52
|
+
if (isQuestionnaireDateOutsideBounds(selectedDate, item.type, minimumDate, maximumDate)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
50
55
|
actionMap[item.type]();
|
|
51
|
-
}, [hidePicker, onChange, item.type]);
|
|
56
|
+
}, [hidePicker, maximumDate, minimumDate, onChange, item.type]);
|
|
52
57
|
const formattedDate = React.useMemo(() => {
|
|
53
58
|
if (!value) {
|
|
54
59
|
return "Select a date";
|
|
55
60
|
}
|
|
56
|
-
const dateObj = new Date(value);
|
|
61
|
+
const dateObj = parseQuestionnaireDate(value, item.type, "minimum") ?? new Date(value);
|
|
57
62
|
const actionMap = {
|
|
58
63
|
dateTime: () => {
|
|
59
64
|
const dateFormatted = dateObj.toLocaleDateString();
|
|
@@ -67,7 +72,10 @@ export const QuestionnaireDateField = /*#__PURE__*/React.memo(({
|
|
|
67
72
|
return dateObj.toLocaleDateString();
|
|
68
73
|
},
|
|
69
74
|
time: () => {
|
|
70
|
-
return
|
|
75
|
+
return dateObj.toLocaleTimeString([], {
|
|
76
|
+
hour: "2-digit",
|
|
77
|
+
minute: "2-digit"
|
|
78
|
+
});
|
|
71
79
|
}
|
|
72
80
|
};
|
|
73
81
|
return actionMap[item.type]();
|
|
@@ -95,7 +103,9 @@ export const QuestionnaireDateField = /*#__PURE__*/React.memo(({
|
|
|
95
103
|
mode: item.type.toLowerCase(),
|
|
96
104
|
onConfirm: handleConfirm,
|
|
97
105
|
onCancel: hidePicker,
|
|
98
|
-
date:
|
|
106
|
+
date: initialPickerDate ?? new Date(),
|
|
107
|
+
minimumDate: minimumDate,
|
|
108
|
+
maximumDate: maximumDate,
|
|
99
109
|
testID: `${testID}-picker`,
|
|
100
110
|
display: "inline"
|
|
101
111
|
})]
|