@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.
Files changed (570) hide show
  1. package/README.md +5 -5
  2. package/lib/commonjs/modules/auth/default-translation.js +22 -0
  3. package/lib/commonjs/modules/auth/default-translation.js.map +1 -1
  4. package/lib/commonjs/modules/auth/hooks/use-session.js +3 -0
  5. package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
  6. package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +3 -6
  7. package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js.map +1 -1
  8. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +1 -0
  9. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  10. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +4 -3
  11. package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  12. package/lib/commonjs/modules/auth/session/logout-session.js +5 -2
  13. package/lib/commonjs/modules/auth/session/logout-session.js.map +1 -1
  14. package/lib/commonjs/modules/auth/session/session-store-refresh.js +125 -0
  15. package/lib/commonjs/modules/auth/session/session-store-refresh.js.map +1 -0
  16. package/lib/commonjs/modules/auth/session/session-store-request-state.js +73 -0
  17. package/lib/commonjs/modules/auth/session/session-store-request-state.js.map +1 -0
  18. package/lib/commonjs/modules/auth/session/session-store-types.js +17 -0
  19. package/lib/commonjs/modules/auth/session/session-store-types.js.map +1 -0
  20. package/lib/commonjs/modules/auth/session/session-store.js +56 -123
  21. package/lib/commonjs/modules/auth/session/session-store.js.map +1 -1
  22. package/lib/commonjs/modules/auth/utils/sign-in-error.js +10 -4
  23. package/lib/commonjs/modules/auth/utils/sign-in-error.js.map +1 -1
  24. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
  25. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  26. package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js +36 -1
  27. package/lib/commonjs/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
  28. package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js +25 -0
  29. package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
  30. package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js +6 -0
  31. package/lib/commonjs/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
  32. package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js +22 -36
  33. package/lib/commonjs/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
  34. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
  35. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  36. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  37. package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  38. package/lib/commonjs/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
  39. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +74 -34
  40. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  41. package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +19 -16
  42. package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
  43. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
  44. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  45. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  46. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  47. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +219 -16
  48. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  49. package/lib/commonjs/modules/data-sync/utils/health-record-timing.js +52 -0
  50. package/lib/commonjs/modules/data-sync/utils/health-record-timing.js.map +1 -0
  51. package/lib/commonjs/modules/data-sync/utils/health-units.js +1 -0
  52. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
  53. package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  54. package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js +74 -0
  55. package/lib/commonjs/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
  56. package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js +41 -0
  57. package/lib/commonjs/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
  58. package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js +56 -15
  59. package/lib/commonjs/modules/picker-sheet/components/wheel-picker.js.map +1 -1
  60. package/lib/commonjs/modules/picker-sheet/index.js +11 -0
  61. package/lib/commonjs/modules/picker-sheet/index.js.map +1 -1
  62. package/lib/commonjs/modules/questionnaire-response-form/README.md +59 -20
  63. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
  64. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
  65. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
  66. package/lib/commonjs/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
  67. package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
  68. package/lib/commonjs/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
  69. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
  70. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
  71. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
  72. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
  73. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +41 -2
  74. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
  75. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +43 -5
  76. package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
  77. package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
  78. package/lib/commonjs/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
  79. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
  80. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  81. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
  82. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
  83. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
  84. package/lib/commonjs/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  85. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
  86. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
  87. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
  88. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
  89. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
  90. package/lib/commonjs/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
  91. package/lib/commonjs/modules/questionnaire-response-form/index.js +20 -0
  92. package/lib/commonjs/modules/questionnaire-response-form/index.js.map +1 -1
  93. package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-form-values.js +4 -0
  94. package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +6 -0
  95. package/lib/commonjs/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
  96. package/lib/commonjs/modules/questionnaire-response-form/types/response-values.js +4 -0
  97. package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
  98. package/lib/commonjs/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
  99. package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +148 -0
  100. package/lib/commonjs/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
  101. package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js +127 -0
  102. package/lib/commonjs/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
  103. package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
  104. package/lib/commonjs/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
  105. package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js +71 -64
  106. package/lib/commonjs/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
  107. package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js +23 -5
  108. package/lib/commonjs/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
  109. package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +10 -0
  110. package/lib/commonjs/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
  111. package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +83 -0
  112. package/lib/commonjs/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
  113. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +54 -0
  114. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
  115. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +75 -0
  116. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
  117. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +63 -0
  118. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
  119. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
  120. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
  121. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +117 -0
  122. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
  123. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +109 -0
  124. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
  125. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
  126. package/lib/commonjs/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
  127. package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js +36 -0
  128. package/lib/commonjs/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
  129. package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +49 -0
  130. package/lib/commonjs/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
  131. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +31 -15
  132. package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
  133. package/lib/commonjs/modules/ui/components/prerequisite-gate.js +73 -0
  134. package/lib/commonjs/modules/ui/components/prerequisite-gate.js.map +1 -0
  135. package/lib/commonjs/modules/ui/default-translation.js +50 -0
  136. package/lib/commonjs/modules/ui/default-translation.js.map +1 -0
  137. package/lib/commonjs/modules/ui/index.js +11 -0
  138. package/lib/commonjs/modules/ui/index.js.map +1 -1
  139. package/lib/commonjs/polyfills/index.js +9 -7
  140. package/lib/commonjs/polyfills/index.js.map +1 -1
  141. package/lib/module/modules/auth/default-translation.js +22 -0
  142. package/lib/module/modules/auth/default-translation.js.map +1 -1
  143. package/lib/module/modules/auth/hooks/use-session.js +3 -0
  144. package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
  145. package/lib/module/modules/auth/profile/components/profile-form-provider.js +3 -6
  146. package/lib/module/modules/auth/profile/components/profile-form-provider.js.map +1 -1
  147. package/lib/module/modules/auth/register/components/form/register-form-provider.js +1 -0
  148. package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  149. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +3 -3
  150. package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
  151. package/lib/module/modules/auth/session/logout-session.js +5 -2
  152. package/lib/module/modules/auth/session/logout-session.js.map +1 -1
  153. package/lib/module/modules/auth/session/session-store-refresh.js +121 -0
  154. package/lib/module/modules/auth/session/session-store-refresh.js.map +1 -0
  155. package/lib/module/modules/auth/session/session-store-request-state.js +69 -0
  156. package/lib/module/modules/auth/session/session-store-request-state.js.map +1 -0
  157. package/lib/module/modules/auth/session/session-store-types.js +13 -0
  158. package/lib/module/modules/auth/session/session-store-types.js.map +1 -0
  159. package/lib/module/modules/auth/session/session-store.js +56 -123
  160. package/lib/module/modules/auth/session/session-store.js.map +1 -1
  161. package/lib/module/modules/auth/utils/sign-in-error.js +9 -4
  162. package/lib/module/modules/auth/utils/sign-in-error.js.map +1 -1
  163. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +5 -0
  164. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  165. package/lib/module/modules/bt-management/hooks/declined-device-storage.js +33 -1
  166. package/lib/module/modules/bt-management/hooks/declined-device-storage.js.map +1 -1
  167. package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js +20 -0
  168. package/lib/module/modules/bt-management/hooks/nearby-device-offer-state.js.map +1 -0
  169. package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js +4 -0
  170. package/lib/module/modules/bt-management/hooks/nearby-device-offer-types.js.map +1 -0
  171. package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js +21 -35
  172. package/lib/module/modules/bt-management/hooks/use-nearby-device-offer.js.map +1 -1
  173. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +11 -0
  174. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  175. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  176. package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  177. package/lib/module/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
  178. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +74 -34
  179. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  180. package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +19 -16
  181. package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
  182. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +17 -4
  183. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  184. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  185. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  186. package/lib/module/modules/data-sync/utils/health-data-catalog.js +219 -16
  187. package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  188. package/lib/module/modules/data-sync/utils/health-record-timing.js +47 -0
  189. package/lib/module/modules/data-sync/utils/health-record-timing.js.map +1 -0
  190. package/lib/module/modules/data-sync/utils/health-units.js +1 -0
  191. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
  192. package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  193. package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js +69 -0
  194. package/lib/module/modules/data-sync/utils/normalize-core-health-observation.js.map +1 -0
  195. package/lib/module/modules/picker-sheet/components/value-wheel-picker.js +36 -0
  196. package/lib/module/modules/picker-sheet/components/value-wheel-picker.js.map +1 -0
  197. package/lib/module/modules/picker-sheet/components/wheel-picker.js +56 -15
  198. package/lib/module/modules/picker-sheet/components/wheel-picker.js.map +1 -1
  199. package/lib/module/modules/picker-sheet/index.js +1 -0
  200. package/lib/module/modules/picker-sheet/index.js.map +1 -1
  201. package/lib/module/modules/questionnaire-response-form/README.md +59 -20
  202. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js +8 -0
  203. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-item.js.map +1 -1
  204. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js +8 -0
  205. package/lib/module/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.js.map +1 -1
  206. package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js +8 -3
  207. package/lib/module/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.js.map +1 -1
  208. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js +9 -3
  209. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.js.map +1 -1
  210. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +18 -8
  211. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
  212. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js +42 -3
  213. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.js.map +1 -1
  214. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js +41 -3
  215. package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-text-field.js.map +1 -1
  216. package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js +3 -1
  217. package/lib/module/modules/questionnaire-response-form/components/header/questionnaire-header-title.js.map +1 -1
  218. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js +37 -11
  219. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form-provider.js.map +1 -1
  220. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js +1 -0
  221. package/lib/module/modules/questionnaire-response-form/components/questionnaire-form.js.map +1 -1
  222. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js +9 -3
  223. package/lib/module/modules/questionnaire-response-form/components/questionnaire-navigation-provider.js.map +1 -1
  224. package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js +5 -3
  225. package/lib/module/modules/questionnaire-response-form/hooks/use-initial-selected-values.js.map +1 -1
  226. package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js +15 -4
  227. package/lib/module/modules/questionnaire-response-form/hooks/use-navigation-handlers.js.map +1 -1
  228. package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js +14 -7
  229. package/lib/module/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.js.map +1 -1
  230. package/lib/module/modules/questionnaire-response-form/index.js +2 -0
  231. package/lib/module/modules/questionnaire-response-form/index.js.map +1 -1
  232. package/lib/module/modules/questionnaire-response-form/types/questionnaire-form-values.js +2 -0
  233. package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js +4 -0
  234. package/lib/module/modules/questionnaire-response-form/types/questionnaire-item-render-props.js.map +1 -0
  235. package/lib/module/modules/questionnaire-response-form/types/response-values.js +2 -0
  236. package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js +37 -6
  237. package/lib/module/modules/questionnaire-response-form/utils/condition-utils.js.map +1 -1
  238. package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js +140 -0
  239. package/lib/module/modules/questionnaire-response-form/utils/conditions/fhir-condition.js.map +1 -0
  240. package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js +122 -0
  241. package/lib/module/modules/questionnaire-response-form/utils/create-answer-from-value.js.map +1 -0
  242. package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js +4 -3
  243. package/lib/module/modules/questionnaire-response-form/utils/fields/get-option-text.js.map +1 -1
  244. package/lib/module/modules/questionnaire-response-form/utils/form-utils.js +71 -64
  245. package/lib/module/modules/questionnaire-response-form/utils/form-utils.js.map +1 -1
  246. package/lib/module/modules/questionnaire-response-form/utils/form-validation.js +23 -5
  247. package/lib/module/modules/questionnaire-response-form/utils/form-validation.js.map +1 -1
  248. package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js +5 -0
  249. package/lib/module/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.js.map +1 -0
  250. package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js +77 -0
  251. package/lib/module/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.js.map +1 -0
  252. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js +49 -0
  253. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-date-utils.js.map +1 -0
  254. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js +71 -0
  255. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-constraints.js.map +1 -0
  256. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js +57 -0
  257. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.js.map +1 -0
  258. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js +49 -18
  259. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.js.map +1 -1
  260. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js +112 -0
  261. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-picker-options.js.map +1 -0
  262. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js +105 -0
  263. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.js.map +1 -0
  264. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js +2 -2
  265. package/lib/module/modules/questionnaire-response-form/utils/questionnaire-submit-utils.js.map +1 -1
  266. package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js +31 -0
  267. package/lib/module/modules/questionnaire-response-form/utils/translate-fhir-text.js.map +1 -0
  268. package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js +44 -0
  269. package/lib/module/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.js.map +1 -0
  270. package/lib/module/modules/ui/components/bluetooth-state-notice.js +31 -15
  271. package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
  272. package/lib/module/modules/ui/components/prerequisite-gate.js +67 -0
  273. package/lib/module/modules/ui/components/prerequisite-gate.js.map +1 -0
  274. package/lib/module/modules/ui/default-translation.js +45 -0
  275. package/lib/module/modules/ui/default-translation.js.map +1 -0
  276. package/lib/module/modules/ui/index.js +1 -0
  277. package/lib/module/modules/ui/index.js.map +1 -1
  278. package/lib/module/polyfills/index.js +11 -1
  279. package/lib/module/polyfills/index.js.map +1 -1
  280. package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +22 -0
  281. package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +4 -1
  283. package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/auth/session/logout-session.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts +8 -0
  289. package/lib/typescript/commonjs/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts +23 -0
  291. package/lib/typescript/commonjs/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts +33 -0
  293. package/lib/typescript/commonjs/src/modules/auth/session/session-store-types.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts +1 -18
  295. package/lib/typescript/commonjs/src/modules/auth/session/session-store.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts +4 -2
  297. package/lib/typescript/commonjs/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
  300. package/lib/typescript/commonjs/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
  302. package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
  304. package/lib/typescript/commonjs/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
  306. package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +7 -0
  309. package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
  312. package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
  314. package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
  316. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
  318. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
  320. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +3 -2
  322. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
  326. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
  328. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
  330. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
  332. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
  335. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
  337. package/lib/typescript/commonjs/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
  339. package/lib/typescript/commonjs/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
  341. package/lib/typescript/commonjs/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts +1 -0
  343. package/lib/typescript/commonjs/src/modules/picker-sheet/index.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
  349. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
  351. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
  353. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +1 -1
  356. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-form.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-initial-selected-values.d.ts.map +1 -1
  360. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
  361. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts +2 -1
  363. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts +4 -1
  365. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
  367. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -0
  369. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts +3 -1
  371. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
  373. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
  375. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
  377. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -0
  379. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/response-values.d.ts +2 -1
  381. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
  383. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
  384. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
  386. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
  388. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
  390. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
  392. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
  394. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
  396. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
  398. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
  400. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
  402. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
  404. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
  406. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
  408. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
  410. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
  412. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
  414. package/lib/typescript/commonjs/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
  416. package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
  418. package/lib/typescript/commonjs/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
  419. package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts +30 -0
  420. package/lib/typescript/commonjs/src/modules/ui/default-translation.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
  422. package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/polyfills/index.d.ts +7 -1
  424. package/lib/typescript/commonjs/src/polyfills/index.d.ts.map +1 -1
  425. package/lib/typescript/module/src/modules/auth/default-translation.d.ts +22 -0
  426. package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -1
  427. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +4 -1
  428. package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
  429. package/lib/typescript/module/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
  430. package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  431. package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
  432. package/lib/typescript/module/src/modules/auth/session/logout-session.d.ts.map +1 -1
  433. package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts +8 -0
  434. package/lib/typescript/module/src/modules/auth/session/session-store-refresh.d.ts.map +1 -0
  435. package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts +23 -0
  436. package/lib/typescript/module/src/modules/auth/session/session-store-request-state.d.ts.map +1 -0
  437. package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts +33 -0
  438. package/lib/typescript/module/src/modules/auth/session/session-store-types.d.ts.map +1 -0
  439. package/lib/typescript/module/src/modules/auth/session/session-store.d.ts +1 -18
  440. package/lib/typescript/module/src/modules/auth/session/session-store.d.ts.map +1 -1
  441. package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts +4 -2
  442. package/lib/typescript/module/src/modules/auth/utils/sign-in-error.d.ts.map +1 -1
  443. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  444. package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts +10 -1
  445. package/lib/typescript/module/src/modules/bt-management/hooks/declined-device-storage.d.ts.map +1 -1
  446. package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts +6 -0
  447. package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-state.d.ts.map +1 -0
  448. package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts +15 -0
  449. package/lib/typescript/module/src/modules/bt-management/hooks/nearby-device-offer-types.d.ts.map +1 -0
  450. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts +6 -14
  451. package/lib/typescript/module/src/modules/bt-management/hooks/use-nearby-device-offer.d.ts.map +1 -1
  452. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  453. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +7 -0
  454. package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
  455. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  456. package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts +2 -3
  457. package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  458. package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts +4 -5
  459. package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
  460. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +4 -2
  461. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  462. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +7 -1
  463. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  464. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -1
  465. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  466. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +3 -2
  467. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  468. package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
  469. package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  470. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -4
  471. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  472. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts +2 -2
  473. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  474. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts +5 -1
  475. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  476. package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts +10 -0
  477. package/lib/typescript/module/src/modules/data-sync/utils/health-record-timing.d.ts.map +1 -0
  478. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  479. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +6 -5
  480. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  481. package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts +13 -0
  482. package/lib/typescript/module/src/modules/data-sync/utils/normalize-core-health-observation.d.ts.map +1 -0
  483. package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts +21 -0
  484. package/lib/typescript/module/src/modules/picker-sheet/components/value-wheel-picker.d.ts.map +1 -0
  485. package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts +7 -3
  486. package/lib/typescript/module/src/modules/picker-sheet/components/wheel-picker.d.ts.map +1 -1
  487. package/lib/typescript/module/src/modules/picker-sheet/index.d.ts +1 -0
  488. package/lib/typescript/module/src/modules/picker-sheet/index.d.ts.map +1 -1
  489. package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-item.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.d.ts.map +1 -1
  491. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/common/questionnaire-field-wrapper.d.ts.map +1 -1
  492. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-choice-field.d.ts.map +1 -1
  493. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts +3 -1
  494. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-date-field.d.ts.map +1 -1
  495. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts +9 -3
  496. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-item-renderer.d.ts.map +1 -1
  497. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts +5 -1
  498. package/lib/typescript/module/src/modules/questionnaire-response-form/components/fields/questionnaire-text-field.d.ts.map +1 -1
  499. package/lib/typescript/module/src/modules/questionnaire-response-form/components/header/questionnaire-header-title.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts +1 -1
  501. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form-provider.d.ts.map +1 -1
  502. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-form.d.ts.map +1 -1
  503. package/lib/typescript/module/src/modules/questionnaire-response-form/components/questionnaire-navigation-provider.d.ts.map +1 -1
  504. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-initial-selected-values.d.ts.map +1 -1
  505. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts +6 -1
  506. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-navigation-handlers.d.ts.map +1 -1
  507. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts +2 -1
  508. package/lib/typescript/module/src/modules/questionnaire-response-form/hooks/use-questionnaire-navigation-state.d.ts.map +1 -1
  509. package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts +4 -1
  510. package/lib/typescript/module/src/modules/questionnaire-response-form/index.d.ts.map +1 -1
  511. package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts +7 -1
  512. package/lib/typescript/module/src/modules/questionnaire-response-form/types/extended-questionnaire-item.d.ts.map +1 -1
  513. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts +6 -0
  514. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-context-type.d.ts.map +1 -1
  515. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts +3 -1
  516. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-props.d.ts.map +1 -1
  517. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts +11 -0
  518. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-provider-props.d.ts.map +1 -1
  519. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts +5 -2
  520. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-form-values.d.ts.map +1 -1
  521. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts +15 -0
  522. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-item-render-props.d.ts.map +1 -0
  523. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts +5 -0
  524. package/lib/typescript/module/src/modules/questionnaire-response-form/types/questionnaire-navigation-provider-props.d.ts.map +1 -1
  525. package/lib/typescript/module/src/modules/questionnaire-response-form/types/response-values.d.ts +2 -1
  526. package/lib/typescript/module/src/modules/questionnaire-response-form/types/response-values.d.ts.map +1 -1
  527. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/condition-utils.d.ts.map +1 -1
  528. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts +9 -0
  529. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/conditions/fhir-condition.d.ts.map +1 -0
  530. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts +7 -0
  531. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/create-answer-from-value.d.ts.map +1 -0
  532. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts +1 -1
  533. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/fields/get-option-text.d.ts.map +1 -1
  534. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts +4 -1
  535. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-utils.d.ts.map +1 -1
  536. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts +4 -1
  537. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/form-validation.d.ts.map +1 -1
  538. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts +3 -0
  539. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-answerable-questionnaire-item.d.ts.map +1 -0
  540. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts +8 -0
  541. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/is-valid-questionnaire-answer.d.ts.map +1 -0
  542. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts +5 -0
  543. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-date-utils.d.ts.map +1 -0
  544. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts +22 -0
  545. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-constraints.d.ts.map +1 -0
  546. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts +10 -0
  547. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-item-value-constraint-validators.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts +2 -1
  549. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-navigation-utils.d.ts.map +1 -1
  550. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts +15 -0
  551. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-picker-options.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts +5 -0
  553. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-string-constraint-validator.d.ts.map +1 -0
  554. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts +3 -1
  555. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/questionnaire-submit-utils.d.ts.map +1 -1
  556. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts +4 -0
  557. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/translate-fhir-text.d.ts.map +1 -0
  558. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts +6 -0
  559. package/lib/typescript/module/src/modules/questionnaire-response-form/utils/validate-questionnaire-item-value.d.ts.map +1 -0
  560. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +8 -5
  561. package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
  562. package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts +19 -0
  563. package/lib/typescript/module/src/modules/ui/components/prerequisite-gate.d.ts.map +1 -0
  564. package/lib/typescript/module/src/modules/ui/default-translation.d.ts +30 -0
  565. package/lib/typescript/module/src/modules/ui/default-translation.d.ts.map +1 -0
  566. package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
  567. package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
  568. package/lib/typescript/module/src/polyfills/index.d.ts +7 -1
  569. package/lib/typescript/module/src/polyfills/index.d.ts.map +1 -1
  570. package/package.json +5 -8
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Ovok Mobile SDK
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/@ovok%2Fnative.svg)](https://badge.fury.io/js/@ovok%2Fnative)
4
- [![Documentation](https://img.shields.io/badge/docs-sdk.ovok.com-blue)](https://sdk.ovok.com/)
4
+ [![Documentation](https://img.shields.io/badge/docs-docs.ovok.com-blue)](https://docs.ovok.com/native-sdk)
5
5
 
6
6
  A React Native SDK for integrating Ovok Core healthcare services into native Expo and
7
7
  React Native applications. It combines app-facing healthcare UI with Bluetooth device
@@ -29,19 +29,19 @@ yarn add @ovok/native @ovok/core
29
29
  ```
30
30
 
31
31
  The SDK uses native modules. Expo Go is not sufficient; add the required config plugins,
32
- build a development client, and follow the [installation and native setup guide](https://sdk.ovok.com/docs/guide/installation).
32
+ build a development client, and follow the [installation and native setup guide](https://docs.ovok.com/native-sdk/getting-started).
33
33
  Install `@ovok/core` alongside the native package. The root `@ovok/native` import
34
34
  exposes the shared UI, authentication, theme, and Bluetooth-management surface.
35
35
  Optional native integrations such as health import, PDF viewing, background services,
36
36
  and themeable UI flows are available through documented subpaths. Install the peer
37
- packages listed in the [installation matrix](https://sdk.ovok.com/docs/guide/installation#install-the-package)
38
- for the entry points you use. Apps integrating one feature or device can use a
37
+ peer packages documented in the [getting started guide](https://docs.ovok.com/native-sdk/getting-started)
38
+ for the entry points they use. Apps integrating one feature or device can use a
39
39
  subpath export and install only that import graph. Use `npx expo install` for Expo
40
40
  native dependencies so their versions match the app's Expo SDK.
41
41
 
42
42
  ## 📚 Documentation
43
43
 
44
- Read the complete [SDK guide](https://sdk.ovok.com/docs/guide/overview) for:
44
+ Read the complete [SDK guide](https://docs.ovok.com/native-sdk) for:
45
45
 
46
46
  - installation and provider setup;
47
47
  - authentication and app-shell composition;
@@ -15,8 +15,21 @@ const defaultTranslation = exports.defaultTranslation = {
15
15
  cancel: "Cancel",
16
16
  delete: "Delete"
17
17
  },
18
+ "questionnaire-form": {
19
+ item: {
20
+ unsupported: "This question type ({{type}}) is not supported. You can continue without answering it."
21
+ },
22
+ picker: {
23
+ increase: "Increase value",
24
+ decrease: "Decrease value"
25
+ }
26
+ },
18
27
  profile: {
19
28
  form: {
29
+ error: {
30
+ network: "Check your internet connection and try again.",
31
+ generic: "Something went wrong. Please try again."
32
+ },
20
33
  phone: {
21
34
  country: "Country",
22
35
  invalid: "Enter a valid phone number for the selected country.",
@@ -28,6 +41,10 @@ const defaultTranslation = exports.defaultTranslation = {
28
41
  register: {
29
42
  "already-have-account": "Already have an account? <login/>",
30
43
  button: "Create account",
44
+ errors: {
45
+ network: "Unable to connect. Check your connection and try again.",
46
+ generic: "Unable to create account. Please try again."
47
+ },
31
48
  name: "First name",
32
49
  "full-name": "Full name",
33
50
  "or-register-with": "Or register with",
@@ -39,9 +56,14 @@ const defaultTranslation = exports.defaultTranslation = {
39
56
  "reset-password": {
40
57
  accountType: "Account type",
41
58
  email: "Email",
59
+ errors: {
60
+ network: "Unable to connect. Check your connection and try again.",
61
+ generic: "Unable to request a password reset. Please try again."
62
+ },
42
63
  patient: "Patient",
43
64
  practitioner: "Practitioner",
44
65
  "reset-password": "Reset password",
66
+ success: "If an account exists, a password reset link has been sent.",
45
67
  subtitle: "Request a password reset link",
46
68
  title: "Reset password"
47
69
  },
@@ -1 +1 @@
1
- {"version":3,"names":["_i18next","_interopRequireDefault","require","e","__esModule","default","defaultTranslation","exports","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","errors","unavailable","network","generic","i18n","addResourceBundle","resources","options","englishResources","Object","assign","en","existingTranslation","translation"],"sourceRoot":"../../../../src","sources":["modules/auth/default-translation.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3B;AACO,MAAMG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG;EAChCE,IAAI,EAAE;IAAE,YAAY,EAAE;EA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AAE,UAAU;IACpBC,MAAM,EAAE;MACN,qBAAqB,EAAE,qCAAqC;MAC5DC,WAAW,EAAE,4DAA4D;MACzEC,OAAO,EAAE,yDAAyD;MAClEC,OAAO,EAAE;IACX,CAAC;IACDnB,QAAQ,EAAE,qBAAqB;IAC/BE,KAAK,EAAE;EACT;AACF,CAAC;AAED,IAAI,OAAOkB,gBAAI,CAACC,iBAAiB,KAAK,UAAU,EAAE;EAChDD,gBAAI,CAACC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAErC,kBAAkB,EAAE,IAAI,EAAE,KAAK,CAAC;AAC9E,CAAC,MAAM;EACL,MAAMsC,SAAS,GAAGF,gBAAI,CAACG,OAAO,CAACD,SAAS,IAAI,CAAC,CAAC;EAE9C,MAAME,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEJ,SAAS,CAACK,EAAE,CAGtD;EAED,MAAMC,mBAAmB,GAAGH,MAAM,CAACC,MAAM,CACvC,CAAC,CAAC,EACFF,gBAAgB,CAACK,WACnB,CAA4B;EAE5BT,gBAAI,CAACG,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,EAAE1C,kBAAkB,EAAE4C,mBAAmB;IACxE,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["_i18next","_interopRequireDefault","require","e","__esModule","default","defaultTranslation","exports","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","i18n","addResourceBundle","resources","options","englishResources","Object","assign","en","existingTranslation","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CAAC,CAAC,CAAC,EAAEJ,SAAS,CAACK,EAAE,CAGtD;EAED,MAAMC,mBAAmB,GAAGH,MAAM,CAACC,MAAM,CACvC,CAAC,CAAC,EACFF,gBAAgB,CAACK,WACnB,CAA4B;EAE5BT,gBAAI,CAACG,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,EAAEjD,kBAAkB,EAAEmD,mBAAmB;IACxE,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -35,12 +35,15 @@ const useSession = ({
35
35
  return {
36
36
  status: snapshot.status,
37
37
  isAuthenticated: snapshot.status === "authenticated" || snapshot.status === "offline",
38
+ accounts: snapshot.accounts,
38
39
  profile: snapshot.profile,
39
40
  sessions: snapshot.sessions,
40
41
  loading: snapshot.status === "loading",
41
42
  error: snapshot.error,
42
43
  refresh,
43
44
  refreshSessions: store.refreshSessions,
45
+ switchAccount: store.switchAccount,
46
+ removeAccount: store.removeAccount,
44
47
  logout: store.logout,
45
48
  revokeSessions: store.revokeSessions
46
49
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","React","_interopRequireWildcard","_reactNative","_events","_sessionStore","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useSession","sessions","fetchSessions","refreshOnForeground","client","useClient","store","useMemo","getSessionStore","snapshot","useSyncExternalStore","subscribe","refresh","useCallback","useEffect","subscription","AppState","addEventListener","nextState","undefined","unsubscribe","subscribeSessionChanges","remove","status","isAuthenticated","profile","loading","error","refreshSessions","logout","revokeSessions","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-session.ts"],"mappings":";;;;;;AAAA,IA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AO,EAAEjB,QAAQ,CAACc,MAAM,KAAK,SAAS;IACtCI,KAAK,EAAElB,QAAQ,CAACkB,KAAK;IACrBf,OAAO;IACPgB,eAAe,EAAEtB,KAAK,CAACsB,eAAe;IACtCC,MAAM,EAAEvB,KAAK,CAACuB,MAAM;IACpBC,cAAc,EAAExB,KAAK,CAACwB;EACxB,CAAC;AACH,CAAC;AAACC,OAAA,CAAA/B,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","React","_interopRequireWildcard","_reactNative","_events","_sessionStore","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useSession","sessions","fetchSessions","refreshOnForeground","client","useClient","store","useMemo","getSessionStore","snapshot","useSyncExternalStore","subscribe","refresh","useCallback","useEffect","subscription","AppState","addEventListener","nextState","undefined","unsubscribe","subscribeSessionChanges","remove","status","isAuthenticated","accounts","profile","loading","error","refreshSessions","switchAccount","removeAccount","logout","revokeSessions","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-session.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAA2D,SAAAE,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,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M;IACpB,KAAKF,OAAO,CAAC,CAAC;IAEd,MAAMG,YAAY,GAAGZ,mBAAmB,GACpCa,qBAAQ,CAACC,gBAAgB,CAAC,QAAQ,EAAGC,SAAS,IAAK;MACjD,IAAIA,SAAS,KAAK,QAAQ,EAAE;QAC1B,KAAKN,OAAO,CAAC,CAAC;MAChB;IACF,CAAC,CAAC,GACFO,SAAS;IAEb,MAAMC,WAAW,GAAG,IAAAC,+BAAuB,EAAC,MAAM,KAAKT,OAAO,CAAC,CAAC,CAAC;IAEjE,OAAO,MAAM;MACXG,YAAY,EAAEO,MAAM,CAAC,CAAC;MACtBF,WAAW,CAAC,CAAC;IACf,CAAC;EACH,CAAC,EAAE,CAACR,OAAO,EAAET,mBAAmB,CAAC,CAAC;EAElC,OAAO;IACLoB,MAAM,EAAEd,QAAQ,CAACc,MAAM;IACvBC,eAAe,EACbf,QAAQ,CAACc,MAAM,KAAK,eAAe,IAAId,QAAQ,CAACc,MAAM,KAAK,SAAS;IACtEE,QAAQ,EAAEhB,QAAQ,CAACgB,QAAQ;IAC3BC,OAAO,EAAEjB,QAAQ,CAACiB,OAAkB;IACpCzB,QAAQ,EAAEQ,QAAQ,CAACR,QAAQ;IAC3B0B,OAAO,EAAElB,QAAQ,CAACc,MAAM,KAAK,SAAS;IACtCK,KAAK,EAAEnB,QAAQ,CAACmB,KAAK;IACrBhB,OAAO;IACPiB,eAAe,EAAEvB,KAAK,CAACuB,eAAe;IACtCC,aAAa,EAAExB,KAAK,CAACwB,aAAa;IAClCC,aAAa,EAAEzB,KAAK,CAACyB,aAAa;IAClCC,MAAM,EAAE1B,KAAK,CAAC0B,MAAM;IACpBC,cAAc,EAAE3B,KAAK,CAAC2B;EACxB,CAAC;AACH,CAAC;AAACC,OAAA,CAAAlC,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -10,6 +10,7 @@ var _libphonenumberJs = require("libphonenumber-js");
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var Yup = _interopRequireWildcard(require("yup"));
12
12
  var _useShallowStableValue = require("../../../helpers/hooks/use-shallow-stable-value.js");
13
+ var _signInError = require("../../utils/sign-in-error.js");
13
14
  var _profileFormContext = require("../contexts/profile-form-context.js");
14
15
  var _phone = require("../utils/phone.js");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
@@ -94,14 +95,10 @@ const ProfileFormProvider = ({
94
95
  }];
95
96
  });
96
97
  const response = await client.patchResource("Patient", activeProfile?.id ?? "", operations.filter(op => op.path !== "/submit"));
97
- client.refetchProfile();
98
+ await client.refetchProfile();
98
99
  await onSuccess?.(response, submittedValues);
99
100
  } catch (error) {
100
- if (error instanceof Error) {
101
- formikHelpers.setFieldError("submit", error.message);
102
- return;
103
- }
104
- formikHelpers.setFieldError("submit", "profile.form.error.generic");
101
+ formikHelpers.setFieldError("submit", (0, _signInError.isNetworkError)(error) ? "profile.form.error.network" : "profile.form.error.generic");
105
102
  }
106
103
  } finally {
107
104
  submitInProgress.current = false;
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_formik","_libphonenumberJs","_react","_interopRequireDefault","Yup","_interopRequireWildcard","_useShallowStableValue","_profileFormContext","_phone","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","useClient","submitInProgress","React","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","toPhoneE164","defaultCountry","name","phoneCountryFieldName","parsePhoneNumberFromString","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","isPhoneValidForCountry","object","shape","formik","useFormik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","getPatchOperationType","path","includes","split","filter","Boolean","join","response","patchResource","id","error","Error","setFieldError","message","contextValue","useShallowStableValue","jsx","ProfileFormContext","Provider","exports"],"sourceRoot":"../../../../../../src","sources":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AAa,CACzC,SAAS,EACTjB,aAAa,EAAEkB,EAAE,IAAI,EAAE,EACvBd,UAAU,CAACS,MAAM,CACdL,EAAE,IAAKA,EAAE,CAACE,IAAI,KAAK,SACtB,CACF,CAAC;UAEDhD,MAAM,CAACuC,cAAc,CAAC,CAAC;UAEvB,MAAMxC,SAAS,GAAGuD,QAAQ,EAAalB,eAAe,CAAC;QACzD,CAAC,CAAC,OAAOqB,KAAK,EAAE;UACd,IAAIA,KAAK,YAAYC,KAAK,EAAE;YAC1BxB,aAAa,CAACyB,aAAa,CAAC,QAAQ,EAAEF,KAAK,CAACG,OAAO,CAAC;YAEpD;UACF;UAEA1B,aAAa,CAACyB,aAAa,CAAC,QAAQ,EAAE,4BAA4B,CAAC;QACrE;MACF,CAAC,SAAS;QACRzD,gBAAgB,CAACiC,OAAO,GAAG,KAAK;MAClC;IACF;EACF,CAAC,CAAC;EAEF,MAAM0B,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IAAE,GAAGhC;EAAO,CAAC,CAAC;EAEzD,oBACE,IAAAvD,WAAA,CAAAwF,GAAA,EAAC1F,mBAAA,CAAA2F,kBAAkB,CAACC,QAAQ;IAACtD,KAAK,EAAEkD,YAAa;IAAAjE,QAAA,EAC9CA;EAAQ,CACkB,CAAC;AAElC,CAAC;AAACsE,OAAA,CAAAvE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_formik","_libphonenumberJs","_react","_interopRequireDefault","Yup","_interopRequireWildcard","_useShallowStableValue","_signInError","_profileFormContext","_phone","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProfileFormProvider","children","fields","onSubmit","onSuccess","client","useClient","submitInProgress","React","useRef","initialValues","useMemo","values","reduce","acc","field","value","type","toPhoneE164","defaultCountry","name","phoneCountryFieldName","parsePhoneNumberFromString","country","submit","validationSchema","fieldRules","validation","string","test","validatePhone","parent","isPhoneValidForCountry","object","shape","formik","useFormik","enableReinitialize","validateOnBlur","formikHelpers","current","submittedValues","submitted","activeProfile","refetchProfile","getProfileAsync","patient","operations","flatMap","toPatch","initialValue","op","getPatchOperationType","path","includes","split","filter","Boolean","join","response","patchResource","id","error","setFieldError","isNetworkError","contextValue","useShallowStableValue","jsx","ProfileFormContext","Provider","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/profile/components/profile-form-provider.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,GAAA,GAAAC,uBAAA,CAAAN,OAAA;AAEA,IAAAO,sBAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AAGA,IAAAU,MAAA,GAAAV,OAAA;AAIwB,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAM,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAA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AAE;cAC5BD,IAAI,GAAG,IAAItC,KAAK,CAACK,IAAI,CAClBmC,KAAK,CAAC,QAAQ,CAAC,CACfC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,EAAE;YAChB;YAEA,OAAO,CACL;cACEP,EAAE;cACFE,IAAI;cACJrC;YACF,CAAC,CACF;UACH,CAAC,CAAC;UAEF,MAAM2C,QAAQ,GAAG,MAAMtD,MAAM,CAACuD,aAAa,CACzC,SAAS,EACTjB,aAAa,EAAEkB,EAAE,IAAI,EAAE,EACvBd,UAAU,CAACS,MAAM,CACdL,EAAE,IAAKA,EAAE,CAACE,IAAI,KAAK,SACtB,CACF,CAAC;UAED,MAAMhD,MAAM,CAACuC,cAAc,CAAC,CAAC;UAE7B,MAAMxC,SAAS,GAAGuD,QAAQ,EAAalB,eAAe,CAAC;QACzD,CAAC,CAAC,OAAOqB,KAAK,EAAE;UACdvB,aAAa,CAACwB,aAAa,CACzB,QAAQ,EACR,IAAAC,2BAAc,EAACF,KAAK,CAAC,GACjB,4BAA4B,GAC5B,4BACN,CAAC;QACH;MACF,CAAC,SAAS;QACRvD,gBAAgB,CAACiC,OAAO,GAAG,KAAK;MAClC;IACF;EACF,CAAC,CAAC;EAEF,MAAMyB,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IAAE,GAAG/B;EAAO,CAAC,CAAC;EAEzD,oBACE,IAAAvD,WAAA,CAAAuF,GAAA,EAACzF,mBAAA,CAAA0F,kBAAkB,CAACC,QAAQ;IAACrD,KAAK,EAAEiD,YAAa;IAAAhE,QAAA,EAC9CA;EAAQ,CACkB,CAAC;AAElC,CAAC;AAACqE,OAAA,CAAAtE,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -85,6 +85,7 @@ const RegisterFormProvider = ({
85
85
  onSuccess?.(registerResponse);
86
86
  } catch (error) {
87
87
  const parsedError = (0, _signInError.parseSignInError)(error, {
88
+ errorScope: "register",
88
89
  isSignIn: false
89
90
  });
90
91
  onError?.(parsedError.error);
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_formik","_react","_interopRequireDefault","_useShallowStableValue","_events","_rateLimit","_signInError","_registerFormContext","_createRegisterValidationSchema","_jsxRuntime","e","__esModule","default","isClinicianInviteStep","response","nextStep","RegisterFormProvider","children","customValidations","defaultValues","tenantCode","continueAsPatientToken","nameField","toRegisterNames","onSubmit","onSuccess","onError","onNextStep","client","useClient","singleName","registerValidationSchema","React","useMemo","createRegisterValidationSchema","disablePasswordConfirm","passwordConfirm","initialValues","email","password","name","surname","fullName","filter","Boolean","join","submit","formik","useFormik","validateOnBlur","validationSchema","values","formikHelpers","mappedNames","undefined","registerValues","updatedValues","registerResponse","register","data","accessToken","refreshToken","profile","project","setActiveLogin","notifySessionChanged","error","parsedError","parseSignInError","isSignIn","setRateLimitFormError","fieldErrors","emailError","find","fieldError","path","includes","message","passwordError","setFieldError","contextValue","useShallowStableValue","jsx","RegisterFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/register-form-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAGA,IAAAS,+BAAA,GAAAT,OAAA;AAA+F,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/F,MAAMG,qBAAqB,GACzBC,QAA0B,IAE1B,UAAU,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,QAAQ,KAAK,kBAAkB;AAE7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AgB,EAACF,KAAK,EAAE;UAAEG,QAAQ,EAAE;QAAM,CAAC,CAAC;QAEhE3C,OAAO,GAAGyC,WAAW,CAACD,KAAK,CAAC;QAE5B,IAAI,IAAAI,gCAAqB,EAACH,WAAW,CAACD,KAAK,EAAEd,aAAa,CAAC,EAAE;UAC3D;QACF;QAEA,MAAMmB,WAAW,GAAGJ,WAAW,CAACI,WAAW;QAE3C,MAAMC,UAAU,GAAGD,WAAW,CAACE,IAAI,CAAEC,UAAU,IAC7CA,UAAU,CAACC,IAAI,CAACC,QAAQ,CAAC,OAAO,CAClC,CAAC,EAAEC,OAAO;QAEV,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;UACjC1B,aAAa,CAAC2B,aAAa,CAAC,QAAQ,EAAEZ,WAAW,CAACD,KAAK,CAACW,OAAO,CAAC;QAClE;QAEAzB,aAAa,CAAC2B,aAAa,CAAC,OAAO,EAAEP,UAAU,CAAC;QAChDpB,aAAa,CAAC2B,aAAa,CAAC,UAAU,EAAED,aAAa,CAAC;MACxD;IACF;EACF,CAAC,CAAC;EAEF,MAAME,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IACzC,GAAGlC,MAAM;IACT5B,aAAa;IACbG,SAAS;IACTC;EACF,CAAC,CAAC;EAEF,oBACE,IAAAd,WAAA,CAAAyE,GAAA,EAAC3E,oBAAA,CAAA4E,mBAAmB,CAACC,QAAQ;IAACC,KAAK,EAAEL,YAAa;IAAA/D,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC,CAAC;AAACqE,OAAA,CAAAtE,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_formik","_react","_interopRequireDefault","_useShallowStableValue","_events","_rateLimit","_signInError","_registerFormContext","_createRegisterValidationSchema","_jsxRuntime","e","__esModule","default","isClinicianInviteStep","response","nextStep","RegisterFormProvider","children","customValidations","defaultValues","tenantCode","continueAsPatientToken","nameField","toRegisterNames","onSubmit","onSuccess","onError","onNextStep","client","useClient","singleName","registerValidationSchema","React","useMemo","createRegisterValidationSchema","disablePasswordConfirm","passwordConfirm","initialValues","email","password","name","surname","fullName","filter","Boolean","join","submit","formik","useFormik","validateOnBlur","validationSchema","values","formikHelpers","mappedNames","undefined","registerValues","updatedValues","registerResponse","register","data","accessToken","refreshToken","profile","project","setActiveLogin","notifySessionChanged","error","parsedError","parseSignInError","errorScope","isSignIn","setRateLimitFormError","fieldErrors","emailError","find","fieldError","path","includes","message","passwordError","setFieldError","contextValue","useShallowStableValue","jsx","RegisterFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/register/components/form/register-form-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAGA,IAAAS,+BAAA,GAAAT,OAAA;AAA+F,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/F,MAAMG,qBAAqB,GACzBC,QAA0B,IAE1B,UAAU,IAAIA,QAAQ,IAAIA,QAAQ,CAACC,QAAQ,KAAK,kBAAkB;AAE7D,MAAMC,oBAEZ,GAAGA,CAAC;EACHC,QAAQ;EACRC,iBAAiB;EACjBC,aAAa;EACbC,UAAU;EACVC,sBAAsB;EACtBC,SAAS;EACTC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CAACD,KAAK,CAAC;QAE5B,IAAI,IAAAK,gCAAqB,EAACJ,WAAW,CAACD,KAAK,EAAEd,aAAa,CAAC,EAAE;UAC3D;QACF;QAEA,MAAMoB,WAAW,GAAGL,WAAW,CAACK,WAAW;QAE3C,MAAMC,UAAU,GAAGD,WAAW,CAACE,IAAI,CAAEC,UAAU,IAC7CA,UAAU,CAACC,IAAI,CAACC,QAAQ,CAAC,OAAO,CAClC,CAAC,EAAEC,OAAO;QAEV,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;UACjC3B,aAAa,CAAC4B,aAAa,CAAC,QAAQ,EAAEb,WAAW,CAACD,KAAK,CAACY,OAAO,CAAC;QAClE;QAEA1B,aAAa,CAAC4B,aAAa,CAAC,OAAO,EAAEP,UAAU,CAAC;QAChDrB,aAAa,CAAC4B,aAAa,CAAC,UAAU,EAAED,aAAa,CAAC;MACxD;IACF;EACF,CAAC,CAAC;EAEF,MAAME,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IACzC,GAAGnC,MAAM;IACT5B,aAAa;IACbG,SAAS;IACTC;EACF,CAAC,CAAC;EAEF,oBACE,IAAAd,WAAA,CAAA0E,GAAA,EAAC5E,oBAAA,CAAA6E,mBAAmB,CAACC,QAAQ;IAACC,KAAK,EAAEL,YAAa;IAAAhE,QAAA,EAC/CA;EAAQ,CACmB,CAAC;AAEnC,CAAC;AAACsE,OAAA,CAAAvE,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ResetPasswordFormProvider = void 0;
7
7
  var _core = require("@ovok/core");
8
8
  var _formik = require("formik");
9
+ var _i18next = _interopRequireDefault(require("i18next"));
9
10
  var Yup = _interopRequireWildcard(require("yup"));
10
11
  var _useShallowStableValue = require("../../../../helpers/hooks/use-shallow-stable-value.js");
11
12
  var _rateLimit = require("../../../utils/rate-limit.js");
@@ -13,6 +14,7 @@ var _signInError = require("../../../utils/sign-in-error.js");
13
14
  var _resetPasswordFormContext = require("../../contexts/reset-password-form-context.js");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
18
  const ResetPasswordFormProvider = ({
17
19
  children,
18
20
  type,
@@ -37,14 +39,13 @@ const ResetPasswordFormProvider = ({
37
39
  }
38
40
  try {
39
41
  await client.resetPassword(values);
40
-
41
- // TODO: fix this
42
42
  const data = {
43
- message: "Password reset request sent"
43
+ message: _i18next.default.t("reset-password.success")
44
44
  };
45
45
  onSuccess?.(data);
46
46
  } catch (error) {
47
47
  const parsedError = (0, _signInError.parseSignInError)(error, {
48
+ errorScope: "reset-password",
48
49
  isSignIn: false
49
50
  });
50
51
  onError?.(parsedError.error);
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_formik","Yup","_interopRequireWildcard","_useShallowStableValue","_rateLimit","_signInError","_resetPasswordFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","useClient","formik","useFormik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","error","parsedError","parseSignInError","isSignIn","setRateLimitFormError","setFieldError","contextValue","useShallowStableValue","typeLocked","undefined","jsx","ResetPasswordFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/reset-password/components/form/reset-password-form-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAsF,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAG,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,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B,CAAC,CAAC,OAAOE,KAAK,EAAE;QACd,MAAMC,WAAW,GAAG,IAAAC,6BAAgB,EAACF,KAAK,EAAE;UAAEG,QAAQ,EAAE;QAAM,CAAC,CAAC;QAEhExB,OAAO,GAAGsB,WAAW,CAACD,KAAK,CAAC;QAE5B,IAAI,IAAAI,gCAAqB,EAACH,WAAW,CAACD,KAAK,EAAEJ,OAAO,CAAC,EAAE;UAErD;QACF;QAEAA,OAAO,CAACS,aAAa,CAAC,QAAQ,EAAEJ,WAAW,CAACD,KAAK,CAACD,OAAO,CAAC;MAC5D;IACF;EACF,CAAC,CAAC;EAEF,MAAMO,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IACzC,GAAGzB,MAAM;IACT0B,UAAU,EAAEhC,IAAI,KAAKiC;EACvB,CAAC,CAAC;EAEF,oBACE,IAAAvD,WAAA,CAAAwD,GAAA,EAACzD,yBAAA,CAAA0D,wBAAwB,CAACC,QAAQ;IAACC,KAAK,EAAEP,YAAa;IAAA/B,QAAA,EACpDA;EAAQ,CACwB,CAAC;AAExC,CAAC;AAACuC,OAAA,CAAAxC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_formik","_i18next","_interopRequireDefault","Yup","_interopRequireWildcard","_useShallowStableValue","_rateLimit","_signInError","_resetPasswordFormContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ResetPasswordFormProvider","children","type","onSubmit","onSuccess","onError","client","useClient","formik","useFormik","initialValues","email","submit","validationSchema","object","string","trim","lowercase","matches","required","oneOf","values","helpers","resetPassword","data","message","i18n","error","parsedError","parseSignInError","errorScope","isSignIn","setRateLimitFormError","setFieldError","contextValue","useShallowStableValue","typeLocked","undefined","jsx","ResetPasswordFormContext","Provider","value","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/reset-password/components/form/reset-password-form-provider.tsx"],"mappings":";;;;;;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AAMC,WAAW,GAAG,IAAAC,6BAAgB,EAACF,KAAK,EAAE;UAC1CG,UAAU,EAAE,gBAAgB;UAC5BC,QAAQ,EAAE;QACZ,CAAC,CAAC;QAEF1B,OAAO,GAAGuB,WAAW,CAACD,KAAK,CAAC;QAE5B,IAAI,IAAAK,gCAAqB,EAACJ,WAAW,CAACD,KAAK,EAAEL,OAAO,CAAC,EAAE;UACrD;QACF;QAEAA,OAAO,CAACW,aAAa,CAAC,QAAQ,EAAEL,WAAW,CAACD,KAAK,CAACF,OAAO,CAAC;MAC5D;IACF;EACF,CAAC,CAAC;EAEF,MAAMS,YAAY,GAAG,IAAAC,4CAAqB,EAAC;IACzC,GAAG3B,MAAM;IACT4B,UAAU,EAAElC,IAAI,KAAKmC;EACvB,CAAC,CAAC;EAEF,oBACE,IAAAzD,WAAA,CAAA0D,GAAA,EAAC3D,yBAAA,CAAA4D,wBAAwB,CAACC,QAAQ;IAACC,KAAK,EAAEP,YAAa;IAAAjC,QAAA,EACpDA;EAAQ,CACwB,CAAC;AAExC,CAAC;AAACyC,OAAA,CAAA1C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -16,8 +16,11 @@ const logoutSession = client => {
16
16
  return pending;
17
17
  }
18
18
  const request = (async () => {
19
- await client.logout();
20
- await (0, _signOutGoogle.signOutGoogleIfNeeded)();
19
+ try {
20
+ await client.logout();
21
+ } finally {
22
+ await (0, _signOutGoogle.signOutGoogleIfNeeded)();
23
+ }
21
24
  })().finally(() => {
22
25
  (0, _events.notifySessionChanged)();
23
26
  logoutRequests.delete(key);
@@ -1 +1 @@
1
- {"version":3,"names":["_signOutGoogle","require","_events","logoutRequests","WeakMap","logoutSession","client","key","pending","get","request","logout","signOutGoogleIfNeeded","finally","notifySessionChanged","delete","set","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAMA,MAAME,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;;AAE3D;AACO,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;IACrB,MAAM,IAAAC,oCAAqB,EAAC,CAAC;EAC/B,CAAC,EAAE,CAAC,CAACC,OAAO,CAAC,MAAM;IACjB,IAAAC,4BAAoB,EAAC,CAAC;IACtBX,cAAc,CAACY,MAAM,CAACR,GAAG,CAAC;EAC5B,CAAC,CAAC;EAEFJ,cAAc,CAACa,GAAG,CAACT,GAAG,EAAEG,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAACO,OAAA,CAAAZ,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["_signOutGoogle","require","_events","logoutRequests","WeakMap","logoutSession","client","key","pending","get","request","logout","signOutGoogleIfNeeded","finally","notifySessionChanged","delete","set","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAMA,MAAME,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;;AAE3D;AACO,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,MAAM,IAAAC,oCAAqB,EAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACC,OAAO,CAAC,MAAM;IACjB,IAAAC,4BAAoB,EAAC,CAAC;IACtBX,cAAc,CAACY,MAAM,CAACR,GAAG,CAAC;EAC5B,CAAC,CAAC;EAEFJ,cAAc,CAACa,GAAG,CAACT,GAAG,EAAEG,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAACO,OAAA,CAAAZ,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createSessionRefreshActions = void 0;
7
+ var _sessionErrors = require("./session-errors.js");
8
+ var _sessionStoreTypes = require("./session-store-types.js");
9
+ const createSessionRefreshActions = (client, requestState, getStore, notify) => {
10
+ const refresh = async includeSessions => {
11
+ const store = getStore();
12
+ requestState.syncActiveAccount();
13
+ if (!client.getActiveLogin()) {
14
+ requestState.nextRevision();
15
+ store.snapshot = {
16
+ status: "signed-out",
17
+ accounts: requestState.getAccounts(),
18
+ sessions: []
19
+ };
20
+ notify();
21
+ return;
22
+ }
23
+ const revision = requestState.nextRevision();
24
+ const previousSnapshot = store.snapshot;
25
+ if (store.snapshot.status !== "authenticated" && store.snapshot.status !== "offline") {
26
+ store.snapshot = {
27
+ ...store.snapshot,
28
+ status: "loading",
29
+ error: undefined
30
+ };
31
+ notify();
32
+ }
33
+ const currentProfileRequest = requestState.getProfileRequest();
34
+ const currentSessionsRequest = includeSessions ? requestState.getSessionsRequest() : undefined;
35
+ const [profileResult, sessionsResult] = await Promise.all([currentProfileRequest.then(profile => ({
36
+ profile
37
+ }), error => ({
38
+ error
39
+ })), (currentSessionsRequest ?? Promise.resolve(previousSnapshot.sessions)).then(sessions => ({
40
+ sessions
41
+ }), error => ({
42
+ error
43
+ }))]);
44
+ if (!requestState.isCurrent(revision)) {
45
+ return;
46
+ }
47
+ const profile = "profile" in profileResult ? profileResult.profile : previousSnapshot.profile;
48
+ const sessions = "sessions" in sessionsResult ? sessionsResult.sessions : previousSnapshot.sessions;
49
+ const error = "error" in profileResult ? profileResult.error : "error" in sessionsResult ? sessionsResult.error : undefined;
50
+ const accounts = requestState.getAccounts();
51
+ const nextSnapshot = !client.getActiveLogin() || (0, _sessionErrors.getHttpStatus)(error) === 401 ? {
52
+ status: "signed-out",
53
+ accounts,
54
+ sessions: [],
55
+ error: error === undefined ? undefined : (0, _sessionErrors.toError)(error)
56
+ } : "error" in profileResult ? {
57
+ status: "offline",
58
+ accounts,
59
+ profile,
60
+ sessions: sessions.map(_sessionStoreTypes.normalizeSession),
61
+ error: (0, _sessionErrors.toError)(profileResult.error)
62
+ } : {
63
+ status: "authenticated",
64
+ accounts,
65
+ profile,
66
+ sessions: sessions.map(_sessionStoreTypes.normalizeSession),
67
+ error: "error" in sessionsResult ? (0, _sessionErrors.toError)(sessionsResult.error) : undefined
68
+ };
69
+ store.snapshot = nextSnapshot;
70
+ notify();
71
+ };
72
+ const refreshSessions = async () => {
73
+ const store = getStore();
74
+ requestState.syncActiveAccount();
75
+ if (!client.getActiveLogin()) {
76
+ store.snapshot = {
77
+ ...store.snapshot,
78
+ accounts: requestState.getAccounts(),
79
+ sessions: []
80
+ };
81
+ notify();
82
+ return;
83
+ }
84
+ const revision = requestState.revision;
85
+ try {
86
+ const sessions = await requestState.getSessionsRequest();
87
+ if (!requestState.isCurrent(revision)) {
88
+ return;
89
+ }
90
+ store.snapshot = {
91
+ ...store.snapshot,
92
+ accounts: requestState.getAccounts(),
93
+ sessions: sessions.map(_sessionStoreTypes.normalizeSession),
94
+ error: undefined
95
+ };
96
+ notify();
97
+ } catch (cause) {
98
+ if (!requestState.isCurrent(revision)) {
99
+ return;
100
+ }
101
+ const error = (0, _sessionErrors.toError)(cause);
102
+ if (!client.getActiveLogin() || (0, _sessionErrors.getHttpStatus)(cause) === 401) {
103
+ store.snapshot = {
104
+ status: "signed-out",
105
+ accounts: requestState.getAccounts(),
106
+ sessions: [],
107
+ error
108
+ };
109
+ } else {
110
+ store.snapshot = {
111
+ ...store.snapshot,
112
+ error
113
+ };
114
+ }
115
+ notify();
116
+ throw error;
117
+ }
118
+ };
119
+ return {
120
+ refresh,
121
+ refreshSessions
122
+ };
123
+ };
124
+ exports.createSessionRefreshActions = createSessionRefreshActions;
125
+ //# sourceMappingURL=session-store-refresh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_sessionErrors","require","_sessionStoreTypes","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","getHttpStatus","toError","map","normalizeSession","refreshSessions","cause","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store-refresh.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AAOA,MAAME,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,QAAQ,EAAEX,YAAY,CAACY,WAAW,CAAC,CAAC;QACpCC,QAAQ,EAAE;MACZ,CAAC;MACDX,MAAM,CAAC,CAAC;MAER;IACF;IAEA,MAAMY,QAAQ,GAA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ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SessionStoreRequestState = void 0;
7
+ class SessionStoreRequestState {
8
+ profileNeedsRefresh = false;
9
+ hasActiveAccount = false;
10
+ authRevision = 0;
11
+ constructor(client, sessionClient) {
12
+ this.client = client;
13
+ this.sessionClient = sessionClient;
14
+ }
15
+ getAccounts = () => this.sessionClient.getSavedAccounts();
16
+ getActiveAccountId = () => this.getAccounts().find(account => account.active)?.id ?? this.client.getActiveLogin()?.profile?.reference;
17
+ syncActiveAccount = () => {
18
+ const nextAccountId = this.getActiveAccountId();
19
+ if (this.hasActiveAccount && this.activeAccountId !== nextAccountId) {
20
+ this.invalidate();
21
+ }
22
+ this.activeAccountId = nextAccountId;
23
+ this.hasActiveAccount = true;
24
+ };
25
+ invalidate = () => {
26
+ this.authRevision += 1;
27
+ this.profileRequest = undefined;
28
+ this.sessionsRequest = undefined;
29
+ this.profileNeedsRefresh = false;
30
+ this.activeAccountId = this.getActiveAccountId();
31
+ this.hasActiveAccount = true;
32
+ };
33
+ nextRevision = () => ++this.authRevision;
34
+ get revision() {
35
+ return this.authRevision;
36
+ }
37
+ isCurrent = revision => revision === this.authRevision;
38
+ getProfileRequest = () => {
39
+ if (!this.profileRequest) {
40
+ const requestAccountId = this.getActiveAccountId();
41
+ const request = (this.profileNeedsRefresh ? this.client.refetchProfile() : this.client.getProfileAsync()).then(profile => {
42
+ if (requestAccountId === this.getActiveAccountId()) {
43
+ this.profileNeedsRefresh = false;
44
+ }
45
+ return profile;
46
+ }).catch(cause => {
47
+ if (requestAccountId === this.getActiveAccountId()) {
48
+ this.profileNeedsRefresh = true;
49
+ }
50
+ throw cause;
51
+ }).finally(() => {
52
+ if (this.profileRequest === request) {
53
+ this.profileRequest = undefined;
54
+ }
55
+ });
56
+ this.profileRequest = request;
57
+ }
58
+ return this.profileRequest;
59
+ };
60
+ getSessionsRequest = () => {
61
+ if (!this.sessionsRequest) {
62
+ const request = this.sessionClient.getSessions().finally(() => {
63
+ if (this.sessionsRequest === request) {
64
+ this.sessionsRequest = undefined;
65
+ }
66
+ });
67
+ this.sessionsRequest = request;
68
+ }
69
+ return this.sessionsRequest;
70
+ };
71
+ }
72
+ exports.SessionStoreRequestState = SessionStoreRequestState;
73
+ //# 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","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/session-store-request-state.ts"],"mappings":";;;;;;AAOA,MAAMA,wBAAwB,CAAC;EAGrBC,mBAAmB,GAAG,KAAK;EAE3BC,gBAAgB,GAAG,KAAK;EACxBC,YAAY,GAAG,CAAC;EAExBC,WAAWA,CACQC,MAAc,EACdC,aAA4B,EAC7C;IAAA,KAFiBD,MAAc,GAAdA,MAAc;IAAA,KACdC,aAA4B,GAA5BA,aAA4B;EAC5C;EAEHC,WAAW,GAAGA,CAAA,KAAM,IAAI,CAACD,aAAa,CAACE,gBAAgB,CAAC,CAAC;EAEjDC,kBAAkB,GAAGA,CAAA,KAC3B,IAAI,CAACF,WAAW,CAAC,CAAC,CAACG,IAAI,CAAEC,OAAO,IAAKA,OAAO,CAACC,MAAM,CAAC,EAAEC,EAAE,IACxD,IAAI,CAACR,MAAM,CAACS,cAAc,CAAC,CAAC,EAAEC,OAAO,EAAEC,SAAS;EAElDC,iBAAiB,GAAGA,CAAA,KAAM;IACxB,MAAMC,aAAa,GAAG,IAAI,CAACT,kBAAkB,CAAC,CAAC;IAE/C,IAAI,IAA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AK,IAAI,CAACnB,kBAAkB,CAAC,CAAC,EAAE;UAClD,IAAI,CAACR,mBAAmB,GAAG,IAAI;QACjC;QAEA,MAAMiC,KAAK;MACb,CAAC,CAAC,CACDC,OAAO,CAAC,MAAM;QACb,IAAI,IAAI,CAACd,cAAc,KAAKQ,OAAO,EAAE;UACnC,IAAI,CAACR,cAAc,GAAGC,SAAS;QACjC;MACF,CAAC,CAAC;MAEJ,IAAI,CAACD,cAAc,GAAGQ,OAAO;IAC/B;IAEA,OAAO,IAAI,CAACR,cAAc;EAC5B,CAAC;EAEDe,kBAAkB,GAAGA,CAAA,KAAM;IACzB,IAAI,CAAC,IAAI,CAACb,eAAe,EAAE;MACzB,MAAMM,OAAO,GAAG,IAAI,CAACvB,aAAa,CAAC+B,WAAW,CAAC,CAAC,CAACF,OAAO,CAAC,MAAM;QAC7D,IAAI,IAAI,CAACZ,eAAe,KAAKM,OAAO,EAAE;UACpC,IAAI,CAACN,eAAe,GAAGD,SAAS;QAClC;MACF,CAAC,CAAC;MAEF,IAAI,CAACC,eAAe,GAAGM,OAAO;IAChC;IAEA,OAAO,IAAI,CAACN,eAAe;EAC7B,CAAC;AACH;AAACe,OAAA,CAAAtC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.normalizeSession = void 0;
7
+ const normalizeSession = session => {
8
+ const legacy = session;
9
+ return {
10
+ id: session.id,
11
+ authMethod: session.authMethod,
12
+ remoteAddress: session.remoteAddress ?? legacy.ip,
13
+ lastUpdated: session.lastUpdated ?? legacy.lastActiveAt ?? legacy.createdAt
14
+ };
15
+ };
16
+ exports.normalizeSession = normalizeSession;
17
+ //# sourceMappingURL=session-store-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["normalizeSession","session","legacy","id","authMethod","remoteAddress","ip","lastUpdated","lastActiveAt","createdAt","exports"],"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;AAACC,OAAA,CAAAV,gBAAA,GAAAA,gBAAA","ignoreList":[]}