@taxbit/react-sdk 3.2.1-beta.0 → 3.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/src/contexts/TaxDocumentation/TaxbitQuestionnaireProvider.d.ts +1 -1
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentation.d.ts +3 -2
- package/dist/src/contexts/TaxDocumentation/useTaxDocumentationContext.d.ts +2 -2
- package/dist/src/hooks/useTaxbit/useTaxbit.d.ts +5 -2
- package/dist/src/hooks/useTaxbit/useTaxbitStatus.d.ts +2 -1
- package/dist/src/hooks/useUsTinVerification/useUsTinValidation.d.ts +2 -1
- package/dist/src/i18n/json/enDPS.d.ts +1 -0
- package/dist/src/i18n/locales/bg.d.ts +2 -1
- package/dist/src/i18n/locales/cs.d.ts +2 -1
- package/dist/src/i18n/locales/da.d.ts +2 -1
- package/dist/src/i18n/locales/de-at.d.ts +2 -1
- package/dist/src/i18n/locales/de-de.d.ts +2 -2
- package/dist/src/i18n/locales/de.d.ts +2 -2
- package/dist/src/i18n/locales/el-cy.d.ts +2 -1
- package/dist/src/i18n/locales/el-el.d.ts +2 -1
- package/dist/src/i18n/locales/el.d.ts +2 -1
- package/dist/src/i18n/locales/en-dps.d.ts +2 -2
- package/dist/src/i18n/locales/en-gb.d.ts +2 -1
- package/dist/src/i18n/locales/en-nz.d.ts +2 -1
- package/dist/src/i18n/locales/en-us.d.ts +2 -1
- package/dist/src/i18n/locales/en.d.ts +2 -2
- package/dist/src/i18n/locales/es-es.d.ts +2 -496
- package/dist/src/i18n/locales/es-mx.d.ts +2 -1
- package/dist/src/i18n/locales/es.d.ts +2 -2
- package/dist/src/i18n/locales/et.d.ts +2 -1
- package/dist/src/i18n/locales/fi.d.ts +2 -1
- package/dist/src/i18n/locales/fr-ca.d.ts +2 -1
- package/dist/src/i18n/locales/fr-fr.d.ts +2 -496
- package/dist/src/i18n/locales/fr-lu.d.ts +2 -1
- package/dist/src/i18n/locales/fr.d.ts +2 -2
- package/dist/src/i18n/locales/ga.d.ts +2 -1
- package/dist/src/i18n/locales/hr.d.ts +2 -1
- package/dist/src/i18n/locales/hu.d.ts +2 -1
- package/dist/src/i18n/locales/id.d.ts +2 -2
- package/dist/src/i18n/locales/it.d.ts +2 -2
- package/dist/src/i18n/locales/ja.d.ts +2 -2
- package/dist/src/i18n/locales/ko.d.ts +2 -2
- package/dist/src/i18n/locales/lt.d.ts +2 -1
- package/dist/src/i18n/locales/lv.d.ts +2 -1
- package/dist/src/i18n/locales/mergeLanguages.d.ts +7 -0
- package/dist/src/i18n/locales/ms.d.ts +2 -2
- package/dist/src/i18n/locales/mt.d.ts +2 -1
- package/dist/src/i18n/locales/nl-be.d.ts +2 -1
- package/dist/src/i18n/locales/nl-nl.d.ts +2 -1
- package/dist/src/i18n/locales/nl.d.ts +2 -2
- package/dist/src/i18n/locales/no.d.ts +2 -1
- package/dist/src/i18n/locales/pl.d.ts +2 -2
- package/dist/src/i18n/locales/pt-br.d.ts +2 -1
- package/dist/src/i18n/locales/pt-pt.d.ts +2 -496
- package/dist/src/i18n/locales/pt.d.ts +2 -2
- package/dist/src/i18n/locales/ro.d.ts +2 -2
- package/dist/src/i18n/locales/ru.d.ts +2 -2
- package/dist/src/i18n/locales/sk.d.ts +2 -1
- package/dist/src/i18n/locales/sl.d.ts +2 -1
- package/dist/src/i18n/locales/sv.d.ts +2 -1
- package/dist/src/i18n/locales/th.d.ts +2 -2
- package/dist/src/i18n/locales/tr.d.ts +2 -2
- package/dist/src/i18n/locales/translation-missing.d.ts +2 -2
- package/dist/src/i18n/locales/uk.d.ts +2 -1
- package/dist/src/i18n/locales/vi.d.ts +2 -496
- package/dist/src/i18n/locales/zh-cn.d.ts +2 -496
- package/dist/src/i18n/locales/zh-tw.d.ts +2 -496
- package/dist/src/i18n/locales/zh.d.ts +2 -496
- package/dist/src/i18n/localizationFileMap.d.ts +2 -2
- package/dist/src/i18n/types/Language.d.ts +60 -0
- package/dist/src/types/TaxDocumentation.d.ts +1 -1
- package/dist/src/types/props.d.ts +5 -0
- package/dist/src/utils/getDataFields.d.ts +1 -1
- package/dist/src/utils/getHeaders.d.ts +3 -1
- package/dist/src/utils/normalizeHeaders.d.ts +1 -0
- package/dist/src/utils/transformInbound/transformInboundControllingPersons.d.ts +1 -1
- package/dist/src/validations/invalidFields/invalidFieldRules.d.ts +2 -2
- package/dist/src/widgets/TaxbitQuestionnaire/TaxbitQuestionnaire.d.ts +7 -3
- package/dist/src/widgets/TaxbitQuestionnairePersist/TaxbitQuestionnairePersist.d.ts +1 -1
- package/dist/src/widgets/TaxbitQuestionnairePersist/useTaxbitPersist.d.ts +2 -1
- package/dist/src/wizard/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/dist/src/wizard/TaxbitQuestionnaireUI/TaxbitQuestionnaireUI.d.ts +1 -1
- package/dist/taxbit-react-sdk.js +5542 -5385
- package/dist/taxbit-react-sdk.umd.cjs +1 -1
- package/package.json +2 -2
- package/style/basic.css +5 -5
- package/style/inline.css +6 -6
- package/dist/src/i18n/locales/mergePropertyFiles.d.ts +0 -7
- package/dist/src/i18n/types/PropertyFile.d.ts +0 -63
package/README.md
CHANGED
|
@@ -376,6 +376,10 @@ type QuestionnaireType = 'DPS' | 'W-FORM' | 'SELF-CERT';
|
|
|
376
376
|
|
|
377
377
|
## Changelog
|
|
378
378
|
|
|
379
|
+
### Version 3.3.0-beta.0
|
|
380
|
+
|
|
381
|
+
- **Proxy Headers**: New `proxyHeaders` prop allows passing custom HTTP headers through to all API requests, enabling support for proxy configurations and custom authentication schemes
|
|
382
|
+
|
|
379
383
|
### Version 3.2.1-beta.0
|
|
380
384
|
|
|
381
385
|
- Bug fix, Fatca and Payee option text updated.
|
|
@@ -4,5 +4,5 @@ type TaxDocumentationProviderProps = UseTaxDocumentationProps & {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
treatyClaims?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare const TaxbitQuestionnaireProvider: ({ data, externalValidations, onSubmit, onProgress, language, questionnaire, step, children, config, treatyClaims, dateFormat, realTimeTinValidation, staging, bearerToken, adaptiveMode, }: TaxDocumentationProviderProps) => React.JSX.Element;
|
|
7
|
+
export declare const TaxbitQuestionnaireProvider: ({ data, externalValidations, onSubmit, onProgress, language, questionnaire, step, children, config, treatyClaims, dateFormat, realTimeTinValidation, staging, bearerToken, adaptiveMode, proxyHeaders, proxyDomain, }: TaxDocumentationProviderProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ClientTaxDocumentation } from '@taxbit/utilities';
|
|
2
2
|
import { InputStep, Locale, Progress, QuestionnaireProp, TaxDocumentation, TaxDocumentationKey } from 'types';
|
|
3
3
|
import { ExternalValidations } from 'types/client';
|
|
4
|
+
import { AdaptiveMode } from '../../types/props';
|
|
4
5
|
type InterviewConfig = {
|
|
5
6
|
minimumAge: number;
|
|
6
7
|
};
|
|
7
8
|
export type DateFormatConfig = 'dmy' | 'mdy' | 'ymd';
|
|
8
|
-
type AdaptiveMode = 'full' | 'skipEdit' | 'skipLock';
|
|
9
9
|
export type UseTaxDocumentationProps = {
|
|
10
10
|
data?: ClientTaxDocumentation;
|
|
11
11
|
language?: Locale;
|
|
@@ -22,9 +22,10 @@ export type UseTaxDocumentationProps = {
|
|
|
22
22
|
bearerToken?: string;
|
|
23
23
|
region?: 'US' | 'EU' | string;
|
|
24
24
|
proxyDomain?: string;
|
|
25
|
+
proxyHeaders?: Record<string, string>;
|
|
25
26
|
adaptiveMode?: AdaptiveMode;
|
|
26
27
|
};
|
|
27
|
-
export declare const useTaxDocumentation: ({ data: startingData, language: initialLanguage, externalValidations, onSubmit, onProgress, step: initialStep, questionnaire, config, treatyClaims, dateFormat, realTimeTinValidation, staging, bearerToken, region, proxyDomain, adaptiveMode, }: UseTaxDocumentationProps) => {
|
|
28
|
+
export declare const useTaxDocumentation: ({ data: startingData, language: initialLanguage, externalValidations, onSubmit, onProgress, step: initialStep, questionnaire, config, treatyClaims, dateFormat, realTimeTinValidation, staging, bearerToken, region, proxyDomain, proxyHeaders, adaptiveMode, }: UseTaxDocumentationProps) => {
|
|
28
29
|
adaptiveMode: AdaptiveMode | undefined;
|
|
29
30
|
config: InterviewConfig | undefined;
|
|
30
31
|
data: TaxDocumentation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useTaxDocumentationContext: () => {
|
|
2
|
-
adaptiveMode: (
|
|
2
|
+
adaptiveMode: import('../../types/props').AdaptiveMode | undefined;
|
|
3
3
|
config: {
|
|
4
4
|
minimumAge: number;
|
|
5
5
|
} | undefined;
|
|
@@ -34,7 +34,7 @@ export declare const useTaxDocumentationContext: () => {
|
|
|
34
34
|
setIsEditing: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
35
35
|
canShowField: (fieldName: import('../../types').TaxDocumentationKey) => boolean;
|
|
36
36
|
}, TaxDocumentationContextProvider: import('react').Provider<{
|
|
37
|
-
adaptiveMode: (
|
|
37
|
+
adaptiveMode: import('../../types/props').AdaptiveMode | undefined;
|
|
38
38
|
config: {
|
|
39
39
|
minimumAge: number;
|
|
40
40
|
} | undefined;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { QuestionnaireProp } from 'types';
|
|
2
|
-
|
|
2
|
+
import { SafeProxyHeaders } from '../../types/props';
|
|
3
|
+
type UseTaxbitProps<TProxyHeaders extends Record<string, string>> = {
|
|
3
4
|
bearerToken: string;
|
|
4
5
|
questionnaire: QuestionnaireProp;
|
|
5
6
|
staging?: boolean;
|
|
6
7
|
onError?: (error: Error) => void | Promise<void>;
|
|
7
8
|
region?: 'US' | 'EU' | string;
|
|
8
9
|
proxyDomain?: never;
|
|
10
|
+
proxyHeaders?: never;
|
|
9
11
|
} | {
|
|
10
12
|
bearerToken: string;
|
|
11
13
|
questionnaire: QuestionnaireProp;
|
|
12
14
|
staging?: never;
|
|
13
15
|
region?: never;
|
|
14
16
|
proxyDomain?: string;
|
|
17
|
+
proxyHeaders?: SafeProxyHeaders<TProxyHeaders>;
|
|
15
18
|
onError?: (error: Error) => void | Promise<void>;
|
|
16
19
|
};
|
|
17
|
-
export declare const useTaxbit: ({ bearerToken, questionnaire, staging, onError, region, proxyDomain, }: UseTaxbitProps) => {
|
|
20
|
+
export declare const useTaxbit: <TProxyHeaders extends Record<string, string>>({ bearerToken, questionnaire, staging, onError, region, proxyDomain, proxyHeaders, }: UseTaxbitProps<TProxyHeaders>) => {
|
|
18
21
|
serverData: import('@taxbit/utilities').SignedClientTaxDocumentation | undefined;
|
|
19
22
|
statusData: import('../..').ClientTaxDocumentationStatus | undefined;
|
|
20
23
|
canGetDocumentUrl: boolean;
|
|
@@ -8,8 +8,9 @@ type UseTaxbitStatusProps = {
|
|
|
8
8
|
staging?: boolean;
|
|
9
9
|
region?: 'US' | 'EU' | string;
|
|
10
10
|
proxyDomain?: string;
|
|
11
|
+
proxyHeaders?: Record<string, string>;
|
|
11
12
|
};
|
|
12
|
-
export declare const useTaxbitStatus: ({ bearerToken, questionnaire, staging, onError, region, proxyDomain, }: UseTaxbitStatusProps) => {
|
|
13
|
+
export declare const useTaxbitStatus: ({ bearerToken, questionnaire, staging, onError, region, proxyDomain, proxyHeaders, }: UseTaxbitStatusProps) => {
|
|
13
14
|
serverData: SignedClientTaxDocumentation | undefined;
|
|
14
15
|
statusData: ClientTaxDocumentationStatus | undefined;
|
|
15
16
|
isLoading: boolean;
|
|
@@ -13,8 +13,9 @@ type UseUsTinValidationProps = {
|
|
|
13
13
|
staging?: boolean;
|
|
14
14
|
region?: 'US' | 'EU' | string;
|
|
15
15
|
proxyDomain?: string;
|
|
16
|
+
proxyHeaders?: Record<string, string>;
|
|
16
17
|
};
|
|
17
|
-
export declare const useUsTinValidation: ({ bearerToken, isEnabled, staging, region, proxyDomain, }: UseUsTinValidationProps) => {
|
|
18
|
+
export declare const useUsTinValidation: ({ bearerToken, isEnabled, staging, region, proxyDomain, proxyHeaders, }: UseUsTinValidationProps) => {
|
|
18
19
|
doValidateUsTin: (name: string, usTin: string) => Promise<void>;
|
|
19
20
|
isValidatingUsTin: boolean;
|
|
20
21
|
usTinValidations: UsTinValidationAttempt[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const bg: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const cs: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const da: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const deAt: LanguageWithProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const deDe:
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const deDe: LanguageWithProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const de:
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const de: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const elCy: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const elEl: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const el: LanguageWithProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const enDPS:
|
|
1
|
+
import { ForeignLanguage } from '../types/Language';
|
|
2
|
+
export declare const enDPS: ForeignLanguage;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const enGb: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const enNz: LanguageWithProperties;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const enUs: LanguageWithProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const en:
|
|
1
|
+
import { LanguageWithProperties } from '../types/Language';
|
|
2
|
+
export declare const en: LanguageWithProperties;
|