@ovok/native 1.9.0 → 1.10.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 (107) hide show
  1. package/lib/commonjs/modules/auth/default-translation.js +8 -0
  2. package/lib/commonjs/modules/auth/default-translation.js.map +1 -1
  3. package/lib/commonjs/modules/auth/profile/components/form-phone-field.js +163 -0
  4. package/lib/commonjs/modules/auth/profile/components/form-phone-field.js.map +1 -0
  5. package/lib/commonjs/modules/auth/profile/components/profile-form-choice-field.js +64 -0
  6. package/lib/commonjs/modules/auth/profile/components/profile-form-choice-field.js.map +1 -0
  7. package/lib/commonjs/modules/auth/profile/components/profile-form-field-component.js +46 -9
  8. package/lib/commonjs/modules/auth/profile/components/profile-form-field-component.js.map +1 -1
  9. package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js +31 -11
  10. package/lib/commonjs/modules/auth/profile/components/profile-form-provider.js.map +1 -1
  11. package/lib/commonjs/modules/auth/profile/utils/phone.js +31 -0
  12. package/lib/commonjs/modules/auth/profile/utils/phone.js.map +1 -0
  13. package/lib/commonjs/modules/auth/register/components/form/inputs.js +32 -4
  14. package/lib/commonjs/modules/auth/register/components/form/inputs.js.map +1 -1
  15. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js +18 -4
  16. package/lib/commonjs/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  17. package/lib/commonjs/modules/auth/register/contexts/register-form-context.js.map +1 -1
  18. package/lib/commonjs/modules/auth/register/utils/create-register-validation-schema.js +23 -3
  19. package/lib/commonjs/modules/auth/register/utils/create-register-validation-schema.js.map +1 -1
  20. package/lib/commonjs/modules/helpers/form-items/form-date-field.js +27 -4
  21. package/lib/commonjs/modules/helpers/form-items/form-date-field.js.map +1 -1
  22. package/lib/commonjs/modules/helpers/form-items/form-field.js +2 -1
  23. package/lib/commonjs/modules/helpers/form-items/form-field.js.map +1 -1
  24. package/lib/module/modules/auth/default-translation.js +8 -0
  25. package/lib/module/modules/auth/default-translation.js.map +1 -1
  26. package/lib/module/modules/auth/profile/components/form-phone-field.js +157 -0
  27. package/lib/module/modules/auth/profile/components/form-phone-field.js.map +1 -0
  28. package/lib/module/modules/auth/profile/components/profile-form-choice-field.js +58 -0
  29. package/lib/module/modules/auth/profile/components/profile-form-choice-field.js.map +1 -0
  30. package/lib/module/modules/auth/profile/components/profile-form-field-component.js +46 -9
  31. package/lib/module/modules/auth/profile/components/profile-form-field-component.js.map +1 -1
  32. package/lib/module/modules/auth/profile/components/profile-form-provider.js +31 -11
  33. package/lib/module/modules/auth/profile/components/profile-form-provider.js.map +1 -1
  34. package/lib/module/modules/auth/profile/utils/phone.js +25 -0
  35. package/lib/module/modules/auth/profile/utils/phone.js.map +1 -0
  36. package/lib/module/modules/auth/register/components/form/inputs.js +32 -4
  37. package/lib/module/modules/auth/register/components/form/inputs.js.map +1 -1
  38. package/lib/module/modules/auth/register/components/form/register-form-provider.js +18 -4
  39. package/lib/module/modules/auth/register/components/form/register-form-provider.js.map +1 -1
  40. package/lib/module/modules/auth/register/contexts/register-form-context.js.map +1 -1
  41. package/lib/module/modules/auth/register/utils/create-register-validation-schema.js +23 -3
  42. package/lib/module/modules/auth/register/utils/create-register-validation-schema.js.map +1 -1
  43. package/lib/module/modules/helpers/form-items/form-date-field.js +27 -4
  44. package/lib/module/modules/helpers/form-items/form-date-field.js.map +1 -1
  45. package/lib/module/modules/helpers/form-items/form-field.js +2 -1
  46. package/lib/module/modules/helpers/form-items/form-field.js.map +1 -1
  47. package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +8 -0
  48. package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -1
  49. package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-field.d.ts +13 -0
  50. package/lib/typescript/commonjs/src/modules/auth/profile/components/form-phone-field.d.ts.map +1 -0
  51. package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-choice-field.d.ts +14 -0
  52. package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-choice-field.d.ts.map +1 -0
  53. package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-field-component.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-field.d.ts +35 -3
  56. package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-field.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-props.d.ts +3 -8
  58. package/lib/typescript/commonjs/src/modules/auth/profile/types/profile-form-props.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/src/modules/auth/profile/utils/phone.d.ts +6 -0
  60. package/lib/typescript/commonjs/src/modules/auth/profile/utils/phone.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/src/modules/auth/register/contexts/register-form-context.d.ts +6 -0
  64. package/lib/typescript/commonjs/src/modules/auth/register/contexts/register-form-context.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/src/modules/auth/register/hooks/use-register-form.d.ts +5 -0
  66. package/lib/typescript/commonjs/src/modules/auth/register/hooks/use-register-form.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/src/modules/auth/register/types/register-form-props.d.ts +16 -3
  68. package/lib/typescript/commonjs/src/modules/auth/register/types/register-form-props.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/modules/auth/register/types/register-form-values.d.ts +1 -0
  70. package/lib/typescript/commonjs/src/modules/auth/register/types/register-form-values.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/modules/auth/register/utils/create-register-validation-schema.d.ts +10 -3
  72. package/lib/typescript/commonjs/src/modules/auth/register/utils/create-register-validation-schema.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts +11 -2
  74. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts +2 -1
  76. package/lib/typescript/commonjs/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  77. package/lib/typescript/module/src/modules/auth/default-translation.d.ts +8 -0
  78. package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -1
  79. package/lib/typescript/module/src/modules/auth/profile/components/form-phone-field.d.ts +13 -0
  80. package/lib/typescript/module/src/modules/auth/profile/components/form-phone-field.d.ts.map +1 -0
  81. package/lib/typescript/module/src/modules/auth/profile/components/profile-form-choice-field.d.ts +14 -0
  82. package/lib/typescript/module/src/modules/auth/profile/components/profile-form-choice-field.d.ts.map +1 -0
  83. package/lib/typescript/module/src/modules/auth/profile/components/profile-form-field-component.d.ts.map +1 -1
  84. package/lib/typescript/module/src/modules/auth/profile/components/profile-form-provider.d.ts.map +1 -1
  85. package/lib/typescript/module/src/modules/auth/profile/types/profile-form-field.d.ts +35 -3
  86. package/lib/typescript/module/src/modules/auth/profile/types/profile-form-field.d.ts.map +1 -1
  87. package/lib/typescript/module/src/modules/auth/profile/types/profile-form-props.d.ts +3 -8
  88. package/lib/typescript/module/src/modules/auth/profile/types/profile-form-props.d.ts.map +1 -1
  89. package/lib/typescript/module/src/modules/auth/profile/utils/phone.d.ts +6 -0
  90. package/lib/typescript/module/src/modules/auth/profile/utils/phone.d.ts.map +1 -0
  91. package/lib/typescript/module/src/modules/auth/register/components/form/inputs.d.ts.map +1 -1
  92. package/lib/typescript/module/src/modules/auth/register/components/form/register-form-provider.d.ts.map +1 -1
  93. package/lib/typescript/module/src/modules/auth/register/contexts/register-form-context.d.ts +6 -0
  94. package/lib/typescript/module/src/modules/auth/register/contexts/register-form-context.d.ts.map +1 -1
  95. package/lib/typescript/module/src/modules/auth/register/hooks/use-register-form.d.ts +5 -0
  96. package/lib/typescript/module/src/modules/auth/register/hooks/use-register-form.d.ts.map +1 -1
  97. package/lib/typescript/module/src/modules/auth/register/types/register-form-props.d.ts +16 -3
  98. package/lib/typescript/module/src/modules/auth/register/types/register-form-props.d.ts.map +1 -1
  99. package/lib/typescript/module/src/modules/auth/register/types/register-form-values.d.ts +1 -0
  100. package/lib/typescript/module/src/modules/auth/register/types/register-form-values.d.ts.map +1 -1
  101. package/lib/typescript/module/src/modules/auth/register/utils/create-register-validation-schema.d.ts +10 -3
  102. package/lib/typescript/module/src/modules/auth/register/utils/create-register-validation-schema.d.ts.map +1 -1
  103. package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts +11 -2
  104. package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
  105. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts +2 -1
  106. package/lib/typescript/module/src/modules/helpers/form-items/form-field.d.ts.map +1 -1
  107. package/package.json +4 -2
