@verifiedinc-public/shared-ui-elements 9.5.1 → 9.6.0

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 (225) hide show
  1. package/dist/components/BrandFilterInput/BrandFilterInput.hook.mjs +1 -1
  2. package/dist/components/CredentialRequestsEditor/utils/buildDataFieldValue.mjs +1 -1
  3. package/dist/components/chart/MetricLastUpdated.mjs +1 -1
  4. package/dist/components/chart/SeriesChart/SeriesChart.map.mjs +1 -1
  5. package/dist/components/form/NewOneClickForm/core/form/formField.mjs +1 -1
  6. package/dist/components/form/NewOneClickForm/core/form/formFieldBuilder.mjs +1 -1
  7. package/dist/components/form/index.d.ts +0 -1
  8. package/dist/components/index.mjs +1 -1
  9. package/dist/hooks/useBidirectionalScroll.mjs +1 -1
  10. package/dist/index.mjs +1 -1
  11. package/dist/utils/omitProperty.mjs +1 -1
  12. package/package.json +1 -1
  13. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplay.d.ts +0 -2
  14. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplay.mjs +0 -1
  15. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayContext.d.ts +0 -38
  16. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayContext.mjs +0 -1
  17. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItem.d.ts +0 -13
  18. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItem.mjs +0 -1
  19. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItemContext.d.ts +0 -47
  20. package/dist/components/form/OneClickForm/components/CredentialsDisplay/CredentialsDisplayItemContext.mjs +0 -1
  21. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/EditModeButton.d.ts +0 -2
  22. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/EditModeButton.mjs +0 -1
  23. package/dist/components/form/OneClickForm/components/CredentialsDisplay/components/index.d.ts +0 -1
  24. package/dist/components/form/OneClickForm/components/CredentialsDisplay/hooks.d.ts +0 -8
  25. package/dist/components/form/OneClickForm/components/CredentialsDisplay/hooks.mjs +0 -1
  26. package/dist/components/form/OneClickForm/components/CredentialsDisplay/types.d.ts +0 -67
  27. package/dist/components/form/OneClickForm/components/CredentialsDisplay/types.mjs +0 -1
  28. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.d.ts +0 -9
  29. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.mjs +0 -1
  30. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractTypesFromSchema.d.ts +0 -12
  31. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/extractTypesFromSchema.mjs +0 -1
  32. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/filterRepeatedCredentials.d.ts +0 -7
  33. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/filterRepeatedCredentials.mjs +0 -1
  34. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCorrectSchemaProperty.d.ts +0 -7
  35. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCorrectSchemaProperty.mjs +0 -1
  36. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCredentialsByType.d.ts +0 -8
  37. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/findCredentialsByType.mjs +0 -1
  38. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialTypeDisplayInfo.d.ts +0 -8
  39. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialTypeDisplayInfo.mjs +0 -1
  40. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialValues.d.ts +0 -9
  41. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getCredentialValues.mjs +0 -1
  42. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getLastPathName.d.ts +0 -6
  43. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getLastPathName.mjs +0 -1
  44. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getParentPath.d.ts +0 -6
  45. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getParentPath.mjs +0 -1
  46. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getReferencedSchemaNames.d.ts +0 -8
  47. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/getReferencedSchemaNames.mjs +0 -1
  48. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/hasMandatoryFieldEmpty.d.ts +0 -9
  49. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/hasMandatoryFieldEmpty.mjs +0 -1
  50. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/index.d.ts +0 -19
  51. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialAgainstInstance.d.ts +0 -9
  52. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialAgainstInstance.mjs +0 -1
  53. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialValues.d.ts +0 -6
  54. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isNewCredentialValues.mjs +0 -1
  55. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isRequiredCredentialDisplayInfo.d.ts +0 -4
  56. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isRequiredCredentialDisplayInfo.mjs +0 -1
  57. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isSomeFieldInputAllowed.d.ts +0 -6
  58. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isSomeFieldInputAllowed.mjs +0 -1
  59. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isValidInputCredential.d.ts +0 -13
  60. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/isValidInputCredential.mjs +0 -1
  61. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/makeCredentialDisplayInfoList.d.ts +0 -14
  62. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/makeCredentialDisplayInfoList.mjs +0 -1
  63. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/sortCredentialsBySchema.d.ts +0 -2
  64. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/sortCredentialsBySchema.mjs +0 -1
  65. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormObject.d.ts +0 -6
  66. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormObject.mjs +0 -1
  67. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormSchema.d.ts +0 -15
  68. package/dist/components/form/OneClickForm/components/CredentialsDisplay/utils/transformToFormSchema.mjs +0 -1
  69. package/dist/components/form/OneClickForm/components/DataField/DataFieldAtomic.d.ts +0 -6
  70. package/dist/components/form/OneClickForm/components/DataField/DataFieldAtomic.mjs +0 -1
  71. package/dist/components/form/OneClickForm/components/DataField/DataFieldCheckbox.d.ts +0 -7
  72. package/dist/components/form/OneClickForm/components/DataField/DataFieldCheckbox.mjs +0 -1
  73. package/dist/components/form/OneClickForm/components/DataField/DataFieldClearAdornment.d.ts +0 -6
  74. package/dist/components/form/OneClickForm/components/DataField/DataFieldClearAdornment.mjs +0 -1
  75. package/dist/components/form/OneClickForm/components/DataField/DataFieldComposite.d.ts +0 -11
  76. package/dist/components/form/OneClickForm/components/DataField/DataFieldComposite.mjs +0 -1
  77. package/dist/components/form/OneClickForm/components/DataField/DataFieldDescription.d.ts +0 -1
  78. package/dist/components/form/OneClickForm/components/DataField/DataFieldDescription.mjs +0 -1
  79. package/dist/components/form/OneClickForm/components/DataField/DataFieldGroup.d.ts +0 -13
  80. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/index.d.ts +0 -2
  81. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/index.mjs +0 -1
  82. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/styles.d.ts +0 -2
  83. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/styles.mjs +0 -1
  84. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/getAddressFormat.d.ts +0 -2
  85. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/getAddressFormat.mjs +0 -1
  86. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/index.d.ts +0 -1
  87. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/renderInstance.d.ts +0 -3
  88. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/HeaderSelect/utils/renderInstance.mjs +0 -1
  89. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/index.d.ts +0 -12
  90. package/dist/components/form/OneClickForm/components/DataField/DataFieldHeader/index.mjs +0 -1
  91. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputLabel.d.ts +0 -14
  92. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputLabel.mjs +0 -1
  93. package/dist/components/form/OneClickForm/components/DataField/DataFieldInputModeHeader.d.ts +0 -11
  94. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabel.d.ts +0 -6
  95. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabel.mjs +0 -1
  96. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabelText.d.ts +0 -11
  97. package/dist/components/form/OneClickForm/components/DataField/DataFieldLabelText.mjs +0 -1
  98. package/dist/components/form/OneClickForm/components/DataField/DataFieldLeftSide.d.ts +0 -7
  99. package/dist/components/form/OneClickForm/components/DataField/DataFieldLeftSide.mjs +0 -1
  100. package/dist/components/form/OneClickForm/components/DataField/DataFieldLegend.d.ts +0 -14
  101. package/dist/components/form/OneClickForm/components/DataField/DataFieldLegend.mjs +0 -1
  102. package/dist/components/form/OneClickForm/components/DataField/DataFieldPaper.d.ts +0 -13
  103. package/dist/components/form/OneClickForm/components/DataField/DataFieldRootStack.d.ts +0 -8
  104. package/dist/components/form/OneClickForm/components/DataField/DataFieldRootStack.mjs +0 -1
  105. package/dist/components/form/OneClickForm/components/DataField/DataFieldStack.d.ts +0 -8
  106. package/dist/components/form/OneClickForm/components/DataField/DataFieldStack.mjs +0 -1
  107. package/dist/components/form/OneClickForm/components/DataField/DataFieldValue.d.ts +0 -13
  108. package/dist/components/form/OneClickForm/components/DataField/DataFieldValue.mjs +0 -1
  109. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldImage.d.ts +0 -6
  110. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldImage.mjs +0 -1
  111. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldInputAddress.d.ts +0 -10
  112. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldInputSelect.d.ts +0 -9
  113. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldText.d.ts +0 -6
  114. package/dist/components/form/OneClickForm/components/DataField/formats/DataFieldText.mjs +0 -1
  115. package/dist/components/form/OneClickForm/components/DataField/formats/index.d.ts +0 -3
  116. package/dist/components/form/OneClickForm/components/DataField/index.d.ts +0 -10
  117. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/autofill.hook.d.ts +0 -10
  118. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/autofill.hook.mjs +0 -1
  119. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/hook.d.ts +0 -20
  120. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/hook.mjs +0 -1
  121. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/index.d.ts +0 -6
  122. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/index.mjs +0 -1
  123. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldAddressInput/types.d.ts +0 -25
  124. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldDateInput.d.ts +0 -6
  125. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldDateInput.mjs +0 -1
  126. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldImageInput.d.ts +0 -6
  127. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldImageInput.mjs +0 -1
  128. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldPhoneInput.d.ts +0 -2
  129. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldPhoneInput.mjs +0 -1
  130. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSSNInput.d.ts +0 -6
  131. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSSNInput.mjs +0 -1
  132. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSelectInput.d.ts +0 -5
  133. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldSelectInput.mjs +0 -1
  134. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldTextInput.d.ts +0 -5
  135. package/dist/components/form/OneClickForm/components/DataField/inputs/DataFieldTextInput.mjs +0 -1
  136. package/dist/components/form/OneClickForm/components/DataField/inputs/index.d.ts +0 -7
  137. package/dist/components/form/OneClickForm/components/DataField/types.d.ts +0 -19
  138. package/dist/components/form/OneClickForm/components/DataField/types.mjs +0 -1
  139. package/dist/components/form/OneClickForm/components/DataField/utils/defaults.d.ts +0 -4
  140. package/dist/components/form/OneClickForm/components/DataField/utils/defaults.mjs +0 -1
  141. package/dist/components/form/OneClickForm/components/DataField/utils/getAutoCompleteAttributeValue.d.ts +0 -6
  142. package/dist/components/form/OneClickForm/components/DataField/utils/getAutoCompleteAttributeValue.mjs +0 -1
  143. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabel.d.ts +0 -7
  144. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabel.mjs +0 -1
  145. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabelInput.d.ts +0 -7
  146. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialLabelInput.mjs +0 -1
  147. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialSeparator.d.ts +0 -1
  148. package/dist/components/form/OneClickForm/components/DataField/utils/getCredentialSeparator.mjs +0 -1
  149. package/dist/components/form/OneClickForm/components/DataField/utils/hasSomeRequiredEmptyCredential.d.ts +0 -2
  150. package/dist/components/form/OneClickForm/components/DataField/utils/index.d.ts +0 -5
  151. package/dist/components/form/OneClickForm/components/shared/CountrySelector.d.ts +0 -10
  152. package/dist/components/form/OneClickForm/components/shared/DefaultInput.d.ts +0 -6
  153. package/dist/components/form/OneClickForm/components/shared/IMaskInput.d.ts +0 -15
  154. package/dist/components/form/OneClickForm/components/shared/Image.d.ts +0 -16
  155. package/dist/components/form/OneClickForm/components/shared/Image.mjs +0 -1
  156. package/dist/components/form/OneClickForm/components/shared/ImageEncoded.d.ts +0 -14
  157. package/dist/components/form/OneClickForm/components/shared/ImageEncoded.mjs +0 -1
  158. package/dist/components/form/OneClickForm/components/shared/InputMask.d.ts +0 -26
  159. package/dist/components/form/OneClickForm/components/shared/TextInput.d.ts +0 -15
  160. package/dist/components/form/OneClickForm/components/shared/TextMaskCustom.d.ts +0 -15
  161. package/dist/components/form/OneClickForm/components/shared/Textarea.d.ts +0 -14
  162. package/dist/components/form/OneClickForm/components/shared/When.d.ts +0 -17
  163. package/dist/components/form/OneClickForm/components/shared/When.mjs +0 -1
  164. package/dist/components/form/OneClickForm/components/validations/fragments/birthDate.d.ts +0 -6
  165. package/dist/components/form/OneClickForm/components/validations/fragments/birthDate.mjs +0 -1
  166. package/dist/components/form/OneClickForm/components/validations/fragments/credentials.d.ts +0 -7
  167. package/dist/components/form/OneClickForm/components/validations/fragments/credentials.mjs +0 -1
  168. package/dist/components/form/OneClickForm/components/validations/fragments/email.d.ts +0 -2
  169. package/dist/components/form/OneClickForm/components/validations/fragments/email.mjs +0 -1
  170. package/dist/components/form/OneClickForm/components/validations/fragments/otp.d.ts +0 -2
  171. package/dist/components/form/OneClickForm/components/validations/fragments/phone.d.ts +0 -3
  172. package/dist/components/form/OneClickForm/components/validations/fragments/uuid.d.ts +0 -2
  173. package/dist/components/form/OneClickForm/components/validations/schemas/date.schema.d.ts +0 -2
  174. package/dist/components/form/OneClickForm/components/validations/schemas/date.schema.mjs +0 -1
  175. package/dist/components/form/OneClickForm/constants/credentialTypes.d.ts +0 -9
  176. package/dist/components/form/OneClickForm/constants/credentialTypes.mjs +0 -1
  177. package/dist/components/form/OneClickForm/constants/index.d.ts +0 -1
  178. package/dist/components/form/OneClickForm/contexts/one-click-form-options.context.d.ts +0 -34
  179. package/dist/components/form/OneClickForm/contexts/one-click-form-options.context.mjs +0 -1
  180. package/dist/components/form/OneClickForm/hooks/useCanFillByQueryParam.d.ts +0 -5
  181. package/dist/components/form/OneClickForm/hooks/useCanFillByQueryParam.mjs +0 -1
  182. package/dist/components/form/OneClickForm/hooks/useDebounce.d.ts +0 -1
  183. package/dist/components/form/OneClickForm/hooks/useDebounceCallback.d.ts +0 -46
  184. package/dist/components/form/OneClickForm/hooks/useDebounceCallback.mjs +0 -1
  185. package/dist/components/form/OneClickForm/hooks/usePrevious.d.ts +0 -5
  186. package/dist/components/form/OneClickForm/hooks/useZipCodeLookup.d.ts +0 -11
  187. package/dist/components/form/OneClickForm/index.d.ts +0 -15
  188. package/dist/components/form/OneClickForm/index.mjs +0 -1
  189. package/dist/components/form/OneClickForm/styles/input.d.ts +0 -9
  190. package/dist/components/form/OneClickForm/styles/input.mjs +0 -1
  191. package/dist/components/form/OneClickForm/types/display-format.d.ts +0 -12
  192. package/dist/components/form/OneClickForm/types/display-format.mjs +0 -1
  193. package/dist/components/form/OneClickForm/types/input-format.d.ts +0 -9
  194. package/dist/components/form/OneClickForm/types/input-format.mjs +0 -1
  195. package/dist/components/form/OneClickForm/types/request.d.ts +0 -11
  196. package/dist/components/form/OneClickForm/utils/calendarDateFormatter.d.ts +0 -6
  197. package/dist/components/form/OneClickForm/utils/calendarDateFormatter.mjs +0 -1
  198. package/dist/components/form/OneClickForm/utils/compareCredentialData.d.ts +0 -1
  199. package/dist/components/form/OneClickForm/utils/compareCredentialData.mjs +0 -1
  200. package/dist/components/form/OneClickForm/utils/currencyRangeFormatter.d.ts +0 -6
  201. package/dist/components/form/OneClickForm/utils/currencyRangeFormatter.mjs +0 -1
  202. package/dist/components/form/OneClickForm/utils/date.d.ts +0 -36
  203. package/dist/components/form/OneClickForm/utils/date.mjs +0 -1
  204. package/dist/components/form/OneClickForm/utils/formatCredentialValue.d.ts +0 -8
  205. package/dist/components/form/OneClickForm/utils/formatCredentialValue.mjs +0 -1
  206. package/dist/components/form/OneClickForm/utils/image.d.ts +0 -2
  207. package/dist/components/form/OneClickForm/utils/image.mjs +0 -1
  208. package/dist/components/form/OneClickForm/utils/isAtomicBySchema.d.ts +0 -1
  209. package/dist/components/form/OneClickForm/utils/isAtomicBySchema.mjs +0 -1
  210. package/dist/components/form/OneClickForm/utils/isCompositeBySchema.d.ts +0 -1
  211. package/dist/components/form/OneClickForm/utils/isCompositeBySchema.mjs +0 -1
  212. package/dist/components/form/OneClickForm/utils/masks.d.ts +0 -3
  213. package/dist/components/form/OneClickForm/utils/observers.d.ts +0 -33
  214. package/dist/components/form/OneClickForm/utils/phone.d.ts +0 -31
  215. package/dist/components/form/OneClickForm/utils/phone.mjs +0 -1
  216. package/dist/components/form/OneClickForm/utils/phoneNumberFormatter.d.ts +0 -7
  217. package/dist/components/form/OneClickForm/utils/phoneNumberFormatter.mjs +0 -1
  218. package/dist/components/form/OneClickForm/utils/regex.d.ts +0 -1
  219. package/dist/components/form/OneClickForm/utils/regex.mjs +0 -1
  220. package/dist/components/form/OneClickForm/utils/ssnFormatter.d.ts +0 -7
  221. package/dist/components/form/OneClickForm/utils/ssnFormatter.mjs +0 -1
  222. package/dist/components/form/OneClickForm/utils/string.d.ts +0 -14
  223. package/dist/components/form/OneClickForm/utils/string.mjs +0 -1
  224. package/dist/components/form/OneClickForm/utils/when.d.ts +0 -10
  225. package/dist/components/form/OneClickForm/utils/when.mjs +0 -1
