@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
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.normalizeCoreHealthObservation = exports.hasConfiguredNonLoincCoding = void 0;
7
+ var _convertGenericHealthData = require("./convert-generic-health-data.js");
8
+ const LOINC_SYSTEM = "http://loinc.org";
9
+ const UCUM_SYSTEM = "http://unitsofmeasure.org";
10
+ const hasConfiguredNonLoincCoding = ({
11
+ typeIdentifier,
12
+ typeIdentifierCodes,
13
+ typeIdentifierCodeSystems
14
+ }) => {
15
+ if (!typeIdentifier) {
16
+ return false;
17
+ }
18
+ const hasConfiguredCoding = typeIdentifierCodes !== undefined && Object.prototype.hasOwnProperty.call(typeIdentifierCodes, typeIdentifier) || typeIdentifierCodeSystems !== undefined && Object.prototype.hasOwnProperty.call(typeIdentifierCodeSystems, typeIdentifier);
19
+ return hasConfiguredCoding && typeIdentifierCodeSystems?.[typeIdentifier] !== LOINC_SYSTEM;
20
+ };
21
+ exports.hasConfiguredNonLoincCoding = hasConfiguredNonLoincCoding;
22
+ const normalizeCoreHealthObservation = (observation, coding) => {
23
+ const normalized = normalizeLoincQuantities(observation, coding.typeIdentifier);
24
+ const {
25
+ typeIdentifier
26
+ } = coding;
27
+ const code = typeIdentifier && coding.typeIdentifierCodes?.[typeIdentifier];
28
+ const system = typeIdentifier && coding.typeIdentifierCodeSystems?.[typeIdentifier];
29
+ if (!coding.applyCatalogCoding || !typeIdentifier || !code || system !== LOINC_SYSTEM || normalized.component?.length || normalized.hasMember?.length) {
30
+ return normalized;
31
+ }
32
+ const codingEntry = {
33
+ system: LOINC_SYSTEM,
34
+ code,
35
+ ...(coding.typeIdentifierCodeDisplays?.[typeIdentifier] ? {
36
+ display: coding.typeIdentifierCodeDisplays[typeIdentifier]
37
+ } : {})
38
+ };
39
+ return {
40
+ ...normalized,
41
+ code: {
42
+ ...(normalized.code ?? {}),
43
+ coding: [codingEntry, ...(normalized.code?.coding ?? []).filter(entry => entry.system !== LOINC_SYSTEM)]
44
+ }
45
+ };
46
+ };
47
+ exports.normalizeCoreHealthObservation = normalizeCoreHealthObservation;
48
+ const normalizeLoincQuantities = (value, typeIdentifier) => {
49
+ if (Array.isArray(value)) {
50
+ return value.map(entry => normalizeLoincQuantities(entry, typeIdentifier));
51
+ }
52
+ if (typeof value !== "object" || value === null) {
53
+ return value;
54
+ }
55
+ const record = value;
56
+ const children = Object.fromEntries(Object.entries(record).map(([key, child]) => [key, normalizeLoincQuantities(child, typeIdentifier)]));
57
+ if (record.system !== LOINC_SYSTEM || typeof record.value !== "number" || typeof record.unit !== "string") {
58
+ return children;
59
+ }
60
+ const quantity = {
61
+ ...children
62
+ };
63
+ delete quantity.system;
64
+ delete quantity.code;
65
+ const unitCode = (0, _convertGenericHealthData.getUcumCode)(record.unit, typeIdentifier);
66
+ return {
67
+ ...quantity,
68
+ ...(unitCode ? {
69
+ system: UCUM_SYSTEM,
70
+ code: unitCode
71
+ } : {})
72
+ };
73
+ };
74
+ //# sourceMappingURL=normalize-core-health-observation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_convertGenericHealthData","require","LOINC_SYSTEM","UCUM_SYSTEM","hasConfiguredNonLoincCoding","typeIdentifier","typeIdentifierCodes","typeIdentifierCodeSystems","hasConfiguredCoding","undefined","Object","prototype","hasOwnProperty","call","exports","normalizeCoreHealthObservation","observation","coding","normalized","normalizeLoincQuantities","code","system","applyCatalogCoding","component","length","hasMember","codingEntry","typeIdentifierCodeDisplays","display","filter","entry","value","Array","isArray","map","record","children","fromEntries","entries","key","child","unit","quantity","unitCode","getUcumCode"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/normalize-core-health-observation.ts"],"mappings":";;;;;;AAEA,IAAAA,yBAAA,GAAAC,OAAA;AAEA,MAAMC,YAAY,GAAG,kBAAkB;AACvC,MAAMC,WAAW,GAAG,2BAA2B;AAS/C,MAAMC,2BAA2B,GAAGA,CAAC;EACnCC,cAAc;EACdC,mBAAmB;EACnBC;AACW,CAAC,KAAc;EAC1B,IAAI,CAACF,cAAc,EAAE;IACnB,OAAO,KAAK;EACd;EAEA,MAAMG,mBAAmB,GACtBF,mBAAmB,KAAKG,SAAS,IAChCC,MAA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AEtB,MAAM,EAAElB,WAAW;MAAEiB,IAAI,EAAEuB;IAAS,CAAC,GAAG,CAAC,CAAC;EAC7D,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ValueWheelPicker = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _wheelPicker = require("./wheel-picker.js");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ 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); }
11
+ const getSelectedIndex = (options, value, defaultIndex, getOptionKey) => {
12
+ const valueIndex = value === null || value === undefined ? -1 : options.findIndex(option => getOptionKey ? getOptionKey(option.value) === getOptionKey(value) : Object.is(option.value, value));
13
+ if (valueIndex !== -1) {
14
+ return valueIndex;
15
+ }
16
+ return options.length ? Math.max(0, Math.min(defaultIndex, options.length - 1)) : 0;
17
+ };
18
+ const ValueWheelPicker = ({
19
+ options,
20
+ value,
21
+ defaultIndex = 0,
22
+ getOptionKey,
23
+ onChange,
24
+ ...wheelPickerProps
25
+ }) => {
26
+ const selectedIndex = React.useMemo(() => getSelectedIndex(options, value, defaultIndex, getOptionKey), [options, value, defaultIndex, getOptionKey]);
27
+ const handleChange = React.useCallback(index => {
28
+ const selectedOption = options[index];
29
+ if (selectedOption) {
30
+ onChange(selectedOption.value);
31
+ }
32
+ }, [onChange, options]);
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_wheelPicker.WheelPicker, {
34
+ ...wheelPickerProps,
35
+ selectedIndex: selectedIndex,
36
+ options: options.map(option => option.label),
37
+ onChange: handleChange
38
+ });
39
+ };
40
+ exports.ValueWheelPicker = ValueWheelPicker;
41
+ //# sourceMappingURL=value-wheel-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_wheelPicker","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getSelectedIndex","options","value","defaultIndex","getOptionKey","valueIndex","undefined","findIndex","option","is","length","Math","max","min","ValueWheelPicker","onChange","wheelPickerProps","selectedIndex","useMemo","handleChange","useCallback","index","selectedOption","jsx","WheelPicker","map","label","exports"],"sourceRoot":"../../../../../src","sources":["modules/picker-sheet/components/value-wheel-picker.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAoE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,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,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,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AMlB,gBAAgB,CAACC,OAAO,EAAEC,KAAK,EAAEC,YAAY,EAAEC,YAAY,CAAC,EAClE,CAACH,OAAO,EAAEC,KAAK,EAAEC,YAAY,EAAEC,YAAY,CAC7C,CAAC;EAED,MAAMe,YAAY,GAAG3C,KAAK,CAAC4C,WAAW,CACnCC,KAAa,IAAK;IACjB,MAAMC,cAAc,GAAGrB,OAAO,CAACoB,KAAK,CAAC;IAErC,IAAIC,cAAc,EAAE;MAClBP,QAAQ,CAACO,cAAc,CAACpB,KAAK,CAAC;IAChC;EACF,CAAC,EACD,CAACa,QAAQ,EAAEd,OAAO,CACpB,CAAC;EAED,oBACE,IAAArB,WAAA,CAAA2C,GAAA,EAAC5C,YAAA,CAAA6C,WAAW;IAAA,GACNR,gBAAgB;IACpBC,aAAa,EAAEA,aAAc;IAC7BhB,OAAO,EAAEA,OAAO,CAACwB,GAAG,CAAEjB,MAAM,IAAKA,MAAM,CAACkB,KAAK,CAAE;IAC/CX,QAAQ,EAAEI;EAAa,CACxB,CAAC;AAEN,CAAC;AAACQ,OAAA,CAAAb,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -27,7 +27,12 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
27
27
  itemHeight = 40,
