@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.
- package/README.md +99 -42
- package/dist/App.d.ts +1 -1
- package/dist/basic.css +32 -6
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +2 -2
- package/dist/components/Form/Form.d.ts +8 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +2 -2
- package/dist/components/Row/Row.d.ts +2 -2
- package/dist/components/index.d.ts +7 -8
- package/dist/contexts/FormUI/index.d.ts +3 -3
- package/dist/contexts/FormUI/useFormUI.d.ts +18 -117
- package/dist/contexts/FormUI/useFormUIContext.d.ts +32 -632
- package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +6 -5
- package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +11 -10
- package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +194 -112
- package/dist/entry/index.d.ts +5 -6
- package/dist/hooks/useTaxBit/useTaxBit.d.ts +108 -4
- package/dist/i18n/i18n.d.ts +1 -1
- package/dist/i18n/index.d.ts +1 -2
- package/dist/i18n/locales/bg-bg.d.ts +2 -0
- package/dist/i18n/locales/cs-cz.d.ts +2 -0
- package/dist/i18n/locales/da-dk.d.ts +2 -0
- package/dist/i18n/locales/de-at.d.ts +2 -0
- package/dist/i18n/locales/de-de.d.ts +1 -1
- package/dist/i18n/locales/el-cy.d.ts +2 -0
- package/dist/i18n/locales/el-gr.d.ts +2 -0
- package/dist/i18n/locales/en-gb.d.ts +1 -1
- package/dist/i18n/locales/en-us.d.ts +1 -1
- package/dist/i18n/locales/es-es.d.ts +1 -1
- package/dist/i18n/locales/et-ee.d.ts +2 -0
- package/dist/i18n/locales/fi-fi.d.ts +2 -0
- package/dist/i18n/locales/fr-fr.d.ts +1 -1
- package/dist/i18n/locales/fr-lu.d.ts +2 -0
- package/dist/i18n/locales/ga-ie.d.ts +2 -0
- package/dist/i18n/locales/hr-hr.d.ts +2 -0
- package/dist/i18n/locales/hu-hu.d.ts +2 -0
- package/dist/i18n/locales/index.d.ts +21 -1
- package/dist/i18n/locales/it-it.d.ts +1 -1
- package/dist/i18n/locales/lt-lt.d.ts +2 -0
- package/dist/i18n/locales/lv-lv.d.ts +2 -0
- package/dist/i18n/locales/mt-mt.d.ts +2 -0
- package/dist/i18n/locales/nl-be.d.ts +2 -0
- package/dist/i18n/locales/nl-nl.d.ts +1 -1
- package/dist/i18n/locales/no-no.d.ts +1 -1
- package/dist/i18n/locales/pl-pl.d.ts +2 -0
- package/dist/i18n/locales/pt-pt.d.ts +1 -1
- package/dist/i18n/locales/ro-ro.d.ts +2 -0
- package/dist/i18n/locales/sk-sk.d.ts +2 -0
- package/dist/i18n/locales/sl-si.d.ts +2 -0
- package/dist/i18n/locales/sv-se.d.ts +1 -1
- package/dist/i18n/types/LocalizationKey.d.ts +10 -10
- package/dist/i18n/types/PropertyFile.d.ts +6 -2
- package/dist/i18n/types/index.d.ts +0 -1
- package/dist/i18n/utils/getText.d.ts +16 -15
- package/dist/index.css +4 -0
- package/dist/inline.css +33 -6
- package/dist/lookups/dayOptions.d.ts +1 -1
- package/dist/lookups/index.d.ts +3 -2
- package/dist/lookups/localeOptions.d.ts +4 -0
- package/dist/lookups/toOptions.d.ts +3 -0
- package/dist/minimal.css +0 -1
- package/dist/services/api.d.ts +3 -2
- package/dist/taxbit-react-sdk.es.js +18748 -6610
- package/dist/taxbit-react-sdk.umd.js +10 -10
- package/dist/test/Wrapper.d.ts +7 -0
- package/dist/test/getWrapper.d.ts +4 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/types/Locale.d.ts +1 -0
- package/dist/types/TaxDocumentation.d.ts +8 -5
- package/dist/types/client/index.d.ts +6 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/{external → server}/ComprehensiveTaxDocumentation.d.ts +7 -11
- package/dist/types/server/TaxDocumentationStatus.d.ts +9 -0
- package/dist/types/server/enums.d.ts +13 -0
- package/dist/types/server/index.d.ts +3 -0
- package/dist/ui/DateOfBirthInput/DateOfBirthInput.d.ts +1 -2
- package/dist/ui/DateOfBirthInput/__tests__/useDateOfBirthInput.test.d.ts +1 -0
- package/dist/ui/DateOfBirthInput/useDateOfBirthInput.d.ts +20 -0
- package/dist/ui/HideShowButton/HideShowButton.d.ts +5 -0
- package/dist/ui/HideShowButton/index.d.ts +1 -0
- package/dist/ui/MaskedContent/MaskedContent.d.ts +4 -0
- package/dist/ui/MaskedContent/index.d.ts +1 -0
- package/dist/ui/MaskedInput/MaskedInput.d.ts +10 -0
- package/dist/ui/MaskedInput/index.d.ts +1 -0
- package/dist/ui/Password/Password.d.ts +10 -0
- package/dist/ui/Password/index.d.ts +1 -0
- package/dist/ui/RadioButtons/RadioButtons.d.ts +3 -3
- package/dist/ui/RadioButtons/__tests__/RadioButtons.test.d.ts +0 -0
- package/dist/ui/TextInput/TextInput.d.ts +2 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/utils/getFieldsState.d.ts +4 -3
- package/dist/utils/getHintKeyMap.d.ts +4 -3
- package/dist/utils/getMonthlyDayCount.d.ts +1 -0
- package/dist/utils/getPromptKeyMap.d.ts +6 -5
- package/dist/utils/index.d.ts +10 -14
- package/dist/utils/kebabCase.d.ts +1 -0
- package/dist/utils/{getForeignAccountType.d.ts → transformInbound/getForeignAccountType.d.ts} +1 -1
- package/dist/utils/{getForeignOtherClassification.d.ts → transformInbound/getForeignOtherClassification.d.ts} +1 -1
- package/dist/utils/{getForeignTrustClassification.d.ts → transformInbound/getForeignTrustClassification.d.ts} +1 -1
- package/dist/utils/{getLLCClassification.d.ts → transformInbound/getLLCClassification.d.ts} +1 -1
- package/dist/utils/{getUsAccountType.d.ts → transformInbound/getUsAccountType.d.ts} +1 -1
- package/dist/utils/transformInbound/index.d.ts +6 -0
- package/dist/utils/transformInbound/transformInbound.d.ts +3 -0
- package/dist/utils/transformOutbound/convertYesNoToBoolean.d.ts +2 -0
- package/dist/utils/transformOutbound/index.d.ts +6 -0
- package/dist/utils/transformOutbound/transformOutbound.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +6 -0
- package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +3 -0
- package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +3 -0
- package/dist/validations/getInvalidFields.d.ts +3 -0
- package/dist/validations/getNotifiedFields.d.ts +10 -0
- package/dist/validations/getRequiredFields.d.ts +3 -0
- package/dist/validations/getSubmittableFields.d.ts +3 -0
- package/dist/{utils → validations}/getSupportedFields.d.ts +1 -1
- package/dist/validations/getVisibleFields.d.ts +3 -0
- package/dist/validations/index.d.ts +7 -1
- package/dist/validations/invalidFieldRules.d.ts +7 -0
- package/dist/validations/requiredFieldRules.d.ts +7 -0
- package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +4 -11
- package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +7 -7
- package/dist/wizard/AddressInput/AddressInput.d.ts +8 -0
- package/dist/wizard/LanguageSelector/LanguageSelector.d.ts +2 -0
- package/dist/wizard/LanguageSelector/index.d.ts +1 -0
- package/dist/{paths → wizard}/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +1 -1
- package/dist/{paths → wizard}/ResidenceInput/ResidenceInput.d.ts +3 -3
- package/dist/{paths → wizard}/RowInput/CheckBoxRow/CheckBoxRow.d.ts +2 -2
- package/dist/wizard/RowInput/ErrorRow/ErrorRow.d.ts +6 -0
- package/dist/wizard/RowInput/ErrorRow/index.d.ts +1 -0
- package/dist/wizard/RowInput/MaskedInputRow/MaskedInputRow.d.ts +10 -0
- package/dist/wizard/RowInput/MaskedInputRow/index.d.ts +1 -0
- package/dist/{paths → wizard}/RowInput/TextInputRow/TextInputRow.d.ts +3 -1
- package/dist/{paths → wizard}/RowInput/VisibleRow/VisibleRow.d.ts +2 -2
- package/dist/wizard/RowInput/index.d.ts +7 -0
- package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/Exemptions.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/Summary/Recap.d.ts +1 -1
- package/dist/{paths → wizard}/TaxBitFormUI/Summary/Summary.d.ts +1 -1
- package/dist/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +4 -0
- package/dist/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +11 -0
- package/package.json +17 -9
- package/dist/components/Page/Page.d.ts +0 -6
- package/dist/components/Page/index.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +0 -5
- package/dist/components/Title/index.d.ts +0 -1
- package/dist/i18n/types/Locale.d.ts +0 -1
- package/dist/paths/AddressInput/AddressInput.d.ts +0 -8
- package/dist/paths/FinancialAccountInput/FinancialAccountInput.d.ts +0 -2
- package/dist/paths/FinancialAccountInput/index.d.ts +0 -1
- package/dist/paths/RowInput/ErrorRow/ErrorRow.d.ts +0 -2
- package/dist/paths/RowInput/ErrorRow/index.d.ts +0 -1
- package/dist/paths/RowInput/index.d.ts +0 -6
- package/dist/paths/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +0 -11
- package/dist/paths/TaxBitFormUI/TaxBitFormUI.d.ts +0 -12
- package/dist/paths/VatInput/VatInput.d.ts +0 -8
- package/dist/paths/VatInput/index.d.ts +0 -1
- package/dist/types/external/index.d.ts +0 -1
- package/dist/utils/getNotifications.d.ts +0 -10
- package/dist/utils/getVisibleQuestions.d.ts +0 -6
- package/dist/utils/transformInbound.d.ts +0 -3
- package/dist/utils/transformOutbound.d.ts +0 -3
- package/dist/validations/validations.d.ts +0 -7
- /package/dist/{taxbit-react-sdk.es.d.ts → index.d.ts} +0 -0
- /package/dist/{paths → wizard}/AddressInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/PlaceOfBirthInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/ResidenceInput/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/CheckBoxRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/DateOfBirthRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/RadioButtonRow/RadioButtonRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/RadioButtonRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/SelectRow/SelectRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/SelectRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/TextInputRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/RowInput/VisibleRow/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/Summary/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/index.d.ts +0 -0
- /package/dist/{paths → wizard}/TaxBitFormUI/steps.d.ts +0 -0
- /package/dist/{paths → wizard}/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -9,90 +9,147 @@ npm install @taxbit/react-sdk
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
import '@taxbit/react-sdk/style/inline.css'; // other options include 'basic.css' and 'minimal.css'
|
|
12
|
+
import '@taxbit/react-sdk/style/inline.css'; // other options include 'basic.css' and 'minimal.css'
|
|
13
13
|
import { TaxBitDAC7Form } from '@taxbit/react-sdk';
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
### Data
|
|
17
|
+
|
|
17
18
|
```typescript
|
|
18
19
|
exampleData = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
accountHolder: {
|
|
21
|
+
name: 'John Smith',
|
|
22
|
+
tin: '456456456',
|
|
23
|
+
ftin: '667788991',
|
|
24
|
+
usAccountType: 'individual',
|
|
25
|
+
foreignAccountType: 'individual',
|
|
24
26
|
address: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
firstLine: '123 Main St',
|
|
28
|
+
secondLine: 'Unit #2',
|
|
29
|
+
city: 'Seattle',
|
|
30
|
+
stateOrProvince: 'WA',
|
|
31
|
+
postalCode: '98000',
|
|
32
|
+
country: 'GR',
|
|
30
33
|
},
|
|
31
34
|
mailingAddress: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
firstLine: '123 Main St',
|
|
36
|
+
city: 'Seattle',
|
|
37
|
+
stateOrProvince: 'WA',
|
|
38
|
+
postalCode: '98000',
|
|
39
|
+
country: 'GR',
|
|
37
40
|
},
|
|
38
41
|
mailingAddressIsDifferent: true,
|
|
39
|
-
countryOfCitizenship:
|
|
42
|
+
countryOfCitizenship: 'GR',
|
|
40
43
|
ftinNotLegallyRequired: true,
|
|
41
44
|
taxResidences: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
{
|
|
46
|
+
country: 'GR',
|
|
47
|
+
tin: '456456456',
|
|
48
|
+
tinNotRequired: false,
|
|
49
|
+
},
|
|
47
50
|
],
|
|
48
|
-
vatin:
|
|
49
|
-
vatinCountry:
|
|
51
|
+
vatin: '123123123',
|
|
52
|
+
vatinCountry: 'GR',
|
|
50
53
|
vatinNotRequired: true,
|
|
51
|
-
financialAccountIdentifier:
|
|
52
|
-
financialAccountName:
|
|
54
|
+
financialAccountIdentifier: '123123123',
|
|
55
|
+
financialAccountName: 'John Smith',
|
|
53
56
|
isIndividual: true,
|
|
54
57
|
isEuResident: true,
|
|
55
58
|
isUsPerson: false,
|
|
59
|
+
},
|
|
56
60
|
};
|
|
57
61
|
```
|
|
58
62
|
|
|
59
63
|
```jsx
|
|
60
64
|
<TaxBitDAC7Form
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
data={exampleData} // `data` is an optional prop
|
|
66
|
+
bearerToken="bearer token goes here"
|
|
67
|
+
language="en-us" // 'en-us' is the default
|
|
68
|
+
staging // if not production
|
|
65
69
|
/>
|
|
66
70
|
```
|
|
67
71
|
|
|
68
72
|
Which is just a shortcut for this component...
|
|
73
|
+
|
|
69
74
|
```jsx
|
|
70
|
-
<TaxBitForm
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
<TaxBitForm
|
|
76
|
+
data={exampleData} // `data` is an optional prop
|
|
77
|
+
bearerToken="bearer token goes here"
|
|
78
|
+
language="en-us" // 'en-us' is the default
|
|
79
|
+
forms={['DAC7']}
|
|
80
|
+
staging // if not production
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
There is a more basic component that simply shows the TaxBit UI and does not interact with the TaxBit server. It can be used like this...
|
|
85
|
+
|
|
86
|
+
```typescript jsx
|
|
87
|
+
<TaxBitDAC7FormUI
|
|
88
|
+
data={exampleData}
|
|
89
|
+
onSubmit={(data: unknown) => alert(JSON.stringify(data))}
|
|
76
90
|
/>
|
|
77
91
|
```
|
|
78
92
|
|
|
79
93
|
### Bearer Token
|
|
94
|
+
|
|
80
95
|
This will be generated from the TaxBit API and passed in as a prop to the component.
|
|
81
96
|
|
|
82
97
|
### Language
|
|
83
|
-
|
|
98
|
+
|
|
99
|
+
The first screen of the tax documentation interview gives the user the opportunity to select a language.
|
|
100
|
+
This can also be initially set to any one of the following:
|
|
101
|
+
|
|
102
|
+
- bg-bg
|
|
103
|
+
- cs-cz
|
|
104
|
+
- da-dk
|
|
105
|
+
- de-at
|
|
106
|
+
- de-de
|
|
107
|
+
- el-cy
|
|
108
|
+
- el-gr
|
|
109
|
+
- en-gb
|
|
84
110
|
- en-us
|
|
85
111
|
- es-es
|
|
112
|
+
- et-ee
|
|
113
|
+
- fi-fi
|
|
86
114
|
- fr-fr
|
|
87
|
-
-
|
|
115
|
+
- fr-lu
|
|
116
|
+
- ga-ie
|
|
117
|
+
- hr-hr
|
|
118
|
+
- hu-hu
|
|
88
119
|
- it-it
|
|
120
|
+
- lt-lt
|
|
121
|
+
- lv-lv
|
|
122
|
+
- mt-mt
|
|
123
|
+
- nl-be
|
|
89
124
|
- nl-nl
|
|
90
125
|
- no-no
|
|
91
|
-
-
|
|
92
|
-
- en-gb
|
|
126
|
+
- pl-pl
|
|
93
127
|
- pt-pt
|
|
128
|
+
- ro-ro
|
|
129
|
+
- sk-sk
|
|
130
|
+
- sl-si
|
|
131
|
+
- sv-se
|
|
94
132
|
|
|
95
133
|
### Staging
|
|
96
|
-
This can be set to `true` or `false`. Passing `staging` in the component is the same as passing `staging={true}`.
|
|
97
134
|
|
|
98
|
-
|
|
135
|
+
This can be set to `true` or `false`. Passing `staging` in the component is the same as passing `staging={true}`.
|
|
136
|
+
|
|
137
|
+
If `true`, the staging environment will be used. If `false`, the production environment will be used. The default is `false`.
|
|
138
|
+
|
|
139
|
+
### CSS and Style Customization
|
|
140
|
+
|
|
141
|
+
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 website's style.
|
|
142
|
+
Classnames are namespaced with "taxbit-" to reduce the chance of conflict.
|
|
143
|
+
|
|
144
|
+
### Callbacks
|
|
145
|
+
|
|
146
|
+
The TaxBit React SDK provides callbacks for the following events:
|
|
147
|
+
|
|
148
|
+
- `onSubmit` - called when the user clicks the submit button
|
|
149
|
+
- `onSuccess` - called after the server responds with a successful submission
|
|
150
|
+
|
|
151
|
+
These callbacks can be passed in to the Component and used to trigger other actions in your application.
|
|
152
|
+
|
|
153
|
+
### Types
|
|
154
|
+
|
|
155
|
+
The TaxBit React SDK provides a type for the status of the most resent tax documentation submitted by the user, referred to as `ClientTaxDocumentationStatus`. The data is typed as `ClientTaxDocumentation` and can be used to determine if the user has submitted tax documentation and if it has been approved.
|
package/dist/App.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare const App: () => React.JSX.Element;
|
package/dist/basic.css
CHANGED
|
@@ -29,17 +29,23 @@ button:focus-visible {
|
|
|
29
29
|
.taxbit-page {
|
|
30
30
|
max-width: 600px;
|
|
31
31
|
padding: 12px;
|
|
32
|
-
margin-bottom: 100px;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
.taxbit-
|
|
34
|
+
.taxbit-page-header {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding-bottom: 8px;
|
|
38
|
+
border-bottom: solid 1px #E4EBF6;
|
|
39
|
+
margin-bottom: 20px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.taxbit-page-title {
|
|
43
|
+
margin: 0;
|
|
36
44
|
font-size: 1.2em;
|
|
37
45
|
line-height: 1.1;
|
|
38
46
|
font-weight: 600;
|
|
39
|
-
padding-bottom: 8px;
|
|
40
|
-
border-bottom: solid 1px #E4EBF6;
|
|
41
|
-
margin-bottom: 8px;
|
|
42
47
|
color: #12263F;
|
|
48
|
+
flex: 1 1 auto;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.taxbit-section {
|
|
@@ -57,6 +63,18 @@ button:focus-visible {
|
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
.taxbit-select-language {
|
|
67
|
+
border: 0;
|
|
68
|
+
outline: none;
|
|
69
|
+
opacity: 0.6;
|
|
70
|
+
width: 170px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.taxbit-select-language:focus {
|
|
74
|
+
border-bottom: solid 1px #E4EBF6;
|
|
75
|
+
opacity: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
60
78
|
.taxbit-row {
|
|
61
79
|
margin-bottom: 10px;
|
|
62
80
|
align-items: flex-start;
|
|
@@ -83,6 +101,8 @@ button:focus-visible {
|
|
|
83
101
|
|
|
84
102
|
.taxbit-row-actions {
|
|
85
103
|
flex: 0 0 10%;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
86
106
|
}
|
|
87
107
|
.taxbit-row-action-button {
|
|
88
108
|
font-size: .8em;
|
|
@@ -93,11 +113,11 @@ button:focus-visible {
|
|
|
93
113
|
.taxbit-label {
|
|
94
114
|
flex: 0 0 40%;
|
|
95
115
|
font-weight: 500;
|
|
96
|
-
line-height: 1.25em;
|
|
97
116
|
.taxbit-sub-label {
|
|
98
117
|
font-size: 0.8em;
|
|
99
118
|
opacity: 0.7;
|
|
100
119
|
font-weight: 400;
|
|
120
|
+
line-height: 1.25em;
|
|
101
121
|
}
|
|
102
122
|
}
|
|
103
123
|
.taxbit-input, .taxbit-select {
|
|
@@ -110,6 +130,12 @@ button:focus-visible {
|
|
|
110
130
|
color: rgb(18, 38, 63);
|
|
111
131
|
}
|
|
112
132
|
|
|
133
|
+
@media only screen and (max-width: 600px) {
|
|
134
|
+
.taxbit-input, .taxbit-select {
|
|
135
|
+
font-size: 100%;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
113
139
|
.taxbit-placeholder {
|
|
114
140
|
color: #aaa;
|
|
115
141
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Form.tsx';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from "./Title";
|
|
1
|
+
export * from './Address';
|
|
2
|
+
export * from './ErrorMessage';
|
|
3
|
+
export * from './Form';
|
|
4
|
+
export * from './InputStatus';
|
|
5
|
+
export * from './Notification';
|
|
6
|
+
export * from './Row';
|
|
7
|
+
export * from './Section';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export * from './FormUIProvider';
|
|
2
|
+
export { type TaxDocumentationErrorFile, type TaxDocumentationPropertyFile, } from './useFormUI';
|
|
3
|
+
export * from './useFormUIContext';
|
|
@@ -1,144 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonKey, ErrorKey, HintKey, NotificationKey, PromptKey, SubPromptKey, TextKey, TitleKey } from 'i18n/types';
|
|
3
|
+
import { Locale } from 'types';
|
|
4
|
+
import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
|
|
5
|
+
export type TaxDocumentationPropertyFile = {
|
|
6
|
+
[key in TaxDocumentationKey]: boolean;
|
|
6
7
|
};
|
|
7
|
-
type
|
|
8
|
-
[key in TaxDocumentationKey]
|
|
9
|
-
};
|
|
10
|
-
type FormUIRequired = {
|
|
11
|
-
[key in TaxDocumentationKey]?: boolean;
|
|
8
|
+
export type TaxDocumentationErrorFile = {
|
|
9
|
+
[key in TaxDocumentationKey]?: ErrorKey;
|
|
12
10
|
};
|
|
13
11
|
export declare const useFormUI: () => {
|
|
14
12
|
fields: TaxDocumentation;
|
|
13
|
+
setFields: import("react").Dispatch<import("react").SetStateAction<TaxDocumentation>>;
|
|
15
14
|
setValue: (key: TaxDocumentationKey, value: string | undefined) => void;
|
|
16
|
-
errors: FormUIErrors;
|
|
17
|
-
notifications: Notifications;
|
|
18
15
|
isErrorFree: boolean;
|
|
19
16
|
showErrors: boolean;
|
|
20
17
|
exposeErrors: () => void;
|
|
21
18
|
hideErrors: () => void;
|
|
22
|
-
requiredFields: FormUIRequired;
|
|
23
19
|
getLocalButton: (key: ButtonKey) => string;
|
|
24
20
|
getLocalCaProvince: (key: string | undefined) => string;
|
|
25
21
|
getLocalCountry: (key: string | undefined) => string;
|
|
26
22
|
getLocalError: (key: ErrorKey) => string;
|
|
27
23
|
getLocalHint: (key: TaxDocumentationKey) => string | undefined;
|
|
24
|
+
getHintKey: (key: TaxDocumentationKey) => HintKey;
|
|
25
|
+
getLocalLocale: (key: Locale) => string;
|
|
28
26
|
getLocalNotification: (key: NotificationKey) => string;
|
|
29
27
|
getLocalOption: (key: string | undefined) => string | undefined;
|
|
30
28
|
getLocalPrompt: (key: string) => string;
|
|
29
|
+
getPromptKey: (key: string) => PromptKey;
|
|
31
30
|
getLocalSubPrompt: (key: TaxDocumentationKey) => string;
|
|
31
|
+
getSubPromptKey: (key: TaxDocumentationKey) => SubPromptKey;
|
|
32
32
|
getLocalText: (key: TextKey) => string;
|
|
33
33
|
getLocalTitle: (key: TitleKey) => string;
|
|
34
34
|
getLocalSubTitle: (key: string) => string;
|
|
35
35
|
getLocalUsState: (key: string | undefined) => string;
|
|
36
36
|
getLocalMonth: (key: string | undefined) => string;
|
|
37
37
|
getRequiredLocalPrompt: (key: TaxDocumentationKey) => string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
iAmExemptFromFatcaReporting: boolean;
|
|
44
|
-
iAmNotSubjectToBackupWithholding: boolean;
|
|
45
|
-
iAuthorizeWithholdingAgent: boolean;
|
|
46
|
-
iCertifyToAll: boolean;
|
|
47
|
-
iConfirmIncomeIsNonUs: boolean;
|
|
48
|
-
iConfirmTheBeneficialOwnerIsExempt: boolean;
|
|
49
|
-
iConfirmTheEntityIsNotAUsPerson: boolean;
|
|
50
|
-
iConfirmTheEntityIsTheBeneficialOwner: boolean;
|
|
51
|
-
iConfirmTheTaxIdIsCorrect: boolean;
|
|
52
|
-
iHaveLegalCapacityToSign: boolean;
|
|
53
|
-
regardedOwnerUsPerson: boolean;
|
|
54
|
-
signature: boolean;
|
|
55
|
-
accountHolderAddressCity: boolean;
|
|
56
|
-
accountHolderAddressCountry: boolean;
|
|
57
|
-
accountHolderAddressState: boolean;
|
|
58
|
-
accountHolderAddressStreet2: boolean;
|
|
59
|
-
accountHolderAddressStreet: boolean;
|
|
60
|
-
accountHolderAddressZip: boolean;
|
|
61
|
-
accountHolderCityOfBirth: boolean;
|
|
62
|
-
accountHolderCountryOfBirth: boolean;
|
|
63
|
-
accountHolderCountryOfCitizenship: boolean;
|
|
64
|
-
accountHolderDateOfBirth: boolean;
|
|
65
|
-
accountHolderDbaName: boolean;
|
|
66
|
-
accountHolderMailingAddressCity: boolean;
|
|
67
|
-
accountHolderMailingAddressCountry: boolean;
|
|
68
|
-
accountHolderMailingAddressIsDifferent: boolean;
|
|
69
|
-
accountHolderMailingAddressState: boolean;
|
|
70
|
-
accountHolderMailingAddressStreet2: boolean;
|
|
71
|
-
accountHolderMailingAddressStreet: boolean;
|
|
72
|
-
accountHolderMailingAddressZip: boolean;
|
|
73
|
-
accountHolderName: boolean;
|
|
74
|
-
accountHolderFinancialAccountIdentifier: boolean;
|
|
75
|
-
accountHolderFinancialAccountName: boolean;
|
|
76
|
-
accountHolderFinancialAccountNameSameAsAccountHolderName: boolean;
|
|
77
|
-
accountHolderForeignTin: boolean;
|
|
78
|
-
accountHolderForeignTinIsNotRequired: boolean;
|
|
79
|
-
accountHolderTaxResidenceCountry1: boolean;
|
|
80
|
-
accountHolderTaxResidenceForeignTin1: boolean;
|
|
81
|
-
accountHolderTaxResidenceForeignTin1IsNotRequired: boolean;
|
|
82
|
-
accountHolderTaxResidenceCountry2: boolean;
|
|
83
|
-
accountHolderTaxResidenceForeignTin2: boolean;
|
|
84
|
-
accountHolderTaxResidenceForeignTin2IsNotRequired: boolean;
|
|
85
|
-
accountHolderTaxResidenceCountry3: boolean;
|
|
86
|
-
accountHolderTaxResidenceForeignTin3: boolean;
|
|
87
|
-
accountHolderTaxResidenceForeignTin3IsNotRequired: boolean;
|
|
88
|
-
accountHolderTaxResidenceCountry4: boolean;
|
|
89
|
-
accountHolderTaxResidenceForeignTin4: boolean;
|
|
90
|
-
accountHolderTaxResidenceForeignTin4IsNotRequired: boolean;
|
|
91
|
-
accountHolderTaxResidenceCountry5: boolean;
|
|
92
|
-
accountHolderTaxResidenceForeignTin5: boolean;
|
|
93
|
-
accountHolderTaxResidenceForeignTin5IsNotRequired: boolean;
|
|
94
|
-
accountHolderShowTaxResidence2: boolean;
|
|
95
|
-
accountHolderShowTaxResidence3: boolean;
|
|
96
|
-
accountHolderShowTaxResidence4: boolean;
|
|
97
|
-
accountHolderShowTaxResidence5: boolean;
|
|
98
|
-
accountHolderUsTin: boolean;
|
|
99
|
-
accountHolderVatIdentificationNumber: boolean;
|
|
100
|
-
accountHolderVatIdentificationNumberIsNotRequired: boolean;
|
|
101
|
-
accountHolderVatCountry: boolean;
|
|
102
|
-
accountHolderIsIndividual: boolean;
|
|
103
|
-
accountHolderIsEuResident: boolean;
|
|
104
|
-
accountHolderUsPerson: boolean;
|
|
105
|
-
accountHolderUsAccountType: boolean;
|
|
106
|
-
accountHolderUsSmllcElection: boolean;
|
|
107
|
-
accountHolderUsLlcClassification: boolean;
|
|
108
|
-
accountHolderUsOtherClassification: boolean;
|
|
109
|
-
accountHolderUsTrustEstateEin: boolean;
|
|
110
|
-
accountHolderForeignAccountType: boolean;
|
|
111
|
-
accountHolderForeignTrustClassification: boolean;
|
|
112
|
-
accountHolderForeignOtherClassification: boolean;
|
|
113
|
-
regardedOwnerAddressCity: boolean;
|
|
114
|
-
regardedOwnerAddressCountry: boolean;
|
|
115
|
-
regardedOwnerAddressState: boolean;
|
|
116
|
-
regardedOwnerAddressStreet2: boolean;
|
|
117
|
-
regardedOwnerAddressStreet: boolean;
|
|
118
|
-
regardedOwnerAddressZip: boolean;
|
|
119
|
-
regardedOwnerCountryOfCitizenship: boolean;
|
|
120
|
-
regardedOwnerDateOfBirth: boolean;
|
|
121
|
-
regardedOwnerDbaName: boolean;
|
|
122
|
-
regardedOwnerMailingAddressCity: boolean;
|
|
123
|
-
regardedOwnerMailingAddressCountry: boolean;
|
|
124
|
-
regardedOwnerMailingAddressIsDifferent: boolean;
|
|
125
|
-
regardedOwnerMailingAddressState: boolean;
|
|
126
|
-
regardedOwnerMailingAddressStreet2: boolean;
|
|
127
|
-
regardedOwnerMailingAddressStreet: boolean;
|
|
128
|
-
regardedOwnerMailingAddressZip: boolean;
|
|
129
|
-
regardedOwnerName: boolean;
|
|
130
|
-
regardedOwnerUsAccountType: boolean;
|
|
131
|
-
regardedOwnerUsLlcClassification: boolean;
|
|
132
|
-
regardedOwnerUsOtherClassification: boolean;
|
|
133
|
-
regardedOwnerUsTrustEstateEin: boolean;
|
|
134
|
-
regardedOwnerForeignAccountType: boolean;
|
|
135
|
-
regardedOwnerForeignTrustClassification: boolean;
|
|
136
|
-
regardedOwnerForeignOtherClassification: boolean;
|
|
137
|
-
regardedOwnerForeignTin: boolean;
|
|
138
|
-
regardedOwnerForeignTinIsNotRequired: boolean;
|
|
139
|
-
regardedOwnerUsTin: boolean;
|
|
140
|
-
};
|
|
38
|
+
notifiedFields: import("../../validations/getNotifiedFields.ts").Notifications;
|
|
39
|
+
invalidFields: TaxDocumentationErrorFile;
|
|
40
|
+
requiredFields: TaxDocumentationPropertyFile;
|
|
41
|
+
submittableFields: TaxDocumentation;
|
|
42
|
+
visibleFields: TaxDocumentationPropertyFile;
|
|
141
43
|
hideField: (key: TaxDocumentationKey) => void;
|
|
142
44
|
showField: (key: TaxDocumentationKey) => void;
|
|
143
45
|
};
|
|
144
|
-
export {};
|