@taxbit/react-sdk 0.1.0 → 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 (129) hide show
  1. package/README.md +79 -243
  2. package/dist/App.d.ts +1 -1
  3. package/dist/basic.css +1 -1
  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 -7
  10. package/dist/contexts/FormUI/index.d.ts +3 -3
  11. package/dist/contexts/FormUI/useFormUI.d.ts +17 -117
  12. package/dist/contexts/FormUI/useFormUIContext.d.ts +30 -626
  13. package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +6 -4
  14. package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +11 -10
  15. package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +194 -110
  16. package/dist/entry/index.d.ts +5 -5
  17. package/dist/hooks/useTaxBit/useTaxBit.d.ts +108 -4
  18. package/dist/i18n/locales/bg-bg.d.ts +1 -1
  19. package/dist/i18n/locales/cs-cz.d.ts +1 -1
  20. package/dist/i18n/locales/da-dk.d.ts +2 -0
  21. package/dist/i18n/locales/de-at.d.ts +2 -0
  22. package/dist/i18n/locales/de-de.d.ts +1 -1
  23. package/dist/i18n/locales/el-cy.d.ts +2 -0
  24. package/dist/i18n/locales/el-gr.d.ts +1 -1
  25. package/dist/i18n/locales/en-gb.d.ts +1 -1
  26. package/dist/i18n/locales/en-us.d.ts +1 -1
  27. package/dist/i18n/locales/es-es.d.ts +1 -1
  28. package/dist/i18n/locales/et-ee.d.ts +1 -1
  29. package/dist/i18n/locales/fi-fi.d.ts +2 -0
  30. package/dist/i18n/locales/fr-fr.d.ts +1 -1
  31. package/dist/i18n/locales/fr-lu.d.ts +2 -0
  32. package/dist/i18n/locales/ga-ie.d.ts +2 -0
  33. package/dist/i18n/locales/hr-hr.d.ts +2 -0
  34. package/dist/i18n/locales/hu-hu.d.ts +1 -1
  35. package/dist/i18n/locales/index.d.ts +18 -7
  36. package/dist/i18n/locales/it-it.d.ts +1 -1
  37. package/dist/i18n/locales/lt-lt.d.ts +2 -0
  38. package/dist/i18n/locales/lv-lv.d.ts +2 -0
  39. package/dist/i18n/locales/mt-mt.d.ts +1 -1
  40. package/dist/i18n/locales/nl-be.d.ts +2 -0
  41. package/dist/i18n/locales/nl-nl.d.ts +1 -1
  42. package/dist/i18n/locales/no-no.d.ts +1 -1
  43. package/dist/i18n/locales/pl-pl.d.ts +2 -0
  44. package/dist/i18n/locales/pt-pt.d.ts +1 -1
  45. package/dist/i18n/locales/ro-ro.d.ts +1 -1
  46. package/dist/i18n/locales/sk-sk.d.ts +1 -1
  47. package/dist/i18n/locales/sl-si.d.ts +1 -1
  48. package/dist/i18n/locales/sv-se.d.ts +1 -1
  49. package/dist/i18n/types/LocalizationKey.d.ts +10 -11
  50. package/dist/inline.css +1 -1
  51. package/dist/lookups/toOptions.d.ts +3 -0
  52. package/dist/services/api.d.ts +3 -2
  53. package/dist/taxbit-react-sdk.es.js +16961 -10199
  54. package/dist/taxbit-react-sdk.umd.js +10 -10
  55. package/dist/test/Wrapper.d.ts +7 -0
  56. package/dist/test/getWrapper.d.ts +4 -0
  57. package/dist/test/index.d.ts +2 -0
  58. package/dist/types/Locale.d.ts +1 -1
  59. package/dist/types/TaxDocumentation.d.ts +8 -4
  60. package/dist/types/client/index.d.ts +6 -0
  61. package/dist/types/{external → server}/ComprehensiveTaxDocumentation.d.ts +3 -14
  62. package/dist/types/server/TaxDocumentationStatus.d.ts +9 -0
  63. package/dist/types/server/enums.d.ts +13 -0
  64. package/dist/types/server/index.d.ts +3 -0
  65. package/dist/ui/DateOfBirthInput/DateOfBirthInput.d.ts +1 -2
  66. package/dist/ui/DateOfBirthInput/__tests__/useDateOfBirthInput.test.d.ts +1 -0
  67. package/dist/ui/DateOfBirthInput/useDateOfBirthInput.d.ts +20 -0
  68. package/dist/ui/Password/Password.d.ts +2 -3
  69. package/dist/ui/RadioButtons/RadioButtons.d.ts +3 -3
  70. package/dist/ui/RadioButtons/__tests__/RadioButtons.test.d.ts +0 -0
  71. package/dist/utils/getFieldsState.d.ts +4 -3
  72. package/dist/utils/getHintKeyMap.d.ts +4 -2
  73. package/dist/utils/getPromptKeyMap.d.ts +6 -4
  74. package/dist/utils/index.d.ts +10 -15
  75. package/dist/utils/kebabCase.d.ts +1 -0
  76. package/dist/utils/{getForeignAccountType.d.ts → transformInbound/getForeignAccountType.d.ts} +1 -1
  77. package/dist/utils/{getForeignOtherClassification.d.ts → transformInbound/getForeignOtherClassification.d.ts} +1 -1
  78. package/dist/utils/{getForeignTrustClassification.d.ts → transformInbound/getForeignTrustClassification.d.ts} +1 -1
  79. package/dist/utils/{getLLCClassification.d.ts → transformInbound/getLLCClassification.d.ts} +1 -1
  80. package/dist/utils/{getUsAccountType.d.ts → transformInbound/getUsAccountType.d.ts} +1 -1
  81. package/dist/utils/transformInbound/index.d.ts +6 -0
  82. package/dist/utils/transformInbound/transformInbound.d.ts +3 -0
  83. package/dist/utils/transformOutbound/index.d.ts +6 -0
  84. package/dist/utils/transformOutbound/transformOutbound.d.ts +2 -2
  85. package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -3
  86. package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +2 -2
  87. package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +2 -2
  88. package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +3 -4
  89. package/dist/validations/getInvalidFields.d.ts +3 -0
  90. package/dist/validations/getNotifiedFields.d.ts +10 -0
  91. package/dist/validations/getRequiredFields.d.ts +3 -0
  92. package/dist/validations/getSubmittableFields.d.ts +3 -0
  93. package/dist/{utils → validations}/getSupportedFields.d.ts +1 -1
  94. package/dist/validations/getVisibleFields.d.ts +3 -0
  95. package/dist/validations/index.d.ts +7 -2
  96. package/dist/validations/invalidFieldRules.d.ts +7 -0
  97. package/dist/validations/{requiredFields.d.ts → requiredFieldRules.d.ts} +3 -3
  98. package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +4 -11
  99. package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +7 -6
  100. package/dist/wizard/AddressInput/AddressInput.d.ts +3 -3
  101. package/dist/wizard/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +1 -1
  102. package/dist/wizard/ResidenceInput/ResidenceInput.d.ts +3 -3
  103. package/dist/wizard/RowInput/ErrorRow/ErrorRow.d.ts +6 -0
  104. package/dist/wizard/RowInput/ErrorRow/index.d.ts +1 -0
  105. package/dist/wizard/RowInput/VisibleRow/VisibleRow.d.ts +2 -2
  106. package/dist/wizard/RowInput/index.d.ts +7 -6
  107. package/dist/wizard/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +1 -1
  108. package/dist/wizard/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +1 -1
  109. package/dist/wizard/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +1 -1
  110. package/dist/wizard/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +1 -1
  111. package/dist/wizard/TaxBitFormUI/Exemptions/Exemptions.d.ts +1 -1
  112. package/dist/wizard/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +1 -1
  113. package/dist/wizard/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +1 -1
  114. package/dist/wizard/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +1 -1
  115. package/dist/wizard/TaxBitFormUI/Summary/Recap.d.ts +1 -1
  116. package/dist/wizard/TaxBitFormUI/Summary/Summary.d.ts +1 -1
  117. package/dist/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +3 -9
  118. package/dist/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +6 -6
  119. package/package.json +17 -10
  120. package/dist/components/Page/Page.d.ts +0 -8
  121. package/dist/components/Page/index.d.ts +0 -1
  122. package/dist/types/external/index.d.ts +0 -1
  123. package/dist/utils/getNotifications.d.ts +0 -10
  124. package/dist/utils/getRequiredFields.d.ts +0 -103
  125. package/dist/utils/getValidationMessages.d.ts +0 -104
  126. package/dist/utils/getVisibleQuestions.d.ts +0 -6
  127. package/dist/utils/transformInbound.d.ts +0 -3
  128. package/dist/validations/validations.d.ts +0 -7
  129. /package/dist/{taxbit-react-sdk.es.d.ts → index.d.ts} +0 -0
