@taxbit/react-sdk 0.3.2 → 0.4.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 (57) hide show
  1. package/README.md +61 -2
  2. package/dist/basic.css +6 -4
  3. package/dist/inline.css +6 -4
  4. package/dist/minimal.css +0 -4
  5. package/dist/src/components/Address/Address.d.ts +2 -3
  6. package/dist/src/components/Form/Form.d.ts +2 -1
  7. package/dist/src/components/ProgressStatus/ProgressStatus.d.ts +5 -0
  8. package/dist/src/components/ProgressStatus/index.d.ts +1 -0
  9. package/dist/src/components/index.d.ts +1 -1
  10. package/dist/src/contexts/FormUI/getLocal.d.ts +21 -0
  11. package/dist/src/contexts/FormUI/useFormUI.d.ts +20 -22
  12. package/dist/src/contexts/FormUI/useFormUIContext.d.ts +43 -47
  13. package/dist/src/contexts/TaxDocumentation/TaxBitFormProvider.d.ts +3 -3
  14. package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +8 -5
  15. package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +12 -8
  16. package/dist/src/entry/index.d.ts +1 -0
  17. package/dist/src/i18n/index.d.ts +1 -1
  18. package/dist/src/i18n/types/LocalizationKey.d.ts +1 -2
  19. package/dist/src/i18n/types/PropertyFile.d.ts +1 -4
  20. package/dist/src/i18n/utils/getText.d.ts +2 -3
  21. package/dist/src/types/InputStep.d.ts +5 -0
  22. package/dist/src/types/Progress.d.ts +9 -0
  23. package/dist/src/types/TaxDocumentation.d.ts +4 -0
  24. package/dist/src/types/index.d.ts +2 -0
  25. package/dist/src/ui/DateOfBirthInput/DateOfBirthInput.d.ts +2 -2
  26. package/dist/src/ui/Password/Password.d.ts +2 -1
  27. package/dist/src/ui/TextInput/TextInput.d.ts +2 -2
  28. package/dist/src/utils/getFieldsState.d.ts +1 -0
  29. package/dist/src/utils/getHintKeyMap.d.ts +4 -0
  30. package/dist/src/utils/getPromptKeyMap.d.ts +4 -0
  31. package/dist/src/utils/index.d.ts +1 -0
  32. package/dist/src/utils/mergeDeep.d.ts +1 -0
  33. package/dist/src/validations/getInvalidFields.d.ts +2 -2
  34. package/dist/src/validations/getRequiredFields.d.ts +1 -1
  35. package/dist/src/validations/getVisibleFields.d.ts +2 -2
  36. package/dist/src/validations/index.d.ts +1 -2
  37. package/dist/src/validations/invalidFieldRules.d.ts +1 -1
  38. package/dist/src/widgets/TaxBitForm/TaxBitForm.d.ts +3 -2
  39. package/dist/src/wizard/AddressInput/AddressInput.d.ts +1 -1
  40. package/dist/src/wizard/ResidenceInput/ResidenceInput.d.ts +2 -2
  41. package/dist/src/wizard/RowInput/AddressRow/AddressRow.d.ts +7 -0
  42. package/dist/src/wizard/RowInput/AddressRow/index.d.ts +1 -0
  43. package/dist/src/wizard/RowInput/VisibleRow/VisibleRow.d.ts +1 -2
  44. package/dist/src/wizard/RowInput/index.d.ts +1 -0
  45. package/dist/src/wizard/TaxBitFormUI/Confirmation/Confirmation.d.ts +2 -0
  46. package/dist/src/wizard/TaxBitFormUI/Confirmation/index.d.ts +1 -0
  47. package/dist/src/wizard/TaxBitFormUI/Summary/Summary.d.ts +0 -1
  48. package/dist/src/wizard/TaxBitFormUI/TaxBitDAC7FormUI.d.ts +1 -1
  49. package/dist/src/wizard/TaxBitFormUI/TaxBitFormUI.d.ts +3 -2
  50. package/dist/src/wizard/TaxBitFormUI/steps.d.ts +1 -0
  51. package/dist/taxbit-react-sdk.js +2218 -2137
  52. package/dist/taxbit-react-sdk.umd.cjs +10 -10
  53. package/package.json +1 -1
  54. package/dist/src/components/Notification/Notification.d.ts +0 -5
  55. package/dist/src/components/Notification/index.d.ts +0 -1
  56. package/dist/src/validations/getNotifiedFields.d.ts +0 -10
  57. package/dist/src/validations/requiredFieldRules.d.ts +0 -7
package/README.md CHANGED
@@ -172,13 +172,72 @@ Classnames are namespaced with "taxbit-" to reduce the chance of conflict.
172
172
 
173
173
  ### Callbacks
174
174
 
175
- The TaxBit React SDK provides callbacks for the following events on the `TaxBitDAC7Form` component:
175
+ The TaxBit React SDK provides callbacks for the following events on the `TaxBitDAC7Form` component. These callbacks can be passed in to the Component and used to trigger other actions in your application.
176
176
 
177
177
  - `onSubmit` - called when the user clicks the submit button
178
178
  - `onSuccess` - called after the server responds with a successful submission
