@taxbit/react-sdk 0.0.16 → 0.1.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 (124) hide show
  1. package/README.md +225 -4
  2. package/dist/basic.css +32 -6
  3. package/dist/components/Page/Page.d.ts +3 -1
  4. package/dist/components/index.d.ts +0 -1
  5. package/dist/contexts/FormUI/useFormUI.d.ts +3 -2
  6. package/dist/contexts/FormUI/useFormUIContext.d.ts +4 -8
  7. package/dist/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +1 -2
  8. package/dist/contexts/TaxDocumentation/useTaxDocumentation.d.ts +3 -3
  9. package/dist/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +10 -12
  10. package/dist/entry/index.d.ts +2 -3
  11. package/dist/i18n/i18n.d.ts +1 -1
  12. package/dist/i18n/index.d.ts +1 -2
  13. package/dist/i18n/locales/bg-bg.d.ts +2 -0
  14. package/dist/i18n/locales/cs-cz.d.ts +2 -0
  15. package/dist/i18n/locales/el-gr.d.ts +2 -0
  16. package/dist/i18n/locales/et-ee.d.ts +2 -0
  17. package/dist/i18n/locales/hu-hu.d.ts +2 -0
  18. package/dist/i18n/locales/index.d.ts +9 -0
  19. package/dist/i18n/locales/mt-mt.d.ts +2 -0
  20. package/dist/i18n/locales/ro-ro.d.ts +2 -0
  21. package/dist/i18n/locales/sk-sk.d.ts +2 -0
  22. package/dist/i18n/locales/sl-si.d.ts +2 -0
  23. package/dist/i18n/types/LocalizationKey.d.ts +3 -2
  24. package/dist/i18n/types/PropertyFile.d.ts +6 -2
  25. package/dist/i18n/types/index.d.ts +0 -1
  26. package/dist/i18n/utils/getText.d.ts +16 -15
  27. package/dist/index.css +4 -0
  28. package/dist/inline.css +33 -6
  29. package/dist/lookups/dayOptions.d.ts +1 -1
  30. package/dist/lookups/index.d.ts +3 -2
  31. package/dist/lookups/localeOptions.d.ts +4 -0
  32. package/dist/minimal.css +0 -1
  33. package/dist/taxbit-react-sdk.es.js +8541 -3165
  34. package/dist/taxbit-react-sdk.umd.js +10 -10
  35. package/dist/types/Locale.d.ts +1 -0
  36. package/dist/types/TaxDocumentation.d.ts +0 -1
  37. package/dist/types/external/ComprehensiveTaxDocumentation.d.ts +13 -6
  38. package/dist/types/index.d.ts +1 -0
  39. package/dist/ui/HideShowButton/HideShowButton.d.ts +5 -0
  40. package/dist/ui/HideShowButton/index.d.ts +1 -0
  41. package/dist/ui/MaskedContent/MaskedContent.d.ts +4 -0
  42. package/dist/ui/MaskedContent/index.d.ts +1 -0
  43. package/dist/ui/MaskedInput/MaskedInput.d.ts +10 -0
  44. package/dist/ui/MaskedInput/index.d.ts +1 -0
  45. package/dist/ui/Password/Password.d.ts +11 -0
  46. package/dist/ui/Password/index.d.ts +1 -0
  47. package/dist/ui/TextInput/TextInput.d.ts +2 -1
  48. package/dist/ui/index.d.ts +2 -0
  49. package/dist/utils/getHintKeyMap.d.ts +0 -1
  50. package/dist/utils/getMonthlyDayCount.d.ts +1 -0
  51. package/dist/utils/getPromptKeyMap.d.ts +0 -1
  52. package/dist/utils/getRequiredFields.d.ts +103 -0
  53. package/dist/utils/getValidationMessages.d.ts +104 -0
  54. package/dist/utils/index.d.ts +2 -1
  55. package/dist/utils/transformOutbound/convertYesNoToBoolean.d.ts +2 -0
  56. package/dist/utils/transformOutbound/transformOutbound.d.ts +3 -0
  57. package/dist/utils/transformOutbound/transformToOutboundAccoutHolder.d.ts +3 -0
  58. package/dist/utils/transformOutbound/transformToOutboundAddress.d.ts +6 -0
  59. package/dist/utils/transformOutbound/transformToOutboundRegardedOwner.d.ts +3 -0
  60. package/dist/utils/transformOutbound/transformToOutboundTaxResidenceFields.d.ts +4 -0
  61. package/dist/validations/index.d.ts +1 -0
  62. package/dist/validations/requiredFields.d.ts +7 -0
  63. package/dist/widgets/TaxBitForm/TaxBitDAC7Form.d.ts +1 -1
  64. package/dist/widgets/TaxBitForm/TaxBitForm.d.ts +1 -2
  65. package/dist/wizard/LanguageSelector/LanguageSelector.d.ts +2 -0
  66. package/dist/wizard/LanguageSelector/index.d.ts +1 -0
  67. package/dist/{paths → wizard}/RowInput/CheckBoxRow/CheckBoxRow.d.ts +2 -2
  68. package/dist/wizard/RowInput/MaskedInputRow/MaskedInputRow.d.ts +10 -0
  69. package/dist/wizard/RowInput/MaskedInputRow/index.d.ts +1 -0
  70. package/dist/{paths → wizard}/RowInput/TextInputRow/TextInputRow.d.ts +3 -1
  71. package/dist/{paths → wizard}/RowInput/index.d.ts +1 -1
  72. package/dist/{paths → wizard}/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +1 -2
  73. package/dist/{paths → wizard}/TaxBitFormUI/TaxBitFormUI.d.ts +1 -2
  74. package/package.json +2 -1
  75. package/dist/components/Title/Title.d.ts +0 -5
  76. package/dist/components/Title/index.d.ts +0 -1
  77. package/dist/i18n/types/Locale.d.ts +0 -1
  78. package/dist/paths/FinancialAccountInput/FinancialAccountInput.d.ts +0 -2
  79. package/dist/paths/FinancialAccountInput/index.d.ts +0 -1
  80. package/dist/paths/RowInput/ErrorRow/ErrorRow.d.ts +0 -2
  81. package/dist/paths/RowInput/ErrorRow/index.d.ts +0 -1
  82. package/dist/paths/VatInput/VatInput.d.ts +0 -8
  83. package/dist/paths/VatInput/index.d.ts +0 -1
  84. package/dist/utils/transformOutbound.d.ts +0 -3
  85. /package/dist/{paths → wizard}/AddressInput/AddressInput.d.ts +0 -0
  86. /package/dist/{paths → wizard}/AddressInput/index.d.ts +0 -0
  87. /package/dist/{paths → wizard}/PlaceOfBirthInput/PlaceOfBirthInput.d.ts +0 -0
  88. /package/dist/{paths → wizard}/PlaceOfBirthInput/index.d.ts +0 -0
  89. /package/dist/{paths → wizard}/ResidenceInput/ResidenceInput.d.ts +0 -0
  90. /package/dist/{paths → wizard}/ResidenceInput/index.d.ts +0 -0
  91. /package/dist/{paths → wizard}/RowInput/CheckBoxRow/index.d.ts +0 -0
  92. /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/DateOfBirthRow.d.ts +0 -0
  93. /package/dist/{paths → wizard}/RowInput/DateOfBirthRow/index.d.ts +0 -0
  94. /package/dist/{paths → wizard}/RowInput/RadioButtonRow/RadioButtonRow.d.ts +0 -0
  95. /package/dist/{paths → wizard}/RowInput/RadioButtonRow/index.d.ts +0 -0
  96. /package/dist/{paths → wizard}/RowInput/SelectRow/SelectRow.d.ts +0 -0
  97. /package/dist/{paths → wizard}/RowInput/SelectRow/index.d.ts +0 -0
  98. /package/dist/{paths → wizard}/RowInput/TextInputRow/index.d.ts +0 -0
  99. /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/ToggleButtonRow.d.ts +0 -0
  100. /package/dist/{paths → wizard}/RowInput/ToggleButtonRow/index.d.ts +0 -0
  101. /package/dist/{paths → wizard}/RowInput/VisibleRow/VisibleRow.d.ts +0 -0
  102. /package/dist/{paths → wizard}/RowInput/VisibleRow/index.d.ts +0 -0
  103. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/AccountHolderClassification.d.ts +0 -0
  104. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderClassification/index.d.ts +0 -0
  105. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/AccountHolderContact.d.ts +0 -0
  106. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderContact/index.d.ts +0 -0
  107. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/AccountHolderTax.d.ts +0 -0
  108. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTax/index.d.ts +0 -0
  109. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/AccountHolderTaxClarification.d.ts +0 -0
  110. /package/dist/{paths → wizard}/TaxBitFormUI/AccountHolderTaxClarification/index.d.ts +0 -0
  111. /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/Exemptions.d.ts +0 -0
  112. /package/dist/{paths → wizard}/TaxBitFormUI/Exemptions/index.d.ts +0 -0
  113. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/RegardedOwnerClassification.d.ts +0 -0
  114. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerClassification/index.d.ts +0 -0
  115. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/RegardedOwnerContact.d.ts +0 -0
  116. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerContact/index.d.ts +0 -0
  117. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/RegardedOwnerTax.d.ts +0 -0
  118. /package/dist/{paths → wizard}/TaxBitFormUI/RegardedOwnerTax/index.d.ts +0 -0
  119. /package/dist/{paths → wizard}/TaxBitFormUI/Summary/Recap.d.ts +0 -0
  120. /package/dist/{paths → wizard}/TaxBitFormUI/Summary/Summary.d.ts +0 -0
  121. /package/dist/{paths → wizard}/TaxBitFormUI/Summary/index.d.ts +0 -0
  122. /package/dist/{paths → wizard}/TaxBitFormUI/index.d.ts +0 -0
  123. /package/dist/{paths → wizard}/TaxBitFormUI/steps.d.ts +0 -0
  124. /package/dist/{paths → wizard}/index.d.ts +0 -0
