@verifiedinc-public/shared-ui-elements 8.21.0 → 8.21.2

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 (432) hide show
  1. package/dist/components/Alert/Alert.mjs +1 -0
  2. package/dist/components/Alert/FullWidthAlert.mjs +1 -0
  3. package/dist/components/Backdrop/index.mjs +1 -0
  4. package/dist/components/Banners/Banner.mjs +1 -0
  5. package/dist/components/Banners/ExactBirthdayBanner.mjs +1 -0
  6. package/dist/components/Banners/ResendPhoneBanner.mjs +1 -0
  7. package/dist/components/Banners/TestPhoneNumbersBanner.mjs +1 -0
  8. package/dist/components/BrandFilterInput/BrandFilterInput.hook.mjs +1 -0
  9. package/dist/components/BrandFilterInput/index.mjs +1 -0
  10. package/dist/components/Button/index.mjs +1 -0
  11. package/dist/components/CredentialRequestsEditor/CredentialRequestsEditor.context.mjs +1 -0
  12. package/dist/components/CredentialRequestsEditor/components/CredentialRequestsField.mjs +1 -0
  13. package/dist/components/CredentialRequestsEditor/components/DataFieldAccordion.mjs +1 -0
  14. package/dist/components/CredentialRequestsEditor/components/DataFieldDeleteModal.mjs +1 -0
  15. package/dist/components/CredentialRequestsEditor/components/DataFieldDescription.mjs +3 -0
  16. package/dist/components/CredentialRequestsEditor/components/DataFieldMandatory.mjs +3 -0
  17. package/dist/components/CredentialRequestsEditor/components/DataFieldMulti.mjs +3 -0
  18. package/dist/components/CredentialRequestsEditor/components/DataFieldOptionType.mjs +3 -0
  19. package/dist/components/CredentialRequestsEditor/components/DataFieldSection.mjs +1 -0
  20. package/dist/components/CredentialRequestsEditor/components/DataFieldUserInput.mjs +3 -0
  21. package/dist/components/CredentialRequestsEditor/components/RadioOption.mjs +1 -0
  22. package/dist/components/CredentialRequestsEditor/contexts/CredentialRequestFieldContext.mjs +1 -0
  23. package/dist/components/CredentialRequestsEditor/index.mjs +1 -0
  24. package/dist/components/CredentialRequestsEditor/types/mandatoryEnum.mjs +1 -0
  25. package/dist/components/CredentialRequestsEditor/types/sdk.mjs +1 -0
  26. package/dist/components/CredentialRequestsEditor/utils/buildDataFieldValue.mjs +1 -0
  27. package/dist/components/CredentialRequestsEditor/utils/prettyField.mjs +1 -0
  28. package/dist/components/CredentialRequestsEditor/utils/propagateToChildren.mjs +1 -0
  29. package/dist/components/Image.mjs +1 -0
  30. package/dist/components/QRCodeDisplay/index.mjs +1 -0
  31. package/dist/components/RequiredLabel/index.mjs +1 -0
  32. package/dist/components/Snackbar/index.mjs +1 -0
  33. package/dist/components/TextField/index.mjs +1 -0
  34. package/dist/components/Tip/index.mjs +1 -0
  35. package/dist/components/Typography/index.mjs +1 -0
  36. package/dist/components/UI/AdaptativeBox.mjs +1 -0
  37. package/dist/components/UI/ContentWithLoader.mjs +1 -0
  38. package/dist/components/When.mjs +1 -0
  39. package/dist/components/WhenStyled.mjs +1 -0
  40. package/dist/components/animation/AnimatedHeight.mjs +1 -0
  41. package/dist/components/animation/Counter.mjs +1 -0
  42. package/dist/components/animation/index.mjs +1 -1
  43. package/dist/components/animation/motions.mjs +1 -0
  44. package/dist/components/buttons/ExportToPdfButton.mjs +1 -0
  45. package/dist/components/buttons/LinkButton.mjs +1 -0
  46. package/dist/components/buttons/OriginalButton.mjs +1 -0
  47. package/dist/components/buttons/TextButton.mjs +1 -0
  48. package/dist/components/chart/AreaChart/AreaChart.map.mjs +1 -0
  49. package/dist/components/chart/AreaChart/index.mjs +1 -0
  50. package/dist/components/chart/BigNumber/index.mjs +1 -0
  51. package/dist/components/chart/EmptyChartSection.mjs +1 -0
  52. package/dist/components/chart/ErrorCodesChart/index.mjs +1 -0
  53. package/dist/components/chart/FunnelChart/index.mjs +1 -0
  54. package/dist/components/chart/LoadingChartSection.mjs +1 -0
  55. package/dist/components/chart/MetricLastUpdated.mjs +1 -0
  56. package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTable.mjs +1 -0
  57. package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTableDataMapper.mjs +1 -0
  58. package/dist/components/chart/NoRiskSignalsPermissionSection/index.mjs +1 -0
  59. package/dist/components/chart/OneClickHealthBigNumbers/OneClickHealthBigNumbers.mjs +1 -0
  60. package/dist/components/chart/OneClickHealthBigNumbers/OneClickHealthBigNumbersMapper.mjs +1 -0
  61. package/dist/components/chart/OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.map.mjs +1 -0
  62. package/dist/components/chart/OneClickHealthOverTimeChart/OneClickHealthOverTimeChart.mjs +1 -0
  63. package/dist/components/chart/OneClickHealthPercentageChart/OneClickHealthPercentageChart.mjs +1 -0
  64. package/dist/components/chart/OneClickOverTimeChart/OneClickOverTimeChart.map.mjs +1 -0
  65. package/dist/components/chart/OneClickOverTimeChart/OneClickOverTimeChart.mjs +1 -0
  66. package/dist/components/chart/OneClickPercentageChart/OneClickPercentageChart.mjs +1 -0
  67. package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbers.mjs +1 -0
  68. package/dist/components/chart/OneClickVerificationBigNumbers/OneClickVerificationBigNumbersMapper.mjs +1 -0
  69. package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs +1 -0
  70. package/dist/components/chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs +1 -0
  71. package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.mjs +1 -0
  72. package/dist/components/chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.mjs +1 -0
  73. package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.map.mjs +1 -0
  74. package/dist/components/chart/OneClickVerificationOutcomeOverTimeChart/OneClickVerificationOutcomeOverTimeChart.mjs +1 -0
  75. package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs +1 -0
  76. package/dist/components/chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs +1 -0
  77. package/dist/components/chart/PieChart/index.mjs +1 -0
  78. package/dist/components/chart/PieChart/renderActiveShape.mjs +1 -0
  79. package/dist/components/chart/PieChart/renderNeedle.mjs +1 -0
  80. package/dist/components/chart/ReasonCodesChart/index.mjs +1 -0
  81. package/dist/components/chart/RiskScoreBarChart/index.mjs +1 -0
  82. package/dist/components/chart/RiskScorePieChart/index.mjs +1 -0
  83. package/dist/components/chart/SeriesChart/SeriesChart.map.mjs +1 -0
  84. package/dist/components/chart/SeriesChart/index.mjs +1 -0
  85. package/dist/components/chart/SeriesChartLegend/index.mjs +1 -0
  86. package/dist/components/chart/SeriesPercentageChart/index.mjs +1 -0
  87. package/dist/components/chart/SeriesPercentageChartLegend/index.mjs +1 -0
  88. package/dist/components/chart/SignupBigNumbers/SignupBigNumbers.mjs +1 -0
  89. package/dist/components/chart/SignupBigNumbers/SignupBigNumbersMapper.mjs +1 -0
  90. package/dist/components/chart/SimpleBarChart/index.mjs +1 -0
  91. package/dist/components/chart/SimpleLegend/index.mjs +1 -0
  92. package/dist/components/chart/TTSBigNumbers/TTSBigNumbers.mjs +1 -0
  93. package/dist/components/chart/TTSBigNumbers/TTSBigNumbersMapper.mjs +1 -0
  94. package/dist/components/chart/TTSOverTimeChart/TTSOverTimeChart.map.mjs +1 -0
  95. package/dist/components/chart/TTSOverTimeChart/TTSOverTimeChart.mjs +1 -0
  96. package/dist/components/chart/constants.mjs +1 -0
  97. package/dist/components/chart/index.mjs +1 -1
  98. package/dist/components/chart/shared.mjs +1 -0
  99. package/dist/components/chart/styles.mjs +1 -0
  100. package/dist/components/dialog/CalendlyDialog.mjs +1 -0
  101. package/dist/components/dialog/Dialog.mjs +1 -0
  102. package/dist/components/dialog/PersistentDialog.mjs +8 -0
  103. package/dist/components/form/AddressInput/autofill.hook.mjs +1 -0
  104. package/dist/components/form/AddressInput/context.mjs +1 -0
  105. package/dist/components/form/AddressInput/hook.mjs +1 -0
  106. package/dist/components/form/AddressInput/index.mjs +1 -0
  107. package/dist/components/form/BasePhoneInput.mjs +1 -0
  108. package/dist/components/form/CountrySelector.mjs +1 -0
  109. package/dist/components/form/DataFieldClearAdornment.mjs +1 -0
  110. package/dist/components/form/DateInput/index.mjs +1 -0
  111. package/dist/components/form/DateRangeInput/index.mjs +1 -0
  112. package/dist/components/form/DateRangeInput/style.mjs +1 -0
  113. package/dist/components/form/DefaultInput.mjs +1 -0
  114. package/dist/components/form/EmailInput.mjs +1 -0
  115. package/dist/components/form/InputMask.mjs +1 -0
  116. package/dist/components/form/NPIInput/index.mjs +1 -0
  117. package/dist/components/form/NewOneClickForm/core/fields/address.mjs +1 -0
  118. package/dist/components/form/NewOneClickForm/core/fields/birthDate.mjs +1 -0
  119. package/dist/components/form/NewOneClickForm/core/fields/constants.mjs +1 -0
  120. package/dist/components/form/NewOneClickForm/core/fields/driversLicense.mjs +1 -0
  121. package/dist/components/form/NewOneClickForm/core/fields/fullName.mjs +1 -0
  122. package/dist/components/form/NewOneClickForm/core/fields/index.mjs +1 -0
  123. package/dist/components/form/NewOneClickForm/core/fields/phone.mjs +1 -0
  124. package/dist/components/form/NewOneClickForm/core/fields/sex.mjs +1 -0
  125. package/dist/components/form/NewOneClickForm/core/fields/ssn.mjs +1 -0
  126. package/dist/components/form/NewOneClickForm/core/form/form.mjs +1 -0
  127. package/dist/components/form/NewOneClickForm/core/form/formBuilder.mjs +1 -0
  128. package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -0
  129. package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -0
  130. package/dist/components/form/NewOneClickForm/core/form/utils.mjs +1 -0
  131. package/dist/components/form/NewOneClickForm/core/formats/address.format.mjs +1 -0
  132. package/dist/components/form/NewOneClickForm/core/formats/date.format.mjs +1 -0
  133. package/dist/components/form/NewOneClickForm/core/formats/ssn.format.mjs +1 -0
  134. package/dist/components/form/NewOneClickForm/core/formats/state.format.mjs +1 -0
  135. package/dist/components/form/NewOneClickForm/core/mappers/create-patch.map.mjs +1 -0
  136. package/dist/components/form/NewOneClickForm/core/mappers/share.map.mjs +1 -0
  137. package/dist/components/form/NewOneClickForm/core/shared/us-states.mjs +1 -0
  138. package/dist/components/form/NewOneClickForm/core/validations/address/address.schema.mjs +1 -0
  139. package/dist/components/form/NewOneClickForm/core/validations/address/city.schema.mjs +1 -0
  140. package/dist/components/form/NewOneClickForm/core/validations/address/country.schema.mjs +1 -0
  141. package/dist/components/form/NewOneClickForm/core/validations/address/line1.schema.mjs +1 -0
  142. package/dist/components/form/NewOneClickForm/core/validations/address/line2.schema.mjs +1 -0
  143. package/dist/components/form/NewOneClickForm/core/validations/address/state.schema.mjs +1 -0
  144. package/dist/components/form/NewOneClickForm/core/validations/address/zipcode.schema.mjs +1 -0
  145. package/dist/components/form/NewOneClickForm/core/validations/driversLicense/driversLicense.schema.mjs +1 -0
  146. package/dist/components/form/NewOneClickForm/core/validations/name/first.schema.mjs +1 -0
  147. package/dist/components/form/NewOneClickForm/core/validations/name/fullName.schema.mjs +1 -0
  148. package/dist/components/form/NewOneClickForm/core/validations/name/last.schema.mjs +1 -0
  149. package/dist/components/form/NewOneClickForm/core/validations/name/middle.schema.mjs +1 -0
  150. package/dist/components/form/NewOneClickForm/core/validations/other/birthDate.schema.mjs +1 -0
  151. package/dist/components/form/NewOneClickForm/core/validations/other/date.schema.mjs +1 -0
  152. package/dist/components/form/NewOneClickForm/core/validations/other/documentNumber.schema.mjs +1 -0
  153. package/dist/components/form/NewOneClickForm/core/validations/other/phone.schema.mjs +1 -0
  154. package/dist/components/form/NewOneClickForm/core/validations/other/sex.schema.mjs +1 -0
  155. package/dist/components/form/NewOneClickForm/core/validations/other/ssn.schema.mjs +1 -0
  156. package/dist/components/form/NewOneClickForm/react/core/field.hook.mjs +1 -0
  157. package/dist/components/form/NewOneClickForm/react/core/form.context.mjs +1 -0
  158. package/dist/components/form/NewOneClickForm/react/ui/fields/input/address.field.mjs +1 -0
  159. package/dist/components/form/NewOneClickForm/react/ui/fields/input/clear-field-adornment.mjs +1 -0
  160. package/dist/components/form/NewOneClickForm/react/ui/fields/input/date.field.mjs +1 -0
  161. package/dist/components/form/NewOneClickForm/react/ui/fields/input/field.mjs +1 -0
  162. package/dist/components/form/NewOneClickForm/react/ui/fields/input/label.mjs +1 -0
  163. package/dist/components/form/NewOneClickForm/react/ui/fields/input/select.field.mjs +1 -0
  164. package/dist/components/form/NewOneClickForm/react/ui/fields/input/ssn.field.mjs +1 -0
  165. package/dist/components/form/NewOneClickForm/react/ui/fields/input/text.field.mjs +1 -0
  166. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/field.mjs +1 -0
  167. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/multi.field.mjs +1 -0
  168. package/dist/components/form/NewOneClickForm/react/ui/fields/readonly/single.field.mjs +1 -0
  169. package/dist/components/form/NewOneClickForm/react/ui/fields/shared.mjs +1 -0
  170. package/dist/components/form/NewOneClickForm/react/ui/fields/style.mjs +1 -0
  171. package/dist/components/form/NewOneClickForm/react/ui/form-content.mjs +1 -0
  172. package/dist/components/form/NewOneClickForm/react/ui/form.context.mjs +1 -0
  173. package/dist/components/form/NewOneClickForm/react/ui/form.mjs +1 -0
  174. package/dist/components/form/OTPInput.mjs +1 -0
  175. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplay.mjs +1 -0
  176. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayContext.mjs +1 -0
  177. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItem.mjs +1 -0
  178. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItemContext.mjs +1 -0
  179. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/EditModeButton.mjs +1 -0
  180. package/dist/components/form/OneClickForm/components/CredentialsDisplay/hooks.mjs +1 -0
  181. package/dist/components/form/OneClickForm/components/CredentialsDisplay/types.mjs +1 -0
  182. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.mjs +1 -0
  183. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractTypesFromSchema.mjs +1 -0
  184. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/filterRepeatedCredentials.mjs +1 -0
  185. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCorrectSchemaProperty.mjs +1 -0
  186. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCredentialsByType.mjs +1 -0
  187. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialTypeDisplayInfo.mjs +1 -0
  188. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialValues.mjs +1 -0
  189. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getLastPathName.mjs +1 -0
  190. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getParentPath.mjs +1 -0
  191. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getReferencedSchemaNames.mjs +1 -0
  192. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/hasMandatoryFieldEmpty.mjs +1 -0
  193. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialAgainstInstance.mjs +1 -0
  194. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialValues.mjs +1 -0
  195. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isRequiredCredentialDisplayInfo.mjs +1 -0
  196. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isSomeFieldInputAllowed.mjs +1 -0
  197. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isValidInputCredential.mjs +1 -0
  198. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/makeCredentialDisplayInfoList.mjs +1 -0
  199. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/sortCredentialsBySchema.mjs +1 -0
  200. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormObject.mjs +1 -0
  201. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormSchema.mjs +1 -0
  202. package/dist/components/form/OneClickForm/components/DataField/DataFieldAtomic.mjs +1 -0
  203. package/dist/components/form/OneClickForm/components/DataField/DataFieldCheckbox.mjs +1 -0
  204. package/dist/components/form/OneClickForm/components/DataField/DataFieldClearAdornment.mjs +1 -0
  205. package/dist/components/form/OneClickForm/components/DataField/DataFieldComposite.mjs +1 -0
  206. package/dist/components/form/OneClickForm/components/DataField/DataFieldDescription.mjs +1 -0
  207. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/index.mjs +1 -0
  208. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/styles.mjs +1 -0
  209. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/getAddressFormat.mjs +1 -0
  210. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/renderInstance.mjs +1 -0
  211. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/index.mjs +1 -0
  212. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputLabel.mjs +1 -0
  213. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabel.mjs +1 -0
  214. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabelText.mjs +1 -0
  215. package/dist/components/form/OneClickForm/components/DataField/DataFieldLeftSide.mjs +1 -0
  216. package/dist/components/form/OneClickForm/components/DataField/DataFieldLegend.mjs +1 -0
  217. package/dist/components/form/OneClickForm/components/DataField/DataFieldRootStack.mjs +1 -0
  218. package/dist/components/form/OneClickForm/components/DataField/DataFieldStack.mjs +1 -0
  219. package/dist/components/form/OneClickForm/components/DataField/DataFieldValue.mjs +1 -0
  220. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldImage.mjs +1 -0
  221. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldText.mjs +1 -0
  222. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/autofill.hook.mjs +1 -0
  223. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/hook.mjs +1 -0
  224. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/index.mjs +1 -0
  225. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldDateInput.mjs +1 -0
  226. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldImageInput.mjs +1 -0
  227. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldPhoneInput.mjs +1 -0
  228. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSSNInput.mjs +1 -0
  229. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSelectInput.mjs +1 -0
  230. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldTextInput.mjs +1 -0
  231. package/dist/components/form/OneClickForm/components/DataField/types.mjs +1 -0
  232. package/dist/components/form/OneClickForm/components/DataField/utils/defaults.mjs +1 -0
  233. package/dist/components/form/OneClickForm/components/DataField/utils/getAutoCompleteAttributeValue.mjs +1 -0
  234. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabel.mjs +1 -0
  235. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabelInput.mjs +1 -0
  236. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialSeparator.mjs +1 -0
  237. package/dist/components/form/OneClickForm/components/shared/Image.mjs +1 -0
  238. package/dist/components/form/OneClickForm/components/shared/ImageEncoded.mjs +1 -0
  239. package/dist/components/form/OneClickForm/components/shared/When.mjs +1 -0
  240. package/dist/components/form/OneClickForm/components/validations/fragments/birthDate.mjs +1 -0
  241. package/dist/components/form/OneClickForm/components/validations/fragments/credentials.mjs +1 -0
  242. package/dist/components/form/OneClickForm/components/validations/fragments/email.mjs +1 -0
  243. package/dist/components/form/OneClickForm/components/validations/schemas/date.schema.mjs +1 -0
  244. package/dist/components/form/OneClickForm/constants/credentialTypes.mjs +1 -0
  245. package/dist/components/form/OneClickForm/contexts/one-click-form-options.context.mjs +1 -0
  246. package/dist/components/form/OneClickForm/hooks/useCanFillByQueryParam.mjs +1 -0
  247. package/dist/components/form/OneClickForm/hooks/useDebounceCallback.mjs +1 -0
  248. package/dist/components/form/OneClickForm/index.mjs +1 -0
  249. package/dist/components/form/OneClickForm/styles/input.mjs +1 -0
  250. package/dist/components/form/OneClickForm/types/display-format.mjs +1 -0
  251. package/dist/components/form/OneClickForm/types/input-format.mjs +1 -0
  252. package/dist/components/form/OneClickForm/utils/calendarDateFormatter.mjs +1 -0
  253. package/dist/components/form/OneClickForm/utils/compareCredentialData.mjs +1 -0
  254. package/dist/components/form/OneClickForm/utils/currencyRangeFormatter.mjs +1 -0
  255. package/dist/components/form/OneClickForm/utils/date.mjs +1 -0
  256. package/dist/components/form/OneClickForm/utils/formatCredentialValue.mjs +1 -0
  257. package/dist/components/form/OneClickForm/utils/image.mjs +1 -0
  258. package/dist/components/form/OneClickForm/utils/isAtomicBySchema.mjs +1 -0
  259. package/dist/components/form/OneClickForm/utils/isCompositeBySchema.mjs +1 -0
  260. package/dist/components/form/OneClickForm/utils/phone.mjs +1 -0
  261. package/dist/components/form/OneClickForm/utils/phoneNumberFormatter.mjs +1 -0
  262. package/dist/components/form/OneClickForm/utils/regex.mjs +1 -0
  263. package/dist/components/form/OneClickForm/utils/ssnFormatter.mjs +1 -0
  264. package/dist/components/form/OneClickForm/utils/string.mjs +1 -0
  265. package/dist/components/form/OneClickForm/utils/when.mjs +1 -0
  266. package/dist/components/form/PhoneInput.mjs +1 -0
  267. package/dist/components/form/PrettyPhoneInput.mjs +64 -0
  268. package/dist/components/form/RadioOption.mjs +1 -0
  269. package/dist/components/form/SSNInput.mjs +1 -0
  270. package/dist/components/form/SelectInput.mjs +1 -0
  271. package/dist/components/form/TextMaskCustom.mjs +1 -0
  272. package/dist/components/form/TimezoneInput/index.mjs +1 -0
  273. package/dist/components/form/TimezoneInput/timezones.mjs +1 -0
  274. package/dist/components/icons/IconPlayer.mjs +1 -0
  275. package/dist/components/index.mjs +1 -1
  276. package/dist/components/terms/AcceptTermsNotice.mjs +1 -0
  277. package/dist/components/terms/LegalLink.mjs +1 -0
  278. package/dist/components/terms/PrivacyPolicyNotice.mjs +1 -0
  279. package/dist/components/text-to-signup/magic-button.mjs +1 -0
  280. package/dist/components/text-to-signup/magic-legal-language.mjs +1 -0
  281. package/dist/components/text-to-signup/magic-qr-code.mjs +1 -0
  282. package/dist/components/typographies/PageHeader.mjs +1 -0
  283. package/dist/components/typographies/PageSectionHeader.mjs +1 -0
  284. package/dist/components/typographies/Paragraph.mjs +1 -0
  285. package/dist/components/typographies/SectionDescription.mjs +1 -0
  286. package/dist/components/typographies/SectionHeader.mjs +1 -0
  287. package/dist/components/typographies/SectionTitle.mjs +1 -0
  288. package/dist/components/typographies/index.mjs +1 -1
  289. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/black.mjs +1 -0
  290. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/blackGreen.mjs +1 -0
  291. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/gray.mjs +1 -0
  292. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/green.mjs +1 -0
  293. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/index.mjs +1 -0
  294. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/white.mjs +1 -0
  295. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Access powered by Verified/whiteGreen.mjs +1 -0
  296. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/black.mjs +1 -0
  297. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/blackGreen.mjs +1 -0
  298. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/gray.mjs +1 -0
  299. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/green.mjs +1 -0
  300. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/index.mjs +1 -0
  301. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/white.mjs +1 -0
  302. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Apply powered by Verified/whiteGreen.mjs +1 -0
  303. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/black.mjs +1 -0
  304. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/blackGreen.mjs +1 -0
  305. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/gray.mjs +1 -0
  306. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/green.mjs +1 -0
  307. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/index.mjs +1 -0
  308. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/white.mjs +1 -0
  309. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click AutoFill powered by Verified/whiteGreen.mjs +1 -0
  310. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/black.mjs +1 -0
  311. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/blackGreen.mjs +1 -0
  312. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/gray.mjs +1 -0
  313. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/green.mjs +1 -0
  314. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/index.mjs +1 -0
  315. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/white.mjs +1 -0
  316. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Login powered by Verified/whiteGreen.mjs +1 -0
  317. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/black.mjs +1 -0
  318. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/blackGreen.mjs +1 -0
  319. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/gray.mjs +1 -0
  320. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/green.mjs +1 -0
  321. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/index.mjs +1 -0
  322. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/white.mjs +1 -0
  323. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Signup powered by Verified/whiteGreen.mjs +1 -0
  324. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/black.mjs +1 -0
  325. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/blackGreen.mjs +1 -0
  326. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/gray.mjs +1 -0
  327. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/green.mjs +1 -0
  328. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/index.mjs +1 -0
  329. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/white.mjs +1 -0
  330. package/dist/components/verified/OneClickPoweredByVerified/components/1-Click Verify powered by Verified/whiteGreen.mjs +1 -0
  331. package/dist/components/verified/OneClickPoweredByVerified/index.mjs +1 -0
  332. package/dist/components/verified/VerifiedImage.mjs +1 -0
  333. package/dist/components/verified/VerifiedIncLogo.mjs +1 -0
  334. package/dist/components/verified/powered-by-verified/index.mjs +1 -0
  335. package/dist/{shared/email-B-xO6du4.mjs → constants/email.mjs} +1 -1
  336. package/dist/constants/index.mjs +1 -1
  337. package/dist/{shared/metrics-BWSI1rAo.mjs → constants/metrics.mjs} +1 -1
  338. package/dist/contexts/index.mjs +1 -1
  339. package/dist/contexts/metrics/Metrics.context.mjs +1 -0
  340. package/dist/contexts/tunnel/index.mjs +1 -0
  341. package/dist/hooks/index.mjs +1 -1
  342. package/dist/hooks/metrics/useColorMap.mjs +1 -0
  343. package/dist/hooks/text-to-signup/magic-link.mjs +1 -0
  344. package/dist/hooks/text-to-signup/magic-qr-code-options.mjs +1 -0
  345. package/dist/hooks/text-to-signup/magic-qr-code.mjs +1 -0
  346. package/dist/hooks/text-to-signup/magic-text.mjs +1 -0
  347. package/dist/hooks/useCallbackRef.mjs +1 -0
  348. package/dist/hooks/useCopyToClipboard.mjs +1 -0
  349. package/dist/{shared/useCounter-BV32zXDQ.mjs → hooks/useCounter.mjs} +1 -1
  350. package/dist/hooks/useDebounceCallback.mjs +1 -0
  351. package/dist/hooks/useDebounceValue.mjs +1 -0
  352. package/dist/hooks/useDisclosure.mjs +1 -0
  353. package/dist/hooks/useGoogleFont.mjs +1 -0
  354. package/dist/hooks/useIntersectionObserver.mjs +1 -0
  355. package/dist/{shared/useLocalStorage-OKgpJYer.mjs → hooks/useLocalStorage.mjs} +1 -1
  356. package/dist/hooks/useNavigatorOnline.mjs +1 -0
  357. package/dist/hooks/useNetworkType.mjs +1 -0
  358. package/dist/hooks/useOnClickOutside.mjs +1 -0
  359. package/dist/hooks/usePersistedReducer.mjs +1 -0
  360. package/dist/hooks/usePrevious.mjs +1 -0
  361. package/dist/hooks/useQRCode.mjs +1 -0
  362. package/dist/hooks/useResizeObserver.mjs +1 -0
  363. package/dist/hooks/useScript.mjs +1 -0
  364. package/dist/hooks/useSearchParams.mjs +1 -0
  365. package/dist/hooks/useStyledQRCode.mjs +1 -0
  366. package/dist/hooks/useThrottle.mjs +1 -0
  367. package/dist/hooks/useToggle.mjs +1 -0
  368. package/dist/hooks/useWindowScroll.mjs +1 -0
  369. package/dist/hooks/useWindowSize.mjs +1 -0
  370. package/dist/index.mjs +1 -1
  371. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1 -0
  372. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +1 -0
  373. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs +1 -0
  374. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs +1 -0
  375. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -0
  376. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +1 -0
  377. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +1 -0
  378. package/dist/node_modules/clsx/dist/clsx.mjs +1 -0
  379. package/dist/node_modules/react-datepicker/dist/es/index.mjs +1 -0
  380. package/dist/styles/colors.mjs +1 -0
  381. package/dist/styles/index.mjs +1 -1
  382. package/dist/styles/lib/react-datepicker.css.mjs +1 -0
  383. package/dist/styles/shadows.mjs +1 -0
  384. package/dist/styles/theme.mjs +1 -0
  385. package/dist/styles/typography.mjs +1 -0
  386. package/dist/utils/date.mjs +1 -0
  387. package/dist/utils/index.mjs +1 -1
  388. package/dist/utils/makeGoogleFont.mjs +1 -0
  389. package/dist/{shared/notification-sBaCxCY5.mjs → utils/notification.mjs} +1 -1
  390. package/dist/utils/number/formatters.mjs +1 -0
  391. package/dist/utils/omitProperty.mjs +1 -0
  392. package/dist/utils/phone/index.mjs +1 -1
  393. package/dist/utils/ssn.mjs +1 -0
  394. package/dist/utils/string/formatKebabToPretty.mjs +1 -0
  395. package/dist/{shared/generateKeyFromString-D1AuwK4y.mjs → utils/string/generateKeyFromString.mjs} +1 -1
  396. package/dist/utils/string/index.mjs +1 -1
  397. package/dist/utils/string/toCapitalize.mjs +1 -0
  398. package/dist/utils/string/toSentenceCase.mjs +1 -0
  399. package/dist/utils/uuidColor.mjs +1 -0
  400. package/dist/validations/address.schema.mjs +1 -0
  401. package/dist/validations/date.schema.mjs +1 -0
  402. package/dist/validations/description.schema.mjs +1 -0
  403. package/dist/validations/email.schema.mjs +1 -0
  404. package/dist/validations/field.schema.mjs +1 -0
  405. package/dist/validations/index.mjs +1 -1
  406. package/dist/validations/npi.schema.mjs +1 -0
  407. package/dist/validations/phone.schema.mjs +1 -0
  408. package/dist/validations/ssn.schema.mjs +1 -0
  409. package/dist/validations/unix.schema.mjs +1 -0
  410. package/package.json +5 -1
  411. package/dist/shared/Metrics.context-nclzMP1W.mjs +0 -1
  412. package/dist/shared/OneClickVerificationOutcomeOverTimeChart.map-BA-X6bPt.mjs +0 -1
  413. package/dist/shared/PageSectionHeader-WvpwlmBn.mjs +0 -1
  414. package/dist/shared/_baseIsEqual-sbOBMsGa.mjs +0 -1
  415. package/dist/shared/address.schema-2gCctEOX.mjs +0 -1
  416. package/dist/shared/colors-CSvtCJK4.mjs +0 -1
  417. package/dist/shared/driversLicense.schema-BR4qKD7W.mjs +0 -1
  418. package/dist/shared/formatKebabToPretty-Du43TgPC.mjs +0 -1
  419. package/dist/shared/isEqual-DsQDNaUy.mjs +0 -1
  420. package/dist/shared/magic-legal-language-DzmJlxbv.mjs +0 -81
  421. package/dist/shared/magic-qr-code-UDSE_LRd.mjs +0 -1
  422. package/dist/shared/makeGoogleFont-pok2oDWs.mjs +0 -1
  423. package/dist/shared/motions-CgJF6dYW.mjs +0 -1
  424. package/dist/shared/omitProperty-DReNmkk1.mjs +0 -1
  425. package/dist/shared/phone-D3-biBwM.mjs +0 -1
  426. package/dist/shared/shadows-levwxV7v.mjs +0 -1
  427. package/dist/shared/ssn-Ben2r4Gg.mjs +0 -1
  428. package/dist/shared/useColorMap-CLfTqu93.mjs +0 -1
  429. package/dist/shared/useCopyToClipboard-ClqTa6sX.mjs +0 -1
  430. package/dist/shared/useResizeObserver-D7K4jTvT.mjs +0 -1
  431. package/dist/shared/uuidColor-bmve2xeu.mjs +0 -20
  432. package/dist/verifiedinc-public-shared-ui-elements-5.25.1-beta.0.tgz +0 -0