179
+ - `onProgress` - called when the user navigates within the TaxBit UI. The function passed here will be passed a Progress object with the following shape:
179
180
 
180
- These callbacks can be passed in to the Component and used to trigger other actions in your application.
181
+ ```typescript
182
+ type Progress = {
183
+ stepNumber: number;
184
+ totalSteps: number;
185
+ percentComplete: number;
186
+ stepTitle: string;
187
+ stepId: string;
188
+ language: Locale;
189
+ };
190
+ ```
191
+
192
+ The DAC7 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.
181
193
 
182
194
  ### Types
183
195
 
184
196
  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 passed to the component and returned to the callback is typed as `ClientTaxDocumentation`.
197
+
198
+ Also included are some utility types:
199
+
200
+ ```typescript
201
+ type Locale =
202
+ | 'bg-bg'
203
+ | 'cs-cz'
204
+ | 'da-dk'
205
+ | 'de-at'
206
+ | 'de-de'
207
+ | 'el-cy'
208
+ | 'el-gr'
209
+ | 'en-gb'
210
+ | 'en-us'
211
+ | 'es-es'
212
+ | 'et-ee'
213
+ | 'fi-fi'
214
+ | 'fr-fr'
215
+ | 'fr-lu'
216
+ | 'ga-ie'
217
+ | 'hr-hr'
218
+ | 'hu-hu'
219
+ | 'it-it'
220
+ | 'lt-lt'
221
+ | 'lv-lv'
222
+ | 'mt-mt'
223
+ | 'nl-be'
224
+ | 'nl-nl'
225
+ | 'no-no'
226
+ | 'pl-pl'
227
+ | 'pt-pt'
228
+ | 'ro-ro'
229
+ | 'sk-sk'
230
+ | 'sl-si'
231
+ | 'sv-se';
232
+ ```
233
+
234
+ ```typescript
235
+ type Progress = {
236
+ stepNumber: number;
237
+ totalSteps: number;
238
+ percentComplete: number;
239
+ stepTitle: string;
240
+ stepId: string;
241
+ language: Locale;
242
+ };
243
+ ```
package/dist/basic.css CHANGED
@@ -18,6 +18,12 @@ button.taxbit-button:focus-visible {
18
18
  padding: 12px;
19
19
  }
20
20
 