package/README.md CHANGED
@@ -76,23 +76,244 @@ Which is just a shortcut for this component...
76
76
  />
77
77
  ```
78
78
 
79
+ 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...
80
+ ```typescript jsx
81
+ <TaxBitDAC7FormUI
82
+ data={exampleData}
83
+ onSubmit={(data: unknown) => alert(JSON.stringify(data))}
84
+ />
85
+ ```
86
+
79
87
  ### Bearer Token
80
88
  This will be generated from the TaxBit API and passed in as a prop to the component.
81
89
 
82
90
  ### Language
83
91
  This can be set to any of the following:
92
+ - bg-bg
93
+ - cs-cz
94
+ - de-de
95
+ - el-gr
96
+ - en-gb
84
97
  - en-us
85
98
  - es-es
99
+ - et-ee
86
100
  - fr-fr
87
- - de-de
101
+ - hu-hu
88
102
  - it-it
103
+ - mt-mt
89
104
  - nl-nl
90
105
  - no-no
91
- - sv-se
92
- - en-gb
93
106
  - pt-pt
107
+ - ro-ro
108
+ - sk-sk
109
+ - sl-si
110
+ - sv-se
94
111
 
95
112
  ### Staging
96
113
  This can be set to `true` or `false`. Passing `staging` in the component is the same as passing `staging={true}`.
97
114
 
98
- If `true`, the staging environment will be used. If `false`, the production environment will be used. The default is `false`.
115
+ If `true`, the staging environment will be used. If `false`, the production environment will be used. The default is `false`.
116
+
117
+ ### CSS and Style Customization
118
+ 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.
119
+ The structure below is an example of the HTML that that could be produced by a rendered React SDK Widget component.
120
+
121
+ ```html
122
+ <form class="taxbit-page">
123
+ <header class="taxbit-page-header">
124
+ <h3 class="taxbit-page-title">Title</h3>
125
+ </header>
126
+ <main class="taxbit-page-main">
127
+ <div class="taxbit-row">
128
+ <div class="taxbit-label">Are you an individual?*</div>
129
+ <div class="taxbit-row-content">
130
+ <div class="taxbit-row-value">
131
+ <div class="taxbit-input-status">
132
+ <div class="taxbit-radio-buttons">
133
+ <div class="taxbit-radio-button">
134
+ <input type="radio" name="accountHolderIsIndividual" id="accountHolderIsIndividual-yes" value="yes" checked="">
135
+ <label for="accountHolderIsIndividual-yes">Yes</label>
136
+ </div>
137
+ <div class="taxbit-radio-button">
138
+ <input type="radio" name="accountHolderIsIndividual" id="accountHolderIsIndividual-no" value="no">
139
+ <label for="accountHolderIsIndividual-no">No</label>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ <div class="taxbit-row">
147
+ <div class="taxbit-label">Name of Individual*</div>
148
+ <div class="taxbit-row-content">
149
+ <div class="taxbit-row-value">
150
+ <div class="taxbit-input-status">
151
+ <input type="text" name="accountHolderName" class="taxbit-input" value="Mark">
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ <div class="taxbit-row">
157
+ <div class="taxbit-label">Date of Birth*</div>
158
+ <div class="taxbit-row-content">
159
+ <div class="taxbit-row-value">
160
+ <div class="taxbit-input-status">
161
+ <div class="taxbit-row-value">
162
+ <select name="accountHolderDateOfBirth" class="taxbit-select taxbit-select-month">
163
+ <option value="" disabled="" hidden="">Month</option>
164
+ <option value="01">January</option>
165
+ <option value="02">February</option>
166
+ <option value="03">March</option>
167
+ <option value="04">April</option>
168
+ <option value="05">May</option>
169
+ <option value="06">June</option>
170
+ <option value="07">July</option>
171
+ <option value="08">August</option>
172
+ <option value="09">September</option>
173
+ <option value="10">October</option>
174
+ <option value="11">November</option>
175
+ <option value="12">December</option>
176
+ </select>
177
+ <select name="accountHolderDateOfBirth" class="taxbit-select taxbit-select-day taxbit-placeholder">
178
+ <option value="" disabled="" hidden="">Day</option>
179
+ <option value="01">1</option>
180
+ <option value="02">2</option>
181
+ <option value="03">3</option>
182
+ <option value="04">4</option>
183
+ <option value="05">5</option>
184
+ <option value="06">6</option>
185
+ <option value="07">7</option>
186
+ <option value="08">8</option>
187
+ <option value="09">9</option>
188
+ <option value="10">10</option>
189
+ <option value="11">11</option>
190
+ <option value="12">12</option>
191
+ <option value="13">13</option>
192
+ <option value="14">14</option>
193
+ <option value="15">15</option>
194
+ <option value="16">16</option>
195
+ <option value="17">17</option>
196
+ <option value="18">18</option>
197
+ <option value="19">19</option>
198
+ <option value="21">21</option>
199
+ <option value="22">22</option>
200
+ <option value="23">23</option>
201
+ <option value="24">24</option>
202
+ <option value="25">25</option>
203
+ <option value="26">26</option>
204
+ <option value="27">27</option>
205
+ <option value="28">28</option>
206
+ <option value="29">29</option>
207
+ <option value="30">30</option>
208
+ <option value="31">31</option>
209
+ </select>
210
+ <select name="accountHolderDateOfBirth" class="taxbit-select taxbit-select-year taxbit-placeholder">
211
+ <option value="" disabled="" hidden="">Year</option>
212
+ <option value="2023">2023</option>
213
+ <option value="2022">2022</option>
214
+ <option value="2021">2021</option>
215
+ <option value="2020">2020</option>
216
+ <option value="2019">2019</option>
217
+ <option value="2018">2018</option>
218
+ <option value="2017">2017</option>
219
+ <option value="2016">2016</option>
220
+ <option value="2015">2015</option>
221
+ <option value="2014">2014</option>
222
+ <option value="2013">2013</option>
223
+ <option value="2012">2012</option>
224
+ <option value="2011">2011</option>
225
+ <option value="2010">2010</option>
226
+ <option value="2009">2009</option>
227
+ <option value="2008">2008</option>
228
+ <option value="2007">2007</option>
229
+ <option value="2006">2006</option>
230
+ <option value="2005">2005</option>
231
+ <option value="2004">2004</option>
232
+ <option value="2003">2003</option>
233
+ <option value="2002">2002</option>
234
+ <option value="2001">2001</option>
235
+ <option value="2000">2000</option>
236
+ </select>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ </div>
241
+ </div>
242
+ <div class="taxbit-section">
243
+ <div class="taxbit-row">
244
+ <div class="taxbit-label">VAT Member State*</div>
245
+ <div class="taxbit-row-content">
246
+ <div class="taxbit-row-value">
247
+ <div class="taxbit-input-status">
248
+ <select name="accountHolderVatCountry" class="taxbit-select">
249
+ <option value="">
250
+
251
+ </option>
252
+ <option value="AT">Austria</option>
253
+ <option value="BE">Belgium</option>
254
+ <option value="BG">Bulgaria</option>
255
+ <option value="HR">Croatia</option>
256
+ <option value="CY">Cyprus</option>
257
+ <option value="CZ">Czechia</option>
258
+ <option value="DK">Denmark</option>
259
+ <option value="EE">Estonia</option>
260
+ <option value="FI">Finland</option>
261
+ <option value="FR">France</option>
262
+ <option value="DE">Germany</option>
263
+ <option value="GR">Greece</option>
264
+ <option value="HU">Hungary</option>
265
+ <option value="IE">Ireland</option>
266
+ <option value="IT">Italy</option>
267
+ <option value="LV">Latvia</option>
268
+ <option value="LT">Lithuania</option>
269
+ <option value="LU">Luxembourg</option>
270
+ <option value="MT">Malta</option>
271
+ <option value="NL">Netherlands</option>
272
+ <option value="PL">Poland</option>
273
+ <option value="PT">Portugal</option>
274
+ <option value="RO">Romania</option>
275
+ <option value="SK">Slovakia</option>
276
+ <option value="SI">Slovenia</option>
277
+ <option value="ES">Spain</option>
278
+ <option value="SE">Sweden</option>
279
+ </select>
280
+ </div>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ <div class="taxbit-row">
285
+ <div class="taxbit-label">VAT Identification Number*<div class="taxbit-sub-label">Unique identifier for VAT-registered businesses or individuals.</div>
286
+ </div>
287
+ <div class="taxbit-row-content">
288
+ <div class="taxbit-row-value">
289
+ <div class="taxbit-input-status">
290
+ <input type="text" name="accountHolderVatIdentificationNumber" class="taxbit-input" value="">
291
+ </div>
292
+ </div>
293
+ </div>
294
+ </div>
295
+ <div class="taxbit-row">
296
+ <div class="taxbit-label"></div>
297
+ <div class="taxbit-row-content">
298
+ <div class="taxbit-row-value">
299
+ <div class="taxbit-input-status">
300
+ <div class="taxbit-checkBox-label">
301
+ <input type="checkbox" id="accountHolderVatIdentificationNumberIsNotRequired" name="accountHolderVatIdentificationNumberIsNotRequired" class="taxbit-check-box">
302
+ <label for="accountHolderVatIdentificationNumberIsNotRequired">VAT is not required or has not been issued</label>
303
+ </div>
304
+ </div>
305
+ </div>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </main>
310
+ <footer class="taxbit-step-actions">
311
+ <div class="taxbit-secondary-actions">
312
+ <button tabindex="-1">Back</button>
313
+ </div>
314
+ <div class="taxbit-primary-actions">
315
+ <button>Next</button>
316
+ </div>
317
+ </footer>
318
+ </form>
319
+ ```
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-title {
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: 100px;
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
  }
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
2
  type PageProps = {
3
+ title?: string;
3
4
  children: React.ReactNode;
5
+ actions?: React.ReactNode;
4
6
  };
5
- export declare const Page: ({ children }: PageProps) => React.JSX.Element;
7
+ export declare const Page: ({ children, title, actions }: PageProps) => React.JSX.Element;
6
8
  export {};
@@ -5,4 +5,3 @@ export * from "./InputStatus";
5
5
  export * from "./Page";
6
6
  export * from "./Row";
7
7
  export * from "./Section";
8
- export * from "./Title";
@@ -1,5 +1,6 @@
1
1
  import { ButtonKey, ErrorKey, NotificationKey, TextKey, TitleKey } from "i18n/types";
2
2
  import { TaxDocumentation, TaxDocumentationKey } from "types/TaxDocumentation";
3
+ import { Locale } from "types";
3
4
  import { Notifications } from "../../utils/getNotifications";
4
5
  export type FormUIFields = {
5
6
  [key in TaxDocumentationKey]?: string | undefined;
@@ -19,12 +20,13 @@ export declare const useFormUI: () => {
19
20
  showErrors: boolean;
20
21
  exposeErrors: () => void;
21
22
  hideErrors: () => void;
22
- requiredFields: FormUIRequired;
23
+ required: FormUIRequired;
23
24
  getLocalButton: (key: ButtonKey) => string;
24
25
  getLocalCaProvince: (key: string | undefined) => string;
25
26
  getLocalCountry: (key: string | undefined) => string;
26
27
  getLocalError: (key: ErrorKey) => string;
27
28
  getLocalHint: (key: TaxDocumentationKey) => string | undefined;
29
+ getLocalLocale: (key: Locale) => string;
28
30
  getLocalNotification: (key: NotificationKey) => string;
29
31
  getLocalOption: (key: string | undefined) => string | undefined;
30
32
  getLocalPrompt: (key: string) => string;
@@ -73,7 +75,6 @@ export declare const useFormUI: () => {
73
75
  accountHolderName: boolean;
74
76
  accountHolderFinancialAccountIdentifier: boolean;
75
77
  accountHolderFinancialAccountName: boolean;
76
- accountHolderFinancialAccountNameSameAsAccountHolderName: boolean;
77
78
  accountHolderForeignTin: boolean;
78
79
  accountHolderForeignTinIsNotRequired: boolean;
79
80
  accountHolderTaxResidenceCountry1: boolean;
@@ -40,7 +40,6 @@ export declare const useFormUIContext: () => {
40
40
  accountHolderName: import("../../i18n/types").ErrorKey;
41
41
  accountHolderFinancialAccountIdentifier: import("../../i18n/types").ErrorKey;
42
42
  accountHolderFinancialAccountName: import("../../i18n/types").ErrorKey;
43
- accountHolderFinancialAccountNameSameAsAccountHolderName: import("../../i18n/types").ErrorKey;
44
43
  accountHolderForeignTin: import("../../i18n/types").ErrorKey;
45
44
  accountHolderForeignTinIsNotRequired: import("../../i18n/types").ErrorKey;
46
45
  accountHolderTaxResidenceCountry1: import("../../i18n/types").ErrorKey;
@@ -110,7 +109,7 @@ export declare const useFormUIContext: () => {
110
109
  showErrors: boolean;
111
110
  exposeErrors: () => void;
112
111
  hideErrors: () => void;
113
- requiredFields: {
112
+ required: {
114
113
  exemptPayeeCode?: boolean | undefined;
115
114
  exemptFatcaCode?: boolean | undefined;
116
115
  iAcknowlegeESignIsOk?: boolean | undefined;
@@ -148,7 +147,6 @@ export declare const useFormUIContext: () => {
148
147
  accountHolderName?: boolean | undefined;
149
148
  accountHolderFinancialAccountIdentifier?: boolean | undefined;
150
149
  accountHolderFinancialAccountName?: boolean | undefined;
151
- accountHolderFinancialAccountNameSameAsAccountHolderName?: boolean | undefined;
152
150
  accountHolderForeignTin?: boolean | undefined;
153
151
  accountHolderForeignTinIsNotRequired?: boolean | undefined;
154
152
  accountHolderTaxResidenceCountry1?: boolean | undefined;
@@ -218,6 +216,7 @@ export declare const useFormUIContext: () => {
218
216
  getLocalCountry: (key: string | undefined) => string;
219
217
  getLocalError: (key: import("../../i18n/types").ErrorKey) => string;
220
218
  getLocalHint: (key: keyof import("../../types").AccountHolderContactData | keyof import("../../types").AccountHolderTaxData | keyof import("../../types").AccountHolderClassificationData | keyof import("../../types").RegardedOwnerContactData | keyof import("../../types").RegardedOwnerClassificationData | keyof import("../../types").RegardedOwnerTaxData | keyof import("../../types").SummaryData) => string | undefined;
219
+ getLocalLocale: (key: import("../../types").Locale) => string;
221
220
  getLocalNotification: (key: "vatUnexpectedFormat") => string;
222
221
  getLocalOption: (key: string | undefined) => string | undefined;
223
222
  getLocalPrompt: (key: string) => string;
@@ -266,7 +265,6 @@ export declare const useFormUIContext: () => {
266
265
  accountHolderName: boolean;
267
266
  accountHolderFinancialAccountIdentifier: boolean;
268
267
  accountHolderFinancialAccountName: boolean;
269
- accountHolderFinancialAccountNameSameAsAccountHolderName: boolean;
270
268
  accountHolderForeignTin: boolean;
271
269
  accountHolderForeignTinIsNotRequired: boolean;
272
270
  accountHolderTaxResidenceCountry1: boolean;
@@ -374,7 +372,6 @@ export declare const useFormUIContext: () => {
374
372
  accountHolderName: import("../../i18n/types").ErrorKey;
375
373
  accountHolderFinancialAccountIdentifier: import("../../i18n/types").ErrorKey;
376
374
  accountHolderFinancialAccountName: import("../../i18n/types").ErrorKey;
377
- accountHolderFinancialAccountNameSameAsAccountHolderName: import("../../i18n/types").ErrorKey;
378
375
  accountHolderForeignTin: import("../../i18n/types").ErrorKey;
379
376
  accountHolderForeignTinIsNotRequired: import("../../i18n/types").ErrorKey;
380
377
  accountHolderTaxResidenceCountry1: import("../../i18n/types").ErrorKey;
@@ -444,7 +441,7 @@ export declare const useFormUIContext: () => {
444
441
  showErrors: boolean;
445
442
  exposeErrors: () => void;
446
443
  hideErrors: () => void;
447
- requiredFields: {
444
+ required: {
448
445
  exemptPayeeCode?: boolean | undefined;
449
446
  exemptFatcaCode?: boolean | undefined;
450
447
  iAcknowlegeESignIsOk?: boolean | undefined;
@@ -482,7 +479,6 @@ export declare const useFormUIContext: () => {
482
479
  accountHolderName?: boolean | undefined;
483
480
  accountHolderFinancialAccountIdentifier?: boolean | undefined;
484
481
  accountHolderFinancialAccountName?: boolean | undefined;
485
- accountHolderFinancialAccountNameSameAsAccountHolderName?: boolean | undefined;
486
482
  accountHolderForeignTin?: boolean | undefined;
487
483
  accountHolderForeignTinIsNotRequired?: boolean | undefined;
488
484
  accountHolderTaxResidenceCountry1?: boolean | undefined;
@@ -552,6 +548,7 @@ export declare const useFormUIContext: () => {
552
548
  getLocalCountry: (key: string | undefined) => string;
553
549
  getLocalError: (key: import("../../i18n/types").ErrorKey) => string;
554
550
  getLocalHint: (key: keyof import("../../types").AccountHolderContactData | keyof import("../../types").AccountHolderTaxData | keyof import("../../types").AccountHolderClassificationData | keyof import("../../types").RegardedOwnerContactData | keyof import("../../types").RegardedOwnerClassificationData | keyof import("../../types").RegardedOwnerTaxData | keyof import("../../types").SummaryData) => string | undefined;
551
+ getLocalLocale: (key: import("../../types").Locale) => string;
555
552
  getLocalNotification: (key: "vatUnexpectedFormat") => string;
556
553
  getLocalOption: (key: string | undefined) => string | undefined;
557
554
  getLocalPrompt: (key: string) => string;
@@ -600,7 +597,6 @@ export declare const useFormUIContext: () => {
600
597
  accountHolderName: boolean;
601
598
  accountHolderFinancialAccountIdentifier: boolean;
602
599
  accountHolderFinancialAccountName: boolean;
603
- accountHolderFinancialAccountNameSameAsAccountHolderName: boolean;
604
600
  accountHolderForeignTin: boolean;
605
601
  accountHolderForeignTinIsNotRequired: boolean;
606
602
  accountHolderTaxResidenceCountry1: boolean;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import type { Locale } from "../../i18n";
3
- import type { TaxForm, TaxDocumentation } from "../../types";
2
+ import type { Locale, TaxForm, TaxDocumentation } from "../../types";
4
3
  import { ClientTaxDocumentation } from "../../types/external";
5
4
  type TaxDocumentationProviderProps = {
6
5
  data?: ClientTaxDocumentation;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { TaxForm, TaxDocumentation } from "types";
3
- import { Locale } from "i18n";
3
+ import { Locale } from "types";
4
4
  import { ClientTaxDocumentation } from "../../types/external";
5
5
  type InputStep = "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
6
6
  type UseTaxDocumentationProps = {
@@ -26,8 +26,8 @@ export declare const useTaxDocumentation: ({ data: initialData, onSubmit, langua
26
26
  goToNext: (data: TaxDocumentation) => void;
27
27
  stepName: InputStep;
28
28
  data: TaxDocumentation;
29
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt">>;
30
- language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt";
29
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
30
+ language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
31
31
  supportedForms: TaxForm[];
32
32
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<TaxForm[]>>;
33
33
  };
@@ -32,7 +32,6 @@ export declare const useTaxDocumentationContext: () => {
32
32
  name?: string | undefined;
33
33
  cityOfBirth?: string | undefined;
34
34
  countryOfBirth?: string | undefined;
35
- businessRegistrationNumber?: string | undefined;
36
35
  financialAccountIdentifier?: string | undefined;
37
36
  financialAccountName?: string | undefined;
38
37
  ftin?: string | undefined;
@@ -61,15 +60,15 @@ export declare const useTaxDocumentationContext: () => {
61
60
  foreignTrustClassification?: string | undefined;
62
61
  foreignOtherClassification?: string | undefined;
63
62
  }) => void;
64
- editTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
63
+ editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
65
64
  onCancel: (() => void) | undefined;
66
- goTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
65
+ goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
67
66
  goBack: (() => void) | undefined;
68
67
  goToNext: (data: import("../../types").TaxDocumentation) => void;
69
- stepName: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax";
68
+ stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
70
69
  data: import("../../types").TaxDocumentation;
71
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt">>;
72
- language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt";
70
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
71
+ language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
73
72
  supportedForms: import("../../types").TaxForm[];
74
73
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
75
74
  }, TaxDocumentationContextProvider: import("react").Provider<{
@@ -105,7 +104,6 @@ export declare const useTaxDocumentationContext: () => {
105
104
  name?: string | undefined;
106
105
  cityOfBirth?: string | undefined;
107
106
  countryOfBirth?: string | undefined;
108
- businessRegistrationNumber?: string | undefined;
109
107
  financialAccountIdentifier?: string | undefined;
110
108
  financialAccountName?: string | undefined;
111
109
  ftin?: string | undefined;
@@ -134,15 +132,15 @@ export declare const useTaxDocumentationContext: () => {
134
132
  foreignTrustClassification?: string | undefined;
135
133
  foreignOtherClassification?: string | undefined;
136
134
  }) => void;
137
- editTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
135
+ editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
138
136
  onCancel: (() => void) | undefined;
139
- goTo: (form: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax") => void;
137
+ goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
140
138
  goBack: (() => void) | undefined;
141
139
  goToNext: (data: import("../../types").TaxDocumentation) => void;
142
- stepName: "Summary" | "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax";
140
+ stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
143
141
  data: import("../../types").TaxDocumentation;
144
- setLanguage: import("react").Dispatch<import("react").SetStateAction<"en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt">>;
145
- language: "en-us" | "de-de" | "en-gb" | "it-it" | "nl-nl" | "no-no" | "sv-se" | "fr-fr" | "es-es" | "pt-pt";
142
+ setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
143
+ language: "bg-bg" | "cs-cz" | "de-de" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fr-fr" | "hu-hu" | "it-it" | "mt-mt" | "nl-nl" | "no-no" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
146
144
  supportedForms: import("../../types").TaxForm[];
147
145
  setSupportedForms: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxForm[]>>;
148
146
  } | undefined>;
@@ -1,6 +1,5 @@
1
- export * from "../paths/TaxBitFormUI";
1
+ export * from "../wizard/TaxBitFormUI";
2
2
  export * from "../widgets/TaxBitForm";
3
3
  export * from "../hooks/useTaxBit";
4
- export { type TaxForm } from "../types";
5
- export { type Locale } from "../i18n/types";
4
+ export { type TaxForm, type Locale } from "../types";
6
5
  export { type ClientTaxDocumentation } from "../types/external";
@@ -1,4 +1,4 @@
1
- import type { Locale } from "./types";
1
+ import type { Locale } from "types";
2
2
  import type { PropertyFile } from "./types/PropertyFile";
3
3
  type LocalizationFile = {
4
4
  [locale in Locale]: PropertyFile;
@@ -1,2 +1 @@
1
- export { getButtonText, getCaProvinceText, getCountryText, getErrorText, getHintText, getMonthText, getNotificationText, getOptionText, getPromptText, getSubPromptText, getTitleText, getUsStateText, } from "./utils";
2
- export type { Locale } from "./types/Locale";
1
+ export { getButtonText, getCaProvinceText, getCountryText, getErrorText, getHintText, getLocaleText, getMonthText, getNotificationText, getOptionText, getPromptText, getSubPromptText, getTitleText, getUsStateText, } from "./utils";
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const bgBg: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const csCz: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const elGr: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const etEe: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const huHu: PropertyFile;
@@ -8,3 +8,12 @@ export * from "./nl-nl";
8
8
  export * from "./no-no";
9
9
  export * from "./sv-se";
10
10
  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
+ export * from "./ro-ro";
18
+ export * from "./sk-sk";
19
+ export * from "./sl-si";
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const mtMt: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const roRo: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const skSk: PropertyFile;
@@ -0,0 +1,2 @@
1
+ import { PropertyFile } from "../types/PropertyFile";
2
+ export declare const slSi: PropertyFile;