@@ -1,6 +0,0 @@
1
- import { ReactElement } from 'react';
2
- /**
3
- * This component renders and manages the input value for display format Text or to strings.
4
- * @constructor
5
- */
6
- export declare function DataFieldText(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{Stack as i}from"@mui/material";import{formatCredentialValue as m}from"../../../utils/formatCredentialValue.mjs";import{useCredentialsDisplayItem as s}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{DataFieldDescription as d}from"../DataFieldDescription.mjs";import{MandatoryEnum as l}from"../../CredentialsDisplay/types.mjs";import{jsx as a,jsxs as t}from"react/jsx-runtime";import{DataFieldLabel as n}from"../DataFieldLabel.mjs";import{DataFieldValue as c}from"../DataFieldValue.mjs";function p(){const{credentialDisplayInfo:r}=s(),e=m(r.value,r.displayFormat),o=r.credentialRequest.mandatory===l.NO;return a("div",{style:{width:"100%"},children:t(i,{direction:"row",width:"100%",children:[a(n,{}),t(i,{direction:"column",children:[a(c,{children:e||o?"-":void 0}),a(d,{})]})]})})}export{p as DataFieldText};
@@ -1,3 +0,0 @@
1
- export * from './DataFieldImage';
2
- export * from './DataFieldInputAddress';
3
- export * from './DataFieldText';
@@ -1,10 +0,0 @@
1
- export * from './DataFieldInputLabel';
2
- export * from './DataFieldValue';
3
- export * from './DataFieldGroup';
4
- export * from './DataFieldLegend';
5
- export * from './DataFieldLabelText';
6
- export * from './DataFieldLabel';
7
- export * from './DataFieldInputModeHeader';
8
- export * from './DataFieldLeftSide';
9
- export * from './DataFieldClearAdornment';
10
- export * from './DataFieldHeader';
@@ -1,10 +0,0 @@
1
- import { Address, PlaceAddressComponent, PlaceSuggestion } from './types';
2
- type AutoFillHookReturn = {
3
- handleAutoComplete: (value: string) => Promise<void>;
4
- fetchPlace: (placeId: string) => Promise<PlaceAddressComponent[] | null>;
5
- buildAddress: (placeComponents: PlaceAddressComponent[]) => Address;
6
- suggestions: PlaceSuggestion[];
7
- isPending: boolean;
8
- };
9
- export declare function useAutoFill(): AutoFillHookReturn;
10
- export {};
@@ -1 +0,0 @@
1
- "use strict";import{useState as c,useRef as y}from"react";import{wrapPromise as l}from"../../../../../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{useOneClickFormOptions as b}from"../../../../contexts/one-click-form-options.context.mjs";function h(){const u=b(),{googlePlacesAutocompletePlaces:a,googlePlacesGetPlace:i}=u.options.servicePaths??{},[p,d]=c([]),[f,n]=c(!1),r=y(null);return{handleAutoComplete:async o=>{if(!a)return;r.current&&r.current.abort();const e=new AbortController;r.current=e,n(!0);try{const t=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:o}),signal:e.signal});if(e.signal.aborted)return;if(!t.ok){n(!1);return}const[s,g]=await l(t.json());if(e.signal.aborted)return;g||d(s)}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;console.error("Failed to fetch address suggestions:",t)}finally{r.current===e&&n(!1)}},fetchPlace:async o=>{if(!i)return null;const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o})});if(!e.ok)return null;const[t,s]=await l(e.json());return s?null:t},buildAddress:o=>{const e={line1:"",city:"",state:"",country:"",zipCode:""};for(const t of o??[])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:p,isPending:f}}export{h as useAutoFill};
@@ -1,20 +0,0 @@
1
- import { useCredentialsDisplayItem } from '../../../CredentialsDisplay/CredentialsDisplayItemContext';
2
- import { Option, PlaceSuggestion } from './types';
3
- type DataFieldAddressInputReturn = {
4
- value: Option;
5
- inputValue: string;
6
- suggestions: PlaceSuggestion[];
7
- isPending: boolean;
8
- isFetchingPlace: boolean;
9
- error: string | undefined;
10
- disabled: boolean;
11
- handleInputChange: (newInputValue: string, changeOptions?: {
12
- shouldValidate?: boolean;
13
- }) => void;
14
- handleOptionChange: (option: Option) => Promise<void>;
15
- handleClear: () => void;
16
- };
17
- export declare function useDataFieldAddressInput({ credentialsDisplayItem, }: {
18
- credentialsDisplayItem: ReturnType<typeof useCredentialsDisplayItem>;
19
- }): DataFieldAddressInputReturn;
20
- export {};
@@ -1 +0,0 @@
1
- "use strict";import{useState as s,useMemo as f,useEffect as v}from"react";import{useFormContext as E}from"react-hook-form";import{wrapPromise as M}from"../../../../../../../utils/wrapPromise/index.mjs";import"libphonenumber-js";import"lodash/find";import"tinycolor2";import{toUSaddress as C,fromUSAddress as R}from"../../../../../../../utils/address/index.mjs";import{useDebounceValue as k}from"../../../../../../../hooks/useDebounceValue.mjs";import{usePrevious as B}from"../../../../../../../hooks/usePrevious.mjs";import{useAutoFill as N}from"./autofill.hook.mjs";import{extractChildrenFromCredentialFieldSet as m}from"../../../CredentialsDisplay/utils/extractChildrenFromCredentialFieldSet.mjs";function _({credentialsDisplayItem:o}){const a=E(),{objectController:p}=o,g=p.field.name,t=p.field.value,[b,h]=s(!1),{handleAutoComplete:y,fetchPlace:F,buildAddress:D,suggestions:I,isPending:P}=N(),A=f(()=>{if(o.isDisabled)return!0;for(const[e]of Object.entries(m(t)))if(e!=="line2"&&!a.getValues(`${g}.${e}`).credentialDisplayInfo.credentialRequest.allowUserInput)return!0;return!1},[a,o]),S=f(()=>{var e;for(const[i]of Object.entries(m(t)))if(i!=="line2"&&(e=a.getFieldState(`${g}.${i}`).error)!=null&&e.message)return`${t.credentialDisplayInfo.label} is invalid`},[a]),V=f(()=>C({line1:t.line1.value,city:t.city.value,state:t.state.value,zipCode:t.zipCode.value}),[]),[$,j]=s({title:V??"",value:""}),[u,d]=s(""),O=B(u),r=k(u),[w,x]=s(!1),l=(e,i)=>{let n;typeof e=="string"?n=R(e.replace(/\n/g,"")):(n=e,d(C({...e,country:void 0})??""));for(const[c]of Object.entries(m(t)))c!=="line2"&&o.handleChangeChildValueCredential(c,n?.[c]??"",i)},U=async e=>{if(j(e),!e.value)return;h(!0);const[i]=await M(F(e.value));if(!i)return;const n=D(i);l(n),h(!1)},z=e=>{d(e)},q=()=>{d(""),l("",{shouldValidate:!1})};return v(()=>{!r.length&&w&&l("",void 0),!(!r||r.length<=3||r===O)&&(l(r,void 0),y(r).catch(console.error))},[r]),v(()=>{x(!0)},[]),{value:$,inputValue:u,suggestions:I,isPending:P,isFetchingPlace:b,error:S,disabled:A,handleInputChange:z,handleOptionChange:U,handleClear:q}}export{_ as useDataFieldAddressInput};
@@ -1,6 +0,0 @@
1
- import { ReactElement } from 'react';
2
- /**
3
- * This component composes the fields of address except line 2.
4
- * @constructor
5
- */
6
- export declare function DataFieldAddressInput(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{memo as b}from"react";import x from"lodash/isEqual";import{Box as d,Autocomplete as C,Typography as I,TextField as v,useTheme as D,Paper as P}from"@mui/material";import m from"@mui/material/Unstable_Grid2";import{inputStyle as V}from"../../../../styles/input.mjs";import{useCredentialsDisplayItem as j}from"../../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{useCredentialsDisplayItemValid as w}from"../../../CredentialsDisplay/hooks.mjs";import{DataFieldLabelText as A}from"../../DataFieldLabelText.mjs";import{DataFieldClearAdornment as O}from"../../DataFieldClearAdornment.mjs";import{useDataFieldAddressInput as T}from"./hook.mjs";import{jsx as i,jsxs as F}from"react/jsx-runtime";import{getAutoCompleteAttributeValue as k}from"../../utils/getAutoCompleteAttributeValue.mjs";function S(l){const o=D();return F(P,{...l,children:[l.children,i(d,{sx:a=>({display:"flex",justifyContent:"flex-end",p:1,pt:"1px",...a.applyStyles("dark",{opacity:.8})}),children:i("img",{src:o.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"})})]})}const q=b(function({credentialsDisplayItem:l}){const{value:o,inputValue:a,suggestions:c,isPending:r,isFetchingPlace:s,error:p,disabled:n,handleInputChange:u,handleOptionChange:f,handleClear:h}=T({credentialsDisplayItem:l});return i(d,{width:"100%",children:i(C,{disableClearable:!0,freeSolo:!0,isOptionEqualToValue:(e,t)=>e?.value===t?.value,getOptionLabel:e=>typeof e=="string"?e:e?.title,filterOptions:e=>e,options:r?[]:c.map(e=>({title:e.placePrediction.text.text??"",value:e.placePrediction.place??""})),autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,noOptionsText:"No locations",value:o,inputValue:a,loading:r||s,disabled:s||n,onChange:(e,t)=>{e.preventDefault(),e.stopPropagation(),!n&&(!t||typeof t=="string"||f(t).catch(console.error))},onInputChange:(e,t)=>{u(t)},renderInput:e=>{var t;return i(v,{id:e.id,disabled:e.disabled,...V,label:i(A,{}),error:!!p,helperText:p||((t=l.credentialDisplayInfo.credentialRequest)==null?void 0:t.description),inputProps:{...e.inputProps,tabIndex:0,autoCapitalize:"off",autoComplete:k(l.objectController.field.value.type)},InputProps:{...e.InputProps,disableInjectingGlobalStyles:!0,endAdornment:i(O,{onClick:()=>{h()},disabled:n})},fullWidth:!0,multiline:!0})},renderOption:(e,t)=>{const{key:g,...y}=e;return i("li",{...y,children:i(m,{container:!0,sx:{alignItems:"flex-start"},children:i(m,{sx:{width:"100%",wordWrap:"break-word"},children:i(I,{variant:"body2",sx:{color:"text.secondary",textAlign:"left"},children:t?.title})})})},g)},PaperComponent:S})})},(l,o)=>x({itemValid:l.itemValid,objectController:l.credentialsDisplayItem.objectController},{itemValid:o.itemValid,objectController:o.credentialsDisplayItem.objectController}));function L(){const l=j(),o=w();return i(q,{credentialsDisplayItem:l,itemValid:o})}export{L as DataFieldAddressInput};
@@ -1,25 +0,0 @@
1
- export type Option = {
2
- title: string;
3
- value: string;
4
- };
5
- export type Address = {
6
- line1?: string;
7
- city?: string;
8
- state?: string;
9
- zipCode?: string;
10
- country: string;
11
- };
12
- export type PlaceAddressComponent = {
13
- types: string[];
14
- longText: string;
15
- shortText: string;
16
- languageCode: string;
17
- };
18
- export type PlaceSuggestion = {
19
- placePrediction: {
20
- text: {
21
- text: string;
22
- };
23
- place: string;
24
- };
25
- };
@@ -1,6 +0,0 @@
1
- import { ReactElement } from 'react';
2
- /**
3
- * This component manages the input of type Date.
4
- * @constructor
5
- */
6
- export declare function DataFieldDateInput(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{memo as F,useState as U}from"react";import{Box as Y}from"@mui/material";import O from"lodash/isEqual";import{inputStyle as B}from"../../../styles/input.mjs";import{formatDateMMDDYYYY as M}from"../../../utils/date.mjs";import{useOneClickFormOptions as N}from"../../../contexts/one-click-form-options.context.mjs";import{USDateSchema as P}from"../../validations/schemas/date.schema.mjs";import{useCredentialsDisplayItemValid as A}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as E}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{DataFieldLabelText as q}from"../DataFieldLabelText.mjs";import{DataFieldClearAdornment as L}from"../DataFieldClearAdornment.mjs";import{jsx as a}from"react/jsx-runtime";import{credentialTypes as R}from"../../../constants/credentialTypes.mjs";import{DateInput as z}from"../../../../DateInput/index.mjs";const G=F(function({credentialsDisplayItem:e,itemValid:t}){var s;const{options:{features:c}}=N(),{objectController:r,credentialDisplayInfo:u,handleChangeValueCredential:o}=e,{description:m}=u.credentialRequest??{},{isValid:d}=t,n=(s=r.fieldState.error)==null?void 0:s.message,f=n&&n.length>0?n:m,[D,p]=U(r.field.value.value?M(r.field.value.value):""),C=r.field.value.type===R.BirthDateCredential,l=new Date,b=1900,y=1,h=1,g=C?l.getUTCFullYear()-18:l.getUTCFullYear(),I=l.getUTCMonth()+1,v=l.getUTCDate(),V=new Date(b,y-1,h),k=new Date(g,I-1,v);return a(Y,{width:"100%",children:a(z,{...B,autoComplete:"bday",autoCorrect:"off",label:a(q,{}),value:D,error:!d,helperText:d?m:f,placeholder:"__/__/____",onChange:i=>{if(e.isDisabled)return;const T=P.safeParse(i),_=i.replace(/[^0-9]/g,"");if(p(i),_.length<=0)return o("");if(!T.success)return o("NaN");const[S,j,w]=i.split("/").map(Number),x=Date.UTC(w,S-1,j,12,0,0,0);o(String(x))},InputProps:{endAdornment:a(L,{onClick:()=>{e.isDisabled||p("")}})},pickerInputOverflow:!0,pickerDefaultSelectedDate:new Date("08/01/1989"),pickerClickOutsideBoundaryElement:c.datePickerClickOutsideBoundaryElement,minDate:V,maxDate:k,disabled:e.isDisabled})})},(e,t)=>O({itemValid:e.itemValid,objectController:e.credentialsDisplayItem.objectController},{itemValid:t.itemValid,objectController:t.credentialsDisplayItem.objectController}));function H(){const e=E(),t=A();return a(G,{credentialsDisplayItem:e,itemValid:t})}export{H as DataFieldDateInput};
@@ -1,6 +0,0 @@
1
- import { ReactElement } from 'react';
2
- /**
3
- * This component manages the input of type Image.
4
- * @constructor
5
- */
6
- export declare function DataFieldImageInput(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{memo as h,useRef as D}from"react";import{Stack as o,Box as I}from"@mui/material";import g from"lodash/isEqual";import{Button as v}from"../../../../../Button/index.mjs";import{useOneClickFormOptions as C}from"../../../contexts/one-click-form-options.context.mjs";import{handleLoadImageToBase64FromFile as x}from"../../../utils/image.mjs";import{When as c}from"../../shared/When.mjs";import{ImageEncoded as y}from"../../shared/ImageEncoded.mjs";import{useCredentialsDisplayItemValid as V}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as j}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{jsx as i,jsxs as r}from"react/jsx-runtime";import{DataFieldInputLabel as F}from"../DataFieldInputLabel.mjs";import{DataFieldLabelText as k}from"../DataFieldLabelText.mjs";import{DataFieldLegend as w}from"../DataFieldLegend.mjs";const L=h(function({credentialsDisplayItem:e,itemValid:t}){var s,n;const{options:p}=C(),{objectController:u,credentialDisplayInfo:l,handleChangeValueCredential:f}=e,{isValid:b}=t,d=D(null);return r(o,{direction:"column",width:"100%",sx:{position:"relative",flex:1},children:[i(F,{label:i(k,{}),sx:{mt:-1.5}}),r(o,{sx:{position:"relative",borderRadius:1,overflow:"hidden"},children:[i(y,{servicePath:p.servicePaths.credentialImagePath,src:u.field.value.value,sx:{mx:"auto"}}),r(o,{direction:"column",alignItems:"center",justifyContent:"center",sx:{position:"absolute",inset:0,width:"100%",height:"100%",backgroundColor:e.isDisabled?"transparent":"rgba(0,0,0,0.6)"},children:[i(I,{ref:d,component:"input",type:"file",accept:"image/*",onChange:a=>{(async()=>{if(e.isDisabled)return;const m=await x(a);m&&f(m)})()},sx:{display:"none",visibility:"hidden"},disabled:e.isDisabled}),!e.isDisabled&&i(v,{color:"primary",type:"button",onClick:()=>{var a;e.isDisabled||(a=d.current)==null||a.click()},tabIndex:0,disabled:e.isDisabled,children:l.value?"Change Image":"Add Image"})]})]}),i(c,{value:b,children:i(c,{value:(s=l.credentialRequest)==null?void 0:s.description,children:i(w,{children:(n=l.credentialRequest)==null?void 0:n.description})})})]})},(e,t)=>g({itemValid:e.itemValid,objectController:e.credentialsDisplayItem.objectController},{itemValid:t.itemValid,objectController:t.credentialsDisplayItem.objectController}));function R(){const e=j(),t=V();return i(L,{credentialsDisplayItem:e,itemValid:t})}export{R as DataFieldImageInput};
@@ -1,2 +0,0 @@
1
- import { ReactElement } from 'react';
2
- export declare function DataFieldPhoneInput(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{memo as p,useEffect as h}from"react";import{Box as f}from"@mui/material";import C from"lodash/isEqual";import{PhoneInput as D}from"../../../../PhoneInput.mjs";import{useCredentialsDisplayItemValid as I}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as V}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{jsx as l}from"react/jsx-runtime";import{DataFieldClearAdornment as b}from"../DataFieldClearAdornment.mjs";import{DataFieldLabelText as v}from"../DataFieldLabelText.mjs";const y=p(function({credentialsDisplayItem:e,itemValid:t}){var r;const{objectController:n,credentialDisplayInfo:s,handleChangeValueCredential:o}=e,{isValid:d}=t,m=n.field.value.value,c=a=>{o("")};return h(()=>{const a=new URL(window.location.href),i=new URLSearchParams(a.searchParams).get("phone");if(i){const u=setTimeout(()=>{o(i,{shouldValidate:!1})},10);return()=>clearInterval(u)}},[]),l(f,{width:"100%",children:l(D,{label:l(v,{}),size:"small",onChange:a=>{e.isDisabled||o(a,{shouldValidate:a.length>3})},helperText:(r=s.credentialRequest)==null?void 0:r.description,error:!d,handleChangeCountry:c,value:m,shouldHaveClearButton:!0,shouldHaveSelectCountryButton:!1,InputProps:{endAdornment:l(b,{})},disabled:e.isDisabled})})},(e,t)=>C({itemValid:e.itemValid,objectController:e.credentialsDisplayItem.objectController},{itemValid:t.itemValid,objectController:t.credentialsDisplayItem.objectController}));function g(){const e=V(),t=I();return l(y,{credentialsDisplayItem:e,itemValid:t})}export{g as DataFieldPhoneInput};
@@ -1,6 +0,0 @@
1
- import { ReactElement } from 'react';
2
- /**
3
- * This component manages the input of type SSN.
4
- * @constructor
5
- */
6
- export declare function DataFieldSSNInput(): ReactElement;
@@ -1 +0,0 @@
1
- "use strict";import{memo as p}from"react";import{Box as u}from"@mui/material";import c from"lodash/isEqual";import{SSNInput as f}from"../../../../SSNInput.mjs";import{inputStyle as C}from"../../../styles/input.mjs";import{useCredentialsDisplayItemValid as D}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as b}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{DataFieldLabelText as I}from"../DataFieldLabelText.mjs";import{DataFieldClearAdornment as V}from"../DataFieldClearAdornment.mjs";import{jsx as l}from"react/jsx-runtime";const h=p(function({credentialsDisplayItem:e,itemValid:t}){var a;const{objectController:o,credentialDisplayInfo:n,handleChangeValueCredential:s}=e,{isValid:m}=t,d=o.field.value.value,i=r=>{e.isDisabled||s(r.target.value,{shouldValidate:r.target.value.length>0})};return l(u,{width:"100%",children:l(f,{...C,label:l(I,{}),value:d,onChange:i,error:!m,helperText:(a=n.credentialRequest)==null?void 0:a.description,InputProps:{endAdornment:l(V,{onClick:()=>{i({target:{value:""}})}})},disabled:e.isDisabled})})},(e,t)=>c({itemValid:e.itemValid,objectController:e.credentialsDisplayItem.objectController},{itemValid:t.itemValid,objectController:t.credentialsDisplayItem.objectController}));function v(){const e=b(),t=D();return l(h,{credentialsDisplayItem:e,itemValid:t})}export{v as DataFieldSSNInput};
@@ -1,5 +0,0 @@
1
- /**
2
- * This component manages the input of type Select.
3
- * @constructor
4
- */
5
- export declare function DataFieldSelectInput(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use strict";import{useMemo as d,useEffect as c}from"react";import{Box as R,Autocomplete as S,TextField as V}from"@mui/material";import{inputStyle as q}from"../../../styles/input.mjs";import{useCanFillByQueryParam as w}from"../../../hooks/useCanFillByQueryParam.mjs";import{useCredentialsDisplay as L}from"../../CredentialsDisplay/CredentialsDisplayContext.mjs";import{useCredentialsDisplayItemValid as j}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as B}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{DataFieldLabelText as E}from"../DataFieldLabelText.mjs";import{jsx as s}from"react/jsx-runtime";import{findCorrectSchemaProperty as U}from"../../CredentialsDisplay/utils/findCorrectSchemaProperty.mjs";import{isRequiredCredentialDisplayInfo as A}from"../../CredentialsDisplay/utils/isRequiredCredentialDisplayInfo.mjs";import{getLastPathName as D}from"../../CredentialsDisplay/utils/getLastPathName.mjs";function N(){var h,b,y;const{schema:g}=L(),p=B(),x=w(),{objectController:i,credentialDisplayInfo:m,parentFieldSet:I,handleChangeValueCredential:f,handleClearValueCredential:C}=p,{isValid:T}=j(),a=U(m.schema,g,I),t=d(()=>{var e;return(((e=a?.input)==null?void 0:e.options)||[]).map(l=>typeof l=="string"?{label:l,value:l}:l)},[(h=a?.input)==null?void 0:h.options]),v=d(()=>t.map(e=>({label:e.label,id:e.value})),[t]),o=d(()=>{var e,l;if((e=a?.input)!=null&&e.default&&A({mandatory:(l=m.credentialRequest)==null?void 0:l.mandatory})){const n=v.find(u=>{var r;return u.id===((r=a?.input)==null?void 0:r.default)});if(n)return{label:n.label,id:n.id}}},[(b=a?.input)==null?void 0:b.default,v]),F=d(()=>{const e=t.find(l=>l.value===i.field.value.value);return e!=null&&e.value?{label:e.label,id:e.value}:null},[t,i.field.value.value]),P={...q,label:s(E,{}),error:!T,helperText:(y=m.credentialRequest)==null?void 0:y.description,inputProps:{tabIndex:0},fullWidth:!0};return c(()=>{!t.some(e=>e.value===i.field.value.value)&&i.field.value.value&&C()},[i.field.value.value,t]),c(()=>{o!=null&&o.id&&f(o.id)},[]),c(()=>{const e=D(i.field.name);if(!x(e))return;const l=new URL(window.location.href),n=new URLSearchParams(l.searchParams).get(D(i.field.name));if(n&&!i.field.value.value){const u=t.find(r=>r.value===n||r.label===n);if(u){const r=setTimeout(()=>{f(u.value)},10);return()=>clearTimeout(r)}}},[]),s(R,{width:"100%",children:s(S,{disablePortal:!0,autoHighlight:!0,defaultValue:o,options:v,isOptionEqualToValue:(e,l)=>e?.id===l?.id,value:F,onChange:(e,l)=>{if(!p.isDisabled){if(!l){C();return}f(l?.id??"")}},renderInput:e=>s(V,{...e,...P,inputProps:{...e.inputProps,...P.inputProps}}),disabled:p.isDisabled})})}export{N as DataFieldSelectInput};
@@ -1,5 +0,0 @@
1
- /**
2
- * This component manages the input of type Text.
3
- * @constructor
4
- */
5
- export declare function DataFieldTextInput(): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- "use strict";import{memo as C,useRef as h,useEffect as b}from"react";import{Box as D,TextField as V}from"@mui/material";import v from"lodash/isEqual";import{inputStyle as y}from"../../../styles/input.mjs";import{getLastPathName as s}from"../../CredentialsDisplay/utils/getLastPathName.mjs";import{useCanFillByQueryParam as I}from"../../../hooks/useCanFillByQueryParam.mjs";import{useCredentialsDisplayItemValid as x}from"../../CredentialsDisplay/hooks.mjs";import{useCredentialsDisplayItem as g}from"../../CredentialsDisplay/CredentialsDisplayItemContext.mjs";import{DataFieldLabelText as j}from"../DataFieldLabelText.mjs";import{DataFieldClearAdornment as P}from"../DataFieldClearAdornment.mjs";import{jsx as r}from"react/jsx-runtime";import{getAutoCompleteAttributeValue as w}from"../utils/getAutoCompleteAttributeValue.mjs";const F=C(function({credentialsDisplayItem:e,itemValid:t}){var n;const a=h(null),d=I(),{objectController:l,handleChangeValueCredential:m,handleChangeDebouncedValueCredential:u}=e;b(()=>{const i=s(l.field.name);if(!d(i))return;const p=new URL(window.location.href),o=new URLSearchParams(p.searchParams).get(s(l.field.name));if(o&&!l.field.value.value){const f=setTimeout(()=>{m(o,{shouldValidate:!1}),a.current&&(a.current.value=o)},10);return()=>clearInterval(f)}},[]);const c={inputRef:a,...y,autoComplete:w(l.field.value.type),label:r(j,{}),defaultValue:l.field.value.value||"",onChange:i=>{e.isDisabled||u(i.target.value)},error:!t.isValid,helperText:(n=e.credentialDisplayInfo.credentialRequest)==null?void 0:n.description,InputProps:{placeholder:"",endAdornment:r(P,{onClick:()=>{a.current&&(a.current.value="")}})},inputProps:{tabIndex:0,autoCorrect:"off",autoCapitalize:"off"},fullWidth:!0,disabled:e.isDisabled};return r(D,{width:"100%",children:r(V,{...c})})},(e,t)=>v({itemValid:e.itemValid,objectController:e.credentialsDisplayItem.objectController},{itemValid:t.itemValid,objectController:t.credentialsDisplayItem.objectController}));function T(){const e=g(),t=x();return r(F,{credentialsDisplayItem:e,itemValid:t})}export{T as DataFieldTextInput};
@@ -1,7 +0,0 @@
1
- export * from './DataFieldTextInput';
2
- export * from './DataFieldSelectInput';
3
- export * from './DataFieldPhoneInput';
4
- export * from './DataFieldDateInput';
5
- export * from './DataFieldSSNInput';
6
- export * from './DataFieldImageInput';
7
- export * from './DataFieldAddressInput';
@@ -1,19 +0,0 @@
1
- export type Address = {
2
- line1?: string;
3
- city?: string;
4
- state?: string;
5
- country?: string;
6
- postcode?: string;
7
- };
8
- /**
9
- * Possible input format that user can provide.
10
- */
11
- export declare enum InputFormatEnum {
12
- Text = "Text",
13
- Date = "Date",
14
- Select = "Select",
15
- Email = "Email",
16
- Phone = "Phone",
17
- SSN = "SSN",
18
- Image = "Image"
19
- }
@@ -1 +0,0 @@
1
- "use strict";var t=(a=>(a.Text="Text",a.Date="Date",a.Select="Select",a.Email="Email",a.Phone="Phone",a.SSN="SSN",a.Image="Image",a))(t||{});export{t as InputFormatEnum};
@@ -1,4 +0,0 @@
1
- /**
2
- * Default values for the DataField input components.
3
- */
4
- export declare const DEBOUNCE_MS = 150;
@@ -1 +0,0 @@
1
- "use strict";const o=150;export{o as DEBOUNCE_MS};
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns the autocomplete attribute value based on the type of the field.
3
- * @param type The type of the field.
4
- * @returns The autocomplete attribute value.
5
- */
6
- export declare function getAutoCompleteAttributeValue(type: string): "off" | "tel" | "email" | "address-line2" | "family-name" | "given-name" | "street-address address-level2 address-level1 postal-code";
@@ -1 +0,0 @@
1
- "use strict";function a(e){return e==="FirstNameCredential"?"given-name":e==="LastNameCredential"?"family-name":e==="EmailCredential"?"email":e==="PhoneCredential"?"tel":e==="AddressCredential"?"street-address address-level2 address-level1 postal-code":e==="Line2Credential"?"address-line2":"off"}export{a as getAutoCompleteAttributeValue};
@@ -1,7 +0,0 @@
1
- /**
2
- * Gets the credential label based on the type.
3
- * @param label The credential label
4
- * @param type The credential type
5
- * @returns The credential label
6
- */
7
- export declare function getCredentialLabel(label: string | undefined, type: string): string | undefined;
@@ -1 +0,0 @@
1
- "use strict";import{when as t}from"../../../utils/when.mjs";function o(e,n){return t(n,{SsnCredential:()=>"SSN",GovernmentIdDocumentImageCredential:()=>"Gov. Doc ID",else:()=>e})}export{o as getCredentialLabel};
@@ -1,7 +0,0 @@
1
- /**
2
- * Gets the credential label based on the type.
3
- * @param label The credential label
4
- * @param type The credential type
5
- * @returns The credential label
6
- */
7
- export declare function getCredentialLabelInput(label: string | undefined, type: string): string | undefined;
@@ -1 +0,0 @@
1
- "use strict";import{when as t}from"../../../utils/when.mjs";function i(e,n){return t(n,{Line2Credential:()=>"Line 2",else:()=>e})}export{i as getCredentialLabelInput};
@@ -1 +0,0 @@
1
- export declare const getCredentialSeparator: (type: string | undefined) => string | undefined;
@@ -1 +0,0 @@
1
- "use strict";import{when as r}from"../../../utils/when.mjs";const t=e=>r(e,{AddressCredential:()=>", ",EmployerCredential:()=>"; ",else:()=>" "});export{t as getCredentialSeparator};
@@ -1,2 +0,0 @@
1
- import { CredentialDisplayInfo } from '../../CredentialsDisplay/types';
2
- export declare function hasSomeRequiredEmptyCredential(credentialDisplayInfo: CredentialDisplayInfo): boolean;
@@ -1,5 +0,0 @@
1
- export * from './hasSomeRequiredEmptyCredential';
2
- export * from './getCredentialSeparator';
3
- export * from './defaults';
4
- export * from './getCredentialLabel';
5
- export * from './getAutoCompleteAttributeValue';
@@ -1,10 +0,0 @@
1
- type CountrySelectorProps = {
2
- value: string;
3
- onChange(value: string): void;
4
- };
5
- /**
6
- * Component that renders and allows to manage the desired phone country format.
7
- * @constructor
8
- */
9
- export default function CountrySelector(props: Readonly<CountrySelectorProps>): import("react").JSX.Element;
10
- export {};
@@ -1,6 +0,0 @@
1
- declare const _default: import('react').ForwardRefExoticComponent<Omit<{
2
- [x: string]: any;
3
- variant?: string | undefined;
4
- margin?: string | undefined;
5
- }, "ref"> & import('react').RefAttributes<unknown>>;
6
- export default _default;
@@ -1,15 +0,0 @@
1
- export type ChangeEvent = (event: {
2
- target: {
3
- name: string;
4
- value: string;
5
- };
6
- }, nativeEvent?: InputEvent) => void;
7
- interface InputMaskProps {
8
- onChange: ChangeEvent;
9
- name: string;
10
- mask: string;
11
- definitions?: Record<string, RegExp>;
12
- useOnComplete?: boolean;
13
- }
14
- export declare const IMaskInput: import('react').ForwardRefExoticComponent<InputMaskProps & import('react').RefAttributes<HTMLInputElement>>;
15
- export {};
@@ -1,16 +0,0 @@
1
- import { FC } from 'react';
2
- import { BoxProps } from '@mui/material';
3
- export interface ImageProps extends BoxProps {
4
- src: string;
5
- alt: string;
6
- }
7
- /**
8
- * Displays an image.
9
- *
10
- * Wraps an HTML `img` element with MUI's `Box` component
11
- * so that styles can easily be set (including leveraging our theme) with the `sx` prop.
12
- *
13
- * As recommended by the MUI docs https://mui.com/system/basics/
14
- */
15
- declare const Image: FC<ImageProps>;
16
- export default Image;
@@ -1 +0,0 @@
1
- "use strict";import{Box as r}from"@mui/material";import{jsx as s}from"react/jsx-runtime";const m=({src:o,alt:t,...a})=>s(r,{src:o,alt:t,...a,component:"img"});export{m as default};
@@ -1,14 +0,0 @@
1
- import { SxProps } from '@mui/material';
2
- type ImageEncodedProps = {
3
- servicePath: string;
4
- src: string;
5
- alt?: string;
6
- sx?: SxProps;
7
- };
8
- /**
9
- * Image component that decodes the same by extracting our
10
- * @param props
11
- * @constructor
12
- */
13
- export declare function ImageEncoded(props: ImageEncodedProps): import("react").JSX.Element;
14
- export {};
@@ -1 +0,0 @@
1
- "use strict";import{Stack as d,Box as l,Skeleton as m}from"@mui/material";import{Image as u}from"@mui/icons-material";import{useQuery as h}from"@tanstack/react-query";import{When as s}from"./When.mjs";import f from"./Image.mjs";import{jsxs as x,jsx as a}from"react/jsx-runtime";function g(r){const c=e=>`/${r.servicePath}?query=${encodeURIComponent(e)}`,{data:t}=h({queryKey:[r.src],queryFn:async()=>{if(!r.src)return null;if(r.src.includes("data:image/"))return r.src;const e=await fetch(c(r.src)),{data:i}=await e.json();if(!i)throw new Error(`Image not found. source: ${r.src}`);return i},enabled:!!r.src,retry:!0}),o={alignSelf:"flex-start",maxWidth:"100%"},n={...o,width:"100%",aspectRatio:1};return x(d,{sx:r.sx,children:[a(s,{value:!t&&r.src,children:a(l,{className:"image-encoded-skeleton-container",sx:n,children:a(m,{variant:"rounded",width:"100%",height:"100%"})})}),a(s,{value:!t&&!r.src,children:a(u,{sx:{...n,height:"100%",fontSize:void 0,color:"grey.300"}})}),a(s,{value:t,children:e=>a(f,{src:e,alt:r.alt??"",sx:o})})]})}export{g as ImageEncoded};
@@ -1,26 +0,0 @@
1
- import { ChangeEventHandler, ReactNode } from 'react';
2
- type Selection = {
3
- start: string;
4
- end: string;
5
- };
6
- type State = {
7
- value: string;
8
- selection: Selection;
9
- };
10
- type BeforeMaskedStateChangeOptions = {
11
- previousState: State;
12
- currentState: State;
13
- nextState: State;
14
- };
15
- type InputMaskProps = {
16
- children: ReactNode;
17
- mask: string | (RegExp | string)[];
18
- value: string;
19
- onChange: ChangeEventHandler<HTMLInputElement>;
20
- beforeMaskedStateChange?: (options: BeforeMaskedStateChangeOptions) => void;
21
- maskPlaceholder?: string | null;
22
- alwaysShowMask?: boolean;
23
- disabled?: boolean;
24
- };
25
- export declare function InputMask(props: Readonly<InputMaskProps>): import("react").JSX.Element;
26
- export {};
@@ -1,15 +0,0 @@
1
- import { FC } from 'react';
2
- import { TextFieldProps } from '@mui/material';
3
- /**
4
- * A somewhat generic input for text
5
- *
6
- * TextInput is an abstraction over the MUI TextField component
7
- * encapsulating props shared by inputs of this type.
8
- * See the TextField component docs for additional props, options, etc. https://mui.com/components/text-fields/
9
- *
10
- * @param {TextFieldProps} props TextInput takes the same props as the MUI TextField component
11
- * with a default values for type ('text') and id and label defaulting to the value of the name prop
12
- * and the name prop (capitalized)
13
- */
14
- declare const TextInput: FC<TextFieldProps>;
15
- export default TextInput;
@@ -1,15 +0,0 @@
1
- export type ChangeEvent = (event: {
2
- target: {
3
- name: string;
4
- value: string;
5
- };
6
- }, nativeEvent?: InputEvent) => void;
7
- interface TextMaskCustomProps {
8
- onChange: ChangeEvent;
9
- name: string;
10
- mask: string;
11
- definitions?: Record<string, RegExp>;
12
- useOnComplete?: boolean;
13
- }
14
- export declare const TextMaskCustom: import('react').ForwardRefExoticComponent<TextMaskCustomProps & import('react').RefAttributes<HTMLInputElement>>;
15
- export {};
@@ -1,14 +0,0 @@
1
- import { TextFieldProps } from '@mui/material';
2
- import { FC } from 'react';
3
- /**
4
- * A multiline textarea input
5
- *
6
- * Textarea is an abstraction over the MUI TextField component
7
- * encapsulating props shared by inputs of this type
8
- * see the TextField component docs for additional props, options, etc https://mui.com/components/text-fields/
9
- *
10
- * @param {TextFieldProps} props Textarea takes the same props as the MUI TextField component
11
- * with multiline always set to true.
12
- */
13
- declare const Textarea: FC<TextFieldProps>;
14
- export default Textarea;
@@ -1,17 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type WhenProps<T = unknown> = {
3
- value: T;
4
- children: ReactNode | ((condition: NonNullable<T>) => ReactNode);
5
- };
6
- /**
7
- * This component can be used when using value is truthy to render some other component,
8
- * instead of using ternary operators you can use this.
9
- *
10
- * This is particularly useful when you have nested conditional rendering. Also, it allows for safer falsy conditions
11
- * while in a ternary you can risk rendering falsy values in the react tree if you use `&&`.
12
- * @param value
13
- * @param children Children can be direct ReactNode or a function returning ReactNode, when a function,
14
- * the value is being passed as param and is guarantee to be non-nullable excluding undefined and null from the inferred type.
15
- * @constructor
16
- */
17
- export declare function When<T>({ value, children }: WhenProps<T>): import("react").JSX.Element | null;
@@ -1 +0,0 @@
1
- "use strict";import{jsx as r,Fragment as t}from"react/jsx-runtime";function i({value:n,children:e}){return n?typeof e=="function"?r(t,{children:e(n)}):r(t,{children:e}):null}export{i as When};
@@ -1,6 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const birthDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
3
- export declare const simpleBirthDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
4
- export declare const shortenBirthDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
5
- export declare const minimumDate1900Schema: zod.ZodEffects<zod.ZodString, string, string>;
6
- export declare const minimumAge18Schema: zod.ZodEffects<zod.ZodString, string, string>;
@@ -1 +0,0 @@
1
- "use strict";import*as i from"zod";const a=t=>{const e=new Date,r=new Date("1900-01-01"),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999),s=new Date(t);if(s>=r&&s<=n){const o=Date.parse(String(new Date(t)));return!isNaN(o)}return!1};i.string().refine(t=>/^\d{2}\/\d{2}\/\d{4}$/.test(t)?a(t):!1,"Date of Birth is invalid"),i.string().refine(t=>{if(/^\d{2}\d{2}\d{4}$/.test(t)){const e=`${t.slice(0,2)}/${t.slice(2,4)}/${t.slice(4,8)}`;return a(e)}return!1},"Date of Birth is invalid"),i.string().refine(t=>{if(/^\d{2}\d{2}$/.test(t)){const e=`${t.slice(0,2)}/${t.slice(2,4)}/1970`;return a(e)}return!1},"Date of Birth is invalid");const c=t=>{if(t==="NaN"||t==="")return!1;const e=parseInt(t,10);if(isNaN(e))return!1;const r=new Date(e);if(isNaN(r.getTime()))return!1;const n=Date.UTC(1900,0,1,0,0,0,0);return e>=n},f=t=>{if(t==="NaN"||t==="")return!1;const e=parseInt(t,10);if(isNaN(e))return!1;const r=new Date(e);if(isNaN(r.getTime()))return!1;const n=new Date,s=new Date(Date.UTC(n.getUTCFullYear()-18,n.getUTCMonth(),n.getUTCDate(),23,59,59,999));return r.getTime()<=s.getTime()},u=i.string().refine(t=>/^-?\d+$/.test(t)?c(t):!1,"Date must be from 1900 or later"),D=i.string().refine(t=>/^-?\d+$/.test(t)?f(t):!1,"Must be 18 years or older");export{D as minimumAge18Schema,u as minimumDate1900Schema};
@@ -1,7 +0,0 @@
1
- import { SSNSchema } from '../../../../../../validations/ssn.schema';
2
- import * as zod from 'zod';
3
- export { SSNSchema };
4
- export declare const timestampSchema: zod.ZodEffects<zod.ZodString, string, string>;
5
- export declare const emailSchema: zod.ZodString;
6
- export declare const phoneSchema: zod.ZodEffects<zod.ZodString, string, string>;
7
- export declare const defaultTextSchema: zod.ZodString;
@@ -1 +0,0 @@
1
- "use strict";import*as m from"zod";import{EmailFragmentSchema as e}from"./email.mjs";import{validatePhone as r}from"../../../utils/phone.mjs";const t=m.string().refine(a=>a?!isNaN(Number(a)):!1),i=e,s=m.string().refine(a=>r(a)),o=m.string().min(1);export{o as defaultTextSchema,i as emailSchema,s as phoneSchema,t as timestampSchema};
@@ -1,2 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const EmailFragmentSchema: zod.ZodString;
@@ -1 +0,0 @@
1
- "use strict";import*as a from"zod";const i=a.string().min(1,"Email is required").email("Must be a valid email");export{i as EmailFragmentSchema};
@@ -1,2 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const OTPFragmentSchema: zod.ZodString;
@@ -1,3 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const PhoneFragmentSchema: zod.ZodString;
3
- export declare const StrictPhoneFragmentSchema: zod.ZodEffects<zod.ZodString, string, string>;
@@ -1,2 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const UUIDFragmentSchema: zod.ZodString;
@@ -1,2 +0,0 @@
1
- import * as zod from 'zod';
2
- export declare const USDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
@@ -1 +0,0 @@
1
- "use strict";import*as r from"zod";const a=r.string().refine(t=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(t)){const e=Date.parse(String(new Date(t)));return!isNaN(e)}return!1},"Date is invalid");export{a as USDateSchema};
@@ -1,9 +0,0 @@
1
- export declare const credentialTypes: {
2
- readonly SSNCredential: "SSNCredential";
3
- readonly FullNameCredential: "FullNameCredential";
4
- readonly AddressCredential: "AddressCredential";
5
- readonly Line2Credential: "Line2Credential";
6
- readonly PhoneCredential: "PhoneCredential";
7
- readonly BirthDateCredential: "BirthDateCredential";
8
- readonly GovernmentIdDocumentImageCredential: "GovernmentIdDocumentImageCredential";
9
- };
@@ -1 +0,0 @@
1
- "use strict";const e={AddressCredential:"AddressCredential",Line2Credential:"Line2Credential",PhoneCredential:"PhoneCredential",BirthDateCredential:"BirthDateCredential"};export{e as credentialTypes};
@@ -1 +0,0 @@
1
- export * from './credentialTypes';
@@ -1,34 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- type OneClickOptionFeatures = {
3
- selectableCredentials?: boolean;
4
- phoneCredentialWhitelist?: string[];
5
- phoneCredentialRegexWhitelist?: string;
6
- /** Array of field names that can be filled by query params. Use '*' to allow all fields. */
7
- fillEmptyByQueryParam?: string[];
8
- /** Element that the date picker should be detached from when clicking outside of it. */
9
- datePickerClickOutsideBoundaryElement?: HTMLElement | null;
10
- };
11
- type OneClickOptionServicePaths = {
12
- credentialImagePath: string;
13
- googlePlacesAutocompletePlaces?: string;
14
- googlePlacesGetPlace?: string;
15
- };
16
- export type OneClickFormOptions = {
17
- features: OneClickOptionFeatures;
18
- servicePaths: OneClickOptionServicePaths;
19
- };
20
- type OneClickFormOptionsContext = {
21
- options: OneClickFormOptions;
22
- };
23
- type OneClickFormOptionsProviderProps = {
24
- children: ReactNode;
25
- options: OneClickFormOptions;
26
- };
27
- export declare function useOneClickFormOptions(): OneClickFormOptionsContext;
28
- /**
29
- * Provider for 1-click form that should provide options to be accessed by deep react modules.
30
- * @param props
31
- * @constructor
32
- */
33
- export declare function OneClickFormOptionsProvider(props: OneClickFormOptionsProviderProps): ReactElement;
34
- export {};
@@ -1 +0,0 @@
1
- "use strict";import{useContext as r,createContext as n}from"react";import{jsx as s}from"react/jsx-runtime";const o=n(null);function i(){const e=r(o);if(!e)throw new Error("useOneClickFormOptions must be used within a OneClickFormOptionsProvider");return e}function l(e){const{selectableCredentials:t=!0}=e.options.features;return s(o.Provider,{value:{options:{...e.options,features:{...e.options.features,selectableCredentials:t}}},children:e.children})}export{l as OneClickFormOptionsProvider,i as useOneClickFormOptions};