@ovok/native 1.10.2 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/lib/commonjs/modules/auth/default-translation.js +22 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +3 -0
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +3 -6
- package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +1 -0
- package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +4 -3
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +5 -2
- package/lib/commonjs/modules/auth/session/logout-session.js.map +1 -1
- package/lib/commonjs/modules/auth/session/session-store-refresh.js +125 -0
- package/lib/commonjs/modules/auth/session/session-store-refresh.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store-request-state.js +73 -0
- package/lib/commonjs/modules/auth/session/session-store-request-state.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store-types.js +17 -0
- package/lib/commonjs/modules/auth/session/session-store-types.js.map +1 -0
- package/lib/commonjs/modules/auth/session/session-store.js +56 -123
- package/lib/commonjs/modules/auth/session/session-store.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-in-error.js +10 -4
- package/lib/commonjs/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js +36 -1
- package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js +25 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js +6 -0
- package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js +22 -36
- package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +74 -34
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +19 -16
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +219 -16
- package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-record-timing.js +52 -0
- package/lib/commonjs/modules/data-sync/utils/health-record-timing.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js +1 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js +74 -0
- package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
- package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js +41 -0
- package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
- package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js +56 -15
- package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js.map +1 -1
- package/lib/commonjs/modules/picker-sheet/index.js +11 -0
- package/lib/commonjs/modules/picker-sheet/index.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/README.md +59 -20
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +41 -2
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +43 -5
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
- package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
- package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/index.js +20 -0
- package/lib/commonjs/modules/questionnaire-response-form/index.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-form-values.js +4 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +6 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/types/response-values.js +4 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
- package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +148 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js +127 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
- package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js +71 -64
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js +23 -5
- package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +10 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +83 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +54 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +75 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +63 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +117 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +109 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
- package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js +36 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +49 -0
- package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +31 -15
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/prerequisite-gate.js +73 -0
- package/lib/commonjs/modules/ui/components/prerequisite-gate.js.map +1 -0
- package/lib/commonjs/modules/ui/default-translation.js +50 -0
- package/lib/commonjs/modules/ui/default-translation.js.map +1 -0
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/polyfills/index.js +9 -7
- package/lib/commonjs/polyfills/index.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +22 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +3 -0
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form-provider.js +3 -6
- package/lib/module/modules/auth/profile/components/profile-form-provider.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-form-provider.js +1 -0
- package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +3 -3
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +5 -2
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/session/session-store-refresh.js +121 -0
- package/lib/module/modules/auth/session/session-store-refresh.js.map +1 -0
- package/lib/module/modules/auth/session/session-store-request-state.js +69 -0
- package/lib/module/modules/auth/session/session-store-request-state.js.map +1 -0
- package/lib/module/modules/auth/session/session-store-types.js +13 -0
- package/lib/module/modules/auth/session/session-store-types.js.map +1 -0
- package/lib/module/modules/auth/session/session-store.js +56 -123
- package/lib/module/modules/auth/session/session-store.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-in-error.js +9 -4
- package/lib/module/modules/auth/utils/sign-in-error.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js +33 -1
- package/lib/module/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js +20 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js +4 -0
- package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js +21 -35
- package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
- package/lib/module/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +74 -34
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +19 -16
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-data-catalog.js +219 -16
- package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-record-timing.js +47 -0
- package/lib/module/modules/data-sync/utils/health-record-timing.js.map +1 -0
- package/lib/module/modules/data-sync/utils/health-units.js +1 -0
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
- package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js +69 -0
- package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
- package/lib/module/modules/picker-sheet/components/value-wheel-picker.js +36 -0
- package/lib/module/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
- package/lib/module/modules/picker-sheet/components/wheel-picker.js +56 -15
- package/lib/module/modules/picker-sheet/components/wheel-picker.js.map +1 -1
- package/lib/module/modules/picker-sheet/index.js +1 -0
- package/lib/module/modules/picker-sheet/index.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/README.md +59 -20
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
- package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +42 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +41 -3
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
- package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
- package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
- package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
- package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
- package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/index.js +2 -0
- package/lib/module/modules/questionnaire-response-form/index.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-form-values.js +2 -0
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +4 -0
- package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/types/response-values.js +2 -0
- package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
- package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +140 -0
- package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js +122 -0
- package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
- package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/form-utils.js +71 -64
- package/lib/module/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/form-validation.js +23 -5
- package/lib/module/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +5 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +77 -0
- package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +49 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +71 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +57 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +112 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +105 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
- package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js +31 -0
- package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
- package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +44 -0
- package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +31 -15
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/prerequisite-gate.js +67 -0
- package/lib/module/modules/ui/components/prerequisite-gate.js.map +1 -0
- package/lib/module/modules/ui/default-translation.js +45 -0
- package/lib/module/modules/ui/default-translation.js.map +1 -0
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/polyfills/index.js +11 -1
- package/lib/module/polyfills/index.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/logout-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts +1 -18
- package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
- package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
- package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-initial-selected-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/response-values.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts +30 -0
- package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts +7 -1
- package/lib/typescript/commonjs/src/polyfills/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +22 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +4 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/logout-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts +23 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts +33 -0
- package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts +1 -18
- package/lib/typescript/module/src/modules/auth/session/session-store.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts +4 -2
- package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
- package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
- package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +3 -2
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
- package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
- package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/picker-sheet/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/picker-sheet/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-initial-selected-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/response-values.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
- package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/default-translation.d.ts +30 -0
- package/lib/typescript/module/src/modules/ui/default-translation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/polyfills/index.d.ts +7 -1
- package/lib/typescript/module/src/polyfills/index.d.ts.map +1 -1
- package/package.json +5 -8
|
@@ -11,8 +11,21 @@ export const defaultTranslation = {
|
|
|
11
11
|
cancel: "Cancel",
|
|
12
12
|
delete: "Delete"
|
|
13
13
|
},
|
|
14
|
+
"questionnaire-form": {
|
|
15
|
+
item: {
|
|
16
|
+
unsupported: "This question type ({{type}}) is not supported. You can continue without answering it."
|
|
17
|
+
},
|
|
18
|
+
picker: {
|
|
19
|
+
increase: "Increase value",
|
|
20
|
+
decrease: "Decrease value"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
14
23
|
profile: {
|
|
15
24
|
form: {
|
|
25
|
+
error: {
|
|
26
|
+
network: "Check your internet connection and try again.",
|
|
27
|
+
generic: "Something went wrong. Please try again."
|
|
28
|
+
},
|
|
16
29
|
phone: {
|
|
17
30
|
country: "Country",
|
|
18
31
|
invalid: "Enter a valid phone number for the selected country.",
|
|
@@ -24,6 +37,10 @@ export const defaultTranslation = {
|
|
|
24
37
|
register: {
|
|
25
38
|
"already-have-account": "Already have an account? <login/>",
|
|
26
39
|
button: "Create account",
|
|
40
|
+
errors: {
|
|
41
|
+
network: "Unable to connect. Check your connection and try again.",
|
|
42
|
+
generic: "Unable to create account. Please try again."
|
|
43
|
+
},
|
|
27
44
|
name: "First name",
|
|
28
45
|
"full-name": "Full name",
|
|
29
46
|
"or-register-with": "Or register with",
|
|
@@ -35,9 +52,14 @@ export const defaultTranslation = {
|
|
|
35
52
|
"reset-password": {
|
|
36
53
|
accountType: "Account type",
|
|
37
54
|
email: "Email",
|
|
55
|
+
errors: {
|
|
56
|
+
network: "Unable to connect. Check your connection and try again.",
|
|
57
|
+
generic: "Unable to request a password reset. Please try again."
|
|
58
|
+
},
|
|
38
59
|
patient: "Patient",
|
|
39
60
|
practitioner: "Practitioner",
|
|
40
61
|
"reset-password": "Reset password",
|
|
62
|
+
success: "If an account exists, a password reset link has been sent.",
|
|
41
63
|
subtitle: "Request a password reset link",
|
|
42
64
|
title: "Reset password"
|
|
43
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["i18n","defaultTranslation","auth","common","cancel","delete","profile","form","phone","country","invalid","searchCountry","save","register","button","name","subtitle","surname","title","accountType","email","patient","practitioner","settings","logout","apple","footer","google","mfa","code","verify","password","
|
|
1
|
+
{"version":3,"names":["i18n","defaultTranslation","auth","common","cancel","delete","item","unsupported","picker","increase","decrease","profile","form","error","network","generic","phone","country","invalid","searchCountry","save","register","button","errors","name","subtitle","surname","title","accountType","email","patient","practitioner","success","settings","logout","apple","footer","google","mfa","code","verify","password","unavailable","addResourceBundle","resources","options","englishResources","Object","assign","en","existingTranslation","translation"],"sourceRoot":"../../../../src","sources":["modules/auth/default-translation.ts"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,SAAS;;AAE1B;AACA,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,IAAI,EAAE;IAAE,YAAY,EAAE;EAAsD,CAAC;EAC7EC,MAAM,EAAE;IAAEC,MAAM,EAAE,QAAQ;IAAEC,MAAM,EAAE;EAAS,CAAC;EAC9C,oBAAoB,EAAE;IACpBC,IAAI,EAAE;MACJC,WAAW,EACT;IACJ,CAAC;IACDC,MAAM,EAAE;MACNC,QAAQ,EAAE,gBAAgB;MAC1BC,QAAQ,EAAE;IACZ;EACF,CAAC;EACDC,OAAO,EAAE;IACPC,IAAI,EAAE;MACJC,KAAK,EAAE;QACLC,OAAO,EAAE,+CAA+C;QACxDC,OAAO,EAAE;MACX,CAAC;MACDC,KAAK,EAAE;QACLC,OAAO,EAAE,SAAS;QAClBC,OAAO,EAAE,sDAAsD;QAC/DC,aAAa,EAAE;MACjB;IACF,CAAC;IACDC,IAAI,EAAE;EACR,CAAC;EACDC,QAAQ,EAAE;IACR,sBAAsB,EAAE,mCAAmC;IAC3DC,MAAM,EAAE,gBAAgB;IACxBC,MAAM,EAAE;MACNT,OAAO,EAAE,yDAAyD;MAClEC,OAAO,EAAE;IACX,CAAC;IACDS,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,kBAAkB,EAAE,kBAAkB;IACtCC,QAAQ,EAAE,qBAAqB;IAC/BC,OAAO,EAAE,WAAW;IACpBC,KAAK,EAAE;EACT,CAAC;EACD,gBAAgB,EAAE;IAChBC,WAAW,EAAE,cAAc;IAC3BC,KAAK,EAAE,OAAO;IACdN,MAAM,EAAE;MACNT,OAAO,EAAE,yDAAyD;MAClEC,OAAO,EAAE;IACX,CAAC;IACDe,OAAO,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AmB,GAAGH,MAAM,CAACC,MAAM,CACvC,CAAC,CAAC,EACFF,gBAAgB,CAACK,WACnB,CAA4B;EAE5BnD,IAAI,CAAC6C,OAAO,CAACD,SAAS,GAAGG,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,SAAS,EAAE;IACpDK,EAAE,EAAEF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEF,gBAAgB,EAAE;MACtCK,WAAW,EAAEJ,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE/C,kBAAkB,EAAEiD,mBAAmB;IACxE,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -30,12 +30,15 @@ const useSession = ({
|
|
|
30
30
|
return {
|
|
31
31
|
status: snapshot.status,
|
|
32
32
|
isAuthenticated: snapshot.status === "authenticated" || snapshot.status === "offline",
|
|
33
|
+
accounts: snapshot.accounts,
|
|
33
34
|
profile: snapshot.profile,
|
|
34
35
|
sessions: snapshot.sessions,
|
|
35
36
|
loading: snapshot.status === "loading",
|
|
36
37
|
error: snapshot.error,
|
|
37
38
|
refresh,
|
|
38
39
|
refreshSessions: store.refreshSessions,
|
|
40
|
+
switchAccount: store.switchAccount,
|
|
41
|
+
removeAccount: store.removeAccount,
|
|
39
42
|
logout: store.logout,
|
|
40
43
|
revokeSessions: store.revokeSessions
|
|
41
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useClient","React","AppState","subscribeSessionChanges","getSessionStore","useSession","sessions","fetchSessions","refreshOnForeground","client","store","useMemo","snapshot","useSyncExternalStore","subscribe","refresh","useCallback","useEffect","subscription","addEventListener","nextState","undefined","unsubscribe","remove","status","isAuthenticated","profile","loading","error","refreshSessions","logout","revokeSessions"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-session.ts"],"mappings":";;AAAA,SAASA,SAAS,
|
|
1
|
+
{"version":3,"names":["useClient","React","AppState","subscribeSessionChanges","getSessionStore","useSession","sessions","fetchSessions","refreshOnForeground","client","store","useMemo","snapshot","useSyncExternalStore","subscribe","refresh","useCallback","useEffect","subscription","addEventListener","nextState","undefined","unsubscribe","remove","status","isAuthenticated","accounts","profile","loading","error","refreshSessions","switchAccount","removeAccount","logout","revokeSessions"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-session.ts"],"mappings":";;AAAA,SAASA,SAAS,QAA+B,YAAY;AAC7D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,eAAe,QAAQ,6BAA0B;AA8B1D;AACA,MAAMC,UAAU,GAAGA,CAAC;EAClBC,QAAQ,EAAEC,aAAa,GAAG,IAAI;EAC9BC,mBAAmB,GAAG;AACL,CAAC,GAAG,CAAC,CAAC,KAAuB;EAC9C,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;EAC1B,MAAMU,KAAK,GAAGT,KAAK,CAACU,OAAO,CAAC,MAAMP,eAAe,CAACK,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEpE,MAAMG,QAAQ,GAAGX,KAAK,CAACY,oBAAoB,CACzCH,KAAK,CAACI,SAAS,EACf,MAAMJ,KAAK,CAACE,QAAQ,EACpB,MAAMF,KAAK,CAACE,QACd,CAAC;EAED,MAAMG,OAAO,GAAGd,KAAK,CAACe,WAAW,CAC/B,MAAMN,KAAK,CAACK,OAAO,CAACR,aAAa,CAAC,EAClC,CAACA,aAAa,EAAEG,KAAK,CACvB,CAAC;EAEDT,KAAK,CAACgB,SAAS,CAAC,MAAM;IACpB,KAAKF,OAAO,CAAC,CAAC;IAEd,MAAMG,YAAY,GAAGV,mBAAmB,GACpCN,QAAQ,CAACiB,gBAAgB,CAAC,QAAQ,EAAGC,SAAS,IAAK;MACjD,IAAIA,SAAS,KAAK,QAAQ,EAAE;QAC1B,KAAKL,OAAO,CAAC,CAAC;MAChB;IACF,CAAC,CAAC,GACFM,SAAS;IAEb,MAAMC,WAAW,GAAGnB,uBAAuB,CAAC,MAAM,KAAKY,OAAO,CAAC,CAAC,CAAC;IAEjE,OAAO,MAAM;MACXG,YAAY,EAAEK,MAAM,CAAC,CAAC;MACtBD,WAAW,CAAC,CAAC;IACf,CAAC;EACH,CAAC,EAAE,CAACP,OAAO,EAAEP,mBAAmB,CAAC,CAAC;EAElC,OAAO;IACLgB,MAAM,EAAEZ,QAAQ,CAACY,MAAM;IACvBC,eAAe,EACbb,QAAQ,CAACY,MAAM,KAAK,eAAe,IAAIZ,QAAQ,CAACY,MAAM,KAAK,SAAS;IACtEE,QAAQ,EAAEd,QAAQ,CAACc,QAAQ;IAC3BC,OAAO,EAAEf,QAAQ,CAACe,OAAkB;IACpCrB,QAAQ,EAAEM,QAAQ,CAACN,QAAQ;IAC3BsB,OAAO,EAAEhB,QAAQ,CAACY,MAAM,KAAK,SAAS;IACtCK,KAAK,EAAEjB,QAAQ,CAACiB,KAAK;IACrBd,OAAO;IACPe,eAAe,EAAEpB,KAAK,CAACoB,eAAe;IACtCC,aAAa,EAAErB,KAAK,CAACqB,aAAa;IAClCC,aAAa,EAAEtB,KAAK,CAACsB,aAAa;IAClCC,MAAM,EAAEvB,KAAK,CAACuB,MAAM;IACpBC,cAAc,EAAExB,KAAK,CAACwB;EACxB,CAAC;AACH,CAAC;AAED,SAA8C7B,UAAU","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { parsePhoneNumberFromString } from "libphonenumber-js";
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import * as Yup from "yup";
|
|
8
8
|
import { useShallowStableValue } from "../../../helpers/hooks/use-shallow-stable-value.js";
|
|
9
|
+
import { isNetworkError } from "../../utils/sign-in-error.js";
|
|
9
10
|
import { ProfileFormContext } from "../contexts/profile-form-context.js";
|
|
10
11
|
import { phoneCountryFieldName, toPhoneE164, isPhoneValidForCountry } from "../utils/phone.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -88,14 +89,10 @@ export const ProfileFormProvider = ({
|
|
|
88
89
|
}];
|
|
89
90
|
});
|
|
90
91
|
const response = await client.patchResource("Patient", activeProfile?.id ?? "", operations.filter(op => op.path !== "/submit"));
|
|
91
|
-
client.refetchProfile();
|
|
92
|
+
await client.refetchProfile();
|
|
92
93
|
await onSuccess?.(response, submittedValues);
|
|
93
94
|
} catch (error) {
|
|
94
|
-
|
|
95
|
-
formikHelpers.setFieldError("submit", error.message);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
formikHelpers.setFieldError("submit", "profile.form.error.generic");
|
|
95
|
+
formikHelpers.setFieldError("submit", isNetworkError(error) ? "profile.form.error.network" : "profile.form.error.generic");
|
|
99
96
|
}
|
|
100
97
|
} finally {
|
|
101
98
|
submitInProgress.current = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useClient","getPatchOperationType","useFormik","parsePhoneNumberFromString","React","Yup","useShallowStableValue","ProfileFormContext","phoneCountryFieldName","toPhoneE164","isPhoneValidForCountry","jsx","_jsx","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","submitInProgress","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","defaultCountry","name","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","object","shape","formik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","path","includes","split","filter","Boolean","join","response","patchResource","id","error","
|
|
1
|
+
{"version":3,"names":["useClient","getPatchOperationType","useFormik","parsePhoneNumberFromString","React","Yup","useShallowStableValue","isNetworkError","ProfileFormContext","phoneCountryFieldName","toPhoneE164","isPhoneValidForCountry","jsx","_jsx","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","submitInProgress","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","defaultCountry","name","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","object","shape","formik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","path","includes","split","filter","Boolean","join","response","patchResource","id","error","setFieldError","contextValue","Provider"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-provider.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAkBC,qBAAqB,QAAQ,YAAY;AAC7E,SAASC,SAAS,QAAQ,QAAQ;AAClC,SAASC,0BAA0B,QAAQ,mBAAmB;AAC9D,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,GAAG,MAAM,KAAK;AAE1B,SAASC,qBAAqB,QAAQ,oDAAiD;AACvF,SAASC,cAAc,QAAQ,8BAA2B;AAC1D,SAASC,kBAAkB,QAAQ,qCAAkC;AAGrE,SACEC,qBAAqB,EACrBC,WAAW,EACXC,sBAAsB,QACjB,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExB,OAAO,MAAMC,mBAEZ,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAU,CAAC,KAAK;EACjD,MAAMC,MAAM,GAAGnB,SAAS,CAAC,CAAC;EAC1B,MAAMoB,gBAAgB,GAAGhB,KAAK,CAACiB,MAAM,CAAC,KAAK,CAAC;EAE5C,MAAMC,aAAgC,GAAGlB,KAAK,CAACmB,OAAO,CAAC,MAAM;IAC3D,MAAMC,MAAM,GAAGR,MAAM,CAACS,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;MAC3C,MAAMC,KAAK,GACTD,KAAK,CAACE,IAAI,KAAK,OAAO,GAClBnB,WAAW,CAACiB,KAAK,CAACC,KAAK,IAAI,EAAE,EAAED,KAAK,CAACG,cAAc,CAAC,GACnDH,KAAK,CAACC,KAAK,IAAI,EAAG;MAEzBF,GAAG,CAACC,KAAK,CAACI,IAAI,CAAC,GAAGH,KAAK;MAEvB,IAAID,KAAK,CAACE,IAAI,KAAK,OAAO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hC,KAAK,CAACI,IAAI,EAAE;YAE3B,IAAIJ,KAAK,CAACI,IAAI,CAAC6B,QAAQ,CAAC,GAAG,CAAC,EAAE;cAC5BD,IAAI,GAAG,IAAIhC,KAAK,CAACI,IAAI,CAClB8B,KAAK,CAAC,QAAQ,CAAC,CACfC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,EAAE;YAChB;YAEA,OAAO,CACL;cACEN,EAAE;cACFC,IAAI;cACJ/B;YACF,CAAC,CACF;UACH,CAAC,CAAC;UAEF,MAAMqC,QAAQ,GAAG,MAAM9C,MAAM,CAAC+C,aAAa,CACzC,SAAS,EACThB,aAAa,EAAEiB,EAAE,IAAI,EAAE,EACvBb,UAAU,CAACQ,MAAM,CACdJ,EAAE,IAAKA,EAAE,CAACC,IAAI,KAAK,SACtB,CACF,CAAC;UAED,MAAMxC,MAAM,CAACgC,cAAc,CAAC,CAAC;UAE7B,MAAMjC,SAAS,GAAG+C,QAAQ,EAAajB,eAAe,CAAC;QACzD,CAAC,CAAC,OAAOoB,KAAK,EAAE;UACdtB,aAAa,CAACuB,aAAa,CACzB,QAAQ,EACR9D,cAAc,CAAC6D,KAAK,CAAC,GACjB,4BAA4B,GAC5B,4BACN,CAAC;QACH;MACF,CAAC,SAAS;QACRhD,gBAAgB,CAAC2B,OAAO,GAAG,KAAK;MAClC;IACF;EACF,CAAC,CAAC;EAEF,MAAMuB,YAAY,GAAGhE,qBAAqB,CAAC;IAAE,GAAGqC;EAAO,CAAC,CAAC;EAEzD,oBACE9B,IAAA,CAACL,kBAAkB,CAAC+D,QAAQ;IAAC3C,KAAK,EAAE0C,YAAa;IAAAvD,QAAA,EAC9CA;EAAQ,CACkB,CAAC;AAElC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useClient","useFormik","React","useShallowStableValue","notifySessionChanged","setRateLimitFormError","parseSignInError","RegisterFormContext","createRegisterValidationSchema","jsx","_jsx","isClinicianInviteStep","response","nextStep","RegisterFormProvider","children","customValidations","defaultValues","tenantCode","continueAsPatientToken","nameField","toRegisterNames","onSubmit","onSuccess","onError","onNextStep","client","singleName","registerValidationSchema","useMemo","disablePasswordConfirm","passwordConfirm","initialValues","email","password","name","surname","fullName","filter","Boolean","join","submit","formik","validateOnBlur","validationSchema","values","formikHelpers","mappedNames","undefined","registerValues","updatedValues","registerResponse","register","data","accessToken","refreshToken","profile","project","setActiveLogin","error","parsedError","isSignIn","fieldErrors","emailError","find","fieldError","path","includes","message","passwordError","setFieldError","contextValue","Provider","value"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/register-form-provider.tsx"],"mappings":";;AAAA,SACEA,SAAS,QAGJ,YAAY;AACnB,SAASC,SAAS,QAAQ,QAAQ;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,qBAAqB,QAAQ,uDAAoD;AAC1F,SAASC,oBAAoB,QAAQ,4BAAyB;AAC9D,SAASC,qBAAqB,QAAQ,8BAA2B;AACjE,SAASC,gBAAgB,QAAQ,iCAA8B;AAC/D,SAASC,mBAAmB,QAAQ,yCAAsC;AAG1E,SAASC,8BAA8B,QAAQ,kDAA+C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/F,MAAMC,qBAAqB,GACzBC,QAA0B,IAE1B,UAAU,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,QAAQ,KAAK,kBAAkB;AAEpE,OAAO,MAAMC,oBAEZ,GAAGA,CAAC;EACHC,QAAQ;EACRC,iBAAiB;EACjBC,aAAa;EACbC,UAAU;EACVC,sBAAsB;EACtBC,SAAS;EACTC,eAAe;EACfC,QAAQ;EACRC,SAAS;EACTC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAG1B,SAAS,CAAC,CAAC;EAC1B,MAAM2B,UAAU,GAAGP,SAAS,KAAK,QAAQ;EAEzC,MAAMQ,wBAAwB,GAAG1B,KAAK,CAAC2B,OAAO,CAC5C,MAC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CAAC;QACtBhB,eAAe,EAAEd,aAAa,EAAEc,eAAe,GAC3Cc,MAAM,CAACX,QAAQ,GACfW,MAAM,CAACd,eAAe;QAC1Bb,UAAU;QACV,IAAIC,sBAAsB,KAAK6B,SAAS,GACpC;UAAE7B;QAAuB,CAAC,GAC1B,CAAC,CAAC;MACR,CAAC;MAED,IAAIG,QAAQ,EAAE;QACZ,OAAOA,QAAQ,CAAC4B,aAAa,EAAEJ,aAAa,CAAC;MAC/C;MAEA,IAAI;QACF,MAAMK,gBAAgB,GAAG,MAAMzB,MAAM,CAAC0B,QAAQ,CAACF,aAAa,CAAC;QAE7D,IAAIvC,qBAAqB,CAACwC,gBAAgB,CAAC,EAAE;UAC3C1B,UAAU,GAAG0B,gBAAgB,CAAC;UAE9B;QACF;QAEA,MAAME,IAAI,GAAG;UACXC,WAAW,EAAEH,gBAAgB,CAACG,WAAW;UACzCC,YAAY,EAAEJ,gBAAgB,CAACI,YAAY;UAC3CC,OAAO,EAAEL,gBAAgB,CAACK,OAAO;UACjCC,OAAO,EAAEN,gBAAgB,CAACM;QAC5B,CAAC;QAED,MAAM/B,MAAM,CAACgC,cAAc,CAACL,IAAI,CAAC;QACjCjD,oBAAoB,CAAC,CAAC;QAEtBmB,SAAS,GAAG4B,gBAAgB,CAAC;MAC/B,CAAC,CAAC,OAAOQ,KAAK,EAAE;QACd,MAAMC,WAAW,GAAGtD,gBAAgB,CAACqD,KAAK,EAAE;
|
|
1
|
+
{"version":3,"names":["useClient","useFormik","React","useShallowStableValue","notifySessionChanged","setRateLimitFormError","parseSignInError","RegisterFormContext","createRegisterValidationSchema","jsx","_jsx","isClinicianInviteStep","response","nextStep","RegisterFormProvider","children","customValidations","defaultValues","tenantCode","continueAsPatientToken","nameField","toRegisterNames","onSubmit","onSuccess","onError","onNextStep","client","singleName","registerValidationSchema","useMemo","disablePasswordConfirm","passwordConfirm","initialValues","email","password","name","surname","fullName","filter","Boolean","join","submit","formik","validateOnBlur","validationSchema","values","formikHelpers","mappedNames","undefined","registerValues","updatedValues","registerResponse","register","data","accessToken","refreshToken","profile","project","setActiveLogin","error","parsedError","errorScope","isSignIn","fieldErrors","emailError","find","fieldError","path","includes","message","passwordError","setFieldError","contextValue","Provider","value"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/register-form-provider.tsx"],"mappings":";;AAAA,SACEA,SAAS,QAGJ,YAAY;AACnB,SAASC,SAAS,QAAQ,QAAQ;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,qBAAqB,QAAQ,uDAAoD;AAC1F,SAASC,oBAAoB,QAAQ,4BAAyB;AAC9D,SAASC,qBAAqB,QAAQ,8BAA2B;AACjE,SAASC,gBAAgB,QAAQ,iCAA8B;AAC/D,SAASC,mBAAmB,QAAQ,yCAAsC;AAG1E,SAASC,8BAA8B,QAAQ,kDAA+C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/F,MAAMC,qBAAqB,GACzBC,QAA0B,IAE1B,UAAU,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,QAAQ,KAAK,kBAAkB;AAEpE,OAAO,MAAMC,oBAEZ,GAAGA,CAAC;EACHC,QAAQ;EACRC,iBAAiB;EACjBC,aAAa;EACbC,UAAU;EACVC,sBAAsB;EACtBC,SAAS;EACTC,eAAe;EACfC,QAAQ;EACRC,SAAS;EACTC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAG1B,SAAS,CAAC,CAAC;EAC1B,MAAM2B,UAAU,GAAGP,SAAS,KAAK,QAAQ;EAEzC,MAAMQ,wBAAwB,GAAG1B,KAAK,CAAC2B,OAAO,CAC5C,MACErB,8BAA8B,CAAC;IAC7BQ,iBAAiB;IACjBc,sBAAsB,EAAE,CAAC,CAACb,aAAa,EAAEc,eAAe;IACxDJ,UAAU;IACVN;EACF,CAAC,CAAC,EACJ,CACEL,iBAAiB,EACjBC,aAAa,EAAEc,eAAe,EAC9BJ,UAAU,EACVN,eAAe,CAEnB,CAAC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a,EAAE;UACjCxB,aAAa,CAACyB,aAAa,CAAC,QAAQ,EAAEX,WAAW,CAACD,KAAK,CAACU,OAAO,CAAC;QAClE;QAEAvB,aAAa,CAACyB,aAAa,CAAC,OAAO,EAAEP,UAAU,CAAC;QAChDlB,aAAa,CAACyB,aAAa,CAAC,UAAU,EAAED,aAAa,CAAC;MACxD;IACF;EACF,CAAC,CAAC;EAEF,MAAME,YAAY,GAAGrE,qBAAqB,CAAC;IACzC,GAAGuC,MAAM;IACTzB,aAAa;IACbG,SAAS;IACTC;EACF,CAAC,CAAC;EAEF,oBACEX,IAAA,CAACH,mBAAmB,CAACkE,QAAQ;IAACC,KAAK,EAAEF,YAAa;IAAAzD,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC,CAAC","ignoreList":[]}
|
package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useClient } from "@ovok/core";
|
|
4
4
|
import { useFormik } from "formik";
|
|
5
|
+
import i18n from "i18next";
|
|
5
6
|
import * as Yup from "yup";
|
|
6
7
|
import { useShallowStableValue } from "../../../../helpers/hooks/use-shallow-stable-value.js";
|
|
7
8
|
import { setRateLimitFormError } from "../../../utils/rate-limit.js";
|
|
@@ -32,14 +33,13 @@ export const ResetPasswordFormProvider = ({
|
|
|
32
33
|
}
|
|
33
34
|
try {
|
|
34
35
|
await client.resetPassword(values);
|
|
35
|
-
|
|
36
|
-
// TODO: fix this
|
|
37
36
|
const data = {
|
|
38
|
-
message: "
|
|
37
|
+
message: i18n.t("reset-password.success")
|
|
39
38
|
};
|
|
40
39
|
onSuccess?.(data);
|
|
41
40
|
} catch (error) {
|
|
42
41
|
const parsedError = parseSignInError(error, {
|
|
42
|
+
errorScope: "reset-password",
|
|
43
43
|
isSignIn: false
|
|
44
44
|
});
|
|
45
45
|
onError?.(parsedError.error);
|
package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useClient","useFormik","Yup","useShallowStableValue","setRateLimitFormError","parseSignInError","ResetPasswordFormContext","jsx","_jsx","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","formik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","error","parsedError","isSignIn","setFieldError","contextValue","typeLocked","undefined","Provider","value"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/reset-password/components/form/reset-password-form-provider.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,SAASC,SAAS,QAAQ,QAAQ;AAClC,OAAO,KAAKC,GAAG,MAAM,KAAK;AAE1B,SAASC,qBAAqB,QAAQ,uDAAoD;AAC1F,SAASC,qBAAqB,QAAQ,8BAA2B;AACjE,SAASC,gBAAgB,QAAQ,iCAA8B;AAC/D,SAASC,wBAAwB,QAAQ,+CAA4C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAItF,OAAO,MAAMC,yBAAyB,GAAGA,CAAC;EACxCC,QAAQ;EACRC,IAAI;EACJC,QAAQ;EACRC,SAAS;EACTC;AAC8B,CAAC,KAAK;EACpC,MAAMC,MAAM,
|
|
1
|
+
{"version":3,"names":["useClient","useFormik","i18n","Yup","useShallowStableValue","setRateLimitFormError","parseSignInError","ResetPasswordFormContext","jsx","_jsx","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","formik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","t","error","parsedError","errorScope","isSignIn","setFieldError","contextValue","typeLocked","undefined","Provider","value"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/reset-password/components/form/reset-password-form-provider.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,YAAY;AACtC,SAASC,SAAS,QAAQ,QAAQ;AAClC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAO,KAAKC,GAAG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B,CAAC,CAAC,OAAOG,KAAK,EAAE;QACd,MAAMC,WAAW,GAAG9B,gBAAgB,CAAC6B,KAAK,EAAE;UAC1CE,UAAU,EAAE,gBAAgB;UAC5BC,QAAQ,EAAE;QACZ,CAAC,CAAC;QAEFvB,OAAO,GAAGqB,WAAW,CAACD,KAAK,CAAC;QAE5B,IAAI9B,qBAAqB,CAAC+B,WAAW,CAACD,KAAK,EAAEL,OAAO,CAAC,EAAE;UACrD;QACF;QAEAA,OAAO,CAACS,aAAa,CAAC,QAAQ,EAAEH,WAAW,CAACD,KAAK,CAACF,OAAO,CAAC;MAC5D;IACF;EACF,CAAC,CAAC;EAEF,MAAMO,YAAY,GAAGpC,qBAAqB,CAAC;IACzC,GAAGa,MAAM;IACTwB,UAAU,EAAE7B,IAAI,KAAK8B;EACvB,CAAC,CAAC;EAEF,oBACEjC,IAAA,CAACF,wBAAwB,CAACoC,QAAQ;IAACC,KAAK,EAAEJ,YAAa;IAAA7B,QAAA,EACpDA;EAAQ,CACwB,CAAC;AAExC,CAAC","ignoreList":[]}
|
|
@@ -12,8 +12,11 @@ export const logoutSession = client => {
|
|
|
12
12
|
return pending;
|
|
13
13
|
}
|
|
14
14
|
const request = (async () => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
try {
|
|
16
|
+
await client.logout();
|
|
17
|
+
} finally {
|
|
18
|
+
await signOutGoogleIfNeeded();
|
|
19
|
+
}
|
|
17
20
|
})().finally(() => {
|
|
18
21
|
notifySessionChanged();
|
|
19
22
|
logoutRequests.delete(key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["signOutGoogleIfNeeded","notifySessionChanged","logoutRequests","WeakMap","logoutSession","client","key","pending","get","request","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,6BAA0B;AAEhE,SAASC,oBAAoB,QAAQ,aAAU;AAM/C,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;;AAE3D;AACA,OAAO,MAAMC,aAAa,GAAIC,MAA2B,IAAoB;EAC3E,MAAMC,GAAG,GAAGD,MAAgB;EAC5B,MAAME,OAAO,GAAGL,cAAc,CAACM,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEA,MAAME,OAAO,GAAG,CAAC,YAAY;IAC3B,MAAMJ,MAAM,CAACK,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["signOutGoogleIfNeeded","notifySessionChanged","logoutRequests","WeakMap","logoutSession","client","key","pending","get","request","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,6BAA0B;AAEhE,SAASC,oBAAoB,QAAQ,aAAU;AAM/C,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;;AAE3D;AACA,OAAO,MAAMC,aAAa,GAAIC,MAA2B,IAAoB;EAC3E,MAAMC,GAAG,GAAGD,MAAgB;EAC5B,MAAME,OAAO,GAAGL,cAAc,CAACM,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEA,MAAME,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMJ,MAAM,CAACK,MAAM,CAAC,CAAC;IACvB,CAAC,SAAS;MACR,MAAMV,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACW,OAAO,CAAC,MAAM;IACjBV,oBAAoB,CAAC,CAAC;IACtBC,cAAc,CAACU,MAAM,CAACN,GAAG,CAAC;EAC5B,CAAC,CAAC;EAEFJ,cAAc,CAACW,GAAG,CAACP,GAAG,EAAEG,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getHttpStatus, toError } from "./session-errors.js";
|
|
4
|
+
import { normalizeSession } from "./session-store-types.js";
|
|
5
|
+
const createSessionRefreshActions = (client, requestState, getStore, notify) => {
|
|
6
|
+
const refresh = async includeSessions => {
|
|
7
|
+
const store = getStore();
|
|
8
|
+
requestState.syncActiveAccount();
|
|
9
|
+
if (!client.getActiveLogin()) {
|
|
10
|
+
requestState.nextRevision();
|
|
11
|
+
store.snapshot = {
|
|
12
|
+
status: "signed-out",
|
|
13
|
+
accounts: requestState.getAccounts(),
|
|
14
|
+
sessions: []
|
|
15
|
+
};
|
|
16
|
+
notify();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const revision = requestState.nextRevision();
|
|
20
|
+
const previousSnapshot = store.snapshot;
|
|
21
|
+
if (store.snapshot.status !== "authenticated" && store.snapshot.status !== "offline") {
|
|
22
|
+
store.snapshot = {
|
|
23
|
+
...store.snapshot,
|
|
24
|
+
status: "loading",
|
|
25
|
+
error: undefined
|
|
26
|
+
};
|
|
27
|
+
notify();
|
|
28
|
+
}
|
|
29
|
+
const currentProfileRequest = requestState.getProfileRequest();
|
|
30
|
+
const currentSessionsRequest = includeSessions ? requestState.getSessionsRequest() : undefined;
|
|
31
|
+
const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
|
|
32
|
+
profile
|
|
33
|
+
}), error => ({
|
|
34
|
+
error
|
|
35
|
+
})), (currentSessionsRequest ?? Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
|
|
36
|
+
sessions
|
|
37
|
+
}), error => ({
|
|
38
|
+
error
|
|
39
|
+
}))]);
|
|
40
|
+
if (!requestState.isCurrent(revision)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
|
|
44
|
+
const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
|
|
45
|
+
const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
|
|
46
|
+
const accounts = requestState.getAccounts();
|
|
47
|
+
const nextSnapshot = !client.getActiveLogin() || getHttpStatus(error) === 401 ? {
|
|
48
|
+
status: "signed-out",
|
|
49
|
+
accounts,
|
|
50
|
+
sessions: [],
|
|
51
|
+
error: error === undefined ? undefined : toError(error)
|
|
52
|
+
} : "error" in profileResult ? {
|
|
53
|
+
status: "offline",
|
|
54
|
+
accounts,
|
|
55
|
+
profile,
|
|
56
|
+
sessions: sessions.map(normalizeSession),
|
|
57
|
+
error: toError(profileResult.error)
|
|
58
|
+
} : {
|
|
59
|
+
status: "authenticated",
|
|
60
|
+
accounts,
|
|
61
|
+
profile,
|
|
62
|
+
sessions: sessions.map(normalizeSession),
|
|
63
|
+
error: "error" in sessionsResult ? toError(sessionsResult.error) : undefined
|
|
64
|
+
};
|
|
65
|
+
store.snapshot = nextSnapshot;
|
|
66
|
+
notify();
|
|
67
|
+
};
|
|
68
|
+
const refreshSessions = async () => {
|
|
69
|
+
const store = getStore();
|
|
70
|
+
requestState.syncActiveAccount();
|
|
71
|
+
if (!client.getActiveLogin()) {
|
|
72
|
+
store.snapshot = {
|
|
73
|
+
...store.snapshot,
|
|
74
|
+
accounts: requestState.getAccounts(),
|
|
75
|
+
sessions: []
|
|
76
|
+
};
|
|
77
|
+
notify();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const revision = requestState.revision;
|
|
81
|
+
try {
|
|
82
|
+
const sessions = await requestState.getSessionsRequest();
|
|
83
|
+
if (!requestState.isCurrent(revision)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
store.snapshot = {
|
|
87
|
+
...store.snapshot,
|
|
88
|
+
accounts: requestState.getAccounts(),
|
|
89
|
+
sessions: sessions.map(normalizeSession),
|
|
90
|
+
error: undefined
|
|
91
|
+
};
|
|
92
|
+
notify();
|
|
93
|
+
} catch (cause) {
|
|
94
|
+
if (!requestState.isCurrent(revision)) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const error = toError(cause);
|
|
98
|
+
if (!client.getActiveLogin() || getHttpStatus(cause) === 401) {
|
|
99
|
+
store.snapshot = {
|
|
100
|
+
status: "signed-out",
|
|
101
|
+
accounts: requestState.getAccounts(),
|
|
102
|
+
sessions: [],
|
|
103
|
+
error
|
|
104
|
+
};
|
|
105
|
+
} else {
|
|
106
|
+
store.snapshot = {
|
|
107
|
+
...store.snapshot,
|
|
108
|
+
error
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
notify();
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
refresh,
|
|
117
|
+
refreshSessions
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export { createSessionRefreshActions };
|
|
121
|
+
//# sourceMappingURL=session-store-refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getHttpStatus","toError","normalizeSession","createSessionRefreshActions","client","requestState","getStore","notify","refresh","includeSessions","store","syncActiveAccount","getActiveLogin","nextRevision","snapshot","status","accounts","getAccounts","sessions","revision","previousSnapshot","error","undefined","currentProfileRequest","getProfileRequest","currentSessionsRequest","getSessionsRequest","profileResult","sessionsResult","Promise","all","then","profile","resolve","isCurrent","nextSnapshot","map","refreshSessions","cause"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store-refresh.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,OAAO,QAAQ,qBAAkB;AAEzD,SACEC,gBAAgB,QAIX,0BAAuB;AAE9B,MAAMC,2BAA2B,GAAGA,CAClCC,MAAc,EACdC,YAAsC,EACtCC,QAA4B,EAC5BC,MAAkB,KACf;EACH,MAAMC,OAAO,GAAG,MAAOC,eAAwB,IAAK;IAClD,MAAMC,KAAK,GAAGJ,QAAQ,CAAC,CAAC;IAExBD,YAAY,CAACM,iBAAiB,CAAC,CAAC;IAEhC,IAAI,CAACP,MAAM,CAACQ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K,CAACI,QAAQ,GAAG;UAAE,GAAGJ,KAAK,CAACI,QAAQ;UAAEO;QAAM,CAAC;MAC/C;MACAd,MAAM,CAAC,CAAC;MACR,MAAMc,KAAK;IACb;EACF,CAAC;EAED,OAAO;IAAEb,OAAO;IAAE6B;EAAgB,CAAC;AACrC,CAAC;AAED,SAASlC,2BAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
class SessionStoreRequestState {
|
|
4
|
+
profileNeedsRefresh = false;
|
|
5
|
+
hasActiveAccount = false;
|
|
6
|
+
authRevision = 0;
|
|
7
|
+
constructor(client, sessionClient) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
this.sessionClient = sessionClient;
|
|
10
|
+
}
|
|
11
|
+
getAccounts = () => this.sessionClient.getSavedAccounts();
|
|
12
|
+
getActiveAccountId = () => this.getAccounts().find(account => account.active)?.id ?? this.client.getActiveLogin()?.profile?.reference;
|
|
13
|
+
syncActiveAccount = () => {
|
|
14
|
+
const nextAccountId = this.getActiveAccountId();
|
|
15
|
+
if (this.hasActiveAccount && this.activeAccountId !== nextAccountId) {
|
|
16
|
+
this.invalidate();
|
|
17
|
+
}
|
|
18
|
+
this.activeAccountId = nextAccountId;
|
|
19
|
+
this.hasActiveAccount = true;
|
|
20
|
+
};
|
|
21
|
+
invalidate = () => {
|
|
22
|
+
this.authRevision += 1;
|
|
23
|
+
this.profileRequest = undefined;
|
|
24
|
+
this.sessionsRequest = undefined;
|
|
25
|
+
this.profileNeedsRefresh = false;
|
|
26
|
+
this.activeAccountId = this.getActiveAccountId();
|
|
27
|
+
this.hasActiveAccount = true;
|
|
28
|
+
};
|
|
29
|
+
nextRevision = () => ++this.authRevision;
|
|
30
|
+
get revision() {
|
|
31
|
+
return this.authRevision;
|
|
32
|
+
}
|
|
33
|
+
isCurrent = revision => revision === this.authRevision;
|
|
34
|
+
getProfileRequest = () => {
|
|
35
|
+
if (!this.profileRequest) {
|
|
36
|
+
const requestAccountId = this.getActiveAccountId();
|
|
37
|
+
const request = (this.profileNeedsRefresh ? this.client.refetchProfile() : this.client.getProfileAsync()).then(profile => {
|
|
38
|
+
if (requestAccountId === this.getActiveAccountId()) {
|
|
39
|
+
this.profileNeedsRefresh = false;
|
|
40
|
+
}
|
|
41
|
+
return profile;
|
|
42
|
+
}).catch(cause => {
|
|
43
|
+
if (requestAccountId === this.getActiveAccountId()) {
|
|
44
|
+
this.profileNeedsRefresh = true;
|
|
45
|
+
}
|
|
46
|
+
throw cause;
|
|
47
|
+
}).finally(() => {
|
|
48
|
+
if (this.profileRequest === request) {
|
|
49
|
+
this.profileRequest = undefined;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
this.profileRequest = request;
|
|
53
|
+
}
|
|
54
|
+
return this.profileRequest;
|
|
55
|
+
};
|
|
56
|
+
getSessionsRequest = () => {
|
|
57
|
+
if (!this.sessionsRequest) {
|
|
58
|
+
const request = this.sessionClient.getSessions().finally(() => {
|
|
59
|
+
if (this.sessionsRequest === request) {
|
|
60
|
+
this.sessionsRequest = undefined;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
this.sessionsRequest = request;
|
|
64
|
+
}
|
|
65
|
+
return this.sessionsRequest;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export { SessionStoreRequestState };
|
|
69
|
+
//# sourceMappingURL=session-store-request-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SessionStoreRequestState","profileNeedsRefresh","hasActiveAccount","authRevision","constructor","client","sessionClient","getAccounts","getSavedAccounts","getActiveAccountId","find","account","active","id","getActiveLogin","profile","reference","syncActiveAccount","nextAccountId","activeAccountId","invalidate","profileRequest","undefined","sessionsRequest","nextRevision","revision","isCurrent","getProfileRequest","requestAccountId","request","refetchProfile","getProfileAsync","then","catch","cause","finally","getSessionsRequest","getSessions"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store-request-state.ts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,eAAe,GAAGD,SAAS;QAClC;MACF,CAAC,CAAC;MAEF,IAAI,CAACC,eAAe,GAAGM,OAAO;IAChC;IAEA,OAAO,IAAI,CAACN,eAAe;EAC7B,CAAC;AACH;AAEA,SAASvB,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const normalizeSession = session => {
|
|
4
|
+
const legacy = session;
|
|
5
|
+
return {
|
|
6
|
+
id: session.id,
|
|
7
|
+
authMethod: session.authMethod,
|
|
8
|
+
remoteAddress: session.remoteAddress ?? legacy.ip,
|
|
9
|
+
lastUpdated: session.lastUpdated ?? legacy.lastActiveAt ?? legacy.createdAt
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export { normalizeSession };
|
|
13
|
+
//# sourceMappingURL=session-store-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeSession","session","legacy","id","authMethod","remoteAddress","ip","lastUpdated","lastActiveAt","createdAt"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store-types.ts"],"mappings":";;AAsCA,MAAMA,gBAAgB,GAAIC,OAA0B,IAAwB;EAC1E,MAAMC,MAAM,GAAGD,OAId;EAED,OAAO;IACLE,EAAE,EAAEF,OAAO,CAACE,EAAE;IACdC,UAAU,EAAEH,OAAO,CAACG,UAAU;IAC9BC,aAAa,EAAEJ,OAAO,CAACI,aAAa,IAAIH,MAAM,CAACI,EAAE;IACjDC,WAAW,EAAEN,OAAO,CAACM,WAAW,IAAIL,MAAM,CAACM,YAAY,IAAIN,MAAM,CAACO;EACpE,CAAC;AACH,CAAC;AAED,SAAST,gBAAgB","ignoreList":[]}
|