@@ -0,0 +1 @@
1
+ "use strict";const t={margin:{top:5,right:30,left:20,bottom:5}},e={tickLine:!1,fontSize:12,tickMargin:12},i={textAnchor:"end",tickLine:!1};export{t as chartDefaultProps,e as xAxisDefaultProps,i as yAxisDefaultProps};
@@ -0,0 +1 @@
1
+ "use strict";const t=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});export{t as useStyle};
@@ -0,0 +1 @@
1
+ "use strict";import{forwardRef as i,memo as l,useState as n,useImperativeHandle as d}from"react";import{PersistentDialog as m}from"./PersistentDialog.mjs";import{jsx as o}from"react/jsx-runtime";const s=i(({calendlyUrl:r},t)=>{const[a,e]=n(!1);return d(t,()=>({show:()=>{e(!0)},hide:()=>{e(!1)},toggle:()=>{e(!a)},isOpen:a})),o(m,{isOpen:a,setIsOpen:e,children:o("iframe",{src:r,style:{height:"800px",width:"500px",maxWidth:"90vw",maxHeight:"85vh",border:"none",borderRadius:"5px"}})})});s.displayName="CalendlyDialog";const p=l(s);export{p as CalendlyDialog,s as CalendlyDialogComponent};
@@ -0,0 +1 @@
1
+ "use strict";import{Dialog as t}from"@mui/material";import{jsx as i}from"react/jsx-runtime";const r={"& .MuiDialog-container > .MuiPaper-root":{maxWidth:"fit-content",width:"auto",borderRadius:"6px!important"},"& .MuiTypography-root":{textAlign:"center"},"& .MuiTypography-h1":{fontSize:"34px",fontWeight:"800!important"},"& .MuiTypography-h2":{fontWeight:"800!important"}},a=o=>i(t,{sx:r,...o,children:o.children});export{a as CustomDialog};
@@ -0,0 +1,8 @@
1
+ "use strict";import d from"@mui/icons-material/Close";import{Portal as h,IconButton as p}from"@mui/material";import{useEffect as u,useRef as y}from"react";import{jsxs as s,jsx as o}from"react/jsx-runtime";const w=({isOpen:t,setIsOpen:n,children:l,hasCloseButton:a=!0})=>{u(()=>{const e=c=>{c.key==="Escape"&&n(!1)};document.addEventListener("keydown",e);const r=()=>{t&&(window.history.pushState(null,"",window.location.pathname),n(!1))};return t&&(window.history.pushState(null,"",window.location.pathname),window.addEventListener("popstate",r)),()=>{document.removeEventListener("keydown",e),window.removeEventListener("popstate",r)}},[t]);const i=y(null);return s(h,{children:[t&&o("style",{children:`
2
+ body{
3
+ overflow-y: hidden;
4
+ }
5
+ .dialog-content-persistent{
6
+ overflow-y: auto;
7
+ }
8
+ `}),o("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.5)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:t?1:0,pointerEvents:t?"auto":"none",transition:"opacity 0.3s ease",zIndex:1e3},onClick:e=>{i.current&&!i.current.contains(e.target)&&n(!1)},onKeyDown:e=>{console.log(e),e.key==="Escape"&&n(!1)},children:s("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:[a&&o(p,{"aria-label":"close",onClick:()=>n(!1),sx:{position:"absolute",right:16,top:16,color:"white",backgroundColor:"rgba(0, 0, 0, 0.2)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.4)"},zIndex:1},children:o(d,{})}),o("div",{className:"dialog-content-persistent",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:o("div",{ref:i,children:l})})]})})]})};export{w as PersistentDialog};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as c,useRef as f}from"react";import{wrapPromise as u}from"../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{useAddressInputContext as b}from"./context.mjs";function d(){const{googlePlacesAutocompletePlaces:n,googlePlacesGetPlace:i}=b(),[y,l]=c([]),[p,o]=c(!1),a=f(null);return{handleAutoComplete:async r=>{if(!n)return;a.current&&a.current.abort();const e=new AbortController;a.current=e,o(!0);try{if(!n){o(!1);return}const[t,s]=await u(n(r,e.signal));if(e.signal.aborted)return;if(!t||s){o(!1);return}Array.isArray(t)?l(t):l([])}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return}finally{a.current===e&&o(!1)}},fetchPlace:async(r,e)=>{if(!i)return null;const[t,s]=await u(i(r,e));return s?null:t&&Array.isArray(t)?t:null},buildAddress:r=>{const e={line1:"",city:"",state:"",country:"",zipCode:""};for(const t of r??[])switch(t.types[0]){case"street_number":{e.line1=`${t.longText} ${e.line1}`;break}case"route":{e.line1||(e.line1=""),e.line1+=t.shortText;break}case"postal_code":{e.zipCode=`${t.longText}${e.zipCode}`;break}case"postal_code_suffix":{e.zipCode=`${e.zipCode}-${t.longText}`;break}case"locality":e.city=t.longText??"";break;case"sublocality_level_1":case"sublocality":e.city||(e.city=t.longText??"");break;case"neighborhood":e.city||(e.city=t.longText??"");break;case"administrative_area_level_1":{t.shortText&&t.shortText.length===2&&(e.state=t.shortText);break}case"country":e.country=t.shortText??"US";break}return e},suggestions:y,isPending:p}}export{d as useAutoFill};
@@ -0,0 +1 @@
1
+ "use strict";import{createContext as r,useContext as l}from"react";import{jsx as n}from"react/jsx-runtime";const a={googlePlacesAutocompletePlaces:void 0,googlePlacesGetPlace:void 0},o=r(a);function c({children:e,googlePlacesAutocompletePlaces:t,googlePlacesGetPlace:s}){return n(o.Provider,{value:{googlePlacesAutocompletePlaces:t,googlePlacesGetPlace:s},children:e})}function d(){const e=l(o);if(e===void 0)throw new Error("useAddressInputContext must be used within an AddressInputProvider");return e}export{o as AddressInputContext,c as AddressInputProvider,d as useAddressInputContext};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as l,useMemo as D,useEffect as d}from"react";import{wrapPromise as I}from"../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{toUSaddress as p,fromUSAddress as U}from"../../../utils/address/index.mjs";import{useDebounceValue as x}from"../../../hooks/useDebounceValue.mjs";import{usePrevious as E}from"../../../hooks/usePrevious.mjs";import{useAutoFill as M}from"./autofill.hook.mjs";function O({defaultValue:o,onChange:m}){const[c,u]=l(!1),{handleAutoComplete:f,fetchPlace:g,buildAddress:h,suggestions:v,isPending:C}=M(),P=D(()=>p({line1:o?.line1??"",city:o?.city??"",state:o?.state??"",zipCode:o?.zipCode??""}),[o]),[y,A]=l({title:P??"",value:""}),[r,s]=l(""),F=E(r),t=x(r),[S,V]=l(!1),a=(e,n)=>{let i;typeof e=="string"?i=U(e.replace(/\n/g,"")):(i=e,s(p({...e,country:void 0})??"")),m(i,n)},b=async e=>{if(A(e),!e.value)return;u(!0);const[n]=await I(g(e.value));if(!n)return;const i=h(n);a(i),u(!1)},w=e=>{s(e)},z=()=>{s(""),a("",{shouldValidate:!1})};return d(()=>{!t.length&&S&&a("",void 0),!(!t||t.length<=3||t===F)&&(a(t,void 0),f(t).catch(console.error))},[t]),d(()=>{V(!0)},[]),{value:y,inputValue:r,suggestions:v,isPending:C,isFetchingPlace:c,handleInputChange:w,handleOptionChange:b,handleClear:z}}export{O as useDataFieldAddressInput};
@@ -0,0 +1 @@
1
+ "use strict";import{Box as d,Autocomplete as O,Typography as T,TextField as k,useTheme as j,Paper as S}from"@mui/material";import c from"@mui/material/Unstable_Grid2";import{useDataFieldAddressInput as V}from"./hook.mjs";import{AddressInputProvider as F}from"./context.mjs";import{jsx as t,jsxs as G}from"react/jsx-runtime";function z(o){const n=j();return G(S,{...o,children:[o.children,t(d,{sx:a=>({display:"flex",justifyContent:"flex-end",p:1,pt:"1px",...a.applyStyles("dark",{opacity:.8})}),children:t("img",{src:n.palette.mode==="dark"?"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-non-white3_hdpi.png":"https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png",alt:"",width:"120",height:"14"})})]})}function D({defaultValue:o,onChange:n,label:a,error:u,disabled:i,variant:g,size:h,helperText:m,inputProps:f,InputProps:x,ClearAdornment:r}){const{value:P,inputValue:v,suggestions:b,isPending:s,isFetchingPlace:p,handleInputChange:y,handleOptionChange:C,handleClear:I}=V({defaultValue:o,onChange:n});return t(d,{width:"100%",children:t(O,{disableClearable:!0,freeSolo:!0,isOptionEqualToValue:(e,l)=>e?.value===l?.value,getOptionLabel:e=>typeof e=="string"?e:e?.title,filterOptions:e=>e,options:s?[]:b.map(e=>({title:e.placePrediction.text.text??"",value:e.placePrediction.place??""})),autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,noOptionsText:"No locations",value:P,inputValue:v,loading:s||p,disabled:p||i,onChange:(e,l)=>{e.preventDefault(),e.stopPropagation(),!i&&(!l||typeof l=="string"||C(l).catch(console.error))},onInputChange:(e,l)=>{y(l)},renderInput:e=>t(k,{id:e.id,disabled:e.disabled,label:a,variant:g,size:h,error:u,helperText:m,inputProps:{...e.inputProps,tabIndex:0,autoCapitalize:"off",autoComplete:"street-address address-level2 address-level1 postal-code",...f},InputProps:{...e.InputProps,disableInjectingGlobalStyles:!0,endAdornment:r?t(r,{onClick:()=>{I()}}):void 0,...x},fullWidth:!0,multiline:!0}),renderOption:(e,l)=>{const{key:w,...A}=e;return t("li",{...A,children:t(c,{container:!0,sx:{alignItems:"flex-start"},children:t(c,{sx:{width:"100%",wordWrap:"break-word"},children:t(T,{variant:"body2",sx:{color:"text.secondary",textAlign:"left"},children:l?.title})})})},w)},PaperComponent:z})})}function L(o){const{service:n,...a}=o;return t(F,{googlePlacesAutocompletePlaces:n.googlePlacesAutocompletePlaces,googlePlacesGetPlace:n.googlePlacesGetPlace,children:t(D,{...a})})}export{L as AddressInput};
@@ -0,0 +1 @@
1
+ "use strict";import{useRef as L,useState as m,useMemo as M,useEffect as N}from"react";import{Box as R,InputAdornment as j}from"@mui/material";import{getPhoneDataByFieldName as E}from"../../utils/phone/index.mjs";import{phoneSchema as H}from"../../validations/phone.schema.mjs";import{TextMaskCustom as O}from"./TextMaskCustom.mjs";import U from"./CountrySelector.mjs";import{DefaultInput as V}from"./DefaultInput.mjs";import{DataFieldClearAdornment as W}from"./DataFieldClearAdornment.mjs";import{jsx as o}from"react/jsx-runtime";function q({label:h="Phone",name:d="phone",helperText:c,onChange:n,onBlur:f,onValidPhone:r,initialValue:C="",error:_=!1,handleChangeCountry:l,value:P,autoFocus:b=!1,InputProps:x,InputLabelProps:v,shouldHaveSelectCountryButton:y=!0,shouldHaveClearButton:I=!1,disabled:g=!1,size:A,placeholder:B="+1 (___) ___-____",lazy:S=!0,enableChromeAutofill:k=!0}){const u=L(null),[a,z]=m("US"),[t,F]=m(C),s=M(()=>E("countryCode",a),[a]),T=e=>{z(e),l&&l(e),setTimeout(()=>{var i;(i=u.current)==null||i.focus()},10)},D=e=>{H.safeParse(t).success&&r?.(e)},p=e=>{F(e),n?.(e)};N(()=>{D(t)},[t]);const w={inputRef:u,autoFocus:b,label:h,name:d,helperText:c,value:P??t,error:_,onChange:e=>{p(e.target.value)},onBlur:f,autoComplete:"tel",size:A,placeholder:B,inputProps:{unmask:!0,lazy:S,mask:s?.mask,placeholderChar:"_",tabIndex:0,type:"tel",enableChromeAutofill:k},InputLabelProps:{shrink:!0,...v},InputProps:{inputComponent:O,startAdornment:y&&o(j,{position:"start",children:o(U,{value:a,onChange:T,shouldShowOnlyNorthAmericanCountries:!1})}),endAdornment:I&&o(W,{handleClear:()=>{p("")}}),...x},fullWidth:!0,disabled:g};return o(R,{width:"100%",children:o(V,{...w,sx:{m:0,"& input":{letterSpacing:"1px"}}})})}export{q as BasePhoneInput};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as h,useMemo as y}from"react";import{Button as C,Menu as f,MenuItem as b}from"@mui/material";import{KeyboardArrowDown as v}from"@mui/icons-material";import{countries as l,sortByCountryName as x,getPhoneDataByFieldName as g}from"../../utils/phone/index.mjs";import{jsxs as m,Fragment as w,jsx as t}from"react/jsx-runtime";function B({shouldShowOnlyNorthAmericanCountries:r=!0,...n}){var a;const[i,s]=h(null),e=!!i,c=y(()=>{let o=[...l.filter(p=>p.countryCode!=="BR")];return r||(o=[...l]),[...o].sort(x)},[r]),d=o=>{s(o.currentTarget)},u=()=>{s(null)};return m(w,{children:[t(C,{id:"demo-customized-button","aria-controls":e?"country-select-button":void 0,"aria-haspopup":"true","aria-expanded":e?"true":void 0,variant:"text",disableElevation:!0,onClick:d,endIcon:t(v,{}),children:(a=g("countryCode",n.value))==null?void 0:a.emoji}),t(f,{anchorEl:i,open:e,onClose:u,MenuListProps:{"aria-labelledby":"country-select-button"},slotProps:{paper:{style:{maxHeight:48*4.5,width:"20ch",minWidth:"300px"}}},children:c.map(o=>m(b,{role:"menuitem",onClick:()=>{n.onChange(o.countryCode),u()},children:[o.emoji," ",o.countryName]},o.countryCode))})]})}export{B as default};
@@ -0,0 +1 @@
1
+ "use strict";import{Close as o}from"@mui/icons-material";import{InputAdornment as a,IconButton as r}from"@mui/material";import{jsx as n}from"react/jsx-runtime";function i({onClick:e,handleClear:l}){return n(a,{position:"end",children:n(r,{"aria-label":"clear value",edge:"end",size:"small",onClick:()=>{l(),e?.()},children:n(o,{fontSize:"small"})})})}export{i as DataFieldClearAdornment};
@@ -0,0 +1 @@
1
+ "use strict";import{forwardRef as S,useState as M,useRef as P,useMemo as O}from"react";import{TextField as Y,Box as F,Stack as T,IconButton as A}from"@mui/material";import{CalendarToday as N}from"@mui/icons-material";import $ from"../../../node_modules/react-datepicker/dist/es/index.mjs";import{useOnClickOutside as E}from"../../../hooks/useOnClickOutside.mjs";import R from"../../../styles/lib/react-datepicker.css.mjs";import{masks as y}from"../../../utils/masks/index.mjs";import{InputMask as j}from"../InputMask.mjs";import{jsxs as B,Fragment as z,jsx as a}from"react/jsx-runtime";const K=S(function(t,r){return a(T,{ref:r,sx:{position:"relative"},children:a(A,{edge:"end",size:"small",onClick:()=>{var l;t.disabled||(l=t.onFocus)==null||l.call(t)},disabled:t.disabled,children:a(N,{fontSize:"small"})})})}),W=function({value:t,onChange:r,defaultSelectedDate:l,overflow:h=!1,clickOutsideBoundaryElement:u,minDate:x,maxDate:p,disabled:c}){const[k,d]=M(!1),m=P(null),w=new Date("08/01/1989"),f=x??new Date(1900,0,1),n=p??new Date,b=e=>{if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";try{const o=e.getDate().toString().padStart(2,"0"),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getFullYear();return s==="00"||s>"12"||o==="00"||o>"31"||i<1900||i>n.getFullYear()?"":`${s}/${o}/${i}`}catch{return""}},D=O(()=>{if(!t)return l??void 0;const e=new Date(t);return isNaN(+e)||!/^\d{2}\/\d{2}\/\d{4}$/.test(t)||e<f||e>n?w:e},[t]);return E(m,()=>{d(!1)},"mousedown",{},u),B(F,{ref:m,sx:{position:"relative","& .react-datepicker-popper":h?{transform:"translate(calc(-100% + 32px), calc(-50% + 10px))!important"}:{}},children:[a("style",{children:R}),a($,{open:k,onFocus:()=>{d(e=>!e)},popperPlacement:"bottom-end",placeholderText:"MM/DD/YYYY",showPopperArrow:!1,showYearDropdown:!0,showMonthDropdown:!0,scrollableYearDropdown:!1,dateFormat:"MM/dd/yyyy",minDate:f,maxDate:n,selected:D,dropdownMode:"select",onSelect:e=>{const o=b(e);o&&(r?.({target:{value:o}}),d(!1))},disabled:c,customInput:a(K,{disabled:c})})]})};function _({label:t="Date",value:r,error:l,helperText:h,onChange:u,onBlur:x,disabled:p,pickerDefaultSelectedDate:c,pickerClickOutsideBoundaryElement:k,pickerInputOverflow:d=!1,inputMaskProps:m,minDate:w,maxDate:f,...n},b){var D;const[e,o]=M(""),s=r!==void 0,i=s?r:e,g=I=>{const v=I.target.value;s||o(v),u&&u(v)},C={label:t,error:l,helperText:h,fullWidth:!0,...n,autoComplete:"bday",inputProps:{...n.inputProps,inputMode:"numeric",tabIndex:0,mask:y.DOB_MASK},InputProps:{...n.InputProps,endAdornment:B(z,{children:[a(W,{onChange:g,value:i,overflow:d,clickOutsideBoundaryElement:k,defaultSelectedDate:c,minDate:w,maxDate:f,disabled:p}),(D=n.InputProps)==null?void 0:D.endAdornment]})}};return a(j,{mask:y.DOB_MASK,maskPlaceholder:null,disabled:p,value:i,onBlur:x,onChange:g,...m,children:a(Y,{...C,inputRef:b,fullWidth:!0,sx:{flex:1,"& input":{boxShadow:"none!important",border:"none!important",letterSpacing:"1px"}}})})}const Z=S(_);export{Z as DateInput};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as i,useRef as c,forwardRef as h}from"react";import{Box as x,TextField as Y}from"@mui/material";import g from"../../../node_modules/react-datepicker/dist/es/index.mjs";import M from"../../../styles/lib/react-datepicker.css.mjs";import{useOnClickOutside as R}from"../../../hooks/useOnClickOutside.mjs";import{useStyle as y}from"./style.mjs";import{jsxs as v,jsx as r}from"react/jsx-runtime";const b=h(function(t,a){return r(Y,{inputRef:a,...t,label:"Range",fullWidth:!0,sx:{flex:1,"& input":{boxShadow:"none!important",border:"none!important"}}})}),H=t=>{const a=y(),m=()=>{const{startDate:e,endDate:o}=t;return!e||!o?[null,null]:[new Date(e),new Date(o)]},[u,d]=i(m()),[D,f]=u,n=c(null),[w,s]=i(!1);return R(n,()=>{s(!1)}),v(x,{ref:n,sx:a.wrapper,children:[r("style",{children:M}),r(g,{open:w,onFocus:()=>{s(!0)},placeholderText:"MM/DD/YYYY - MM/DD/YYYY",showPopperArrow:!1,swapRange:!0,selectsRange:!0,showYearDropdown:!0,showMonthDropdown:!0,scrollableYearDropdown:!1,dateFormat:"MM/dd/yyyy HH:mm:ss",startDate:D??void 0,endDate:f??void 0,minDate:new Date(2023,0,1),maxDate:new Date,onChange:([e,o],l)=>{var p;d([e,o]),!(!e||!o)&&(((p=l?.target)==null?void 0:p.tagName)!=="INPUT"&&(e.setHours(0,0,0,0),o.setHours(23,59,59,999)),t.onChange(+e,+o))},customInput:r(b,{})})]})};export{H as DateRangeInput};
@@ -0,0 +1 @@
1
+ "use strict";function t(){return{wrapper:{width:450,'& input[type="text"]':{textAlign:"center",width:"100%",flex:1}}}}export{t as useStyle};
@@ -0,0 +1 @@
1
+ "use strict";import{forwardRef as f}from"react";import{TextField as n}from"../TextField/index.mjs";import{jsx as m}from"react/jsx-runtime";const e=({variant:r="outlined",margin:t="normal",...i},o)=>m(n,{inputRef:o,variant:r,margin:t,fullWidth:!0,...i}),a=f(e);export{a as DefaultInput,a as default};
@@ -0,0 +1 @@
1
+ "use strict";import{TextField as l}from"@mui/material";import m from"lodash/capitalize";import{jsx as p}from"react/jsx-runtime";const r=({name:a="email",type:e="email",id:o=a,label:i=m(a),...t})=>p(l,{fullWidth:!0,type:e,name:a,id:o,label:i,inputProps:{autoCorrect:"off",autoCapitalize:"off"},...t});export{r as EmailInput};
@@ -0,0 +1 @@
1
+ "use strict";import r from"@mona-health/react-input-mask";import{jsx as t}from"react/jsx-runtime";function m(o){return t(r,{...o})}export{m as InputMask};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as v,useEffect as y}from"react";import{Box as z,InputAdornment as A}from"@mui/material";import{npiSchema as B}from"../../../validations/npi.schema.mjs";import{TextMaskCustom as S}from"../TextMaskCustom.mjs";import{DefaultInput as D}from"../DefaultInput.mjs";import{DataFieldClearAdornment as F}from"../DataFieldClearAdornment.mjs";import{jsx as a}from"react/jsx-runtime";function L({label:l="NPI",name:s="npi",helperText:p,onChange:n,onBlur:u,onValidNPI:o,initialValue:i="",error:m=!1,value:d,autoFocus:c=!1,InputProps:h,InputLabelProps:f,shouldHaveClearButton:I=!1,disabled:_=!1,size:x,placeholder:C="__________",lazy:P=!0}){const[t,b]=v(i),g=e=>{B.safeParse(e).success&&o?.(e)},r=e=>{b(e),n?.(e)};y(()=>{g(t)},[t]);const k={autoFocus:c,label:l,name:s,helperText:p,value:d??t,error:m,onChange:e=>{r(e.target.value)},onBlur:u,autoComplete:"off",size:x,placeholder:C,inputProps:{unmask:!0,lazy:P,mask:"0000000000",placeholderChar:"_",tabIndex:0,type:"text",inputMode:"numeric"},InputLabelProps:{shrink:!0,...f},InputProps:{inputComponent:S,endAdornment:I&&a(A,{position:"end",children:a(F,{handleClear:()=>{r("")}})}),...h},fullWidth:!0,disabled:_};return a(z,{width:"100%",children:a(D,{...k,sx:{m:0,"& input":{letterSpacing:"1px"}}})})}export{L as NPIInput};
@@ -0,0 +1 @@
1
+ "use strict";import{addressFormat as h}from"../formats/address.format.mjs";import{countrySchema as n}from"../validations/address/country.schema.mjs";import{citySchema as y}from"../validations/address/city.schema.mjs";import{line2Schema as S}from"../validations/address/line2.schema.mjs";import{line1Schema as u}from"../validations/address/line1.schema.mjs";import{addressSchema as z}from"../validations/address/address.schema.mjs";import{zipCodeSchema as f}from"../validations/address/zipcode.schema.mjs";import{stateSchema as k}from"../validations/address/state.schema.mjs";const b="address",e="line1",t="line2",a="city",r="state",i="country",c="zipCode",o={key:e,characteristics:{inputType:"text",label:"Line 1",placeholder:"123 Main Street"},zodSchema:u},s={key:t,characteristics:{inputType:"text",label:"Line 2",placeholder:"Apt 4B, Suite 100"},zodSchema:S},l={key:a,characteristics:{inputType:"text",label:"City",placeholder:"New York"},zodSchema:y},p={key:r,characteristics:{inputType:"text",label:"State",placeholder:"NY"},zodSchema:k},m={key:i,characteristics:{inputType:"text",label:"Country",placeholder:"US"},zodSchema:n},d={key:c,characteristics:{inputType:"text",label:"Zip Code",placeholder:"10001"},zodSchema:f},x={key:b,characteristics:{inputType:"composite",label:"Address",defaultOrder:[e,t,a,r,i,c]},children:{line1:o,line2:s,city:l,state:p,country:m,zipCode:d},zodSchema:z,format:h};export{x as address,l as city,m as country,o as line1,s as line2,p as state,d as zipCode};
@@ -0,0 +1 @@
1
+ "use strict";import{birthDateSchema as t}from"../validations/other/birthDate.schema.mjs";import{dateFormat as a}from"../formats/date.format.mjs";const e="birthDate",r={key:e,characteristics:{inputType:"date",label:"Birthday",placeholder:"__/__/____"},zodSchema:t,format:a};export{r as birthDate};
@@ -0,0 +1 @@
1
+ "use strict";const e={text:"text",select:"select",date:"date",composite:"composite"};export{e as fieldInputTypes};
@@ -0,0 +1 @@
1
+ "use strict";import{US_STATES as p}from"../shared/us-states.mjs";import{address as n}from"./address.mjs";import{dateFormat as e}from"../formats/date.format.mjs";import{stateFormat as u}from"../formats/state.format.mjs";import{driversLicenseSchema as l}from"../validations/driversLicense/driversLicense.schema.mjs";import{dateSchema as a}from"../validations/other/date.schema.mjs";import{stateSchema as h}from"../validations/address/state.schema.mjs";import{documentNumberSchema as _}from"../validations/other/documentNumber.schema.mjs";const S="driversLicense",t="documentNumber",r="issuanceState",s="issuanceDate",i="expirationDate",f="address",c={key:t,characteristics:{inputType:"text",label:"Number",placeholder:"John"},zodSchema:_},o={key:r,characteristics:{inputType:"select",label:"State",placeholder:"NY",options:p},zodSchema:h,format:u},m={key:s,characteristics:{inputType:"date",label:"Issued",placeholder:"__/__/____"},zodSchema:a,format:e},d={key:i,characteristics:{inputType:"date",label:"Expired",placeholder:"__/__/____"},zodSchema:a,format:e},y={key:S,characteristics:{inputType:"composite",label:"Driver's License",defaultOrder:[t,r,s,i,f]},children:{documentNumber:c,issuanceState:o,issuanceDate:m,expirationDate:d,address:n},zodSchema:l};export{c as documentNumber,y as driversLicense,d as expirationDate,m as issuanceDate,o as issuanceState};
@@ -0,0 +1 @@
1
+ "use strict";import{middleSchema as r}from"../validations/name/middle.schema.mjs";import{lastSchema as s}from"../validations/name/last.schema.mjs";import{firstSchema as c}from"../validations/name/first.schema.mjs";import{fullNameSchema as o}from"../validations/name/fullName.schema.mjs";const d="fullName",e="firstName",a="lastName",m="middleName",t={key:e,characteristics:{inputType:"text",label:"First Name",placeholder:"John"},zodSchema:c},l={key:a,characteristics:{inputType:"text",label:"Last Name",placeholder:"Doe"},zodSchema:s},i={key:m,characteristics:{inputType:"text",label:"Middle Name",placeholder:"William"},zodSchema:r},h={key:d,characteristics:{inputType:"composite",label:"Full Name",defaultOrder:[e,m,a]},children:{firstName:t,lastName:l,middleName:i},zodSchema:o};export{t as firstName,h as fullName,l as lastName,i as middleName};
@@ -0,0 +1 @@
1
+ "use strict";import{middleName as a,lastName as t,firstName as i,fullName as r}from"./fullName.mjs";import{zipCode as m,country as o,state as n,city as c,line2 as d,line1 as p,address as l}from"./address.mjs";import{expirationDate as f,issuanceDate as u,issuanceState as N,documentNumber as b,driversLicense as y}from"./driversLicense.mjs";import{ssn as D}from"./ssn.mjs";import{phone as x}from"./phone.mjs";import{sex as h}from"./sex.mjs";import{birthDate as j}from"./birthDate.mjs";const s={fullName:r,firstName:i,lastName:t,middleName:a,address:l,line1:p,line2:d,city:c,state:n,country:o,zipCode:m,driversLicense:y,documentNumber:b,issuanceState:N,issuanceDate:u,expirationDate:f,ssn:D,phone:x,sex:h,birthDate:j},S=Object.fromEntries(Object.keys(s).map(e=>[e,e]));export{S as credentialKeys,s as fields};
@@ -0,0 +1 @@
1
+ "use strict";import{phoneSchema as e}from"../validations/other/phone.schema.mjs";const o="phone",p={key:o,characteristics:{inputType:"text",label:"Phone Number",placeholder:"(555) 123-4567"},zodSchema:e};export{p as phone};
@@ -0,0 +1 @@
1
+ "use strict";import{sexSchema as e,sexOptions as s}from"../validations/other/sex.schema.mjs";const t="sex",a={key:t,characteristics:{inputType:"select",label:"Sex",options:s},zodSchema:e};export{a as sex};
@@ -0,0 +1 @@
1
+ "use strict";import{ssnFormat as s}from"../formats/ssn.format.mjs";import{ssnSchema as a}from"../validations/other/ssn.schema.mjs";const t="ssn",e={key:t,characteristics:{inputType:"text",label:"SSN",placeholder:"123-45-6789"},zodSchema:a,format:s};export{e as ssn};
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty,r=(s,e,i)=>e in s?t(s,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[e]=i,a=(s,e,i)=>r(s,typeof e!="symbol"?e+"":e,i);import{credentialKeys as l}from"../fields/index.mjs";class u{constructor(e){a(this,"fields"),this.fields=e}get isValid(){return Object.values(this.fields).every(e=>e.isValid)}get isEmpty(){return Object.values(this.fields).every(e=>e.schema.key===l.phone?!0:e.isEmpty)}get isDirty(){return Object.values(this.fields).some(e=>e.isDirty)}get isDisabled(){return Object.values(this.fields).every(e=>e.isDisabled)}get values(){return Object.fromEntries(Object.values(this.fields).map(e=>[e.schema.key,e.value]))}}export{u as Form};
@@ -0,0 +1 @@
1
+ "use strict";var v=Object.defineProperty,C=(u,e,t)=>e in u?v(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t,F=(u,e,t)=>C(u,typeof e!="symbol"?e+"":e,t);import{fields as p}from"../fields/index.mjs";import{FormFieldBuilder as w}from"./formFieldBuilder.mjs";import{Form as O}from"./form.mjs";import{normalizeCredentialType as m}from"./utils.mjs";import{fieldInputTypes as h}from"../fields/constants.mjs";class T{constructor(){F(this,"fieldBuilder",new w)}createFromCredentialAndRequests(e,t){const i={};for(const l of t){let r;if(typeof l=="string")r=this.expandCredentialType(l);else if(r=l,!r.children){const c=r.type.replace(/Credential$/,""),f=c.charAt(0).toLowerCase()+c.slice(1),d=p[f];if(d&&d.characteristics.inputType===h.composite&&"children"in d&&"defaultOrder"in d.characteristics&&d.characteristics.defaultOrder){const y=this.expandCredentialType(r.type);r={...r,children:y.children}}}const n=m(r.type),s=e.filter(c=>c.type===n).filter(c=>this.credentialMeetsRequirements(r,c)),a=this.createField(r,s,n),o=p[n];o&&(i[o.key]=a)}return new O(i)}createField(e,t,i){const l=p[i];if(!l)throw new Error(`Unknown credential type: ${i}`);const r=this.extractRequestOptions(e);if(t.length===0)return this.fieldBuilder.createFromSchema(e,l);const n=t[0],s=this.createChildFields(e,n);let a;return t.length>1&&(a=t.map(o=>{const c=this.createChildFields(e,o);return this.fieldBuilder.createFromCredential(o,c,r)})),this.fieldBuilder.createFromCredential(n,s,r,a)}createChildFields(e,t){if(!e.children)return;const i={};for(const l of e.children){const r=m(l.type),n=p[r];if(!n)continue;const s=n.key;if(t.value&&s in t.value){let a;n.characteristics.inputType===h.composite?a=t.value[s]:a=t.value;const o={...t,uuid:void 0,type:r,value:a},c=this.extractRequestOptions(l,e);let f;n.characteristics.inputType===h.composite&&l.children&&(f=this.createChildFields(l,o));const d=this.fieldBuilder.createFromCredential(o,f,c);i[s]=d}else{const a=this.extractRequestOptions(l,e),o={...l,...a},c=this.fieldBuilder.createFromSchema(o,n);i[s]=c}}return Object.keys(i).length>0?i:void 0}expandCredentialType(e){var t;const i=e.replace(/Credential$/,""),l=i.charAt(0).toLowerCase()+i.slice(1),r=p[l];if(!r)throw new Error(`Unknown credential type: ${e}`);const n={type:e,allowUserInput:!0,mandatory:"no",multi:!1};if(r.characteristics.inputType===h.composite&&"children"in r&&"defaultOrder"in r.characteristics&&r.characteristics.defaultOrder){const s=[];for(const a of r.characteristics.defaultOrder){const o=(t=r.children)==null?void 0:t[a];if(o){const c=this.expandCredentialType(o.key);s.push(c)}}return{...n,children:s}}return n}credentialMeetsRequirements(e,t){if(!e.children)return!0;for(const i of e.children){const l=m(typeof i=="string"?i:i.type);if((typeof i=="string"?"no":i.mandatory??"no")==="no")continue;let r=!1;const n=p[l];if(n&&t.value){const s=n.key;r=s in t.value&&t.value[s]!==void 0&&t.value[s]!==null&&t.value[s]!==""}if(!r)return!1}return!0}extractRequestOptions(e,t){return{allowUserInput:e.allowUserInput??t?.allowUserInput??!0,mandatory:e.mandatory??t?.mandatory??"no",multi:e.multi??!1,description:e.description}}}export{T as FormBuilder};
@@ -0,0 +1 @@
1
+ "use strict";var y=Object.defineProperty,b=(n,e,t)=>e in n?y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,l=(n,e,t)=>b(n,typeof e!="symbol"?e+"":e,t);import{z as v}from"zod";import{cloneDeep as m}from"lodash";class f{constructor(e,t,s,i,r={}){if(l(this,"id"),l(this,"_defaultValue"),l(this,"_value"),l(this,"schema"),l(this,"children"),l(this,"touched"),l(this,"allowUserInput"),l(this,"mandatory"),l(this,"multi"),l(this,"variants"),l(this,"description"),this.id=e,this._defaultValue=t,this._value=s,this.children=r.children,this.touched=!1,this.allowUserInput=r.allowUserInput??!0,this.mandatory=r.mandatory??"no",this.multi=r.multi??!1,this.variants=r.variants,this.description=r.description,i.characteristics.inputType==="composite"&&r.children)if("_def"in i.zodSchema&&i.zodSchema._def.typeName==="ZodEffects")this.schema=i;else{let a;if("shape"in i.zodSchema)a=i.zodSchema;else throw new Error("Composite field could not be modified.");const h=a.shape,o={};Object.entries(r.children).forEach(([c,u])=>{if(h[c]){const d=h[c];u.isRequired?d instanceof v.ZodString?o[c]=d.refine(p=>!u.isRequired&&u.isEmpty?!0:p!==""&&p!==null&&p!==void 0,`${u.schema.characteristics.label} is required`):o[c]=d:o[c]=d.optional()}}),this.schema={...i,zodSchema:v.object(o)}}else this.schema={...i,zodSchema:i.zodSchema.refine(a=>!this.isRequired&&this.isEmpty?!0:a!==""&&a!==null&&a!==void 0,`${i.characteristics.label} is required`)}}get defaultValue(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.defaultValue}),Object.keys(e).length>0?e:void 0}return this._defaultValue}get value(){if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{s.schema.characteristics.inputType==="composite"?e[t]=s.value:e[t]=s.isEmpty?"":s.value}),Object.keys(e).length>0?e:void 0}return this._value}set value(e){this._value=e}get hasVariants(){return this.variants?this.variants.length>1:!1}get isValid(){return this.errors===null}get isRequired(){return this.mandatory==="yes"||this.mandatory==="if_available"}get isDisabled(){return!this.allowUserInput}get isEmpty(){const e=t=>t==null||t===""?!0:typeof t=="object"&&t!==null?Object.values(t).every(e):!1;return e(this.value)}get isDirty(){return this.schema.characteristics.inputType==="composite"&&this.children?Object.values(this.children).some(e=>e.isDirty):this._value!==this._defaultValue}get errors(){let e=null;const t={};if(this.schema.characteristics.inputType==="composite"&&this.children){const s={};Object.entries(this.children).forEach(([r,a])=>{a.isEmpty&&!a.isRequired?s[r]=void 0:s[r]=a.value});const i=this.schema.zodSchema.safeParse(s);e=i.success?null:i.error,e!=null&&e.issues&&e.issues.length>0||Object.entries(this.children).forEach(([r,a])=>{const h=a.errors;h&&(t[r]=h)})}else if(!this.isRequired&&this.isEmpty)e=null;else{const s=this.schema.zodSchema.safeParse(this.value);e=s.success?null:s.error}return!e&&Object.keys(t).length===0?null:{error:e,childrenErrors:t}}get errorMessage(){var e,t,s,i;return((i=(s=(t=(e=this.errors)==null?void 0:e.error)==null?void 0:t.issues)==null?void 0:s.find(r=>typeof r.message=="string"))==null?void 0:i.message)??null}get displayValue(){if(typeof this.schema.format=="function")if(this.schema.characteristics.inputType==="composite"&&this.children){const e={};return Object.entries(this.children).forEach(([t,s])=>{e[t]=s.value}),this.schema.format(e)??null}else return this.isEmpty?null:this.schema.format(this.value)??this.value;return this.value}replaceWithVariant(e){if(!this.variants){console.warn(`Field ${this.id} has no variants`);return}const t=this.variants.find(i=>i.id===e);if(!t){console.warn(`Variant ${e} not found for field ${this.id}`);return}const s=this.variants;this.id=t.id,this.schema=t.schema,this.description=t.description,this.allowUserInput=t.allowUserInput,this.mandatory=t.mandatory,this.multi=t.multi,this._value=t.value&&typeof t.value=="object"?m(t.value):t.value,this._defaultValue=t.defaultValue&&typeof t.defaultValue=="object"?m(t.defaultValue):t.defaultValue,this.variants=s,t.children?(this.children={},Object.entries(t.children).forEach(([i,r])=>{this.children&&(this.children[i]=this.deepCloneFormField(r))})):this.children=void 0}deepCloneFormField(e){const t=e._value&&typeof e._value=="object"?m(e._value):e._value,s=e._defaultValue&&typeof e._defaultValue=="object"?m(e._defaultValue):e._defaultValue;let i;return e.children&&(i={},Object.entries(e.children).forEach(([r,a])=>{i&&(i[r]=this.deepCloneFormField(a))})),new f(e.id,s,t,e.schema,{children:i,allowUserInput:e.allowUserInput,mandatory:e.mandatory,multi:e.multi,variants:e.variants,description:e.description})}}export{f as FormField};
@@ -0,0 +1 @@
1
+ "use strict";import{cloneDeep as y}from"lodash";import{fields as p}from"../fields/index.mjs";import{FormField as m}from"./formField.mjs";import{normalizeCredentialType as f}from"./utils.mjs";import{fieldInputTypes as d}from"../fields/constants.mjs";class v{createFromCredential(o,i,e,l){var n;const c=p[o.type];if(!c)throw new Error(`Invalid credential type: ${o.type}`);const r=c.key;let t;if(c.characteristics.inputType===d.composite)if(o.value&&Object.keys(o.value).length>0)if(i&&Object.keys(i).length>0){const s={};Object.keys(i).forEach(a=>{a in o.value&&(s[a]=o.value[a])}),t=Object.keys(s).length>0?s:void 0}else t=void 0;else t=void 0;else t=(n=o.value)==null?void 0:n[r];return new m(o.uuid,t,t,c,{children:i,allowUserInput:e?.allowUserInput??!0,mandatory:e?.mandatory??"no",multi:e?.multi??!1,variants:l,description:e?.description})}createFromSchema(o,i){let e,l;const n={allowUserInput:o.allowUserInput??!0,mandatory:o.mandatory??"no",multi:o.multi??!1,description:o.description};if(i.characteristics.inputType===d.composite&&o.children){const r={};for(const t of o.children){const s=f(t.type),a=p[s];if(a){const u=this.createFromSchema(t,a);r[a.key]=u}}l=Object.keys(r).length>0?r:void 0}if(i.characteristics.inputType===d.composite)if(l&&Object.keys(l).length>0){const r={};Object.entries(l).forEach(([t,s])=>{r[t]=s.defaultValue}),e=r}else e=void 0;else e="";const c=typeof e=="object"&&e!==null?y(e):e;return new m(void 0,e,c,i,{children:l,allowUserInput:n.allowUserInput,mandatory:n.mandatory,multi:n.multi,variants:void 0,description:n.description})}}export{v as FormFieldBuilder};
@@ -0,0 +1 @@
1
+ "use strict";function n(r){const e=r.replace(/Credential$/,"");return e.charAt(0).toLowerCase()+e.slice(1)}export{n as normalizeCredentialType};
@@ -0,0 +1 @@
1
+ "use strict";import{toUSaddressPretty as d}from"../../../../../utils/address/index.mjs";const m=i=>{var r,o,t,l,n,e;return d({line1:((r=i.line1)==null?void 0:r.trim())??"",line2:(o=i.line2)==null?void 0:o.trim(),city:((t=i.city)==null?void 0:t.trim())??"",state:((l=i.state)==null?void 0:l.trim())??"",zipCode:((n=i.zipCode)==null?void 0:n.trim())??"",country:((e=i.country)==null?void 0:e.trim())??"US"})};export{m as addressFormat};
@@ -0,0 +1 @@
1
+ "use strict";const o=a=>{const t=new Date(Number(a)),e=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0"),n=t.getUTCFullYear();return`${e}/${r}/${n}`};export{o as dateFormat};
@@ -0,0 +1 @@
1
+ "use strict";const s=e=>e.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{s as ssnFormat};
@@ -0,0 +1 @@
1
+ "use strict";import{US_STATES_RECORD as r}from"../shared/us-states.mjs";const t=o=>r[o.toUpperCase()]||o;export{t as stateFormat};
@@ -0,0 +1 @@
1
+ "use strict";import{fieldInputTypes as h}from"../fields/constants.mjs";function f(p){const c=t=>t.uuid!==void 0,i=t=>t.schema.characteristics.inputType===h.composite&&t.children?Object.values(t.children).some(i):!t.isEmpty,a=t=>{if(t==null)return t;if(typeof t=="object"&&!Array.isArray(t)){const e={};return Object.entries(t).forEach(([s,d])=>{const r=a(d);r!==""&&r!==null&&r!==void 0&&(typeof r=="object"&&!Array.isArray(r)?Object.keys(r).length>0&&(e[s]=r):e[s]=r)}),e}return t},y=t=>{const e=a(t.value);let s;return t.schema.characteristics.inputType===h.composite?s=e:s={[t.schema.key]:e},t.id?{uuid:t.id,type:t.schema.key,value:s}:{type:t.schema.key,value:s}},l=Object.values(p.fields).filter(i),o=[],n=[],u=[];return l.forEach(t=>{const e=y(t);t.isDirty?c(e)?n.push(e):o.push(e):c(e)&&u.push(e)}),{toCreate:o,toPatch:n,unchanged:u}}export{f as toCreatePatchCredentials};
@@ -0,0 +1 @@
1
+ "use strict";function s(o){return o.map(e=>{const u={uuid:e.uuid},a=n=>n.join("."),l=(n,c=[])=>Object.entries(n).flatMap(([i,t])=>{const r=[...c,i];return typeof t=="object"&&t!==null&&Object.keys(t).length>0?l(t,r):[a(r)]});return typeof e.value=="object"&&e.value!==null&&(u.fields=l(e.value)),u})}export{s as toShareCredentials};
@@ -0,0 +1 @@
1
+ "use strict";const n={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",AS:"American Samoa",GU:"Guam",MP:"Northern Mariana Islands",PR:"Puerto Rico",UM:"United States Minor Outlying Islands",VI:"Virgin Islands"},e=Object.entries(n).map(([a,i])=>({value:a,label:i})).sort((a,i)=>a.label.localeCompare(i.label)),o=Object.keys(n);export{e as US_STATES,n as US_STATES_RECORD,o as US_STATE_CODES};
@@ -0,0 +1 @@
1
+ "use strict";import{z as t}from"zod";import{line1Schema as a,line1ValidationMessage as l}from"./line1.schema.mjs";import{line2Schema as n}from"./line2.schema.mjs";import{citySchema as o,cityValidationMessage as d}from"./city.schema.mjs";import{stateSchema as c,stateValidationMessage as y}from"./state.schema.mjs";import{countrySchema as r,countryValidationMessage as m}from"./country.schema.mjs";import{zipCodeSchema as p,zipCodeValidationMessage as u}from"./zipcode.schema.mjs";const h=t.object({line1:a.optional(),line2:n.optional(),city:o.optional(),state:c.optional(),country:r.optional(),zipCode:p.optional()}).superRefine((e,s)=>{if(Object.values(e).every(i=>!i))return!0;(Object.prototype.hasOwnProperty.call(e,"line1")||Object.prototype.hasOwnProperty.call(e,"line2")||Object.prototype.hasOwnProperty.call(e,"city")||Object.prototype.hasOwnProperty.call(e,"state")||Object.prototype.hasOwnProperty.call(e,"country")||Object.prototype.hasOwnProperty.call(e,"zipCode"))&&(Object.prototype.hasOwnProperty.call(e,"line1")&&(!e.line1||e.line1.trim()==="")&&(a.safeParse(e.line1).success||s.addIssue({code:t.ZodIssueCode.custom,path:["line1"],message:l})),Object.prototype.hasOwnProperty.call(e,"city")&&(!e.city||e.city.trim()==="")&&(o.safeParse(e.city).success||s.addIssue({code:t.ZodIssueCode.custom,path:["city"],message:d})),Object.prototype.hasOwnProperty.call(e,"state")&&(c.safeParse(e.state).success||s.addIssue({code:t.ZodIssueCode.custom,path:["state"],message:y})),Object.prototype.hasOwnProperty.call(e,"country")&&(r.safeParse(e.country).success||s.addIssue({code:t.ZodIssueCode.custom,path:["country"],message:m})),Object.prototype.hasOwnProperty.call(e,"zipCode")&&(p.safeParse(e.zipCode).success||s.addIssue({code:t.ZodIssueCode.custom,path:["zipCode"],message:u})))});export{h as addressSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as t}from"zod";const i="City is required",s=t.string().min(1,i);export{s as citySchema,i as cityValidationMessage};
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";const o="Country must be US",n=e.string().refine(t=>t==="US",o);export{n as countrySchema,o as countryValidationMessage};
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";const i="Line 1 is required",s=e.string().min(1,i);export{s as line1Schema,i as line1ValidationMessage};
@@ -0,0 +1 @@
1
+ "use strict";import{z as o}from"zod";const t=o.string();export{t as line2Schema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as s}from"zod";import{US_STATE_CODES as t}from"../../shared/us-states.mjs";const a="Invalid state",e=s.enum(t,{message:a});export{e as stateSchema,a as stateValidationMessage};
@@ -0,0 +1 @@
1
+ "use strict";import{z as o}from"zod";const e="Invalid zip code",a=o.string().regex(/^\d{5}(-\d{4})?$/,e);export{a as zipCodeSchema,e as zipCodeValidationMessage};
@@ -0,0 +1 @@
1
+ "use strict";import{z as a}from"zod";import{addressSchema as m}from"../address/address.schema.mjs";import{dateSchema as e}from"../other/date.schema.mjs";import{documentNumberSchema as r}from"../other/documentNumber.schema.mjs";import{stateSchema as t}from"../address/state.schema.mjs";const s=a.object({documentNumber:r,issuanceState:t,issuanceDate:e,expirationDate:e,address:m});export{s as driversLicenseSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as r}from"zod";const o=r.string();export{o as firstSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as m}from"zod";import{firstSchema as a}from"./first.schema.mjs";import{lastSchema as e}from"./last.schema.mjs";import{middleSchema as o}from"./middle.schema.mjs";const r=m.object({firstName:a,lastName:e,middleName:o});export{r as fullNameSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as t}from"zod";const r=t.string();export{r as lastSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as m}from"zod";const r=m.string();export{r as middleSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{birthDateSchema as t}from"../../../../../../validations/date.schema.mjs";const a=t;export{a as birthDateSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{dateSchema as a}from"../../../../../../validations/date.schema.mjs";const t=a;export{t as dateSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as m}from"zod";const r=m.string();export{r as documentNumberSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{phoneSchema as e}from"../../../../../../validations/phone.schema.mjs";const o=e;export{o as phoneSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as l}from"zod";const a=[{label:"Male",value:"Male"},{label:"Female",value:"Female"},{label:"Non-Binary",value:"Non-Binary"}],o=l.enum(a.map(e=>e.value));export{a as sexOptions,o as sexSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{z as t}from"zod";import{ssnRegex as e}from"../../../../../../utils/ssn.mjs";const i=t.string().refine(s=>/^•••-••-\d{4}$/.test(s)?!0:e.test(s),"Invalid SSN");export{i as ssnSchema};
@@ -0,0 +1 @@
1
+ "use strict";import{useCallback as t}from"react";import{useForm as f}from"./form.context.mjs";import{fieldInputTypes as S}from"../../core/fields/constants.mjs";const y=({key:i,validateOnChange:r=!0,validateOnBlur:u=!0})=>{var s,n,c,v;const{updateFieldValue:e,setFieldTouched:d,getField:p,validateForm:o}=f(),l=p(i),V=t(a=>{e(i,a),r&&o()},[i,e,o,r]),F=t((a,h)=>{e(`${i}.${a}`,h),r&&o()},[i,e,o,r]),T=t(a=>{d(i,a),a&&u&&o()},[i,d,o,u]),g=t(()=>o(),[o]),$=t(a=>{l?.schema.characteristics.inputType===S.composite?Object.keys(l?.children??{}).forEach(h=>{var m;(m=a?.ignoreKeys)!=null&&m.includes(h)||(e(`${i}.${h}`,""),d(`${i}.${h}`,!0))}):(e(i,""),d(i,!0))},[i,l,e,d]),D=t(()=>{l&&(e(i,l.defaultValue),d(i,!1))},[i,l,e,d]),k=((v=(c=(n=(s=l?.errors)==null?void 0:s.error)==null?void 0:n.errors)==null?void 0:c[0])==null?void 0:v.message)??null,C=l?.touched??!1;return{field:l,value:l?.value??"",setValue:V,setChildValue:F,error:k,isDirty:l?.isDirty??!1,isValid:l?.isValid??!0,isTouched:C,setTouched:T,validate:g,reset:D,clear:$}},b=i=>{const r=y(i);return{...r,inputProps:{id:i.key,value:r.value||"",onChange:u=>{r.setValue(u.target.value)},onBlur:()=>{r.setTouched(!0)},"aria-invalid":!r.isValid,"aria-describedby":r.error?`${i.key}-error`:void 0}}},q=i=>{var r,u,s,n,c,v;const e=b(i),{state:{isSubmitting:d,isSubmitSuccess:p}}=f();return{...e,fieldProps:{label:(r=e.field)==null?void 0:r.schema.characteristics.label,placeholder:e.field&&"placeholder"in((u=e.field)==null?void 0:u.schema.characteristics)?(s=e.field)==null?void 0:s.schema.characteristics.placeholder:void 0,required:(n=e.field)==null?void 0:n.isRequired,disabled:d||p||((c=e.field)==null?void 0:c.isDisabled),description:(v=e.field)==null?void 0:v.description,error:e.error,isDirty:e.isDirty,isValid:e.isValid,isTouched:e.isTouched}}};export{y as useField,b as useFieldInput,q as useFormField};
@@ -0,0 +1 @@
1
+ "use strict";import{useContext as k,createContext as A,useState as K,useCallback as i}from"react";import{jsx as T}from"react/jsx-runtime";const x=A(null),W=()=>{const m=k(x);if(!m)throw new Error("useForm must be used within a FormProvider");return m},I=({children:m,form:y,onSubmit:h})=>{const[n,c]=K({form:y,isSubmitting:!1,isSubmitSuccess:!1}),s=i(e=>{var o;if(!n.form)return;const r=e.split(".");if(r.length===1){const u=r[0],S=n.form.fields[u];if(S)return S;for(const g of Object.values(n.form.fields))if(g.children){for(const j of Object.values(g.children))if(j.id===u)return j}return}const[t,...l]=r,a=n.form.fields[t];if(!(a!=null&&a.children))return;let f=a;for(const u of l){if(!((o=f?.children)!=null&&o[u]))return;f=f.children[u]}return f},[n.form]),b=i(()=>n.form?n.form.isValid:!1,[n.form]),O=i(e=>{c(o=>({...o,form:e}))},[]),F=i(e=>{if(!n.form)return null;const o=e.split(".");if(o.length<2)return null;const r=o.slice(0,-1).join("."),t=o[o.length-1],l=s(r);if(!l||l.schema.characteristics.inputType!=="composite")throw new Error(`Parent field not found: ${r}`);return{parentField:l,childKey:t}},[n.form,s]),w=i(e=>{if(!e.children)return{};const o={};return Object.entries(e.children).forEach(([r,t])=>{o[r]=t.value}),o},[]),v=i(e=>{const o=F(e);if(o){const{parentField:r}=o,t=w(r);r.value=Object.keys(t).length>0?t:{};const l=e.split(".");if(l.length>2){const a=l.slice(0,-1).join(".");v(a)}}},[F,w]),E=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?t.value===o?r:(t.value=o,v(e),{...r,form:r.form}):(console.warn(`Attempted to update non-existent field: ${e}`),r)})},[s,v]),P=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?t.touched===o?r:(t.touched=o,{...r,form:r.form}):(console.warn(`Attempted to set touched state for non-existent field: ${e}`),r)})},[s]),V=i(()=>{c(e=>{if(!e.form)return e;const o=r=>{r.value=r.defaultValue,r.touched=!1,r.children&&Object.values(r.children).forEach(o)};return Object.values(e.form.fields).forEach(o),{...e,isSubmitting:!1,isSubmitSuccess:!1}})},[]),p=i(e=>{c(o=>({...o,isSubmitting:e}))},[]),d=i(e=>{c(o=>({...o,isSubmitSuccess:e}))},[]),$=i(async()=>{if(!(!b()||!n.form)){p(!0),d(!1);try{h&&(await h(n.form),d(!0))}catch(e){console.error("Form submission failed:",e),d(!1)}finally{p(!1)}}},[n.form,h,b,p,d]),C=i((e,o)=>{c(r=>{if(!r.form)return console.warn("No form instance available"),r;const t=s(e);return t?(t.replaceWithVariant(o),{...r,form:r.form}):(console.warn(`Field ${e} not found`),r)})},[s]),N={state:n,setForm:O,updateFieldValue:E,setFieldTouched:P,getField:s,validateForm:b,resetForm:V,submitForm:$,replaceFieldWithVariant:C};return T(x.Provider,{value:N,children:m})};export{I as FormProvider,W as useForm};
@@ -0,0 +1 @@
1
+ "use strict";import{AddressInput as P}from"../../../../../AddressInput/index.mjs";import{useFormField as h}from"../../../core/field.hook.mjs";import{useOneClickForm as k}from"../../form.context.mjs";import{FieldLabel as A}from"./label.mjs";import{ClearFieldAdornment as b}from"./clear-field-adornment.mjs";import{jsx as n}from"react/jsx-runtime";import{fieldInputTypes as z}from"../../../../core/fields/constants.mjs";function F({fieldKey:i}){var t,u,s,a,d,r;const{options:v}=k(),{field:l,setChildValue:o}=h({key:i});if(l?.schema.characteristics.inputType!==z.composite)return null;const c=(t=l.errorMessage)==null?void 0:t.toLowerCase().startsWith("line 2");return n(P,{label:n(A,{fieldKey:i}),helperText:c?l?.description:l.errorMessage??l?.description,error:!!l.errors&&!c,disabled:l.isDisabled,defaultValue:{line1:(u=l?.value)==null?void 0:u.line1,city:(s=l?.value)==null?void 0:s.city,state:(a=l?.value)==null?void 0:a.state,zipCode:(d=l?.value)==null?void 0:d.zipCode,country:((r=l?.value)==null?void 0:r.country)??"US"},onChange:e=>{var p,m,y,f,g;typeof e!="string"&&(e===null&&Object.keys(l?.value??{}).forEach(C=>{C!=="line2"&&o(C,"")}),typeof((p=l?.value)==null?void 0:p.line1)=="string"&&o("line1",e?.line1??""),typeof((m=l?.value)==null?void 0:m.city)=="string"&&o("city",e?.city??""),typeof((y=l?.value)==null?void 0:y.state)=="string"&&o("state",e?.state??""),typeof((f=l?.value)==null?void 0:f.zipCode)=="string"&&o("zipCode",e?.zipCode??""),typeof((g=l?.value)==null?void 0:g.country)=="string"&&o("country",e?.country??""))},InputProps:{"data-mask-me":!0},ClearAdornment:function({onClick:e}){return n(b,{fieldKey:i,onClick:e,ignoreKeys:["line2"]})},service:{googlePlacesAutocompletePlaces:v.servicePaths.googlePlacesAutocompletePlaces,googlePlacesGetPlace:v.servicePaths.googlePlacesGetPlace}})}export{F as AddressInputField};
@@ -0,0 +1 @@
1
+ "use strict";import{InputAdornment as p,IconButton as f}from"@mui/material";import{Close as v}from"@mui/icons-material";import{useFormField as y}from"../../../core/field.hook.mjs";import{jsx as r}from"react/jsx-runtime";function b({fieldKey:s,ignoreKeys:u,onClick:i,disabled:o}){const{field:l,clear:m}=y({key:s}),c=n=>{var e,t,a,d;return((t=(e=n.parentElement)==null?void 0:e.parentElement)==null?void 0:t.querySelector("input"))??((d=(a=n.parentElement)==null?void 0:a.parentElement)==null?void 0:d.querySelector("textarea"))};return r(p,{position:"end",children:r(f,{tabIndex:-1,"aria-label":"clear value",edge:"end",size:"small",onClick:n=>{var e;(o??l?.isDisabled)||((e=c(n.currentTarget))==null||e.focus(),m({ignoreKeys:u}),i?.())},disabled:o??l?.isDisabled,children:r(v,{fontSize:"small"})})})}export{b as ClearFieldAdornment};
@@ -0,0 +1 @@
1
+ "use strict";import{useRef as w,useState as x}from"react";import{Box as M}from"@mui/material";import{USDateSchema as S}from"../../../../../../../validations/date.schema.mjs";import{formatDateMMDDYYYY as A}from"../../../../../../../utils/date.mjs";import{credentialKeys as I}from"../../../../core/fields/index.mjs";import{useFormField as K}from"../../../core/field.hook.mjs";import{getAutoCompleteAttributeValue as N}from"../shared.mjs";import{FieldLabel as V}from"./label.mjs";import{ClearFieldAdornment as P}from"./clear-field-adornment.mjs";import{jsx as l}from"react/jsx-runtime";import{fieldInputTypes as R}from"../../../../core/fields/constants.mjs";import{DateInput as j}from"../../../../../DateInput/index.mjs";function L({fieldKey:i}){var o;const{field:e,setValue:t}=K({key:i}),m=w(null),[u,n]=x(e!=null&&e.value?A(e?.value):"");if(!e||e.schema.characteristics.inputType!==R.date)return null;const s=e.schema.key===I.birthDate,a=new Date,d=1900,p=1,c=1,f=s?a.getUTCFullYear()-18:a.getUTCFullYear()+100,D=s?a.getUTCMonth()+1:12,h=s?a.getUTCDate():31,g=new Date(d,p-1,c),b=new Date(f,D-1,h),C=r=>{if(e.isDisabled)return;const T=S.safeParse(r),v=r.replace(/[^0-9]/g,"");if(n(r),v.length<=0)return t("");if(!T.success)return t("NaN");const[F,k,U]=r.split("/").map(Number),Y=Date.UTC(U,F-1,k,12,0,0,0);t(String(Y))},y=()=>{n(""),t("")};return l(M,{width:"100%",children:l(j,{inputRef:m,variant:"outlined",size:"small",autoComplete:N(e.schema.key),label:l(V,{fieldKey:i}),value:u,onChange:C,error:!(e!=null&&e.isValid),helperText:(o=e.errorMessage)!=null&&o.length?e.errorMessage:e?.description,placeholder:e.schema.characteristics.placeholder,pickerDefaultSelectedDate:new Date("08/01/1989"),minDate:g,maxDate:b,disabled:e.isDisabled,InputProps:{"data-mask-me":!0,endAdornment:l(P,{fieldKey:i,onClick:y,disabled:e.isDisabled})}})})}export{L as DateInputField};
@@ -0,0 +1 @@
1
+ "use strict";import{Stack as p}from"@mui/material";import{credentialKeys as n}from"../../../../core/fields/index.mjs";import{useFormField as f}from"../../../core/field.hook.mjs";import{useOneClickForm as u}from"../../form.context.mjs";import{FieldRowContainer as r,FieldSectionTitle as h,FieldSectionContent as y}from"../style.mjs";import{AddressInputField as K}from"./address.field.mjs";import{TextInputField as o}from"./text.field.mjs";import{SelectInputField as F}from"./select.field.mjs";import{SSNInputField as k}from"./ssn.field.mjs";import{DateInputField as v}from"./date.field.mjs";import{jsx as i,jsxs as c,Fragment as x}from"react/jsx-runtime";import{fieldInputTypes as a}from"../../../../core/fields/constants.mjs";function m({fieldKey:l}){const{field:s}=f({key:l}),d=(t,e)=>e?.schema.characteristics.inputType===a.text&&e?.schema.key===n.ssn?i(k,{fieldKey:t}):e?.schema.characteristics.inputType===a.date?i(v,{fieldKey:t}):e?.schema.characteristics.inputType===a.select?i(F,{fieldKey:t}):e?.schema.characteristics.inputType===a.text?i(o,{fieldKey:t}):(console.warn("Field not supported:",e?.schema.key),null);return s?.schema.characteristics.inputType===a.composite?s!=null&&s.children?s.schema.key===n.fullName?Object.keys(s.children).map(t=>{var e;return i(r,{fieldKey:`${l}.${t}`,children:d(`${l}.${t}`,(e=s.children)==null?void 0:e[t])},t)}):s.schema.key===n.address?c(x,{children:[i(r,{fieldKey:l,children:i(K,{fieldKey:l})}),i(r,{fieldKey:`${l}.line2`,children:i(o,{fieldKey:`${l}.line2`})})]}):c(r,{fieldKey:l,spacing:1.25,children:[i(h,{fieldKey:l}),i(y,{spacing:2,sx:{pt:1},children:Object.keys(s.children).map(t=>i(m,{fieldKey:`${l}.${t}`},t))})]}):null:i(r,{fieldKey:l,children:d(l,s)})}function T(){const l=u(),{fields:s}=l.formContext.state.form;return i(p,{spacing:2,sx:{width:"100%"},children:Object.entries(s).map(([d,t])=>t.schema.key===n.phone?null:i(m,{fieldKey:d},d))})}export{T as EditFields};
@@ -0,0 +1 @@
1
+ "use strict";import{Box as i,Typography as a}from"@mui/material";import{useFormField as o}from"../../../core/field.hook.mjs";import{jsxs as t,jsx as r,Fragment as l}from"react/jsx-runtime";function n({fieldKey:s}){const{field:e}=o({key:s});return e!=null&&e.isRequired?t(i,{component:"span",sx:{display:"block",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",whitespace:"pre"},children:[e.schema.characteristics.label," ",r(a,{"data-asterisk":!0,component:"span",color:"error",variant:"subtitle2",sx:{fontSize:"inherit"},children:"\u273D"})]}):r(l,{children:e?.schema.characteristics.label})}export{n as FieldLabel};
@@ -0,0 +1 @@
1
+ "use strict";import{Box as u,Autocomplete as p,TextField as d}from"@mui/material";import{useFormField as m}from"../../../core/field.hook.mjs";import{FieldLabel as c}from"./label.mjs";import{jsx as t}from"react/jsx-runtime";import{fieldInputTypes as f}from"../../../../core/fields/constants.mjs";function h({fieldKey:s}){const{field:e,setValue:o}=m({key:s});if(e?.schema.characteristics.inputType!==f.select)return null;const r=e.schema.characteristics.options||[],n=r.find(i=>i.value===e.value)??null,a={variant:"outlined",size:"small",label:t(c,{fieldKey:s}),error:!e.isValid,helperText:e.description,inputProps:{tabIndex:0},fullWidth:!0};return t(u,{width:"100%",children:t(p,{disablePortal:!0,autoHighlight:!0,options:r,isOptionEqualToValue:(i,l)=>i?.value===l?.value,value:n,onChange:(i,l)=>{if(!e.isDisabled){if(!l){o("");return}o(l.value)}},renderInput:i=>t(d,{...i,...a,inputProps:{...i.inputProps,...a.inputProps},InputLabelProps:{"data-mask-me":!0,shrink:!0,...a.InputLabelProps}}),disabled:e.isDisabled})})}export{h as SelectInputField};
@@ -0,0 +1 @@
1
+ "use strict";import{useRef as s}from"react";import{Box as n}from"@mui/material";import{SSNInput as m}from"../../../../../SSNInput.mjs";import{useFormField as d}from"../../../core/field.hook.mjs";import{getAutoCompleteAttributeValue as u}from"../shared.mjs";import{FieldLabel as p}from"./label.mjs";import{ClearFieldAdornment as f}from"./clear-field-adornment.mjs";import{jsx as l}from"react/jsx-runtime";function b({fieldKey:t}){const{field:e,setValue:o}=d({key:t}),i=s(null);if(!e)return null;const r=a=>{e.isDisabled||o(a.target.value)};return l(n,{width:"100%",children:l(m,{inputRef:i,variant:"outlined",size:"small",autoComplete:u(e.schema.key),label:l(p,{fieldKey:t}),value:e.value||"",onChange:r,error:!(e!=null&&e.isValid),helperText:e?.description,shouldHaveCloseAdornment:!1,disabled:e.isDisabled,InputProps:{"data-mask-me":!0,endAdornment:l(f,{fieldKey:t})}})})}export{b as SSNInputField};
@@ -0,0 +1 @@
1
+ "use strict";import{useRef as n}from"react";import{Box as s,TextField as u}from"@mui/material";import{useFormField as d}from"../../../core/field.hook.mjs";import{getAutoCompleteAttributeValue as m}from"../shared.mjs";import{FieldLabel as f}from"./label.mjs";import{ClearFieldAdornment as p}from"./clear-field-adornment.mjs";import{jsx as t}from"react/jsx-runtime";function c({fieldKey:l}){const{field:e,setValue:o}=d({key:l}),i=n(null);if(!e)return null;const a={inputRef:i,variant:"outlined",size:"small",autoComplete:m(e.schema.key),label:t(f,{fieldKey:l}),value:e.value||"",onChange:r=>{e.isDisabled||o(r.target.value)},error:!(e!=null&&e.isValid),helperText:e?.description,InputProps:{"data-mask-me":!0,endAdornment:t(p,{fieldKey:l,onClick:()=>{i.current&&(i.current.value="")}})},inputProps:{tabIndex:0,autoCorrect:"off",autoCapitalize:"off"},fullWidth:!0,disabled:e.isDisabled};return t(s,{width:"100%",children:t(u,{...a})})}export{c as TextInputField};
@@ -0,0 +1 @@
1
+ "use strict";import{Stack as c}from"@mui/material";import{credentialKeys as t}from"../../../../core/fields/index.mjs";import{useFormField as m}from"../../../core/field.hook.mjs";import{useOneClickForm as f}from"../../form.context.mjs";import{FieldRow as d,FieldRowContainer as n,FieldSectionTitle as p,FieldSectionContent as y}from"../style.mjs";import{MultiField as a}from"./multi.field.mjs";import{SingleField as h}from"./single.field.mjs";import{jsx as i,jsxs as u}from"react/jsx-runtime";import{fieldInputTypes as K}from"../../../../core/fields/constants.mjs";function o({fieldKey:e}){const{field:l}=m({key:e});return l?.schema.characteristics.inputType===K.composite&&l.children?l.schema.key===t.address?i(d,{fieldKey:e,children:i(a,{fieldKey:e})}):l.schema.key===t.fullName?i(n,{fieldKey:e,spacing:1.25,children:Object.keys(l.children).map(s=>i(o,{fieldKey:`${e}.${s}`},s))}):u(n,{fieldKey:e,spacing:1.25,children:[i(p,{fieldKey:e}),i(y,{spacing:1.25,children:Object.keys(l.children).map(s=>i(o,{fieldKey:`${e}.${s}`},s))})]}):i(d,{fieldKey:e,children:l!=null&&l.hasVariants?i(a,{fieldKey:e}):i(h,{fieldKey:e})})}function F(){const e=f(),{fields:l}=e.formContext.state.form;return i(c,{spacing:1.25,sx:{width:"100%"},onClick:()=>{var s;(s=e.formContext.state.form)!=null&&s.isDisabled||e.setEditMode(!0)},children:Object.entries(l).map(([s,r])=>r.schema.key===t.phone?null:i(o,{fieldKey:s},s))})}export{F as ReadonlyFields};
@@ -0,0 +1 @@
1
+ "use strict";import{useRef as S,useState as M,useEffect as g}from"react";import{Box as I,TextField as w,MenuItem as k}from"@mui/material";import{useFormField as F}from"../../../core/field.hook.mjs";import{useForm as P}from"../../../core/form.context.mjs";import{SingleField as O}from"./single.field.mjs";import{jsx as o}from"react/jsx-runtime";const R=()=>({menuStyle:{maxWidth:"100%",whiteSpace:"pre-wrap",flexWrap:"wrap","& *":{display:"inline-flex"},"& div":{width:"fit-content",height:"fit-content"},"& img.MuiBox-root, & .image-encoded-skeleton-container, & .MuiSkeleton-root":{display:"inline-flex",width:"100px",height:"100px"}},fieldInputEnabledStyle:{"& .MuiInputBase-root::before, & .MuiInputBase-root::after":{display:"none !important"},"& .MuiSelect-icon":{display:"none"}},fieldInputDisabledStyle:{pointerEvents:"auto"},blockStyle:{display:"inline-flex"},fieldInputReadonlyStyle:{"& .MuiInputBase-readOnly":{p:0,userSelect:"auto",cursor:"text",lineHeight:1.5},"& fieldset.MuiOutlinedInput-notchedOutline":{border:"none!important"},"& svg.MuiSvgIcon-root":{display:"none"}}});function $({fieldKey:n}){var r,d,s,u;const{field:i,fieldProps:m}=F({key:n}),{replaceFieldWithVariant:f}=P(),a=R(),p=i?.variants??[i].filter(e=>e!==void 0),l=p.length>1,c=S(void 0),[h,v]=M(void 0),y={ref:e=>{e&&(c.current=e)},select:!0,variant:"outlined",size:"small","aria-label":l?`Select ${(u=(s=i?.schema)==null?void 0:s.characteristics)==null?void 0:u.label}`:`Current ${(d=(r=i?.schema)==null?void 0:r.characteristics)==null?void 0:d.label}`,value:i?.id,helperText:i?.description,onChange:e=>{if(i!=null&&i.isDisabled)return;e.stopPropagation(),e.preventDefault();const t=e.target.value;t&&t!==i?.id&&f(n,t)},InputProps:{tabIndex:l?0:-1,readOnly:!l||m.disabled},SelectProps:{"data-mask-me":!0,"data-testid":`data-multifield-select-${n}`,size:"small",onClose:e=>{e.stopPropagation(),e.preventDefault()},MenuProps:{"data-mask-me":!0,slotProps:{paper:{sx:{width:h}}}}},sx:{width:"100%",...a.fieldInputDisabledStyle,...!l&&a.fieldInputReadonlyStyle,'& div[role="combobox"]':{width:"100%",height:"auto",overflow:"hidden",whiteSpace:"break-spaces!important"},"& .MuiSelect-select":{display:"block",alignItems:"center",whiteSpace:"break-spaces!important"},"& .Mui-disabled .MuiOutlinedInput-notchedOutline":{border:"none"},"& .Mui-disabled.MuiSelect-icon":{display:"none"},"& .Mui-disabled":{color:e=>`${e.palette.text.primary}`,WebkitTextFillColor:e=>`${e.palette.text.primary}`},"& .MuiFormHelperText-root":{ml:l?void 0:0}}};return g(()=>{const e=c.current;if(!e)return;const t=new ResizeObserver(b=>{for(const x of b)v(`${x.contentRect.width}px`)});return t.observe(e),()=>{t.disconnect()}},[]),i!=null&&i.id?o(I,{width:"100%",children:o(w,{...y,children:p.map(e=>o(k,{value:e.id,onClick:t=>{t.stopPropagation()},sx:a.menuStyle,children:e.displayValue??(e.isRequired?"-":null)},e.id))})}):o(O,{fieldKey:n})}export{$ as MultiField};
@@ -0,0 +1 @@
1
+ "use strict";import{FieldValue as s,FieldDescription as l}from"../style.mjs";import{jsxs as r,Fragment as a,jsx as i}from"react/jsx-runtime";function n({fieldKey:e}){return r(a,{children:[i(s,{fieldKey:e}),i(l,{fieldKey:e})]})}export{n as SingleField};
@@ -0,0 +1 @@
1
+ "use strict";import{credentialKeys as a}from"../../../core/fields/index.mjs";import{fieldInputTypes as l}from"../../../core/fields/constants.mjs";const r=({userPrivacyEnabled:e,field:t,fieldKey:s})=>{const i={role:"region","aria-label":t?.schema.characteristics.label,"data-testid":t?.schema.characteristics.inputType===l.composite?`data-field-composite-${s}`:`data-field-atomic-${s}`,"data-verified-sdk-field-value":void 0};return e||(i["data-verified-sdk-field-value"]=t?d(t):void 0),i};function o(e){return e===a.firstName?"given-name":e===a.lastName?"family-name":e===a.phone?"tel":e===a.address?"street-address address-level2 address-level1 postal-code":e===a.line2?"address-line2":"off"}const d=e=>{if(!(typeof e.value=="object"&&e.schema.key!==a.address))return e.schema.key===a.state||e.schema.key===a.issuanceState||e.schema.key===a.birthDate||e.schema.key===a.expirationDate||e.schema.key===a.issuanceDate?e.value:e.displayValue};export{o as getAutoCompleteAttributeValue,d as getFieldValue,r as makeAttributes};
@@ -0,0 +1 @@
1
+ "use strict";import{Stack as n,Typography as o}from"@mui/material";import{useFormField as l}from"../../core/field.hook.mjs";import{makeAttributes as m}from"./shared.mjs";import{useOneClickForm as y}from"../form.context.mjs";import{jsx as t,jsxs as s}from"react/jsx-runtime";function d({fieldKey:e,sx:i}){const{fieldProps:r}=l({key:e});return t(n,{sx:{flexShrink:0,alignItems:"flex-start",justifyContent:"flex-start",width:100,mt:.7,...i},children:t(o,{component:"span",variant:"subtitle2",textTransform:"uppercase",color:"text.primary",sx:{position:"relative",fontSize:12,fontWeight:700,textAlign:"left",alignSelf:"flex-start",letterSpacing:1},children:r.label})})}function h({fieldKey:e}){const{field:i}=l({key:e});return i?t(o,{"data-mask-me":!0,variant:"body1",sx:{fontSize:20,fontWeight:300,wordBreak:"break-word",textAlign:"left"},children:i?.displayValue||(i!=null&&i.isRequired?null:"-")}):null}function a({fieldKey:e}){const{fieldProps:i}=l({key:e});return i.description?t(o,{variant:"body1",color:"text.secondary",sx:{fontSize:12,fontWeight:400,wordBreak:"break-word",mt:.5,mr:1.75,textAlign:"left"},children:i.description}):null}function c({fieldKey:e,children:i,spacing:r}){const f=y(),{field:u}=l({key:e}),p=m({userPrivacyEnabled:f.options.features.enableUserPrivacy,field:u,fieldKey:e});return t(n,{component:"section",...p,spacing:r,style:{width:"100%"},children:i})}function x({fieldKey:e,children:i}){return t(c,{fieldKey:e,children:s(n,{direction:"row",width:"100%",children:[t(d,{fieldKey:e}),t(n,{direction:"column",children:i})]})})}function g({fieldKey:e}){return s(n,{children:[t(d,{fieldKey:e,sx:{width:"100%",mt:0}}),t(a,{fieldKey:e})]})}function b({children:e,spacing:i,sx:r}){return t(n,{spacing:i,sx:{pl:2,borderLeftWidth:1,borderLeftColor:"neutral.main",borderLeftStyle:"solid",...r},children:e})}export{a as FieldDescription,d as FieldLabel,x as FieldRow,c as FieldRowContainer,b as FieldSectionContent,g as FieldSectionTitle,h as FieldValue};
@@ -0,0 +1 @@
1
+ "use strict";import{Stack as a,Box as s,Button as l}from"@mui/material";import{Edit as d}from"@mui/icons-material";import{useOneClickForm as i}from"./form.context.mjs";import{ReadonlyFields as m}from"./fields/readonly/field.mjs";import{EditFields as f}from"./fields/input/field.mjs";import{jsxs as r,jsx as t,Fragment as c}from"react/jsx-runtime";function x(){var o;const e=i();return r(c,{children:[t(m,{}),!((o=e.formContext.state.form)!=null&&o.isDisabled)&&t(l,{"aria-controls":"credentials-region",variant:"text",size:"small",color:"neutral",startIcon:t(d,{"aria-hidden":"true"}),sx:{position:"absolute",top:4,right:0,zIndex:1},onClick:()=>{e.setEditMode(!0)},children:"Edit"})]})}function u(){return t(f,{})}function p({FooterComponent:o}){const e=i();return r(a,{"data-testid":"one-click-form-wrapper",component:"form",id:"credentials-region",role:"region","aria-label":e.editMode?"Edit your information":"Review your information",onSubmit:n=>{n.preventDefault(),e.formContext.submitForm()},spacing:2,sx:{display:"flex",alignSelf:"flex-start",alignItems:"flex-start",justifyContent:"flex-start",width:"100%","& > div, & > div > div":{display:"flex",flexDirection:"column"}},children:[t(s,{"data-testid":"one-click-form-content",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",sx:{flex:1,width:"100%"},children:e.editMode?t(u,{}):t(x,{})}),o&&t(o,{form:e.formContext})]})}export{p as OneClickFormContent};
@@ -0,0 +1 @@
1
+ "use strict";import{useState as n,useMemo as l,createContext as m,useContext as d}from"react";import{QueryClient as f,QueryClientProvider as C}from"@tanstack/react-query";import{useForm as h}from"../core/form.context.mjs";import{jsx as i}from"react/jsx-runtime";const s=m(null);function p({options:e,children:c}){const r=h(),[t,o]=n(!r.state.form.isValid),[u]=n(()=>e.queryClient??new f({defaultOptions:{queries:{retry:1/0,retryDelay:3e3,refetchOnReconnect:!1,refetchOnMount:!1,refetchOnWindowFocus:!1}}})),a=l(()=>({formContext:r,options:e,editMode:t,setEditMode:o}),[r,e,t,o]);return i(C,{client:u,children:i(s.Provider,{value:a,children:c})})}function O(){const e=d(s);if(!e)throw new Error("useOneClickForm must be used within a OneClickFormProvider");return e}export{p as OneClickFormProvider,O as useOneClickForm};
@@ -0,0 +1 @@
1
+ "use strict";import{useMemo as s}from"react";import{FormProvider as p}from"../core/form.context.mjs";import{OneClickFormProvider as a}from"./form.context.mjs";import{OneClickFormContent as c}from"./form-content.mjs";import{jsx as o}from"react/jsx-runtime";import{FormBuilder as d}from"../../core/form/formBuilder.mjs";function l({credentialRequests:r,credentials:e,options:t,onSubmit:n,FooterComponent:m}){const i=s(()=>new d().createFromCredentialAndRequests(e,r),[e,r]);return o(p,{form:i,onSubmit:n,children:o(a,{options:t,children:o(c,{FooterComponent:m})})})}export{l as NewOneClickForm};
@@ -0,0 +1 @@
1
+ "use strict";import{forwardRef as q,useRef as b,useState as R,useImperativeHandle as H,useMemo as L,useCallback as m}from"react";import{useTheme as O,FormControl as U,InputBase as G,Box as J,TextField as N,Stack as Q,Typography as V}from"@mui/material";import{v4 as X}from"uuid";import{jsx as g,jsxs as $}from"react/jsx-runtime";function Y(t,A){const l=O(),w=b(Array.from({length:6},()=>X())),[f,h]=R([]),c=b(null),o=b([]),x=b(null),[P,k]=R(!1);H(A,()=>({get value(){return f.join("")},set value(e){var n;h(e.split("")),(n=t.onChange)==null||n.call(t,{target:{value:e}})},focus(){var e,n;(e=o.current[0])==null||e.click(),(n=o.current[0])==null||n.focus()},blur(){o.current.forEach(e=>e?.blur())},clear(){h([])}}),[t,f]);const B={borderColor:t.error?l.palette.error.main:l.palette.action.disabled},F={borderColor:t.error?l.palette.error.main:l.palette.text.primary},M={borderColor:t.error?l.palette.error.main:l.palette.primary.main,boxShadow:`inset 0 0 0 1px ${t.error?l.palette.error.main:l.palette.primary.main}`},K={boxSizing:"content-box",direction:"row",alignItems:"center",spacing:1.25,sx:{"& input":{textAlign:"center",fontWeight:500,height:30,[l.breakpoints.down("xs")]:{height:16,fontSize:16,pt:1,pb:1,px:1},[l.breakpoints.up("xs")]:{fontSize:28,px:1},fontSize:32,py:1.75,borderRadius:1,borderStyle:"solid",borderWidth:1,...B},...!t.disabled&&{"&:hover input":{...F}},...P&&{"& input, &:hover input":{...M}}}},y=L(()=>({inputProps:{inputMode:"numeric",pattern:"[0-9]*",autoCorrect:"off",autoCapitalize:"off"}}),[]),S=m(e=>{var n;const r=e.target.value.replace(/[^0-9]/g,"");if(r.length===6&&/^\d{6}$/.test(r)){const p=r.split("");c.current&&(c.current.value=r),(n=t.onChange)==null||n.call(t,{target:{value:r}}),o.current.forEach(v=>v?.blur()),h(p);return}const u=e.currentTarget.ownerDocument,a=o.current.findIndex(p=>p===u.activeElement),i=r.charAt(r.length-1);!i||!/^[0-9]$/.test(i)||h(p=>{var v,D;const d=[...p];if(a!==-1)d[a]=i;else{const s=d.findIndex(W=>!W);s!==-1?d[s]=i:d.length<6&&d.push(i)}const C=d.join("");if(c.current&&(c.current.value=C),C.length===6)o.current.forEach(s=>s?.blur()),(v=t.onChange)==null||v.call(t,{target:{value:C}});else{const s=a!==-1?a+1:0;s<6&&((D=o.current[s])==null||D.focus())}return d})},[t]),E=m(e=>{e.key==="Backspace"&&h(n=>{var r;const u=[...n.slice(0,-1)];c.current&&(c.current.value=u.join(""));const a=u.length;return a>=0&&a<6&&((r=o.current[a])==null||r.focus()),u})},[]),I=m(e=>{var n,r;const u=e.currentTarget.ownerDocument,a=o.current.findIndex(p=>p===u.activeElement);if(a===-1)return;let i=a;switch(e.key){case"ArrowLeft":i=Math.max(0,a-1);break;case"ArrowRight":i=Math.min(5,a+1);break;default:return}i!==a&&(e.preventDefault(),(n=o.current[i])==null||n.focus(),(r=o.current[i])==null||r.select())},[]),T=m(()=>{k(!0)},[]),j=m(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{var e;const n=(e=o.current[0])==null?void 0:e.ownerDocument;o.current.some(r=>r&&r===n?.activeElement)||k(!1)},0)},[]),z=m(e=>new Array(3).fill(void 0).map((n,r)=>g(U,{children:g(G,{inputRef:u=>o.current[r+e]=u,id:w.current[r+e],name:`otp-input-${r+e}`,autoComplete:r+e===0?t.autoComplete??"one-time-code":void 0,autoFocus:r+e===0,value:f[r+e]||"",disabled:t.disabled,onChange:S,onKeyUp:E,onKeyDown:I,onFocus:T,onBlur:j,tabIndex:r+e+1,...y,"data-testid":`otp-input-${r+e}`,inputProps:{...y.inputProps,"aria-required":"true","aria-invalid":t.error?"true":"false","aria-label":`Digit ${r+e+1} of 6`}})},w.current[r+e])),[S,T,E,I,j,f,y,t.autoComplete,t.disabled]);return $(J,{width:"100%",sx:t.sx,children:[g("div",{style:{display:"none!important",pointerEvents:"none"},children:g(N,{inputRef:c,name:t.name,type:"text",value:f.join("")||"",sx:{pointerEvents:"none",display:"none"},inputProps:{hidden:!0}})}),$(Q,{"data-testid":"otp-input-container",...K,children:[z(0),g(V,{sx:{fontWeight:"700",fontSize:32},children:"-"}),z(3)]})]})}const _=q(Y);export{_ as OTPInput};
@@ -0,0 +1 @@
1
+ "use strict";import{useCallback as D}from"react";import{Box as d}from"@mui/material";import{useFormContext as C}from"react-hook-form";import{DataFieldRootStack as g}from"../DataField/DataFieldRootStack.mjs";import{DataFieldComposite as j}from"../DataField/DataFieldComposite.mjs";import{DataFieldAtomic as v}from"../DataField/DataFieldAtomic.mjs";import{CredentialsDisplayItem as p}from"./CredentialsDisplayItem.mjs";import{useCredentialsDisplay as F}from"./CredentialsDisplayContext.mjs";import{jsx as e,jsxs as b}from"react/jsx-runtime";import{EditModeButton as I}from"./components/EditModeButton.mjs";import{extractChildrenFromCredentialFieldSet as k}from"./utils/extractChildrenFromCredentialFieldSet.mjs";function w(){const f=F(),c=C().watch(),o=D((t,i=[])=>{const[a,s]=t,{id:l,credentialDisplayInfo:x}=s,n=k(s),h=Object.keys(n).length>0,u=i.length===0,y=[...i,a].map(r=>r).join("."),m={credentialDisplayInfo:x,path:y,isRoot:u};return h?e(p,{providerProps:m,children:e(j,{children:Object.entries(n).map(r=>o(r,[...i,a]))})},l):e(p,{providerProps:m,children:e(v,{})},l)},[]);return e(d,{id:"credentials-region",role:"region","aria-label":f.isEditMode?"Edit your information":"Review your information",display:"flex",sx:{alignSelf:"flex-start",alignItems:"flex-start",justifyContent:"flex-start",width:"100%","& > div, & > div > div":{display:"flex",flexDirection:"column"}},children:b(d,{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",sx:{flex:1,width:"100%"},children:[e(g,{sx:{mt:.75},children:Object.entries(c).map(t=>o(t))}),e(I,{})]})})}export{w as default};
@@ -0,0 +1 @@
1
+ "use strict";import{useMemo as y,useReducer as B,useState as E,useRef as G,useEffect as O,createContext as H,useContext as Q}from"react";import{produce as c}from"immer";import{useForm as U,FormProvider as W}from"react-hook-form";import{zodResolver as X}from"@hookform/resolvers/zod";import{useOneClickFormOptions as Y}from"../../contexts/one-click-form-options.context.mjs";import{jsx as b}from"react/jsx-runtime";import{makeCredentialDisplayInfoList as Z}from"./utils/makeCredentialDisplayInfoList.mjs";import{transformToFormObject as S}from"./utils/transformToFormObject.mjs";import{transformToFormSchema as R}from"./utils/transformToFormSchema.mjs";import{hasMandatoryFieldEmpty as K}from"./utils/hasMandatoryFieldEmpty.mjs";import{extractChildrenFromCredentialFieldSet as h}from"./utils/extractChildrenFromCredentialFieldSet.mjs";import{isRequiredCredentialDisplayInfo as T}from"./utils/isRequiredCredentialDisplayInfo.mjs";const j=H(null);function _(){const r=Q(j);if(!r)throw new Error("The component calling this hook is missing a parent with *CredentialDisplayProvider*");return r}function ee({value:r,children:F}){const V=r.schema,C=Y(),$=y(()=>Z(r.credentials,r.credentialRequests,r.schema),[r.credentialRequests,r.credentials,r.schema]),[m]=B(c,{credentials:r.credentials,credentialRequests:r.credentialRequests,schema:r.schema,displayInfoList:$}),u=y(()=>S(m.displayInfoList),[m.displayInfoList]),[q,M]=E(R(u,{schema:V},C.options)),s=U({mode:"all",defaultValues:u,resolver:X(q)}),k=G(s);k.current=s;const{errors:w}=s.formState,D=Object.keys(w),g=y(()=>D.length>0,[D]),[f,x]=E(!1),L=(t,o)=>{const e=s.getValues(t),a=e.credentialDisplayInfo.instances.find(d=>d.id===o);if(!a)throw new Error("matchDisplayInfo should not be undefined.");a.instances=JSON.parse(JSON.stringify(e.credentialDisplayInfo.instances));const i=S([a]),l=Object.values(i)[0];s.setValue(t,l,{shouldValidate:!1,shouldDirty:!1,shouldTouch:!1})},I=(t,o,e=!0)=>{const a=(i,l)=>{const d=c(l,n=>{T(n.credentialDisplayInfo.credentialRequest)||(n.credentialDisplayInfo.uiState.isChecked=o)});if(s.setValue(i,d,{shouldValidate:!1,shouldDirty:!1,shouldTouch:!1}),e){const n=h(l);Object.entries(n).forEach(([p,A])=>a(`${i}.${p}`,A))}};a(t,s.getValues(t))},P=(t,o,e)=>{I(t,!!o,!1);const a=c(s.getValues(t),i=>{i.value=o});s.setValue(t,a,{shouldValidate:e?.shouldValidate??!0,shouldTouch:!0,shouldDirty:!0})},J=(t,o,e)=>{o?s.clearErrors(t):s.setError(t,{type:"custom",message:e})},N=t=>{const o=c(s.getValues(t),e=>{e.value="";const a=h(e);!Object.values(a).length&&!T(e.credentialDisplayInfo.credentialRequest)&&(e.credentialDisplayInfo.uiState.isChecked=!1)});s.setValue(t,o,{shouldValidate:!1,shouldDirty:!0,shouldTouch:!0})},z=(t,o)=>{const e=(a,i)=>{const l=c(i,n=>{n.value=n.credentialDisplayInfo.value,n.credentialDisplayInfo.uiState.isEditMode=o});s.setValue(a,l,{shouldValidate:!1,shouldDirty:!0,shouldTouch:!0});const d=h(i);Object.entries(d).forEach(([n,p])=>e(`${a}.${n}`,p))};e(t,s.getValues(t))},v=t=>{x(t);const o=(e,a)=>{const i=c(a,d=>{d.credentialDisplayInfo.uiState.isEditMode=t});s.setValue(e,i,{shouldValidate:!1,shouldDirty:!1,shouldTouch:!1});const l=h(a);for(const[d,n]of Object.entries(l))o(`${e?`${e}.${d}`:d}`,n)};(e=>{const a=h(s.getValues());for(const[i,l]of Object.entries(a))o(`${i}`,l)})()};return O(()=>{const t=s.watch((o,e)=>{M(()=>R(o,{schema:V},C.options)),s.trigger(e.name)});return()=>{t.unsubscribe()}},[s,u]),O(()=>{f||v(g||K(u))},[u,f,g]),b(W,{...s,children:b(j.Provider,{value:{...m,isEditMode:f,handleChangeCredentialInstance:L,handleSelectCredential:I,handleChangeValueCredential:P,handleClearValueCredential:N,handleChangeValidationCredential:J,handleToggleEditModeCredential:z,setEditMode:v},children:F})})}export{ee as default,_ as useCredentialsDisplay};
@@ -0,0 +1 @@
1
+ "use strict";import e from"./CredentialsDisplayItemContext.mjs";import{jsx as o}from"react/jsx-runtime";function t({providerProps:r,...i}){return o(e,{...r,children:i.children})}export{t as CredentialsDisplayItem};
@@ -0,0 +1 @@
1
+ "use strict";import{useMemo as d,createContext as x,useContext as E}from"react";import{useFormContext as O,useController as j}from"react-hook-form";import{useDebounceCallback as F}from"../../hooks/useDebounceCallback.mjs";import{useCredentialsDisplay as M}from"./CredentialsDisplayContext.mjs";import{jsx as P}from"react/jsx-runtime";import{getParentPath as N}from"./utils/getParentPath.mjs";import{DEBOUNCE_MS as T}from"../DataField/utils/defaults.mjs";import{extractChildrenFromCredentialFieldSet as J}from"./utils/extractChildrenFromCredentialFieldSet.mjs";const u=x(null);function R(){const n=E(u);if(!n)throw new Error("The component calling this hook is missing a parent with *CredentialsDisplayItemProvider*");return n}function U(n){const{children:p,isRoot:o,...t}=n,l=M(),s=O(),m=j({name:n.path}),f=o?void 0:s.watch(N(n.path)),i=s.watch(n.path),h=(e,a=!0)=>{l.handleSelectCredential(t.path,e,a)},g=e=>{l.handleChangeCredentialInstance(t.path,e)},C=(e,a)=>{l.handleChangeValueCredential(t.path,e,a),h(!!e,!0)},D=F((e,a)=>{C(e,a)},T),v=(e,a,r)=>{l.handleChangeValueCredential(`${t.path}.${e}`,a,r)},y=(e,a)=>{l.handleChangeValidationCredential(t.path,e,a)},I=()=>{l.handleClearValueCredential(t.path)},S=e=>{l.handleToggleEditModeCredential(t.path,e)},V=d(()=>i.credentialDisplayInfo.uiState.isChecked,[i.credentialDisplayInfo.uiState.isChecked]),b=d(()=>{const e=a=>{var r;const{credentialDisplayInfo:w}=a,c=J(a);return Object.values(c).length?Object.values(c).every(e):((r=w.uiState)==null?void 0:r.isChecked)||!1};return e(i)},[JSON.stringify(i)]),k=d(()=>{var e,a;return!((a=(e=t.credentialDisplayInfo)==null?void 0:e.credentialRequest)!=null&&a.allowUserInput)},[JSON.stringify(t.credentialDisplayInfo)]);return P(u.Provider,{value:{...t,objectController:m,parentFieldSet:f,isRoot:o,isChecked:V,isAllChecked:b,isDisabled:k,handleSelectCredential:h,handleChangeCredentialInstance:g,handleChangeValueCredential:C,handleChangeDebouncedValueCredential:D,handleChangeChildValueCredential:v,handleChangeValidationCredential:y,handleClearValueCredential:I,handleToggleEditModeCredential:S},children:p})}export{U as default,R as useCredentialsDisplayItem};
@@ -0,0 +1 @@
1
+ "use strict";import{Button as e}from"@mui/material";import{Edit as s}from"@mui/icons-material";import{useFormContext as n}from"react-hook-form";import{useCredentialsDisplay as a}from"../CredentialsDisplayContext.mjs";import{jsx as o}from"react/jsx-runtime";import{isSomeFieldInputAllowed as d}from"../utils/isSomeFieldInputAllowed.mjs";function l(){const t=a(),i=n().watch(),r=d(i);return t.isEditMode||!r?null:o(e,{"aria-controls":"credentials-region",variant:"text",size:"small",color:"neutral",startIcon:o(s,{"aria-hidden":"true"}),sx:{position:"absolute",top:4,right:0,zIndex:1},onClick:()=>{t.setEditMode(!0)},children:"Edit"})}export{l as EditModeButton};
@@ -0,0 +1 @@
1
+ "use strict";import{useMemo as s}from"react";import{useFormContext as f}from"react-hook-form";import{useCredentialsDisplayItem as u}from"./CredentialsDisplayItemContext.mjs";function c(){const l=f(),{isValid:o,errors:t}=l.formState,{objectController:m,credentialDisplayInfo:a}=u(),{isTouched:i,error:e}=m.fieldState,n=s(()=>!o||Object.keys(t).length>0,[o,t]),r=s(()=>!i&&!e?!0:!e,[i,e]),d=s(()=>r?"":e?e.message:`${a.label} is not valid`,[r,e,a.label]);return{isValid:r,isFormInvalid:n,errorMessage:d}}export{c as useCredentialsDisplayItemValid};
@@ -0,0 +1 @@
1
+ "use strict";var A=(a=>(a.YES="yes",a.NO="no",a.IF_AVAILABLE="if_available",a))(A||{});export{A as MandatoryEnum};
@@ -0,0 +1 @@
1
+ "use strict";function n(e){const{id:r,value:i,type:l,credentialDisplayInfo:a,...t}=e;return t}export{n as extractChildrenFromCredentialFieldSet};
@@ -0,0 +1 @@
1
+ "use strict";import r from"lodash";function s(c,t=[],o=[]){return r.forOwn(c,(e,n)=>{(n==="$ref"&&typeof e=="string"||n==="$id"&&typeof e=="string"&&r.some(o,p=>["allOf","anyOf","oneOf"].includes(p)))&&t.push(e),r.isObject(e)&&s(e,t,[...o,n])}),t}export{s as extractTypesFromSchema};
@@ -0,0 +1 @@
1
+ "use strict";import n from"lodash";import{getCredentialValues as a}from"./getCredentialValues.mjs";function d(l){return n.uniqWith(l,function(e,t){var r,i;const o=a(e),u=a(t),s=n.isEqual(o,u);return((r=e.credentialRequest)==null?void 0:r.type)===((i=t.credentialRequest)==null?void 0:i.type)&&s})}export{d as filterRepeatedCredentials};
@@ -0,0 +1 @@
1
+ "use strict";import o from"lodash";import{isAtomicBySchema as u}from"../../../utils/isAtomicBySchema.mjs";import{isCompositeBySchema as m}from"../../../utils/isCompositeBySchema.mjs";import{extractChildrenFromCredentialFieldSet as b}from"./extractChildrenFromCredentialFieldSet.mjs";const S=(e,v,h)=>{var a,f;let t;if(u(e)&&e.if){const r=Object.keys((a=e.if)==null?void 0:a.properties)[0],y=(f=e.if)==null?void 0:f.properties[r].const,O=o.chain(o.toArray(v)).find(i=>m(i)?!!o.find([i.anyOf,i.oneOf],n=>o.find(n,l=>o.get(l,`properties.${r}`))):!!o.get(i,`properties.${r}`)).get("$id").value(),s=(i,n)=>{var l;if(!n)return;const{credentialDisplayInfo:d}=n,c=b(n);if(((l=d?.credentialRequest)==null?void 0:l.type)===i)return n;if(Object.values(c).length!==0)return Object.values(c).find(g=>s(i,g))},p=s(O,h);p?.value===y&&(t=e.then.properties)}if(!(m(e)&&(t=o.chain(e.anyOf||e.oneOf).find(r=>r?.allOf===void 0).get("properties").value(),!t))){if(!t&&u(e)&&(t=e.properties),!t)throw new Error("Schema is not defined.");return Object.values(t)[0]}};export{S as findCorrectSchemaProperty};
@@ -0,0 +1 @@
1
+ "use strict";function u(d,n){return d.map(r=>{var e,t;if(!Array.isArray(n.children))throw new Error(`${(e=n.credentialRequest)==null?void 0:e.type} is not an array`);const i=n.children.find(l=>{var a;return((a=l.credentialRequest)==null?void 0:a.type)===r});return i?{[(t=i.credentialRequest)==null?void 0:t.type]:i}:{}}).reduce((r,e)=>e?{...r,...e}:r,{})}export{u as findCredentialsByType};
@@ -0,0 +1 @@
1
+ "use strict";import{stringUtils as s}from"../../../utils/string.mjs";import{isAtomicBySchema as n}from"../../../utils/isAtomicBySchema.mjs";import{isCompositeBySchema as a}from"../../../utils/isCompositeBySchema.mjs";const p=(i,r)=>{if(!i){const e="schema must be defined";throw console.error(e),new Error(e)}const[,o]=Object.entries(i).find(([e])=>e===r);if(!o){const e=`Schema for ${r} not found`;throw console.error(e),new Error(e)}let t;if(n(o)&&(t=Object.values(o.properties)[0]),a(o)){const e=(o.allOf||o.anyOf||[]).find(l=>l?.properties!==void 0);t={...Object.values(e?.properties??{})[0],title:s.prettifyCamelCase(o.$id.replace("Credential",""))}}return{type:r,label:t?.title,displayFormat:t?.displayFormat,schema:o}};export{p as getCredentialTypeDisplayInfo};
@@ -0,0 +1 @@
1
+ "use strict";function l(a,n){return(Array.isArray(a)?a:[a]).reduce((e,r)=>Array.isArray(r.children)?[...e,...l(r.children,e)]:r.value.length?[...e,r.value]:e,n||[])}export{l as getCredentialValues};
@@ -0,0 +1 @@
1
+ "use strict";const e=s=>{const t=s.lastIndexOf(".");return t===-1?s:s.substring(t+1)};export{e as getLastPathName};
@@ -0,0 +1 @@
1
+ "use strict";const e=n=>{const t=n.lastIndexOf(".");return t===-1?n:n.substring(0,t)};export{e as getParentPath};
@@ -0,0 +1 @@
1
+ "use strict";const i=(t,a=1)=>{const n=[];function e(r,d=!0,f=0){const o=["anyOf","allOf","oneOf"],u=c=>Object.keys(c).some(s=>o.includes(s));d||(r.$id||r.$ref)&&n.push(r.$id||r.$ref),u(r)&&o.forEach(c=>{if(!r[c])return;const s=r[c];Array.isArray(s)?s.forEach(h=>{f>a||e(h,!1,f+1)}):e(s,!1,f)})}return e(t),n};export{i as getReferencedSchemaNames};
@@ -0,0 +1 @@
1
+ "use strict";import{extractChildrenFromCredentialFieldSet as n}from"./extractChildrenFromCredentialFieldSet.mjs";import{isRequiredCredentialDisplayInfo as o}from"./isRequiredCredentialDisplayInfo.mjs";function t(e,s){const i=n(e),r=Object.entries(i);return r.length?r.some(([l,a])=>t(a)):o(e.credentialDisplayInfo.credentialRequest)&&!e.value}export{t as hasMandatoryFieldEmpty};
@@ -0,0 +1 @@
1
+ "use strict";import r from"lodash";import{getCredentialValues as t}from"./getCredentialValues.mjs";function a(n){if(n.originalInstance===null)return!1;const e=t(n),i=t(n.originalInstance);return!r.isEqual(e,i)}export{a as isNewCredentialAgainstInstance};
@@ -0,0 +1 @@
1
+ "use strict";import{getCredentialValues as t}from"./getCredentialValues.mjs";function a(e){return t(e).every(r=>!r)}export{a as isNewCredentialValues};
@@ -0,0 +1 @@
1
+ "use strict";import{MandatoryEnum as o}from"../types.mjs";const t=a=>a.mandatory===o.YES||a.mandatory===o.IF_AVAILABLE;export{t as isRequiredCredentialDisplayInfo};
@@ -0,0 +1 @@
1
+ "use strict";import{extractChildrenFromCredentialFieldSet as a}from"./extractChildrenFromCredentialFieldSet.mjs";function u(l){const t=e=>{var r,n;if(e.type==="PhoneCredential")return!1;if((n=(r=e.credentialDisplayInfo)==null?void 0:r.credentialRequest)!=null&&n.allowUserInput)return!0;const i=a(e);return Object.values(i).some(o=>t(o))};return t(l)}export{u as isSomeFieldInputAllowed};
@@ -0,0 +1 @@
1
+ "use strict";import{InputFormatEnum as a}from"../../../types/input-format.mjs";import{when as p}from"../../../utils/when.mjs";import{defaultTextSchema as f,emailSchema as h,phoneSchema as d,timestampSchema as S}from"../../validations/fragments/credentials.mjs";import{minimumDate1900Schema as P,minimumAge18Schema as g}from"../../validations/fragments/birthDate.mjs";import{SSNSchema as y}from"../../../../../../validations/ssn.schema.mjs";import{credentialTypes as v}from"../../../constants/credentialTypes.mjs";const x=(o,s,c,l)=>{var t,i;const{phoneCredentialWhitelist:u,phoneCredentialRegexWhitelist:n}=l??{};if(Array.isArray(c.children))return{success:!0};const e=String(o);return(t=s?.input)!=null&&t.pattern?{success:new RegExp(s.input.pattern).test(e)}:p((i=s?.input)==null?void 0:i.type,{[a.Date]:()=>{var r;if(!S.safeParse(e).success)return{success:!1,error:""};if(!P.safeParse(e).success)return{success:!1,error:""};if(c.credentialRequest.type===v.BirthDateCredential){const m=g.safeParse(e);if(!m.success)return{success:!1,error:(r=m.error)==null?void 0:r.errors[0].message}}return{success:!0}},[a.Email]:()=>({success:h.safeParse(e).success}),[a.Phone]:()=>n&&new RegExp(n).test(e)?{success:!0}:Array.isArray(u)&&u.some(r=>r===e)?{success:!0}:{success:d.safeParse(e).success},[a.SSN]:()=>e.includes("\u2022\u2022\u2022-\u2022\u2022-")?{success:!0}:{success:y.safeParse(e).success},else:()=>({success:f.safeParse(e).success})})};export{x as isValidInputCredential};