@@ -1,19 +1,30 @@
1
+ export * from "./bg-bg";
2
+ export * from "./cs-cz";
3
+ export * from "./da-dk";
4
+ export * from "./de-at";
1
5
  export * from "./de-de";
6
+ export * from "./el-cy";
7
+ export * from "./el-gr";
2
8
  export * from "./en-gb";
3
9
  export * from "./en-us";
4
10
  export * from "./es-es";
11
+ export * from "./et-ee";
12
+ export * from "./fi-fi";
5
13
  export * from "./fr-fr";
14
+ export * from "./fr-lu";
15
+ export * from "./ga-ie";
16
+ export * from "./hr-hr";
17
+ export * from "./hu-hu";
6
18
  export * from "./it-it";
19
+ export * from "./lt-lt";
20
+ export * from "./lv-lv";
21
+ export * from "./mt-mt";
22
+ export * from "./nl-be";
7
23
  export * from "./nl-nl";
8
24
  export * from "./no-no";
9
- export * from "./sv-se";
25
+ export * from "./pl-pl";
10
26
  export * from "./pt-pt";
11
- export * from "./bg-bg";
12
- export * from "./cs-cz";
13
- export * from "./el-gr";
14
- export * from "./et-ee";
15
- export * from "./hu-hu";
16
- export * from "./mt-mt";
17
27
  export * from "./ro-ro";