21
+ .taxbit-progress-status {
22
+ font-size: 0.8em;
23
+ font-weight: normal;
24
+ opacity: 0.7;
25
+ }
26
+
21
27
  .taxbit-page-header {
22
28
  display: flex;
23
29
  align-items: center;
@@ -76,10 +82,6 @@ button.taxbit-button:focus-visible {
76
82
  color: red;
77
83
  font-size: 0.8em;
78
84
  }
79
- .taxbit-notification {
80
- color: blue;
81
- font-size: 0.8em;
82
- }
83
85
  .taxbit-hint {
84
86
  font-size: 0.8em;
85
87
  opacity: 0.7;
package/dist/inline.css CHANGED
@@ -18,6 +18,12 @@ button.taxbit-button:focus-visible {
18
18
  padding: 12px;
19
19
  }
20
20
 
21
+ .taxbit-progress-status {
22
+ font-size: 0.8em;
23
+ font-weight: normal;
24
+ opacity: 0.7;
25
+ }
26
+
21
27
  .taxbit-page-header {
22
28
  display: flex;
23
29
  align-items: center;
@@ -64,10 +70,6 @@ button.taxbit-button:focus-visible {
64
70
  color: red;
65
71
  font-size: 0.8em;
66
72
  }
67
- .taxbit-notification {
68
- color: blue;
69
- font-size: 0.8em;
70
- }
71
73
  .taxbit-hint {
72
74
  font-size: 0.8em;
73
75
  opacity: 0.7;
package/dist/minimal.css CHANGED
@@ -11,10 +11,6 @@
11
11
  color: red;
12
12
  }
13
13
 
14
- .taxbit-notification {
15
- color: blue;
16
- }
17
-
18
14
  .taxbit-step-actions {
19
15
  display: flex;
20
16
  justify-content: space-between;
@@ -1,6 +1,5 @@
1
- import React from "react";
2
- import { UsStateCode } from "types/UsStateCode";
3
- import { CaProvinceCode } from "types/CaProvinceCode";
1
+ import React from 'react';
2
+ import type { CaProvinceCode, UsStateCode } from 'types';
4
3
  type AddressParts = {
5
4
  street?: string;
6
5
  street2?: string;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  type FormProps = {
3
3
  title: string;
4
+ className?: string;
4
5
  children: React.ReactNode;
5
6
  actions?: React.ReactNode;
6
7
  };
7
- export declare const Form: ({ children, title, actions }: FormProps) => React.JSX.Element;
8
+ export declare const Form: ({ children, title, actions, className }: FormProps) => React.JSX.Element;
8
9
  export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { Progress } from '../../types';
3
+ export declare const ProgressStatus: ({ progress }: {
4
+ progress?: Progress | undefined;
5
+ }) => React.JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './ProgressStatus';
@@ -2,6 +2,6 @@ export * from './Address';
2
2
  export * from './ErrorMessage';
3
3
  export * from './Form';
4
4
  export * from './InputStatus';
5
- export * from './Notification';
5
+ export * from './ProgressStatus';
6
6
  export * from './Row';
7
7
  export * from './Section';
@@ -0,0 +1,21 @@
1
+ import { ButtonKey, ErrorKey, HintKey, PromptKey, SubPromptKey, SubTitleKey, TextKey } from '../../i18n/types';
2
+ import { Locale, TaxDocumentation, TaxDocumentationKey } from '../../types';
3
+ export declare const getLocal: (fields: TaxDocumentation, language: Locale) => {
4
+ getLocalHint: (key: TaxDocumentationKey) => string | undefined;
5
+ getLocalText: (key: TextKey) => string;
6
+ getLocalTitle: (key: string) => string;
7
+ getLocalSubTitle: (key: SubTitleKey) => string;
8
+ getLocalError: (key: ErrorKey) => string;
9
+ getLocalLocale: (key: Locale) => string;
10
+ getLocalButton: (key: ButtonKey) => string;
11
+ getLocalPrompt: (key: string) => string;
12
+ getLocalSubPrompt: (key: TaxDocumentationKey) => string;
13
+ getLocalOption: (key: string | undefined) => string | undefined;
14
+ getLocalCountry: (key: string | undefined) => string;
15
+ getLocalUsState: (key: string | undefined) => string;
16
+ getLocalCaProvince: (key: string | undefined) => string;
17
+ getLocalMonth: (key: string | undefined) => string;
18
+ getHintKey: (key: TaxDocumentationKey) => HintKey;
19
+ getPromptKey: (key: string) => PromptKey;
20
+ getSubPromptKey: (key: TaxDocumentationKey) => SubPromptKey;
21
+ };
@@ -1,14 +1,31 @@
1
1
  /// <reference types="react" />
2
- import { ButtonKey, ErrorKey, HintKey, NotificationKey, PromptKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from 'i18n/types';
3
- import { Locale, Yes } from 'types';
2
+ import { ErrorKey } from 'i18n/types';
3
+ import { Yes } from 'types';
4
4
  import { TaxDocumentation, TaxDocumentationKey } from 'types/TaxDocumentation';
5
5
  export type TaxDocumentationPropertyFile = {
6
6
  [key in TaxDocumentationKey]: boolean;
7
7
  };
8
8
  export type TaxDocumentationErrorFile = {
9
- [key in TaxDocumentationKey]?: ErrorKey;
9
+ [key in TaxDocumentationKey]?: ErrorKey[];
10
10
  };
11
11
  export declare const useFormUI: () => {
12
+ 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 | keyof import("types").CalculatedData) => string | undefined;
13
+ getLocalText: (key: import("i18n/types").TextKey) => string;
14
+ getLocalTitle: (key: string) => string;
15
+ getLocalSubTitle: (key: "taxResidences") => string;
16
+ getLocalError: (key: ErrorKey) => string;
17
+ getLocalLocale: (key: import("types").Locale) => string;
18
+ getLocalButton: (key: import("i18n/types").ButtonKey) => string;
19
+ getLocalPrompt: (key: string) => string;
20
+ getLocalSubPrompt: (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 | keyof import("types").CalculatedData) => string;
21
+ getLocalOption: (key: string | undefined) => string | undefined;
22
+ getLocalCountry: (key: string | undefined) => string;
23
+ getLocalUsState: (key: string | undefined) => string;
24
+ getLocalCaProvince: (key: string | undefined) => string;
25
+ getLocalMonth: (key: string | undefined) => string;
26
+ getHintKey: (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 | keyof import("types").CalculatedData) => "dateOfBirth";
27
+ getPromptKey: (key: string) => import("i18n/types").PromptKey;
28
+ getSubPromptKey: (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 | keyof import("types").CalculatedData) => import("i18n/types").SubPromptKey;
12
29
  clearIfNotRequired: (...arg: TaxDocumentationKey[]) => (value: Yes | undefined) => void;
13
30
  fields: TaxDocumentation;
14
31
  setFields: import("react").Dispatch<import("react").SetStateAction<TaxDocumentation>>;
@@ -17,26 +34,7 @@ export declare const useFormUI: () => {
17
34
  showErrors: boolean;
18
35
  exposeErrors: () => void;
19
36
  hideErrors: () => void;
20
- getLocalButton: (key: ButtonKey) => string;
21
- getLocalCaProvince: (key: string | undefined) => string;
22
- getLocalCountry: (key: string | undefined) => string;
23
- getLocalError: (key: ErrorKey) => string;
24
- getLocalHint: (key: TaxDocumentationKey) => string | undefined;
25
- getHintKey: (key: TaxDocumentationKey) => HintKey;
26
- getLocalLocale: (key: Locale) => string;
27
- getLocalNotification: (key: NotificationKey) => string;
28
- getLocalOption: (key: string | undefined) => string | undefined;
29
- getLocalPrompt: (key: string) => string;
30
- getPromptKey: (key: string) => PromptKey;
31
- getLocalSubPrompt: (key: TaxDocumentationKey) => string;
32
- getSubPromptKey: (key: TaxDocumentationKey) => SubPromptKey;
33
- getLocalText: (key: TextKey) => string;
34
- getLocalTitle: (key: TitleKey) => string;
35
- getLocalSubTitle: (key: SubTitleKey) => string;
36
- getLocalUsState: (key: string | undefined) => string;
37
- getLocalMonth: (key: string | undefined) => string;
38
37
  getRequiredLocalPrompt: (key: TaxDocumentationKey) => string;
39
- notifiedFields: import("../../validations/getNotifiedFields.ts").Notifications;
40
38
  invalidFields: TaxDocumentationErrorFile;
41
39
  requiredFields: TaxDocumentationPropertyFile;
42
40
  visibleFields: TaxDocumentationPropertyFile;
@@ -1,70 +1,66 @@
1
1
  /// <reference types="react" />
2
2
  export declare const useFormUIContext: () => {
3
- clearIfNotRequired: (...arg: (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 | "accountHolderTaxResidences")[]) => (value: "yes" | undefined) => void;
3
+ 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 | keyof import("../../types").CalculatedData) => string | undefined;
4
+ getLocalText: (key: import("../../i18n/types").TextKey) => string;
5
+ getLocalTitle: (key: string) => string;
6
+ getLocalSubTitle: (key: "taxResidences") => string;
7
+ getLocalError: (key: import("../../i18n/types").ErrorKey) => string;
8
+ getLocalLocale: (key: import("../../types").Locale) => string;
9
+ getLocalButton: (key: import("../../i18n/types").ButtonKey) => string;
10
+ getLocalPrompt: (key: string) => string;
11
+ getLocalSubPrompt: (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 | keyof import("../../types").CalculatedData) => string;
12
+ getLocalOption: (key: string | undefined) => string | undefined;
13
+ getLocalCountry: (key: string | undefined) => string;
14
+ getLocalUsState: (key: string | undefined) => string;
15
+ getLocalCaProvince: (key: string | undefined) => string;
16
+ getLocalMonth: (key: string | undefined) => string;
17
+ getHintKey: (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 | keyof import("../../types").CalculatedData) => "dateOfBirth";
18
+ getPromptKey: (key: string) => import("../../i18n/types").PromptKey;
19
+ getSubPromptKey: (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 | keyof import("../../types").CalculatedData) => import("../../i18n/types").SubPromptKey;
20
+ clearIfNotRequired: (...arg: (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 | keyof import("../../types").CalculatedData)[]) => (value: "yes" | undefined) => void;
4
21
  fields: import("../../types").TaxDocumentation;
5
22
  setFields: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxDocumentation>>;
6
- setValue: (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 | "accountHolderTaxResidences", value: string | undefined) => void;
23
+ setValue: (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 | keyof import("../../types").CalculatedData, value: string | undefined) => void;
7
24
  isErrorFree: boolean;
8
25
  showErrors: boolean;
9
26
  exposeErrors: () => void;
10
27
  hideErrors: () => void;
11
- getLocalButton: (key: import("../../i18n/types").ButtonKey) => string;
12
- getLocalCaProvince: (key: string | undefined) => string;
13
- getLocalCountry: (key: string | undefined) => string;
28
+ getRequiredLocalPrompt: (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 | keyof import("../../types").CalculatedData) => string;
29
+ invalidFields: import("./useFormUI").TaxDocumentationErrorFile;
30
+ requiredFields: import("./useFormUI").TaxDocumentationPropertyFile;
31
+ visibleFields: import("./useFormUI").TaxDocumentationPropertyFile;
32
+ hideField: (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 | keyof import("../../types").CalculatedData) => void;
33
+ showField: (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 | keyof import("../../types").CalculatedData) => void;
34
+ }, FormUIContextProvider: import("react").Provider<{
35
+ 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 | keyof import("../../types").CalculatedData) => string | undefined;
36
+ getLocalText: (key: import("../../i18n/types").TextKey) => string;
37
+ getLocalTitle: (key: string) => string;
38
+ getLocalSubTitle: (key: "taxResidences") => string;
14
39
  getLocalError: (key: import("../../i18n/types").ErrorKey) => string;
15
- 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 | "accountHolderTaxResidences") => string | undefined;
16
- getHintKey: (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 | "accountHolderTaxResidences") => "dateOfBirth";
17
40
  getLocalLocale: (key: import("../../types").Locale) => string;
18
- getLocalNotification: (key: "vatUnexpectedFormat") => string;
19
- getLocalOption: (key: string | undefined) => string | undefined;
41
+ getLocalButton: (key: import("../../i18n/types").ButtonKey) => string;
20
42
  getLocalPrompt: (key: string) => string;
21
- getPromptKey: (key: string) => import("../../i18n/types").PromptKey;
22
- getLocalSubPrompt: (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 | "accountHolderTaxResidences") => string;
23
- getSubPromptKey: (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 | "accountHolderTaxResidences") => import("../../i18n/types").SubPromptKey;
24
- getLocalText: (key: import("../../i18n/types").TextKey) => string;
25
- getLocalTitle: (key: import("../../i18n/types").TitleKey) => string;
26
- getLocalSubTitle: (key: "taxResidences") => string;
43
+ getLocalSubPrompt: (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 | keyof import("../../types").CalculatedData) => string;
44
+ getLocalOption: (key: string | undefined) => string | undefined;
45
+ getLocalCountry: (key: string | undefined) => string;
27
46
  getLocalUsState: (key: string | undefined) => string;
47
+ getLocalCaProvince: (key: string | undefined) => string;
28
48
  getLocalMonth: (key: string | undefined) => string;
29
- getRequiredLocalPrompt: (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 | "accountHolderTaxResidences") => string;
30
- notifiedFields: import("../../validations/getNotifiedFields").Notifications;
31
- invalidFields: import("./useFormUI").TaxDocumentationErrorFile;
32
- requiredFields: import("./useFormUI").TaxDocumentationPropertyFile;
33
- visibleFields: import("./useFormUI").TaxDocumentationPropertyFile;
34
- hideField: (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 | "accountHolderTaxResidences") => void;
35
- showField: (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 | "accountHolderTaxResidences") => void;
36
- }, FormUIContextProvider: import("react").Provider<{
37
- clearIfNotRequired: (...arg: (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 | "accountHolderTaxResidences")[]) => (value: "yes" | undefined) => void;
49
+ getHintKey: (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 | keyof import("../../types").CalculatedData) => "dateOfBirth";
50
+ getPromptKey: (key: string) => import("../../i18n/types").PromptKey;
51
+ getSubPromptKey: (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 | keyof import("../../types").CalculatedData) => import("../../i18n/types").SubPromptKey;
52
+ clearIfNotRequired: (...arg: (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 | keyof import("../../types").CalculatedData)[]) => (value: "yes" | undefined) => void;
38
53
  fields: import("../../types").TaxDocumentation;
39
54
  setFields: import("react").Dispatch<import("react").SetStateAction<import("../../types").TaxDocumentation>>;
40
- setValue: (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 | "accountHolderTaxResidences", value: string | undefined) => void;
55
+ setValue: (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 | keyof import("../../types").CalculatedData, value: string | undefined) => void;
41
56
  isErrorFree: boolean;
42
57
  showErrors: boolean;
43
58
  exposeErrors: () => void;
44
59
  hideErrors: () => void;
45
- getLocalButton: (key: import("../../i18n/types").ButtonKey) => string;
46
- getLocalCaProvince: (key: string | undefined) => string;
47
- getLocalCountry: (key: string | undefined) => string;
48
- getLocalError: (key: import("../../i18n/types").ErrorKey) => string;
49
- 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 | "accountHolderTaxResidences") => string | undefined;
50
- getHintKey: (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 | "accountHolderTaxResidences") => "dateOfBirth";
51
- getLocalLocale: (key: import("../../types").Locale) => string;
52
- getLocalNotification: (key: "vatUnexpectedFormat") => string;
53
- getLocalOption: (key: string | undefined) => string | undefined;
54
- getLocalPrompt: (key: string) => string;
55
- getPromptKey: (key: string) => import("../../i18n/types").PromptKey;
56
- getLocalSubPrompt: (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 | "accountHolderTaxResidences") => string;
57
- getSubPromptKey: (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 | "accountHolderTaxResidences") => import("../../i18n/types").SubPromptKey;
58
- getLocalText: (key: import("../../i18n/types").TextKey) => string;
59
- getLocalTitle: (key: import("../../i18n/types").TitleKey) => string;
60
- getLocalSubTitle: (key: "taxResidences") => string;
61
- getLocalUsState: (key: string | undefined) => string;
62
- getLocalMonth: (key: string | undefined) => string;
63
- getRequiredLocalPrompt: (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 | "accountHolderTaxResidences") => string;
64
- notifiedFields: import("../../validations/getNotifiedFields").Notifications;
60
+ getRequiredLocalPrompt: (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 | keyof import("../../types").CalculatedData) => string;
65
61
  invalidFields: import("./useFormUI").TaxDocumentationErrorFile;
66
62
  requiredFields: import("./useFormUI").TaxDocumentationPropertyFile;
67
63
  visibleFields: import("./useFormUI").TaxDocumentationPropertyFile;
68
- hideField: (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 | "accountHolderTaxResidences") => void;
69
- showField: (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 | "accountHolderTaxResidences") => void;
64
+ hideField: (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 | keyof import("../../types").CalculatedData) => void;
65
+ showField: (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 | keyof import("../../types").CalculatedData) => void;
70
66
  } | undefined>;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import type { Locale, TaxForm } from '../../types';
2
+ import type { InputStep, Locale, Progress, TaxForm } from '../../types';
3
3
  import { ClientTaxDocumentation } from '../../types/client';
4
- import { InputStep } from './useTaxDocumentation';
5
4
  type TaxDocumentationProviderProps = {
6
5
  data?: ClientTaxDocumentation;
7
6
  onSubmit: (data: ClientTaxDocumentation) => void;
@@ -9,6 +8,7 @@ type TaxDocumentationProviderProps = {
9
8
  children: React.ReactNode;
10
9
  taxForms?: TaxForm[];
11
10
  step?: InputStep;
11
+ onProgress?: (progress: Progress) => void;
12
12
  };
13
- export declare const TaxBitFormProvider: ({ data, onSubmit, language, taxForms, step, children, }: TaxDocumentationProviderProps) => React.JSX.Element;
13
+ export declare const TaxBitFormProvider: ({ data, onSubmit, onProgress, language, taxForms, step, children, }: TaxDocumentationProviderProps) => React.JSX.Element;
14
14
  export {};
@@ -1,15 +1,16 @@
1
1
  /// <reference types="react" />
2
- import type { Locale, TaxDocumentation, TaxForm } from 'types';
2
+ import type { InputStep, Locale, Progress, TaxDocumentation, TaxForm } from 'types';
3
3
  import { ClientTaxDocumentation } from 'types/client';
4
- export type InputStep = 'AccountHolderClassification' | 'AccountHolderContact' | 'AccountHolderTax' | 'AccountHolderTaxClarification' | 'Exemptions' | 'RegardedOwnerClassification' | 'RegardedOwnerContact' | 'RegardedOwnerTax' | 'Summary';
4
+ import { TitleKey } from '../../i18n/types';
5
5
  type UseTaxDocumentationProps = {
6
6
  data: ClientTaxDocumentation;
7
7
  language?: Locale;
8
8
  onSubmit: (data: ClientTaxDocumentation) => void;
9
+ onProgress?: (progress: Progress) => void;
9
10
  step?: InputStep;
10
11
  taxForms?: TaxForm[];
11
12
  };
12
- export declare const useTaxDocumentation: ({ data: initialData, language: initialLanguage, onSubmit, step: initialStep, taxForms: supportedForms, }: UseTaxDocumentationProps) => {
13
+ export declare const useTaxDocumentation: ({ data: initialData, language: initialLanguage, onSubmit, onProgress, step: initialStep, taxForms: supportedForms, }: UseTaxDocumentationProps) => {
13
14
  isW9: boolean;
14
15
  isW8: boolean;
15
16
  isW8Ben: boolean;
@@ -17,14 +18,16 @@ export declare const useTaxDocumentation: ({ data: initialData, language: initia
17
18
  isDac7: boolean;
18
19
  onPersistAccountHolderData: (newData: TaxDocumentation) => void;
19
20
  onPersistCollectedData: (newData: TaxDocumentation) => void;
20
- onSubmitTaxDocumentation: (submitFields: TaxDocumentation) => void;
21
+ onSubmitTaxDocumentation: (data: TaxDocumentation) => void;
21
22
  onResetTaxDocumentation: (data: ClientTaxDocumentation) => void;
22
23
  editTo: (form: InputStep) => void;
23
24
  onCancel: (() => void) | undefined;
25
+ getTitleKey: (key: InputStep) => TitleKey;
24
26
  goTo: (form: InputStep) => void;
25
27
  goBack: (() => void) | undefined;
26
28
  goToNext: (data: TaxDocumentation) => void;
27
- stepName: InputStep;
29
+ progress: Progress | undefined;
30
+ stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
28
31
  data: TaxDocumentation;
29
32
  setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
30
33
  language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
@@ -7,14 +7,16 @@ export declare const useTaxDocumentationContext: () => {
7
7
  isDac7: boolean;
8
8
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
9
9
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
10
- onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
10
+ onSubmitTaxDocumentation: (data: import("../../types").TaxDocumentation) => void;
11
11
  onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
12
- editTo: (form: import("./useTaxDocumentation").InputStep) => void;
12
+ editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
13
13
  onCancel: (() => void) | undefined;
14
- goTo: (form: import("./useTaxDocumentation").InputStep) => void;
14
+ getTitleKey: (key: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => import("../../i18n/types").TitleKey;
15
+ goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
15
16
  goBack: (() => void) | undefined;
16
17
  goToNext: (data: import("../../types").TaxDocumentation) => void;
17
- stepName: import("./useTaxDocumentation").InputStep;
18
+ progress: import("../../types").Progress | undefined;
19
+ stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
18
20
  data: import("../../types").TaxDocumentation;
19
21
  setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
20
22
  language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
@@ -28,14 +30,16 @@ export declare const useTaxDocumentationContext: () => {
28
30
  isDac7: boolean;
29
31
  onPersistAccountHolderData: (newData: import("../../types").TaxDocumentation) => void;
30
32
  onPersistCollectedData: (newData: import("../../types").TaxDocumentation) => void;
31
- onSubmitTaxDocumentation: (submitFields: import("../../types").TaxDocumentation) => void;
33
+ onSubmitTaxDocumentation: (data: import("../../types").TaxDocumentation) => void;
32
34
  onResetTaxDocumentation: (data: import("../../entry").ClientTaxDocumentation) => void;
33
- editTo: (form: import("./useTaxDocumentation").InputStep) => void;
35
+ editTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
34
36
  onCancel: (() => void) | undefined;
35
- goTo: (form: import("./useTaxDocumentation").InputStep) => void;
37
+ getTitleKey: (key: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => import("../../i18n/types").TitleKey;
38
+ goTo: (form: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary") => void;
36
39
  goBack: (() => void) | undefined;
37
40
  goToNext: (data: import("../../types").TaxDocumentation) => void;
38
- stepName: import("./useTaxDocumentation").InputStep;
41
+ progress: import("../../types").Progress | undefined;
42
+ stepName: "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
39
43
  data: import("../../types").TaxDocumentation;
40
44
  setLanguage: import("react").Dispatch<import("react").SetStateAction<"bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se">>;
41
45
  language: "bg-bg" | "cs-cz" | "da-dk" | "de-at" | "de-de" | "el-cy" | "el-gr" | "en-gb" | "en-us" | "es-es" | "et-ee" | "fi-fi" | "fr-fr" | "fr-lu" | "ga-ie" | "hr-hr" | "hu-hu" | "it-it" | "lt-lt" | "lv-lv" | "mt-mt" | "nl-be" | "nl-nl" | "no-no" | "pl-pl" | "pt-pt" | "ro-ro" | "sk-sk" | "sl-si" | "sv-se";
@@ -1,5 +1,6 @@
1
1
  export * from '../hooks/useTaxBit';
2
2
  export * from '../types/Locale';
3
+ export * from '../types/Progress';
3
4
  export * from '../types/TaxForm';
4
5
  export * from '../types/client';
5
6
  export * from '../widgets/TaxBitForm';
@@ -1 +1 @@
1
- export { getButtonText, getCaProvinceText, getCountryText, getErrorText, getHintText, getLocaleText, getMonthText, getNotificationText, getOptionText, getPromptText, getSubPromptText, getSubTitleText, getTitleText, getUsStateText, } from './utils';
1
+ export { getButtonText, getCaProvinceText, getCountryText, getErrorText, getHintText, getLocaleText, getMonthText, getOptionText, getPromptText, getSubPromptText, getSubTitleText, getTitleText, getUsStateText, } from './utils';
@@ -1,10 +1,9 @@
1
1
  export type ButtonKey = 'edit' | 'back' | 'next' | 'reset' | 'submit' | 'cancel' | 'hide' | 'show';
2
2
  export type ErrorKey = 'required' | 'invalid' | 'invalidDate' | 'mustBeSixCharacters' | 'mustBeNineDigits' | 'mustBeFiveOrNineDigits' | 'mustMatchName' | 'mustBeInDateFormat' | 'mustBeValidBirthDate' | 'mustNotMatchVatin' | 'residencesMustIncludeVatCountry' | 'residencesMustIncludeAddressCountry' | 'residencesMustIncludeAnEUCountry';
3
- export type NotificationKey = 'vatUnexpectedFormat';
4
3
  export type OptionKey = 'usPerson_yes' | 'usPerson_no' | 'regardedOwnerUsPerson_yes' | 'regardedOwnerUsPerson_no' | 'isIndividual_yes' | 'isIndividual_no' | 'cCorporation' | 'centralBankOfIssue' | 'complexTrust' | 'corporation' | 'disregardedEntity' | 'estate' | 'foreignGovernmentControlledEntity' | 'foreignGovernmentIntegralPart' | 'grantorTrust' | 'individual' | 'internationalOrganization' | 'llc' | 'no' | 'other' | 'partnership' | 'privateFoundation' | 'sCorporation' | 'simpleTrust' | 'smllc' | 'soleProprietor' | 'taxExemptOrganization' | 'trust' | 'trustEstate' | 'yes';
5
4
  export type PromptKey = 'addAdditional' | 'address' | 'businessRegistrationNumber' | 'businessRegistrationCountry' | 'city' | 'cityOfBirth' | 'country' | 'countryOfBirth' | 'countryOfCitizenship' | 'dateOfBirth' | 'day' | 'dbaName' | 'exemptPayeeCode' | 'exemptFatcaCode' | 'financialAccountIdentifier' | 'financialAccountName' | 'foreignAccountType' | 'foreignOtherClassification' | 'foreignTin' | 'foreignTinIsNotRequired' | 'foreignTrustClassification' | 'isEuResident' | 'isIndividual' | 'iAcknowlegeESignIsOk' | 'iAmACitizenOfTheUs' | 'iAmExemptFromFatcaReporting' | 'iAmNotSubjectToBackupWithholding' | 'iAuthorizeWithholdingAgent' | 'iCertifyToAll' | 'iConfirmIncomeIsNonUs' | 'iConfirmTheBeneficialOwnerIsExempt' | 'iConfirmTheInformationIsCorrectComplete' | 'iConfirmTheEntityIsNotAUsPerson' | 'iConfirmTheEntityIsTheBeneficialOwner' | 'iConfirmTheTaxIdIsCorrect' | 'iHaveLegalCapacityToSign' | 'mailingAddress' | 'mailingAddressIsDifferent' | 'month' | 'name' | 'nameOfEntity' | 'nameOfCCorporation' | 'nameOfCorporation' | 'nameOfIndividual' | 'nameOfLlc' | 'nameOfOrganization' | 'nameOfPartnership' | 'nameOfSCorporation' | 'nameOfSoleProprietor' | 'nameOfTrustEstate' | 'nameOfTrust' | 'province' | 'regardedOwnerUsPerson' | 'removeAdditional' | 'signature' | 'smllcElection' | 'state' | 'stateProvince' | 'street' | 'street2' | 'taxIdNumber' | 'taxIdNumberIsNotRequired' | 'tin' | 'usAccountType' | 'usLlcClassification' | 'usOtherClassification' | 'usPerson' | 'usEin' | 'usSsn' | 'usTin' | 'usTrustEstateEin' | 'vatIdentificationNumber' | 'vatIsNotRequired' | 'vatCountry' | 'year' | 'zip';
6
5
  export type SubPromptKey = 'smllcElection' | 'iConfirmIncomeIsNonUs' | 'isEuResident' | 'isIndividual' | 'financialAccountIdentifier' | 'financialAccountName' | 'vatIdentificationNumber' | 'placeOfBirth';
7
- export type TitleKey = 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'address' | 'mailingAddress' | 'primaryAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5';
6
+ export type TitleKey = 'accountHolder' | 'accountHolderClassification' | 'accountHolderContactInformation' | 'accountHolderTaxInformation' | 'accountHolderTaxClarification' | 'address' | 'confirmation' | 'exemptions' | 'mailingAddress' | 'primaryAddress' | 'placeOfBirth' | 'regardedOwner' | 'regardedOwnerClassification' | 'regardedOwnerContactInformation' | 'regardedOwnerTaxInformation' | 'signature' | 'summary' | 'taxResidences' | 'taxResidence1' | 'taxResidence2' | 'taxResidence3' | 'taxResidence4' | 'taxResidence5';
8
7
  export type SubTitleKey = 'taxResidences';
9
8
  export type TextKey = 'eSignActReference' | 'notRequired' | 'interviewIsComplete' | 'retrievingInterviewStatus';
10
9
  export type HintKey = 'dateOfBirth';
@@ -3,7 +3,7 @@ import { CountryCode } from 'types/CountryCode';
3
3
  import { Locale } from 'types/Locale';
4
4
  import { MonthCode } from 'types/MonthCode';
5
5
  import { UsStateCode } from 'types/UsStateCode';
6
- import { ButtonKey, ErrorKey, HintKey, NotificationKey, OptionKey, PromptKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from './LocalizationKey';
6
+ import { ButtonKey, ErrorKey, HintKey, OptionKey, PromptKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from './LocalizationKey';
7
7
  export type PropertyFile = {
8
8
  button: {
9
9
  [key in ButtonKey]: string;
@@ -26,9 +26,6 @@ export type PropertyFile = {
26
26
  option: {
27
27
  [key in OptionKey]: string;
28
28
  };
29
- notification: {
30
- [key in NotificationKey]: string;
31
- };
32
29
  country: {
33
30
  [key in CountryCode]: string;
34
31
  };
@@ -2,17 +2,16 @@ import { CaProvinceCode } from 'types/CaProvinceCode';
2
2
  import { CountryCode } from 'types/CountryCode';
3
3
  import { UsStateCode } from 'types/UsStateCode';
4
4
  import { Locale } from '../../types';
5
- import { ButtonKey, ErrorKey, NotificationKey, OptionKey, PromptKey, SubPromptKey, SubTitleKey, TextKey, TitleKey } from '../types';
5
+ import { ButtonKey, ErrorKey, OptionKey, PromptKey, SubPromptKey, SubTitleKey, TextKey } from '../types';
6
6
  export declare const getPromptText: (key: PromptKey, locale: Locale | undefined) => string;
7
7
  export declare const getSubPromptText: (key: SubPromptKey, locale: Locale | undefined) => string;
8
8
  export declare const getErrorText: (key: ErrorKey, locale: Locale | undefined) => string;
9
9
  export declare const getHintText: (key: string | undefined, locale: Locale | undefined) => string | undefined;
10
10
  export declare const getTextText: (key: TextKey, locale: Locale | undefined) => string;
11
- export declare const getTitleText: (key: TitleKey, locale: Locale | undefined) => string;
11
+ export declare const getTitleText: (key: string, locale: Locale | undefined) => string;
12
12
  export declare const getSubTitleText: (key: SubTitleKey, locale: Locale | undefined) => string;
13
13
  export declare const getButtonText: (key: ButtonKey, locale: Locale | undefined) => string;
14
14
  export declare const getOptionText: (key: OptionKey | undefined, locale: Locale | undefined) => string;
15
- export declare const getNotificationText: (key: NotificationKey | undefined, locale: Locale | undefined) => string;
16
15
  export declare const getCountryText: (key: CountryCode, locale: Locale | undefined) => string;
17
16
  export declare const getUsStateText: (key: UsStateCode, locale: Locale | undefined) => string;
18
17
  export declare const getCaProvinceText: (key: CaProvinceCode, locale: Locale | undefined) => string;
@@ -0,0 +1,5 @@
1
+ declare const inputSteps: readonly ["AccountHolderClassification", "AccountHolderContact", "AccountHolderTax", "AccountHolderTaxClarification", "Confirmation", "Exemptions", "RegardedOwnerClassification", "RegardedOwnerContact", "RegardedOwnerTax", "Summary"];
2
+ export type InputStep = (typeof inputSteps)[number];
3
+ export declare const isInputStep: (step: string) => step is "AccountHolderClassification" | "AccountHolderContact" | "AccountHolderTax" | "AccountHolderTaxClarification" | "Confirmation" | "Exemptions" | "RegardedOwnerClassification" | "RegardedOwnerContact" | "RegardedOwnerTax" | "Summary";
4
+ export declare const confirmInputStep: (step: string) => InputStep;
5
+ export {};