28
28
  visibleItems = 5,
29
29
  decelerationRate = "fast",
30
- containerProps
30
+ containerProps,
31
+ accessibilityLabel,
32
+ accessibilityHint,
33
+ nestedScrollEnabled = true,
34
+ accessibilityIncrementLabel,
35
+ accessibilityDecrementLabel
31
36
  }) => {
32
37
  const theme = (0, _index.useAppTheme)();
33
38
 
@@ -49,7 +54,8 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
49
54
  }, [options, paddingItems]);
50
55
 
51
56
  // Calculate container height
52
- const containerHeight = itemHeight * Math.min(visibleItems, paddedOptions.length);
57
+ const containerHeight = itemCount ? itemHeight * Math.min(visibleItems, paddedOptions.length) : 0;
58
+ const safeSelectedIndex = Math.max(0, Math.min(selectedIndex, Math.max(itemCount - 1, 0)));
53
59
 
54
60
  // Calculate the offset to center the selected item
55
61
  const centerOffset = Math.floor(visibleItems / 2) * itemHeight;
@@ -63,22 +69,24 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
63
69
  isScrolling.value = true;
64
70
  },
65
71
  onMomentumEnd: event => {
72
+ const userInitiatedScroll = isScrolling.value;
66
73
  isScrolling.value = false;
74
+ if (!itemCount) {
75
+ return;
76
+ }
67
77
  const offsetY = event.contentOffset.y;
68
- const rawIndex = Math.round(offsetY / itemHeight);
69
-
70
- // Since we're using initialScrollIndex which already accounts for padding,
71
- // we need to keep the same logic here
78
+ const rawIndex = Math.round(offsetY / itemHeight) - paddingItems;
72
79
  const clampedIndex = Math.max(0, Math.min(rawIndex, itemCount - 1));
73
80
 
74
81
  // Ensure perfect snap position first
75
- const targetY = rawIndex * itemHeight;
82
+ const targetY = (clampedIndex + paddingItems) * itemHeight;
76
83
  if (targetY !== offsetY) {
77
84
  (0, _reactNativeReanimated.scrollTo)(flatListRef, 0, targetY, true);
78
85
  }
79
86
 
80
- // Call onChange after ensuring the position is correct
81
- if (clampedIndex !== selectedIndex) {
87
+ // A user can deliberately confirm the value currently displayed as a
88
+ // default. Programmatic scrolls do not count as user selections.
89
+ if (userInitiatedScroll) {
82
90
  (0, _reactNativeReanimated.runOnJS)(onChange)(clampedIndex);
83
91
  }
84
92
  }
@@ -95,7 +103,7 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
95
103
  React.useEffect(() => {
96
104
  if (!mountedRef.current) {
97
105
  mountedRef.current = true;
98
- const initialY = (selectedIndex + paddingItems) * itemHeight;
106
+ const initialY = (safeSelectedIndex + paddingItems) * itemHeight;
99
107
  requestAnimationFrame(() => {
100
108
  if (flatListRef.current) {
101
109
  (0, _reactNativeReanimated.scrollTo)(flatListRef, 0, initialY, false);
@@ -103,14 +111,14 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
103
111
  }
104
112
  });
105
113
  }
106
- }, [flatListRef, selectedIndex, paddingItems, itemHeight, scrollPosition]);
114
+ }, [flatListRef, safeSelectedIndex, paddingItems, itemHeight, scrollPosition]);
107
115
 
