@taxbit/react-sdk 0.0.16 → 0.2.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 (195) hide show
  1. package/README.md +99 -42
  2. package/dist/App.d.ts +1 -1
  3. package/dist/basic.css +32 -6
  4. package/dist/components/ErrorMessage/ErrorMessage.d.ts +2 -2
  5. package/dist/components/Form/Form.d.ts +8 -0
  6. package/dist/components/Form/index.d.ts +1 -0
  7. package/dist/components/Notification/Notification.d.ts +2 -2
  8. package/dist/components/Row/Row.d.ts +2 -2
  9. package/dist/components/index.d.ts +7 -8
  10. package/dist/contexts/FormUI/index.d.ts +3 -3
  11. package/dist/contexts/FormUI/useFormUI.d.ts +18 -117
  12. package/dist/contexts/FormUI/useFormUIContext.d.ts +32 -632
  13. package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +6 -5
  14. package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +11 -10
  15. package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +194 -112
  16. package/dist/entry/index.d.ts +5 -6
  17. package/dist/hooks/useTaxBit/useTaxBit.d.ts +108 -4
  18. package/dist/i18n/i18n.d.ts +1 -1
  19. package/dist/i18n/index.d.ts +1 -2
  20. package/dist/i18n/locales/bg-bg.d.ts +2 -0
  21. package/dist/i18n/locales/cs-cz.d.ts +2 -0
  22. package/dist/i18n/locales/da-dk.d.ts +2 -0
  23. package/dist/i18n/locales/de-at.d.ts +2 -0
  24. package/dist/i18n/locales/de-de.d.ts +1 -1
  25. package/dist/i18n/locales/el-cy.d.ts +2 -0
  26. package/dist/i18n/locales/el-gr.d.ts +2 -0
  27. package/dist/i18n/locales/en-gb.d.ts +1 -1
  28. package/dist/i18n/locales/en-us.d.ts +1 -1
  29. package/dist/i18n/locales/es-es.d.ts +1 -1
  30. package/dist/i18n/locales/et-ee.d.ts +2 -0
  31. package/dist/i18n/locales/fi-fi.d.ts +2 -0
  32. package/dist/i18n/locales/fr-fr.d.ts +1 -1
  33. package/dist/i18n/locales/fr-lu.d.ts +2 -0
  34. package/dist/i18n/locales/ga-ie.d.ts +2 -0
  35. package/dist/i18n/locales/hr-hr.d.ts +2 -0
  36. package/dist/i18n/locales/hu-hu.d.ts +2 -0
  37. package/dist/i18n/locales/index.d.ts +21 -1
  38. package/dist/i18n/locales/it-it.d.ts +1 -1
  39. package/dist/i18n/locales/lt-lt.d.ts +2 -0
  40. package/dist/i18n/locales/lv-lv.d.ts +2 -0
  41. package/dist/i18n/locales/mt-mt.d.ts +2 -0
  42. package/dist/i18n/locales/nl-be.d.ts +2 -0
  43. package/dist/i18n/locales/nl-nl.d.ts +1 -1
  44. package/dist/i18n/locales/no-no.d.ts +1 -1
  45. package/dist/i18n/locales/pl-pl.d.ts +2 -0
  46. package/dist/i18n/locales/pt-pt.d.ts +1 -1
  47. package/dist/i18n/locales/ro-ro.d.ts +2 -0
  48. package/dist/i18n/locales/sk-sk.d.ts +2 -0
  49. package/dist/i18n/locales/sl-si.d.ts +2 -0
  50. package/dist/i18n/locales/sv-se.d.ts +1 -1
  51. package/dist/i18n/types/LocalizationKey.d.ts +10 -10
  52. package/dist/i18n/types/PropertyFile.d.ts +6 -2
  53. package/dist/i18n/types/index.d.ts +0 -1
  54. package/dist/i18n/utils/getText.d.ts +16 -15
  55. package/dist/index.css +4 -0
  56. package/dist/inline.css +33 -6
  57. package/dist/lookups/dayOptions.d.ts +1 -1
  58. package/dist/lookups/index.d.ts +3 -2
  59. package/dist/lookups/localeOptions.d.ts +4 -0
  60. package/dist/lookups/toOptions.d.ts +3 -0
  61. package/dist/minimal.css +0 -1
  62. package/dist/services/api.d.ts +3 -2
  63. package/dist/taxbit-react-sdk.es.js +18748 -6610
  64. package/dist/taxbit-react-sdk.umd.js +10 -10
  65. package/dist/test/Wrapper.d.ts +7 -0
  66. package/dist/test/getWrapper.d.ts +4 -0
  67. package/dist/test/index.d.ts +2 -0
  68. package/dist/types/Locale.d.ts +1 -0
  69. package/dist/types/TaxDocumentation.d.ts +8 -5
  70. package/dist/types/client/index.d.ts +6 -0
  71. package/dist/types/index.d.ts +1 -0
  72. package/dist/types/{external → server}/ComprehensiveTaxDocumentation.d.ts +7 -11
  73. package/dist/types/server/TaxDocumentationStatus.d.ts +9 -0
  74. package/dist/types/server/enums.d.ts +13 -0
  75. package/dist/types/server/index.d.ts +3 -0
  76. package/dist/ui/DateOfBirthInput/DateOfBirthInput.d.ts +1 -2
  77. package/dist/ui/DateOfBirthInput/__tests__/useDateOfBirthInput.test.d.ts +1 -0
  78. package/dist/ui/DateOfBirthInput/useDateOfBirthInput.d.ts +20 -0
  79. package/dist/ui/HideShowButton/HideShowButton.d.ts +5 -0
  80. package/dist/ui/HideShowButton/index.d.ts +1 -0
  81. package/dist/ui/MaskedContent/MaskedContent.d.ts +4 -0
  82. package/dist/ui/MaskedContent/index.d.ts +1 -0
  83. package/dist/ui/MaskedInput/MaskedInput.d.ts +10 -0
  84. package/dist/ui/MaskedInput/index.d.ts +1 -0
  85. package/dist/ui/Password/Password.d.ts +10 -0
  86. package/dist/ui/Password/index.d.ts +1 -0
  87. package/dist/ui/RadioButtons/RadioButtons.d.ts +3 -3
  88. package/dist/ui/RadioButtons/__tests__/RadioButtons.test.d.ts +0 -0
  89. package/dist/ui/TextInput/TextInput.d.ts +2 -1
  90. package/dist/ui/index.d.ts +2 -0
  91. package/dist/utils/getFieldsState.d.ts +4 -3
  92. package/dist/utils/getHintKeyMap.d.ts +4 -3
  93. package/dist/utils/getMonthlyDayCount.d.ts +1 -0
  94. package/dist/utils/getPromptKeyMap.d.ts +6 -5
  95. package/dist/utils/index.d.ts +10 -14
  96. package/dist/utils/kebabCase.d.ts +1 -0
  97. package/dist/utils/{getForeignAccountType.d.ts → transformInbound/getForeignAccountType.d.ts} +1 -1
  98. package/dist/utils/{getForeignOtherClassification.d.ts → transformInbound/getForeignOtherClassification.d.ts} +1 -1
  99. package/dist/utils/{getForeignTrustClassification.d.ts → transformInbound/getForeignTrustClassification.d.ts} +1 -1
  100. package/dist/utils/{getLLCClassification.d.ts → transformInbound/getLLCClassification.d.ts} +1 -1
  101. package/dist/utils/{getUsAccountType.d.ts → transformInbound/getUsAccountType.d.ts} +1 -1
  102. package/dist/utils/transformInbound/index.d.ts +6 -0
  103. package/dist/utils/transformInbound/transformInbound.d.ts +3 -0
  104. package/dist/utils/transformOutbound/convertYesNoToBoolean.d.ts +2 -0
  105. package/dist/utils/transformOutbound/index.d.ts +6 -0
  106. package/dist/utils/transformOutbound/transformOutbound.d.ts +3 -0
  107. package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -0
  108. package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +6 -0
  109. package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +3 -0
  110. package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +3 -0
  111. package/dist/validations/getInvalidFields.d.ts +3 -0
  112. package/dist/validations/getNotifiedFields.d.ts +10 -0
  113. package/dist/validations/getRequiredFields.d.ts +3 -0
  114. package/dist/validations/getSubmittableFields.d.ts +3 -0
  115. package/dist/{utils → validations}/getSupportedFields.d.ts +1 -1
  116. package/dist/validations/getVisibleFields.d.ts +3 -0
  117. package/dist/validations/index.d.ts +7 -1
  118. package/dist/validations/invalidFieldRules.d.ts +7 -0
  119. package/dist/validations/requiredFieldRules.d.ts +7 -0
  120. package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +4 -11
  121. package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +7 -7
  122. package/dist/wizard/AddressInput/AddressInput.d.ts +8 -0
  123. package/dist/wizard/LanguageSelector/LanguageSelector.d.ts +2 -0
  124. package/dist/wizard/LanguageSelector/index.d.ts +1 -0
  125. package/dist/{paths → wizard}/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +1 -1
  126. package/dist/{paths → wizard}/ResidenceInput/ResidenceInput.d.ts +3 -3
  127. package/dist/{paths → wizard}/RowInput/CheckBoxRow/CheckBoxRow.d.ts +2 -2
  128. package/dist/wizard/RowInput/ErrorRow/ErrorRow.d.ts +6 -0
  129. package/dist/wizard/RowInput/ErrorRow/index.d.ts +1 -0
  130. package/dist/wizard/RowInput/MaskedInputRow/MaskedInputRow.d.ts +10 -0
  131. package/dist/wizard/RowInput/MaskedInputRow/index.d.ts +1 -0
  132. package/dist/{paths → wizard}/RowInput/TextInputRow/TextInputRow.d.ts +3 -1
  133. package/dist/{paths → wizard}/RowInput/VisibleRow/VisibleRow.d.ts +2 -2
  134. package/dist/wizard/RowInput/index.d.ts +7 -0
  135. package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +1 -1
  136. package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +1 -1
  137. package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +1 -1
  138. package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +1 -1
  139. package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/Exemptions.d.ts +1 -1
  140. package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +1 -1
  141. package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +1 -1
  142. package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +1 -1
  143. package/dist/{paths → wizard}/TaxBitFormUI/Summary/Recap.d.ts +1 -1
  144. package/dist/{paths → wizard}/TaxBitFormUI/Summary/Summary.d.ts +1 -1
  145. package/dist/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +4 -0
  146. package/dist/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +11 -0
  147. package/package.json +17 -9
  148. package/dist/components/Page/Page.d.ts +0 -6
  149. package/dist/components/Page/index.d.ts +0 -1
  150. package/dist/components/Title/Title.d.ts +0 -5
  151. package/dist/components/Title/index.d.ts +0 -1
  152. package/dist/i18n/types/Locale.d.ts +0 -1
  153. package/dist/paths/AddressInput/AddressInput.d.ts +0 -8
  154. package/dist/paths/FinancialAccountInput/FinancialAccountInput.d.ts +0 -2
  155. package/dist/paths/FinancialAccountInput/index.d.ts +0 -1
  156. package/dist/paths/RowInput/ErrorRow/ErrorRow.d.ts +0 -2
  157. package/dist/paths/RowInput/ErrorRow/index.d.ts +0 -1
  158. package/dist/paths/RowInput/index.d.ts +0 -6
  159. package/dist/paths/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +0 -11
  160. package/dist/paths/TaxBitFormUI/TaxBitFormUI.d.ts +0 -12
  161. package/dist/paths/VatInput/VatInput.d.ts +0 -8
  162. package/dist/paths/VatInput/index.d.ts +0 -1
  163. package/dist/types/external/index.d.ts +0 -1
  164. package/dist/utils/getNotifications.d.ts +0 -10
  165. package/dist/utils/getVisibleQuestions.d.ts +0 -6
  166. package/dist/utils/transformInbound.d.ts +0 -3
  167. package/dist/utils/transformOutbound.d.ts +0 -3
  168. package/dist/validations/validations.d.ts +0 -7
  169. /package/dist/{taxbit-react-sdk.es.d.ts → index.d.ts} +0 -0
  170. /package/dist/{paths → wizard}/AddressInput/index.d.ts +0 -0
  171. /package/dist/{paths → wizard}/PlaceOfBirthInput/index.d.ts +0 -0
  172. /package/dist/{paths → wizard}/ResidenceInput/index.d.ts +0 -0
  173. /package/dist/{paths → wizard}/RowInput/CheckBoxRow/index.d.ts +0 -0
  174. /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/DateOfBirthRow.d.ts +0 -0
  175. /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/index.d.ts +0 -0
  176. /package/dist/{paths → wizard}/RowInput/RadioButtonRow/RadioButtonRow.d.ts +0 -0
  177. /package/dist/{paths → wizard}/RowInput/RadioButtonRow/index.d.ts +0 -0
  178. /package/dist/{paths → wizard}/RowInput/SelectRow/SelectRow.d.ts +0 -0
  179. /package/dist/{paths → wizard}/RowInput/SelectRow/index.d.ts +0 -0
  180. /package/dist/{paths → wizard}/RowInput/TextInputRow/index.d.ts +0 -0
  181. /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +0 -0
  182. /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/index.d.ts +0 -0
  183. /package/dist/{paths → wizard}/RowInput/VisibleRow/index.d.ts +0 -0
  184. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/index.d.ts +0 -0
  185. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/index.d.ts +0 -0
  186. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/index.d.ts +0 -0
  187. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/index.d.ts +0 -0
  188. /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/index.d.ts +0 -0
  189. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/index.d.ts +0 -0
  190. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/index.d.ts +0 -0
  191. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/index.d.ts +0 -0
  192. /package/dist/{paths → wizard}/TaxBitFormUI/Summary/index.d.ts +0 -0
  193. /package/dist/{paths → wizard}/TaxBitFormUI/index.d.ts +0 -0
  194. /package/dist/{paths → wizard}/TaxBitFormUI/steps.d.ts +0 -0
  195. /package/dist/{paths → wizard}/index.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ClientTaxDocumentation } from 'types/client';
