@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
|
@@ -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,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AEb,MAAMC,cAAc,GAAG;QAAE,GAAGJ;MAAO,CAAC;MAEpC,OAAOI,cAAc,CAACZ,QAAQ;MAC9B,MAAMa,aAAa,GAAG;QACpB,GAAGD,cAAc;QACjB,IAAIF,WAAW,IAAI,CAAC,CAAC,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,s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,MAAMC,aAAa,GAAGP,WAAW,CAACE,IAAI,CAAEC,UAAU,IAChDA,UAAU,CAACC,IAAI,CAACC,QAAQ,CAAC,UAAU,CACrC,CAAC,EAAEC,OAAO;QAEV,IAAI,CAACL,UAAU,IAAI,CAACM,aAAa,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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","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,MAAM,KAAK;AAE1B,SAASC,qBAAqB,QAAQ,uD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,WAAW,GAAG9B,gBAAgB,CAAC6B,KAAK,EAAE;
|
|
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,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,GAAGhB,SAAS,CAAC,CAAC;EAE1B,MAAMiB,MAAM,GAAGhB,SAAS,CAA0B;IAChDiB,aAAa,EAAE;MACbC,KAAK,EAAE,EAAE;MACTP,IAAI,EAAEA,IAAI,IAAI,SAAS;MACvBQ,MAAM,EAAE;IACV,CAAC;IACDC,gBAAgB,EAAElB,GAAG,CAACmB,MAAM,CAAC;MAC3BH,KAAK,EAAEhB,GAAG,CAACoB,MAAM,CAAC,CAAC,CAChBC,IAAI,CAAC,CAAC,CACNC,SAAS,CAAC,CAAC,CACXN,KAAK,CAAC,4BAA4B,CAAC,CACnCO,OAAO,CACN,kDAAkD,EACl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out-google.js";
|
|
4
4
|
import { notifySessionChanged } from "./events.js";
|
|
5
5
|
const logoutRequests = new WeakMap();
|
|
6
|
+
const logoutInProgress = new WeakSet();
|
|
7
|
+
const isLogoutInProgress = client => logoutInProgress.has(client);
|
|
6
8
|
|
|
7
9
|
/** Uses one native/provider logout path for hooks and the built-in logout control. */
|
|
8
|
-
|
|
10
|
+
const logoutSession = client => {
|
|
9
11
|
const key = client;
|
|
10
12
|
const pending = logoutRequests.get(key);
|
|
11
13
|
if (pending) {
|
|
12
14
|
return pending;
|
|
13
15
|
}
|
|
16
|
+
logoutInProgress.add(key);
|
|
14
17
|
const request = (async () => {
|
|
15
18
|
try {
|
|
16
19
|
await client.logout();
|
|
@@ -20,8 +23,10 @@ export const logoutSession = client => {
|
|
|
20
23
|
})().finally(() => {
|
|
21
24
|
notifySessionChanged();
|
|
22
25
|
logoutRequests.delete(key);
|
|
26
|
+
logoutInProgress.delete(key);
|
|
23
27
|
});
|
|
24
28
|
logoutRequests.set(key, request);
|
|
25
29
|
return request;
|
|
26
30
|
};
|
|
31
|
+
export { isLogoutInProgress, logoutSession };
|
|
27
32
|
//# sourceMappingURL=logout-session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["signOutGoogleIfNeeded","notifySessionChanged","logoutRequests","WeakMap","
|
|
1
|
+
{"version":3,"names":["signOutGoogleIfNeeded","notifySessionChanged","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","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;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAA2B,IAAoB;EACpE,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,MAAM,CAAC,CAAC;IACvB,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,oBAAoB,CAAC,CAAC;IACtBC,cAAc,CAACe,MAAM,CAACP,GAAG,CAAC;IAC1BN,gBAAgB,CAACa,MAAM,CAACP,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACgB,GAAG,CAACR,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,126 @@
|
|
|
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
|
+
reason: store.snapshot.reason,
|
|
14
|
+
switching: store.snapshot.switching,
|
|
15
|
+
accounts: requestState.getAccounts(),
|
|
16
|
+
sessions: []
|
|
17
|
+
};
|
|
18
|
+
notify();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const revision = requestState.nextRevision();
|
|
22
|
+
const previousSnapshot = store.snapshot;
|
|
23
|
+
if (!store.snapshot.switching && store.snapshot.status !== "authenticated" && store.snapshot.status !== "offline") {
|
|
24
|
+
store.snapshot = {
|
|
25
|
+
...store.snapshot,
|
|
26
|
+
status: "loading",
|
|
27
|
+
error: undefined
|
|
28
|
+
};
|
|
29
|
+
notify();
|
|
30
|
+
}
|
|
31
|
+
const currentProfileRequest = requestState.getProfileRequest();
|
|
32
|
+
const currentSessionsRequest = includeSessions ? requestState.getSessionsRequest() : undefined;
|
|
33
|
+
const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
|
|
34
|
+
profile
|
|
35
|
+
}), error => ({
|
|
36
|
+
error
|
|
37
|
+
})), (currentSessionsRequest ?? Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
|
|
38
|
+
sessions
|
|
39
|
+
}), error => ({
|
|
40
|
+
error
|
|
41
|
+
}))]);
|
|
42
|
+
if (!requestState.isCurrent(revision)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
|
|
46
|
+
const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
|
|
47
|
+
const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
|
|
48
|
+
const accounts = requestState.getAccounts();
|
|
49
|
+
const nextSnapshot = !client.getActiveLogin() || getHttpStatus(error) === 401 ? {
|
|
50
|
+
status: "signed-out",
|
|
51
|
+
accounts,
|
|
52
|
+
sessions: [],
|
|
53
|
+
error: error === undefined ? undefined : toError(error)
|
|
54
|
+
} : "error" in profileResult ? {
|
|
55
|
+
status: "offline",
|
|
56
|
+
accounts,
|
|
57
|
+
profile,
|
|
58
|
+
sessions: sessions.map(normalizeSession),
|
|
59
|
+
error: toError(profileResult.error)
|
|
60
|
+
} : {
|
|
61
|
+
status: "authenticated",
|
|
62
|
+
accounts,
|
|
63
|
+
profile,
|
|
64
|
+
sessions: sessions.map(normalizeSession),
|
|
65
|
+
error: "error" in sessionsResult ? toError(sessionsResult.error) : undefined
|
|
66
|
+
};
|
|
67
|
+
store.snapshot = {
|
|
68
|
+
...nextSnapshot,
|
|
69
|
+
switching: previousSnapshot.switching
|
|
70
|
+
};
|
|
71
|
+
notify();
|
|
72
|
+
};
|
|
73
|
+
const refreshSessions = async () => {
|
|
74
|
+
const store = getStore();
|
|
75
|
+
requestState.syncActiveAccount();
|
|
76
|
+
if (!client.getActiveLogin()) {
|
|
77
|
+
store.snapshot = {
|
|
78
|
+
...store.snapshot,
|
|
79
|
+
accounts: requestState.getAccounts(),
|
|
80
|
+
sessions: []
|
|
81
|
+
};
|
|
82
|
+
notify();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const revision = requestState.revision;
|
|
86
|
+
try {
|
|
87
|
+
const sessions = await requestState.getSessionsRequest();
|
|
88
|
+
if (!requestState.isCurrent(revision)) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
store.snapshot = {
|
|
92
|
+
...store.snapshot,
|
|
93
|
+
accounts: requestState.getAccounts(),
|
|
94
|
+
sessions: sessions.map(normalizeSession),
|
|
95
|
+
error: undefined
|
|
96
|
+
};
|
|
97
|
+
notify();
|
|
98
|
+
} catch (cause) {
|
|
99
|
+
if (!requestState.isCurrent(revision)) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const error = toError(cause);
|
|
103
|
+
if (!client.getActiveLogin() || getHttpStatus(cause) === 401) {
|
|
104
|
+
store.snapshot = {
|
|
105
|
+
status: "signed-out",
|
|
106
|
+
accounts: requestState.getAccounts(),
|
|
107
|
+
sessions: [],
|
|
108
|
+
error
|
|
109
|
+
};
|
|
110
|
+
} else {
|
|
111
|
+
store.snapshot = {
|
|
112
|
+
...store.snapshot,
|
|
113
|
+
error
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
notify();
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
return {
|
|
121
|
+
refresh,
|
|
122
|
+
refreshSessions
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export { createSessionRefreshActions };
|
|
126
|
+
//# 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","reason","switching","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,cAAc,CAAC,CAAC,EAAE;MAC5BP,YAAY,CAACQ,YAAY,CAAC,CAAC;MAC3BH,KAAK,CAACI,QAAQ,GAAG;QACfC,MAAM,EAAE,YAAY;QACpBC,MAAM,EAAEN,KAAK,CAACI,QAAQ,CAACE,MAAM;QAC7BC,SAAS,EAAEP,KAAK,CAACI,QAAQ,CAACG,SAAS;QACnCC,QAAQ,EAAEb,YAAY,CAACc,WAAW,CAAC,CAAC;QACpCC,QAAQ,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B,MAAM,CAAC,CAAC;MACR,MAAMgB,KAAK;IACb;EACF,CAAC;EAED,OAAO;IAAEf,OAAO;IAAE+B;EAAgB,CAAC;AACrC,CAAC;AAED,SAASpC,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"],"mappings":";;AAOA,MAAMA,wBAAwB,CAAC;EAGrBC,mBAAmB,GAAG,KAAK;EAE3BC,gBAAgB,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C;IAEA,OAAO,IAAI,CAACN,eAAe;EAC7B,CAAC;AACH;AAEA,SAASvB,wBAAwB","ignoreList":[]}
|
|
@@ -1 +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":";;
|
|
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":";;AAwCA,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":[]}
|
|
@@ -1,27 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { addEventListener as addNetworkEventListener } from "@react-native-community/netinfo";
|
|
4
|
-
import { logoutSession } from "./logout-session.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { isLogoutInProgress, logoutSession } from "./logout-session.js";
|
|
5
|
+
import { createSessionRefreshActions } from "./session-store-refresh.js";
|
|
6
|
+
import { SessionStoreRequestState } from "./session-store-request-state.js";
|
|
7
7
|
const stores = new WeakMap();
|
|
8
8
|
const createSessionStore = client => {
|
|
9
9
|
const sessionClient = client;
|
|
10
10
|
const listeners = new Set();
|
|
11
|
+
const requestState = new SessionStoreRequestState(client, sessionClient);
|
|
11
12
|
let unsubscribeNetwork;
|
|
13
|
+
let unsubscribeClient;
|
|
12
14
|
let wasConnected;
|
|
13
|
-
let profileRequest;
|
|
14
|
-
let sessionsRequest;
|
|
15
15
|
let logoutRequest;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const storeRef = {};
|
|
17
|
+
const notify = () => listeners.forEach(listener => listener());
|
|
18
|
+
const onClientChange = () => {
|
|
19
|
+
if (isLogoutInProgress(client) || storeRef.current?.snapshot.switching) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
void Promise.resolve().then(() => {
|
|
23
|
+
const currentStore = storeRef.current;
|
|
24
|
+
if (!currentStore || isLogoutInProgress(client) || currentStore.snapshot.switching) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (client.getActiveLogin()) {
|
|
28
|
+
void currentStore.refresh(false);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (currentStore.snapshot.status !== "authenticated" && currentStore.snapshot.status !== "offline") {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
requestState.invalidate();
|
|
35
|
+
currentStore.snapshot = {
|
|
36
|
+
status: "signed-out",
|
|
37
|
+
reason: "session-ended",
|
|
38
|
+
accounts: requestState.getAccounts(),
|
|
39
|
+
sessions: []
|
|
40
|
+
};
|
|
41
|
+
notify();
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const refreshActions = createSessionRefreshActions(client, requestState, () => storeRef.current, notify);
|
|
18
45
|
const store = {
|
|
19
46
|
snapshot: {
|
|
20
47
|
status: "loading",
|
|
48
|
+
switching: false,
|
|
49
|
+
accounts: requestState.getAccounts(),
|
|
21
50
|
sessions: []
|
|
22
51
|
},
|
|
23
52
|
subscribe: listener => {
|
|
24
53
|
listeners.add(listener);
|
|
54
|
+
if (!unsubscribeClient) {
|
|
55
|
+
client.addEventListener?.("change", onClientChange);
|
|
56
|
+
unsubscribeClient = () => client.removeEventListener?.("change", onClientChange);
|
|
57
|
+
}
|
|
25
58
|
if (!unsubscribeNetwork) {
|
|
26
59
|
unsubscribeNetwork = addNetworkEventListener(state => {
|
|
27
60
|
const isConnected = state.isConnected === true && state.isInternetReachable !== false;
|
|
@@ -35,138 +68,33 @@ const createSessionStore = client => {
|
|
|
35
68
|
return () => {
|
|
36
69
|
listeners.delete(listener);
|
|
37
70
|
if (listeners.size === 0) {
|
|
71
|
+
unsubscribeClient?.();
|
|
72
|
+
unsubscribeClient = undefined;
|
|
38
73
|
unsubscribeNetwork?.();
|
|
39
74
|
unsubscribeNetwork = undefined;
|
|
40
75
|
wasConnected = undefined;
|
|
41
76
|
}
|
|
42
77
|
};
|
|
43
78
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
store.snapshot = {
|
|
48
|
-
status: "signed-out",
|
|
49
|
-
sessions: []
|
|
50
|
-
};
|
|
51
|
-
listeners.forEach(listener => listener());
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const revision = ++authRevision;
|
|
55
|
-
const previousSnapshot = store.snapshot;
|
|
56
|
-
if (store.snapshot.status !== "authenticated" && store.snapshot.status !== "offline") {
|
|
57
|
-
store.snapshot = {
|
|
58
|
-
...store.snapshot,
|
|
59
|
-
status: "loading",
|
|
60
|
-
error: undefined
|
|
61
|
-
};
|
|
62
|
-
listeners.forEach(listener => listener());
|
|
63
|
-
}
|
|
64
|
-
profileRequest ??= (profileNeedsRefresh ? client.refetchProfile() : client.getProfileAsync()).then(profile => {
|
|
65
|
-
profileNeedsRefresh = false;
|
|
66
|
-
return profile;
|
|
67
|
-
}).catch(cause => {
|
|
68
|
-
profileNeedsRefresh = true;
|
|
69
|
-
throw cause;
|
|
70
|
-
}).finally(() => {
|
|
71
|
-
profileRequest = undefined;
|
|
72
|
-
});
|
|
73
|
-
const currentProfileRequest = profileRequest;
|
|
74
|
-
if (includeSessions) {
|
|
75
|
-
sessionsRequest ??= sessionClient.getSessions().finally(() => {
|
|
76
|
-
sessionsRequest = undefined;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
const currentSessionsRequest = sessionsRequest;
|
|
80
|
-
const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
|
|
81
|
-
profile
|
|
82
|
-
}), error => ({
|
|
83
|
-
error
|
|
84
|
-
})), (includeSessions && currentSessionsRequest ? currentSessionsRequest : Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
|
|
85
|
-
sessions
|
|
86
|
-
}), error => ({
|
|
87
|
-
error
|
|
88
|
-
}))]);
|
|
89
|
-
if (revision !== authRevision) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
|
|
93
|
-
const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
|
|
94
|
-
const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
|
|
95
|
-
if (!client.getActiveLogin() || getHttpStatus(error) === 401) {
|
|
96
|
-
store.snapshot = {
|
|
97
|
-
status: "signed-out",
|
|
98
|
-
sessions: [],
|
|
99
|
-
error: error === undefined ? undefined : toError(error)
|
|
100
|
-
};
|
|
101
|
-
} else if ("error" in profileResult) {
|
|
102
|
-
store.snapshot = {
|
|
103
|
-
status: "offline",
|
|
104
|
-
profile,
|
|
105
|
-
sessions: sessions.map(normalizeSession),
|
|
106
|
-
error: toError(profileResult.error)
|
|
107
|
-
};
|
|
108
|
-
} else {
|
|
109
|
-
store.snapshot = {
|
|
110
|
-
status: "authenticated",
|
|
111
|
-
profile,
|
|
112
|
-
sessions: sessions.map(normalizeSession),
|
|
113
|
-
error: "error" in sessionsResult ? toError(sessionsResult.error) : undefined
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
listeners.forEach(listener => listener());
|
|
117
|
-
},
|
|
118
|
-
refreshSessions: async () => {
|
|
119
|
-
if (!client.getActiveLogin()) {
|
|
120
|
-
store.snapshot = {
|
|
121
|
-
...store.snapshot,
|
|
122
|
-
sessions: []
|
|
123
|
-
};
|
|
124
|
-
listeners.forEach(listener => listener());
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
sessionsRequest ??= sessionClient.getSessions().finally(() => {
|
|
128
|
-
sessionsRequest = undefined;
|
|
129
|
-
});
|
|
130
|
-
try {
|
|
131
|
-
const sessions = await sessionsRequest;
|
|
132
|
-
store.snapshot = {
|
|
133
|
-
...store.snapshot,
|
|
134
|
-
sessions: sessions.map(normalizeSession),
|
|
135
|
-
error: undefined
|
|
136
|
-
};
|
|
137
|
-
listeners.forEach(listener => listener());
|
|
138
|
-
} catch (cause) {
|
|
139
|
-
const error = toError(cause);
|
|
140
|
-
if (!client.getActiveLogin() || getHttpStatus(cause) === 401) {
|
|
141
|
-
store.snapshot = {
|
|
142
|
-
status: "signed-out",
|
|
143
|
-
sessions: [],
|
|
144
|
-
error
|
|
145
|
-
};
|
|
146
|
-
} else {
|
|
147
|
-
store.snapshot = {
|
|
148
|
-
...store.snapshot,
|
|
149
|
-
error
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
listeners.forEach(listener => listener());
|
|
153
|
-
throw error;
|
|
154
|
-
}
|
|
155
|
-
},
|
|
79
|
+
...refreshActions,
|
|
80
|
+
switchAccount: accountId => runAccountOperation(() => sessionClient.switchAccount(accountId)),
|
|
81
|
+
removeAccount: accountId => runAccountOperation(() => sessionClient.removeAccount(accountId)),
|
|
156
82
|
logout: async () => {
|
|
157
83
|
if (logoutRequest) {
|
|
158
84
|
return logoutRequest;
|
|
159
85
|
}
|
|
160
86
|
logoutRequest = (async () => {
|
|
161
|
-
|
|
87
|
+
requestState.invalidate();
|
|
162
88
|
try {
|
|
163
89
|
await logoutSession(sessionClient);
|
|
164
90
|
} finally {
|
|
91
|
+
requestState.invalidate();
|
|
165
92
|
store.snapshot = {
|
|
166
93
|
status: "signed-out",
|
|
94
|
+
accounts: requestState.getAccounts(),
|
|
167
95
|
sessions: []
|
|
168
96
|
};
|
|
169
|
-
|
|
97
|
+
notify();
|
|
170
98
|
logoutRequest = undefined;
|
|
171
99
|
}
|
|
172
100
|
})();
|
|
@@ -177,6 +105,27 @@ const createSessionStore = client => {
|
|
|
177
105
|
await store.refresh(true);
|
|
178
106
|
}
|
|
179
107
|
};
|
|
108
|
+
storeRef.current = store;
|
|
109
|
+
async function runAccountOperation(operation) {
|
|
110
|
+
const currentStore = storeRef.current;
|
|
111
|
+
requestState.invalidate();
|
|
112
|
+
currentStore.snapshot = {
|
|
113
|
+
...currentStore.snapshot,
|
|
114
|
+
switching: true,
|
|
115
|
+
accounts: requestState.getAccounts()
|
|
116
|
+
};
|
|
117
|
+
notify();
|
|
118
|
+
try {
|
|
119
|
+
await operation();
|
|
120
|
+
} finally {
|
|
121
|
+
await currentStore.refresh(true);
|
|
122
|
+
currentStore.snapshot = {
|
|
123
|
+
...currentStore.snapshot,
|
|
124
|
+
switching: false
|
|
125
|
+
};
|
|
126
|
+
notify();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
180
129
|
return store;
|
|
181
130
|
};
|
|
182
131
|
const getSessionStore = client => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addEventListener","addNetworkEventListener","
|
|
1
|
+
{"version":3,"names":["addEventListener","addNetworkEventListener","isLogoutInProgress","logoutSession","createSessionRefreshActions","SessionStoreRequestState","stores","WeakMap","createSessionStore","client","sessionClient","listeners","Set","requestState","unsubscribeNetwork","unsubscribeClient","wasConnected","logoutRequest","storeRef","notify","forEach","listener","onClientChange","current","snapshot","switching","Promise","resolve","then","currentStore","getActiveLogin","refresh","status","invalidate","reason","accounts","getAccounts","sessions","refreshActions","store","subscribe","add","removeEventListener","state","isConnected","isInternetReachable","shouldRefresh","delete","size","undefined","switchAccount","accountId","runAccountOperation","removeAccount","logout","revokeSessions","option","operation","getSessionStore","key","existing","get","next","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store.ts"],"mappings":";;AAAA,SAASA,gBAAgB,IAAIC,uBAA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3B;EACF,CAAC;EAEDb,QAAQ,CAACK,OAAO,GAAGgB,KAAK;EAExB,eAAea,mBAAmBA,CAACK,SAA8B,EAAE;IACjE,MAAM5B,YAAY,GAAGX,QAAQ,CAACK,OAAuB;IAErDV,YAAY,CAACoB,UAAU,CAAC,CAAC;IACzBJ,YAAY,CAACL,QAAQ,GAAG;MACtB,GAAGK,YAAY,CAACL,QAAQ;MACxBC,SAAS,EAAE,IAAI;MACfU,QAAQ,EAAEtB,YAAY,CAACuB,WAAW,CAAC;IACrC,CAAC;IACDjB,MAAM,CAAC,CAAC;IAER,IAAI;MACF,MAAMsC,SAAS,CAAC,CAAC;IACnB,CAAC,SAAS;MACR,MAAM5B,YAAY,CAACE,OAAO,CAAC,IAAI,CAAC;MAChCF,YAAY,CAACL,QAAQ,GAAG;QAAE,GAAGK,YAAY,CAACL,QAAQ;QAAEC,SAAS,EAAE;MAAM,CAAC;MACtEN,MAAM,CAAC,CAAC;IACV;EACF;EAEA,OAAOoB,KAAK;AACd,CAAC;AAED,MAAMmB,eAAe,GAAIjD,MAAc,IAAmB;EACxD,MAAMkD,GAAG,GAAGlD,MAAgB;EAC5B,MAAMmD,QAAQ,GAAGtD,MAAM,CAACuD,GAAG,CAACF,GAAG,CAAC;EAEhC,IAAIC,QAAQ,EAAE;IACZ,OAAOA,QAAQ;EACjB;EAEA,MAAME,IAAI,GAAGtD,kBAAkB,CAACC,MAAM,CAAC;EAEvCH,MAAM,CAACyD,GAAG,CAACJ,GAAG,EAAEG,IAAI,CAAC;EAErB,OAAOA,IAAI;AACb,CAAC;AAED,SAASJ,eAAe","ignoreList":[]}
|
|
@@ -38,7 +38,7 @@ const isNetworkError = (error, message) => {
|
|
|
38
38
|
return error instanceof TypeError || typeof errorMessage === "string" && /network request failed|network error|failed to fetch|fetch failed|unknownhostexception|no route to host|network is unreachable|unable to resolve host|could not resolve host|name resolution/i.test(errorMessage);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/** Converts transport/server failures to safe, translatable
|
|
41
|
+
/** Converts auth transport/server failures to safe, translatable error keys. */
|
|
42
42
|
const parseSignInError = (error, options = {}) => {
|
|
43
43
|
const root = asRecord(error);
|
|
44
44
|
const originalMessage = error instanceof Error ? error.message : root?.message;
|
|
@@ -49,7 +49,9 @@ const parseSignInError = (error, options = {}) => {
|
|
|
49
49
|
const code = stringValue(body?.code, nestedError?.code, root?.code);
|
|
50
50
|
const requestId = stringValue(body?.requestId, root?.requestId);
|
|
51
51
|
const fieldErrors = Array.isArray(body?.errors) ? body.errors : Array.isArray(nestedError?.errors) ? nestedError.errors : [];
|
|
52
|
-
const
|
|
52
|
+
const genericErrorKey = options.errorScope ? `${options.errorScope}.errors.generic` : "sign-in.errors.generic";
|
|
53
|
+
const networkErrorKey = options.errorScope ? `${options.errorScope}.errors.network` : "sign-in.errors.network";
|
|
54
|
+
const message = messageKeyForStatus(status, options.isMfaVerification === true, options.isSignIn !== false) ?? (isNetworkError(error, originalMessage) ? networkErrorKey : genericErrorKey);
|
|
53
55
|
const signInError = new Error(message);
|
|
54
56
|
if (status !== undefined) {
|
|
55
57
|
signInError.status = status;
|