108
116
  // Scroll to selected index when it changes
109
117
  React.useEffect(() => {
110
118
  if (!isInitialized.current) {
111
119
  return;
112
120
  }
113
- if (selectedIndex < 0 || selectedIndex >= options.length) {
121
+ if (!itemCount || selectedIndex < 0 || selectedIndex >= itemCount) {
114
122
  // Log warning instead of throwing error for better UX
115
123
  // eslint-disable-next-line no-console
116
124
  console.warn(`Selected index ${selectedIndex} is out of bounds [0, ${options.length - 1}]`);
@@ -120,7 +128,7 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
120
128
  const targetY = (selectedIndex + paddingItems) * itemHeight;
121
129
  (0, _reactNativeReanimated.scrollTo)(flatListRef, 0, targetY, true);
122
130
  }
123
- }, [flatListRef, selectedIndex, paddingItems, itemHeight, options.length, isScrolling]);
131
+ }, [flatListRef, selectedIndex, paddingItems, itemHeight, itemCount, options.length, isScrolling]);
124
132
 
125
133
  // Render item
126
134
  const renderItem = React.useCallback(({
@@ -137,10 +145,42 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
137
145
  }, `${index}-${option}`), [itemHeight, itemStyle, itemTextStyle, scrollPosition, visibleItems]);
138
146
  const keyExtractor = React.useCallback((item, index) => `item-${item}-${index}`, []);
139
147
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
148
+ ...containerProps,
140
149
  style: [styles.container, {
141
150
  height: containerHeight
142
151
  }, containerStyle],