3
+ import { TaxForm } from '../types';
4
+ export declare const Wrapper: React.FC<React.PropsWithChildren & {
5
+ initialData?: ClientTaxDocumentation;
6
+ taxForms?: TaxForm[];
7
+ }>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TaxForm } from '../types';
3
+ import { ClientTaxDocumentation } from '../types/client';
4
+ export declare const getWrapper: (initialData?: ClientTaxDocumentation, taxForms?: TaxForm[]) => ({ children }: React.PropsWithChildren) => React.ReactNode;
@@ -0,0 +1,2 @@
1
+ export * from './Wrapper';
2
+ export * from './getWrapper';
@@ -0,0 +1 @@
1
+ export type Locale = "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
@@ -1,6 +1,6 @@
1
- import { type YesNo } from "./YesNo";
2
- import { type Yes } from "./Yes";
3
- import type { UsAccountType, UsLlcAccountType, ForeignAccountType, ForeignTrustAccountType, ForeignOtherAccountType } from "./AccountType";
1
+ import type { ForeignAccountType, ForeignOtherAccountType, ForeignTrustAccountType, UsAccountType, UsLlcAccountType } from './AccountType';
2
+ import { type Yes } from './Yes';
3
+ import { type YesNo } from './YesNo';
4
4
  export type AccountHolderClassificationData = {
5
5
  accountHolderIsIndividual?: YesNo;
6
6
  accountHolderIsEuResident?: YesNo;
@@ -38,7 +38,6 @@ export type AccountHolderContactData = {
38
38
  export type AccountHolderTaxData = {
39
39
  accountHolderFinancialAccountIdentifier?: string;
40
40
  accountHolderFinancialAccountName?: string;
41
- accountHolderFinancialAccountNameSameAsAccountHolderName?: Yes;
42
41
  accountHolderForeignTin?: string;
43
42
  accountHolderForeignTinIsNotRequired?: Yes;
44
43
  accountHolderTaxResidenceCountry1?: string;
@@ -115,6 +114,10 @@ export type SummaryData = {
115
114
  iConfirmTheTaxIdIsCorrect?: Yes;
116
115
  iHaveLegalCapacityToSign?: Yes;
117
116
  signature?: string;
117
+ source?: string;
118
118
  };
119
- export type TaxDocumentation = AccountHolderContactData & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData;
119
+ export type CalculatedData = {
120
+ accountHolderCountryIsResidence?: YesNo;
121
+ };
122
+ export type TaxDocumentation = AccountHolderContactData & AccountHolderTaxData & AccountHolderClassificationData & RegardedOwnerContactData & RegardedOwnerClassificationData & RegardedOwnerTaxData & SummaryData & CalculatedData;
120
123
  export type TaxDocumentationKey = keyof TaxDocumentation;
@@ -0,0 +1,6 @@
1
+ import { CamelCasedPropertiesDeep } from 'type-fest';
2
+ import { SignedComprehensiveTaxDocumentation, TaxDocumentationStatus } from '../server';
3
+ export type ClientTaxDocumentation = CamelCasedPropertiesDeep<SignedComprehensiveTaxDocumentation>;
4
+ export type ClientTaxDocumentationStatus = CamelCasedPropertiesDeep<TaxDocumentationStatus, {
5
+ preserveConsecutiveUppercase: false;
6
+ }>;
@@ -1,6 +1,7 @@
1
1
  export * from "./AccountType";
2
2
  export * from "./CaProvinceCode";
3
3
  export * from "./CountryCode";
4
+ export * from "./Locale";
4
5
  export * from "./MonthCode";
5
6
  export * from "./TaxForm";
6
7
  export * from "./TaxDocumentation";
@@ -1,5 +1,4 @@
1
- import type { CamelCasedPropertiesDeep } from "type-fest";
2
- type Address = {
1
+ export type Address = {
3
2
  city?: string;
4
3
  country?: string;
5
4
  state_or_province?: string;
@@ -7,7 +6,7 @@ type Address = {
7
6
  second_line?: string;
8
7
  postal_code?: string;
9
8
  };
10
- type AccountHolderTaxDocumentation = {
9
+ export type AccountHolderTaxDocumentation = {
11
10
  address?: Address;
12
11
  country_of_citizenship?: string;
13
12
  date_of_birth?: string;
@@ -17,7 +16,6 @@ type AccountHolderTaxDocumentation = {
17
16
  name?: string;
18
17
  city_of_birth?: string;
19
18
  country_of_birth?: string;
20
- business_registration_number?: string;
21
19
  financial_account_identifier?: string;
22
20
  financial_account_name?: string;
23
21
  ftin?: string;
@@ -27,7 +25,6 @@ type AccountHolderTaxDocumentation = {
27
25
  tin?: string;
28
26
  tin_not_required?: boolean;
29
27
  }[];
30
- show_tax_residence?: boolean[];
31
28
  tin?: string;
32
29
  vatin?: string;
33
30
  vatin_country?: string;
@@ -46,7 +43,7 @@ type AccountHolderTaxDocumentation = {
46
43
  foreign_trust_classification?: string;
47
44
  foreign_other_classification?: string;
48
45
  };
49
- type RegardedOwnerTaxDocumentation = {
46
+ export type RegardedOwnerTaxDocumentation = {
50
47
  address?: Address;
51
48
  country_of_citizenship?: string;
52
49
  date_of_birth?: string;
@@ -62,7 +59,7 @@ type RegardedOwnerTaxDocumentation = {
62
59
  is_us_person?: boolean;
63
60
  us_account_type?: string;
64
61
  us_llc_classification?: string;
65
- other_classification?: string;
62
+ us_other_classification?: string;
66
63
  us_trust_estate_ein?: boolean;
67
64
  foreign_account_type?: string;
68
65
  foreign_trust_classification?: string;
@@ -75,8 +72,7 @@ export type SignedComprehensiveTaxDocumentation = {
75
72
  } & {
76
73
  has_certified?: boolean;
77
74
  is_not_subject_backup_withholding?: boolean;
78
- signature: string;
79
- document_type: "COMPREHENSIVE";
75
+ signature?: string;
76
+ document_type?: 'COMPREHENSIVE';
77
+ source?: string;
80
78
  };
81
- export type ClientTaxDocumentation = CamelCasedPropertiesDeep<AccountHolderTaxDocumentation>;
82
- export {};
@@ -0,0 +1,9 @@
1
+ import { ComprehensiveFormStatusEnum, ComprehensiveStatusEnum } from './enums.ts';
2
+ export type TaxDocumentationStatus = {
3
+ status: ComprehensiveStatusEnum.Undocumented | ComprehensiveStatusEnum.Undetermined;
4
+ submission_status: ComprehensiveStatusEnum.Submitted | ComprehensiveStatusEnum.NotSubmitted;
5
+ DAC7_interview?: {
6
+ data_collection_status: ComprehensiveFormStatusEnum.Complete | ComprehensiveFormStatusEnum.Incomplete;
7
+ expiration_date: string;
8
+ };
9
+ };
@@ -0,0 +1,13 @@
1
+ export declare enum ComprehensiveStatusEnum {
2
+ Undocumented = "UNDOCUMENTED",
3
+ Undetermined = "UNDETERMINED",
4
+ Submitted = "SUBMITTED",
5
+ NotSubmitted = "NOT_SUBMITTED"
6
+ }
7
+ export declare enum ComprehensiveFormStatusEnum {
8
+ Collected = "COLLECTED",
9
+ NotCollected = "NOT_COLLECTED",
10
+ PartiallyCollected = "PARTIALLY_COLLECTED",
11
+ Complete = "COMPLETE",
12
+ Incomplete = "INCOMPLETE"
13
+ }
@@ -0,0 +1,3 @@
1
+ export * from './ComprehensiveTaxDocumentation';
2
+ export * from './TaxDocumentationStatus';
3
+ export * from './enums';
@@ -4,6 +4,5 @@ export type DateOfBirthInputProps = {
4
4
  name: TaxDocumentationKey;
5
5
  className?: string;
6
6
  hint?: true;
7
- children?: React.ReactNode;
8
7
  };
9
- export declare const DateOfBirthInput: ({ name, className, hint, children, }: DateOfBirthInputProps) => React.JSX.Element;
8
+ export declare const DateOfBirthInput: ({ name, className, hint, }: DateOfBirthInputProps) => React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { TaxDocumentationKey } from "types";
3
+ export declare const useDateOfBirthInput: (name: TaxDocumentationKey) => {
4
+ mm: string;
5
+ dd: string;
6
+ yyyy: string;
7
+ handleDayChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
8
+ handleMonthChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
9
+ handleYearChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
10
+ dayOptions: {
11
+ value: "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09";
12
+ }[];
13
+ birthYearOptions: {
14
+ value: number;
15
+ }[];
16
+ monthOptions: {
17
+ label: string;
18
+ value: import("types").MonthCode;
19
+ }[];
20
+ };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export type HideShowButtonProps = {
3
+ onClick: () => void;
4
+ };
5
+ export declare const HideShowButton: ({ onClick }: HideShowButtonProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./HideShowButton";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const MaskedContent: ({ text }: {
3
+ text: string | undefined;
4
+ }) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./MaskedContent";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { TaxDocumentationKey } from "types/TaxDocumentation";
3
+ export type MaskedInputProps = {
4
+ name: TaxDocumentationKey;
5
+ className?: string;
6
+ onChange?: (val: string) => string;
7
+ hint?: true;
8
+ children?: React.ReactNode;
9
+ };
10
+ export declare const MaskedInput: ({ name, className, onChange, hint, children, }: MaskedInputProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./MaskedInput.tsx";
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type PasswordProps = {
3
+ value?: string;
4
+ mask?: string;
5
+ onChange?: (val: string) => void;
6
+ show?: boolean;
7
+ className?: string;
8
+ };
9
+ export declare const Password: ({ value, mask, onChange, show, ...inputProps }: PasswordProps) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Password";
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- import { TaxDocumentationKey } from "types/TaxDocumentation";
3
- import { OptionKey } from "i18n/types";
1
+ import { OptionKey } from 'i18n/types';
2
+ import React from 'react';
3
+ import { TaxDocumentationKey } from 'types/TaxDocumentation';
4
4
  type SelectOption = {
5
5
  value: OptionKey;
6
6
  label?: string;
@@ -7,5 +7,6 @@ export type TextInputProps = {
7
7
  hint?: true;
8
8
  disabled?: boolean;
9
9
  children?: React.ReactNode;
10
+ syncName?: TaxDocumentationKey;
10
11
  };
11
- export declare const TextInput: ({ name, className, onChange, hint, children, disabled, }: TextInputProps) => React.JSX.Element;
12
+ export declare const TextInput: ({ name, className, onChange, hint, children, disabled, syncName, }: TextInputProps) => React.JSX.Element;
@@ -6,3 +6,5 @@ export * from "./RadioButtons";
6
6
  export * from "./Select";
7
7
  export * from "./TextInput";
8
8
  export * from "./ToggleButton";
9
+ export * from "./HideShowButton";
10
+ export * from "./MaskedInput";
@@ -1,8 +1,9 @@
1
- import { TaxDocumentation } from "types/TaxDocumentation";
2
- export declare const getFieldsState: (fields: TaxDocumentation) => {
1
+ import { TaxDocumentation } from 'types/TaxDocumentation';
2
+ import { TaxForm } from '../types';
3
+ export declare const getFieldsState: (fields: TaxDocumentation, supportedForms?: TaxForm[]) => {
3
4
  accountHolderIsDisregarded: boolean;
4
5
  hasNoTaxId: boolean;
5
- isDac7: boolean;
6
+ isDac7: boolean | undefined;
6
7
  isW9: boolean;
7
8
  isW8: boolean;
8
9
  isW8Ben: boolean;
@@ -1,8 +1,10 @@
1
1
  import { TaxDocumentationKey } from "types/TaxDocumentation";
2
2
  import { HintKey } from "i18n/types";
3
3
  export declare const getHintKeyMap: () => {
4
- exemptPayeeCode?: "dateOfBirth" | undefined;
4
+ signature?: "dateOfBirth" | undefined;
5
+ source?: "dateOfBirth" | undefined;
5
6
  exemptFatcaCode?: "dateOfBirth" | undefined;
7
+ exemptPayeeCode?: "dateOfBirth" | undefined;
6
8
  iAcknowlegeESignIsOk?: "dateOfBirth" | undefined;
7
9
  iAmACitizenOfTheUs?: "dateOfBirth" | undefined;
8
10
  iAmExemptFromFatcaReporting?: "dateOfBirth" | undefined;
@@ -16,7 +18,6 @@ export declare const getHintKeyMap: () => {
16
18
  iConfirmTheTaxIdIsCorrect?: "dateOfBirth" | undefined;
17
19
  iHaveLegalCapacityToSign?: "dateOfBirth" | undefined;
18
20
  regardedOwnerUsPerson?: "dateOfBirth" | undefined;
19
- signature?: "dateOfBirth" | undefined;
20
21
  accountHolderAddressCity?: "dateOfBirth" | undefined;
21
22
  accountHolderAddressCountry?: "dateOfBirth" | undefined;
22
23
  accountHolderAddressState?: "dateOfBirth" | undefined;
@@ -38,7 +39,6 @@ export declare const getHintKeyMap: () => {
38
39
  accountHolderName?: "dateOfBirth" | undefined;
39
40
  accountHolderFinancialAccountIdentifier?: "dateOfBirth" | undefined;
40
41
  accountHolderFinancialAccountName?: "dateOfBirth" | undefined;
41
- accountHolderFinancialAccountNameSameAsAccountHolderName?: "dateOfBirth" | undefined;
42
42
  accountHolderForeignTin?: "dateOfBirth" | undefined;
43
43
  accountHolderForeignTinIsNotRequired?: "dateOfBirth" | undefined;
44
44
  accountHolderTaxResidenceCountry1?: "dateOfBirth" | undefined;
@@ -102,4 +102,5 @@ export declare const getHintKeyMap: () => {
102
102
  regardedOwnerForeignTin?: "dateOfBirth" | undefined;
103
103
  regardedOwnerForeignTinIsNotRequired?: "dateOfBirth" | undefined;
104
104
  regardedOwnerUsTin?: "dateOfBirth" | undefined;
105
+ accountHolderCountryIsResidence?: "dateOfBirth" | undefined;
105
106
  };
@@ -0,0 +1 @@
1
+ export declare const getMonthlyDayCount: (month: number, year?: number) => number;
@@ -1,8 +1,10 @@
1
- import { TaxDocumentation, TaxDocumentationKey } from "types/TaxDocumentation";
2
- import { PromptKey } from "i18n/types";
1
+ import { PromptKey } from 'i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
3
3
  export declare const getPromptKeyMap: (data: TaxDocumentation) => {
4
- exemptPayeeCode?: PromptKey | undefined;
4
+ signature?: PromptKey | undefined;
5
+ source?: PromptKey | undefined;
5
6
  exemptFatcaCode?: PromptKey | undefined;
7
+ exemptPayeeCode?: PromptKey | undefined;
6
8
  iAcknowlegeESignIsOk?: PromptKey | undefined;
7
9
  iAmACitizenOfTheUs?: PromptKey | undefined;
8
10
  iAmExemptFromFatcaReporting?: PromptKey | undefined;
@@ -16,7 +18,6 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
16
18
  iConfirmTheTaxIdIsCorrect?: PromptKey | undefined;
17
19
  iHaveLegalCapacityToSign?: PromptKey | undefined;
18
20
  regardedOwnerUsPerson?: PromptKey | undefined;
19
- signature?: PromptKey | undefined;
20
21
  accountHolderAddressCity?: PromptKey | undefined;
21
22
  accountHolderAddressCountry?: PromptKey | undefined;
22
23
  accountHolderAddressState?: PromptKey | undefined;
@@ -38,7 +39,6 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
38
39
  accountHolderName?: PromptKey | undefined;
39
40
  accountHolderFinancialAccountIdentifier?: PromptKey | undefined;
40
41
  accountHolderFinancialAccountName?: PromptKey | undefined;
41
- accountHolderFinancialAccountNameSameAsAccountHolderName?: PromptKey | undefined;
42
42
  accountHolderForeignTin?: PromptKey | undefined;
43
43
  accountHolderForeignTinIsNotRequired?: PromptKey | undefined;
44
44
  accountHolderTaxResidenceCountry1?: PromptKey | undefined;
@@ -102,4 +102,5 @@ export declare const getPromptKeyMap: (data: TaxDocumentation) => {
102
102
  regardedOwnerForeignTin?: PromptKey | undefined;
103
103
  regardedOwnerForeignTinIsNotRequired?: PromptKey | undefined;
104
104
  regardedOwnerUsTin?: PromptKey | undefined;
105
+ accountHolderCountryIsResidence?: PromptKey | undefined;
105
106
  };
@@ -1,14 +1,10 @@
1
- export * from "./cx";
2
- export * from "./date";
3
- export * from "./getFieldsState";
4
- export * from "./getForeignAccountType";
5
- export * from "./getForeignOtherClassification";
6
- export * from "./getForeignTrustClassification";
7
- export * from "./getLLCClassification.ts";
8
- export * from "./getPromptKeyMap";
9
- export * from "./getSupportedFields";
10
- export * from "./getUsAccountType";
11
- export * from "./getVisibleQuestions";
12
- export * from "./isBlank";
13
- export * from "./transformInbound";
14
- export * from "./transformOutbound";
1
+ export * from './cx';
2
+ export * from './date';
3
+ export * from './getFieldsState';
4
+ export * from './getHintKeyMap';
5
+ export * from './getMonthlyDayCount';
6
+ export * from './getPromptKeyMap';
7
+ export * from './isBlank';
8
+ export * from './kebabCase';
9
+ export * from './transformInbound';
10
+ export * from './transformOutbound';
@@ -0,0 +1 @@
1
+ export declare const kebabCase: (str: string) => string;
@@ -1,2 +1,2 @@
1
- import { type ForeignAccountHolderAccountType } from "lookups";
1
+ import { type ForeignAccountHolderAccountType } from 'lookups';
2
2
  export declare const getForeignAccountType: (accountType: string | undefined) => ForeignAccountHolderAccountType | undefined;
@@ -1,2 +1,2 @@
1
- import { type ForeignOtherClassification } from "lookups";
1
+ import { type ForeignOtherClassification } from 'lookups';
2
2
  export declare const getForeignOtherClassification: (classification: string | undefined) => ForeignOtherClassification | undefined;
@@ -1,2 +1,2 @@
1
- import { type ForeignTrustClassification } from "lookups";
1
+ import { type ForeignTrustClassification } from 'lookups';
2
2
  export declare const getForeignTrustClassification: (classification: string | undefined) => ForeignTrustClassification | undefined;
@@ -1,2 +1,2 @@
1
- import { type UsLLCAccountType } from "lookups";
1
+ import { type UsLLCAccountType } from 'lookups';
2
2
  export declare const getLLCClassification: (accountType: string | undefined) => UsLLCAccountType | undefined;
@@ -1,2 +1,2 @@
1
- import { type UsAccountHolderAccountType } from "lookups";
1
+ import { type UsAccountHolderAccountType } from 'lookups';
2
2
  export declare const getUsAccountType: (accountType: string | undefined) => UsAccountHolderAccountType | undefined;
@@ -0,0 +1,6 @@
1
+ export * from './getForeignAccountType';
2
+ export * from './getForeignOtherClassification';
3
+ export * from './getForeignTrustClassification';
4
+ export * from './getLLCClassification';
5
+ export * from './getUsAccountType';
6
+ export * from './transformInbound';
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentation, TaxForm } from 'types';
2
+ import { ClientTaxDocumentation } from '../../types/client';
3
+ export declare const transformInbound: (data: ClientTaxDocumentation, forms: TaxForm[]) => TaxDocumentation;
@@ -0,0 +1,2 @@
1
+ import { YesNo } from "types";
2
+ export declare const convertYesNoToBoolean: (val: YesNo | undefined) => boolean | undefined;
@@ -0,0 +1,6 @@
1
+ export * from './convertYesNoToBoolean';
2
+ export * from './transformOutbound';
3
+ export * from './transformToOutboundAccoutHolder';
4
+ export * from './transformToOutboundAddress';
5
+ export * from './transformToOutboundRegardedOwner';
6
+ export * from './transformToOutboundTaxResidenceFields';
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentation } from '../../types';
2
+ import { SignedComprehensiveTaxDocumentation } from '../../types/server';
3
+ export declare const transformOutbound: (data: TaxDocumentation) => SignedComprehensiveTaxDocumentation;
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentation } from 'types';
2
+ import { AccountHolderTaxDocumentation } from 'types/server';
3
+ export declare const transformToOutboundAccountHolder: (data: TaxDocumentation) => AccountHolderTaxDocumentation | undefined;
@@ -0,0 +1,6 @@
1
+ import { TaxDocumentation } from 'types';
2
+ import { Address } from 'types/server';
3
+ export declare const transformToOutboundAccountHolderAddress: (data: TaxDocumentation) => Address | undefined;
4
+ export declare const transformToOutboundRegardedOwnerAddress: (data: TaxDocumentation) => Address | undefined;
5
+ export declare const transformToOutboundAccountHolderMailingAddress: (data: TaxDocumentation) => Address | undefined;
6
+ export declare const transformToOutboundRegardedOwnerMailingAddress: (data: TaxDocumentation) => Address | undefined;
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentation } from 'types';
2
+ import { RegardedOwnerTaxDocumentation } from 'types/server';
3
+ export declare const transformToOutboundRegardedOwner: (data: TaxDocumentation) => RegardedOwnerTaxDocumentation | undefined;
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentation } from 'types';
2
+ import { AccountHolderTaxDocumentation } from 'types/server';
3
+ export declare const transformToOutboundAccountHolderTaxResidences: (data: TaxDocumentation) => AccountHolderTaxDocumentation['tax_residences'] | undefined;
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentationErrorFile, TaxDocumentationPropertyFile } from '../contexts';
2
+ import { TaxDocumentation } from '../types';
3
+ export declare const getInvalidFields: (fields: TaxDocumentation, requiredFields: TaxDocumentationPropertyFile, shownFields: TaxDocumentationPropertyFile) => TaxDocumentationErrorFile;
@@ -0,0 +1,10 @@
1
+ import { NotificationKey } from '../i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from '../types';
3
+ export type NotificationRule = (fields: TaxDocumentation) => NotificationKey | undefined;
4
+ export type Notifications = {
5
+ [key in TaxDocumentationKey]?: NotificationKey;
6
+ };
7
+ export type NotificationRules = {
8
+ [key in TaxDocumentationKey]?: NotificationRule;
9
+ };
10
+ export declare const getNotifiedFields: (fields: TaxDocumentation, shownFields: Set<TaxDocumentationKey>) => Notifications;
@@ -0,0 +1,3 @@
1
+ import { type TaxDocumentationPropertyFile } from '../contexts';
2
+ import { TaxDocumentation } from '../types';
3
+ export declare const getRequiredFields: (fields: TaxDocumentation, visibleFields: TaxDocumentationPropertyFile) => TaxDocumentationPropertyFile;
@@ -0,0 +1,3 @@
1
+ import { TaxDocumentationPropertyFile } from '../contexts';
2
+ import { TaxDocumentation } from '../types';
3
+ export declare const getSubmittableFields: (fields: TaxDocumentation, visibleFields: TaxDocumentationPropertyFile) => TaxDocumentation;
@@ -1,4 +1,4 @@
1
- import type { TaxDocumentationKey, TaxForm } from "types";
1
+ import type { TaxDocumentationKey, TaxForm } from 'types';
2
2
  type TaxDocumentationPropertyFile = {
3
3
  [key in TaxDocumentationKey]: boolean;
4
4
  };
@@ -0,0 +1,3 @@
1
+ import type { TaxDocumentation, TaxForm } from 'types';
2
+ import { TaxDocumentationPropertyFile } from '../contexts';
3
+ export declare const getVisibleFields: (fields: TaxDocumentation, supportedFields: TaxDocumentationPropertyFile, supportedForms: TaxForm[]) => TaxDocumentationPropertyFile;
@@ -1 +1,7 @@
1
- export * from "./validations";
1
+ export * from './getInvalidFields';
2
+ export * from './getRequiredFields';
3
+ export * from './getSubmittableFields';
4
+ export * from './getSupportedFields';
5
+ export * from './getVisibleFields';
6
+ export * from './invalidFieldRules.ts';
7
+ export * from './requiredFieldRules';
@@ -0,0 +1,7 @@
1
+ import { ErrorKey } from 'i18n/types';
2
+ import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
3
+ export type FormUIValidation = (fields: TaxDocumentation) => ErrorKey | undefined;
4
+ export type FormUIValidations = {
5
+ [key in TaxDocumentationKey]?: FormUIValidation;
6
+ };
7
+ export declare const invalidFieldRules: FormUIValidations;
@@ -0,0 +1,7 @@
1
+ import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
2
+ import { TaxForm } from '../types';
3
+ export type FormUIRequired = ((fields: TaxDocumentation, taxForms?: TaxForm[]) => boolean | undefined) | (() => boolean | undefined);
4
+ export type FormUIRequiredFields = {
5
+ [key in TaxDocumentationKey]?: FormUIRequired;
6
+ };
7
+ export declare const requiredFieldRules: FormUIRequiredFields;
@@ -1,11 +1,4 @@
1
- import React from "react";
2
- import type { Locale } from "../../i18n";
3
- import { ClientTaxDocumentation } from "../../types/external";
4
- type TaxBitDAC7FormProps = {
5
- data?: ClientTaxDocumentation;
6
- bearerToken: string;
7
- language?: Locale;
8
- staging?: true;
9
- };
10
- export declare const TaxBitDAC7Form: ({ data, staging, bearerToken, language, }: TaxBitDAC7FormProps) => React.JSX.Element;
11
- export {};
1
+ import React from 'react';
2
+ import { TaxBitFormProps } from './TaxBitForm';
3
+ export type TaxBitDAC7FormProps = Omit<TaxBitFormProps, 'taxForms'>;
4
+ export declare const TaxBitDAC7Form: ({ data, staging, bearerToken, language, onSubmit, onSuccess, }: TaxBitDAC7FormProps) => React.JSX.Element;
@@ -1,13 +1,13 @@
1
- import React from "react";
2
- import type { Locale } from "../../i18n";
3
- import { TaxForm } from "../../types";
4
- import { ClientTaxDocumentation } from "../../types/external";
5
- type TaxBitFormProps = {
1
+ import React from 'react';
2
+ import { Locale, TaxDocumentation, TaxForm } from 'types';
3
+ import { ClientTaxDocumentation } from 'types/client';
4
+ export type TaxBitFormProps = {
6
5
  data?: ClientTaxDocumentation;
7
6
  staging?: true;
8
7
  bearerToken: string;
9
8
  language?: Locale;
10
9
  taxForms?: TaxForm[];
10
+ onSubmit?: (data?: TaxDocumentation) => void;
11
+ onSuccess?: (data?: TaxDocumentation) => void;
11
12
  };
12
- export declare const TaxBitForm: ({ staging, data, bearerToken, language, taxForms, }: TaxBitFormProps) => React.JSX.Element;
13
- export {};
13
+ export declare const TaxBitForm: ({ staging, data, bearerToken, language, taxForms, onSubmit, onSuccess, }: TaxBitFormProps) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type AddressProps = {
3
+ prompt: string;
4
+ showIf?: boolean;
5
+ prefix: 'accountHolderAddress' | 'accountHolderMailingAddress' | 'regardedOwnerAddress' | 'regardedOwnerMailingAddress';
6
+ };
7
+ export declare const AddressInput: ({ prompt, prefix, showIf, }: AddressProps) => React.JSX.Element | null;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const LanguageSelector: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./LanguageSelector";
@@ -1,2 +1,2 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare const PlaceOfBirthInput: () => React.JSX.Element;