@taxbit/react-sdk 1.0.0-beta.7 → 1.1.0-beta.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.
- package/README.md +19 -3
- package/dist/index.d.ts +1 -1
- package/dist/src/App.d.ts +2 -1
- package/dist/src/components/Address/Address.d.ts +2 -1
- package/dist/src/components/Address/index.d.ts +1 -1
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts +3 -2
- package/dist/src/components/ErrorBoundary/ErrorBoundary.d.ts +2 -1
- package/dist/src/components/ErrorMessage/ErrorMessage.d.ts +2 -1
- package/dist/src/components/ErrorMessage/index.d.ts +1 -1
- package/dist/src/components/Form/Form.d.ts +2 -1
- package/dist/src/components/InputStatus/InputStatus.d.ts +3 -2
- package/dist/src/components/InputStatus/index.d.ts +1 -1
- package/dist/src/components/JsxFromString/JsxFromString.d.ts +5 -0
- package/dist/src/components/JsxFromString/index.d.ts +1 -0
- package/dist/src/components/ProgressStatus/ProgressStatus.d.ts +3 -2
- package/dist/src/components/Row/Row.d.ts +2 -1
- package/dist/src/components/Row/index.d.ts +1 -1
- package/dist/src/components/Section/Section.d.ts +2 -1
- package/dist/src/components/Section/index.d.ts +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/contexts/QuestionnaireStep/QuestionnaireStepProvider.d.ts +7 -0
- package/dist/src/contexts/{QuestionnaireUI → QuestionnaireStep}/getLocal.d.ts +1 -0
- package/dist/src/contexts/QuestionnaireStep/index.d.ts +5 -0
- package/dist/src/contexts/{QuestionnaireUI → QuestionnaireStep}/shiftResidence.d.ts +2 -1
- package/dist/src/contexts/{QuestionnaireUI/useQuestionnaireUI.d.ts → QuestionnaireStep/useQuestionnaireStep.d.ts} +11 -16
- package/dist/src/contexts/QuestionnaireStep/useQuestionnaireStepContext.d.ts +63 -0
- package/dist/src/contexts/TaxDocumentation/TaxbitQuestionnaireProvider.d.ts +4 -2
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +8 -9
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +29 -34
- package/dist/src/contexts/createCtx.d.ts +1 -2
- package/dist/src/contexts/index.d.ts +1 -1
- package/dist/src/entry/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +5 -3
- package/dist/src/hooks/useHandleError.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/__tests__/clientTaxDocumentation.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/__tests__/serverTaxDocumentation.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/types/comprehensive.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/types/w8.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/types/w9.d.ts +1 -0
- package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +3 -2
- package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +3 -2
- package/dist/src/i18n/__tests__/JsxFromString.test.d.ts +1 -0
- package/dist/src/i18n/locales/bg.d.ts +1 -1
- package/dist/src/i18n/locales/cs.d.ts +1 -1
- package/dist/src/i18n/locales/da.d.ts +1 -1
- package/dist/src/i18n/locales/de-at.d.ts +1 -1
- package/dist/src/i18n/locales/de.d.ts +2 -1
- package/dist/src/i18n/locales/el-cy.d.ts +2 -1
- package/dist/src/i18n/locales/el.d.ts +2 -1
- package/dist/src/i18n/locales/en-gb.d.ts +1 -0
- package/dist/src/i18n/locales/en-nz.d.ts +1 -0
- package/dist/src/i18n/locales/en-us.d.ts +1 -0
- package/dist/src/i18n/locales/en.d.ts +1 -0
- package/dist/src/i18n/locales/es.d.ts +1 -0
- package/dist/src/i18n/locales/et.d.ts +1 -1
- package/dist/src/i18n/locales/fi.d.ts +1 -1
- package/dist/src/i18n/locales/fr-ca.d.ts +1 -0
- package/dist/src/i18n/locales/fr-lu.d.ts +1 -1
- package/dist/src/i18n/locales/fr.d.ts +1 -0
- package/dist/src/i18n/locales/ga.d.ts +1 -0
- package/dist/src/i18n/locales/hr.d.ts +1 -1
- package/dist/src/i18n/locales/hu.d.ts +1 -1
- package/dist/src/i18n/locales/it.d.ts +1 -1
- package/dist/src/i18n/locales/lt.d.ts +2 -1
- package/dist/src/i18n/locales/lv.d.ts +1 -1
- package/dist/src/i18n/locales/mergePropertyFiles.d.ts +1 -0
- package/dist/src/i18n/locales/mt.d.ts +1 -1
- package/dist/src/i18n/locales/nl-be.d.ts +2 -1
- package/dist/src/i18n/locales/nl.d.ts +1 -1
- package/dist/src/i18n/locales/no.d.ts +1 -1
- package/dist/src/i18n/locales/pl.d.ts +2 -1
- package/dist/src/i18n/locales/pt.d.ts +1 -1
- package/dist/src/i18n/locales/ro.d.ts +1 -1
- package/dist/src/i18n/locales/sk.d.ts +1 -1
- package/dist/src/i18n/locales/sl.d.ts +1 -1
- package/dist/src/i18n/locales/sv.d.ts +1 -1
- package/dist/src/i18n/locales/translation-missing.d.ts +1 -0
- package/dist/src/i18n/localizationFileMap.d.ts +3 -2
- package/dist/src/i18n/types/LocalizationKey.d.ts +10 -6
- package/dist/src/i18n/types/PropertyFile.d.ts +1 -0
- package/dist/src/i18n/types/index.d.ts +1 -1
- package/dist/src/i18n/utils/getText.d.ts +1 -0
- package/dist/src/i18n/utils/index.d.ts +1 -1
- package/dist/src/index.d.ts +9 -0
- package/dist/src/lookups/countryOptions.d.ts +4 -0
- package/dist/src/lookups/dayOptions.d.ts +1 -1
- package/dist/src/lookups/fatcaCodeOptions.d.ts +1 -1
- package/dist/src/lookups/foreignAccountHolderAccountTypeOptions.d.ts +1 -1
- package/dist/src/lookups/foreignOtherClassificationOptions.d.ts +1 -1
- package/dist/src/lookups/foreignRegardedOwnerAccountTypeOptions.d.ts +1 -1
- package/dist/src/lookups/foreignTrustClassificationOptions.d.ts +1 -1
- package/dist/src/lookups/index.d.ts +1 -0
- package/dist/src/lookups/localeOptions.d.ts +1 -0
- package/dist/src/lookups/payeeCodeOptions.d.ts +2 -2
- package/dist/src/lookups/toOptions.d.ts +1 -1
- package/dist/src/lookups/treatyCountries.json.d.ts +2195 -0
- package/dist/src/lookups/typeOfIncomeOptions.d.ts +8 -0
- package/dist/src/lookups/usAccountHolderAccountTypeOptions.d.ts +1 -1
- package/dist/src/lookups/usLlcAccountTypeOptions.d.ts +1 -1
- package/dist/src/lookups/usRegardedOwnerAccountTypeOptions.d.ts +1 -1
- package/dist/src/services/api.d.ts +6 -5
- package/dist/src/test/Wrapper.d.ts +2 -1
- package/dist/src/test/getWrapper.d.ts +2 -1
- package/dist/src/test/utils/helpers.d.ts +2 -0
- package/dist/src/types/InputStep.d.ts +2 -2
- package/dist/src/types/Progress.d.ts +1 -0
- package/dist/src/types/StepId.d.ts +1 -1
- package/dist/src/types/TaxDocumentation.d.ts +29 -4
- package/dist/src/ui/ActionButton/ActionButton.d.ts +2 -1
- package/dist/src/ui/Actions/Actions.d.ts +3 -3
- package/dist/src/ui/Actions/index.d.ts +1 -1
- package/dist/src/ui/CheckBox/CheckBox.d.ts +4 -2
- package/dist/src/ui/CheckBox/index.d.ts +1 -1
- package/dist/src/ui/DateOfBirthInput/DateOfBirthInput.d.ts +2 -1
- package/dist/src/ui/DateOfBirthInput/useDateOfBirthInput.d.ts +3 -2
- package/dist/src/ui/FormattedInput/FormattedInput.d.ts +2 -1
- package/dist/src/ui/HideShowButton/HideShowButton.d.ts +2 -1
- package/dist/src/ui/HideShowButton/index.d.ts +1 -1
- package/dist/src/ui/InputValue/InputValue.d.ts +2 -1
- package/dist/src/ui/MaskedContent/MaskedContent.d.ts +2 -1
- package/dist/src/ui/MaskedContent/index.d.ts +1 -1
- package/dist/src/ui/PasswordInput/PasswordInput.d.ts +2 -1
- package/dist/src/ui/RadioButtons/RadioButtons.d.ts +8 -5
- package/dist/src/ui/RadioButtons/__tests__/RadioButtons.test.d.ts +1 -0
- package/dist/src/ui/Select/Select.d.ts +2 -1
- package/dist/src/ui/ShowHideInput/ShowHideInput.d.ts +2 -1
- package/dist/src/ui/TextArea/TextArea.d.ts +12 -0
- package/dist/src/ui/TextArea/__tests__/TextInput.test.d.ts +1 -0
- package/dist/src/ui/TextArea/index.d.ts +1 -0
- package/dist/src/ui/TextInput/TextInput.d.ts +2 -1
- package/dist/src/ui/TextInput/__tests__/TextInput.test.d.ts +1 -0
- package/dist/src/ui/ToggleButton/ToggleButton.d.ts +2 -1
- package/dist/src/ui/ToggleButton/index.d.ts +1 -1
- package/dist/src/ui/WithholdingInput/WithholdingInput.d.ts +9 -0
- package/dist/src/ui/WithholdingInput/index.d.ts +1 -0
- package/dist/src/ui/index.d.ts +2 -0
- package/dist/src/utils/camelCaseKeys.d.ts +3 -1
- package/dist/src/utils/getFieldsState.d.ts +3 -0
- package/dist/src/utils/getFormStatus.d.ts +1 -0
- package/dist/src/utils/getLanguage.d.ts +1 -0
- package/dist/src/utils/getPromptKeyMap.d.ts +2 -111
- package/dist/src/utils/getTreatyClaimDetails.d.ts +2 -0
- package/dist/src/utils/getTreatyCountry.d.ts +38 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/isBlank.d.ts +2 -1
- package/dist/src/utils/mergeClientTaxDocumentationData.d.ts +1 -0
- package/dist/src/utils/transformForClient/convertYesNoToBoolean.d.ts +1 -0
- package/dist/src/utils/transformForClient/convertYesNoToBooleanOrUndefined.d.ts +1 -0
- package/dist/src/utils/transformForClient/transformForClient.d.ts +1 -0
- package/dist/src/utils/transformForClient/transformForClientAccountHolder.d.ts +4 -0
- package/dist/src/utils/transformForClient/transformForClientAddress.d.ts +25 -24
- package/dist/src/utils/transformForClient/transformForClientRegardedOwner.d.ts +3 -1
- package/dist/src/utils/transformForClient/transformForClientTaxResidenceFields.d.ts +4 -3
- package/dist/src/utils/transformInbound/getForeignAccountType.d.ts +2 -1
- package/dist/src/utils/transformInbound/getForeignOtherClassification.d.ts +2 -1
- package/dist/src/utils/transformInbound/getForeignTrustClassification.d.ts +2 -1
- package/dist/src/utils/transformInbound/getLLCClassification.d.ts +2 -1
- package/dist/src/utils/transformInbound/getUsAccountType.d.ts +2 -1
- package/dist/src/utils/transformInbound/transformInbound.d.ts +2 -1
- package/dist/src/validations/getInvalidFields.d.ts +1 -0
- package/dist/src/validations/getRequiredFields.d.ts +2 -1
- package/dist/src/validations/getSteps.d.ts +3 -0
- package/dist/src/validations/getSupportedFields.d.ts +3 -2
- package/dist/src/validations/getVisibleFields.d.ts +3 -2
- package/dist/src/validations/index.d.ts +1 -0
- package/dist/src/validations/invalidFieldRules.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/TaxbitQuestionnairePersist.d.ts +5 -3
- package/dist/src/widgets/TaxbitQuestionnairePersist/__tests__/TaxbitQuestionnairePersist.complete.test.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/__tests__/TaxbitQuestionnairePersist.error.test.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/__tests__/TaxbitQuestionnairePersist.loaded.test.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/__tests__/TaxbitQuestionnairePersist.loading.test.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/__tests__/TaxbitQuestionnairePersist.missingBearerToken.test.d.ts +1 -0
- package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +1 -0
- package/dist/src/wizard/AddressInput/AddressInput.d.ts +2 -1
- package/dist/src/wizard/AddressInput/index.d.ts +1 -1
- package/dist/src/wizard/LanguageSelector/LanguageSelector.d.ts +3 -2
- package/dist/src/wizard/LanguageSelector/index.d.ts +1 -1
- package/dist/src/wizard/ResidenceInput/ResidenceInput.d.ts +2 -1
- package/dist/src/wizard/ResidenceInput/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/AddressRow/AddressRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/CheckBoxRow/CheckBoxRow.d.ts +4 -2
- package/dist/src/wizard/RowInput/CheckBoxRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/DateOfBirthRow/DateOfBirthRow.d.ts +4 -3
- package/dist/src/wizard/RowInput/ErrorRow/ErrorRow.d.ts +4 -3
- package/dist/src/wizard/RowInput/HiddenInputRow/HiddenInputRow.d.ts +6 -0
- package/dist/src/wizard/RowInput/HiddenInputRow/index.d.ts +1 -0
- package/dist/src/wizard/RowInput/RadioButtonRow/RadioButtonRow.d.ts +4 -2
- package/dist/src/wizard/RowInput/RadioButtonRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/SelectRow/SelectRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/SelectRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/ShowHideInputRow/ShowHideInputRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/TextAreaRow/TextAreaRow.d.ts +10 -0
- package/dist/src/wizard/RowInput/TextAreaRow/index.d.ts +1 -0
- package/dist/src/wizard/RowInput/TextInputRow/TextInputRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/TextInputRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +2 -1
- package/dist/src/wizard/RowInput/ToggleButtonRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/VisibleRow/VisibleRow.d.ts +7 -5
- package/dist/src/wizard/RowInput/VisibleRow/index.d.ts +1 -1
- package/dist/src/wizard/RowInput/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderClassification/AccountHolderClassification.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderContact/AccountHolderContact.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderTax/AccountHolderTax.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderTreatyClaims/AccountHolderTreatyClaims.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/AccountHolderTreatyClaims/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/AppError/AppError.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/Exemptions/Exemptions.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/RegardedOwnerTreatyClaims/RegardedOwnerTreatyClaims.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/RegardedOwnerTreatyClaims/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/Recap.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/Summary/Summary.d.ts +2 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/TaxbitQuestionnaireUI.d.ts +4 -2
- package/dist/src/wizard/TaxbitQuestionnaireUI/W8imyInstructions/W8imyInstructions.d.ts +3 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/W8imyInstructions/index.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitDPSQuestionnaireUI.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitQuestionnaireUI.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitWFormQuestionnaireUI.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/__tests__/TaxbitWFormQuestionnaireUI.treatyClaims.test.d.ts +1 -0
- package/dist/src/wizard/TaxbitQuestionnaireUI/steps.d.ts +3 -0
- package/dist/taxbit-react-sdk.js +7979 -5307
- package/dist/taxbit-react-sdk.umd.cjs +14 -11
- package/package.json +8 -7
- package/style/basic.css +26 -10
- package/style/inline.css +26 -10
- package/style/minimal.css +4 -0
- package/dist/src/contexts/QuestionnaireUI/QuestionnaireUIProvider.d.ts +0 -6
- package/dist/src/contexts/QuestionnaireUI/index.d.ts +0 -4
- package/dist/src/contexts/QuestionnaireUI/useQuestionnaireUIContext.d.ts +0 -74
- package/dist/src/entry/index.d.ts +0 -8
- package/dist/src/utils/transformForClient/transformForClientAccoutHolder.d.ts +0 -2
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ The `questionnaire` prop determines the UI of the component. The `questionnaire`
|
|
|
81
81
|
/>
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
For W-9 W-8BEN and W-8BEN-E forms, the `questionnaire` prop is set like this...
|
|
84
|
+
For W-9, W-8BEN, and W-8BEN-E forms, the `questionnaire` prop is set like this...
|
|
85
85
|
|
|
86
86
|
```jsx
|
|
87
87
|
<TaxbitQuestionnaire
|
|
@@ -89,6 +89,7 @@ For W-9 W-8BEN and W-8BEN-E forms, the `questionnaire` prop is set like this...
|
|
|
89
89
|
bearerToken="bearer token goes here"
|
|
90
90
|
questionnaire="W-FORM"
|
|
91
91
|
language="en" // 'en' is the default
|
|
92
|
+
treatyClaims={true} // 'treatyClaims' is an optional path for the W-8BEN and W-8BEN-E forms
|
|
92
93
|
/>
|
|
93
94
|
```
|
|
94
95
|
|
|
@@ -117,6 +118,10 @@ The WForm component language can be set to 'en', 'fr', or 'es'.
|
|
|
117
118
|
|
|
118
119
|
See the `Locale` type below.
|
|
119
120
|
|
|
121
|
+
### Treaty Claims
|
|
122
|
+
|
|
123
|
+
To collect treaty claims for the W-8BEN and W-8BEN-E forms, the `treatyClaims` prop can be set to `true`. This will add a screen to the W-8 flow where an eligible user can enter treaty claim specifics including the treaty country and rate of withholding.
|
|
124
|
+
|
|
120
125
|
## useTaxbit Hook
|
|
121
126
|
|
|
122
127
|
The `useTaxbit` hook can be used to get the data from the server or the account status.
|
|
@@ -234,7 +239,7 @@ The Taxbit React SDK provides callbacks for the following events on the `TaxbitQ
|
|
|
234
239
|
|
|
235
240
|
#### Error Boundary
|
|
236
241
|
|
|
237
|
-
A basic React Error Boundary is in place and when an error is thrown, the TaxbitQuestionnaire component will display errors on screen and throw an error in console. The exceptions that are possible are related to fetching data from the server, such as authentication (401 Unauthorized) or network problems (Failed to fetch). An error is also thrown if the bearer token is missing (Bearer Token is required). If the `onError` callback is provided to the component or the hook, these errors will be caught
|
|
242
|
+
A basic React Error Boundary is in place and when an error is thrown, the TaxbitQuestionnaire component will display errors on screen and throw an error in console. The exceptions that are possible are related to fetching data from the server, such as authentication (401 Unauthorized) or network problems (Failed to fetch). An error is also thrown if the bearer token is missing (Bearer Token is required). If the `onError` callback is provided to the component or the hook, these errors will be caught and passed to the callback. The error boundary will not be displayed.
|
|
238
243
|
|
|
239
244
|
The DPS sequence, for example, can have a total of 3, 4, or 5 steps, each with a localized `stepTitle` and `stepId`. The `stepNumber` is the current step (1 based), and `percentComplete` is the percentage of the steps that have been completed.
|
|
240
245
|
|
|
@@ -255,11 +260,13 @@ type Locale =
|
|
|
255
260
|
| 'el-cy'
|
|
256
261
|
| 'en'
|
|
257
262
|
| 'en-gb'
|
|
263
|
+
| 'en-nz'
|
|
258
264
|
| 'en-us'
|
|
259
265
|
| 'es'
|
|
260
266
|
| 'et'
|
|
261
267
|
| 'fi'
|
|
262
268
|
| 'fr'
|
|
269
|
+
| 'fr-ca'
|
|
263
270
|
| 'fr-lu'
|
|
264
271
|
| 'ga'
|
|
265
272
|
| 'hr'
|
|
@@ -311,10 +318,19 @@ type QuestionnaireType = 'DPS' | 'W-FORM';
|
|
|
311
318
|
|
|
312
319
|
## Changelog
|
|
313
320
|
|
|
321
|
+
### Version 1.1.0-beta.0
|
|
322
|
+
|
|
323
|
+
1. Treaty Claims can now be collected for the W-8BEN and W-8BEN-E forms.
|
|
324
|
+
|
|
325
|
+
### Version 1.0.0-beta.8
|
|
326
|
+
|
|
327
|
+
1. Signature confirmation is more flexible with spaces.
|
|
328
|
+
2. Fixed checkbox issue with certification upon submission.
|
|
329
|
+
|
|
314
330
|
### Version 1.0.0-beta.7
|
|
315
331
|
|
|
316
332
|
1. BearerToken and Fetch errors are now sent only to the console, no longer thrown and bubbled up.
|
|
317
|
-
2.
|
|
333
|
+
2. Added an `error` object to the 'useTaxbit' hook.
|
|
318
334
|
|
|
319
335
|
### Version 1.0.0-beta.6
|
|
320
336
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './src
|
|
1
|
+
export * from './src'
|
package/dist/src/App.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Address';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './ErrorMessage';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './InputStatus';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JsxFromString.tsx';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Row';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Section';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonKey, ErrorKey, PromptKey, SubPromptKey, SubTitleKey, TextKey } from '../../i18n/types';
|
|
2
2
|
import { Locale, TaxDocumentation, TaxDocumentationKey } from '../../types';
|
|
3
|
+
|
|
3
4
|
export declare const getLocal: (fields: TaxDocumentation, language: Locale) => {
|
|
4
5
|
getLocalText: (key: TextKey) => string;
|
|
5
6
|
getLocalTitle: (key: string) => string;
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ErrorKey } from 'i18n/types';
|
|
3
2
|
import { Yes } from 'types';
|
|
4
3
|
import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
4
|
+
|
|
5
5
|
export type TaxDocumentationPropertyFile = {
|
|
6
6
|
[key in TaxDocumentationKey]: boolean;
|
|
7
7
|
};
|
|
8
8
|
export type TaxDocumentationErrorFile = {
|
|
9
9
|
[key in TaxDocumentationKey]?: ErrorKey[];
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
minimumAge: number;
|
|
14
|
-
} | undefined;
|
|
15
|
-
language: import("types").Locale;
|
|
16
|
-
getLocalText: (key: import("i18n/types").TextKey) => string;
|
|
11
|
+
export declare const useQuestionnaireStep: () => {
|
|
12
|
+
getLocalText: (key: import('i18n/types').TextKey) => string;
|
|
17
13
|
getLocalTitle: (key: string) => string;
|
|
18
|
-
getLocalSubTitle: (key: import(
|
|
14
|
+
getLocalSubTitle: (key: import('i18n/types').SubTitleKey) => string;
|
|
19
15
|
getLocalError: (key: ErrorKey) => string;
|
|
20
|
-
getLocalButton: (key: import(
|
|
16
|
+
getLocalButton: (key: import('i18n/types').ButtonKey) => string;
|
|
21
17
|
getLocalPrompt: (key: string) => string;
|
|
22
|
-
getLocalSubPrompt: (key:
|
|
18
|
+
getLocalSubPrompt: (key: TaxDocumentationKey) => string;
|
|
23
19
|
getLocalOption: (key: string | undefined) => string | undefined;
|
|
24
20
|
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
25
21
|
getLocalCountry: (key: string | undefined) => string;
|
|
26
22
|
getLocalUsState: (key: string | undefined) => "" | "Guam" | "Puerto Rico" | "Alabama" | "Alaska" | "American Samoa" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Federated States Of Micronesia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Marshall Islands" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Northern Mariana Islands" | "Ohio" | "Oklahoma" | "Oregon" | "Outlying Islands" | "Palau" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
27
23
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
28
24
|
getLocalMonth: (key: string | undefined) => string;
|
|
29
|
-
getPromptKey: (key: string) => import(
|
|
30
|
-
getSubPromptKey: (key: string) => import(
|
|
25
|
+
getPromptKey: (key: string) => import('i18n/types').PromptKey;
|
|
26
|
+
getSubPromptKey: (key: string) => import('i18n/types').SubPromptKey;
|
|
31
27
|
clearIfNotRequired: (...arg: TaxDocumentationKey[]) => (value: Yes | undefined) => void;
|
|
32
28
|
fields: TaxDocumentation;
|
|
33
|
-
setFields: import("react").Dispatch<import("react").SetStateAction<TaxDocumentation>>;
|
|
34
29
|
setValue: (key: TaxDocumentationKey, value: string | undefined) => void;
|
|
35
30
|
isErrorFree: boolean;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
exposeErrors: () => void;
|
|
31
|
+
isShowingErrors: boolean;
|
|
32
|
+
isShowingErrorsForField: (key: TaxDocumentationKey) => boolean | undefined;
|
|
39
33
|
hideErrors: () => void;
|
|
34
|
+
showErrors: () => void;
|
|
40
35
|
hasChangedData: boolean;
|
|
41
36
|
getRequiredLocalPrompt: (key: TaxDocumentationKey) => string;
|
|
42
37
|
visibleFields: TaxDocumentationPropertyFile;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const useQuestionnaireStepContext: () => {
|
|
2
|
+
getLocalText: (key: import('../../i18n/types/LocalizationKey.ts').TextKey) => string;
|
|
3
|
+
getLocalTitle: (key: string) => string;
|
|
4
|
+
getLocalSubTitle: (key: import('../../i18n/types/LocalizationKey.ts').SubTitleKey) => string;
|
|
5
|
+
getLocalError: (key: import('../../i18n/types/LocalizationKey.ts').ErrorKey) => string;
|
|
6
|
+
getLocalButton: (key: import('../../i18n/types/LocalizationKey.ts').ButtonKey) => string;
|
|
7
|
+
getLocalPrompt: (key: string) => string;
|
|
8
|
+
getLocalSubPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
9
|
+
getLocalOption: (key: string | undefined) => string | undefined;
|
|
10
|
+
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
11
|
+
getLocalCountry: (key: string | undefined) => string;
|
|
12
|
+
getLocalUsState: (key: string | undefined) => "" | "Guam" | "Puerto Rico" | "Alabama" | "Alaska" | "American Samoa" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Federated States Of Micronesia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Marshall Islands" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Northern Mariana Islands" | "Ohio" | "Oklahoma" | "Oregon" | "Outlying Islands" | "Palau" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
13
|
+
getLocalCaProvince: (key: string | undefined) => string;
|
|
14
|
+
getLocalMonth: (key: string | undefined) => string;
|
|
15
|
+
getPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').PromptKey;
|
|
16
|
+
getSubPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').SubPromptKey;
|
|
17
|
+
clearIfNotRequired: (...arg: import('../../types/TaxDocumentation.ts').TaxDocumentationKey[]) => (value: import('../../types/Yes.ts').Yes | undefined) => void;
|
|
18
|
+
fields: import('../../types/TaxDocumentation.ts').TaxDocumentation;
|
|
19
|
+
setValue: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey, value: string | undefined) => void;
|
|
20
|
+
isErrorFree: boolean;
|
|
21
|
+
isShowingErrors: boolean;
|
|
22
|
+
isShowingErrorsForField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => boolean | undefined;
|
|
23
|
+
hideErrors: () => void;
|
|
24
|
+
showErrors: () => void;
|
|
25
|
+
hasChangedData: boolean;
|
|
26
|
+
getRequiredLocalPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
27
|
+
visibleFields: import('./useQuestionnaireStep.ts').TaxDocumentationPropertyFile;
|
|
28
|
+
invalidFields: import('./useQuestionnaireStep.ts').TaxDocumentationErrorFile;
|
|
29
|
+
requiredFields: import('./useQuestionnaireStep.ts').TaxDocumentationPropertyFile;
|
|
30
|
+
hideField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => void;
|
|
31
|
+
showField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => void;
|
|
32
|
+
}, QuestionnaireStepContextProvider: import('react').Provider<{
|
|
33
|
+
getLocalText: (key: import('../../i18n/types/LocalizationKey.ts').TextKey) => string;
|
|
34
|
+
getLocalTitle: (key: string) => string;
|
|
35
|
+
getLocalSubTitle: (key: import('../../i18n/types/LocalizationKey.ts').SubTitleKey) => string;
|
|
36
|
+
getLocalError: (key: import('../../i18n/types/LocalizationKey.ts').ErrorKey) => string;
|
|
37
|
+
getLocalButton: (key: import('../../i18n/types/LocalizationKey.ts').ButtonKey) => string;
|
|
38
|
+
getLocalPrompt: (key: string) => string;
|
|
39
|
+
getLocalSubPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
40
|
+
getLocalOption: (key: string | undefined) => string | undefined;
|
|
41
|
+
getLocalSubOption: (key: string | undefined) => string | undefined;
|
|
42
|
+
getLocalCountry: (key: string | undefined) => string;
|
|
43
|
+
getLocalUsState: (key: string | undefined) => "" | "Guam" | "Puerto Rico" | "Alabama" | "Alaska" | "American Samoa" | "Arizona" | "Arkansas" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District Of Columbia" | "Federated States Of Micronesia" | "Florida" | "Georgia" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Marshall Islands" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Northern Mariana Islands" | "Ohio" | "Oklahoma" | "Oregon" | "Outlying Islands" | "Palau" | "Pennsylvania" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
44
|
+
getLocalCaProvince: (key: string | undefined) => string;
|
|
45
|
+
getLocalMonth: (key: string | undefined) => string;
|
|
46
|
+
getPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').PromptKey;
|
|
47
|
+
getSubPromptKey: (key: string) => import('../../i18n/types/LocalizationKey.ts').SubPromptKey;
|
|
48
|
+
clearIfNotRequired: (...arg: import('../../types/TaxDocumentation.ts').TaxDocumentationKey[]) => (value: import('../../types/Yes.ts').Yes | undefined) => void;
|
|
49
|
+
fields: import('../../types/TaxDocumentation.ts').TaxDocumentation;
|
|
50
|
+
setValue: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey, value: string | undefined) => void;
|
|
51
|
+
isErrorFree: boolean;
|
|
52
|
+
isShowingErrors: boolean;
|
|
53
|
+
isShowingErrorsForField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => boolean | undefined;
|
|
54
|
+
hideErrors: () => void;
|
|
55
|
+
showErrors: () => void;
|
|
56
|
+
hasChangedData: boolean;
|
|
57
|
+
getRequiredLocalPrompt: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => string;
|
|
58
|
+
visibleFields: import('./useQuestionnaireStep.ts').TaxDocumentationPropertyFile;
|
|
59
|
+
invalidFields: import('./useQuestionnaireStep.ts').TaxDocumentationErrorFile;
|
|
60
|
+
requiredFields: import('./useQuestionnaireStep.ts').TaxDocumentationPropertyFile;
|
|
61
|
+
hideField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => void;
|
|
62
|
+
showField: (key: import('../../types/TaxDocumentation.ts').TaxDocumentationKey) => void;
|
|
63
|
+
} | undefined>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import { UseTaxDocumentationProps } from './useTaxDocumentation';
|
|
3
|
+
|
|
3
4
|
type TaxDocumentationProviderProps = UseTaxDocumentationProps & {
|
|
4
5
|
children: React.ReactNode;
|
|
6
|
+
treatyClaims?: boolean;
|
|
5
7
|
};
|
|
6
|
-
export declare const TaxbitQuestionnaireProvider: ({ data, externalValidations, onSubmit, onProgress, language, questionnaire, step, children, config, }: TaxDocumentationProviderProps) => React.JSX.Element;
|
|
8
|
+
export declare const TaxbitQuestionnaireProvider: ({ data, externalValidations, onSubmit, onProgress, language, questionnaire, step, children, config, treatyClaims, }: TaxDocumentationProviderProps) => React.JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
|
-
import
|
|
3
|
-
import type { StepId } from 'types/StepId';
|
|
2
|
+
import { InputStep, Locale, Progress, Questionnaire, TaxDocumentation } from 'types';
|
|
4
3
|
import { ExternalValidations } from 'types/client';
|
|
4
|
+
|
|
5
5
|
type InterviewConfig = {
|
|
6
6
|
minimumAge: number;
|
|
7
7
|
};
|
|
@@ -14,28 +14,27 @@ export type UseTaxDocumentationProps = {
|
|
|
14
14
|
step?: InputStep;
|
|
15
15
|
questionnaire: Questionnaire;
|
|
16
16
|
config?: InterviewConfig;
|
|
17
|
+
treatyClaims?: boolean;
|
|
17
18
|
};
|
|
18
|
-
export declare const useTaxDocumentation: ({ data: startingData, language: initialLanguage, externalValidations, onSubmit, onProgress, step: initialStep, questionnaire, config, }: UseTaxDocumentationProps) => {
|
|
19
|
+
export declare const useTaxDocumentation: ({ data: startingData, language: initialLanguage, externalValidations, onSubmit, onProgress, step: initialStep, questionnaire, config, treatyClaims, }: UseTaxDocumentationProps) => {
|
|
19
20
|
isBuildingW9: boolean;
|
|
20
21
|
isBuildingW8: boolean;
|
|
21
22
|
onPersistCollectedData: (newData: TaxDocumentation) => void;
|
|
22
23
|
onSubmitTaxDocumentation: (data: TaxDocumentation) => Promise<void>;
|
|
23
|
-
|
|
24
|
-
onCancel: (() => void) | undefined;
|
|
25
|
-
getStepId: (key: InputStep) => StepId;
|
|
26
|
-
goTo: (form: InputStep) => void;
|
|
24
|
+
goTo: (inputStep: InputStep) => void;
|
|
27
25
|
goBack: (() => void) | undefined;
|
|
28
26
|
goToNext: (data: TaxDocumentation) => void;
|
|
29
27
|
progress: Progress | undefined;
|
|
30
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
28
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
31
29
|
data: TaxDocumentation;
|
|
32
30
|
originalClientData: TaxDocumentation;
|
|
33
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
31
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
34
32
|
setLanguage: (lang: Locale) => void;
|
|
35
33
|
language: Locale;
|
|
36
34
|
questionnaire: Questionnaire;
|
|
37
35
|
externalValidations: ExternalValidations | undefined;
|
|
38
36
|
config: InterviewConfig | undefined;
|
|
39
37
|
isSubmitting: boolean;
|
|
38
|
+
treatyClaims: boolean | undefined;
|
|
40
39
|
};
|
|
41
40
|
export {};
|
|
@@ -1,50 +1,45 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const useTaxDocumentationContext: () => {
|
|
3
2
|
isBuildingW9: boolean;
|
|
4
3
|
isBuildingW8: boolean;
|
|
5
|
-
onPersistCollectedData: (newData: import(
|
|
6
|
-
onSubmitTaxDocumentation: (data: import(
|
|
7
|
-
|
|
8
|
-
onCancel: (() => void) | undefined;
|
|
9
|
-
getStepId: (key: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => import("../../types/StepId").StepId;
|
|
10
|
-
goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
|
|
4
|
+
onPersistCollectedData: (newData: import('../../types').TaxDocumentation) => void;
|
|
5
|
+
onSubmitTaxDocumentation: (data: import('../../types').TaxDocumentation) => Promise<void>;
|
|
6
|
+
goTo: (inputStep: import('../../types').InputStep) => void;
|
|
11
7
|
goBack: (() => void) | undefined;
|
|
12
|
-
goToNext: (data: import(
|
|
13
|
-
progress: import(
|
|
14
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
15
|
-
data: import(
|
|
16
|
-
originalClientData: import(
|
|
17
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
18
|
-
setLanguage: (lang: import(
|
|
19
|
-
language: import(
|
|
20
|
-
questionnaire: import(
|
|
21
|
-
externalValidations: import(
|
|
8
|
+
goToNext: (data: import('../../types').TaxDocumentation) => void;
|
|
9
|
+
progress: import('../..').Progress | undefined;
|
|
10
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
11
|
+
data: import('../../types').TaxDocumentation;
|
|
12
|
+
originalClientData: import('../../types').TaxDocumentation;
|
|
13
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
14
|
+
setLanguage: (lang: import('../..').Locale) => void;
|
|
15
|
+
language: import('../..').Locale;
|
|
16
|
+
questionnaire: import('../..').Questionnaire;
|
|
17
|
+
externalValidations: import('../../types/client').ExternalValidations | undefined;
|
|
22
18
|
config: {
|
|
23
19
|
minimumAge: number;
|
|
24
20
|
} | undefined;
|
|
25
21
|
isSubmitting: boolean;
|
|
26
|
-
|
|
22
|
+
treatyClaims: boolean | undefined;
|
|
23
|
+
}, TaxDocumentationContextProvider: import('react').Provider<{
|
|
27
24
|
isBuildingW9: boolean;
|
|
28
25
|
isBuildingW8: boolean;
|
|
29
|
-
onPersistCollectedData: (newData: import(
|
|
30
|
-
onSubmitTaxDocumentation: (data: import(
|
|
31
|
-
|
|
32
|
-
onCancel: (() => void) | undefined;
|
|
33
|
-
getStepId: (key: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => import("../../types/StepId").StepId;
|
|
34
|
-
goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
|
|
26
|
+
onPersistCollectedData: (newData: import('../../types').TaxDocumentation) => void;
|
|
27
|
+
onSubmitTaxDocumentation: (data: import('../../types').TaxDocumentation) => Promise<void>;
|
|
28
|
+
goTo: (inputStep: import('../../types').InputStep) => void;
|
|
35
29
|
goBack: (() => void) | undefined;
|
|
36
|
-
goToNext: (data: import(
|
|
37
|
-
progress: import(
|
|
38
|
-
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
39
|
-
data: import(
|
|
40
|
-
originalClientData: import(
|
|
41
|
-
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
|
|
42
|
-
setLanguage: (lang: import(
|
|
43
|
-
language: import(
|
|
44
|
-
questionnaire: import(
|
|
45
|
-
externalValidations: import(
|
|
30
|
+
goToNext: (data: import('../../types').TaxDocumentation) => void;
|
|
31
|
+
progress: import('../..').Progress | undefined;
|
|
32
|
+
stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
33
|
+
data: import('../../types').TaxDocumentation;
|
|
34
|
+
originalClientData: import('../../types').TaxDocumentation;
|
|
35
|
+
initialStep: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "AccountHolderTreatyClaims" | "Exemptions" | "RegardedOwnerContact" | "RegardedOwnerTax" | "RegardedOwnerTreatyClaims" | "Summary" | "W8imyInstructions";
|
|
36
|
+
setLanguage: (lang: import('../..').Locale) => void;
|
|
37
|
+
language: import('../..').Locale;
|
|
38
|
+
questionnaire: import('../..').Questionnaire;
|
|
39
|
+
externalValidations: import('../../types/client').ExternalValidations | undefined;
|
|
46
40
|
config: {
|
|
47
41
|
minimumAge: number;
|
|
48
42
|
} | undefined;
|
|
49
43
|
isSubmitting: boolean;
|
|
44
|
+
treatyClaims: boolean | undefined;
|
|
50
45
|
} | undefined>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const createCtx: <A extends Record<string, unknown> | null>() => readonly [() => A, import("react").Provider<A | undefined>];
|
|
1
|
+
export declare const createCtx: <A extends Record<string, unknown> | null>() => readonly [() => A, import('react').Provider<A | undefined>];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './QuestionnaireStep';
|
|
2
2
|
export * from './TaxDocumentation';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { Locale, Questionnaire } from '../../types';
|
|
4
4
|
import { TaxbitQuestionnairePersistProps } from '../../widgets';
|
|
5
|
+
|
|
5
6
|
export type TaxbitQuestionnaireProps = {
|
|
6
7
|
data?: ClientTaxDocumentation;
|
|
7
8
|
language?: Locale;
|
|
8
9
|
questionnaire: Questionnaire;
|
|
10
|
+
treatyClaims?: TaxbitQuestionnairePersistProps['treatyClaims'];
|
|
9
11
|
onProgress?: TaxbitQuestionnairePersistProps['onProgress'];
|
|
10
12
|
onSubmit?: TaxbitQuestionnairePersistProps['onSubmit'];
|
|
11
13
|
} & ({
|
|
@@ -25,4 +27,4 @@ export type TaxbitQuestionnaireProps = {
|
|
|
25
27
|
onSuccess?: TaxbitQuestionnairePersistProps['onSuccess'];
|
|
26
28
|
staging?: TaxbitQuestionnairePersistProps['staging'];
|
|
27
29
|
});
|
|
28
|
-
export declare const TaxbitQuestionnaire: ({ bearerToken, data, demoMode, language, onError, loadingComponent, onProgress, onSettled, onSubmit, onSuccess, questionnaire, staging, }: TaxbitQuestionnaireProps) => React.JSX.Element;
|
|
30
|
+
export declare const TaxbitQuestionnaire: ({ bearerToken, data, demoMode, language, onError, loadingComponent, onProgress, onSettled, onSubmit, onSuccess, questionnaire, staging, treatyClaims, }: TaxbitQuestionnaireProps) => React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Questionnaire } from 'types';
|
|
2
|
+
|
|
2
3
|
type UseTaxbitProps = {
|
|
3
4
|
bearerToken: string;
|
|
4
5
|
questionnaire: Questionnaire;
|
|
@@ -6,8 +7,8 @@ type UseTaxbitProps = {
|
|
|
6
7
|
onError?: (error: Error) => void | Promise<void>;
|
|
7
8
|
};
|
|
8
9
|
export declare const useTaxbit: ({ bearerToken, questionnaire, staging, onError, }: UseTaxbitProps) => {
|
|
9
|
-
serverData: import(
|
|
10
|
-
statusData: import(
|
|
10
|
+
serverData: import('@taxbit/utilities').SignedClientTaxDocumentation | undefined;
|
|
11
|
+
statusData: import('../..').ClientTaxDocumentationStatus | undefined;
|
|
11
12
|
canGetDocumentUrl: boolean;
|
|
12
13
|
generateDocumentUrl: () => void;
|
|
13
14
|
isGeneratingDocumentUrl: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SignedClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
2
|
import { Questionnaire } from '../../types';
|
|
3
|
-
import
|
|
3
|
+
import { ClientTaxDocumentationStatus } from '../../types/client';
|
|
4
|
+
|
|
4
5
|
type UseTaxbitStatusProps = {
|
|
5
6
|
bearerToken?: string;
|
|
6
7
|
onError?: (error: Error) => void | Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|