@techlabi/kycrazy-ui-kit 0.47.0 → 0.48.0-beta.1

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.
package/README.md CHANGED
@@ -50,7 +50,7 @@ function App() {
50
50
  fullName={user.fullName} // optional
51
51
  hideCompanyActivity={true}; // optional
52
52
  hideQuestionary={true}; // optional
53
- companyDocumentsTypes={['bank_statement', 'company_structure', 'certificate_of_registration','business_license']} // optional
53
+ companyDocumentsTypes={['bank_statement', 'company_structure', 'certificate_of_registration','business_license', 'void_cheque']} // optional
54
54
  onComplete={(token: string, data: KYCRequestData | KYBRequestData) => {}}
55
55
  onDoneClick={() => {}}
56
56
  />
@@ -61,16 +61,16 @@ function App() {
61
61
 
62
62
  ## 🎨 Props
63
63
 
64
- | Prop | Type | Default | Optional | Description |
65
- | ----------------------- | --------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
- | `apiEndpoint` | `string` | - | no | provide backend API endpoint where the data will be posted upon KYC verification flow |
67
- | `apiKey` | `string` | - | no | provide API key to access backend |
68
- | `isKYB` | `boolean` | false | yes | use in KYB mode |
69
- | `userEmail` | `string` | - | yes | Email of the user undergoing KYC/KYB verification |
70
- | `userId` | `string` | - | no | Unique identifier of the user to save the progress |
71
- | `fullName` | `string` | - | yes | optional full name of the user (will be autocompleted in the KYC flow) |
72
- | `hideCompanyActivity` | `boolean` | false | yes | hide the company activity (KYB mode) section |
73
- | `hideQuestionary` | `boolean` | false | yes | hide the questionnaire section (KYB mode) |
74
- | `companyDocumentsTypes` | `Array<string>` | - | yes | Optional list of company document uppload fields for KYB: <br>`bank_statement`, `company_structure`, `certificate_of_registration`, `business_license` <br> If prop is not used then all of the fields will be shown |
75
- | `onComplete` | `function` | - | no | A callback function once the request successfully reached the backend |
76
- | `onDoneClick` | `function` | - | yes | A callback function once a user clicked on button on final screen |
64
+ | Prop | Type | Default | Optional | Description |
65
+ | ----------------------- | --------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
+ | `apiEndpoint` | `string` | - | no | provide backend API endpoint where the data will be posted upon KYC verification flow |
67
+ | `apiKey` | `string` | - | no | provide API key to access backend |
68
+ | `isKYB` | `boolean` | false | yes | use in KYB mode |
69
+ | `userEmail` | `string` | - | yes | Email of the user undergoing KYC/KYB verification |
70
+ | `userId` | `string` | - | no | Unique identifier of the user to save the progress |
71
+ | `fullName` | `string` | - | yes | optional full name of the user (will be autocompleted in the KYC flow) |
72
+ | `hideCompanyActivity` | `boolean` | false | yes | hide the company activity (KYB mode) section |
73
+ | `hideQuestionary` | `boolean` | false | yes | hide the questionnaire section (KYB mode) |
74
+ | `companyDocumentsTypes` | `Array<string>` | - | yes | Optional list of company document uppload fields for KYB: <br>`bank_statement`, `company_structure`, `certificate_of_registration`, `business_license`, `void_cheque` <br> If prop is not used then all of the fields will be shown |
75
+ | `onComplete` | `function` | - | no | A callback function once the request successfully reached the backend |
76
+ | `onDoneClick` | `function` | - | yes | A callback function once a user clicked on button on final screen |
package/dist/index.es.js CHANGED
@@ -18059,6 +18059,11 @@ const $u = 5, jB = 10, ZA = {
18059
18059
  bank_statement: {
18060
18060
  label: "Bank Statement",
18061
18061
  description: "Upload your latest bank statement",
18062
+ required: !0
18063
+ },
18064
+ void_cheque: {
18065
+ label: "Void Cheque",
18066
+ description: "Upload your Void Cheque",
18062
18067
  required: !1
18063
18068
  },
18064
18069
  business_license: {
@@ -18070,6 +18075,7 @@ const $u = 5, jB = 10, ZA = {
18070
18075
  "company_structure",
18071
18076
  "certificate_of_registration",
18072
18077
  "bank_statement",
18078
+ "void_cheque",
18073
18079
  "business_license"
18074
18080
  ], LB = (r) => {
18075
18081
  const e = {};
@@ -18083,7 +18089,13 @@ const $u = 5, jB = 10, ZA = {
18083
18089
  onContinue: a,
18084
18090
  onBack: t,
18085
18091
  renderProgress: n,
18086
- companyDocumentsTypes: i = ["bank_statement", "company_structure", "certificate_of_registration", "business_license"]
18092
+ companyDocumentsTypes: i = [
18093
+ "bank_statement",
18094
+ "company_structure",
18095
+ "certificate_of_registration",
18096
+ "void_cheque",
18097
+ "business_license"
18098
+ ]
18087
18099
  }) => {
18088
18100
  const o = M.useMemo(() => [...i].sort((c, d) => {
18089
18101
  const b = ZA[c].required, g = ZA[d].required;
@@ -19914,10 +19926,10 @@ const Wi = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
19914
19926
  r0,
19915
19927
  {
19916
19928
  control: i.control,
19917
- name: "postal_code",
19929
+ name: "city",
19918
19930
  render: ({ field: A }) => /* @__PURE__ */ X(Qr, { children: [
19919
- /* @__PURE__ */ l(Jr, { children: "Zip Code / Postal Code" }),
19920
- /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter zip/postal code", ...A }) }),
19931
+ /* @__PURE__ */ l(Jr, { children: "City" }),
19932
+ /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter city", ...A }) }),
19921
19933
  /* @__PURE__ */ l(Kr, {})
19922
19934
  ] })
19923
19935
  }
@@ -19926,10 +19938,10 @@ const Wi = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
19926
19938
  r0,
19927
19939
  {
19928
19940
  control: i.control,
19929
- name: "city",
19941
+ name: "state",
19930
19942
  render: ({ field: A }) => /* @__PURE__ */ X(Qr, { children: [
19931
- /* @__PURE__ */ l(Jr, { children: "City" }),
19932
- /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter city", ...A }) }),
19943
+ /* @__PURE__ */ l(Jr, { children: "State / Province" }),
19944
+ /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter state / province", ...A }) }),
19933
19945
  /* @__PURE__ */ l(Kr, {})
19934
19946
  ] })
19935
19947
  }
@@ -19961,10 +19973,10 @@ const Wi = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
19961
19973
  r0,
19962
19974
  {
19963
19975
  control: i.control,
19964
- name: "state",
19976
+ name: "postal_code",
19965
19977
  render: ({ field: A }) => /* @__PURE__ */ X(Qr, { children: [
19966
- /* @__PURE__ */ l(Jr, { children: "State / Province" }),
19967
- /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter state / province", ...A }) }),
19978
+ /* @__PURE__ */ l(Jr, { children: "Zip Code / Postal Code" }),
19979
+ /* @__PURE__ */ l(zr, { children: /* @__PURE__ */ l(j0, { placeholder: "Enter zip/postal code", ...A }) }),
19968
19980
  /* @__PURE__ */ l(Kr, {})
19969
19981
  ] })
19970
19982
  }
@@ -31695,6 +31707,7 @@ const {
31695
31707
  bank_statement: [],
31696
31708
  company_structure: [],
31697
31709
  certificate_of_registration: [],
31710
+ void_cheque: [],
31698
31711
  business_license: []
31699
31712
  }), [Y, or] = e0({
31700
31713
  inventory_maintained: "",
@@ -32031,12 +32044,16 @@ const {
32031
32044
  onDataChange: (S) => q((V) => ({ ...V, ...S })),
32032
32045
  onContinue: async (S) => {
32033
32046
  const V = {};
32034
- ["bank_statement", "company_structure", "certificate_of_registration", "business_license"].forEach(
32035
- (z) => {
32036
- const ar = S[z];
32037
- ar != null && ar.length && (V[z] = ar.filter((K) => K instanceof File));
32038
- }
32039
- ), await Ma("company_documents", {}, V, p) ? u("processing") : c({
32047
+ [
32048
+ "bank_statement",
32049
+ "company_structure",
32050
+ "certificate_of_registration",
32051
+ "void_cheque",
32052
+ "business_license"
32053
+ ].forEach((z) => {
32054
+ const ar = S[z];
32055
+ ar != null && ar.length && (V[z] = ar.filter((K) => K instanceof File));
32056
+ }), await Ma("company_documents", {}, V, p) ? u("processing") : c({
32040
32057
  title: "Save Failed",
32041
32058
  description: "Documents not saved.",
32042
32059
  variant: "destructive"
@@ -32048,6 +32065,7 @@ const {
32048
32065
  renderProgress: w,
32049
32066
  companyDocumentsTypes: f || [
32050
32067
  "bank_statement",
32068
+ "void_cheque",
32051
32069
  "company_structure",
32052
32070
  "certificate_of_registration",
32053
32071
  "business_license"