143
- ...containerProps,
152
+ accessible: itemCount > 0,
153
+ accessibilityRole: "adjustable",
154
+ accessibilityLabel: accessibilityLabel,
155
+ accessibilityHint: accessibilityHint,
156
+ accessibilityValue: itemCount ? {
157
+ min: 1,
158
+ max: itemCount,
159
+ now: safeSelectedIndex + 1,
160
+ text: options[safeSelectedIndex]
161
+ } : undefined,
162
+ accessibilityActions: [{
163
+ name: "increment",
164
+ label: accessibilityIncrementLabel
165
+ }, {
166
+ name: "decrement",
167
+ label: accessibilityDecrementLabel
168
+ }],
169
+ onAccessibilityAction: ({
170
+ nativeEvent
171
+ }) => {
172
+ if (nativeEvent.actionName === "increment") {
173
+ const nextIndex = Math.min(safeSelectedIndex + 1, itemCount - 1);
174
+ if (nextIndex !== safeSelectedIndex) {
175
+ onChange(nextIndex);
176
+ }
177
+ } else if (nativeEvent.actionName === "decrement") {
178
+ const previousIndex = Math.max(safeSelectedIndex - 1, 0);
179
+ if (previousIndex !== safeSelectedIndex) {
180
+ onChange(previousIndex);
181
+ }
182
+ }
183
+ },
144
184
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
145
185
  style: [styles.selectedIndicator, {
146
186
  backgroundColor: theme.colors.surfaceVariant,
@@ -165,7 +205,8 @@ const WheelPicker = exports.WheelPicker = /*#__PURE__*/React.memo(({
165
205
  renderItem: renderItem,
166
206
  keyExtractor: keyExtractor,
167
207
  getItemLayout: getItemLayout,
168
- initialScrollIndex: selectedIndex,
208
+ initialScrollIndex: safeSelectedIndex + paddingItems,
209
+ nestedScrollEnabled: nestedScrollEnabled,
169
210
  initialNumToRender: visibleItems * 2,
170
211
  maxToRenderPerBatch: visibleItems * 2,
171
212
  windowSize: 7,
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_index","_wheelPickerItem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedFlatList","Animated","createAnimatedComponent","FlatList","AnimatedScrollView","ScrollView","WheelPicker","exports","memo","selectedIndex","options","onChange","selectedIndicatorStyle","containerStyle","itemStyle","itemTextStyle","itemHeight","visibleItems","decelerationRate","containerProps","theme","useAppTheme","flatListRef","useAnimatedRef","isInitialized","useRef","mountedRef","scrollPosition","useSharedValue","itemCount","length","isScrolling","paddingItems","Math","floor","paddedOptions","useMemo","padding","Array","fill","containerHeight","min","centerOffset","handleScroll","useAnimatedScrollHandler","onScroll","event","value","contentOffset","y","onBeginDrag","onMomentumEnd","offsetY","rawIndex","round","clampedIndex","max","targetY","scrollTo","runOnJS","getItemLayout","useCallback","_","index","offset","useEffect","current","initialY","requestAnimationFrame","console","warn","renderItem","item","option","jsx","WheelPickerItem","height","position","style","textStyle","keyExtractor","jsxs","View","styles","container","children","selectedIndicator","backgroundColor","colors","surfaceVariant","borderRadius","top","transform","ref","scrollView","contentContainerStyle","contentContainer","showsVerticalScrollIndicator","scrollEventThrottle","snapToInterval","snapToAlignment","overScrollMode","removeClippedSubviews","data","initialScrollIndex","initialNumToRender","maxToRenderPerBatch","windowSize","updateCellsBatchingPeriod","maintainVisibleContentPosition","minIndexForVisible","autoscrollToTopThreshold","renderScrollComponent","props","StyleSheet","create","overflow","paddingVertical","width","zIndex","flex"],"sourceRoot":"../../../../../src","sources":["modules/picker-sheet/components/wheel-picker.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAQA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AAAsD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,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,iB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AAE;MACtC0F,UAAU,EAAE,CAAE;MACdC,yBAAyB,EAAE,EAAG;MAC9BC,8BAA8B,EAAE;QAC9BC,kBAAkB,EAAE,CAAC;QACrBC,wBAAwB,EAAE;MAC5B,CAAE;MACFC,qBAAqB,EAAGC,KAAK,iBAC3B,IAAArI,WAAA,CAAA8F,GAAA,EAACtE,kBAAkB;QAAA,GAAK6G,KAAK;QAAEf,mBAAmB,EAAE;MAAG,CAAE;IACzD,CACH,CAAC;EAAA,CACE,CAAC;AAEX,CACF,CAAC;AAED,MAAMf,MAAM,GAAG+B,uBAAU,CAACC,MAAM,CAAC;EAC/B/B,SAAS,EAAE;IACTP,QAAQ,EAAE,UAAU;IACpBuC,QAAQ,EAAE;EACZ,CAAC;EACDpB,gBAAgB,EAAE;IAChBqB,eAAe,EAAE;EACnB,CAAC;EACD/B,iBAAiB,EAAE;IACjBT,QAAQ,EAAE,UAAU;IACpByC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,CAAC;EACX,CAAC;EACDzB,UAAU,EAAE;IACV0B,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_index","_wheelPickerItem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedFlatList","Animated","createAnimatedComponent","FlatList","AnimatedScrollView","ScrollView","WheelPicker","exports","memo","selectedIndex","options","onChange","selectedIndicatorStyle","containerStyle","itemStyle","itemTextStyle","itemHeight","visibleItems","decelerationRate","containerProps","accessibilityLabel","accessibilityHint","nestedScrollEnabled","accessibilityIncrementLabel","accessibilityDecrementLabel","theme","useAppTheme","flatListRef","useAnimatedRef","isInitialized","useRef","mountedRef","scrollPosition","useSharedValue","itemCount","length","isScrolling","paddingItems","Math","floor","paddedOptions","useMemo","padding","Array","fill","containerHeight","min","safeSelectedIndex","max","centerOffset","handleScroll","useAnimatedScrollHandler","onScroll","event","value","contentOffset","y","onBeginDrag","onMomentumEnd","userInitiatedScroll","offsetY","rawIndex","round","clampedIndex","targetY","scrollTo","runOnJS","getItemLayout","useCallback","_","index","offset","useEffect","current","initialY","requestAnimationFrame","console","warn","renderItem","item","option","jsx","WheelPickerItem","height","position","style","textStyle","keyExtractor","jsxs","View","styles","container","accessible","accessibilityRole","accessibilityValue","now","text","undefined","accessibilityActions","name","label","onAccessibilityAction","nativeEvent","actionName","nextIndex","previousIndex","children","selectedIndicator","backgroundColor","colors","surfaceVariant","borderRadius","top","transform","ref","scrollView","contentContainerStyle","contentContainer","showsVerticalScrollIndicator","scrollEventThrottle","snapToInterval","snapToAlignment","overScrollMode","removeClippedSubviews","data","initialScrollIndex","initialNumToRender","maxToRenderPerBatch","windowSize","updateCellsBatchingPeriod","maintainVisibleContentPosition","minIndexForVisible","autoscrollToTopThreshold","renderScrollComponent","props","StyleSheet","create","overflow","paddingVertical","width","zIndex","flex"],"sourceRoot":"../../../../../src","sources":["modules/picker-sheet/components/wheel-picker.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAQA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AAAsD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC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BC,cAAc,EAAC,OAAO;MACtBC,qBAAqB,EAAE,KAAM;MAC7BC,IAAI,EAAEpF,aAAc;MACpBsC,UAAU,EAAEA,UAAW;MACvBS,YAAY,EAAEA,YAAa;MAC3BpB,aAAa,EAAEA,aAAc;MAC7B0D,kBAAkB,EAAE9E,iBAAiB,GAAGV,YAAa;MACrDf,mBAAmB,EAAEA,mBAAoB;MACzCwG,kBAAkB,EAAE7G,YAAY,GAAG,CAAE;MACrC8G,mBAAmB,EAAE9G,YAAY,GAAG,CAAE;MACtC+G,UAAU,EAAE,CAAE;MACdC,yBAAyB,EAAE,EAAG;MAC9BC,8BAA8B,EAAE;QAC9BC,kBAAkB,EAAE,CAAC;QACrBC,wBAAwB,EAAE;MAC5B,CAAE;MACFC,qBAAqB,EAAGC,KAAK,iBAC3B,IAAA1J,WAAA,CAAAqG,GAAA,EAAC7E,kBAAkB;QAAA,GAAKkI,KAAK;QAAEf,mBAAmB,EAAE;MAAG,CAAE;IACzD,CACH,CAAC;EAAA,CACE,CAAC;AAEX,CACF,CAAC;AAED,MAAM7B,MAAM,GAAG6C,uBAAU,CAACC,MAAM,CAAC;EAC/B7C,SAAS,EAAE;IACTP,QAAQ,EAAE,UAAU;IACpBqD,QAAQ,EAAE;EACZ,CAAC;EACDpB,gBAAgB,EAAE;IAChBqB,eAAe,EAAE;EACnB,CAAC;EACD/B,iBAAiB,EAAE;IACjBvB,QAAQ,EAAE,UAAU;IACpBuD,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,CAAC;EACX,CAAC;EACDzB,UAAU,EAAE;IACV0B,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -14,6 +14,17 @@ Object.keys(_wheelPicker).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
+ var _valueWheelPicker = require("./components/value-wheel-picker.js");
18
+ Object.keys(_valueWheelPicker).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _valueWheelPicker[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _valueWheelPicker[key];
25
+ }
26
+ });
27
+ });
17
28
  var _pickerSheet = require("./components/picker-sheet.js");
18
29
  Object.keys(_pickerSheet).forEach(function (key) {
19
30
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"names":["_wheelPicker","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_pickerSheet"],"sourceRoot":"../../../../src","sources":["modules/picker-sheet/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_wheelPicker","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_valueWheelPicker","_pickerSheet"],"sourceRoot":"../../../../src","sources":["modules/picker-sheet/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAM,YAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,YAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,YAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,YAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -64,16 +64,19 @@ const MyComponent = () => {
64
64
 
65
65
  ## Props
66
66
 
67
- | Prop | Type | Description |
68
- | ------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
69
- | questionnaire | Questionnaire | The FHIR Questionnaire resource to render |
70
- | onSubmit | (values: QuestionnaireFormValues, formikHelpers?: FormikHelpers<QuestionnaireFormValues>) => Promise<void> | Optional callback for form submission |
71
- | onSuccess | (response: QuestionnaireResponse) => void | Optional callback when form is submitted successfully |
72
- | onError | (error: Error) => void | Optional callback when form submission fails |
73
- | initialValues | Partial<QuestionnaireFormValues> | Optional initial values for the form |
74
- | children | ReactNode | Child components for custom layout |
75
- | style | ViewStyle | Optional styles for the container |
76
- | testID | string | Test ID for testing |
67
+ | Prop | Type | Description |
68
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
69
+ | questionnaire | Questionnaire | The FHIR Questionnaire resource to render |
70
+ | onSubmit | (values: QuestionnaireFormValues, formikHelpers?: FormikHelpers<QuestionnaireFormValues>) => Promise<void> | Optional callback for form submission |
71
+ | onSuccess | (response: QuestionnaireResponse) => void | Optional callback when form is submitted successfully |
72
+ | onError | (error: Error) => void | Optional callback when form submission fails |
73
+ | initialValues | Partial<QuestionnaireFormValues> | Optional initial values for the form |
74
+ | renderItem | QuestionnaireItemRenderer | Optional host control for any non-group FHIR item |
75
+ | resolveQuestionnaireConstraint | QuestionnaireConstraintResolver | Resolves SDC calculated min/max values with the host's expression context |
76
+ | resolveQuestionnaireUnitOptions | QuestionnaireUnitOptionsResolver | Supplies a cached expansion for an SDC `unitValueSet` canonical |
77
+ | children | ReactNode | Child components for custom layout |
78
+ | style | ViewStyle | Optional styles for the container |
79
+ | testID | string | Test ID for testing |
77
80
 
78
81
  Choose either the host-owned `onSubmit(values, formikHelpers?)` mode or the SDK-managed
79
82
  `onSuccess(response)` mode. `onError(error)` is optional in the SDK-managed mode. The
@@ -81,6 +84,33 @@ SDK-managed path requires the active `@ovok/core` client/profile context, create
81
84
  completed `QuestionnaireResponse`, adds the patient subject and a stable identifier,
82
85
  and persists it with `createResourceIfNoneExist`.
83
86
 
87
+ Custom `renderItem` controls receive a `constraints` object with `minValue`,
88
+ `maxValue`, `minQuantity`, `maxQuantity`, `step`, `minLength`, `maxLength`,
89
+ `unitOptions`, `unitValueSet`, and `unitOpen`. This lets an app use its own
90
+ controls and terminology cache without coupling the SDK to an expression or
91
+ terminology service. Implement `resolveQuestionnaireConstraint` for calculated
92
+ SDC bounds and `resolveQuestionnaireUnitOptions` for cached ValueSet expansions;
93
+ both callbacks are synchronous. If a calculated bound or unit ValueSet is not
94
+ resolved, a non-empty answer using it is not accepted as valid. Quantity bounds
95
+ are compared only when the answer and bound use the same UCUM code; convert
96
+ units in the host control before returning the answer when conversions are
97
+ needed.
98
+
99
+ Static date/dateTime bounds are passed to the date picker, numeric bounds and
100
+ steps are checked on navigation and submission, and simple-type length limits
101
+ are checked before submission. Bounded integer items and decimal items with an
102
+ explicit step use a touch wheel when the generated range contains at most 1,000
103
+ values; unconstrained, invalid, or larger ranges retain text entry. A displayed
104
+ wheel default is not saved until the person changes the selection. The typed
105
+ `ValueWheelPicker<T>` in `@ovok/native/picker-sheet` can render `unitOptions`;
106
+ use its `value` prop for the committed selection and `defaultIndex` only for a
107
+ display-only initial position.
108
+
109
+ Host-rendered quantity and duration controls can combine `minQuantity`,
110
+ `maxQuantity`, `unitOptions`, and the host-resolved `unitValueSet` in one or
111
+ more typed wheels. This keeps UCUM conversion and terminology lookup in the
112
+ host app while reusing the same generic picker in different forms and styles.
113
+
84
114
  ## Extended Properties
85
115
 
86
116
  In addition to standard FHIR QuestionnaireItem properties, the component supports these additional UI properties:
@@ -168,6 +198,15 @@ The form supports various field types through specialized components:
168
198
  - **QuestionnaireDateField**: Date picker
169
199
  - **QuestionnaireItemRenderer**: Dynamic field type renderer
170
200
 
201
+ The optional `renderItem` callback can provide host-designed controls for item
202
+ types without a built-in control, including `url`, `open-choice`, `quantity`,
203
+ `attachment`, and `reference`. Its `onChange` accepts either a primitive value
204
+ for built-in types or a typed FHIR answer value such as
205
+ `{ valueQuantity: { value: 2, unit: "mg" } }`. This preserves the corresponding
206
+ FHIR `value[x]` field in SDK-created responses and makes required custom items
207
+ participate in validation. Without a custom renderer, unsupported items show a
208
+ fallback and do not prevent continuing through the form.
209
+
171
210
  ## Context and Hooks
172
211
 
173
212
  The form provides a context and hooks for advanced customization:
@@ -253,16 +292,16 @@ const MyComponent = () => {
253
292
 
254
293
  #### QuestionnaireForm Props
255
294
 
256
- | Prop | Type | Description |
257
- | ------------- | ----------------------------------------- | ----------------------------------- |
258
- | questionnaire | Questionnaire | The questionnaire object to render |
259
- | onSubmit | (values: QuestionnaireFormValues, formikHelpers?) => Promise<void> | Host-owned submit callback |
260
- | onSuccess | (response: QuestionnaireResponse) => void | Called after SDK-managed persistence |
261
- | onError | (error: Error) => void | Called when SDK-managed persistence fails |
262
- | initialValues | Partial<QuestionnaireFormValues> | Initial values for the form |
263
- | paged | boolean | Whether to show one item at a time; defaults to true |
264
- | style | StyleProp<ViewStyle> | Style for the container |
265
- | testID | string | Test ID for the component |
295
+ | Prop | Type | Description |
296
+ | ------------- | ------------------------------------------------------------------ | ---------------------------------------------------- |
297
+ | questionnaire | Questionnaire | The questionnaire object to render |
298
+ | onSubmit | (values: QuestionnaireFormValues, formikHelpers?) => Promise<void> | Host-owned submit callback |
299
+ | onSuccess | (response: QuestionnaireResponse) => void | Called after SDK-managed persistence |
300
+ | onError | (error: Error) => void | Called when SDK-managed persistence fails |
301
+ | initialValues | Partial<QuestionnaireFormValues> | Initial values for the form |
302
+ | paged | boolean | Whether to show one item at a time; defaults to true |
303
+ | style | StyleProp<ViewStyle> | Style for the container |
304
+ | testID | string | Test ID for the component |
266
305
 
267
306
  #### QuestionnaireForm.Header Props
268
307
 
@@ -7,6 +7,7 @@ exports.QuestionnaireContentItem = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _useQuestionnaireForm = require("../../hooks/use-questionnaire-form.js");
10
+ var _questionnaireItemConstraints = require("../../utils/questionnaire-item-constraints.js");
10
11
  var _questionnaireItemRenderer = require("../fields/questionnaire-item-renderer.js");
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  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,6 +18,10 @@ const QuestionnaireContentItem = exports.QuestionnaireContentItem = /*#__PURE__*
17
18
  }) => {
18
19
  const {
19
20
  currentItem,
21
+ locale,
22
+ renderItem,
23
+ resolveQuestionnaireConstraint,
24
+ resolveQuestionnaireUnitOptions,
20
25
  values,
21
26
  setFieldValue
22
27
  } = (0, _useQuestionnaireForm.useQuestionnaireForm)();
@@ -39,6 +44,9 @@ const QuestionnaireContentItem = exports.QuestionnaireContentItem = /*#__PURE__*
39
44
  item: currentItem,
40
45
  value: value,
41
46
  onChange: onChange,
47
+ locale: locale,
48
+ renderItem: renderItem,
49
+ constraints: (0, _questionnaireItemConstraints.getQuestionnaireItemConstraints)(currentItem, values, resolveQuestionnaireConstraint, resolveQuestionnaireUnitOptions),
42
50
  testID: testID ? `${testID}-${itemId}` : `item-${itemId}`
43
51
  })
44
52
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_useQuestionnaireForm","_questionnaireItemRenderer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuestionnaireContentItem","exports","memo","style","testID","props","currentItem","values","setFieldValue","useQuestionnaireForm","onChange","useCallback","val","linkId","itemId","value","jsx","View","children","QuestionnaireItemRenderer","item"],"sourceRoot":"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CAAAD,wBAAA,gBAAG1B,KAAK,CAAC4B,IAAI,CAChD,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAE,GAAGC;AAAiB,CAAC,KAAK;EAC1C,MAAM;IAAEC,WAAW;IAAEC,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,0CAAoB,EAAC,CAAC;EAErE,MAAMC,QAAQ,GAAGpC,KAAK,CAACqC,WAAW,CAC/BC,GAAqB,IAAK;IACzB,IAAI,CAACN,WAAW,EAAEO,MAAM,EAAE;MACxB;IACF;IAEAL,aAAa,CAACF,WAAW,CAACO,MAAM,EAAED,GAAG,CAAC;EACxC,CAAC,EACD,CAACN,WAAW,EAAEO,MAAM,EAAEL,aAAa,CACrC,CAAC;EAED,IAAI,CAACF,WAAW,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,MAAMQ,MAAM,GAAGR,WAAW,CAACO,MAAM,IAAI,EAAE;EACvC,MAAME,KAAK,GAAGR,MAAM,CAACO,MAAM,CAAC;EAE5B,oBACE,IAAAlC,WAAA,CAAAoC,GAAA,EAACvC,YAAA,CAAAwC,IAAI;IAAA,GAAKZ,KAAK;IAAEF,KAAK,EAAEA,KAAM;IAACC,MAAM,EAAEA,MAAO;IAAAc,QAAA,eAC5C,IAAAtC,WAAA,CAAAoC,GAAA,EAACrC,0BAAA,CAAAwC,yBAAyB;MACxBC,IAAI,EAAEd,WAAY;MAClBS,KAAK,EAAEA,KAAM;MACbL,QAAQ,EAAEA,QAAS;MACnBN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIU,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_useQuestionnaireForm","_questionnaireItemConstraints","_questionnaireItemRenderer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuestionnaireContentItem","exports","memo","style","testID","props","currentItem","locale","renderItem","resolveQuestionnaireConstraint","resolveQuestionnaireUnitOptions","values","setFieldValue","useQuestionnaireForm","onChange","useCallback","val","linkId","itemId","value","jsx","View","children","QuestionnaireItemRenderer","item","constraints","getQuestionnaireItemConstraints"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-item.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,qBAAA,GAAAF,OAAA;AAEA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAAkF,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,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,CAAA,EAAAC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AAEA,MAAO;MACfC,UAAU,EAAEA,UAAW;MACvBiB,WAAW,EAAE,IAAAC,6DAA+B,EAC1CpB,WAAW,EACXK,MAAM,EACNF,8BAA8B,EAC9BC,+BACF,CAAE;MACFN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIc,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ exports.QuestionnaireContentSpecificItem = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _useQuestionnaireForm = require("../../hooks/use-questionnaire-form.js");
10
+ var _questionnaireItemConstraints = require("../../utils/questionnaire-item-constraints.js");
10
11
  var _questionnaireItemRenderer = require("../fields/questionnaire-item-renderer.js");
11
12
  var _jsxRuntime = require("react/jsx-runtime");
12
13
  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,6 +18,10 @@ const QuestionnaireContentSpecificItemComponent = /*#__PURE__*/React.memo(({
17
18
  ...props
18
19
  }) => {
19
20
  const {
21
+ locale,
22
+ renderItem,
23
+ resolveQuestionnaireConstraint,
24
+ resolveQuestionnaireUnitOptions,
20
25
  values,
21
26
  setFieldValue
22
27
  } = (0, _useQuestionnaireForm.useQuestionnaireForm)();
@@ -39,6 +44,9 @@ const QuestionnaireContentSpecificItemComponent = /*#__PURE__*/React.memo(({
39
44
  item: item,
40
45
  value: value,
41
46
  onChange: onChange,
47
+ locale: locale,
48
+ renderItem: renderItem,
49
+ constraints: (0, _questionnaireItemConstraints.getQuestionnaireItemConstraints)(item, values, resolveQuestionnaireConstraint, resolveQuestionnaireUnitOptions),
42
50
  testID: testID ? `${testID}-${itemId}` : `item-${itemId}`
43
51
  })
44
52
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_useQuestionnaireForm","_questionnaireItemRenderer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuestionnaireContentSpecificItemComponent","memo","style","testID","item","props","values","setFieldValue","useQuestionnaireForm","onChange","useCallback","val","linkId","itemId","value","jsx","View","children","QuestionnaireItemRenderer","QuestionnaireContentSpecificItem","exports"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,qBAAA,GAAAF,OAAA;AAEA,IAAAG,0BAAA,GAAAH,OAAA;AAAkF,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,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,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M;IAACC,MAAM,EAAEA,MAAO;IAAAc,QAAA,eAC5C,IAAArC,WAAA,CAAAmC,GAAA,EAACpC,0BAAA,CAAAuC,yBAAyB;MACxBd,IAAI,EAAEA,IAAK;MACXU,KAAK,EAAEA,KAAM;MACbL,QAAQ,EAAEA,QAAS;MACnBN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIU,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEM,MAAMM,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAC3CnB,yCAAyC","ignoreList":[]}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_useQuestionnaireForm","_questionnaireItemConstraints","_questionnaireItemRenderer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuestionnaireContentSpecificItemComponent","memo","style","testID","item","props","locale","renderItem","resolveQuestionnaireConstraint","resolveQuestionnaireUnitOptions","values","setFieldValue","useQuestionnaireForm","onChange","useCallback","val","linkId","itemId","value","jsx","View","children","QuestionnaireItemRenderer","constraints","getQuestionnaireItemConstraints","QuestionnaireContentSpecificItem","exports"],"sourceRoot":"../../../../../../src","sources":["modules/questionnaire-response-form/components/content/questionnaire-content-specific-item.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,qBAAA,GAAAF,OAAA;AAGA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAAkF,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC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AAED,GAAG,CAAC;EACjC,CAAC,EACD,CAACX,IAAI,EAAEY,MAAM,EAAEL,aAAa,CAC9B,CAAC;EAED,IAAI,CAACP,IAAI,EAAE;IACT,OAAO,IAAI;EACb;EAEA,MAAMa,MAAM,GAAGb,IAAI,CAACY,MAAM,IAAI,EAAE;EAChC,MAAME,KAAK,GAAGR,MAAM,CAACO,MAAM,CAAC;EAE5B,oBACE,IAAArC,WAAA,CAAAuC,GAAA,EAAC3C,YAAA,CAAA4C,IAAI;IAAA,GAAKf,KAAK;IAAEH,KAAK,EAAEA,KAAM;IAACC,MAAM,EAAEA,MAAO;IAAAkB,QAAA,eAC5C,IAAAzC,WAAA,CAAAuC,GAAA,EAACxC,0BAAA,CAAA2C,yBAAyB;MACxBlB,IAAI,EAAEA,IAAK;MACXc,KAAK,EAAEA,KAAM;MACbL,QAAQ,EAAEA,QAAS;MACnBP,MAAM,EAAEA,MAAO;MACfC,UAAU,EAAEA,UAAW;MACvBgB,WAAW,EAAE,IAAAC,6DAA+B,EAC1CpB,IAAI,EACJM,MAAM,EACNF,8BAA8B,EAC9BC,+BACF,CAAE;MACFN,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,IAAIc,MAAM,EAAE,GAAG,QAAQA,MAAM;IAAG,CAC3D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEM,MAAMQ,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAC3CzB,yCAAyC","ignoreList":[]}
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _reactNativePaper = require("react-native-paper");
10
10
  var _index = require("../../../../theme/index.js");
11
11
  var _index2 = require("../../../hooks/index.js");
12
+ var _translateFhirText = require("../../../utils/translate-fhir-text.js");
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  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); }
14
15
  const QuestionnaireFieldWrapper = exports.QuestionnaireFieldWrapper = /*#__PURE__*/React.memo(({
@@ -19,8 +20,12 @@ const QuestionnaireFieldWrapper = exports.QuestionnaireFieldWrapper = /*#__PURE_
19
20
  }) => {
20
21
  const theme = (0, _index.useAppTheme)();
21
22
  const {
23
+ locale,
22
24
  paged
23
25
  } = (0, _index2.useQuestionnaireForm)();
26
+ const prefix = (0, _translateFhirText.translateFhirText)(item.prefix, item._prefix, locale);
27
+ const questionText = (0, _translateFhirText.translateFhirText)(item.text, item._text, locale);
28
+ const helperText = (0, _translateFhirText.translateFhirText)(item.helperText, item._helperText, locale);
24
29
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
25
30
  testID: testID,
26
31
  style: [styles.container, {
@@ -31,18 +36,18 @@ const QuestionnaireFieldWrapper = exports.QuestionnaireFieldWrapper = /*#__PURE_
31
36
  style: [styles.title, {
32
37
  color: theme.colors.onSurface
33
38
  }],
34
- children: [item.text, item.required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.Text, {
39
+ children: [prefix ? `${prefix} ` : "", questionText, item.required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.Text, {
35
40
  style: {
36
41
  color: theme.colors.error
37
42
  },
38
43
  children: " *"
39
44
  })]
40
- }), children, item.helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.Text, {
45
+ }), children, helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativePaper.Text, {
41
46
  variant: "bodySmall",
42
47
  style: [{
43
48
  color: theme.colors.onSurfaceVariant
44
49
  }],
45
- children: item.helperText
50
+ children: helperText
46
51
  })]
47
52
  });
48
53
  });