18
28
  export * from "./sk-sk";
19
29
  export * from "./sl-si";
30
+ export * from "./sv-se";
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const itIt: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const ltLt: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const lvLv: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const mtMt: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const nlBe: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const nlNl: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const noNo: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from '../types/PropertyFile';
2
+ export declare const plPl: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const ptPt: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const roRo: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const skSk: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const slSi: PropertyFile;
@@ -1,2 +1,2 @@
1
- import { PropertyFile } from "../types/PropertyFile";
1
+ import { PropertyFile } from '../types/PropertyFile';
2
2
  export declare const svSe: PropertyFile;
@@ -1,11 +1,10 @@
1
- export type ButtonKey = "edit" | "back" | "next" | "reset" | "submit" | "cancel" | "hide" | "show";
2
- export type ErrorKey = "required" | "invalid" | "invalidDate" | "mustBeSixCharacters" | "mustBeNineDigits" | "mustBeFiveOrNineDigits" | "mustMatchName" | "mustBeInDateFormat" | "mustBeValidBirthDate" | "mustBeAResidenceCountry" | "mustNotMatchVatin";
3
- export type NotificationKey = "vatUnexpectedFormat";
4
- export type OptionKey = "usPerson_yes" | "usPerson_no" | "regardedOwnerUsPerson_yes" | "regardedOwnerUsPerson_no" | "isIndividual_yes" | "isIndividual_no" | "cCorporation" | "centralBankOfIssue" | "complexTrust" | "corporation" | "disregardedEntity" | "estate" | "foreignGovernmentControlledEntity" | "foreignGovernmentIntegralPart" | "grantorTrust" | "individual" | "internationalOrganization" | "llc" | "no" | "other" | "partnership" | "privateFoundation" | "sCorporation" | "simpleTrust" | "smllc" | "soleProprietor" | "taxExemptOrganization" | "trust" | "trustEstate" | "yes";
5
- export type PromptKey = "addAdditional" | "address" | "businessRegistrationNumber" | "businessRegistrationNumberIsNotRequired" | "city" | "cityOfBirth" | "country" | "countryOfBirth" | "countryOfCitizenship" | "dateOfBirth" | "day" | "dbaName" | "exemptPayeeCode" | "exemptFatcaCode" | "financialAccountIdentifier" | "financialAccountName" | "foreignAccountType" | "foreignOtherClassification" | "foreignTin" | "foreignTinIsNotRequired" | "foreignTrustClassification" | "isEuResident" | "isIndividual" | "iAcknowlegeESignIsOk" | "iAmACitizenOfTheUs" | "iAmExemptFromFatcaReporting" | "iAmNotSubjectToBackupWithholding" | "iAuthorizeWithholdingAgent" | "iCertifyToAll" | "iConfirmIncomeIsNonUs" | "iConfirmTheBeneficialOwnerIsExempt" | "iConfirmTheEntityIsNotAUsPerson" | "iConfirmTheEntityIsTheBeneficialOwner" | "iConfirmTheTaxIdIsCorrect" | "iHaveLegalCapacityToSign" | "mailingAddress" | "mailingAddressIsDifferent" | "month" | "name" | "nameOfBusiness" | "nameOfCCorporation" | "nameOfCorporation" | "nameOfIndividual" | "nameOfLlc" | "nameOfOrganization" | "nameOfPartnership" | "nameOfSCorporation" | "nameOfSoleProprietor" | "nameOfTrustEstate" | "nameOfTrust" | "province" | "regardedOwnerUsPerson" | "removeAdditional" | "signature" | "smllcElection" | "state" | "stateProvince" | "street" | "street2" | "taxIdNumber" | "taxIdNumberIsNotRequired" | "tin" | "usAccountType" | "usLlcClassification" | "usOtherClassification" | "usPerson" | "usEin" | "usSsn" | "usTin" | "usTrustEstateEin" | "vatIdentificationNumber" | "vatIdentificationNumberIsNotRequired" | "vatCountry" | "year" | "zip";
6
- export type SubPromptKey = "smllcElection" | "iConfirmIncomeIsNonUs" | "isEuResident" | "financialAccountIdentifier" | "financialAccountName" | "vatIdentificationNumber" | "placeOfBirth";
7
- export type TitleKey = "accountHolder" | "accountHolderClassification" | "accountHolderContactInformation" | "accountHolderTaxInformation" | "address" | "mailingAddress" | "primaryAddress" | "placeOfBirth" | "regardedOwner" | "regardedOwnerClassification" | "regardedOwnerContactInformation" | "regardedOwnerTaxInformation" | "signature" | "summary" | "taxResidences" | "taxResidence1" | "taxResidence2" | "taxResidence3" | "taxResidence4" | "taxResidence5";
8
- export type SubTitleKey = "taxResidence1";
9
- export type TextKey = "eSignActReference" | "notRequired" | "interviewIsComplete" | "retrievingInterviewStatus";
10
- export type HintKey = "dateOfBirth";
11
- export type LocaleKey = "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt";
1
+ export type ButtonKey = 'edit' | 'back' | 'next' | 'reset' | 'submit' | 'cancel' | 'hide' | 'show';
2
+ export type ErrorKey = 'required' | 'invalid' | 'invalidDate' | 'mustBeSixCharacters' | 'mustBeNineDigits' | 'mustBeFiveOrNineDigits' | 'mustMatchName' | 'mustBeInDateFormat' | 'mustBeValidBirthDate' | 'mustNotMatchVatin' | 'vatCountryMustBeAResidenceCountry' | 'addressCountryMustBeAResidenceCountry';
3
+ export type NotificationKey = 'vatUnexpectedFormat';
4
+ export type OptionKey = 'usPerson_yes' | 'usPerson_no' | 'regardedOwnerUsPerson_yes' | 'regardedOwnerUsPerson_no' | 'isIndividual_yes' | 'isIndividual_no' | 'cCorporation' | 'centralBankOfIssue' | 'complexTrust' | 'corporation' | 'disregardedEntity' | 'estate' | 'foreignGovernmentControlledEntity' | 'foreignGovernmentIntegralPart' | 'grantorTrust' | 'individual' | 'internationalOrganization' | 'llc' | 'no' | 'other' | 'partnership' | 'privateFoundation' | 'sCorporation' | 'simpleTrust' | 'smllc' | 'soleProprietor' | 'taxExemptOrganization' | 'trust' | 'trustEstate' | 'yes';
5
+ export type PromptKey = 'addAdditional' | 'address' | 'businessRegistrationNumber' | 'businessRegistrationNumberIsNotRequired' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'countryOfCitizenship' | 'dateOfBirth' | 'day' | 'dbaName' | 'exemptPayeeCode' | 'exemptFatcaCode' | 'financialAccountIdentifier' | 'financialAccountName' | 'foreignAccountType' | 'foreignOtherClassification' | 'foreignTin' | 'foreignTinIsNotRequired' | 'foreignTrustClassification' | 'isEuResident' | 'isIndividual' | 'iAcknowlegeESignIsOk' | 'iAmACitizenOfTheUs' | 'iAmExemptFromFatcaReporting' | 'iAmNotSubjectToBackupWithholding' | 'iAuthorizeWithholdingAgent' | 'iCertifyToAll' | 'iConfirmIncomeIsNonUs' | 'iConfirmTheBeneficialOwnerIsExempt' | 'iConfirmTheEntityIsNotAUsPerson' | 'iConfirmTheEntityIsTheBeneficialOwner' | 'iConfirmTheTaxIdIsCorrect' | 'iHaveLegalCapacityToSign' | 'mailingAddress' | 'mailingAddressIsDifferent' | 'month' | 'name' | 'nameOfBusiness' | 'nameOfCCorporation' | 'nameOfCorporation' | 'nameOfIndividual' | 'nameOfLlc' | 'nameOfOrganization' | 'nameOfPartnership' | 'nameOfSCorporation' | 'nameOfSoleProprietor' | 'nameOfTrustEstate' | 'nameOfTrust' | 'province' | 'regardedOwnerUsPerson' | 'removeAdditional' | 'signature' | 'smllcElection' | 'state' | 'stateProvince' | 'street' | 'street2' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'usAccountType' | 'usLlcClassification' | 'usOtherClassification' | 'usPerson' | 'usEin' | 'usSsn' | 'usTin' | 'usTrustEstateEin' | 'vatIdentificationNumber' | 'vatIdentificationNumberIsNotRequired' | 'vatCountry' | 'year' | 'zip';
6
+ export type SubPromptKey = 'smllcElection' | 'iConfirmIncomeIsNonUs' | 'isEuResident' | 'financialAccountIdentifier' | 'financialAccountName' | 'vatIdentificationNumber' | 'placeOfBirth';
7
+ export type TitleKey = 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'address' | 'mailingAddress' | 'primaryAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5';
8
+ export type SubTitleKey = 'taxResidence1';
9
+ export type TextKey = 'eSignActReference' | 'notRequired' | 'interviewIsComplete' | 'retrievingInterviewStatus';
10
+ export type HintKey = 'dateOfBirth';
package/dist/inline.css CHANGED
@@ -102,7 +102,7 @@ button:focus-visible {
102
102
  border: 0;
103
103
  outline: none;
104
104
  opacity: 0.6;
105
- width: 100px;
105
+ width: 170px;
106
106
  }
107
107
 
108
108
  .taxbit-select-language:focus {
@@ -0,0 +1,3 @@
1
+ export declare const toOptions: <T extends string | number>(values: readonly T[]) => {
2
+ value: T;
3
+ }[];
@@ -1,8 +1,9 @@
1
1
  export declare const api: {
2
2
  taxDocumentation: {
3
- post: (environment: "PRODUCTION" | "STAGING") => string;
3
+ post: (environment: 'PRODUCTION' | 'STAGING') => string;
4
+ get: (environment: 'PRODUCTION' | 'STAGING') => string;
4
5
  };
5
6
  taxDocumentationStatus: {
6
- get: (environment: "PRODUCTION" | "STAGING") => string;
7
+ get: (environment: 'PRODUCTION' | 'STAGING') => string;
7
8
  };
8
9
  };