@taxbit/react-sdk 1.0.0-beta.0 → 1.0.0-beta.2
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 +10 -11
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +2 -2
- package/dist/src/entry/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +5 -2
- package/dist/src/entry/index.d.ts +2 -0
- package/dist/src/lookups/foreignAccountHolderAccountTypeOptions.d.ts +1 -1
- package/dist/src/lookups/foreignRegardedOwnerAccountTypeOptions.d.ts +1 -1
- 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/taxbit-react-sdk.js +3094 -2484
- package/dist/taxbit-react-sdk.umd.cjs +10 -10
- package/package.json +2 -2
- package/style/basic.css +1 -1
- package/style/inline.css +1 -1
package/README.md
CHANGED
|
@@ -60,17 +60,18 @@ exampleData: ClientTaxDocumentation = {
|
|
|
60
60
|
};
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
The `questionnaire` prop determines the UI of the component. The `questionnaire` prop can be set to 'DPS' or 'W-FORM'.
|
|
64
|
+
|
|
63
65
|
```jsx
|
|
64
66
|
<TaxbitQuestionnaire
|
|
65
67
|
data={exampleData} // `data` is an optional prop
|
|
66
68
|
bearerToken="bearer token goes here"
|
|
67
69
|
questionnaire="DPS"
|
|
68
70
|
language="en-us" // 'en-us' is the default
|
|
69
|
-
staging // if not production
|
|
70
71
|
/>
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
For W-9 W-8BEN and W-8BEN-E forms,
|
|
74
|
+
For W-9 W-8BEN and W-8BEN-E forms, the `questionnaire` prop is set like this...
|
|
74
75
|
|
|
75
76
|
```jsx
|
|
76
77
|
<TaxbitQuestionnaire
|
|
@@ -78,7 +79,6 @@ For W-9 W-8BEN and W-8BEN-E forms, this component can be used...
|
|
|
78
79
|
bearerToken="bearer token goes here"
|
|
79
80
|
questionnaire="W-FORM"
|
|
80
81
|
language="en" // 'en' is the default
|
|
81
|
-
staging // if not production
|
|
82
82
|
/>
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -89,6 +89,7 @@ import { TaxbitQuestionnaire, ClientTaxDocumentation } from '@taxbit/react-sdk';
|
|
|
89
89
|
|
|
90
90
|
<TaxbitQuestionnaire
|
|
91
91
|
data={exampleData}
|
|
92
|
+
questionnaire="DPS"
|
|
92
93
|
onSubmit={(data: ClientTaxDocumentation) => alert(JSON.stringify(data))}
|
|
93
94
|
demoMode={true}
|
|
94
95
|
/>;
|
|
@@ -136,15 +137,9 @@ an example is below.
|
|
|
136
137
|
}
|
|
137
138
|
```
|
|
138
139
|
|
|
139
|
-
### Staging
|
|
140
|
-
|
|
141
|
-
This can be set to `true` or `false`. Passing `staging` in the component is the same as passing `staging={true}`.
|
|
142
|
-
|
|
143
|
-
If `true`, the staging environment will be used. If `false`, the production environment will be used. The default is `false`.
|
|
144
|
-
|
|
145
140
|
### CSS and Style Customization
|
|
146
141
|
|
|
147
|
-
The Taxbit React SDK renders a form for collecting user data. The form is structured with fairly semantic HTML and CSS classes and can be easily customized to closely match your
|
|
142
|
+
The Taxbit React SDK renders a form for collecting user data. The form is structured with fairly semantic HTML and CSS classes and can be easily customized to closely match your client's style.
|
|
148
143
|
Classnames are namespaced with "taxbit-" to reduce the chance of conflict.
|
|
149
144
|
|
|
150
145
|
### Callbacks
|
|
@@ -228,7 +223,11 @@ type Progress = {
|
|
|
228
223
|
|
|
229
224
|
## Changelog
|
|
230
225
|
|
|
231
|
-
### Version 1.0.0-beta
|
|
226
|
+
### Version 1.0.0-beta.1
|
|
227
|
+
|
|
228
|
+
1. Showing "\*" when required for Addresses on Summary
|
|
229
|
+
|
|
230
|
+
### Version 1.0.0-beta.0
|
|
232
231
|
|
|
233
232
|
1. W-9, W-8BEN, and W-8BEN-E forms are now supported in the UI. The `TaxbitQuestionnaire` component can be used to collect data for these forms.
|
|
234
233
|
2. Translations for country names are now coming from the Intl API.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
3
3
|
import type { InputStep, Locale, Progress, Questionnaire, TaxDocumentation } from 'types';
|
|
4
|
-
import type { StepId } from 'types/StepId';
|
|
5
4
|
import { ExternalValidations } from 'types/client';
|
|
5
|
+
import type { StepId } from 'types/StepId';
|
|
6
6
|
type InterviewConfig = {
|
|
7
7
|
minimumAge: number;
|
|
8
8
|
};
|
|
@@ -13,7 +13,7 @@ export type UseTaxDocumentationProps = {
|
|
|
13
13
|
onSubmit: (data: ClientTaxDocumentation) => void | Promise<void>;
|
|
14
14
|
onProgress?: (progress: Progress) => void | Promise<void>;
|
|
15
15
|
step?: InputStep;
|
|
16
|
-
questionnaire
|
|
16
|
+
questionnaire: Questionnaire;
|
|
17
17
|
config?: InterviewConfig;
|
|
18
18
|
};
|
|
19
19
|
export declare const useTaxDocumentation: ({ data: startingData, language: initialLanguage, externalValidations, onSubmit, onProgress, step: initialStep, questionnaire, config, }: UseTaxDocumentationProps) => {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TaxbitQuestionnairePersistProps } from 'widgets';
|
|
3
3
|
import { TaxbitQuestionnaireUIProps } from 'wizard';
|
|
4
|
-
|
|
4
|
+
import { Questionnaire } from '../../types';
|
|
5
|
+
export type TaxbitQuestionnaireProps = {
|
|
6
|
+
questionnaire: Questionnaire;
|
|
7
|
+
} & ((TaxbitQuestionnaireUIProps & {
|
|
5
8
|
demoMode: true;
|
|
6
9
|
}) | (TaxbitQuestionnairePersistProps & {
|
|
7
10
|
demoMode?: false | undefined;
|
|
8
|
-
});
|
|
11
|
+
}));
|
|
9
12
|
export declare const TaxbitQuestionnaire: ({ ...props }: TaxbitQuestionnaireProps) => React.JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
1
2
|
export * from '../hooks/useTaxbit';
|
|
2
3
|
export * from '../types/Locale';
|
|
3
4
|
export * from '../types/Progress';
|
|
4
5
|
export * from '../types/Questionnaire';
|
|
5
6
|
export * from '../types/client/ClientTaxDocumentationStatus';
|
|
6
7
|
export * from './TaxbitQuestionnaire';
|
|
8
|
+
export type { ClientTaxDocumentation };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const usAccountHolderAccountTypeOptions: {
|
|
2
|
-
value: "INDIVIDUAL" | "
|
|
2
|
+
value: "INDIVIDUAL" | "SOLE_PROPRIETOR" | "LLC" | "SM_LLC" | "C_CORPORATION" | "S_CORPORATION" | "PARTNERSHIP" | "TRUST_ESTATE" | "OTHER" | "DISREGARDED_ENTITY";
|
|
3
3
|
}[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const usRegardedOwnerAccountTypeOptions: {
|
|
2
|
-
value: "INDIVIDUAL" | "
|
|
2
|
+
value: "INDIVIDUAL" | "LLC" | "C_CORPORATION" | "S_CORPORATION" | "PARTNERSHIP" | "TRUST_ESTATE" | "OTHER";
|
|
3
3
|
}[];
|