@@ -8,13 +8,29 @@ import DateTimePickerModal from "react-native-modal-datetime-picker";
8
8
  import { HelperText, TextInput } from "react-native-paper";
9
9
  import { useAppTheme } from "../../theme/index.js";
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- export const FormDateField = /*#__PURE__*/React.memo(({
11
+ const parseDatePickerValue = (value, fallback) => {
12
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
13
+ if (!match) {
14
+ const parsed = new Date(value);
15
+ return Number.isNaN(parsed.getTime()) ? fallback : parsed;
16
+ }
17
+ const [, year, month, day] = match;
18
+ return new Date(Number(year), Number(month) - 1, Number(day));
19
+ };
20
+ const FormDateField = /*#__PURE__*/React.memo(({
12
21
  name,
13
22
  context,
14
23
  label,
15
24
  testID,
16
25
  containerStyle,
17
- mode = "date"
26
+ mode = "date",
27
+ initialDate,
28
+ minimumDate,
29
+ maximumDate,
30
+ display,
31
+ locale,
32
+ formatValue,
33
+ disabled = false
18
34
  }) => {
19
35
  const {
20
36
  t
@@ -29,6 +45,7 @@ export const FormDateField = /*#__PURE__*/React.memo(({
29
45
  } = React.useContext(context);
30
46
  const [isVisible, setIsVisible] = React.useState(false);
31
47
  const value = getIn(values, name);
48
+ const fallbackDate = initialDate ?? new Date();
32
49
  const error = getIn(touched, name) && getIn(errors, name);
33
50
  const handleConfirm = React.useCallback(date => {
34
51
  setIsVisible(false);
@@ -48,6 +65,7 @@ export const FormDateField = /*#__PURE__*/React.memo(({
48
65
  children: [/*#__PURE__*/_jsx(TouchableOpacity, {
49
66
  activeOpacity: 0.8,
50
67
  onPress: handlePress,
68
+ disabled: disabled,
51
69
  children: /*#__PURE__*/_jsx(TextInput, {
52
70
  mode: "outlined",
53
71
  autoCapitalize: "none",
@@ -55,7 +73,7 @@ export const FormDateField = /*#__PURE__*/React.memo(({
55
73
  roundness: 10
56
74
  },
57
75
  label: label,
58
- value: value,
76
+ value: value ? formatValue?.(value) ?? value : "",
59
77
  error: !!error,
60
78
  editable: false,
61
79
  testID: testID,
@@ -64,7 +82,11 @@ export const FormDateField = /*#__PURE__*/React.memo(({
64
82
  }), /*#__PURE__*/_jsx(DateTimePickerModal, {
65
83
  isVisible: isVisible,
66
84
  mode: mode,
67
- date: value ? new Date(value) : new Date(),
85
+ date: value ? parseDatePickerValue(value, fallbackDate) : fallbackDate,
86
+ minimumDate: minimumDate,
87
+ maximumDate: maximumDate,
88
+ display: display,
89
+ locale: locale,
68
90
  onConfirm: handleConfirm,
69
91
  onCancel: handleCancel,
70
92
  confirmTextIOS: t("common.confirm"),
@@ -79,4 +101,5 @@ export const FormDateField = /*#__PURE__*/React.memo(({
79
101
  }) : null]
80
102
  });
81
103
  });
104
+ export { FormDateField, parseDatePickerValue };
82
105
  //# sourceMappingURL=form-date-field.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getIn","React","useTranslation","View","TouchableOpacity","DateTimePickerModal","HelperText","TextInput","useAppTheme","jsx","_jsx","jsxs","_jsxs","FormDateField","memo","name","context","label","testID","containerStyle","mode","t","theme","values","errors","touched","setFieldValue","setFieldTouched","useContext","isVisible","setIsVisible","useState","value","error","handleConfirm","useCallback","date","getFullYear","String","getMonth","padStart","getDate","handleCancel","handlePress","style","gap","spacing","children","activeOpacity","onPress","autoCapitalize","roundness","editable","pointerEvents","Date","onConfirm","onCancel","confirmTextIOS","cancelTextIOS","modalStyleIOS","margin","justifyContent","type"],"sourceRoot":"../../../../../src","sources":["modules/helpers/form-items/form-date-field.tsx"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,QAAQ;AAC9B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SACEC,IAAI,EAGJC,gBAAgB,QACX,cAAc;AACrB,OAAOC,mBAAmB,MAAM,oCAAoC;AACpE,SAASC,UAAU,EAAEC,SAAS,QAAQ,oBAAoB;AAE1D,SAASC,WAAW,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc1C,OAAO,MAAMC,aAAa,gBAAGZ,KAAK,CAACa,IAAI,CACrC,CAAC;EACCC,IAAI;EACJC,OAAO;EACPC,KAAK;EACLC,MAAM;EACNC,cAAc;EACdC,IAAI,GAAG;AACW,CAAC,KAAK;EACxB,MAAM;IAAEC;EAAE,CAAC,GAAGnB,cAAc,CAAC,CAAC;EAC9B,MAAMoB,KAAK,GAAGd,WAAW,CAAC,CAAC;EAE3B,MAAM;IAAEe,MAAM;IAAEC,MAAM;IAAEC,OAAO;IAAEC,aAAa;IAAEC;EAAgB,CAAC,GAC/D1B,KAAK,CAAC2B,UAAU,CAACZ,OAAO,CAAC;EAE3B,MAAM,CAACa,SAAS,EAAEC,YAAY,CAAC,GAAG7B,KAAK,CAAC8B,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAMC,KAAK,GAAGhC,KAAK,CAACuB,MAAM,EAAER,IAAI,CAAC;EACjC,MAAMkB,KAAK,GAAGjC,KAAK,CAACyB,OAAO,EAAEV,IAAI,CAAC,IAAIf,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,CAAC,CAACA,KAAM;QACfmB,QAAQ,EAAE,KAAM;QAChBlC,MAAM,EAAEA,MAAO;QACfmC,aAAa,EAAC;MAAM,CACrB;IAAC,CACc,CAAC,eAEnB3C,IAAA,CAACL,mBAAmB;MAClBwB,SAAS,EAAEA,SAAU;MACrBT,IAAI,EAAEA,IAAK;MACXgB,IAAI,EAAEJ,KAAK,GAAG,IAAIsB,IAAI,CAACtB,KAAK,CAAC,GAAG,IAAIsB,IAAI,CAAC,CAAE;MAC3CC,SAAS,EAAErB,aAAc;MACzBsB,QAAQ,EAAEd,YAAa;MACvBe,cAAc,EAAEpC,CAAC,CAAC,gBAAgB,CAAE;MACpCqC,aAAa,EAAErC,CAAC,CAAC,eAAe,CAAE;MAClCsC,aAAa,EAAE;QACbC,MAAM,EAAE,CAAC;QAETC,cAAc,EAAE;MAClB;IAAE,CACH,CAAC,EAED5B,KAAK,gBAAGvB,IAAA,CAACJ,UAAU;MAACwD,IAAI,EAAC,OAAO;MAAAf,QAAA,EAAE1B,CAAC,CAACY,KAAK;IAAC,CAAa,CAAC,GAAG,IAAI;EAAA,CAC5D,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getIn","React","useTranslation","View","TouchableOpacity","DateTimePickerModal","HelperText","TextInput","useAppTheme","jsx","_jsx","jsxs","_jsxs","parseDatePickerValue","value","fallback","match","exec","parsed","Date","Number","isNaN","getTime","year","month","day","FormDateField","memo","name","context","label","testID","containerStyle","mode","initialDate","minimumDate","maximumDate","display","locale","formatValue","disabled","t","theme","values","errors","touched","setFieldValue","setFieldTouched","useContext","isVisible","setIsVisible","useState","fallbackDate","error","handleConfirm","useCallback","date","getFullYear","String","getMonth","padStart","getDate","handleCancel","handlePress","style","gap","spacing","children","activeOpacity","onPress","autoCapitalize","roundness","editable","pointerEvents","onConfirm","onCancel","confirmTextIOS","cancelTextIOS","modalStyleIOS","margin","justifyContent","type"],"sourceRoot":"../../../../../src","sources":["modules/helpers/form-items/form-date-field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J,UAAU;MAAC2E,IAAI,EAAC,OAAO;MAAAd,QAAA,EAAE1B,CAAC,CAACY,KAAK;IAAC,CAAa,CAAC,GAAG,IAAI;EAAA,CAC5D,CAAC;AAEX,CACF,CAAC;AAED,SAAS3B,aAAa,EAAEb,oBAAoB","ignoreList":[]}
@@ -13,6 +13,7 @@ export const FormField = /*#__PURE__*/React.memo(({
13
13
  containerStyle,
14
14
  inputRef,
15
15
  testID,
16
+ onChangeText,
16
17
  ...props
17
18
  }) => {
18
19
  const {
@@ -48,7 +49,7 @@ export const FormField = /*#__PURE__*/React.memo(({
48
49
  ...props.theme
49
50
  },
50
51
  error: !!error,
51
- onChangeText: handleChange(name)
52
+ onChangeText: onChangeText ?? handleChange(name)
52
53
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
54
  ,
54
55
  onBlur: onBlur,
@@ -1 +1 @@
1
- {"version":3,"names":["getIn","React","useTranslation","View","HelperText","TextInput","useAppTheme","jsx","_jsx","jsxs","_jsxs","FormField","memo","name","context","containerStyle","inputRef","testID","props","t","theme","values","errors","touched","handleChange","handleBlur","useContext","value","useMemo","error","onBlur","e","style","gap","spacing","children","ref","mode","autoCapitalize","roundness","borderRadius","onChangeText","onFocus","undefined","type"],"sourceRoot":"../../../../../src","sources":["modules/helpers/form-items/form-field.tsx"],"mappings":";;AAAA,SAASA,KAAK,QAAmB,QAAQ;AACzC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAGEC,IAAI,QAEC,cAAc;AACrB,SAASC,UAAU,EAAEC,SAAS,QAA6B,oBAAoB;AAE/E,SAASC,WAAW,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAc1C,OAAO,MAAMC,SAAS,gBAAGV,KAAK,CAACW,IAAI,CACjC,CAAC;EACCC,IAAI;EACJC,OAAO;EACPC,cAAc;EACdC,QAAQ;EACRC,MAAM;EACN,GAAG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;MACfY,YAAY,EAAEjB,YAAY,CAACX,IAAI;MAC/B;MAAA;MACAiB,MAAM,EAAEA,MAAc;MACtBY,OAAO,EAAExB,KAAK,CAACwB,OAAQ;MACvBzB,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,QAAQ,GAAG0B;IAAU,CAChD,CAAC,EACDd,KAAK,gBACJrB,IAAA,CAACJ,UAAU;MACTwC,IAAI,EAAC,OAAO;MACZ3B,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,QAAQ,GAAG0B,SAAU;MAAAR,QAAA,EAE9ChB,CAAC,CAACU,KAAK;IAAC,CACC,CAAC,GACX,IAAI;EAAA,CACJ,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getIn","React","useTranslation","View","HelperText","TextInput","useAppTheme","jsx","_jsx","jsxs","_jsxs","FormField","memo","name","context","containerStyle","inputRef","testID","onChangeText","props","t","theme","values","errors","touched","handleChange","handleBlur","useContext","value","useMemo","error","onBlur","e","style","gap","spacing","children","ref","mode","autoCapitalize","roundness","borderRadius","onFocus","undefined","type"],"sourceRoot":"../../../../../src","sources":["modules/helpers/form-items/form-field.tsx"],"mappings":";;AAAA,SAASA,KAAK,QAAmB,QAAQ;AACzC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAGEC,IAAI,QAEC,cAAc;AACrB,SAASC,UAAU,EAAEC,SAAS,QAA6B,oBAAoB;AAE/E,SAASC,WAAW,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAe1C,OAAO,MAAMC,SAAS,gBAAGV,KAAK,CAACW,IAAI,CACjC,CAAC;EACCC,IAAI;EACJC,OAAO;EACPC,cAAc;EACdC,QAAQ;EACRC,MAAM;EACNC,YAAY;EACZ,GAAGC;AACW,CAAC,KAAK;EACpB,MAAM;IAAEC;EAAE,CAAC,GAAGlB,cAAc,CAAC,CAA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,MAAM,EAAEA,MAAc;MACtBW,OAAO,EAAEvB,KAAK,CAACuB,OAAQ;MACvBzB,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,QAAQ,GAAG0B;IAAU,CAChD,CAAC,EACDb,KAAK,gBACJtB,IAAA,CAACJ,UAAU;MACTwC,IAAI,EAAC,OAAO;MACZ3B,MAAM,EAAEA,MAAM,GAAG,GAAGA,MAAM,QAAQ,GAAG0B,SAAU;MAAAP,QAAA,EAE9ChB,CAAC,CAACU,KAAK;IAAC,CACC,CAAC,GACX,IAAI;EAAA,CACJ,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
@@ -8,12 +8,20 @@ export declare const defaultTranslation: {
8
8
  delete: string;
9
9
  };
10
10
  profile: {
11
+ form: {
12
+ phone: {
13
+ country: string;
14
+ invalid: string;
15
+ searchCountry: string;
16
+ };
17
+ };
11
18
  save: string;
12
19
  };
13
20
  register: {
14
21
  "already-have-account": string;
15
22
  button: string;
16
23
  name: string;
24
+ "full-name": string;
17
25
  "or-register-with": string;
18
26
  "password-confirm": string;
19
27
  subtitle: string;
@@ -1 +1 @@
1
- {"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD9B,CAAC"}
1
+ {"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D9B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type CountryCode } from "libphonenumber-js";
2
+ import * as React from "react";
3
+ type FormPhoneFieldProps = {
4
+ name: string;
5
+ fieldName: string;
6
+ label: string;
7
+ defaultCountry: CountryCode;
8
+ disabled?: boolean;
9
+ testID?: string;
10
+ };
11
+ export declare const FormPhoneField: ({ name, fieldName, label, defaultCountry, disabled, testID, }: FormPhoneFieldProps) => React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=form-phone-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-phone-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/form-phone-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,+DAO5B,mBAAmB,sBAmIrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ type ProfileFormChoiceFieldProps = {
3
+ name: string;
4
+ label: string;
5
+ options: {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ disabled?: boolean;
10
+ testID?: string;
11
+ };
12
+ export declare const ProfileFormChoiceField: ({ name, label, options, disabled, testID, }: ProfileFormChoiceFieldProps) => React.JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=profile-form-choice-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-form-choice-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-choice-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,6CAMpC,2BAA2B,sBAkC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-field-component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-field-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,UAAU,8BAA8B;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CAsC/B,CAAC"}
1
+ {"version":3,"file":"profile-form-field-component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-field-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAK/D,UAAU,8BAA8B;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CA4E/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACxC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAsG1C,CAAC"}
1
+ {"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAQ/D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACxC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CA6I1C,CAAC"}
@@ -1,12 +1,26 @@
1
+ import DateTimePickerModal from "react-native-modal-datetime-picker";
1
2
  import * as Yup from "yup";
2
- export type ProfileFormField = {
3
+ import type { Patient } from "@medplum/fhirtypes";
4
+ import type { PatchOperation } from "@ovok/core";
5
+ import type { CountryCode } from "libphonenumber-js";
6
+ import type { ComponentProps } from "react";
7
+ import type { TextInputProps } from "react-native-paper";
8
+ type ProfileFormFieldBase = {
3
9
  name: string;
4
10
  label: string;
5
11
  value: string;
6
12
  validation?: Yup.Schema<string | undefined>;
7
13
  disabled?: boolean;
8
14
  testID?: string;
9
- } & ({
15
+ toPatch?: (value: string, patient: Patient) => PatchOperation[];
16
+ };
17
+ type TextInputFieldProps = Omit<TextInputProps, "value" | "onChangeText" | "testID">;
18
+ type DateFieldProps = Pick<ComponentProps<typeof DateTimePickerModal>, "locale" | "minimumDate" | "maximumDate" | "display"> & {
19
+ mode?: "date" | "time" | "datetime";
20
+ initialDate?: Date;
21
+ formatValue?: (value: string) => string;
22
+ };
23
+ export type ProfileFormField = ProfileFormFieldBase & ({
10
24
  type: "select";
11
25
  options: {
12
26
  label: string;
@@ -14,8 +28,26 @@ export type ProfileFormField = {
14
28
  }[];
15
29
  } | {
16
30
  type: "date";
17
- mode?: "date" | "time" | "datetime";
31
+ mode?: DateFieldProps["mode"];
32
+ initialDate?: DateFieldProps["initialDate"];
33
+ minimumDate?: DateFieldProps["minimumDate"];
34
+ maximumDate?: DateFieldProps["maximumDate"];
35
+ locale?: DateFieldProps["locale"];
36
+ display?: DateFieldProps["display"];
37
+ formatValue?: DateFieldProps["formatValue"];
18
38
  } | {
19
39
  type: "text";
40
+ keyboardType?: TextInputProps["keyboardType"];
41
+ inputProps?: TextInputFieldProps;
42
+ } | {
43
+ type: "choice";
44
+ options: {
45
+ label: string;
46
+ value: string;
47
+ }[];
48
+ } | {
49
+ type: "phone";
50
+ defaultCountry: CountryCode;
20
51
  });
52
+ export {};
21
53
  //# sourceMappingURL=profile-form-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/types/profile-form-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,CACA;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;CACrC,GACD;IACE,IAAI,EAAE,MAAM,CAAC;CACd,CACJ,CAAC"}
1
+ {"version":3,"file":"profile-form-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/types/profile-form-field.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,oCAAoC,CAAC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AAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,WAAW,CAAC;CAC7B,CACJ,CAAC"}
@@ -7,12 +7,7 @@ export type ProfileFormProps = {
7
7
  fields: ProfileFormField[];
8
8
  style?: StyleProp<ViewStyle>;
9
9
  testID?: string;
10
- onSubmit?: (values: ProfileFormValues, formikHelpers: FormikHelpers<ProfileFormValues>) => Promise<void>;
11
- } & ({
12
- onSubmit?: undefined;
13
- onSuccess?: (response: Patient) => void;
14
- } | {
15
- onSuccess?: undefined;
16
- onSubmit?: (values: ProfileFormValues, formikHelpers: FormikHelpers<ProfileFormValues>) => void;
17
- });
10
+ onSuccess?: (response: Patient, values: ProfileFormValues) => void;
11
+ onSubmit?: (values: ProfileFormValues, formikHelpers: FormikHelpers<ProfileFormValues>) => Promise<void> | void;
12
+ };
18
13
  //# sourceMappingURL=profile-form-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/types/profile-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAC5C,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,GAAG,CACA;IACE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,GACD;IACE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAC5C,IAAI,CAAC;CACX,CACJ,CAAC"}
1
+ {"version":3,"file":"profile-form-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/types/profile-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAC5C,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type CountryCode } from "libphonenumber-js";
2
+ declare const phoneCountryFieldName: (name: string) => string;
3
+ declare const toPhoneE164: (value: string, country: CountryCode) => string;
4
+ declare const isPhoneValidForCountry: (value: string, country: CountryCode) => boolean;
5
+ export { isPhoneValidForCountry, phoneCountryFieldName, toPhoneE164 };
6
+ //# sourceMappingURL=phone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/utils/phone.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B,QAAA,MAAM,qBAAqB,GAAI,MAAM,MAAM,WACqC,CAAC;AAEjF,QAAA,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,SAAS,WAAW,WAoBvD,CAAC;AAEF,QAAA,MAAM,sBAAsB,GAAI,OAAO,MAAM,EAAE,SAAS,WAAW,YAIlE,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,sBA4KpE,CAAC"}
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/inputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,MAAM,GAAI,+BAA+B,eAAe,sBAiOpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-form-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AASpE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CACzC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CA4H3C,CAAC"}
1
+ {"version":3,"file":"register-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/register/components/form/register-form-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AASpE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CACzC,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAsJ3C,CAAC"}
@@ -1,8 +1,14 @@
1
1
  import { FormikContextType } from "formik";
2
2
  import * as React from "react";
3
+ import type { RegisterFormProps } from "../types/register-form-props";
3
4
  import { RegisterFormValues } from "../types/register-form-values";
4
5
  type RegisterFormContextType = FormikContextType<RegisterFormValues> & {
5
6
  defaultValues?: Partial<Omit<RegisterFormValues, "submit">>;
7
+ nameField?: RegisterFormProps["nameField"];
8
+ toRegisterNames?: (fullName: string) => {
9
+ name: string;
10
+ surname: string;
11
+ };
6
12
  };
7
13
  export declare const RegisterFormContext: React.Context<RegisterFormContextType | undefined>;
8
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"register-form-context.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/contexts/register-form-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,oDAEpB,CAAC"}
1
+ {"version":3,"file":"register-form-context.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/contexts/register-form-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3E,CAAC;AAEF,eAAO,MAAM,mBAAmB,oDAEpB,CAAC"}
@@ -2,5 +2,10 @@ export declare const useRegisterForm: () => import("formik").FormikSharedConfig<
2
2
  submitForm: () => Promise<any>;
3
3
  } & Pick<import("formik").FormikConfig<import("..").RegisterFormValues>, "validate" | "validationSchema"> & {
4
4
  defaultValues?: Partial<Omit<import("..").RegisterFormValues, "submit">>;
5
+ nameField?: import("../types/register-form-props").RegisterFormProps["nameField"];
6
+ toRegisterNames?: (fullName: string) => {
7
+ name: string;
8
+ surname: string;
9
+ };
5
10
  };
6
11
  //# sourceMappingURL=use-register-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-register-form.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/hooks/use-register-form.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;CAU3B,CAAC"}
1
+ {"version":3,"file":"use-register-form.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/hooks/use-register-form.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;;;;;;CAU3B,CAAC"}
@@ -3,7 +3,7 @@ import { FormikHelpers } from "formik";
3
3
  import * as Yup from "yup";
4
4
  import type { StyleProp, ViewStyle } from "react-native";
5
5
  import { RegisterFormValues } from "./register-form-values";
6
- export type RegisterFormProps = {
6
+ type RegisterFormBaseProps = {
7
7
  style?: StyleProp<ViewStyle>;
8
8
  customValidations?: {
9
9
  [key in keyof RegisterFormValues]?: Yup.StringSchema | ((existingRule: Yup.StringSchema) => Yup.StringSchema);
@@ -13,7 +13,18 @@ export type RegisterFormProps = {
13
13
  children: React.ReactNode;
14
14
  tenantCode: string;
15
15
  continueAsPatientToken?: string;
16
- } & ({
16
+ };
17
+ type RegisterNameFieldProps = {
18
+ nameField?: "split";
19
+ toRegisterNames?: never;
20
+ } | {
21
+ nameField: "single";
22
+ toRegisterNames: (fullName: string) => {
23
+ name: string;
24
+ surname: string;
25
+ };
26
+ };
27
+ type RegisterFormHandlers = {
17
28
  onSuccess?: undefined;
18
29
  onError?: undefined;
19
30
  onNextStep?: undefined;
@@ -23,5 +34,7 @@ export type RegisterFormProps = {
23
34
  onSuccess?: (values: AuthResponse) => void;
24
35
  onError?: (error: Error) => void;
25
36
  onNextStep?: (step: ClinicianInviteStep) => void;
26
- });
37
+ };
38
+ export type RegisterFormProps = RegisterFormBaseProps & RegisterNameFieldProps & RegisterFormHandlers;
39
+ export {};
27
40
  //# sourceMappingURL=register-form-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-form-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/types/register-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,iBAAiB,CAAC,EAAE;SACjB,GAAG,IAAI,MAAM,kBAAkB,CAAC,CAAC,EAC9B,GAAG,CAAC,YAAY,GAChB,CAAC,CAAC,YAAY,EAAE,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;KAC3D,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,GAAG,CACA;IACE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,kBAAkB,EAC1B,aAAa,EAAE,aAAa,CAAC,kBAAkB,CAAC,KAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,GACD;IACE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAClD,CACJ,CAAC"}
1
+ {"version":3,"file":"register-form-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/types/register-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,iBAAiB,CAAC,EAAE;SACjB,GAAG,IAAI,MAAM,k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AAsB,GACtB,oBAAoB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { RegisterBody } from "@ovok/core";
2
2
  export type RegisterFormValues = Omit<RegisterBody, "tenantCode"> & {
3
3
  submit: string;
4
+ fullName?: string;
4
5
  };
5
6
  //# sourceMappingURL=register-form-values.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-form-values.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/types/register-form-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG;IAClE,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"register-form-values.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/types/register-form-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -3,16 +3,23 @@ import { RegisterFormProps } from "../types/register-form-props";
3
3
  type CreateRegisterValidationSchemaProps = {
4
4
  customValidations?: RegisterFormProps["customValidations"];
5
5
  disablePasswordConfirm?: boolean;
6
+ singleName?: boolean;
7
+ toRegisterNames?: (fullName: string) => {
8
+ name: string;
9
+ surname: string;
10
+ };
6
11
  };
7
- export declare const createRegisterValidationSchema: ({ customValidations, disablePasswordConfirm, }: CreateRegisterValidationSchemaProps) => Yup.ObjectSchema<{
8
- name: string | undefined;
9
- surname: string | undefined;
12
+ export declare const createRegisterValidationSchema: ({ customValidations, disablePasswordConfirm, singleName, toRegisterNames, }: CreateRegisterValidationSchemaProps) => Yup.ObjectSchema<{
13
+ name: Yup.Maybe<string | undefined>;
14
+ surname: Yup.Maybe<string | undefined>;
15
+ fullName: Yup.Maybe<string | undefined>;
10
16
  email: string | undefined;
11
17
  password: string | undefined;
12
18
  passwordConfirm: string | undefined;
13
19
  }, Yup.AnyObject, {
14
20
  name: undefined;
15
21
  surname: undefined;
22
+ fullName: undefined;
16
23
  email: undefined;
17
24
  password: undefined;
18
25
  passwordConfirm: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"create-register-validation-schema.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/utils/create-register-validation-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,KAAK,mCAAmC,GAAG;IACzC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IAC3D,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,gDAG5C,mCAAmC;;;;;;;;;;;;MA0DrC,CAAC"}
1
+ {"version":3,"file":"create-register-validation-schema.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/register/utils/create-register-validation-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,KAAK,mCAAmC,GAAG;IACzC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IAC3D,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3E,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,6EAK5C,mCAAmC;;;;;;;;;;;;;;MA6FrC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { type ViewStyle, type TextStyle } from "react-native";
3
+ import DateTimePickerModal from "react-native-modal-datetime-picker";
3
4
  interface FormDateFieldProps {
4
5
  name: string;
5
6
  context: React.Context<any>;
@@ -8,7 +9,15 @@ interface FormDateFieldProps {
8
9
  containerStyle?: ViewStyle;
9
10
  labelStyle?: TextStyle;
10
11
  mode?: "date" | "time" | "datetime";
12
+ initialDate?: Date;
13
+ minimumDate?: Date;
14
+ maximumDate?: Date;
15
+ display?: React.ComponentProps<typeof DateTimePickerModal>["display"];
16
+ locale?: string;
17
+ formatValue?: (value: string) => string;
18
+ disabled?: boolean;
11
19
  }
12
- export declare const FormDateField: React.MemoExoticComponent<({ name, context, label, testID, containerStyle, mode, }: FormDateFieldProps) => React.JSX.Element>;
13
- export {};
20
+ declare const parseDatePickerValue: (value: string, fallback: Date) => Date;
21
+ declare const FormDateField: React.MemoExoticComponent<({ name, context, label, testID, containerStyle, mode, initialDate, minimumDate, maximumDate, display, locale, formatValue, disabled, }: FormDateFieldProps) => React.JSX.Element>;
22
+ export { FormDateField, parseDatePickerValue };
14
23
  //# sourceMappingURL=form-date-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-date-field.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/helpers/form-items/form-date-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAMtB,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;CACrC;AAED,eAAO,MAAM,aAAa,sFAQrB,kBAAkB,uBAoEtB,CAAC"}
1
+ {"version":3,"file":"form-date-field.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/helpers/form-items/form-date-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AACtB,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AAKrE,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IACpC,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,GAAI,OAAO,MAAM,EAAE,UAAU,IAAI,SAY1D,CAAC;AAEF,QAAA,MAAM,aAAa,qKAed,kBAAkB,uBA+EtB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC"}
@@ -8,8 +8,9 @@ interface FormFieldProps extends Omit<TextInputProps, "onChangeText" | "value" |
8
8
  inputRef?: React.Ref<{
9
9
  focus: () => void;
10
10
  }>;
11
+ onChangeText?: (value: string) => void;
11
12
  testID?: string;
12
13
  }
13
- export declare const FormField: React.MemoExoticComponent<({ name, context, containerStyle, inputRef, testID, ...props }: FormFieldProps) => React.JSX.Element>;
14
+ export declare const FormField: React.MemoExoticComponent<({ name, context, containerStyle, inputRef, testID, onChangeText, ...props }: FormFieldProps) => React.JSX.Element>;
14
15
  export {};
15
16
  //# sourceMappingURL=form-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/helpers/form-items/form-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIhF,UAAU,cACR,SAAQ,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;IACjE,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IAE5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,4FAQjB,cAAc,uBAoDlB,CAAC"}
1
+ {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/helpers/form-items/form-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIhF,UAAU,cACR,SAAQ,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;IACjE,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,0GASjB,cAAc,uBAoDlB,CAAC"}
@@ -8,12 +8,20 @@ export declare const defaultTranslation: {
8
8
  delete: string;
9
9
  };
10
10
  profile: {
11
+ form: {
12
+ phone: {
13
+ country: string;
14
+ invalid: string;
15
+ searchCountry: string;
16
+ };
17
+ };
11
18
  save: string;
12
19
  };
13
20
  register: {
14
21
  "already-have-account": string;
15
22
  button: string;
16
23
  name: string;
24
+ "full-name": string;
17
25
  "or-register-with": string;
18
26
  "password-confirm": string;
19
27
  subtitle: string;
@@ -1 +1 @@
1
- {"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD9B,CAAC"}
1
+ {"version":3,"file":"default-translation.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/default-translation.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D9B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type CountryCode } from "libphonenumber-js";
2
+ import * as React from "react";
3
+ type FormPhoneFieldProps = {
4
+ name: string;
5
+ fieldName: string;
6
+ label: string;
7
+ defaultCountry: CountryCode;
8
+ disabled?: boolean;
9
+ testID?: string;
10
+ };
11
+ export declare const FormPhoneField: ({ name, fieldName, label, defaultCountry, disabled, testID, }: FormPhoneFieldProps) => React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=form-phone-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-phone-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/form-phone-field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,+DAO5B,mBAAmB,sBAmIrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ type ProfileFormChoiceFieldProps = {
3
+ name: string;
4
+ label: string;
5
+ options: {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ disabled?: boolean;
10
+ testID?: string;
11
+ };
12
+ export declare const ProfileFormChoiceField: ({ name, label, options, disabled, testID, }: ProfileFormChoiceFieldProps) => React.JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=profile-form-choice-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-form-choice-field.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-choice-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,2BAA2B,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,6CAMpC,2BAA2B,sBAkC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-field-component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-field-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,UAAU,8BAA8B;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CAsC/B,CAAC"}
1
+ {"version":3,"file":"profile-form-field-component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-field-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAK/D,UAAU,8BAA8B;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CA4E/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACxC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAsG1C,CAAC"}
1
+ {"version":3,"file":"profile-form-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/profile/components/profile-form-provider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAQ/D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CACxC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CA6I1C,CAAC"}